diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2014-09-27 17:53:06 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2014-09-27 17:53:06 +0000 |
commit | 4a4018aabb79405f1b50809f76e4bff4d0ead33c (patch) | |
tree | bbe31c32ce7b90f7ca8124d215cd1bc28516a259 /xserver/hw | |
parent | 340ecc70b63a19bbc23b3ffc950d5beb49220505 (diff) |
Update to xserver 1.16.1.
Tested by naddy@, jsg@ & kettenis@
Diffstat (limited to 'xserver/hw')
360 files changed, 11653 insertions, 4478 deletions
diff --git a/xserver/hw/Makefile.am b/xserver/hw/Makefile.am index 6c2cc6bd4..19895dc77 100644 --- a/xserver/hw/Makefile.am +++ b/xserver/hw/Makefile.am @@ -26,6 +26,10 @@ if XQUARTZ XQUARTZ_SUBDIRS = xquartz endif +if XWAYLAND +XWAYLAND_SUBDIRS = xwayland +endif + SUBDIRS = \ $(XORG_SUBDIRS) \ $(XWIN_SUBDIRS) \ @@ -33,9 +37,10 @@ SUBDIRS = \ $(XNEST_SUBDIRS) \ $(DMX_SUBDIRS) \ $(KDRIVE_SUBDIRS) \ - $(XQUARTZ_SUBDIRS) + $(XQUARTZ_SUBDIRS) \ + $(XWAYLAND_SUBDIRS) -DIST_SUBDIRS = dmx xfree86 vfb xnest xwin xquartz kdrive +DIST_SUBDIRS = dmx xfree86 vfb xnest xwin xquartz kdrive xwayland relink: $(AM_V_at)for i in $(SUBDIRS) ; do $(MAKE) -C $$i relink || exit 1 ; done diff --git a/xserver/hw/Makefile.in b/xserver/hw/Makefile.in index 34214658d..9fba38116 100644 --- a/xserver/hw/Makefile.in +++ b/xserver/hw/Makefile.in @@ -167,6 +167,8 @@ 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@ @@ -211,6 +213,10 @@ 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@ @@ -313,7 +319,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -322,6 +331,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -388,6 +398,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ @@ -467,6 +481,7 @@ top_srcdir = @top_srcdir@ @XWIN_TRUE@XWIN_SUBDIRS = xwin @KDRIVE_TRUE@KDRIVE_SUBDIRS = kdrive @XQUARTZ_TRUE@XQUARTZ_SUBDIRS = xquartz +@XWAYLAND_TRUE@XWAYLAND_SUBDIRS = xwayland SUBDIRS = \ $(XORG_SUBDIRS) \ $(XWIN_SUBDIRS) \ @@ -474,9 +489,10 @@ SUBDIRS = \ $(XNEST_SUBDIRS) \ $(DMX_SUBDIRS) \ $(KDRIVE_SUBDIRS) \ - $(XQUARTZ_SUBDIRS) + $(XQUARTZ_SUBDIRS) \ + $(XWAYLAND_SUBDIRS) -DIST_SUBDIRS = dmx xfree86 vfb xnest xwin xquartz kdrive +DIST_SUBDIRS = dmx xfree86 vfb xnest xwin xquartz kdrive xwayland all: all-recursive .SUFFIXES: diff --git a/xserver/hw/dmx/Makefile.am b/xserver/hw/dmx/Makefile.am index a05af139e..eef84cb66 100644 --- a/xserver/hw/dmx/Makefile.am +++ b/xserver/hw/dmx/Makefile.am @@ -65,7 +65,6 @@ Xdmx_SOURCES = dmx.c \ dmxwindow.c \ dmxwindow.h \ $(top_srcdir)/mi/miinitext.c \ - $(top_srcdir)/fb/fbcmap_mi.c \ $(GLX_SRCS) diff --git a/xserver/hw/dmx/Makefile.in b/xserver/hw/dmx/Makefile.in index d3420401b..814cddf65 100644 --- a/xserver/hw/dmx/Makefile.in +++ b/xserver/hw/dmx/Makefile.in @@ -84,9 +84,8 @@ am__Xdmx_SOURCES_DIST = dmx.c dmxcb.c dmxcb.h dmxclient.h dmxcmap.c \ dmxpict.h dmxpixmap.c dmxpixmap.h dmxprop.c dmxprop.h \ dmxscrinit.c dmxscrinit.h dmxstat.c dmxstat.h dmxsync.c \ dmxsync.h dmxvisual.c dmxvisual.h dmxwindow.c dmxwindow.h \ - $(top_srcdir)/mi/miinitext.c $(top_srcdir)/fb/fbcmap_mi.c \ - $(top_srcdir)/Xext/panoramiX.c dmx_glxvisuals.c \ - dmx_glxvisuals.h + $(top_srcdir)/mi/miinitext.c $(top_srcdir)/Xext/panoramiX.c \ + dmx_glxvisuals.c dmx_glxvisuals.h @XINERAMA_TRUE@am__objects_1 = panoramiX.$(OBJEXT) @GLX_TRUE@am__objects_2 = $(am__objects_1) dmx_glxvisuals.$(OBJEXT) am_Xdmx_OBJECTS = dmx.$(OBJEXT) dmxcb.$(OBJEXT) dmxcmap.$(OBJEXT) \ @@ -96,7 +95,7 @@ am_Xdmx_OBJECTS = dmx.$(OBJEXT) dmxcb.$(OBJEXT) dmxcmap.$(OBJEXT) \ dmxpict.$(OBJEXT) dmxpixmap.$(OBJEXT) dmxprop.$(OBJEXT) \ dmxscrinit.$(OBJEXT) dmxstat.$(OBJEXT) dmxsync.$(OBJEXT) \ dmxvisual.$(OBJEXT) dmxwindow.$(OBJEXT) miinitext.$(OBJEXT) \ - fbcmap_mi.$(OBJEXT) $(am__objects_2) + $(am__objects_2) Xdmx_OBJECTS = $(am_Xdmx_OBJECTS) am__DEPENDENCIES_1 = $(GLX_LIBS) input/libdmxinput.a \ config/libdmxconfig.a @@ -228,6 +227,8 @@ 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@ @@ -272,6 +273,10 @@ 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@ @@ -374,7 +379,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -383,6 +391,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -458,6 +467,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ @@ -587,7 +600,6 @@ Xdmx_SOURCES = dmx.c \ dmxwindow.c \ dmxwindow.h \ $(top_srcdir)/mi/miinitext.c \ - $(top_srcdir)/fb/fbcmap_mi.c \ $(GLX_SRCS) Xdmx_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) @@ -704,7 +716,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxsync.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxvisual.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dmxwindow.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fbcmap_mi.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/miinitext.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/panoramiX.Po@am__quote@ @@ -743,20 +754,6 @@ miinitext.obj: $(top_srcdir)/mi/miinitext.c @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` -fbcmap_mi.o: $(top_srcdir)/fb/fbcmap_mi.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fbcmap_mi.o -MD -MP -MF $(DEPDIR)/fbcmap_mi.Tpo -c -o fbcmap_mi.o `test -f '$(top_srcdir)/fb/fbcmap_mi.c' || echo '$(srcdir)/'`$(top_srcdir)/fb/fbcmap_mi.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fbcmap_mi.Tpo $(DEPDIR)/fbcmap_mi.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/fb/fbcmap_mi.c' object='fbcmap_mi.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 fbcmap_mi.o `test -f '$(top_srcdir)/fb/fbcmap_mi.c' || echo '$(srcdir)/'`$(top_srcdir)/fb/fbcmap_mi.c - -fbcmap_mi.obj: $(top_srcdir)/fb/fbcmap_mi.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fbcmap_mi.obj -MD -MP -MF $(DEPDIR)/fbcmap_mi.Tpo -c -o fbcmap_mi.obj `if test -f '$(top_srcdir)/fb/fbcmap_mi.c'; then $(CYGPATH_W) '$(top_srcdir)/fb/fbcmap_mi.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/fb/fbcmap_mi.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fbcmap_mi.Tpo $(DEPDIR)/fbcmap_mi.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/fb/fbcmap_mi.c' object='fbcmap_mi.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 fbcmap_mi.obj `if test -f '$(top_srcdir)/fb/fbcmap_mi.c'; then $(CYGPATH_W) '$(top_srcdir)/fb/fbcmap_mi.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/fb/fbcmap_mi.c'; fi` - panoramiX.o: $(top_srcdir)/Xext/panoramiX.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT panoramiX.o -MD -MP -MF $(DEPDIR)/panoramiX.Tpo -c -o panoramiX.o `test -f '$(top_srcdir)/Xext/panoramiX.c' || echo '$(srcdir)/'`$(top_srcdir)/Xext/panoramiX.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/panoramiX.Tpo $(DEPDIR)/panoramiX.Po diff --git a/xserver/hw/dmx/config/Canvas.c b/xserver/hw/dmx/config/Canvas.c index f0586e509..103103346 100644 --- a/xserver/hw/dmx/config/Canvas.c +++ b/xserver/hw/dmx/config/Canvas.c @@ -98,10 +98,10 @@ static XtResource resources[] = { {XtNcallback, XtCCallback, XtRCallback, sizeof(XtCallbackList), offset(input_callback), XtRCallback, NULL} , - {XtNcanvasExposeCallback, XtCcanvasExposeCallback, XtRCallback, + {(char *) XtNcanvasExposeCallback, (char *) XtCcanvasExposeCallback, XtRCallback, sizeof(XtCallbackList), offset(expose_callback), XtRCallback, NULL} , - {XtNcanvasResizeCallback, XtCcanvasResizeCallback, XtRCallback, + {(char *) XtNcanvasResizeCallback, (char *) XtCcanvasResizeCallback, XtRCallback, sizeof(XtCallbackList), offset(resize_callback), XtRCallback, NULL} , }; @@ -109,7 +109,7 @@ static XtResource resources[] = { #undef offset static XtActionsRec actions[] = { - {"canvas", CanvasAction}, + {(char *) "canvas", CanvasAction}, }; static char translations[] = "<Key>: canvas()\n\ @@ -123,7 +123,7 @@ CanvasClassRec canvasClassRec = { /* core */ { (WidgetClass) Superclass, /* superclass */ - "Canvas", /* class_name */ + (char *) "Canvas", /* class_name */ sizeof(CanvasRec), /* widget_size */ NULL, /* class_initialize */ NULL, /* class_part_initialize */ diff --git a/xserver/hw/dmx/config/Makefile.in b/xserver/hw/dmx/config/Makefile.in index b20b8bfc1..3e147796a 100644 --- a/xserver/hw/dmx/config/Makefile.in +++ b/xserver/hw/dmx/config/Makefile.in @@ -242,6 +242,8 @@ 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@ @@ -286,6 +288,10 @@ 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@ @@ -388,7 +394,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -397,6 +406,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -463,6 +473,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/dmx/config/man/Makefile.in b/xserver/hw/dmx/config/man/Makefile.in index c2a36a9a7..17ff0ea1a 100644 --- a/xserver/hw/dmx/config/man/Makefile.in +++ b/xserver/hw/dmx/config/man/Makefile.in @@ -160,6 +160,8 @@ 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@ @@ -204,6 +206,10 @@ 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@ @@ -268,6 +274,7 @@ MAN_SUBSTS = @MAN_SUBSTS@ -e 's|__logdir__|$(logdir)|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@ @@ -322,7 +329,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -331,6 +341,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -397,6 +408,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/dmx/config/xdmxconfig.c b/xserver/hw/dmx/config/xdmxconfig.c index 2121dd781..0540d0173 100644 --- a/xserver/hw/dmx/config/xdmxconfig.c +++ b/xserver/hw/dmx/config/xdmxconfig.c @@ -303,7 +303,6 @@ dmxConfigCanvasUpdate(void) fs = XQueryFont(dpy, gcontext); for (pt = dmxConfigCurrent->subentry; pt; pt = pt->next) { int x, y, len; - int xo = 3, yo = fs->ascent + fs->descent + 2; GC gc; if (pt->type != dmxConfigDisplay) @@ -321,6 +320,8 @@ dmxConfigCanvasUpdate(void) y = dmxConfigWidgetHeight - 1; XDrawRectangle(dpy, win, gc, x, y, w, h); if (fs && len) { + int xo = 3, yo = fs->ascent + fs->descent + 2; + while (len && XTextWidth(fs, pt->display->name, len) >= w - 2 * xo) --len; if (len) @@ -974,9 +975,9 @@ main(int argc, char **argv) const char *canvastrans = "<Btn3Down>: placeMenu() XtMenuPopup(buttonpopup)"; XtActionsRec actiontable[] = { - {"openOk", dmxConfigOkAction}, - {"placeMenu", dmxConfigPlaceMenu}, - {"noop", NULL} + {(char *) "openOk", dmxConfigOkAction}, + {(char *) "placeMenu", dmxConfigPlaceMenu}, + {(char *) "noop", NULL} }; dmxConfigFilename = XtNewString((argc >= 2) ? argv[1] : ""); diff --git a/xserver/hw/dmx/dmx.c b/xserver/hw/dmx/dmx.c index 0f7cb5c64..99e970cb9 100644 --- a/xserver/hw/dmx/dmx.c +++ b/xserver/hw/dmx/dmx.c @@ -268,7 +268,7 @@ ProcDMXForceWindowCreation(ClientPtr client) PanoramiXRes *win; int i; - if (Success != dixLookupResourceByType((pointer *) &win, + if (Success != dixLookupResourceByType((void **) &win, stuff->window, XRT_WINDOW, client, DixReadAccess)) return -1; /* BadWindow */ @@ -556,7 +556,7 @@ dmxPopulatePanoramiX(ClientPtr client, Window window, int count = 0; DMXWindowAttributesRec attr; - if (Success != dixLookupResourceByType((pointer *) &win, + if (Success != dixLookupResourceByType((void **) &win, window, XRT_WINDOW, client, DixReadAccess)) return -1; /* BadWindow */ diff --git a/xserver/hw/dmx/dmxclient.h b/xserver/hw/dmx/dmxclient.h index 19dfdbe16..be8116f14 100644 --- a/xserver/hw/dmx/dmxclient.h +++ b/xserver/hw/dmx/dmxclient.h @@ -118,17 +118,6 @@ typedef XID KeySym64; #undef KeySym #endif -/* These are in exglobals.h, but that conflicts with xkbsrv.h */ -extern int ProximityIn; -extern int ProximityOut; -extern int DeviceValuator; -extern int DeviceMotionNotify; -extern int DeviceFocusIn; -extern int DeviceFocusOut; -extern int DeviceStateNotify; -extern int DeviceMappingNotify; -extern int ChangeDeviceNotify; - /* Some protocol gets included last, after undefines. */ #include <X11/XKBlib.h> #include <X11/extensions/XKBproto.h> diff --git a/xserver/hw/dmx/dmxextension.c b/xserver/hw/dmx/dmxextension.c index c6c6a8e6d..fcc97e3df 100644 --- a/xserver/hw/dmx/dmxextension.c +++ b/xserver/hw/dmx/dmxextension.c @@ -728,7 +728,7 @@ static Bool FoundPixImage; * another screen with the same image. If so, copy the pixmap image * from the existing screen to the newly created pixmap. */ static void -dmxBERestorePixmapImage(pointer value, XID id, RESTYPE type, pointer p) +dmxBERestorePixmapImage(void *value, XID id, RESTYPE type, void *p) { if ((type & TypeMask) == (XRT_PIXMAP & TypeMask)) { PixmapPtr pDst = (PixmapPtr) p; @@ -737,7 +737,7 @@ dmxBERestorePixmapImage(pointer value, XID id, RESTYPE type, pointer p) PixmapPtr pPix; int i; - dixLookupResourceByType((pointer *) &pPix, pXinPix->info[idx].id, + dixLookupResourceByType((void **) &pPix, pXinPix->info[idx].id, RT_PIXMAP, NullClient, DixUnknownAccess); if (pPix != pDst) return; /* Not a match.... Next! */ @@ -749,7 +749,7 @@ dmxBERestorePixmapImage(pointer value, XID id, RESTYPE type, pointer p) if (i == idx) continue; /* Self replication is bad */ - dixLookupResourceByType((pointer *) &pSrc, pXinPix->info[i].id, + dixLookupResourceByType((void **) &pSrc, pXinPix->info[i].id, RT_PIXMAP, NullClient, DixUnknownAccess); pSrcPriv = DMX_GET_PIXMAP_PRIV(pSrc); if (pSrcPriv->pixmap) { @@ -828,7 +828,7 @@ dmxBERestorePixmap(PixmapPtr pPixmap) for (i = currentMaxClients; --i >= 0;) if (clients[i]) FindAllClientResources(clients[i], dmxBERestorePixmapImage, - (pointer) pPixmap); + (void *) pPixmap); /* No corresponding pixmap image was found on other screens, so we * need to copy it from the saved image when the screen was detached @@ -895,7 +895,7 @@ dmxBERestorePixmap(PixmapPtr pPixmap) * number passed in as \a n and calls the appropriate DMX function to * create the associated resource on the back-end server. */ static void -dmxBECreateResources(pointer value, XID id, RESTYPE type, pointer n) +dmxBECreateResources(void *value, XID id, RESTYPE type, void *n) { int scrnNum = (uintptr_t) n; ScreenPtr pScreen = screenInfo.screens[scrnNum]; @@ -1121,7 +1121,7 @@ dmxCompareScreens(DMXScreenInfo * new, DMXScreenInfo * old) /** Restore Render's picture */ static void -dmxBERestoreRenderPict(pointer value, XID id, pointer n) +dmxBERestoreRenderPict(void *value, XID id, void *n) { PicturePtr pPicture = value; /* The picture */ DrawablePtr pDraw = pPicture->pDrawable; /* The picture's drawable */ @@ -1145,7 +1145,7 @@ dmxBERestoreRenderPict(pointer value, XID id, pointer n) /** Restore Render's glyphs */ static void -dmxBERestoreRenderGlyph(pointer value, XID id, pointer n) +dmxBERestoreRenderGlyph(void *value, XID id, void *n) { GlyphSetPtr glyphSet = value; int scrnNum = (uintptr_t) n; @@ -1340,7 +1340,7 @@ dmxAttachScreen(int idx, DMXScreenAttributesPtr attr) for (i = currentMaxClients; --i >= 0;) if (clients[i]) FindAllClientResources(clients[i], dmxBECreateResources, - (pointer) (uintptr_t) idx); + (void *) (uintptr_t) idx); /* Create window hierarchy (top down) */ dmxBECreateWindowTree(idx); @@ -1350,14 +1350,14 @@ dmxAttachScreen(int idx, DMXScreenAttributesPtr attr) if (clients[i]) FindClientResourcesByType(clients[i], PictureType, dmxBERestoreRenderPict, - (pointer) (uintptr_t) idx); + (void *) (uintptr_t) idx); /* Restore the glyph state for RENDER */ for (i = currentMaxClients; --i >= 0;) if (clients[i]) FindClientResourcesByType(clients[i], GlyphSetType, dmxBERestoreRenderGlyph, - (pointer) (uintptr_t) idx); + (void *) (uintptr_t) idx); /* Refresh screen by generating exposure events for all windows */ dmxForceExposures(idx); @@ -1425,7 +1425,7 @@ dmxAttachScreen(int idx, DMXScreenAttributesPtr attr) /** Search the Xinerama XRT_PIXMAP resources for the pixmap that needs * to have its image saved. */ static void -dmxBEFindPixmapImage(pointer value, XID id, RESTYPE type, pointer p) +dmxBEFindPixmapImage(void *value, XID id, RESTYPE type, void *p) { if ((type & TypeMask) == (XRT_PIXMAP & TypeMask)) { PixmapPtr pDst = (PixmapPtr) p; @@ -1434,7 +1434,7 @@ dmxBEFindPixmapImage(pointer value, XID id, RESTYPE type, pointer p) PixmapPtr pPix; int i; - dixLookupResourceByType((pointer *) &pPix, pXinPix->info[idx].id, + dixLookupResourceByType((void **) &pPix, pXinPix->info[idx].id, RT_PIXMAP, NullClient, DixUnknownAccess); if (pPix != pDst) return; /* Not a match.... Next! */ @@ -1446,7 +1446,7 @@ dmxBEFindPixmapImage(pointer value, XID id, RESTYPE type, pointer p) if (i == idx) continue; /* Self replication is bad */ - dixLookupResourceByType((pointer *) &pSrc, pXinPix->info[i].id, + dixLookupResourceByType((void **) &pSrc, pXinPix->info[i].id, RT_PIXMAP, NullClient, DixUnknownAccess); pSrcPriv = DMX_GET_PIXMAP_PRIV(pSrc); if (pSrcPriv->pixmap) { @@ -1482,7 +1482,7 @@ dmxBESavePixmap(PixmapPtr pPixmap) for (i = currentMaxClients; --i >= 0;) if (clients[i]) FindAllClientResources(clients[i], dmxBEFindPixmapImage, - (pointer) pPixmap); + (void *) pPixmap); /* Save the image only if there is no other screens that have a * pixmap that corresponds to the one we are trying to save. */ @@ -1522,7 +1522,7 @@ dmxBESavePixmap(PixmapPtr pPixmap) * number passed in as \a n and calls the appropriate DMX function to * free the associated resource on the back-end server. */ static void -dmxBEDestroyResources(pointer value, XID id, RESTYPE type, pointer n) +dmxBEDestroyResources(void *value, XID id, RESTYPE type, void *n) { int scrnNum = (uintptr_t) n; ScreenPtr pScreen = screenInfo.screens[scrnNum]; @@ -1683,7 +1683,7 @@ dmxDetachScreen(int idx) for (i = currentMaxClients; --i >= 0;) if (clients[i]) FindAllClientResources(clients[i], dmxBEDestroyResources, - (pointer) (uintptr_t) idx); + (void *) (uintptr_t) idx); /* Free scratch GCs */ dmxBEDestroyScratchGCs(idx); diff --git a/xserver/hw/dmx/dmxfont.c b/xserver/hw/dmx/dmxfont.c index 7ef7ad971..115422d41 100644 --- a/xserver/hw/dmx/dmxfont.c +++ b/xserver/hw/dmx/dmxfont.c @@ -397,12 +397,12 @@ dmxBELoadFont(ScreenPtr pScreen, FontPtr pFont) "font-path-related options, see the Xdmx man page.\n"); } + free(goodfps); if (!dmxIgnoreBadFontPaths || (dmxIgnoreBadFontPaths && dmxSetFontPath(dmxScreen))) { /* We still have errors so return with error */ dmxFreeFontPath(fp); XFreeFontPath(oldFontPath); - free(goodfps); return FALSE; } } @@ -460,7 +460,7 @@ dmxRealizeFont(ScreenPtr pScreen, FontPtr pFont) pFontPriv->refcnt = 0; } - FontSetPrivate(pFont, dmxFontPrivateIndex, (pointer) pFontPriv); + FontSetPrivate(pFont, dmxFontPrivateIndex, (void *) pFontPriv); if (dmxScreen->beDisplay) { if (!dmxBELoadFont(pScreen, pFont)) diff --git a/xserver/hw/dmx/dmxgc.c b/xserver/hw/dmx/dmxgc.c index 703aeb336..2d61ea2f7 100644 --- a/xserver/hw/dmx/dmxgc.c +++ b/xserver/hw/dmx/dmxgc.c @@ -378,7 +378,7 @@ dmxDestroyGC(GCPtr pGC) /** Change the clip rects for a GC. */ void -dmxChangeClip(GCPtr pGC, int type, pointer pvalue, int nrects) +dmxChangeClip(GCPtr pGC, int type, void *pvalue, int nrects) { ScreenPtr pScreen = pGC->pScreen; DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum]; diff --git a/xserver/hw/dmx/dmxgc.h b/xserver/hw/dmx/dmxgc.h index 7b99d88c6..c8ecb53a0 100644 --- a/xserver/hw/dmx/dmxgc.h +++ b/xserver/hw/dmx/dmxgc.h @@ -55,7 +55,7 @@ extern void dmxValidateGC(GCPtr pGC, unsigned long changes, extern void dmxChangeGC(GCPtr pGC, unsigned long mask); extern void dmxCopyGC(GCPtr pGCSrc, unsigned long changes, GCPtr pGCDst); extern void dmxDestroyGC(GCPtr pGC); -extern void dmxChangeClip(GCPtr pGC, int type, pointer pvalue, int nrects); +extern void dmxChangeClip(GCPtr pGC, int type, void *pvalue, int nrects); extern void dmxDestroyClip(GCPtr pGC); extern void dmxCopyClip(GCPtr pGCDst, GCPtr pGCSrc); diff --git a/xserver/hw/dmx/dmxgcops.c b/xserver/hw/dmx/dmxgcops.c index 19330668a..aa7c8eb54 100644 --- a/xserver/hw/dmx/dmxgcops.c +++ b/xserver/hw/dmx/dmxgcops.c @@ -508,7 +508,7 @@ dmxImageText16(DrawablePtr pDrawable, GCPtr pGC, void dmxImageGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, int x, int y, unsigned int nglyph, - CharInfoPtr * ppci, pointer pglyphBase) + CharInfoPtr * ppci, void *pglyphBase) { /* Error -- this should never happen! */ } @@ -517,7 +517,7 @@ dmxImageGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, void dmxPolyGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, int x, int y, unsigned int nglyph, - CharInfoPtr * ppci, pointer pglyphBase) + CharInfoPtr * ppci, void *pglyphBase) { /* Error -- this should never happen! */ } @@ -551,7 +551,7 @@ dmxFindAlternatePixmap(DrawablePtr pDrawable, XID *draw) if (pDrawable->type != DRAWABLE_PIXMAP) return NULL; - if (Success != dixLookupResourceByType((pointer *) &pXinPix, + if (Success != dixLookupResourceByType((void **) &pXinPix, pDrawable->id, XRT_PIXMAP, NullClient, DixUnknownAccess)) return NULL; @@ -562,7 +562,7 @@ dmxFindAlternatePixmap(DrawablePtr pDrawable, XID *draw) PixmapPtr pSrc; dmxPixPrivPtr pSrcPriv; - dixLookupResourceByType((pointer *) &pSrc, pXinPix->info[i].id, + dixLookupResourceByType((void **) &pSrc, pXinPix->info[i].id, RT_PIXMAP, NullClient, DixUnknownAccess); pSrcPriv = DMX_GET_PIXMAP_PRIV(pSrc); if (pSrcPriv->pixmap) { diff --git a/xserver/hw/dmx/dmxgcops.h b/xserver/hw/dmx/dmxgcops.h index 4ba0ad500..529b6ffc6 100644 --- a/xserver/hw/dmx/dmxgcops.h +++ b/xserver/hw/dmx/dmxgcops.h @@ -78,10 +78,10 @@ extern void dmxImageText16(DrawablePtr pDrawable, GCPtr pGC, int x, int y, int count, unsigned short *chars); extern void dmxImageGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, int x, int y, unsigned int nglyph, - CharInfoPtr * ppci, pointer pglyphBase); + CharInfoPtr * ppci, void *pglyphBase); extern void dmxPolyGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, int x, int y, unsigned int nglyph, - CharInfoPtr * ppci, pointer pglyphBase); + CharInfoPtr * ppci, void *pglyphBase); extern void dmxPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDst, int w, int h, int x, int y); diff --git a/xserver/hw/dmx/dmxinit.c b/xserver/hw/dmx/dmxinit.c index 7adcba0bb..fd2ade0ef 100644 --- a/xserver/hw/dmx/dmxinit.c +++ b/xserver/hw/dmx/dmxinit.c @@ -597,10 +597,8 @@ static void dmxAddExtensions(Bool glxSupported) { GlxExtensionInit, "GLX", &glxSupported }, #endif }; - int i; - for (i = 0; i < ARRAY_SIZE(dmxExtensions); i++) - LoadExtension(&dmxExtensions[i], TRUE); + LoadExtensionList(dmxExtensions, ARRAY_SIZE(dmxExtensions), TRUE); } /** This routine is called in Xserver/dix/main.c from \a main(). */ diff --git a/xserver/hw/dmx/dmxpict.c b/xserver/hw/dmx/dmxpict.c index c9762c2f1..64d0ae150 100644 --- a/xserver/hw/dmx/dmxpict.c +++ b/xserver/hw/dmx/dmxpict.c @@ -285,7 +285,7 @@ dmxProcRenderCreateGlyphSet(ClientPtr client) /* Store glyphsets from backends in glyphSet->devPrivate ????? */ /* Make sure we handle all errors here!! */ - dixLookupResourceByType((pointer *) &glyphSet, + dixLookupResourceByType((void **) &glyphSet, stuff->gsid, GlyphSetType, client, DixDestroyAccess); @@ -332,7 +332,7 @@ dmxProcRenderFreeGlyphSet(ClientPtr client) REQUEST(xRenderFreeGlyphSetReq); REQUEST_SIZE_MATCH(xRenderFreeGlyphSetReq); - dixLookupResourceByType((pointer *) &glyphSet, + dixLookupResourceByType((void **) &glyphSet, stuff->glyphset, GlyphSetType, client, DixDestroyAccess); @@ -378,7 +378,7 @@ dmxProcRenderAddGlyphs(ClientPtr client) CARD8 *bits; int nbytes; - dixLookupResourceByType((pointer *) &glyphSet, + dixLookupResourceByType((void **) &glyphSet, stuff->glyphset, GlyphSetType, client, DixReadAccess); glyphPriv = DMX_GET_GLYPH_PRIV(glyphSet); @@ -423,7 +423,7 @@ dmxProcRenderFreeGlyphs(ClientPtr client) REQUEST(xRenderFreeGlyphsReq); REQUEST_AT_LEAST_SIZE(xRenderFreeGlyphsReq); - dixLookupResourceByType((pointer *) &glyphSet, + dixLookupResourceByType((void **) &glyphSet, stuff->glyphset, GlyphSetType, client, DixWriteAccess); @@ -498,14 +498,14 @@ dmxProcRenderCompositeGlyphs(ClientPtr client) GlyphSetPtr glyphSet; dmxGlyphPrivPtr glyphPriv; - dixLookupResourceByType((pointer *) &pSrc, + dixLookupResourceByType((void **) &pSrc, stuff->src, PictureType, client, DixReadAccess); pSrcPriv = DMX_GET_PICT_PRIV(pSrc); if (!pSrcPriv->pict) return ret; - dixLookupResourceByType((pointer *) &pDst, + dixLookupResourceByType((void **) &pDst, stuff->dst, PictureType, client, DixWriteAccess); @@ -524,7 +524,7 @@ dmxProcRenderCompositeGlyphs(ClientPtr client) return ret; if (stuff->maskFormat) - dixLookupResourceByType((pointer *) &pFmt, + dixLookupResourceByType((void **) &pFmt, stuff->maskFormat, PictFormatType, client, DixReadAccess); else @@ -585,7 +585,7 @@ dmxProcRenderCompositeGlyphs(ClientPtr client) curGlyph = glyphs; curElt = elts; - dixLookupResourceByType((pointer *) &glyphSet, + dixLookupResourceByType((void **) &glyphSet, stuff->glyphset, GlyphSetType, client, DixReadAccess); glyphPriv = DMX_GET_GLYPH_PRIV(glyphSet); @@ -595,7 +595,7 @@ dmxProcRenderCompositeGlyphs(ClientPtr client) buffer += sizeof(xGlyphElt); if (elt->len == 0xff) { - dixLookupResourceByType((pointer *) &glyphSet, + dixLookupResourceByType((void **) &glyphSet, *((CARD32 *) buffer), GlyphSetType, client, DixReadAccess); glyphPriv = DMX_GET_GLYPH_PRIV(glyphSet); @@ -894,7 +894,7 @@ dmxDestroyPicture(PicturePtr pPicture) /** Change the picture's list of clip rectangles. */ int -dmxChangePictureClip(PicturePtr pPicture, int clipType, pointer value, int n) +dmxChangePictureClip(PicturePtr pPicture, int clipType, void *value, int n) { ScreenPtr pScreen = pPicture->pDrawable->pScreen; DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum]; diff --git a/xserver/hw/dmx/dmxpict.h b/xserver/hw/dmx/dmxpict.h index 6c37be924..080da3bef 100644 --- a/xserver/hw/dmx/dmxpict.h +++ b/xserver/hw/dmx/dmxpict.h @@ -65,7 +65,7 @@ extern Bool dmxDestroyPictureList(WindowPtr pWindow); extern int dmxCreatePicture(PicturePtr pPicture); extern void dmxDestroyPicture(PicturePtr pPicture); extern int dmxChangePictureClip(PicturePtr pPicture, int clipType, - pointer value, int n); + void *value, int n); extern void dmxDestroyPictureClip(PicturePtr pPicture); extern void dmxChangePicture(PicturePtr pPicture, Mask mask); extern void dmxValidatePicture(PicturePtr pPicture, Mask mask); diff --git a/xserver/hw/dmx/dmxstat.c b/xserver/hw/dmx/dmxstat.c index 0d8c22a9e..0ae5107a4 100644 --- a/xserver/hw/dmx/dmxstat.c +++ b/xserver/hw/dmx/dmxstat.c @@ -175,7 +175,7 @@ dmxStatSync(DMXScreenInfo * dmxScreen, /* Actually do the work of printing out the human-readable message. */ static CARD32 -dmxStatCallback(OsTimerPtr timer, CARD32 t, pointer arg) +dmxStatCallback(OsTimerPtr timer, CARD32 t, void *arg) { int i, j; static int header = 0; diff --git a/xserver/hw/dmx/dmxsync.c b/xserver/hw/dmx/dmxsync.c index bf28584b4..81dbbc64d 100644 --- a/xserver/hw/dmx/dmxsync.c +++ b/xserver/hw/dmx/dmxsync.c @@ -82,7 +82,7 @@ dmxDoSync(DMXScreenInfo * dmxScreen) } static CARD32 -dmxSyncCallback(OsTimerPtr timer, CARD32 time, pointer arg) +dmxSyncCallback(OsTimerPtr timer, CARD32 time, void *arg) { int i; @@ -99,13 +99,13 @@ dmxSyncCallback(OsTimerPtr timer, CARD32 time, pointer arg) } static void -dmxSyncBlockHandler(pointer blockData, OSTimePtr pTimeout, pointer pReadMask) +dmxSyncBlockHandler(void *blockData, OSTimePtr pTimeout, void *pReadMask) { TimerForce(dmxSyncTimer); } static void -dmxSyncWakeupHandler(pointer blockData, int result, pointer pReadMask) +dmxSyncWakeupHandler(void *blockData, int result, void *pReadMask) { } diff --git a/xserver/hw/dmx/dmxwindow.c b/xserver/hw/dmx/dmxwindow.c index 9b8a3840e..1c235273c 100644 --- a/xserver/hw/dmx/dmxwindow.c +++ b/xserver/hw/dmx/dmxwindow.c @@ -86,7 +86,7 @@ dmxCreateRootWindow(WindowPtr pWindow) parent = dmxScreen->scrnWin; /* This is our "Screen" window */ visual = dmxScreen->beVisuals[dmxScreen->beDefVisualIndex].visual; - dixLookupResourceByType((pointer *) &pCmap, wColormap(pWindow), + dixLookupResourceByType((void **) &pCmap, wColormap(pWindow), RT_COLORMAP, NullClient, DixUnknownAccess); pCmapPriv = DMX_GET_COLORMAP_PRIV(pCmap); @@ -192,7 +192,7 @@ dmxGetDefaultWindowAttributes(WindowPtr pWindow, ColormapPtr pCmap; dmxColormapPrivPtr pCmapPriv; - dixLookupResourceByType((pointer *) &pCmap, wColormap(pWindow), + dixLookupResourceByType((void **) &pCmap, wColormap(pWindow), RT_COLORMAP, NullClient, DixUnknownAccess); pCmapPriv = DMX_GET_COLORMAP_PRIV(pCmap); *cmap = pCmapPriv->cmap; @@ -561,7 +561,7 @@ dmxDoChangeWindowAttributes(WindowPtr pWindow, ColormapPtr pCmap; dmxColormapPrivPtr pCmapPriv; - dixLookupResourceByType((pointer *) &pCmap, wColormap(pWindow), + dixLookupResourceByType((void **) &pCmap, wColormap(pWindow), RT_COLORMAP, NullClient, DixUnknownAccess); pCmapPriv = DMX_GET_COLORMAP_PRIV(pCmap); attribs->colormap = pCmapPriv->cmap; diff --git a/xserver/hw/dmx/doc/Makefile.in b/xserver/hw/dmx/doc/Makefile.in index 2693e2c86..b72bc4ceb 100644 --- a/xserver/hw/dmx/doc/Makefile.in +++ b/xserver/hw/dmx/doc/Makefile.in @@ -172,6 +172,8 @@ 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@ @@ -216,6 +218,10 @@ 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@ @@ -318,7 +324,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -327,6 +336,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -393,6 +403,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/dmx/doxygen/Makefile.in b/xserver/hw/dmx/doxygen/Makefile.in index 66179a50c..ce42f5073 100644 --- a/xserver/hw/dmx/doxygen/Makefile.in +++ b/xserver/hw/dmx/doxygen/Makefile.in @@ -153,6 +153,8 @@ 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@ @@ -197,6 +199,10 @@ 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@ @@ -299,7 +305,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -308,6 +317,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -374,6 +384,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/dmx/examples/Makefile.in b/xserver/hw/dmx/examples/Makefile.in index 0f1c83cb9..d1fe91042 100644 --- a/xserver/hw/dmx/examples/Makefile.in +++ b/xserver/hw/dmx/examples/Makefile.in @@ -267,6 +267,8 @@ 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@ @@ -311,6 +313,10 @@ 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@ @@ -413,7 +419,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -422,6 +431,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -488,6 +498,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/dmx/glxProxy/Makefile.in b/xserver/hw/dmx/glxProxy/Makefile.in index 5688b0c4d..84069a014 100644 --- a/xserver/hw/dmx/glxProxy/Makefile.in +++ b/xserver/hw/dmx/glxProxy/Makefile.in @@ -173,6 +173,8 @@ 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@ @@ -217,6 +219,10 @@ 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@ @@ -319,7 +325,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -328,6 +337,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -394,6 +404,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/dmx/glxProxy/glxcmds.c b/xserver/hw/dmx/glxProxy/glxcmds.c index 190eeefe2..23c3366bd 100644 --- a/xserver/hw/dmx/glxProxy/glxcmds.c +++ b/xserver/hw/dmx/glxProxy/glxcmds.c @@ -195,7 +195,7 @@ CreateContext(__GLXclientState * cl, shareglxc = NULL; } else { - dixLookupResourceByType((pointer *) &shareglxc, shareList, + dixLookupResourceByType((void **) &shareglxc, shareList, __glXContextRes, NullClient, DixUnknownAccess); if (!shareglxc) { client->errorValue = shareList; @@ -425,7 +425,7 @@ CreateContext(__GLXclientState * cl, /* ** Register this context as a resource. */ - if (!AddResource(gcId, __glXContextRes, (pointer) glxc)) { + if (!AddResource(gcId, __glXContextRes, (void *) glxc)) { free(glxc->real_ids); free(glxc->real_vids); free(glxc); @@ -511,14 +511,14 @@ __glXBindSwapBarrierSGIX(__GLXclientState * cl, GLbyte * pc) rc = dixLookupDrawable(&pDraw, req->drawable, client, 0, DixGetAttrAccess); if (rc != Success) { - dixLookupResourceByType((pointer *) &pGlxPixmap, req->drawable, + dixLookupResourceByType((void **) &pGlxPixmap, req->drawable, __glXPixmapRes, NullClient, DixUnknownAccess); if (pGlxPixmap) pDraw = pGlxPixmap->pDraw; } if (!pDraw && __GLX_IS_VERSION_SUPPORTED(1, 3)) { - dixLookupResourceByType((pointer *) &pGlxWindow, req->drawable, + dixLookupResourceByType((void **) &pGlxWindow, req->drawable, __glXWindowRes, NullClient, DixUnknownAccess); if (pGlxWindow) pDraw = pGlxWindow->pDraw; @@ -544,14 +544,14 @@ __glXJoinSwapGroupSGIX(__GLXclientState * cl, GLbyte * pc) rc = dixLookupDrawable(&pDraw, req->drawable, client, 0, DixManageAccess); if (rc != Success) { - dixLookupResourceByType((pointer *) &pGlxPixmap, req->drawable, + dixLookupResourceByType((void **) &pGlxPixmap, req->drawable, __glXPixmapRes, NullClient, DixUnknownAccess); if (pGlxPixmap) pDraw = pGlxPixmap->pDraw; } if (!pDraw && __GLX_IS_VERSION_SUPPORTED(1, 3)) { - dixLookupResourceByType((pointer *) &pGlxWindow, req->drawable, + dixLookupResourceByType((void **) &pGlxWindow, req->drawable, __glXWindowRes, NullClient, DixUnknownAccess); if (pGlxWindow) pDraw = pGlxWindow->pDraw; @@ -566,7 +566,7 @@ __glXJoinSwapGroupSGIX(__GLXclientState * cl, GLbyte * pc) rc = dixLookupDrawable(&pMember, req->member, client, 0, DixGetAttrAccess); if (rc != Success) { - dixLookupResourceByType((pointer *) &pGlxPixmap, req->member, + dixLookupResourceByType((void **) &pGlxPixmap, req->member, __glXPixmapRes, NullClient, DixUnknownAccess); if (pGlxPixmap) @@ -574,7 +574,7 @@ __glXJoinSwapGroupSGIX(__GLXclientState * cl, GLbyte * pc) } if (!pMember && __GLX_IS_VERSION_SUPPORTED(1, 3)) { - dixLookupResourceByType((pointer *) &pGlxWindow, req->member, + dixLookupResourceByType((void **) &pGlxWindow, req->member, __glXWindowRes, NullClient, DixUnknownAccess); if (pGlxWindow) @@ -605,7 +605,7 @@ __glXDestroyContext(__GLXclientState * cl, GLbyte * pc) int to_screen = 0; int s; - dixLookupResourceByType((pointer *) &glxc, gcId, __glXContextRes, + dixLookupResourceByType((void **) &glxc, gcId, __glXContextRes, NullClient, DixUnknownAccess); if (glxc) { /* @@ -880,7 +880,7 @@ MakeCurrent(__GLXclientState * cl, ** Lookup new context. It must not be current for someone else. */ if (contextId != None) { - dixLookupResourceByType((pointer *) &glxc, contextId, __glXContextRes, + dixLookupResourceByType((void **) &glxc, contextId, __glXContextRes, NullClient, DixUnknownAccess); if (!glxc) { client->errorValue = contextId; @@ -935,7 +935,7 @@ MakeCurrent(__GLXclientState * cl, } if (!pDraw) { - dixLookupResourceByType((pointer *) &pGlxPixmap, drawId, + dixLookupResourceByType((void **) &pGlxPixmap, drawId, __glXPixmapRes, NullClient, DixUnknownAccess); if (pGlxPixmap) { @@ -960,7 +960,7 @@ MakeCurrent(__GLXclientState * cl, } if (!pDraw && __GLX_IS_VERSION_SUPPORTED(1, 3)) { - dixLookupResourceByType((pointer *) &pGlxWindow, drawId, + dixLookupResourceByType((void **) &pGlxWindow, drawId, __glXWindowRes, NullClient, DixUnknownAccess); if (pGlxWindow) { @@ -983,7 +983,7 @@ MakeCurrent(__GLXclientState * cl, } if (!pDraw && __GLX_IS_VERSION_SUPPORTED(1, 3)) { - dixLookupResourceByType((pointer *) &pGlxPbuffer, drawId, + dixLookupResourceByType((void **) &pGlxPbuffer, drawId, __glXPbufferRes, NullClient, DixUnknownAccess); if (pGlxPbuffer) { @@ -1050,7 +1050,7 @@ MakeCurrent(__GLXclientState * cl, } if (!pReadDraw) { - dixLookupResourceByType((pointer *) &pReadGlxPixmap, readId, + dixLookupResourceByType((void **) &pReadGlxPixmap, readId, __glXPixmapRes, NullClient, DixUnknownAccess); if (pReadGlxPixmap) { @@ -1072,7 +1072,7 @@ MakeCurrent(__GLXclientState * cl, } if (!pReadDraw && __GLX_IS_VERSION_SUPPORTED(1, 3)) { - dixLookupResourceByType((pointer *) &pGlxReadWindow, readId, + dixLookupResourceByType((void **) &pGlxReadWindow, readId, __glXWindowRes, NullClient, DixUnknownAccess); if (pGlxReadWindow) { @@ -1094,7 +1094,7 @@ MakeCurrent(__GLXclientState * cl, } if (!pReadDraw && __GLX_IS_VERSION_SUPPORTED(1, 3)) { - dixLookupResourceByType((pointer *) &pGlxReadPbuffer, readId, + dixLookupResourceByType((void **) &pGlxReadPbuffer, readId, __glXPbufferRes, NullClient, DixUnknownAccess); if (pGlxReadPbuffer) { @@ -1236,14 +1236,14 @@ MakeCurrent(__GLXclientState * cl, to_screen = screenInfo.numScreens - 1; if (pDraw && new_reply.writeType != GLX_PBUFFER_TYPE) { - dixLookupResourceByClass((pointer *) &pXinDraw, + dixLookupResourceByClass((void **) &pXinDraw, pDraw->id, XRC_DRAWABLE, client, DixReadAccess); } if (pReadDraw && pReadDraw != pDraw && new_reply.readType != GLX_PBUFFER_TYPE) { - dixLookupResourceByClass((pointer *) &pXinReadDraw, + dixLookupResourceByClass((void **) &pXinReadDraw, pReadDraw->id, XRC_DRAWABLE, client, DixReadAccess); } @@ -1460,7 +1460,7 @@ __glXIsDirect(__GLXclientState * cl, GLbyte * pc) /* ** Find the GL context. */ - dixLookupResourceByType((pointer *) &glxc, req->context, __glXContextRes, + dixLookupResourceByType((void **) &glxc, req->context, __glXContextRes, NullClient, DixUnknownAccess); if (!glxc) { client->errorValue = req->context; @@ -1619,13 +1619,13 @@ __glXCopyContext(__GLXclientState * cl, GLbyte * pc) /* ** Check that each context exists. */ - dixLookupResourceByType((pointer *) &src, source, __glXContextRes, + dixLookupResourceByType((void **) &src, source, __glXContextRes, NullClient, DixUnknownAccess); if (!src) { client->errorValue = source; return __glXBadContext; } - dixLookupResourceByType((pointer *) &dst, dest, __glXContextRes, + dixLookupResourceByType((void **) &dst, dest, __glXContextRes, NullClient, DixUnknownAccess); if (!dst) { client->errorValue = dest; @@ -1925,7 +1925,7 @@ CreateGLXPixmap(__GLXclientState * cl, from_screen = 0; to_screen = screenInfo.numScreens - 1; - dixLookupResourceByClass((pointer *) &pXinDraw, + dixLookupResourceByClass((void **) &pXinDraw, pDraw->id, XRC_DRAWABLE, client, DixReadAccess); } @@ -2009,6 +2009,7 @@ CreateGLXPixmap(__GLXclientState * cl, } else { client->errorValue = (visual ? visual : fbconfigId); + free(pGlxPixmap->be_xids); free(pGlxPixmap); return BadValue; } @@ -2017,6 +2018,7 @@ CreateGLXPixmap(__GLXclientState * cl, } if (!(AddResource(glxpixmapId, __glXPixmapRes, pGlxPixmap))) { + free(pGlxPixmap->be_xids); free(pGlxPixmap); return BadAlloc; } @@ -2055,7 +2057,7 @@ __glXDestroyGLXPixmap(__GLXclientState * cl, GLbyte * pc) /* ** Check if it's a valid GLX pixmap. */ - dixLookupResourceByType((pointer *) &pGlxPixmap, glxpixmap, + dixLookupResourceByType((void **) &pGlxPixmap, glxpixmap, __glXPixmapRes, NullClient, DixUnknownAccess); if (!pGlxPixmap) { client->errorValue = glxpixmap; @@ -2141,7 +2143,7 @@ __glXDoSwapBuffers(__GLXclientState * cl, XID drawId, GLXContextTag tag) } if (!pDraw) { - dixLookupResourceByType((pointer *) &pGlxPixmap, drawId, + dixLookupResourceByType((void **) &pGlxPixmap, drawId, __glXPixmapRes, NullClient, DixUnknownAccess); if (pGlxPixmap) { /* @@ -2153,7 +2155,7 @@ __glXDoSwapBuffers(__GLXclientState * cl, XID drawId, GLXContextTag tag) } if (!pDraw && __GLX_IS_VERSION_SUPPORTED(1, 3)) { - dixLookupResourceByType((pointer *) &pGlxWindow, drawId, + dixLookupResourceByType((void **) &pGlxWindow, drawId, __glXWindowRes, NullClient, DixUnknownAccess); if (pGlxWindow) { /* @@ -2183,7 +2185,7 @@ __glXDoSwapBuffers(__GLXclientState * cl, XID drawId, GLXContextTag tag) if (!noPanoramiXExtension) { from_screen = 0; to_screen = screenInfo.numScreens - 1; - dixLookupResourceByClass((pointer *) &pXinDraw, + dixLookupResourceByClass((void **) &pXinDraw, pDraw->id, XRC_DRAWABLE, client, DixReadAccess); } @@ -2291,7 +2293,7 @@ __glXSwapBuffers(__GLXclientState * cl, GLbyte * pc) } if (!pDraw) { - dixLookupResourceByType((pointer *) &pGlxPixmap, drawId, + dixLookupResourceByType((void **) &pGlxPixmap, drawId, __glXPixmapRes, NullClient, DixUnknownAccess); if (pGlxPixmap) { /* @@ -2302,7 +2304,7 @@ __glXSwapBuffers(__GLXclientState * cl, GLbyte * pc) } if (!pDraw && __GLX_IS_VERSION_SUPPORTED(1, 3)) { - dixLookupResourceByType((pointer *) &pGlxWindow, drawId, + dixLookupResourceByType((void **) &pGlxWindow, drawId, __glXWindowRes, NullClient, DixUnknownAccess); if (pGlxWindow) { /* @@ -2817,12 +2819,12 @@ __glXUseXFont(__GLXclientState * cl, GLbyte * pc) ** Font can actually be either the ID of a font or the ID of a GC ** containing a font. */ - dixLookupResourceByType((pointer *) &pFont, req->font, RT_FONT, + dixLookupResourceByType((void **) &pFont, req->font, RT_FONT, NullClient, DixUnknownAccess); if (!pFont) { GC *pGC; - dixLookupResourceByType((pointer *) &pGC, req->font, + dixLookupResourceByType((void **) &pGC, req->font, RT_GC, NullClient, DixUnknownAccess); if (!pGC) { client->errorValue = req->font; @@ -3082,7 +3084,7 @@ __glXCreateWindow(__GLXclientState * cl, GLbyte * pc) VisualPtr pVisual; VisualID visId; int i, rc; - pointer val; + void *val; /* ** Check if windowId is valid @@ -3184,7 +3186,7 @@ __glXDestroyWindow(__GLXclientState * cl, GLbyte * pc) ClientPtr client = cl->client; xGLXDestroyWindowReq *req = (xGLXDestroyWindowReq *) pc; XID glxwindow = req->glxwindow; - pointer val; + void *val; /* ** Check if it's a valid GLX window. @@ -3216,7 +3218,7 @@ __glXQueryContext(__GLXclientState * cl, GLbyte * pc) int nReplyBytes; req = (xGLXQueryContextReq *) pc; - dixLookupResourceByType((pointer *) &ctx, req->context, __glXContextRes, + dixLookupResourceByType((void **) &ctx, req->context, __glXContextRes, NullClient, DixUnknownAccess); if (!ctx) { client->errorValue = req->context; @@ -3266,7 +3268,7 @@ __glXQueryContextInfoEXT(__GLXclientState * cl, GLbyte * pc) int nReplyBytes; req = (xGLXQueryContextInfoEXTReq *) pc; - dixLookupResourceByType((pointer *) &ctx, + dixLookupResourceByType((void **) &ctx, req->context, __glXContextRes, client, DixReadAccess); @@ -3439,7 +3441,7 @@ __glXDestroyPbuffer(__GLXclientState * cl, GLbyte * pc) /* ** Check if it's a valid Pbuffer */ - dixLookupResourceByType((pointer *) &pGlxPbuffer, pbuffer, + dixLookupResourceByType((void **) &pGlxPbuffer, pbuffer, __glXPbufferRes, NullClient, DixUnknownAccess); if (!pGlxPbuffer) { client->errorValue = pbuffer; @@ -3514,7 +3516,7 @@ __glXGetDrawableAttributes(__GLXclientState * cl, GLbyte * pc) if (!pDraw) { __GLXpixmap *pGlxPixmap; - dixLookupResourceByType((pointer *) &pGlxPixmap, + dixLookupResourceByType((void **) &pGlxPixmap, drawId, __glXPixmapRes, NullClient, DixUnknownAccess); if (pGlxPixmap) { @@ -3527,7 +3529,7 @@ __glXGetDrawableAttributes(__GLXclientState * cl, GLbyte * pc) if (!pDraw) { __glXWindow *pGlxWindow; - dixLookupResourceByType((pointer *) &pGlxWindow, + dixLookupResourceByType((void **) &pGlxWindow, drawId, __glXWindowRes, NullClient, DixUnknownAccess); if (pGlxWindow) { @@ -3540,7 +3542,7 @@ __glXGetDrawableAttributes(__GLXclientState * cl, GLbyte * pc) if (!pDraw) { __glXPbuffer *pGlxPbuffer; - dixLookupResourceByType((pointer *) &pGlxPbuffer, + dixLookupResourceByType((void **) &pGlxPbuffer, drawId, __glXPbufferRes, NullClient, DixUnknownAccess); if (pGlxPbuffer) { @@ -3567,7 +3569,7 @@ __glXGetDrawableAttributes(__GLXclientState * cl, GLbyte * pc) #ifdef PANORAMIX if (!noPanoramiXExtension) { - if (Success != dixLookupResourceByClass((pointer *) &pXinDraw, + if (Success != dixLookupResourceByClass((void **) &pXinDraw, pDraw->id, XRC_DRAWABLE, client, DixReadAccess)) { client->errorValue = drawId; @@ -3676,7 +3678,7 @@ __glXChangeDrawableAttributes(__GLXclientState * cl, GLbyte * pc) if (!pDraw) { __GLXpixmap *pGlxPixmap; - dixLookupResourceByType((pointer *) &pGlxPixmap, + dixLookupResourceByType((void **) &pGlxPixmap, drawId, __glXPixmapRes, NullClient, DixUnknownAccess); if (pGlxPixmap) { @@ -3689,7 +3691,7 @@ __glXChangeDrawableAttributes(__GLXclientState * cl, GLbyte * pc) if (!pDraw) { __glXWindow *pGlxWindow; - dixLookupResourceByType((pointer *) &pGlxWindow, + dixLookupResourceByType((void **) &pGlxWindow, drawId, __glXWindowRes, NullClient, DixUnknownAccess); if (pGlxWindow) { @@ -3702,7 +3704,7 @@ __glXChangeDrawableAttributes(__GLXclientState * cl, GLbyte * pc) if (!pDraw) { __glXPbuffer *pGlxPbuffer; - dixLookupResourceByType((pointer *) &pGlxPbuffer, + dixLookupResourceByType((void **) &pGlxPbuffer, drawId, __glXPbufferRes, NullClient, DixUnknownAccess); if (pGlxPbuffer) { @@ -3731,7 +3733,7 @@ __glXChangeDrawableAttributes(__GLXclientState * cl, GLbyte * pc) if (!noPanoramiXExtension) { PanoramiXRes *pXinDraw; - if (Success != dixLookupResourceByClass((pointer *) &pXinDraw, + if (Success != dixLookupResourceByClass((void **) &pXinDraw, pDraw->id, XRC_DRAWABLE, client, DixReadAccess)) { client->errorValue = drawId; diff --git a/xserver/hw/dmx/glxProxy/glxext.c b/xserver/hw/dmx/glxProxy/glxext.c index b46970864..3c5a14bc7 100644 --- a/xserver/hw/dmx/glxProxy/glxext.c +++ b/xserver/hw/dmx/glxProxy/glxext.c @@ -182,7 +182,7 @@ __glXFreeGLXWindow(__glXWindow * pGlxWindow) WindowPtr pWindow = (WindowPtr) pGlxWindow->pDraw; WindowPtr ret; - dixLookupResourceByType((pointer) &ret, + dixLookupResourceByType((void *) &ret, pWindow->drawable.id, RT_WINDOW, NullClient, DixUnknownAccess); if (ret == pWindow) { @@ -414,7 +414,7 @@ __glXDispatch(ClientPtr client) */ XID xid = FakeClientID(client->index); - if (!AddResource(xid, __glXClientRes, (pointer) (long) client->index)) { + if (!AddResource(xid, __glXClientRes, (void *) (long) client->index)) { return BadAlloc; } ResetClientState(client->index); @@ -468,7 +468,7 @@ __glXSwapDispatch(ClientPtr client) */ XID xid = FakeClientID(client->index); - if (!AddResource(xid, __glXClientRes, (pointer) (long) client->index)) { + if (!AddResource(xid, __glXClientRes, (void *) (long) client->index)) { return BadAlloc; } ResetClientState(client->index); diff --git a/xserver/hw/dmx/glxProxy/glxswap.c b/xserver/hw/dmx/glxProxy/glxswap.c index 87a748621..5f565010d 100644 --- a/xserver/hw/dmx/glxProxy/glxswap.c +++ b/xserver/hw/dmx/glxProxy/glxswap.c @@ -110,7 +110,7 @@ SwapGroupIsReadyToSwap(SwapGroupPtr pSwap) } static Bool -SGSwapCleanup(ClientPtr client, pointer closure) +SGSwapCleanup(ClientPtr client, void *closure) { /* SwapGroupPtr pSwap = (SwapGroupPtr)closure; */ @@ -154,7 +154,7 @@ SGSwapBuffers(__GLXclientState * cl, XID drawId, GLXContextTag tag, else { /* The swap group/barrier is not yet ready to swap, so put * client to sleep until the rest are ready to swap */ - ClientSleep(cl->client, SGSwapCleanup, (pointer) pWin); + ClientSleep(cl->client, SGSwapCleanup, (void *) pWin); pCur->sleeping = TRUE; } diff --git a/xserver/hw/dmx/input/Makefile.in b/xserver/hw/dmx/input/Makefile.in index 9b27d4682..a0b08fbfd 100644 --- a/xserver/hw/dmx/input/Makefile.in +++ b/xserver/hw/dmx/input/Makefile.in @@ -188,6 +188,8 @@ 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@ @@ -232,6 +234,10 @@ 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@ @@ -334,7 +340,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -343,6 +352,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -409,6 +419,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/dmx/input/dmxbackend.c b/xserver/hw/dmx/input/dmxbackend.c index 807e02328..56abe8013 100644 --- a/xserver/hw/dmx/input/dmxbackend.c +++ b/xserver/hw/dmx/input/dmxbackend.c @@ -101,7 +101,7 @@ typedef struct _myPrivate { #endif /** Create and return a private data structure. */ -pointer +void * dmxBackendCreatePrivate(DeviceIntPtr pDevice) { GETDMXLOCALFROMPDEVICE; @@ -115,7 +115,7 @@ dmxBackendCreatePrivate(DeviceIntPtr pDevice) * verify that the structure was actually created by * #dmxBackendCreatePrivate. */ void -dmxBackendDestroyPrivate(pointer private) +dmxBackendDestroyPrivate(void *private) { free(private); } @@ -262,7 +262,7 @@ dmxBackendOffscreen(int screen, int x, int y) /** This routine is called from #dmxCoreMotion for each motion * event. \a x and \a y are global coordinants. */ void -dmxBackendUpdatePosition(pointer private, int x, int y) +dmxBackendUpdatePosition(void *private, int x, int y) { GETPRIVFROMPRIVATE; int screen = miPointerGetScreen(inputInfo.pointer)->myNum; @@ -500,7 +500,7 @@ dmxBackendCollectEvents(DevicePtr pDev, * event processing actually takes place here, but this is a convenient * place to update the pointer. */ void -dmxBackendProcessInput(pointer private) +dmxBackendProcessInput(void *private) { GETPRIVFROMPRIVATE; @@ -650,7 +650,7 @@ dmxBackendKbdGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info) /** Process #DMXFunctionType functions. The only function handled here * is to acknowledge a pending server shutdown. */ int -dmxBackendFunctions(pointer private, DMXFunctionType function) +dmxBackendFunctions(void *private, DMXFunctionType function) { switch (function) { case DMX_FUNCTION_TERMINATE: diff --git a/xserver/hw/dmx/input/dmxbackend.h b/xserver/hw/dmx/input/dmxbackend.h index 6a49a56d6..a60857369 100644 --- a/xserver/hw/dmx/input/dmxbackend.h +++ b/xserver/hw/dmx/input/dmxbackend.h @@ -38,8 +38,8 @@ #ifndef _DMXBACKEND_H_ #define _DMXBACKEND_H_ -extern pointer dmxBackendCreatePrivate(DeviceIntPtr pDevice); -extern void dmxBackendDestroyPrivate(pointer private); +extern void *dmxBackendCreatePrivate(DeviceIntPtr pDevice); +extern void dmxBackendDestroyPrivate(void *private); extern void dmxBackendInit(DevicePtr pDev); extern void dmxBackendLateReInit(DevicePtr pDev); extern void dmxBackendMouGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info); @@ -49,8 +49,8 @@ extern void dmxBackendCollectEvents(DevicePtr pDev, dmxEnqueueProcPtr enqueue, dmxCheckSpecialProcPtr checkspecial, DMXBlockType block); -extern void dmxBackendProcessInput(pointer private); -extern int dmxBackendFunctions(pointer private, DMXFunctionType function); -extern void dmxBackendUpdatePosition(pointer private, int x, int y); +extern void dmxBackendProcessInput(void *private); +extern int dmxBackendFunctions(void *private, DMXFunctionType function); +extern void dmxBackendUpdatePosition(void *private, int x, int y); #endif diff --git a/xserver/hw/dmx/input/dmxcommon.c b/xserver/hw/dmx/input/dmxcommon.c index db558b55f..90154ef3e 100644 --- a/xserver/hw/dmx/input/dmxcommon.c +++ b/xserver/hw/dmx/input/dmxcommon.c @@ -339,7 +339,7 @@ dmxCommonOthOn(DevicePtr pDev) if (!(priv->xi = XOpenDevice(priv->display, dmxLocal->deviceId))) { dmxLog(dmxWarning, "Cannot open %s device (id=%d) on %s\n", dmxLocal->deviceName ? dmxLocal->deviceName : "(unknown)", - dmxLocal->deviceId, dmxInput->name); + (int) dmxLocal->deviceId, dmxInput->name); return -1; } ADD(DeviceKeyPress); @@ -558,7 +558,7 @@ dmxFindPointerScreen(int x, int y) * (e.g., when a keyboard and mouse form a pair that should share the * same private area). If the requested private area cannot be located, * then NULL is returned. */ -pointer +void * dmxCommonCopyPrivate(DeviceIntPtr pDevice) { GETDMXLOCALFROMPDEVICE; @@ -583,7 +583,7 @@ dmxCommonCopyPrivate(DeviceIntPtr pDevice) * server startup and server shutdown). */ void -dmxCommonSaveState(pointer private) +dmxCommonSaveState(void *private) { GETPRIVFROMPRIVATE; XKeyboardState ks; @@ -641,7 +641,7 @@ dmxCommonSaveState(pointer private) /** This routine restores all the information saved by #dmxCommonSaveState. */ void -dmxCommonRestoreState(pointer private) +dmxCommonRestoreState(void *private) { GETPRIVFROMPRIVATE; int retcode = -1; diff --git a/xserver/hw/dmx/input/dmxcommon.h b/xserver/hw/dmx/input/dmxcommon.h index d4f8d3c89..ed04287a5 100644 --- a/xserver/hw/dmx/input/dmxcommon.h +++ b/xserver/hw/dmx/input/dmxcommon.h @@ -118,7 +118,7 @@ extern void dmxCommonOthOff(DevicePtr pDev); extern void dmxCommonOthGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info); /* helper functions */ -extern pointer dmxCommonCopyPrivate(DeviceIntPtr pDevice); -extern void dmxCommonSaveState(pointer private); -extern void dmxCommonRestoreState(pointer private); +extern void *dmxCommonCopyPrivate(DeviceIntPtr pDevice); +extern void dmxCommonSaveState(void *private); +extern void dmxCommonRestoreState(void *private); #endif diff --git a/xserver/hw/dmx/input/dmxconsole.c b/xserver/hw/dmx/input/dmxconsole.c index 600a70553..f33a0ebd3 100644 --- a/xserver/hw/dmx/input/dmxconsole.c +++ b/xserver/hw/dmx/input/dmxconsole.c @@ -141,7 +141,7 @@ unscaley(myPrivate * priv, int y) } /** Create the private area for \a pDevice. */ -pointer +void * dmxConsoleCreatePrivate(DeviceIntPtr pDevice) { GETDMXLOCALFROMPDEVICE; @@ -153,7 +153,7 @@ dmxConsoleCreatePrivate(DeviceIntPtr pDevice) /** If \a private is non-NULL, free its associated memory. */ void -dmxConsoleDestroyPrivate(pointer private) +dmxConsoleDestroyPrivate(void *private) { free(private); } @@ -193,7 +193,7 @@ dmxConsoleDrawFineCursor(myPrivate * priv, XRectangle * rect) } static void -dmxConsoleDrawWindows(pointer private) +dmxConsoleDrawWindows(void *private) { GETONLYPRIVFROMPRIVATE; Display *dpy = priv->display; @@ -391,7 +391,7 @@ dmxConsoleUpdateFineCursor(myPrivate * priv) * fashion: the actual layout of the windows of the screen might not * have had any human-visible changes. */ void -dmxConsoleUpdateInfo(pointer private, DMXUpdateType type, WindowPtr pWindow) +dmxConsoleUpdateInfo(void *private, DMXUpdateType type, WindowPtr pWindow) { GETONLYPRIVFROMPRIVATE; dmxConsoleDraw(priv, 1, 1); @@ -436,7 +436,7 @@ dmxConsoleMoveRelative(myPrivate * priv, int x, int y, * allows the console's notion of the cursor postion to change when * another input device actually caused the change. */ void -dmxConsoleUpdatePosition(pointer private, int x, int y) +dmxConsoleUpdatePosition(void *private, int x, int y) { GETONLYPRIVFROMPRIVATE; int tmpX, tmpY; @@ -825,8 +825,8 @@ dmxConsoleInit(DevicePtr pDev) /* Set up properties */ XStoreName(dpy, win, DMX_CONSOLE_NAME); - class_hints.res_name = DMX_RES_NAME; - class_hints.res_class = DMX_RES_CLASS; + class_hints.res_name = (char *) DMX_RES_NAME; + class_hints.res_class = (char *) DMX_RES_CLASS; XSetClassHint(dpy, win, &class_hints); /* Map the window */ @@ -941,7 +941,7 @@ dmxConsoleKbdGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info) /** Handle special console-only keys. */ int -dmxConsoleFunctions(pointer private, DMXFunctionType function) +dmxConsoleFunctions(void *private, DMXFunctionType function) { GETONLYPRIVFROMPRIVATE; XRectangle rect; diff --git a/xserver/hw/dmx/input/dmxconsole.h b/xserver/hw/dmx/input/dmxconsole.h index 1c5261101..ea6033c3a 100644 --- a/xserver/hw/dmx/input/dmxconsole.h +++ b/xserver/hw/dmx/input/dmxconsole.h @@ -37,8 +37,8 @@ #ifndef _DMXCONSOLE_H_ #define _DMXCONSOLE_H_ -extern pointer dmxConsoleCreatePrivate(DeviceIntPtr pDevice); -extern void dmxConsoleDestroyPrivate(pointer private); +extern void *dmxConsoleCreatePrivate(DeviceIntPtr pDevice); +extern void dmxConsoleDestroyPrivate(void *private); extern void dmxConsoleInit(DevicePtr pDev); extern void dmxConsoleReInit(DevicePtr pDev); extern void dmxConsoleMouGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info); @@ -48,12 +48,12 @@ extern void dmxConsoleCollectEvents(DevicePtr pDev, dmxEnqueueProcPtr enqueue, dmxCheckSpecialProcPtr checkspecial, DMXBlockType block); -extern int dmxConsoleFunctions(pointer private, DMXFunctionType function); -extern void dmxConsoleUpdatePosition(pointer private, int x, int y); -extern void dmxConsoleKbdSetCtrl(pointer private, KeybdCtrl * ctrl); +extern int dmxConsoleFunctions(void *private, DMXFunctionType function); +extern void dmxConsoleUpdatePosition(void *private, int x, int y); +extern void dmxConsoleKbdSetCtrl(void *private, KeybdCtrl * ctrl); extern void dmxConsoleCapture(DMXInputInfo * dmxInput); extern void dmxConsoleUncapture(DMXInputInfo * dmxInput); -extern void dmxConsoleUpdateInfo(pointer private, +extern void dmxConsoleUpdateInfo(void *private, DMXUpdateType, WindowPtr pWindow); #endif diff --git a/xserver/hw/dmx/input/dmxevents.c b/xserver/hw/dmx/input/dmxevents.c index bcb5c2ed8..14ac05f5c 100644 --- a/xserver/hw/dmx/input/dmxevents.c +++ b/xserver/hw/dmx/input/dmxevents.c @@ -701,7 +701,6 @@ dmxEnqueue(DevicePtr pDev, int type, int detail, KeySym keySym, XEvent * e, DMXBlockType block) { GETDMXINPUTFROMPDEV; - xEvent xE; DeviceIntPtr p = dmxLocal->pDevice; int valuators[3]; ValuatorMask mask; @@ -716,7 +715,7 @@ dmxEnqueue(DevicePtr pDev, int type, int detail, KeySym keySym, if (dmxCheckFunctionKeys(dmxLocal, type, keySym)) return; if (dmxLocal->sendsCore && dmxLocal != dmxLocalCoreKeyboard) - xE.u.u.detail = dmxFixup(pDev, detail, keySym); + detail = dmxFixup(pDev, detail, keySym); /*ErrorF("KEY %d sym %d\n", detail, (int) keySym); */ QueueKeyboardEvents(p, type, detail, NULL); diff --git a/xserver/hw/dmx/input/dmxinputinit.c b/xserver/hw/dmx/input/dmxinputinit.c index b22a41f56..abb6a8551 100644 --- a/xserver/hw/dmx/input/dmxinputinit.c +++ b/xserver/hw/dmx/input/dmxinputinit.c @@ -225,7 +225,7 @@ dmxKbdCtrl(DeviceIntPtr pDevice, KeybdCtrl * ctrl) /* taken from kdrive/src/kinput.c: */ static void -dmxBell(int volume, DeviceIntPtr pDev, pointer arg, int something) +dmxBell(int volume, DeviceIntPtr pDev, void *arg, int something) { #if 0 KeybdCtrl *ctrl = arg; @@ -336,7 +336,7 @@ _dmxKeyboardBellProc(DMXLocalInputInfoPtr dmxLocal, int percent) * sound the bell on all of the devices that send core events. */ void dmxKeyboardBellProc(int percent, DeviceIntPtr pDevice, - pointer ctrl, int unknown) + void *ctrl, int unknown) { GETDMXLOCALFROMPDEVICE; int i, j; @@ -633,7 +633,7 @@ dmxCollectAll(DMXInputInfo * dmxInput) } static void -dmxBlockHandler(pointer blockData, OSTimePtr pTimeout, pointer pReadMask) +dmxBlockHandler(void *blockData, OSTimePtr pTimeout, void *pReadMask) { DMXInputInfo *dmxInput = &dmxInputs[(uintptr_t) blockData]; static unsigned long generation = 0; @@ -645,7 +645,7 @@ dmxBlockHandler(pointer blockData, OSTimePtr pTimeout, pointer pReadMask) } static void -dmxSwitchReturn(pointer p) +dmxSwitchReturn(void *p) { DMXInputInfo *dmxInput = p; int i; @@ -662,7 +662,7 @@ dmxSwitchReturn(pointer p) } static void -dmxWakeupHandler(pointer blockData, int result, pointer pReadMask) +dmxWakeupHandler(void *blockData, int result, void *pReadMask) { DMXInputInfo *dmxInput = &dmxInputs[(uintptr_t) blockData]; int i; @@ -921,7 +921,7 @@ dmxInputScanForExtensions(DMXInputInfo * dmxInput, int doXI) break; } dmxLogInput(dmxInput, " %2d %-10.10s %-16.16s\n", - devices[i].id, + (int) devices[i].id, devices[i].name ? devices[i].name : "", use); } @@ -993,7 +993,6 @@ dmxInputLateReInit(DMXInputInfo * dmxInput) void dmxInputInit(DMXInputInfo * dmxInput) { - DeviceIntPtr pPointer = NULL, pKeyboard = NULL; dmxArg a; const char *name; int i; @@ -1108,12 +1107,6 @@ dmxInputInit(DMXInputInfo * dmxInput) DMXLocalInputInfoPtr dmxLocal = dmxInput->devs[i]; dmxLocal->pDevice = dmxAddDevice(dmxLocal); - if (dmxLocal->isCore) { - if (dmxLocal->type == DMX_LOCAL_MOUSE) - pPointer = dmxLocal->pDevice; - if (dmxLocal->type == DMX_LOCAL_KEYBOARD) - pKeyboard = dmxLocal->pDevice; - } } dmxInput->processInputEvents = dmxProcessInputEvents; @@ -1136,7 +1129,7 @@ dmxInputFreeLocal(DMXLocalInputInfoRec * local) local->destroy_private(local->private); free(local->history); free(local->valuators); - free(local->deviceName); + free((void *) local->deviceName); local->private = NULL; local->history = NULL; local->deviceName = NULL; @@ -1164,7 +1157,7 @@ dmxInputFree(DMXInputInfo * dmxInput) dmxInput->devs = NULL; dmxInput->numDevs = 0; if (dmxInput->freename) - free(dmxInput->name); + free((void *) dmxInput->name); dmxInput->name = NULL; } @@ -1218,7 +1211,7 @@ dmxInputLogDevices(void) dmxLogCont(dmxInfo, "\t[i%d/%*.*s", dmxInput->inputIdx, len, len, dmxInput->name); if (dmxInput->devs[i]->deviceId >= 0) - dmxLogCont(dmxInfo, "/id%d", dmxInput->devs[i]->deviceId); + dmxLogCont(dmxInfo, "/id%d", (int) dmxInput->devs[i]->deviceId); if (dmxInput->devs[i]->deviceName) dmxLogCont(dmxInfo, "=%s", dmxInput->devs[i]->deviceName); dmxLogCont(dmxInfo, "] %s\n", diff --git a/xserver/hw/dmx/input/dmxinputinit.h b/xserver/hw/dmx/input/dmxinputinit.h index 94ec1019b..11af2ca82 100644 --- a/xserver/hw/dmx/input/dmxinputinit.h +++ b/xserver/hw/dmx/input/dmxinputinit.h @@ -127,8 +127,8 @@ typedef struct _DMXLocalInitInfo { KeySym *symbols; /**< Key symbols */ } DMXLocalInitInfo, *DMXLocalInitInfoPtr; -typedef pointer (*dmxCreatePrivateProcPtr) (DeviceIntPtr); -typedef void (*dmxDestroyPrivateProcPtr) (pointer); +typedef void *(*dmxCreatePrivateProcPtr) (DeviceIntPtr); +typedef void (*dmxDestroyPrivateProcPtr) (void *); typedef void (*dmxInitProcPtr) (DevicePtr); typedef void (*dmxReInitProcPtr) (DevicePtr); @@ -136,13 +136,13 @@ typedef void (*dmxLateReInitProcPtr) (DevicePtr); typedef void (*dmxGetInfoProcPtr) (DevicePtr, DMXLocalInitInfoPtr); typedef int (*dmxOnProcPtr) (DevicePtr); typedef void (*dmxOffProcPtr) (DevicePtr); -typedef void (*dmxUpdatePositionProcPtr) (pointer, int x, int y); +typedef void (*dmxUpdatePositionProcPtr) (void *, int x, int y); -typedef void (*dmxVTPreSwitchProcPtr) (pointer); /* Turn I/O Off */ -typedef void (*dmxVTPostSwitchProcPtr) (pointer); /* Turn I/O On */ -typedef void (*dmxVTSwitchReturnProcPtr) (pointer); -typedef int (*dmxVTSwitchProcPtr) (pointer, int vt, - dmxVTSwitchReturnProcPtr, pointer); +typedef void (*dmxVTPreSwitchProcPtr) (void *); /* Turn I/O Off */ +typedef void (*dmxVTPostSwitchProcPtr) (void *); /* Turn I/O On */ +typedef void (*dmxVTSwitchReturnProcPtr) (void *); +typedef int (*dmxVTSwitchProcPtr) (void *, int vt, + dmxVTSwitchReturnProcPtr, void *); typedef void (*dmxMotionProcPtr) (DevicePtr, int *valuators, @@ -157,9 +157,9 @@ typedef void (*dmxCollectEventsProcPtr) (DevicePtr, dmxMotionProcPtr, dmxEnqueueProcPtr, dmxCheckSpecialProcPtr, DMXBlockType); -typedef void (*dmxProcessInputProcPtr) (pointer); -typedef void (*dmxUpdateInfoProcPtr) (pointer, DMXUpdateType, WindowPtr); -typedef int (*dmxFunctionsProcPtr) (pointer, DMXFunctionType); +typedef void (*dmxProcessInputProcPtr) (void *); +typedef void (*dmxUpdateInfoProcPtr) (void *, DMXUpdateType, WindowPtr); +typedef int (*dmxFunctionsProcPtr) (void *, DMXFunctionType); typedef void (*dmxKBCtrlProcPtr) (DevicePtr, KeybdCtrl * ctrl); typedef void (*dmxMCtrlProcPtr) (DevicePtr, PtrCtrl * ctrl); @@ -223,7 +223,7 @@ typedef struct _DMXLocalInputInfo { dmxKBCtrlProcPtr kCtrl; /**< Keyboard control */ dmxKBBellProcPtr kBell; /**< Bell control */ - pointer private; /**< Device-dependent private */ + void *private; /**< Device-dependent private */ int isCore; /**< Is a DMX core device */ int sendsCore; /**< Sends DMX core events */ KeybdCtrl kctrl; /**< Keyboard control */ @@ -269,7 +269,7 @@ extern DMXLocalInputInfoPtr dmxInputCopyLocal(DMXInputInfo * dmxInput, extern void dmxChangePointerControl(DeviceIntPtr pDevice, PtrCtrl * ctrl); extern void dmxKeyboardKbdCtrlProc(DeviceIntPtr pDevice, KeybdCtrl * ctrl); extern void dmxKeyboardBellProc(int percent, DeviceIntPtr pDevice, - pointer ctrl, int unknown); + void *ctrl, int unknown); extern int dmxInputExtensionErrorHandler(Display * dsp, _Xconst char *name, _Xconst char *reason); diff --git a/xserver/hw/dmx/input/lnx-keyboard.c b/xserver/hw/dmx/input/lnx-keyboard.c index ecf4f591c..1a4d01f36 100644 --- a/xserver/hw/dmx/input/lnx-keyboard.c +++ b/xserver/hw/dmx/input/lnx-keyboard.c @@ -361,7 +361,7 @@ static unsigned char at2lnx[NUM_KEYCODES] = { }; /** Create a private structure for use within this file. */ -pointer +void * kbdLinuxCreatePrivate(DeviceIntPtr pKeyboard) { myPrivate *priv = calloc(1, sizeof(*priv)); @@ -373,7 +373,7 @@ kbdLinuxCreatePrivate(DeviceIntPtr pKeyboard) /** Destroy a private structure. */ void -kbdLinuxDestroyPrivate(pointer priv) +kbdLinuxDestroyPrivate(void *priv) { free(priv); } @@ -466,13 +466,13 @@ static int kbdLinuxActivate(int fd, int vtno, int setSig); /** Currently unused hook called prior to an VT switch. */ void -kbdLinuxVTPreSwitch(pointer p) +kbdLinuxVTPreSwitch(void *p) { } /** Currently unused hook called after returning from a VT switch. */ void -kbdLinuxVTPostSwitch(pointer p) +kbdLinuxVTPostSwitch(void *p) { } @@ -481,8 +481,8 @@ kbdLinuxVTPostSwitch(pointer p) * switched back to the pre-switch VT (i.e., the user returns to the DMX * session). */ int -kbdLinuxVTSwitch(pointer p, int vt, - void (*switch_return) (pointer), pointer switch_return_data) +kbdLinuxVTSwitch(void *p, int vt, + void (*switch_return) (void *), void *switch_return_data) { myPrivate *priv = p; diff --git a/xserver/hw/dmx/input/lnx-keyboard.h b/xserver/hw/dmx/input/lnx-keyboard.h index 891c6a9a4..857ea11b1 100644 --- a/xserver/hw/dmx/input/lnx-keyboard.h +++ b/xserver/hw/dmx/input/lnx-keyboard.h @@ -37,19 +37,19 @@ #ifndef _LNX_KEYBOARD_H_ #define _LNX_KEYBOARD_H_ -extern pointer kbdLinuxCreatePrivate(DeviceIntPtr pKeyboard); -extern void kbdLinuxDestroyPrivate(pointer private); +extern void *kbdLinuxCreatePrivate(DeviceIntPtr pKeyboard); +extern void kbdLinuxDestroyPrivate(void *private); extern void kbdLinuxInit(DevicePtr pDev); extern void kbdLinuxGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info); extern int kbdLinuxOn(DevicePtr pDev); extern void kbdLinuxOff(DevicePtr pDev); -extern void kbdLinuxVTPreSwitch(pointer p); -extern void kbdLinuxVTPostSwitch(pointer p); -extern int kbdLinuxVTSwitch(pointer p, int vt, +extern void kbdLinuxVTPreSwitch(void *p); +extern void kbdLinuxVTPostSwitch(void *p); +extern int kbdLinuxVTSwitch(void *p, int vt, dmxVTSwitchReturnProcPtr switch_return, - pointer switch_return_data); + void *switch_return_data); extern void kbdLinuxRead(DevicePtr pDev, dmxMotionProcPtr motion, diff --git a/xserver/hw/dmx/input/lnx-ms.c b/xserver/hw/dmx/input/lnx-ms.c index 7e1acf450..210f6de22 100644 --- a/xserver/hw/dmx/input/lnx-ms.c +++ b/xserver/hw/dmx/input/lnx-ms.c @@ -302,18 +302,18 @@ msLinuxGetMap(DevicePtr pDev, unsigned char *map, int *nButtons) /** Currently unused hook called prior to an VT switch. */ void -msLinuxVTPreSwitch(pointer p) +msLinuxVTPreSwitch(void *p) { } /** Currently unused hook called after returning from a VT switch. */ void -msLinuxVTPostSwitch(pointer p) +msLinuxVTPostSwitch(void *p) { } /** Create a private structure for use within this file. */ -pointer +void * msLinuxCreatePrivate(DeviceIntPtr pMouse) { myPrivate *priv = calloc(1, sizeof(*priv)); @@ -325,7 +325,7 @@ msLinuxCreatePrivate(DeviceIntPtr pMouse) /** Destroy a private structure. */ void -msLinuxDestroyPrivate(pointer priv) +msLinuxDestroyPrivate(void *priv) { free(priv); } diff --git a/xserver/hw/dmx/input/lnx-ms.h b/xserver/hw/dmx/input/lnx-ms.h index 28ed09557..7f3ba4ead 100644 --- a/xserver/hw/dmx/input/lnx-ms.h +++ b/xserver/hw/dmx/input/lnx-ms.h @@ -37,8 +37,8 @@ #ifndef _LNX_MS_H_ #define _LNX_MS_H_ -extern pointer msLinuxCreatePrivate(DeviceIntPtr pMouse); -extern void msLinuxDestroyPrivate(pointer priv); +extern void *msLinuxCreatePrivate(DeviceIntPtr pMouse); +extern void msLinuxDestroyPrivate(void *priv); extern void msLinuxRead(DevicePtr pDev, dmxMotionProcPtr motion, dmxEnqueueProcPtr enqueue, @@ -49,7 +49,7 @@ extern void msLinuxGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info); extern int msLinuxOn(DevicePtr pDev); extern void msLinuxOff(DevicePtr pDev); extern void msLinuxCtrl(DevicePtr pDev, PtrCtrl * ctrl); -extern void msLinuxVTPreSwitch(pointer p); -extern void msLinuxVTPostSwitch(pointer p); +extern void msLinuxVTPreSwitch(void *p); +extern void msLinuxVTPostSwitch(void *p); #endif diff --git a/xserver/hw/dmx/input/lnx-ps2.c b/xserver/hw/dmx/input/lnx-ps2.c index 67c73a0c5..dd70cb8ea 100644 --- a/xserver/hw/dmx/input/lnx-ps2.c +++ b/xserver/hw/dmx/input/lnx-ps2.c @@ -272,18 +272,18 @@ ps2LinuxGetMap(DevicePtr pDev, unsigned char *map, int *nButtons) /** Currently unused hook called prior to an VT switch. */ void -ps2LinuxVTPreSwitch(pointer p) +ps2LinuxVTPreSwitch(void *p) { } /** Currently unused hook called after returning from a VT switch. */ void -ps2LinuxVTPostSwitch(pointer p) +ps2LinuxVTPostSwitch(void *p) { } /** Create a private structure for use within this file. */ -pointer +void * ps2LinuxCreatePrivate(DeviceIntPtr pMouse) { myPrivate *priv = calloc(1, sizeof(*priv)); @@ -295,7 +295,7 @@ ps2LinuxCreatePrivate(DeviceIntPtr pMouse) /** Destroy a private structure. */ void -ps2LinuxDestroyPrivate(pointer priv) +ps2LinuxDestroyPrivate(void *priv) { free(priv); } diff --git a/xserver/hw/dmx/input/lnx-ps2.h b/xserver/hw/dmx/input/lnx-ps2.h index 93f0f0219..339f3538c 100644 --- a/xserver/hw/dmx/input/lnx-ps2.h +++ b/xserver/hw/dmx/input/lnx-ps2.h @@ -37,8 +37,8 @@ #ifndef _LNX_PS2_H_ #define _LNX_PS2_H_ -extern pointer ps2LinuxCreatePrivate(DeviceIntPtr pMouse); -extern void ps2LinuxDestroyPrivate(pointer priv); +extern void *ps2LinuxCreatePrivate(DeviceIntPtr pMouse); +extern void ps2LinuxDestroyPrivate(void *priv); extern void ps2LinuxRead(DevicePtr pDev, dmxMotionProcPtr motion, dmxEnqueueProcPtr enqueue, @@ -49,7 +49,7 @@ extern void ps2LinuxGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info); extern int ps2LinuxOn(DevicePtr pDev); extern void ps2LinuxOff(DevicePtr pDev); extern void ps2LinuxCtrl(DevicePtr pDev, PtrCtrl * ctrl); -extern void ps2LinuxVTPreSwitch(pointer p); -extern void ps2LinuxVTPostSwitch(pointer p); +extern void ps2LinuxVTPreSwitch(void *p); +extern void ps2LinuxVTPostSwitch(void *p); #endif diff --git a/xserver/hw/dmx/input/usb-common.c b/xserver/hw/dmx/input/usb-common.c index c7c166cce..67aa07e0a 100644 --- a/xserver/hw/dmx/input/usb-common.c +++ b/xserver/hw/dmx/input/usb-common.c @@ -474,7 +474,7 @@ usbOff(DevicePtr pDev) } /** Create a private structure for use within this file. */ -pointer +void * usbCreatePrivate(DeviceIntPtr pDevice) { myPrivate *priv = calloc(1, sizeof(*priv)); @@ -486,7 +486,7 @@ usbCreatePrivate(DeviceIntPtr pDevice) /** Destroy a private structure. */ void -usbDestroyPrivate(pointer priv) +usbDestroyPrivate(void *priv) { free(priv); } diff --git a/xserver/hw/dmx/input/usb-common.h b/xserver/hw/dmx/input/usb-common.h index eea98afbe..71593765f 100644 --- a/xserver/hw/dmx/input/usb-common.h +++ b/xserver/hw/dmx/input/usb-common.h @@ -43,8 +43,8 @@ typedef enum { usbOther } usbType; -extern pointer usbCreatePrivate(DeviceIntPtr pDevice); -extern void usbDestroyPrivate(pointer priv); +extern void *usbCreatePrivate(DeviceIntPtr pDevice); +extern void usbDestroyPrivate(void *priv); extern void usbRead(DevicePtr pDev, dmxMotionProcPtr motion, dmxEnqueueProcPtr enqueue, diff --git a/xserver/hw/dmx/man/Makefile.in b/xserver/hw/dmx/man/Makefile.in index 79e558847..680f8f42a 100644 --- a/xserver/hw/dmx/man/Makefile.in +++ b/xserver/hw/dmx/man/Makefile.in @@ -160,6 +160,8 @@ 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@ @@ -204,6 +206,10 @@ 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@ @@ -268,6 +274,7 @@ MAN_SUBSTS = @MAN_SUBSTS@ -e 's|__logdir__|$(logdir)|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@ @@ -322,7 +329,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -331,6 +341,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -397,6 +408,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/kdrive/Makefile.in b/xserver/hw/kdrive/Makefile.in index 4b8960244..6f181074a 100644 --- a/xserver/hw/kdrive/Makefile.in +++ b/xserver/hw/kdrive/Makefile.in @@ -167,6 +167,8 @@ 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@ @@ -211,6 +213,10 @@ 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@ @@ -313,7 +319,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -322,6 +331,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -388,6 +398,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/kdrive/ephyr/Makefile.am b/xserver/hw/kdrive/ephyr/Makefile.am index 6b790fddd..00a53d0df 100644 --- a/xserver/hw/kdrive/ephyr/Makefile.am +++ b/xserver/hw/kdrive/ephyr/Makefile.am @@ -27,12 +27,20 @@ AM_CPPFLAGS = \ @XEPHYR_INCS@ \ @XEPHYR_CFLAGS@ \ -I$(top_srcdir) \ + -I$(top_srcdir)/glamor \ -I$(top_srcdir)/exa if XV XV_SRCS = ephyrvideo.c endif +if GLAMOR +GLAMOR_SRCS = \ + ephyr_glamor_glx.c \ + ephyr_glamor_glx.h \ + $() +endif + if DRI DRI_SRCS = \ ephyrdriext.c \ @@ -59,14 +67,24 @@ Xephyr_SOURCES = \ hostx.h \ $(XV_SRCS) \ $(DRI_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_DEPENDENCIES = @KDRIVE_LOCAL_LIBS@ $(XEPHYR_GLAMOR_LIB) Xephyr_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) diff --git a/xserver/hw/kdrive/ephyr/Makefile.in b/xserver/hw/kdrive/ephyr/Makefile.in index d5e461d58..1cf0570e5 100644 --- a/xserver/hw/kdrive/ephyr/Makefile.in +++ b/xserver/hw/kdrive/ephyr/Makefile.in @@ -72,6 +72,7 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = Xephyr$(EXEEXT) +@GLAMOR_TRUE@am__append_1 = $(XLIB_CFLAGS) subdir = hw/kdrive/ephyr DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/depcomp @@ -99,14 +100,18 @@ PROGRAMS = $(bin_PROGRAMS) am__Xephyr_SOURCES_DIST = ephyr.c ephyr.h ephyrlog.h ephyr_draw.c os.c \ ephyrinit.c hostx.c hostx.h ephyrvideo.c ephyrdriext.c \ ephyrdriext.h ephyrdri.c ephyrdri.h ephyrglxext.c \ - ephyrglxext.h ephyrhostglx.c ephyrhostglx.h + ephyrglxext.h ephyrhostglx.c ephyrhostglx.h ephyr_glamor_glx.c \ + ephyr_glamor_glx.h @XV_TRUE@am__objects_1 = ephyrvideo.$(OBJEXT) @DRI_TRUE@am__objects_2 = ephyrdriext.$(OBJEXT) ephyrdri.$(OBJEXT) \ @DRI_TRUE@ ephyrglxext.$(OBJEXT) ephyrhostglx.$(OBJEXT) +@GLAMOR_TRUE@am__objects_3 = ephyr_glamor_glx.$(OBJEXT) am_Xephyr_OBJECTS = ephyr.$(OBJEXT) ephyr_draw.$(OBJEXT) os.$(OBJEXT) \ ephyrinit.$(OBJEXT) hostx.$(OBJEXT) $(am__objects_1) \ - $(am__objects_2) + $(am__objects_2) $(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 @@ -234,6 +239,8 @@ 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@ @@ -278,6 +285,10 @@ 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@ @@ -380,7 +391,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -389,6 +403,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -455,6 +470,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ @@ -528,15 +547,15 @@ 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@ \ - -I$(top_srcdir) \ - -I$(top_srcdir)/exa - +AM_CPPFLAGS = @KDRIVE_INCS@ @KDRIVE_CFLAGS@ @XEPHYR_INCS@ \ + @XEPHYR_CFLAGS@ -I$(top_srcdir) -I$(top_srcdir)/glamor \ + -I$(top_srcdir)/exa $(am__append_1) @XV_TRUE@XV_SRCS = ephyrvideo.c +@GLAMOR_TRUE@GLAMOR_SRCS = \ +@GLAMOR_TRUE@ ephyr_glamor_glx.c \ +@GLAMOR_TRUE@ ephyr_glamor_glx.h \ +@GLAMOR_TRUE@ $() + @DRI_TRUE@DRI_SRCS = \ @DRI_TRUE@ ephyrdriext.c \ @DRI_TRUE@ ephyrdriext.h \ @@ -559,14 +578,21 @@ Xephyr_SOURCES = \ hostx.h \ $(XV_SRCS) \ $(DRI_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_DEPENDENCIES = @KDRIVE_LOCAL_LIBS@ $(XEPHYR_GLAMOR_LIB) Xephyr_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) all: all-recursive @@ -660,6 +686,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ephyr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ephyr_draw.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ephyr_glamor_glx.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ephyrdri.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ephyrdriext.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ephyrglxext.Po@am__quote@ diff --git a/xserver/hw/kdrive/ephyr/ephyr.c b/xserver/hw/kdrive/ephyr/ephyr.c index b2a79855c..def50d8d8 100644 --- a/xserver/hw/kdrive/ephyr/ephyr.c +++ b/xserver/hw/kdrive/ephyr/ephyr.c @@ -43,9 +43,15 @@ #include "ephyrglxext.h" #endif /* XF86DRI */ +#ifdef GLAMOR +#include "glamor.h" +#endif +#include "ephyr_glamor_glx.h" + #include "xkbsrv.h" extern int KdTsPhyScreen; +extern Bool ephyr_glamor; KdKeyboardInfo *ephyrKbd; KdPointerInfo *ephyrMouse; @@ -326,22 +332,26 @@ ephyrInternalDamageRedisplay(ScreenPtr pScreen) int nbox; BoxPtr pbox; - 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++; + 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 -ephyrInternalDamageBlockHandler(pointer data, OSTimePtr pTimeout, pointer pRead) +ephyrInternalDamageBlockHandler(void *data, OSTimePtr pTimeout, void *pRead) { ScreenPtr pScreen = (ScreenPtr) data; @@ -349,7 +359,7 @@ ephyrInternalDamageBlockHandler(pointer data, OSTimePtr pTimeout, pointer pRead) } static void -ephyrInternalDamageWakeupHandler(pointer data, int i, pointer LastSelectMask) +ephyrInternalDamageWakeupHandler(void *data, int i, void *LastSelectMask) { /* FIXME: Not needed ? */ } @@ -368,7 +378,7 @@ ephyrSetInternalDamage(ScreenPtr pScreen) if (!RegisterBlockAndWakeupHandlers(ephyrInternalDamageBlockHandler, ephyrInternalDamageWakeupHandler, - (pointer) pScreen)) + (void *) pScreen)) return FALSE; pPixmap = (*pScreen->GetScreenPixmap) (pScreen); @@ -389,7 +399,7 @@ ephyrUnsetInternalDamage(ScreenPtr pScreen) RemoveBlockAndWakeupHandlers(ephyrInternalDamageBlockHandler, ephyrInternalDamageWakeupHandler, - (pointer) pScreen); + (void *) pScreen); } #ifdef RANDR @@ -662,6 +672,7 @@ ephyrInitScreen(ScreenPtr pScreen) return TRUE; } + Bool ephyrFinishInitScreen(ScreenPtr pScreen) { @@ -679,6 +690,12 @@ ephyrFinishInitScreen(ScreenPtr pScreen) 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) { @@ -693,8 +710,13 @@ ephyrCreateResources(ScreenPtr pScreen) return KdShadowSet(pScreen, scrpriv->randr, ephyrShadowUpdate, ephyrWindowLinear); - else + else { +#ifdef GLAMOR + if (ephyr_glamor) + ephyr_glamor_create_screen_resources(pScreen); +#endif return ephyrSetInternalDamage(pScreen); + } } void @@ -1008,6 +1030,29 @@ ephyrProcessButtonRelease(xcb_generic_event_t *xev) 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) { @@ -1018,6 +1063,7 @@ ephyrProcessKeyPress(xcb_generic_event_t *xev) return; } + ephyrUpdateGrabModifierState(key->state); ephyrUpdateModifierState(key->state); KdEnqueueKeyboardEvent(ephyrKbd, key->detail, FALSE); } @@ -1029,6 +1075,7 @@ ephyrProcessKeyRelease(xcb_generic_event_t *xev) 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); @@ -1049,7 +1096,7 @@ ephyrProcessKeyRelease(xcb_generic_event_t *xev) hostx_set_win_title(screen, "(ctrl+shift grabs mouse and keyboard)"); } - else { + else if (!mod1_down) { /* Attempt grab */ xcb_grab_keyboard_cookie_t kbgrabc = xcb_grab_keyboard(conn, @@ -1176,6 +1223,9 @@ ephyrPoll(void) break; } + if (ephyr_glamor) + ephyr_glamor_process_event(xev); + free(xev); } } @@ -1207,6 +1257,9 @@ ephyrGetColors(ScreenPtr pScreen, int n, xColorItem * 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 */ @@ -1226,6 +1279,18 @@ ephyrPutColors(ScreenPtr pScreen, int n, xColorItem * pdefs) 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 */ diff --git a/xserver/hw/kdrive/ephyr/ephyr.h b/xserver/hw/kdrive/ephyr/ephyr.h index 73fdb59e6..34ce4601b 100644 --- a/xserver/hw/kdrive/ephyr/ephyr.h +++ b/xserver/hw/kdrive/ephyr/ephyr.h @@ -80,6 +80,12 @@ typedef struct _ephyrScrPriv { KdScreenInfo *screen; int mynum; /* Screen number */ + + /** + * Per-screen Xlib-using state for glamor (private to + * ephyr_glamor_glx.c) + */ + struct ephyr_glamor *glamor; } EphyrScrPriv; extern KdCardFuncs ephyrFuncs; @@ -203,6 +209,14 @@ void 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); diff --git a/xserver/hw/kdrive/ephyr/ephyr_glamor_glx.c b/xserver/hw/kdrive/ephyr/ephyr_glamor_glx.c new file mode 100644 index 000000000..eaf565496 --- /dev/null +++ b/xserver/hw/kdrive/ephyr/ephyr_glamor_glx.c @@ -0,0 +1,346 @@ +/* + * 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 <stdlib.h> +#include <X11/Xlib.h> +#include <X11/Xlibint.h> +#undef Xcalloc +#undef Xrealloc +#undef Xfree +#include <X11/Xlib-xcb.h> +#include <xcb/xcb_aux.h> +#include <pixman.h> +#include <epoxy/glx.h> +#include "ephyr_glamor_glx.h" +#include "os.h" +#include <X11/Xproto.h> + +/** @{ + * + * 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; +/** @} */ + +/** + * 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; +}; + +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 = + "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; +} + +void +ephyr_glamor_damage_redisplay(struct ephyr_glamor *glamor, + struct pixman_region16 *damage) +{ + /* Redraw the whole screen, since glXSwapBuffers leaves the back + * buffer undefined. + */ + static const float position[] = { + -1, -1, + 1, -1, + 1, 1, + -1, 1, + }; + static const float texcoords[] = { + 0, 1, + 1, 1, + 1, 0, + 0, 0, + }; + + glXMakeCurrent(dpy, glamor->glx_win, glamor->ctx); + + glBindFramebuffer(GL_FRAMEBUFFER, 0); + glUseProgram(glamor->texture_shader); + glViewport(0, 0, glamor->width, glamor->height); + + glVertexAttribPointer(glamor->texture_shader_position_loc, + 2, GL_FLOAT, FALSE, 0, position); + glVertexAttribPointer(glamor->texture_shader_texcoord_loc, + 2, GL_FLOAT, FALSE, 0, texcoords); + glEnableVertexAttribArray(glamor->texture_shader_position_loc); + glEnableVertexAttribArray(glamor->texture_shader_texcoord_loc); + + glActiveTexture(GL_TEXTURE0); + glBindTexture(GL_TEXTURE_2D, glamor->tex); + glDrawArrays(GL_TRIANGLE_FAN, 0, 4); + + glDisableVertexAttribArray(glamor->texture_shader_position_loc); + glDisableVertexAttribArray(glamor->texture_shader_texcoord_loc); + + 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); +} + +struct ephyr_glamor * +ephyr_glamor_glx_screen_init(xcb_window_t win) +{ + 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); + + 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); + + 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; +} diff --git a/xserver/hw/kdrive/ephyr/ephyr_glamor_glx.h b/xserver/hw/kdrive/ephyr/ephyr_glamor_glx.h new file mode 100644 index 000000000..0c238cf5b --- /dev/null +++ b/xserver/hw/kdrive/ephyr/ephyr_glamor_glx.h @@ -0,0 +1,83 @@ +/* + * 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 <xcb/xcb.h> +#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 */ diff --git a/xserver/hw/kdrive/ephyr/ephyrdriext.c b/xserver/hw/kdrive/ephyr/ephyrdriext.c index e2b33db03..8368d1233 100644 --- a/xserver/hw/kdrive/ephyr/ephyrdriext.c +++ b/xserver/hw/kdrive/ephyr/ephyrdriext.c @@ -1098,7 +1098,6 @@ ProcXF86DRIGetDrawableInfo(register ClientPtr client) if (rep.numClipRects) { if (clipRects) { ScreenPtr pScreen = screenInfo.screens[stuff->screen]; - int i = 0; EPHYR_LOG("clip list of host gl drawable:\n"); for (i = 0; i < rep.numClipRects; i++) { diff --git a/xserver/hw/kdrive/ephyr/ephyrinit.c b/xserver/hw/kdrive/ephyr/ephyrinit.c index cf8bc9073..fac84cd13 100644 --- a/xserver/hw/kdrive/ephyr/ephyrinit.c +++ b/xserver/hw/kdrive/ephyr/ephyrinit.c @@ -35,6 +35,7 @@ extern Bool EphyrWantGrayScale; extern Bool EphyrWantResize; extern Bool kdHasPointer; extern Bool kdHasKbd; +extern Bool ephyr_glamor; #ifdef GLXEXT extern Bool ephyrNoDRI; @@ -64,10 +65,7 @@ static const ExtensionModule ephyrExtensions[] = { static void ephyrExtensionInit(void) { - int i; - - for (i = 0; i < ARRAY_SIZE(ephyrExtensions); i++) - LoadExtension(&ephyrExtensions[i], TRUE); + LoadExtensionList(ephyrExtensions, ARRAY_SIZE(ephyrExtensions), TRUE); } @@ -138,6 +136,9 @@ ddxUseMsg(void) ErrorF("-fullscreen Attempt to run Xephyr fullscreen\n"); ErrorF("-grayscale Simulate 8bit grayscale\n"); ErrorF("-resizeable Make Xephyr windows resizeable\n"); +#ifdef GLAMOR + ErrorF("-glamor Enable 2D acceleration using glamor\n"); +#endif ErrorF ("-fakexa Simulate acceleration using software rendering\n"); ErrorF("-verbosity <level> Set log verbosity level\n"); @@ -149,8 +150,6 @@ ddxUseMsg(void) ErrorF ("-title [title] set the window title in the WM_NAME property\n"); ErrorF("\n"); - - exit(1); } void @@ -243,6 +242,16 @@ ddxProcessArgument(int argc, char **argv, int i) 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; + } +#endif else if (!strcmp(argv[i], "-fakexa")) { ephyrFuncs.initAccel = ephyrDrawInit; ephyrFuncs.enableAccel = ephyrDrawEnable; diff --git a/xserver/hw/kdrive/ephyr/ephyrvideo.c b/xserver/hw/kdrive/ephyr/ephyrvideo.c index 4a05721af..c6728351f 100644 --- a/xserver/hw/kdrive/ephyr/ephyrvideo.c +++ b/xserver/hw/kdrive/ephyr/ephyrvideo.c @@ -84,15 +84,15 @@ static Bool ephyrXVPrivSaveImageToPortPriv(EphyrPortPriv * a_port_priv, int a_image_len); static void ephyrStopVideo(KdScreenInfo * a_info, - pointer a_xv_priv, Bool a_exit); + void *a_xv_priv, Bool a_exit); static int ephyrSetPortAttribute(KdScreenInfo * a_info, Atom a_attr_name, - int a_attr_value, pointer a_port_priv); + int a_attr_value, void *a_port_priv); static int ephyrGetPortAttribute(KdScreenInfo * a_screen_info, Atom a_attr_name, - int *a_attr_value, pointer a_port_priv); + int *a_attr_value, void *a_port_priv); static void ephyrQueryBestSize(KdScreenInfo * a_info, Bool a_motion, @@ -101,7 +101,7 @@ static void ephyrQueryBestSize(KdScreenInfo * a_info, short a_drw_w, short a_drw_h, unsigned int *a_prefered_w, - unsigned int *a_prefered_h, pointer a_port_priv); + unsigned int *a_prefered_h, void *a_port_priv); static int ephyrPutImage(KdScreenInfo * a_info, DrawablePtr a_drawable, @@ -118,13 +118,13 @@ static int ephyrPutImage(KdScreenInfo * a_info, short a_width, short a_height, Bool a_sync, - RegionPtr a_clipping_region, pointer a_port_priv); + 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, pointer a_port_priv); + RegionPtr a_clipping_region, void *a_port_priv); static int ephyrPutVideo(KdScreenInfo * a_info, DrawablePtr a_drawable, @@ -132,7 +132,7 @@ static int ephyrPutVideo(KdScreenInfo * a_info, 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, pointer a_port_priv); + RegionPtr a_clip_region, void *a_port_priv); static int ephyrGetVideo(KdScreenInfo * a_info, DrawablePtr a_drawable, @@ -140,7 +140,7 @@ static int ephyrGetVideo(KdScreenInfo * a_info, 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, pointer a_port_priv); + RegionPtr a_clip_region, void *a_port_priv); static int ephyrPutStill(KdScreenInfo * a_info, DrawablePtr a_drawable, @@ -148,7 +148,7 @@ static int ephyrPutStill(KdScreenInfo * a_info, 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, pointer a_port_priv); + RegionPtr a_clip_region, void *a_port_priv); static int ephyrGetStill(KdScreenInfo * a_info, DrawablePtr a_drawable, @@ -156,7 +156,7 @@ static int ephyrGetStill(KdScreenInfo * a_info, 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, pointer a_port_priv); + RegionPtr a_clip_region, void *a_port_priv); static int ephyrQueryImageAttributes(KdScreenInfo * a_info, int a_id, @@ -744,7 +744,7 @@ ephyrXVPrivSaveImageToPortPriv(EphyrPortPriv * a_port_priv, } static void -ephyrStopVideo(KdScreenInfo * a_info, pointer a_port_priv, Bool a_exit) +ephyrStopVideo(KdScreenInfo * a_info, void *a_port_priv, Bool a_exit) { xcb_connection_t *conn = hostx_get_xcbconn(); EphyrPortPriv *port_priv = a_port_priv; @@ -759,7 +759,7 @@ ephyrStopVideo(KdScreenInfo * a_info, pointer a_port_priv, Bool a_exit) static int ephyrSetPortAttribute(KdScreenInfo * a_info, - Atom a_attr_name, int a_attr_value, pointer a_port_priv) + 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; @@ -814,7 +814,7 @@ ephyrSetPortAttribute(KdScreenInfo * a_info, static int ephyrGetPortAttribute(KdScreenInfo * a_screen_info, - Atom a_attr_name, int *a_attr_value, pointer a_port_priv) + 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; @@ -862,7 +862,7 @@ ephyrQueryBestSize(KdScreenInfo * a_info, short a_drw_w, short a_drw_h, unsigned int *a_prefered_w, - unsigned int *a_prefered_h, pointer a_port_priv) + unsigned int *a_prefered_h, void *a_port_priv) { xcb_connection_t *conn = hostx_get_xcbconn(); EphyrPortPriv *port_priv = a_port_priv; @@ -992,7 +992,7 @@ ephyrPutImage(KdScreenInfo * a_info, unsigned char *a_buf, short a_width, short a_height, - Bool a_sync, RegionPtr a_clipping_region, pointer a_port_priv) + Bool a_sync, RegionPtr a_clipping_region, void *a_port_priv) { EphyrPortPriv *port_priv = a_port_priv; Bool is_ok = FALSE; @@ -1064,7 +1064,7 @@ static int ephyrReputImage(KdScreenInfo * a_info, DrawablePtr a_drawable, short a_drw_x, - short a_drw_y, RegionPtr a_clipping_region, pointer a_port_priv) + short a_drw_y, RegionPtr a_clipping_region, void *a_port_priv) { EphyrPortPriv *port_priv = a_port_priv; int result = BadImplementation; @@ -1107,7 +1107,7 @@ ephyrPutVideo(KdScreenInfo * a_info, 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, pointer a_port_priv) + RegionPtr a_clipping_region, void *a_port_priv) { EphyrScrPriv *scrpriv = a_info->driver; xcb_connection_t *conn = hostx_get_xcbconn(); @@ -1138,7 +1138,7 @@ ephyrGetVideo(KdScreenInfo * a_info, 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, pointer a_port_priv) + RegionPtr a_clipping_region, void *a_port_priv) { EphyrScrPriv *scrpriv = a_info->driver; xcb_connection_t *conn = hostx_get_xcbconn(); @@ -1170,7 +1170,7 @@ ephyrPutStill(KdScreenInfo * a_info, 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, pointer a_port_priv) + RegionPtr a_clipping_region, void *a_port_priv) { EphyrScrPriv *scrpriv = a_info->driver; xcb_connection_t *conn = hostx_get_xcbconn(); @@ -1201,7 +1201,7 @@ ephyrGetStill(KdScreenInfo * a_info, 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, pointer a_port_priv) + RegionPtr a_clipping_region, void *a_port_priv) { EphyrScrPriv *scrpriv = a_info->driver; xcb_connection_t *conn = hostx_get_xcbconn(); diff --git a/xserver/hw/kdrive/ephyr/hostx.c b/xserver/hw/kdrive/ephyr/hostx.c index 57e7dc292..435919e0a 100644 --- a/xserver/hw/kdrive/ephyr/hostx.c +++ b/xserver/hw/kdrive/ephyr/hostx.c @@ -36,6 +36,7 @@ #include <string.h> /* for memset */ #include <errno.h> #include <time.h> +#include <err.h> #include <sys/ipc.h> #include <sys/shm.h> @@ -54,6 +55,11 @@ #include <xcb/xf86dri.h> #include <xcb/glx.h> #endif /* XF86DRI */ +#ifdef GLAMOR +#include <epoxy/gl.h> +#include "glamor.h" +#include "ephyr_glamor_glx.h" +#endif #include "ephyrlog.h" #include "ephyr.h" @@ -85,13 +91,12 @@ static int HostXWantDamageDebug = 0; extern EphyrKeySyms ephyrKeySyms; -extern int monitorResolution; - extern Bool EphyrWantResize; char *ephyrResName = NULL; int ephyrResNameFromCmd = 0; char *ephyrTitle = NULL; +Bool ephyr_glamor = FALSE; static void hostx_set_fullscreen_hint(void); @@ -304,7 +309,12 @@ hostx_init(void) | XCB_EVENT_MASK_STRUCTURE_NOTIFY; EPHYR_DBG("mark"); - HostX.conn = xcb_connect(NULL, &HostX.screen); +#ifdef GLAMOR + if (ephyr_glamor) + HostX.conn = ephyr_glamor_connect(); + else +#endif + HostX.conn = xcb_connect(NULL, &HostX.screen); if (xcb_connection_has_error(HostX.conn)) { fprintf(stderr, "\nXephyr cannot open host display. Is DISPLAY set?\n"); exit(1); @@ -314,7 +324,12 @@ hostx_init(void) HostX.winroot = xscreen->root; HostX.gc = xcb_generate_id(HostX.conn); HostX.depth = xscreen->root_depth; - HostX.visual = xcb_aux_find_visual_by_id(xscreen, xscreen->root_visual); +#ifdef GLAMOR + if (ephyr_glamor) + HostX.visual = ephyr_glamor_get_visual(); + 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, @@ -644,7 +659,7 @@ hostx_screen_init(KdScreenInfo *screen, } } - if (HostX.have_shm) { + if (!ephyr_glamor && HostX.have_shm) { scrpriv->ximg = xcb_image_create_native(HostX.conn, width, buffer_height, @@ -679,7 +694,7 @@ hostx_screen_init(KdScreenInfo *screen, } } - if (!shm_success) { + 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, @@ -719,6 +734,15 @@ hostx_screen_init(KdScreenInfo *screen, scrpriv->win_width = width; scrpriv->win_height = height; +#ifdef GLAMOR + if (ephyr_glamor) { + *bytes_per_line = 0; + *bits_per_pixel = 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; @@ -750,6 +774,23 @@ hostx_paint_rect(KdScreenInfo *screen, 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 @@ -1178,3 +1219,87 @@ hostx_get_resource_id_peer(int a_local_resource_id, int *a_remote_resource_id) } #endif /* XF86DRI */ + +#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); + + glamor_init(screen, + GLAMOR_USE_SCREEN | + GLAMOR_USE_PICTURE_SCREEN | + GLAMOR_INVERTED_Y_AXIS); + + return TRUE; +} + +Bool +ephyr_glamor_create_screen_resources(ScreenPtr pScreen) +{ + KdScreenPriv(pScreen); + KdScreenInfo *kd_screen = pScreenPriv->screen; + EphyrScrPriv *scrpriv = kd_screen->driver; + PixmapPtr 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. + */ + screen_pixmap = pScreen->GetScreenPixmap(pScreen); + pScreen->DestroyPixmap(screen_pixmap); + + screen_pixmap = pScreen->CreatePixmap(pScreen, + pScreen->width, + pScreen->height, + pScreen->rootDepth, + GLAMOR_CREATE_NO_LARGE); + + pScreen->SetScreenPixmap(screen_pixmap); + + /* Tell the GLX code what to GL texture to read from. */ + tex = glamor_get_pixmap_texture(screen_pixmap); + 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 diff --git a/xserver/hw/kdrive/ephyr/man/Makefile.in b/xserver/hw/kdrive/ephyr/man/Makefile.in index 783623fda..52091f5b0 100644 --- a/xserver/hw/kdrive/ephyr/man/Makefile.in +++ b/xserver/hw/kdrive/ephyr/man/Makefile.in @@ -160,6 +160,8 @@ 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@ @@ -204,6 +206,10 @@ 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@ @@ -268,6 +274,7 @@ MAN_SUBSTS = @MAN_SUBSTS@ -e 's|__logdir__|$(logdir)|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@ @@ -322,7 +329,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -331,6 +341,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -397,6 +408,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/kdrive/fake/Makefile.in b/xserver/hw/kdrive/fake/Makefile.in index 7f99a338b..6648b29f7 100644 --- a/xserver/hw/kdrive/fake/Makefile.in +++ b/xserver/hw/kdrive/fake/Makefile.in @@ -171,6 +171,8 @@ 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@ @@ -215,6 +217,10 @@ 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@ @@ -317,7 +323,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -326,6 +335,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -392,6 +402,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/kdrive/fbdev/Makefile.in b/xserver/hw/kdrive/fbdev/Makefile.in index 27281014d..90a1cb212 100644 --- a/xserver/hw/kdrive/fbdev/Makefile.in +++ b/xserver/hw/kdrive/fbdev/Makefile.in @@ -172,6 +172,8 @@ 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@ @@ -216,6 +218,10 @@ 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@ @@ -318,7 +324,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -327,6 +336,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -393,6 +403,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/kdrive/linux/Makefile.in b/xserver/hw/kdrive/linux/Makefile.in index 8e122eba2..694ca34ea 100644 --- a/xserver/hw/kdrive/linux/Makefile.in +++ b/xserver/hw/kdrive/linux/Makefile.in @@ -173,6 +173,8 @@ 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@ @@ -217,6 +219,10 @@ 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@ @@ -319,7 +325,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -328,6 +337,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -394,6 +404,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/kdrive/linux/linux.c b/xserver/hw/kdrive/linux/linux.c index 00de2ae0e..73a8169bf 100644 --- a/xserver/hw/kdrive/linux/linux.c +++ b/xserver/hw/kdrive/linux/linux.c @@ -68,13 +68,16 @@ LinuxCheckChown(const char *file) struct stat st; __uid_t u; __gid_t g; + int r; if (stat(file, &st) < 0) return; u = getuid(); g = getgid(); - if (st.st_uid != u || st.st_gid != g) - chown(file, u, g); + if (st.st_uid != u || st.st_gid != g) { + r = chown(file, u, g); + (void) r; + } } static int @@ -167,14 +170,14 @@ LinuxSetSwitchMode(int mode) } static void -LinuxApmBlock(pointer blockData, OSTimePtr pTimeout, pointer pReadmask) +LinuxApmBlock(void *blockData, OSTimePtr pTimeout, void *pReadmask) { } static Bool LinuxApmRunning; static void -LinuxApmWakeup(pointer blockData, int result, pointer pReadmask) +LinuxApmWakeup(void *blockData, int result, void *pReadmask) { fd_set *readmask = (fd_set *) pReadmask; diff --git a/xserver/hw/kdrive/openbsd/Makefile.in b/xserver/hw/kdrive/openbsd/Makefile.in index 3df02dd46..62a1db968 100644 --- a/xserver/hw/kdrive/openbsd/Makefile.in +++ b/xserver/hw/kdrive/openbsd/Makefile.in @@ -164,6 +164,8 @@ 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@ @@ -208,6 +210,10 @@ 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@ @@ -310,7 +316,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -319,6 +328,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -385,6 +395,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/kdrive/src/Makefile.am b/xserver/hw/kdrive/src/Makefile.am index 5799ddbdb..d69f0dd99 100644 --- a/xserver/hw/kdrive/src/Makefile.am +++ b/xserver/hw/kdrive/src/Makefile.am @@ -4,7 +4,7 @@ AM_CPPFLAGS = \ AM_CFLAGS = -DHAVE_DIX_CONFIG_H -noinst_LTLIBRARIES = libkdrive.la libkdrivestubs.la +noinst_LTLIBRARIES = libkdrive.la if XV KDRIVE_XV_SOURCES = \ @@ -23,6 +23,3 @@ libkdrive_la_SOURCES = \ kshadow.c \ $(KDRIVE_XV_SOURCES) \ $(top_srcdir)/mi/miinitext.c - -libkdrivestubs_la_SOURCES = \ - $(top_srcdir)/fb/fbcmap_mi.c diff --git a/xserver/hw/kdrive/src/Makefile.in b/xserver/hw/kdrive/src/Makefile.in index c785be8db..37796b53c 100644 --- a/xserver/hw/kdrive/src/Makefile.in +++ b/xserver/hw/kdrive/src/Makefile.in @@ -85,9 +85,6 @@ 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 = -libkdrivestubs_la_LIBADD = -am_libkdrivestubs_la_OBJECTS = fbcmap_mi.lo -libkdrivestubs_la_OBJECTS = $(am_libkdrivestubs_la_OBJECTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false @@ -122,9 +119,8 @@ 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) $(libkdrivestubs_la_SOURCES) -DIST_SOURCES = $(am__libkdrive_la_SOURCES_DIST) \ - $(libkdrivestubs_la_SOURCES) +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;; \ @@ -171,6 +167,8 @@ 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@ @@ -215,6 +213,10 @@ 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@ @@ -317,7 +319,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -326,6 +331,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -392,6 +398,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ @@ -469,7 +479,7 @@ AM_CPPFLAGS = \ @KDRIVE_CFLAGS@ AM_CFLAGS = -DHAVE_DIX_CONFIG_H -noinst_LTLIBRARIES = libkdrive.la libkdrivestubs.la +noinst_LTLIBRARIES = libkdrive.la @XV_TRUE@KDRIVE_XV_SOURCES = \ @XV_TRUE@ kxv.c \ @XV_TRUE@ kxv.h @@ -486,9 +496,6 @@ libkdrive_la_SOURCES = \ $(KDRIVE_XV_SOURCES) \ $(top_srcdir)/mi/miinitext.c -libkdrivestubs_la_SOURCES = \ - $(top_srcdir)/fb/fbcmap_mi.c - all: all-am .SUFFIXES: @@ -536,8 +543,6 @@ clean-noinstLTLIBRARIES: } libkdrive.la: $(libkdrive_la_OBJECTS) $(libkdrive_la_DEPENDENCIES) $(EXTRA_libkdrive_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libkdrive_la_OBJECTS) $(libkdrive_la_LIBADD) $(LIBS) -libkdrivestubs.la: $(libkdrivestubs_la_OBJECTS) $(libkdrivestubs_la_DEPENDENCIES) $(EXTRA_libkdrivestubs_la_DEPENDENCIES) - $(AM_V_CCLD)$(LINK) $(libkdrivestubs_la_OBJECTS) $(libkdrivestubs_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -545,7 +550,6 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fbcmap_mi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kcmap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kdrive.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kinfo.Plo@am__quote@ @@ -583,13 +587,6 @@ miinitext.lo: $(top_srcdir)/mi/miinitext.c @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 -fbcmap_mi.lo: $(top_srcdir)/fb/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) $(AM_CFLAGS) $(CFLAGS) -MT fbcmap_mi.lo -MD -MP -MF $(DEPDIR)/fbcmap_mi.Tpo -c -o fbcmap_mi.lo `test -f '$(top_srcdir)/fb/fbcmap_mi.c' || echo '$(srcdir)/'`$(top_srcdir)/fb/fbcmap_mi.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fbcmap_mi.Tpo $(DEPDIR)/fbcmap_mi.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/fb/fbcmap_mi.c' object='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) $(AM_CFLAGS) $(CFLAGS) -c -o fbcmap_mi.lo `test -f '$(top_srcdir)/fb/fbcmap_mi.c' || echo '$(srcdir)/'`$(top_srcdir)/fb/fbcmap_mi.c - mostlyclean-libtool: -rm -f *.lo diff --git a/xserver/hw/kdrive/src/kcmap.c b/xserver/hw/kdrive/src/kcmap.c index c93c2f4d3..0970064f6 100644 --- a/xserver/hw/kdrive/src/kcmap.c +++ b/xserver/hw/kdrive/src/kcmap.c @@ -138,7 +138,7 @@ KdInstallColormap(ColormapPtr pCmap) /* Tell X clients that the installed colormap is going away. */ if (pScreenPriv->pInstalledmap) WalkTree(pScreenPriv->pInstalledmap->pScreen, TellLostMap, - (pointer) &(pScreenPriv->pInstalledmap->mid)); + (void *) &(pScreenPriv->pInstalledmap->mid)); /* Take note of the new installed colorscreen-> */ pScreenPriv->pInstalledmap = pCmap; @@ -146,7 +146,7 @@ KdInstallColormap(ColormapPtr pCmap) KdSetColormap(pCmap->pScreen); /* Tell X clients of the new colormap */ - WalkTree(pCmap->pScreen, TellGainedMap, (pointer) &(pCmap->mid)); + WalkTree(pCmap->pScreen, TellGainedMap, (void *) &(pCmap->mid)); } /* @@ -173,13 +173,13 @@ KdUninstallColormap(ColormapPtr pCmap) return; /* install default */ - dixLookupResourceByType((pointer *) &defMap, defMapID, RT_COLORMAP, + dixLookupResourceByType((void **) &defMap, defMapID, RT_COLORMAP, serverClient, DixInstallAccess); if (defMap) (*pCmap->pScreen->InstallColormap) (defMap); else { /* uninstall and clear colormap pointer */ - WalkTree(pCmap->pScreen, TellLostMap, (pointer) &(pCmap->mid)); + WalkTree(pCmap->pScreen, TellLostMap, (void *) &(pCmap->mid)); pScreenPriv->pInstalledmap = 0; } } diff --git a/xserver/hw/kdrive/src/kdrive.c b/xserver/hw/kdrive/src/kdrive.c index 382968420..9814fc66a 100644 --- a/xserver/hw/kdrive/src/kdrive.c +++ b/xserver/hw/kdrive/src/kdrive.c @@ -118,10 +118,17 @@ KdDoSwitchCmd(const char *reason) { if (kdSwitchCmd) { char *command; + int ret; if (asprintf(&command, "%s %s", kdSwitchCmd, reason) == -1) return; - system(command); + + /* 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); } } @@ -665,7 +672,7 @@ KdCloseScreen(ScreenPtr pScreen) pScreenPriv->screen->pScreen = 0; - free((pointer) pScreenPriv); + free((void *) pScreenPriv); return ret; } diff --git a/xserver/hw/kdrive/src/kdrive.h b/xserver/hw/kdrive/src/kdrive.h index 296d611ed..bec75cb6f 100644 --- a/xserver/hw/kdrive/src/kdrive.h +++ b/xserver/hw/kdrive/src/kdrive.h @@ -526,11 +526,11 @@ void KdSetLed(KdKeyboardInfo * ki, int led, Bool on); void - KdSetPointerMatrix(KdPointerMatrix * pointer); + KdSetPointerMatrix(KdPointerMatrix *pointer); void -KdComputePointerMatrix(KdPointerMatrix * pointer, Rotation randr, int width, +KdComputePointerMatrix(KdPointerMatrix *pointer, Rotation randr, int width, int height); void @@ -538,11 +538,11 @@ void void -KdBlockHandler(ScreenPtr pScreen, pointer timeout, pointer readmask); +KdBlockHandler(ScreenPtr pScreen, void *timeout, void *readmask); void -KdWakeupHandler(ScreenPtr pScreen, unsigned long result, pointer readmask); +KdWakeupHandler(ScreenPtr pScreen, unsigned long result, void *readmask); void KdDisableInput(void); diff --git a/xserver/hw/kdrive/src/kinput.c b/xserver/hw/kdrive/src/kinput.c index a9a9fa583..a539ca513 100644 --- a/xserver/hw/kdrive/src/kinput.c +++ b/xserver/hw/kdrive/src/kinput.c @@ -533,7 +533,7 @@ LegalModifier(unsigned int key, DeviceIntPtr pDev) } static void -KdBell(int volume, DeviceIntPtr pDev, pointer arg, int something) +KdBell(int volume, DeviceIntPtr pDev, void *arg, int something) { KeybdCtrl *ctrl = arg; KdKeyboardInfo *ki = NULL; @@ -1940,7 +1940,7 @@ _KdEnqueuePointerEvent(KdPointerInfo * pi, int type, int x, int y, int z, } void -KdBlockHandler(ScreenPtr pScreen, pointer timeout, pointer readmask) +KdBlockHandler(ScreenPtr pScreen, void *timeo, void *readmask) { KdPointerInfo *pi; int myTimeout = 0; @@ -1962,11 +1962,11 @@ KdBlockHandler(ScreenPtr pScreen, pointer timeout, pointer readmask) myTimeout = 20; } if (myTimeout > 0) - AdjustWaitForDelay(timeout, myTimeout); + AdjustWaitForDelay(timeo, myTimeout); } void -KdWakeupHandler(ScreenPtr pScreen, unsigned long lresult, pointer readmask) +KdWakeupHandler(ScreenPtr pScreen, unsigned long lresult, void *readmask) { int result = (int) lresult; fd_set *pReadmask = (fd_set *) readmask; diff --git a/xserver/hw/kdrive/src/kxv.c b/xserver/hw/kdrive/src/kxv.c index 22639728d..9cc0edd8a 100644 --- a/xserver/hw/kdrive/src/kxv.c +++ b/xserver/hw/kdrive/src/kxv.c @@ -208,7 +208,7 @@ KdXVScreenInit(ScreenPtr pScreen, KdVideoAdaptorPtr * adaptors, int num) sure that I appreciate that. */ ScreenPriv = malloc(sizeof(KdXVScreenRec)); - pxvs->devPriv.ptr = (pointer) ScreenPriv; + pxvs->devPriv.ptr = (void *) ScreenPriv; if (!ScreenPriv) return FALSE; @@ -385,28 +385,7 @@ KdXVInitAdaptors(ScreenPtr pScreen, KdVideoAdaptorPtr * infoPtr, int number) for (i = 0, pi = pImage, imagePtr = adaptorPtr->pImages; i < adaptorPtr->nImages; i++, pi++, imagePtr++) { - pi->id = imagePtr->id; - pi->type = imagePtr->type; - pi->byte_order = imagePtr->byte_order; - memcpy(pi->guid, imagePtr->guid, 16); - pi->bits_per_pixel = imagePtr->bits_per_pixel; - pi->format = imagePtr->format; - pi->num_planes = imagePtr->num_planes; - pi->depth = imagePtr->depth; - pi->red_mask = imagePtr->red_mask; - pi->green_mask = imagePtr->green_mask; - pi->blue_mask = imagePtr->blue_mask; - pi->y_sample_bits = imagePtr->y_sample_bits; - pi->u_sample_bits = imagePtr->u_sample_bits; - pi->v_sample_bits = imagePtr->v_sample_bits; - pi->horz_y_period = imagePtr->horz_y_period; - pi->horz_u_period = imagePtr->horz_u_period; - pi->horz_v_period = imagePtr->horz_v_period; - pi->vert_y_period = imagePtr->vert_y_period; - pi->vert_u_period = imagePtr->vert_u_period; - pi->vert_v_period = imagePtr->vert_v_period; - memcpy(pi->component_order, imagePtr->component_order, 32); - pi->scanline_order = imagePtr->scanline_order; + memcpy(pi, imagePtr, sizeof(*pi)); } pa->nImages = adaptorPtr->nImages; pa->pImages = pImage; @@ -417,9 +396,7 @@ KdXVInitAdaptors(ScreenPtr pScreen, KdVideoAdaptorPtr * infoPtr, int number) calloc(adaptorPtr->nAttributes, sizeof(XvAttributeRec)))) { for (pat = pAttribute, attributePtr = adaptorPtr->pAttributes, i = 0; i < adaptorPtr->nAttributes; pat++, i++, attributePtr++) { - pat->flags = attributePtr->flags; - pat->min_value = attributePtr->min_value; - pat->max_value = attributePtr->max_value; + memcpy(pat, attributePtr, sizeof(*pat)); pat->name = strdup(attributePtr->name); } pa->nAttributes = adaptorPtr->nAttributes; @@ -487,7 +464,7 @@ KdXVInitAdaptors(ScreenPtr pScreen, KdVideoAdaptorPtr * infoPtr, int number) adaptorPriv->PutImage = adaptorPtr->PutImage; adaptorPriv->ReputImage = adaptorPtr->ReputImage; - pa->devPriv.ptr = (pointer) adaptorPriv; + pa->devPriv.ptr = (void *) adaptorPriv; if (!(pPort = calloc(adaptorPtr->nPorts, sizeof(XvPortRec)))) { KdXVFreeAdaptor(pa); @@ -874,7 +851,7 @@ KdXVReputImage(XvPortRecPrivatePtr portPriv) } static int -KdXVReputAllVideo(WindowPtr pWin, pointer data) +KdXVReputAllVideo(WindowPtr pWin, void *data) { KdXVWindowPtr WinPriv; @@ -1821,14 +1798,14 @@ KdXVCopyPlanarData(KdScreenInfo * screen, CARD8 *src, CARD8 *dst, int randr, w >>= 1; for (j = 0; j < h; j++) { - CARD32 *dst = (CARD32 *) dst1; + CARD32 *dst32 = (CARD32 *) dst1; CARD8 *s1l = src1; CARD8 *s1r = src1 + srcNext; CARD8 *s2 = src2; CARD8 *s3 = src3; for (i = 0; i < w; i++) { - *dst++ = *s1l | (*s1r << 16) | (*s3 << 8) | (*s2 << 24); + *dst32++ = *s1l | (*s1r << 16) | (*s3 << 8) | (*s2 << 24); s1l += srcRight; s1r += srcRight; s2 += srcRight2; diff --git a/xserver/hw/kdrive/src/kxv.h b/xserver/hw/kdrive/src/kxv.h index 29118bc96..85a030ee9 100644 --- a/xserver/hw/kdrive/src/kxv.h +++ b/xserver/hw/kdrive/src/kxv.h @@ -56,34 +56,7 @@ of the copyright holder. #define VIDEO_OVERLAID_STILLS 0x00000008 #define VIDEO_CLIP_TO_VIEWPORT 0x00000010 -typedef struct { - int id; - int type; - int byte_order; - unsigned 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; -} KdImageRec, *KdImagePtr; +typedef XvImageRec KdImageRec, *KdImagePtr; typedef struct { KdScreenInfo *screen; @@ -98,41 +71,41 @@ 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, - pointer data); + 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, - pointer data); + 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, - pointer data); + 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, - pointer data); -typedef void (*StopVideoFuncPtr) (KdScreenInfo * screen, pointer data, + void *data); +typedef void (*StopVideoFuncPtr) (KdScreenInfo * screen, void *data, Bool Exit); typedef int (*SetPortAttributeFuncPtr) (KdScreenInfo * screen, Atom attribute, - int value, pointer data); + int value, void *data); typedef int (*GetPortAttributeFuncPtr) (KdScreenInfo * screen, Atom attribute, - int *value, pointer data); + 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, pointer data); + 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, pointer data); + Bool Sync, RegionPtr clipBoxes, void *data); typedef int (*ReputImageFuncPtr) (KdScreenInfo * screen, DrawablePtr pDraw, short drw_x, short drw_y, RegionPtr clipBoxes, - pointer data); + void *data); typedef int (*QueryImageAttributesFuncPtr) (KdScreenInfo * screen, int image, unsigned short *width, unsigned short *height, @@ -158,12 +131,7 @@ typedef struct { short class; } KdVideoFormatRec, *KdVideoFormatPtr; -typedef struct { - int flags; - int min_value; - int max_value; - char *name; -} KdAttributeRec, *KdAttributePtr; +typedef XvAttributeRec KdAttributeRec, *KdAttributePtr; typedef struct { unsigned int type; diff --git a/xserver/hw/kdrive/wscons/Makefile.in b/xserver/hw/kdrive/wscons/Makefile.in index 8c684d06f..d3c49d22b 100644 --- a/xserver/hw/kdrive/wscons/Makefile.in +++ b/xserver/hw/kdrive/wscons/Makefile.in @@ -177,6 +177,8 @@ 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@ @@ -221,6 +223,10 @@ 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@ @@ -323,7 +329,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -332,6 +341,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -398,6 +408,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/vfb/InitOutput.c b/xserver/hw/vfb/InitOutput.c index 97eccfd4e..9c4926462 100644 --- a/xserver/hw/vfb/InitOutput.c +++ b/xserver/hw/vfb/InitOutput.c @@ -404,7 +404,6 @@ vfbInstallColormap(ColormapPtr pmap) if (pmap != oldpmap) { int entries; XWDFileHeader *pXWDHeader; - XWDColor *pXWDCmap; VisualPtr pVisual; Pixel *ppix; xrgb *prgb; @@ -419,7 +418,6 @@ vfbInstallColormap(ColormapPtr pmap) entries = pmap->pVisual->ColormapEntries; pXWDHeader = vfbScreens[pmap->pScreen->myNum].pXWDHeader; - pXWDCmap = vfbScreens[pmap->pScreen->myNum].pXWDCmap; pVisual = pmap->pVisual; swapcopy32(pXWDHeader->visual_class, pVisual->class); @@ -460,7 +458,7 @@ vfbUninstallColormap(ColormapPtr pmap) if (pmap == curpmap) { if (pmap->mid != pmap->pScreen->defColormap) { - dixLookupResourceByType((pointer *) &curpmap, + dixLookupResourceByType((void **) &curpmap, pmap->pScreen->defColormap, RT_COLORMAP, serverClient, DixInstallAccess); @@ -508,7 +506,7 @@ vfbSaveScreen(ScreenPtr pScreen, int on) /* this flushes any changes to the screens out to the mmapped file */ static void -vfbBlockHandler(pointer blockData, OSTimePtr pTimeout, pointer pReadmask) +vfbBlockHandler(void *blockData, OSTimePtr pTimeout, void *pReadmask) { int i; @@ -529,7 +527,7 @@ vfbBlockHandler(pointer blockData, OSTimePtr pTimeout, pointer pReadmask) } static void -vfbWakeupHandler(pointer blockData, int result, pointer pReadmask) +vfbWakeupHandler(void *blockData, int result, void *pReadmask) { } @@ -894,14 +892,11 @@ static const ExtensionModule vfbExtensions[] = { static void vfbExtensionInit(void) { - int i; - - for (i = 0; i < ARRAY_SIZE(vfbExtensions); i++) - LoadExtension(&vfbExtensions[i], TRUE); + LoadExtensionList(vfbExtensions, ARRAY_SIZE(vfbExtensions), TRUE); } void -InitOutput(ScreenInfo * screenInfo, int argc, char **argv) +InitOutput(ScreenInfo * screen_info, int argc, char **argv) { int i; int NumFormats = 0; @@ -937,18 +932,18 @@ InitOutput(ScreenInfo * screenInfo, int argc, char **argv) if (vfbPixmapDepths[i]) { if (NumFormats >= MAXFORMATS) FatalError("MAXFORMATS is too small for this server\n"); - screenInfo->formats[NumFormats].depth = i; - screenInfo->formats[NumFormats].bitsPerPixel = vfbBitsPerPixel(i); - screenInfo->formats[NumFormats].scanlinePad = BITMAP_SCANLINE_PAD; + screen_info->formats[NumFormats].depth = i; + screen_info->formats[NumFormats].bitsPerPixel = vfbBitsPerPixel(i); + screen_info->formats[NumFormats].scanlinePad = BITMAP_SCANLINE_PAD; NumFormats++; } } - screenInfo->imageByteOrder = IMAGE_BYTE_ORDER; - screenInfo->bitmapScanlineUnit = BITMAP_SCANLINE_UNIT; - screenInfo->bitmapScanlinePad = BITMAP_SCANLINE_PAD; - screenInfo->bitmapBitOrder = BITMAP_BIT_ORDER; - screenInfo->numPixmapFormats = 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 */ diff --git a/xserver/hw/vfb/Makefile.am b/xserver/hw/vfb/Makefile.am index 9f4992c8b..f0f9fee47 100644 --- a/xserver/hw/vfb/Makefile.am +++ b/xserver/hw/vfb/Makefile.am @@ -1,7 +1,6 @@ SUBDIRS = man bin_PROGRAMS = Xvfb -noinst_LIBRARIES = libfbcmap.a AM_CFLAGS = -DHAVE_DIX_CONFIG_H \ $(XVFBMODULES_CFLAGS) \ @@ -9,20 +8,16 @@ AM_CFLAGS = -DHAVE_DIX_CONFIG_H \ SRCS = InitInput.c \ InitOutput.c \ - $(top_srcdir)/Xext/dpmsstubs.c \ - $(top_srcdir)/Xi/stubs.c \ $(top_srcdir)/mi/miinitext.c -libfbcmap_a_CFLAGS = $(AM_CFLAGS) -libfbcmap_a_SOURCES = $(top_srcdir)/fb/fbcmap_mi.c - Xvfb_SOURCES = $(SRCS) XVFB_LIBS = \ @XVFB_LIBS@ \ - libfbcmap.a \ $(MAIN_LIB) \ - $(XSERVER_LIBS) + $(XSERVER_LIBS) \ + $(top_builddir)/Xext/libXextdpmsstubs.la \ + $(top_builddir)/Xi/libXistubs.la Xvfb_LDADD = $(XVFB_LIBS) $(XVFB_SYS_LIBS) $(XSERVER_SYS_LIBS) Xvfb_DEPENDENCIES = $(XVFB_LIBS) diff --git a/xserver/hw/vfb/Makefile.in b/xserver/hw/vfb/Makefile.in index b0d2adf78..768de33a6 100644 --- a/xserver/hw/vfb/Makefile.in +++ b/xserver/hw/vfb/Makefile.in @@ -14,7 +14,6 @@ @SET_MAKE@ - VPATH = @srcdir@ am__make_dryrun = \ { \ @@ -74,25 +73,16 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -ARFLAGS = cru -AM_V_AR = $(am__v_AR_@AM_V@) -am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) -am__v_AR_0 = @echo " AR " $@; -am__v_AR_1 = -libfbcmap_a_AR = $(AR) $(ARFLAGS) -libfbcmap_a_LIBADD = -am_libfbcmap_a_OBJECTS = libfbcmap_a-fbcmap_mi.$(OBJEXT) -libfbcmap_a_OBJECTS = $(am_libfbcmap_a_OBJECTS) am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am__objects_1 = InitInput.$(OBJEXT) InitOutput.$(OBJEXT) \ - dpmsstubs.$(OBJEXT) stubs.$(OBJEXT) miinitext.$(OBJEXT) + miinitext.$(OBJEXT) am_Xvfb_OBJECTS = $(am__objects_1) Xvfb_OBJECTS = $(am_Xvfb_OBJECTS) am__DEPENDENCIES_1 = -am__DEPENDENCIES_2 = libfbcmap.a $(am__DEPENDENCIES_1) \ - $(am__DEPENDENCIES_1) +am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \ + $(top_builddir)/Xext/libXextdpmsstubs.la \ + $(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 @@ -134,8 +124,8 @@ 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 = $(libfbcmap_a_SOURCES) $(Xvfb_SOURCES) -DIST_SOURCES = $(libfbcmap_a_SOURCES) $(Xvfb_SOURCES) +SOURCES = $(Xvfb_SOURCES) +DIST_SOURCES = $(Xvfb_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ @@ -220,6 +210,8 @@ 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@ @@ -264,6 +256,10 @@ 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@ @@ -366,7 +362,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -375,6 +374,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -441,11 +441,16 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = \ @XVFB_LIBS@ \ - libfbcmap.a \ $(MAIN_LIB) \ - $(XSERVER_LIBS) + $(XSERVER_LIBS) \ + $(top_builddir)/Xext/libXextdpmsstubs.la \ + $(top_builddir)/Xi/libXistubs.la XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ @@ -519,19 +524,14 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = man -noinst_LIBRARIES = libfbcmap.a AM_CFLAGS = -DHAVE_DIX_CONFIG_H \ $(XVFBMODULES_CFLAGS) \ $(DIX_CFLAGS) SRCS = InitInput.c \ InitOutput.c \ - $(top_srcdir)/Xext/dpmsstubs.c \ - $(top_srcdir)/Xi/stubs.c \ $(top_srcdir)/mi/miinitext.c -libfbcmap_a_CFLAGS = $(AM_CFLAGS) -libfbcmap_a_SOURCES = $(top_srcdir)/fb/fbcmap_mi.c Xvfb_SOURCES = $(SRCS) Xvfb_LDADD = $(XVFB_LIBS) $(XVFB_SYS_LIBS) $(XSERVER_SYS_LIBS) Xvfb_DEPENDENCIES = $(XVFB_LIBS) @@ -570,13 +570,6 @@ $(top_srcdir)/configure: $(am__configure_deps) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): - -clean-noinstLIBRARIES: - -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libfbcmap.a: $(libfbcmap_a_OBJECTS) $(libfbcmap_a_DEPENDENCIES) $(EXTRA_libfbcmap_a_DEPENDENCIES) - $(AM_V_at)-rm -f libfbcmap.a - $(AM_V_AR)$(libfbcmap_a_AR) libfbcmap.a $(libfbcmap_a_OBJECTS) $(libfbcmap_a_LIBADD) - $(AM_V_at)$(RANLIB) libfbcmap.a install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ @@ -635,10 +628,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/InitInput.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/InitOutput.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dpmsstubs.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfbcmap_a-fbcmap_mi.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/miinitext.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stubs.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -661,48 +651,6 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< -libfbcmap_a-fbcmap_mi.o: $(top_srcdir)/fb/fbcmap_mi.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfbcmap_a_CFLAGS) $(CFLAGS) -MT libfbcmap_a-fbcmap_mi.o -MD -MP -MF $(DEPDIR)/libfbcmap_a-fbcmap_mi.Tpo -c -o libfbcmap_a-fbcmap_mi.o `test -f '$(top_srcdir)/fb/fbcmap_mi.c' || echo '$(srcdir)/'`$(top_srcdir)/fb/fbcmap_mi.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfbcmap_a-fbcmap_mi.Tpo $(DEPDIR)/libfbcmap_a-fbcmap_mi.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/fb/fbcmap_mi.c' object='libfbcmap_a-fbcmap_mi.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) $(libfbcmap_a_CFLAGS) $(CFLAGS) -c -o libfbcmap_a-fbcmap_mi.o `test -f '$(top_srcdir)/fb/fbcmap_mi.c' || echo '$(srcdir)/'`$(top_srcdir)/fb/fbcmap_mi.c - -libfbcmap_a-fbcmap_mi.obj: $(top_srcdir)/fb/fbcmap_mi.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfbcmap_a_CFLAGS) $(CFLAGS) -MT libfbcmap_a-fbcmap_mi.obj -MD -MP -MF $(DEPDIR)/libfbcmap_a-fbcmap_mi.Tpo -c -o libfbcmap_a-fbcmap_mi.obj `if test -f '$(top_srcdir)/fb/fbcmap_mi.c'; then $(CYGPATH_W) '$(top_srcdir)/fb/fbcmap_mi.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/fb/fbcmap_mi.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfbcmap_a-fbcmap_mi.Tpo $(DEPDIR)/libfbcmap_a-fbcmap_mi.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/fb/fbcmap_mi.c' object='libfbcmap_a-fbcmap_mi.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) $(libfbcmap_a_CFLAGS) $(CFLAGS) -c -o libfbcmap_a-fbcmap_mi.obj `if test -f '$(top_srcdir)/fb/fbcmap_mi.c'; then $(CYGPATH_W) '$(top_srcdir)/fb/fbcmap_mi.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/fb/fbcmap_mi.c'; fi` - -dpmsstubs.o: $(top_srcdir)/Xext/dpmsstubs.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dpmsstubs.o -MD -MP -MF $(DEPDIR)/dpmsstubs.Tpo -c -o dpmsstubs.o `test -f '$(top_srcdir)/Xext/dpmsstubs.c' || echo '$(srcdir)/'`$(top_srcdir)/Xext/dpmsstubs.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dpmsstubs.Tpo $(DEPDIR)/dpmsstubs.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/Xext/dpmsstubs.c' object='dpmsstubs.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 dpmsstubs.o `test -f '$(top_srcdir)/Xext/dpmsstubs.c' || echo '$(srcdir)/'`$(top_srcdir)/Xext/dpmsstubs.c - -dpmsstubs.obj: $(top_srcdir)/Xext/dpmsstubs.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dpmsstubs.obj -MD -MP -MF $(DEPDIR)/dpmsstubs.Tpo -c -o dpmsstubs.obj `if test -f '$(top_srcdir)/Xext/dpmsstubs.c'; then $(CYGPATH_W) '$(top_srcdir)/Xext/dpmsstubs.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/Xext/dpmsstubs.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dpmsstubs.Tpo $(DEPDIR)/dpmsstubs.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/Xext/dpmsstubs.c' object='dpmsstubs.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 dpmsstubs.obj `if test -f '$(top_srcdir)/Xext/dpmsstubs.c'; then $(CYGPATH_W) '$(top_srcdir)/Xext/dpmsstubs.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/Xext/dpmsstubs.c'; fi` - -stubs.o: $(top_srcdir)/Xi/stubs.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stubs.o -MD -MP -MF $(DEPDIR)/stubs.Tpo -c -o stubs.o `test -f '$(top_srcdir)/Xi/stubs.c' || echo '$(srcdir)/'`$(top_srcdir)/Xi/stubs.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stubs.Tpo $(DEPDIR)/stubs.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/Xi/stubs.c' object='stubs.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 stubs.o `test -f '$(top_srcdir)/Xi/stubs.c' || echo '$(srcdir)/'`$(top_srcdir)/Xi/stubs.c - -stubs.obj: $(top_srcdir)/Xi/stubs.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stubs.obj -MD -MP -MF $(DEPDIR)/stubs.Tpo -c -o stubs.obj `if test -f '$(top_srcdir)/Xi/stubs.c'; then $(CYGPATH_W) '$(top_srcdir)/Xi/stubs.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/Xi/stubs.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stubs.Tpo $(DEPDIR)/stubs.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/Xi/stubs.c' object='stubs.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 stubs.obj `if test -f '$(top_srcdir)/Xi/stubs.c'; then $(CYGPATH_W) '$(top_srcdir)/Xi/stubs.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/Xi/stubs.c'; fi` - 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 @@ -906,7 +854,7 @@ distdir: $(DISTFILES) done check-am: all-am check: check-recursive -all-am: Makefile $(LIBRARIES) $(PROGRAMS) +all-am: Makefile $(PROGRAMS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)"; do \ @@ -944,8 +892,7 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive -clean-am: clean-binPROGRAMS clean-generic clean-libtool \ - clean-noinstLIBRARIES mostlyclean-am +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) @@ -1019,20 +966,19 @@ uninstall-am: uninstall-binPROGRAMS .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool clean-noinstLIBRARIES cscopelist \ - cscopelist-recursive ctags ctags-recursive 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-recursive uninstall uninstall-am \ - uninstall-binPROGRAMS + clean-generic clean-libtool cscopelist cscopelist-recursive \ + ctags ctags-recursive 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-recursive \ + uninstall uninstall-am uninstall-binPROGRAMS relink: diff --git a/xserver/hw/vfb/man/Makefile.in b/xserver/hw/vfb/man/Makefile.in index 3c3337b2b..481cfffbf 100644 --- a/xserver/hw/vfb/man/Makefile.in +++ b/xserver/hw/vfb/man/Makefile.in @@ -160,6 +160,8 @@ 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@ @@ -204,6 +206,10 @@ 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@ @@ -268,6 +274,7 @@ MAN_SUBSTS = @MAN_SUBSTS@ -e 's|__logdir__|$(logdir)|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@ @@ -322,7 +329,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -331,6 +341,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -397,6 +408,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/xfree86/Makefile.am b/xserver/hw/xfree86/Makefile.am index 15670d01d..58d197e31 100644 --- a/xserver/hw/xfree86/Makefile.am +++ b/xserver/hw/xfree86/Makefile.am @@ -14,6 +14,10 @@ DRI3_BUILDDIR = $(top_builddir)/dri3 DRI3_LIB = $(DRI3_BUILDDIR)/libdri3.la endif +if GLAMOR_EGL +GLAMOR_EGL_SUBDIR = glamor_egl +endif + if XF86UTILS XF86UTILS_SUBDIR = utils endif @@ -33,12 +37,13 @@ endif SUBDIRS = common ddc x86emu $(INT10_SUBDIR) os-support parser \ ramdac $(VGAHW_SUBDIR) loader modes $(DRI_SUBDIR) \ $(DRI2_SUBDIR) . $(VBE_SUBDIR) i2c dixmods \ - fbdevhw shadowfb exa $(XF86UTILS_SUBDIR) doc man + fbdevhw shadowfb exa $(XF86UTILS_SUBDIR) doc man \ + $(GLAMOR_EGL_SUBDIR) DIST_SUBDIRS = common ddc i2c x86emu int10 fbdevhw os-support \ parser ramdac shadowfb vbe vgahw \ loader dixmods dri dri2 exa modes \ - utils doc man + utils doc man glamor_egl bin_PROGRAMS = Xorg nodist_Xorg_SOURCES = sdksyms.c @@ -76,6 +81,12 @@ Xorg_DEPENDENCIES = $(LOCAL_LIBS) Xorg_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) +if SUID_WRAPPER +wrapdir = $(SUID_WRAPPER_DIR) +wrap_PROGRAMS = Xorg.wrap +Xorg_wrap_SOURCES = xorg-wrapper.c +endif + BUILT_SOURCES = xorg.conf.example DISTCLEANFILES = xorg.conf.example EXTRA_DIST = xorgconf.cpp @@ -93,6 +104,12 @@ if INSTALL_SETUID chown root $(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.bin + ${INSTALL} -m 755 Xorg.sh $(DESTDIR)$(bindir)/Xorg + -chown root $(DESTDIR)$(SUID_WRAPPER_DIR)/Xorg.wrap && chmod u+s $(DESTDIR)$(SUID_WRAPPER_DIR)/Xorg.wrap +endif uninstall-local: if CYGWIN @@ -114,7 +131,7 @@ xorg.conf.example: xorgconf.cpp relink: $(AM_V_at)rm -f Xorg$(EXEEXT) && $(MAKE) Xorg$(EXEEXT) -CLEANFILES = sdksyms.c sdksyms.dep +CLEANFILES = sdksyms.c sdksyms.dep Xorg.sh EXTRA_DIST += sdksyms.sh sdksyms.dep sdksyms.c: sdksyms.sh diff --git a/xserver/hw/xfree86/Makefile.in b/xserver/hw/xfree86/Makefile.in index 99c985f9a..1c3f9e1df 100644 --- a/xserver/hw/xfree86/Makefile.in +++ b/xserver/hw/xfree86/Makefile.in @@ -51,9 +51,10 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = Xorg$(EXEEXT) +@SUID_WRAPPER_TRUE@wrap_PROGRAMS = Xorg.wrap$(EXEEXT) subdir = hw/xfree86 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(top_srcdir)/depcomp + $(srcdir)/Xorg.sh.in $(top_srcdir)/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \ @@ -71,10 +72,10 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/xwin-config.h \ $(top_builddir)/include/kdrive-config.h \ $(top_builddir)/include/version-config.h -CONFIG_CLEAN_FILES = +CONFIG_CLEAN_FILES = Xorg.sh CONFIG_CLEAN_VPATH_FILES = -am__installdirs = "$(DESTDIR)$(bindir)" -PROGRAMS = $(bin_PROGRAMS) +am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(wrapdir)" +PROGRAMS = $(bin_PROGRAMS) $(wrap_PROGRAMS) nodist_Xorg_OBJECTS = sdksyms.$(OBJEXT) Xorg_OBJECTS = $(nodist_Xorg_OBJECTS) am__DEPENDENCIES_1 = @@ -93,6 +94,10 @@ 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 @@ -127,8 +132,8 @@ 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) -DIST_SOURCES = +SOURCES = $(nodist_Xorg_SOURCES) $(Xorg_wrap_SOURCES) +DIST_SOURCES = $(am__Xorg_wrap_SOURCES_DIST) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ @@ -212,6 +217,8 @@ 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@ @@ -256,6 +263,10 @@ 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@ @@ -358,7 +369,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -367,6 +381,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -433,6 +448,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ @@ -511,6 +530,7 @@ top_srcdir = @top_srcdir@ @DRI2_TRUE@DRI2_LIB = dri2/libdri2.la @DRI3_TRUE@DRI3_BUILDDIR = $(top_builddir)/dri3 @DRI3_TRUE@DRI3_LIB = $(DRI3_BUILDDIR)/libdri3.la +@GLAMOR_EGL_TRUE@GLAMOR_EGL_SUBDIR = glamor_egl @XF86UTILS_TRUE@XF86UTILS_SUBDIR = utils @VGAHW_TRUE@VGAHW_SUBDIR = vgahw @VBE_TRUE@VBE_SUBDIR = vbe @@ -518,12 +538,13 @@ top_srcdir = @top_srcdir@ SUBDIRS = common ddc x86emu $(INT10_SUBDIR) os-support parser \ ramdac $(VGAHW_SUBDIR) loader modes $(DRI_SUBDIR) \ $(DRI2_SUBDIR) . $(VBE_SUBDIR) i2c dixmods \ - fbdevhw shadowfb exa $(XF86UTILS_SUBDIR) doc man + fbdevhw shadowfb exa $(XF86UTILS_SUBDIR) doc man \ + $(GLAMOR_EGL_SUBDIR) DIST_SUBDIRS = common ddc i2c x86emu int10 fbdevhw os-support \ parser ramdac shadowfb vbe vgahw \ loader dixmods dri dri2 exa modes \ - utils doc man + utils doc man glamor_egl nodist_Xorg_SOURCES = sdksyms.c AM_CFLAGS = $(DIX_CFLAGS) @XORG_CFLAGS@ @@ -559,6 +580,8 @@ Xorg_LDADD = \ Xorg_DEPENDENCIES = $(LOCAL_LIBS) Xorg_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) +@SUID_WRAPPER_TRUE@wrapdir = $(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 @@ -569,7 +592,7 @@ 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 +CLEANFILES = sdksyms.c sdksyms.dep Xorg.sh SDKSYMS_DEP = sdksyms.dep all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-recursive @@ -606,6 +629,8 @@ $(top_srcdir)/configure: $(am__configure_deps) $(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=; \ @@ -652,9 +677,58 @@ clean-binPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list +install-wrapPROGRAMS: $(wrap_PROGRAMS) + @$(NORMAL_INSTALL) + @list='$(wrap_PROGRAMS)'; test -n "$(wrapdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(wrapdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(wrapdir)" || 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)$(wrapdir)$$dir'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(wrapdir)$$dir" || exit $$?; \ + } \ + ; done + +uninstall-wrapPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(wrap_PROGRAMS)'; test -n "$(wrapdir)" || 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)$(wrapdir)' && rm -f" $$files ")"; \ + cd "$(DESTDIR)$(wrapdir)" && rm -f $$files + +clean-wrapPROGRAMS: + @list='$(wrap_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) @@ -663,6 +737,7 @@ distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sdksyms.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xorg-wrapper.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -878,7 +953,7 @@ check: $(BUILT_SOURCES) all-am: Makefile $(PROGRAMS) installdirs: installdirs-recursive installdirs-am: - for dir in "$(DESTDIR)$(bindir)"; do \ + for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(wrapdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) @@ -917,7 +992,8 @@ maintainer-clean-generic: -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-recursive -clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am +clean-am: clean-binPROGRAMS clean-generic clean-libtool \ + clean-wrapPROGRAMS mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) @@ -937,7 +1013,7 @@ info: info-recursive info-am: -install-data-am: install-data-local +install-data-am: install-data-local install-wrapPROGRAMS install-dvi: install-dvi-recursive @@ -984,7 +1060,8 @@ ps: ps-recursive ps-am: -uninstall-am: uninstall-binPROGRAMS uninstall-local +uninstall-am: uninstall-binPROGRAMS uninstall-local \ + uninstall-wrapPROGRAMS @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-hook .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \ @@ -993,20 +1070,22 @@ uninstall-am: uninstall-binPROGRAMS uninstall-local .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool cscopelist cscopelist-recursive \ - ctags ctags-recursive 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 \ - 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-recursive uninstall uninstall-am \ - uninstall-binPROGRAMS uninstall-hook uninstall-local + clean-generic clean-libtool clean-wrapPROGRAMS cscopelist \ + cscopelist-recursive ctags ctags-recursive 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-wrapPROGRAMS 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-recursive uninstall uninstall-am \ + uninstall-binPROGRAMS uninstall-hook uninstall-local \ + uninstall-wrapPROGRAMS # Without logdir, X will post an error on the terminal and will not start @@ -1018,6 +1097,10 @@ install-exec-hook: (cd $(DESTDIR)$(bindir) && rm -f X && $(LN_S) Xorg$(EXEEXT) X) @INSTALL_SETUID_TRUE@ chown root $(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.bin +@SUID_WRAPPER_TRUE@ ${INSTALL} -m 755 Xorg.sh $(DESTDIR)$(bindir)/Xorg +@SUID_WRAPPER_TRUE@ -chown root $(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 diff --git a/xserver/hw/xfree86/Xorg.sh.in b/xserver/hw/xfree86/Xorg.sh.in new file mode 100644 index 000000000..cef4859c8 --- /dev/null +++ b/xserver/hw/xfree86/Xorg.sh.in @@ -0,0 +1,11 @@ +#!/bin/sh +# +# Execute Xorg.wrap if it exists otherwise execute Xorg.bin 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.bin "$@" +fi diff --git a/xserver/hw/xfree86/common/Makefile.in b/xserver/hw/xfree86/common/Makefile.in index 517bb0e59..67551387c 100644 --- a/xserver/hw/xfree86/common/Makefile.in +++ b/xserver/hw/xfree86/common/Makefile.in @@ -226,6 +226,8 @@ 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@ @@ -270,6 +272,10 @@ 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@ @@ -372,7 +378,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -381,6 +390,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -447,6 +457,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/xfree86/common/compiler.h b/xserver/hw/xfree86/common/compiler.h index 4f3454685..141b974ca 100644 --- a/xserver/hw/xfree86/common/compiler.h +++ b/xserver/hw/xfree86/common/compiler.h @@ -103,6 +103,7 @@ #if !defined(__sparc__) && !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); @@ -1351,7 +1352,10 @@ stl_u(unsigned long val, unsigned int *p) #else /* ix86 */ #if !defined(__SUNPRO_C) -#if !defined(FAKEIT) && !defined(__mc68000__) && !defined(__arm__) && !defined(__sh__) && !defined(__hppa__) && !defined(__s390__) && !defined(__m32r__) && !defined(__aarch64__) +#if !defined(FAKEIT) && !defined(__mc68000__) && !defined(__arm__) && \ + !defined(__sh__) && !defined(__hppa__) && !defined(__s390__) && \ + !defined(__m32r__) && !defined(__aarch64__) && !defined(__arc__) && \ + !defined(__xtensa__) #ifdef GCCUSESGAS /* @@ -1453,7 +1457,7 @@ inl(unsigned short port) #endif /* GCCUSESGAS */ -#else /* !defined(FAKEIT) && !defined(__mc68000__) && !defined(__arm__) && !defined(__sh__) && !defined(__hppa__) && !defined(__m32r__) */ +#else /* !defined(FAKEIT) && !defined(__mc68000__) && !defined(__arm__) && !defined(__sh__) && !defined(__hppa__) && !defined(__m32r__) && !defined(__arc__) */ static __inline__ void outb(unsigned short port, unsigned char val) diff --git a/xserver/hw/xfree86/common/dgaproc.h b/xserver/hw/xfree86/common/dgaproc.h index e824d3094..87e923f26 100644 --- a/xserver/hw/xfree86/common/dgaproc.h +++ b/xserver/hw/xfree86/common/dgaproc.h @@ -24,7 +24,7 @@ typedef struct { int num; /* A unique identifier for the mode (num > 0) */ - char *name; /* name of mode given in the XF86Config */ + const char *name; /* name of mode given in the XF86Config */ int VSync_num; int VSync_den; int flags; /* DGA_CONCURRENT_ACCESS, etc... */ diff --git a/xserver/hw/xfree86/common/vidmodeproc.h b/xserver/hw/xfree86/common/vidmodeproc.h index 311d35c7b..cff340c47 100644 --- a/xserver/hw/xfree86/common/vidmodeproc.h +++ b/xserver/hw/xfree86/common/vidmodeproc.h @@ -34,7 +34,7 @@ typedef enum { } VidModeSelectMonitor; typedef union { - pointer ptr; + const void *ptr; int i; float f; } vidMonitorValue; @@ -42,38 +42,38 @@ typedef union { extern Bool VidModeExtensionInit(ScreenPtr pScreen); extern _X_EXPORT Bool VidModeAvailable(int scrnIndex); -extern _X_EXPORT Bool VidModeGetCurrentModeline(int scrnIndex, pointer *mode, +extern _X_EXPORT Bool VidModeGetCurrentModeline(int scrnIndex, void **mode, int *dotClock); -extern _X_EXPORT Bool VidModeGetFirstModeline(int scrnIndex, pointer *mode, +extern _X_EXPORT Bool VidModeGetFirstModeline(int scrnIndex, void **mode, int *dotClock); -extern _X_EXPORT Bool VidModeGetNextModeline(int scrnIndex, pointer *mode, +extern _X_EXPORT Bool VidModeGetNextModeline(int scrnIndex, void **mode, int *dotClock); -extern _X_EXPORT Bool VidModeDeleteModeline(int scrnIndex, pointer mode); +extern _X_EXPORT Bool VidModeDeleteModeline(int scrnIndex, void *mode); extern _X_EXPORT Bool VidModeZoomViewport(int scrnIndex, int zoom); extern _X_EXPORT Bool VidModeGetViewPort(int scrnIndex, int *x, int *y); extern _X_EXPORT Bool VidModeSetViewPort(int scrnIndex, int x, int y); -extern _X_EXPORT Bool VidModeSwitchMode(int scrnIndex, pointer mode); +extern _X_EXPORT Bool VidModeSwitchMode(int scrnIndex, void *mode); extern _X_EXPORT Bool VidModeLockZoom(int scrnIndex, Bool lock); -extern _X_EXPORT Bool VidModeGetMonitor(int scrnIndex, pointer *monitor); +extern _X_EXPORT Bool VidModeGetMonitor(int scrnIndex, void **monitor); extern _X_EXPORT int VidModeGetNumOfClocks(int scrnIndex, Bool *progClock); extern _X_EXPORT Bool VidModeGetClocks(int scrnIndex, int *Clocks); extern _X_EXPORT ModeStatus VidModeCheckModeForMonitor(int scrnIndex, - pointer mode); + void *mode); extern _X_EXPORT ModeStatus VidModeCheckModeForDriver(int scrnIndex, - pointer mode); -extern _X_EXPORT void VidModeSetCrtcForMode(int scrnIndex, pointer mode); -extern _X_EXPORT Bool VidModeAddModeline(int scrnIndex, pointer mode); + void *mode); +extern _X_EXPORT void VidModeSetCrtcForMode(int scrnIndex, void *mode); +extern _X_EXPORT Bool VidModeAddModeline(int scrnIndex, void *mode); extern _X_EXPORT int VidModeGetDotClock(int scrnIndex, int Clock); extern _X_EXPORT int VidModeGetNumOfModes(int scrnIndex); extern _X_EXPORT Bool VidModeSetGamma(int scrnIndex, float red, float green, float blue); extern _X_EXPORT Bool VidModeGetGamma(int scrnIndex, float *red, float *green, float *blue); -extern _X_EXPORT pointer VidModeCreateMode(void); -extern _X_EXPORT void VidModeCopyMode(pointer modefrom, pointer modeto); -extern _X_EXPORT int VidModeGetModeValue(pointer mode, int valtyp); -extern _X_EXPORT void VidModeSetModeValue(pointer mode, int valtyp, int val); -extern _X_EXPORT vidMonitorValue VidModeGetMonitorValue(pointer monitor, +extern _X_EXPORT void *VidModeCreateMode(void); +extern _X_EXPORT void VidModeCopyMode(void *modefrom, void *modeto); +extern _X_EXPORT int VidModeGetModeValue(void *mode, int valtyp); +extern _X_EXPORT void VidModeSetModeValue(void *mode, int valtyp, int val); +extern _X_EXPORT vidMonitorValue VidModeGetMonitorValue(void *monitor, int valtyp, int indx); extern _X_EXPORT Bool VidModeSetGammaRamp(int, int, CARD16 *, CARD16 *, CARD16 *); diff --git a/xserver/hw/xfree86/common/xf86.h b/xserver/hw/xfree86/common/xf86.h index eada01cf9..cec31354e 100644 --- a/xserver/hw/xfree86/common/xf86.h +++ b/xserver/hw/xfree86/common/xf86.h @@ -128,7 +128,7 @@ extern _X_EXPORT ScrnInfoPtr xf86ConfigPciEntity(ScrnInfoPtr pScrn, void *dummy, EntityProc init, EntityProc enter, EntityProc leave, - pointer private); + void *private); /* Obsolete! don't use */ extern _X_EXPORT Bool xf86ConfigActivePciEntity(ScrnInfoPtr pScrn, int entityIndex, @@ -136,7 +136,7 @@ extern _X_EXPORT Bool xf86ConfigActivePciEntity(ScrnInfoPtr pScrn, void *dummy, EntityProc init, EntityProc enter, EntityProc leave, - pointer private); + void *private); #else #define xf86VGAarbiterInit() do {} while (0) #define xf86VGAarbiterFini() do {} while (0) @@ -166,7 +166,7 @@ extern _X_EXPORT void xf86RemoveEntityFromScreen(ScrnInfoPtr pScrn, extern _X_EXPORT EntityInfoPtr xf86GetEntityInfo(int entityIndex); extern _X_EXPORT Bool xf86SetEntityFuncs(int entityIndex, EntityProc init, EntityProc enter, EntityProc leave, - pointer); + void *); extern _X_EXPORT Bool xf86IsEntityPrimary(int entityIndex); extern _X_EXPORT ScrnInfoPtr xf86FindScreenForEntity(int entityIndex); @@ -203,11 +203,6 @@ extern _X_EXPORT void xf86ReconfigureLayout(void); extern _X_EXPORT Bool xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags); -#ifdef DPMSExtension -extern _X_EXPORT int DPMSSet(ClientPtr client, int level); -extern _X_EXPORT Bool DPMSSupported(void); -#endif - /* xf86DGA.c */ #ifdef XFreeXDGA @@ -220,29 +215,35 @@ extern _X_EXPORT xf86SetDGAModeProc xf86SetDGAMode; /* xf86Events.c */ +typedef struct _InputInfoRec *InputInfoPtr; + extern _X_EXPORT void SetTimeSinceLastInputEvent(void); -extern _X_EXPORT pointer xf86AddInputHandler(int fd, InputHandlerProc proc, - pointer data); -extern _X_EXPORT int xf86RemoveInputHandler(pointer handler); -extern _X_EXPORT void xf86DisableInputHandler(pointer handler); -extern _X_EXPORT void xf86EnableInputHandler(pointer handler); -extern _X_EXPORT pointer xf86AddGeneralHandler(int fd, InputHandlerProc proc, - pointer data); -extern _X_EXPORT int xf86RemoveGeneralHandler(pointer handler); -extern _X_EXPORT void xf86DisableGeneralHandler(pointer handler); -extern _X_EXPORT void xf86EnableGeneralHandler(pointer handler); +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, pointer data); + handler, void *data); extern _X_EXPORT void xf86InterceptSignals(int *signo); extern _X_EXPORT void xf86InterceptSigIll(void (*sigillhandler) (void)); extern _X_EXPORT Bool xf86EnableVTSwitch(Bool new); 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, pointer module, +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); @@ -333,36 +334,36 @@ xf86DisableRandR(void); extern _X_EXPORT CARD32 xorgGetVersion(void); extern _X_EXPORT CARD32 -xf86GetModuleVersion(pointer module); -extern _X_EXPORT pointer +xf86GetModuleVersion(void *module); +extern _X_EXPORT void * xf86LoadDrvSubModule(DriverPtr drv, const char *name); -extern _X_EXPORT pointer +extern _X_EXPORT void * xf86LoadSubModule(ScrnInfoPtr pScrn, const char *name); -extern _X_EXPORT pointer -xf86LoadOneModule(char *name, pointer optlist); +extern _X_EXPORT void * +xf86LoadOneModule(const char *name, void *optlist); extern _X_EXPORT void -xf86UnloadSubModule(pointer mod); +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 pointer -xf86FindXvOptions(ScrnInfoPtr pScrn, int adapt_index, char *port_name, - char **adaptor_name, pointer *adaptor_options); +extern _X_EXPORT void * +xf86FindXvOptions(ScrnInfoPtr pScrn, int adapt_index, const char *port_name, + const char **adaptor_name, void **adaptor_options); extern _X_EXPORT void xf86GetOS(const char **name, int *major, int *minor, int *teeny); extern _X_EXPORT ScrnInfoPtr xf86ConfigFbEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex, EntityProc init, - EntityProc enter, EntityProc leave, pointer private); + EntityProc enter, EntityProc leave, void *private); extern _X_EXPORT Bool xf86IsScreenPrimary(ScrnInfoPtr pScrn); extern _X_EXPORT int xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type, - int format, unsigned long len, pointer value); + int format, unsigned long len, void *value); extern _X_EXPORT Bool xf86IsUnblank(int mode); @@ -394,7 +395,7 @@ extern _X_EXPORT ModeStatus xf86CheckModeForDriver(ScrnInfoPtr scrp, DisplayModePtr mode, int flags); extern _X_EXPORT int xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes, - char **modeNames, ClockRangePtr clockRanges, + const char **modeNames, ClockRangePtr clockRanges, int *linePitches, int minPitch, int maxPitch, int minHeight, int maxHeight, int pitchInc, int virtualX, int virtualY, int apertureSize, diff --git a/xserver/hw/xfree86/common/xf86AutoConfig.c b/xserver/hw/xfree86/common/xf86AutoConfig.c index 4460b97a2..ef74ba2d5 100644 --- a/xserver/hw/xfree86/common/xf86AutoConfig.c +++ b/xserver/hw/xfree86/common/xf86AutoConfig.c @@ -265,7 +265,7 @@ listPossibleVideoDrivers(char *matches[], int nmatches) #endif #ifdef XSERVER_LIBPCIACCESS if (i < (nmatches - 1)) - i = xf86PciMatchDriver(matches, nmatches); + i += xf86PciMatchDriver(&matches[i], nmatches - i); #endif #if defined(__linux__) @@ -306,6 +306,7 @@ copyScreen(confScreenPtr oscreen, GDevPtr odev, int i, char *driver) { confScreenPtr nscreen; GDevPtr cptr = NULL; + char *identifier; nscreen = malloc(sizeof(confScreenRec)); if (!nscreen) @@ -319,13 +320,14 @@ copyScreen(confScreenPtr oscreen, GDevPtr odev, int i, char *driver) } memcpy(cptr, odev, sizeof(GDevRec)); - if (asprintf(&cptr->identifier, "Autoconfigured Video Device %s", driver) + 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; diff --git a/xserver/hw/xfree86/common/xf86Bus.c b/xserver/hw/xfree86/common/xf86Bus.c index 3f9ee71e6..9289744a3 100644 --- a/xserver/hw/xfree86/common/xf86Bus.c +++ b/xserver/hw/xfree86/common/xf86Bus.c @@ -81,7 +81,7 @@ xf86CallDriverProbe(DriverPtr drv, Bool detect_only) if (drv->platformProbe != NULL) { foundScreen = xf86platformProbeDev(drv); } - if (ServerIsNotSeat0()) + if (ServerIsNotSeat0() && foundScreen) return foundScreen; #endif @@ -201,7 +201,7 @@ xf86BusProbe(void) { #ifdef XSERVER_PLATFORM_BUS xf86platformProbe(); - if (ServerIsNotSeat0()) + if (ServerIsNotSeat0() && xf86_num_platform_devices > 0) return; #endif #ifdef XSERVER_LIBPCIACCESS @@ -210,6 +210,9 @@ xf86BusProbe(void) #if (defined(__sparc__) || defined(__sparc)) xf86SbusProbe(); #endif +#ifdef XSERVER_PLATFORM_BUS + xf86platformPrimary(); +#endif } /* @@ -288,7 +291,7 @@ xf86IsEntityPrimary(int entityIndex) Bool xf86SetEntityFuncs(int entityIndex, EntityProc init, EntityProc enter, - EntityProc leave, pointer private) + EntityProc leave, void *private) { if (entityIndex >= xf86NumEntities) return FALSE; diff --git a/xserver/hw/xfree86/common/xf86Bus.h b/xserver/hw/xfree86/common/xf86Bus.h index e83ba780a..c59625db6 100644 --- a/xserver/hw/xfree86/common/xf86Bus.h +++ b/xserver/hw/xfree86/common/xf86Bus.h @@ -51,7 +51,7 @@ typedef struct { EntityProc entityInit; EntityProc entityEnter; EntityProc entityLeave; - pointer private; + void *private; Bool active; Bool inUse; BusRec bus; diff --git a/xserver/hw/xfree86/common/xf86Config.c b/xserver/hw/xfree86/common/xf86Config.c index f37d23bbb..89ba2c1b0 100644 --- a/xserver/hw/xfree86/common/xf86Config.c +++ b/xserver/hw/xfree86/common/xf86Config.c @@ -103,7 +103,7 @@ "/etc/X11/%X," "%C/X11/%X" #endif #ifndef SYS_CONFIGDIRPATH -#define SYS_CONFIGDIRPATH "/usr/share/X11/%X," "%D/X11/%X" +#define SYS_CONFIGDIRPATH "%D/X11/%X" #endif #ifndef PROJECTROOT #define PROJECTROOT "/usr/X11R6" @@ -171,7 +171,7 @@ xf86GetPathElem(char **pnt) static char * xf86ValidateFontPath(char *path) { - char *tmp_path, *out_pnt, *path_elem, *next, *p1, *dir_elem; + char *next, *tmp_path, *out_pnt, *path_elem, *p1, *dir_elem; struct stat stat_buf; int flag; int dirlen; @@ -232,21 +232,33 @@ xf86ValidateFontPath(char *path) 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 */ -char ** -xf86ModulelistFromConfig(pointer **optlist) +const char ** +xf86ModulelistFromConfig(void ***optlist) { int count = 0, i = 0; - char **modulearray; + const char **modulearray; const char *ignore[] = { "GLcore", "speedo", "bitmap", "drm", "freetype", "type1", NULL }; - pointer *optarray; + void **optarray; XF86LoadPtr modp; Bool found; @@ -352,7 +364,7 @@ xf86ModulelistFromConfig(pointer **optlist) * allocate the memory and walk the list again to fill in the pointers */ modulearray = xnfalloc((count + 1) * sizeof(char *)); - optarray = xnfalloc((count + 1) * sizeof(pointer)); + optarray = xnfalloc((count + 1) * sizeof(void *)); count = 0; if (xf86configptr->conf_modules) { modp = xf86configptr->conf_modules->mod_load_lst; @@ -374,12 +386,12 @@ xf86ModulelistFromConfig(pointer **optlist) return modulearray; } -char ** +const char ** xf86DriverlistFromConfig(void) { int count = 0; int j; - char **modulearray; + const char **modulearray; screenLayoutPtr slp; /* @@ -446,11 +458,11 @@ xf86DriverlistFromConfig(void) return modulearray; } -char ** +const char ** xf86InputDriverlistFromConfig(void) { int count = 0; - char **modulearray; + const char **modulearray; InputInfoPtr *idp; /* @@ -505,11 +517,11 @@ xf86InputDriverlistFromConfig(void) } static void -fixup_video_driver_list(char **drivers) +fixup_video_driver_list(const char **drivers) { - static const char *fallback[4] = { "fbdev", "vesa", "wsfb", NULL }; - char **end, **drv; - char *x; + static const char *fallback[5] = { "modesetting", "fbdev", "vesa", "wsfb", NULL }; + const char **end, **drv; + const char *x; int i; /* walk to the end of the list */ @@ -532,10 +544,10 @@ fixup_video_driver_list(char **drivers) } } -static char ** +static const char ** GenerateDriverlist(const char *dirname) { - char **ret; + const char **ret; const char *subdirs[] = { dirname, NULL }; static const char *patlist[] = { "(.*)_drv\\.so", NULL }; ret = LoaderListDirs(subdirs, patlist); @@ -547,10 +559,10 @@ GenerateDriverlist(const char *dirname) return ret; } -char ** +const char ** xf86DriverlistFromCompile(void) { - static char **driverlist = NULL; + static const char **driverlist = NULL; if (!driverlist) driverlist = GenerateDriverlist("drivers"); @@ -588,33 +600,35 @@ configFiles(XF86ConfFilesPtr fileconf) /* FontPath */ must_copy = TRUE; - temp_path = defaultFontPath ? defaultFontPath : ""; + temp_path = defaultFontPath ? (char *) defaultFontPath : (char *) ""; if (xf86fpFlag) pathFrom = X_CMDLINE; else if (fileconf && fileconf->file_fontpath) { pathFrom = X_CONFIG; if (xf86Info.useDefaultFontPath) { - if (asprintf(&defaultFontPath, "%s%s%s", fileconf->file_fontpath, + char *new_font_path; + if (asprintf(&new_font_path, "%s%s%s", fileconf->file_fontpath, *temp_path ? "," : "", temp_path) == -1) - defaultFontPath = NULL; + new_font_path = NULL; else must_copy = FALSE; + defaultFontPath = new_font_path; } else defaultFontPath = fileconf->file_fontpath; } else pathFrom = X_DEFAULT; - temp_path = defaultFontPath ? defaultFontPath : ""; + temp_path = defaultFontPath ? (char *) defaultFontPath : (char *) ""; /* xf86ValidateFontPath modifies its argument, but returns a copy of it. */ - temp_path = must_copy ? xnfstrdup(defaultFontPath) : defaultFontPath; + 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 = defaultFontPath; + temp_path = (char *) defaultFontPath; while ((temp_path = index(temp_path, ',')) != NULL) { countDirs++; temp_path++; @@ -622,7 +636,7 @@ configFiles(XF86ConfFilesPtr fileconf) log_buf = xnfalloc(strlen(defaultFontPath) + (2 * countDirs) + 1); temp_path = log_buf; - start = defaultFontPath; + start = (char *) defaultFontPath; while ((end = index(start, ',')) != NULL) { size = (end - start) + 1; *(temp_path++) = '\t'; @@ -774,13 +788,7 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) MessageType from; const char *s; XkbRMLVOSet set; - - /* Default options. */ - set.rules = XKB_DFLT_RULES; - set.model = "pc105"; - set.layout = "us"; - set.variant = NULL; - set.options = NULL; + const char *rules; /* * Merge the ServerLayout and ServerFlags options. The former have @@ -960,9 +968,15 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) * evdev rules set. */ #if defined(linux) if (!xf86Info.forceInputDevices) - set.rules = "evdev"; + rules = "evdev"; + else #endif + rules = "base"; + + /* Xkb default options. */ + XkbInitRules(&set, rules, "pc105", "us", NULL, NULL); XkbSetRulesDflts(&set); + XkbFreeRMLVOSet(&set, FALSE); xf86Info.useDefaultFontPath = TRUE; xf86Info.useDefaultFontPathFrom = X_DEFAULT; @@ -1577,8 +1591,11 @@ configLayout(serverLayoutPtr servlayoutp, XF86ConfLayoutPtr conf_layout, * 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, xf86configptr->conf_screen_lst, + if (!configScreen(slp[0].screen, screen, 0, X_CONFIG)) { free(slp[0].screen); free(slp); @@ -1674,7 +1691,7 @@ configLayout(serverLayoutPtr servlayoutp, XF86ConfLayoutPtr conf_layout, */ static Bool configImpliedLayout(serverLayoutPtr servlayoutp, XF86ConfScreenPtr conf_screen, - XF86ConfigPtr xf86configptr) + XF86ConfigPtr conf_ptr) { MessageType from; XF86ConfScreenPtr s; @@ -1719,7 +1736,7 @@ configImpliedLayout(serverLayoutPtr servlayoutp, XF86ConfScreenPtr conf_screen, memset(&layout, 0, sizeof(layout)); layout.lay_identifier = servlayoutp->id; - if (xf86layoutAddInputDevices(xf86configptr, &layout) > 0) { + if (xf86layoutAddInputDevices(conf_ptr, &layout) > 0) { if (!configInputDevices(&layout, servlayoutp)) return FALSE; from = X_DEFAULT; @@ -1818,7 +1835,7 @@ configScreen(confScreenPtr screenp, XF86ConfScreenPtr conf_screen, int scrnum, * 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)) { - 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); } @@ -2348,9 +2365,10 @@ checkInput(serverLayoutPtr layout, Bool implicit_layout) ConfigStatus xf86HandleConfigFile(Bool autoconfig) { - char *scanptr; + const char *scanptr; Bool singlecard = 0; Bool implicit_layout = FALSE; + XF86ConfLayoutPtr layout; if (!autoconfig) { char *filename, *dirname, *sysdirname; @@ -2426,14 +2444,17 @@ xf86HandleConfigFile(Bool autoconfig) */ /* 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 (xf86configptr->conf_layout_lst == NULL || xf86ScreenName != NULL) { 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, - xf86configptr->conf_screen_lst, + screen, xf86configptr)) { xf86Msg(X_ERROR, "Unable to determine the screen layout\n"); return CONFIG_PARSE_ERROR; @@ -2443,21 +2464,18 @@ xf86HandleConfigFile(Bool autoconfig) else { if (xf86configptr->conf_flags != NULL) { char *dfltlayout = NULL; - pointer optlist = xf86configptr->conf_flags->flg_option_lst; + void *optlist = xf86configptr->conf_flags->flg_option_lst; if (optlist && xf86FindOption(optlist, "defaultserverlayout")) dfltlayout = xf86SetStrOption(optlist, "defaultserverlayout", NULL); - if (!configLayout - (&xf86ConfigLayout, xf86configptr->conf_layout_lst, - dfltlayout)) { + if (!configLayout(&xf86ConfigLayout, layout, dfltlayout)) { xf86Msg(X_ERROR, "Unable to determine the screen layout\n"); return CONFIG_PARSE_ERROR; } } else { - if (!configLayout(&xf86ConfigLayout, xf86configptr->conf_layout_lst, - NULL)) { + if (!configLayout(&xf86ConfigLayout, layout, NULL)) { xf86Msg(X_ERROR, "Unable to determine the screen layout\n"); return CONFIG_PARSE_ERROR; } diff --git a/xserver/hw/xfree86/common/xf86Config.h b/xserver/hw/xfree86/common/xf86Config.h index de06677c3..23fb383c3 100644 --- a/xserver/hw/xfree86/common/xf86Config.h +++ b/xserver/hw/xfree86/common/xf86Config.h @@ -59,10 +59,10 @@ typedef struct _ModuleDefault { /* * prototypes */ -char **xf86ModulelistFromConfig(pointer **); -char **xf86DriverlistFromConfig(void); -char **xf86DriverlistFromCompile(void); -char **xf86InputDriverlistFromConfig(void); +const char **xf86ModulelistFromConfig(void ***); +const char **xf86DriverlistFromConfig(void); +const char **xf86DriverlistFromCompile(void); +const char **xf86InputDriverlistFromConfig(void); Bool xf86BuiltinInputDriver(const char *); ConfigStatus xf86HandleConfigFile(Bool); diff --git a/xserver/hw/xfree86/common/xf86Configure.c b/xserver/hw/xfree86/common/xf86Configure.c index 9f67230f8..e5412ac3a 100644 --- a/xserver/hw/xfree86/common/xf86Configure.c +++ b/xserver/hw/xfree86/common/xf86Configure.c @@ -34,6 +34,7 @@ #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" @@ -80,6 +81,7 @@ xf86AddBusDeviceToConfigure(const char *driver, BusType bus, void *busData, int chipset) { int ret, i, j; + char *lower_driver; if (!xf86DoConfigure || !xf86DoConfigurePass1) return NULL; @@ -116,8 +118,9 @@ xf86AddBusDeviceToConfigure(const char *driver, BusType bus, void *busData, DevToConfig[i].iDriver = CurrentDriver; /* Fill in what we know, converting the driver name to lower case */ - DevToConfig[i].GDev.driver = xnfalloc(strlen(driver) + 1); - for (j = 0; (DevToConfig[i].GDev.driver[j] = tolower(driver[j])); j++); + 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 @@ -156,8 +159,8 @@ configureInputSection(void) parsePrologue(XF86ConfInputPtr, XF86ConfInputRec) - ptr->inp_identifier = "Keyboard0"; - ptr->inp_driver = "kbd"; + ptr->inp_identifier = xnfstrdup("Keyboard0"); + ptr->inp_driver = xnfstrdup("kbd"); ptr->list.next = NULL; /* Crude mechanism to auto-detect mouse (os dependent) */ @@ -172,17 +175,17 @@ configureInputSection(void) } mouse = calloc(1, sizeof(XF86ConfInputRec)); - mouse->inp_identifier = "Mouse0"; - mouse->inp_driver = "mouse"; + mouse->inp_identifier = xnfstrdup("Mouse0"); + mouse->inp_driver = xnfstrdup("mouse"); mouse->inp_option_lst = - xf86addNewOption(mouse->inp_option_lst, strdup("Protocol"), - strdup(DFLT_MOUSE_PROTO)); + xf86addNewOption(mouse->inp_option_lst, xnfstrdup("Protocol"), + xnfstrdup(DFLT_MOUSE_PROTO)); mouse->inp_option_lst = - xf86addNewOption(mouse->inp_option_lst, strdup("Device"), - strdup(DFLT_MOUSE_DEV)); + xf86addNewOption(mouse->inp_option_lst, xnfstrdup("Device"), + xnfstrdup(DFLT_MOUSE_DEV)); mouse->inp_option_lst = - xf86addNewOption(mouse->inp_option_lst, strdup("ZAxisMapping"), - strdup("4 5 6 7")); + xf86addNewOption(mouse->inp_option_lst, xnfstrdup("ZAxisMapping"), + xnfstrdup("4 5 6 7")); ptr = (XF86ConfInputPtr) xf86addListItem((glp) ptr, (glp) mouse); return ptr; } @@ -192,24 +195,28 @@ configureScreenSection(int screennum) { int i; int depths[] = { 1, 4, 8, 15, 16, 24 /*, 32 */ }; + char *tmp; parsePrologue(XF86ConfScreenPtr, XF86ConfScreenRec) - XNFasprintf(&ptr->scrn_identifier, "Screen%d", screennum); - XNFasprintf(&ptr->scrn_monitor_str, "Monitor%d", screennum); - XNFasprintf(&ptr->scrn_device_str, "Card%d", screennum); + 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 < sizeof(depths) / sizeof(depths[0]); i++) { - XF86ConfDisplayPtr display; + XF86ConfDisplayPtr conf_display; - display = calloc(1, sizeof(XF86ConfDisplayRec)); - display->disp_depth = depths[i]; - display->disp_black.red = display->disp_white.red = -1; - display->disp_black.green = display->disp_white.green = -1; - display->disp_black.blue = display->disp_white.blue = -1; + 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) - display); + conf_display); } return ptr; @@ -245,12 +252,14 @@ configureDeviceSection(int screennum) { OptionInfoPtr p; int i = 0; + char *identifier; parsePrologue(XF86ConfDevicePtr, XF86ConfDeviceRec) /* Move device info to parser structure */ - if (asprintf(&ptr->dev_identifier, "Card%d", screennum) == -1) - ptr->dev_identifier = NULL; + 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; @@ -281,7 +290,7 @@ configureDeviceSection(int screennum) " ### <string>: \"String\", <freq>: \"<f> Hz/kHz/MHz\",\n" " ### <percent>: \"<f>%\"\n" " ### [arg]: arg optional\n"; - ptr->dev_comment = strdup(descrip); + ptr->dev_comment = xnfstrdup(descrip); if (ptr->dev_comment) { for (p = DevToConfig[screennum].GDev.options; p->name != NULL; p++) { char *p_e; @@ -328,9 +337,9 @@ configureLayoutSection(void) iptr = malloc(sizeof(XF86ConfInputrefRec)); iptr->list.next = NULL; iptr->iref_option_lst = NULL; - iptr->iref_inputdev_str = "Mouse0"; + iptr->iref_inputdev_str = xnfstrdup("Mouse0"); iptr->iref_option_lst = - xf86addNewOption(iptr->iref_option_lst, strdup("CorePointer"), + xf86addNewOption(iptr->iref_option_lst, xnfstrdup("CorePointer"), NULL); ptr->lay_input_lst = (XF86ConfInputrefPtr) xf86addListItem((glp) ptr->lay_input_lst, (glp) iptr); @@ -342,9 +351,9 @@ configureLayoutSection(void) iptr = malloc(sizeof(XF86ConfInputrefRec)); iptr->list.next = NULL; iptr->iref_option_lst = NULL; - iptr->iref_inputdev_str = "Keyboard0"; + iptr->iref_inputdev_str = xnfstrdup("Keyboard0"); iptr->iref_option_lst = - xf86addNewOption(iptr->iref_option_lst, strdup("CoreKeyboard"), + xf86addNewOption(iptr->iref_option_lst, xnfstrdup("CoreKeyboard"), NULL); ptr->lay_input_lst = (XF86ConfInputrefPtr) xf86addListItem((glp) ptr->lay_input_lst, (glp) iptr); @@ -352,20 +361,23 @@ configureLayoutSection(void) 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(&aptr->adj_screen_str, "Screen%d", 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(&aptr->adj_refscreen, "Screen%d", scrnum - 1); + XNFasprintf(&tmp, "Screen%d", scrnum - 1); + aptr->adj_refscreen = tmp; } ptr->lay_adjacency_lst = (XF86ConfAdjacencyPtr) xf86addListItem((glp) ptr->lay_adjacency_lst, @@ -386,7 +398,7 @@ configureFlagsSection(void) static XF86ConfModulePtr configureModuleSection(void) { - char **elist, **el; + const char **elist, **el; /* Find the list of extension & font modules. */ const char *esubdirs[] = { @@ -419,9 +431,9 @@ configureFilesSection(void) parsePrologue(XF86ConfFilesPtr, XF86ConfFilesRec) if (xf86ModulePath) - ptr->file_modulepath = strdup(xf86ModulePath); + ptr->file_modulepath = xnfstrdup(xf86ModulePath); if (defaultFontPath) - ptr->file_fontpath = strdup(defaultFontPath); + ptr->file_fontpath = xnfstrdup(defaultFontPath); return ptr; } @@ -429,11 +441,13 @@ configureFilesSection(void) static XF86ConfMonitorPtr configureMonitorSection(int screennum) { + char *tmp; parsePrologue(XF86ConfMonitorPtr, XF86ConfMonitorRec) - XNFasprintf(&ptr->mon_identifier, "Monitor%d", screennum); - ptr->mon_vendor = strdup("Monitor Vendor"); - ptr->mon_modelname = strdup("Monitor Model"); + XNFasprintf(&tmp, "Monitor%d", screennum); + ptr->mon_identifier = tmp; + ptr->mon_vendor = xnfstrdup("Monitor Vendor"); + ptr->mon_modelname = xnfstrdup("Monitor Model"); return ptr; } @@ -471,11 +485,13 @@ configureDDCMonitorSection(int screennum) #define displaySizeMaxLen 80 char displaySize_string[displaySizeMaxLen]; int displaySizeLen; + char *tmp; parsePrologue(XF86ConfMonitorPtr, XF86ConfMonitorRec) - XNFasprintf(&ptr->mon_identifier, "Monitor%d", screennum); - ptr->mon_vendor = strdup(ConfiguredMonitor->vendor.name); + 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 */ @@ -513,7 +529,7 @@ configureDDCMonitorSection(int screennum) if (ConfiguredMonitor->features.dpms) { ptr->mon_option_lst = - xf86addNewOption(ptr->mon_option_lst, strdup("DPMS"), NULL); + xf86addNewOption(ptr->mon_option_lst, xnfstrdup("DPMS"), NULL); } return ptr; @@ -527,7 +543,7 @@ DoConfigure(void) char filename[PATH_MAX]; const char *addslash = ""; XF86ConfigPtr xf86config = NULL; - char **vlist, **vl; + const char **vlist, **vl; int *dev2screen; vlist = xf86DriverlistFromCompile(); @@ -569,24 +585,24 @@ DoConfigure(void) /* Add device, monitor and screen sections for detected devices */ for (screennum = 0; screennum < nDevToConfig; screennum++) { - XF86ConfDevicePtr DevicePtr; - XF86ConfMonitorPtr MonitorPtr; - XF86ConfScreenPtr ScreenPtr; + XF86ConfDevicePtr device_ptr; + XF86ConfMonitorPtr monitor_ptr; + XF86ConfScreenPtr screen_ptr; - DevicePtr = configureDeviceSection(screennum); + device_ptr = configureDeviceSection(screennum); xf86config->conf_device_lst = (XF86ConfDevicePtr) xf86addListItem((glp) xf86config-> conf_device_lst, (glp) - DevicePtr); - MonitorPtr = configureMonitorSection(screennum); - xf86config->conf_monitor_lst = (XF86ConfMonitorPtr) xf86addListItem((glp) xf86config->conf_monitor_lst, (glp) MonitorPtr); - ScreenPtr = configureScreenSection(screennum); + 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) - ScreenPtr); + screen_ptr); } xf86config->conf_files = configureFilesSection(); @@ -697,27 +713,27 @@ DoConfigure(void) xf86freeScreenList(xf86config->conf_screen_lst); xf86config->conf_screen_lst = NULL; for (j = 0; j < xf86NumScreens; j++) { - XF86ConfMonitorPtr MonitorPtr; - XF86ConfScreenPtr ScreenPtr; + XF86ConfMonitorPtr monitor_ptr; + XF86ConfScreenPtr screen_ptr; ConfiguredMonitor = NULL; if ((*xf86Screens[dev2screen[j]]->PreInit) (xf86Screens[dev2screen[j]], PROBE_DETECT) && ConfiguredMonitor) { - MonitorPtr = configureDDCMonitorSection(j); + monitor_ptr = configureDDCMonitorSection(j); } else { - MonitorPtr = configureMonitorSection(j); + monitor_ptr = configureMonitorSection(j); } - ScreenPtr = configureScreenSection(j); + screen_ptr = configureScreenSection(j); - xf86config->conf_monitor_lst = (XF86ConfMonitorPtr) xf86addListItem((glp) xf86config->conf_monitor_lst, (glp) MonitorPtr); + 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) - ScreenPtr); + screen_ptr); } if (xf86writeConfigFile(filename, xf86config) == 0) { @@ -766,7 +782,7 @@ void DoShowOptions(void) { int i = 0; - char **vlist = 0; + const char **vlist = NULL; char *pSymbol = 0; XF86ModuleData *initData = 0; diff --git a/xserver/hw/xfree86/common/xf86DGA.c b/xserver/hw/xfree86/common/xf86DGA.c index 6a05ce536..b9e1e3f88 100644 --- a/xserver/hw/xfree86/common/xf86DGA.c +++ b/xserver/hw/xfree86/common/xf86DGA.c @@ -450,7 +450,7 @@ xf86SetDGAMode(ScrnInfoPtr pScrn, int num, DGADevicePtr devRet) pMode->pixmapHeight, pMode->depth, pMode->bitsPerPixel, pMode->bytesPerScanline, - (pointer) (pMode->address)); + (void *) (pMode->address)); } } @@ -1214,7 +1214,7 @@ DGAHandleEvent(int screen_num, InternalEvent *ev, DeviceIntPtr device) static void XDGAResetProc(ExtensionEntry * extEntry); -static void DGAClientStateChange(CallbackListPtr *, pointer, pointer); +static void DGAClientStateChange(CallbackListPtr *, void *, void *); static DevPrivateKeyRec DGAScreenPrivateKeyRec; @@ -1404,7 +1404,7 @@ ProcXDGAQueryModes(ClientPtr client) } static void -DGAClientStateChange(CallbackListPtr *pcbl, pointer nulldata, pointer calldata) +DGAClientStateChange(CallbackListPtr *pcbl, void *nulldata, void *calldata) { NewClientInfoRec *pci = (NewClientInfoRec *) calldata; ClientPtr client = NULL; @@ -1484,7 +1484,7 @@ ProcXDGASetMode(ClientPtr client) DGA_SETCLIENT(stuff->screen, client); if (pPix) { - if (AddResource(stuff->pid, RT_PIXMAP, (pointer) (pPix))) { + if (AddResource(stuff->pid, RT_PIXMAP, (void *) (pPix))) { pPix->drawable.id = (int) stuff->pid; rep.flags = DGA_PIXMAP_AVAILABLE; } @@ -1562,7 +1562,7 @@ ProcXDGAInstallColormap(ClientPtr client) REQUEST_SIZE_MATCH(xXDGAInstallColormapReq); - rc = dixLookupResourceByType((pointer *) &cmap, stuff->cmap, RT_COLORMAP, + rc = dixLookupResourceByType((void **) &cmap, stuff->cmap, RT_COLORMAP, client, DixInstallAccess); if (rc != Success) return rc; @@ -1991,7 +1991,7 @@ ProcXF86DGAInstallColormap(ClientPtr client) if (!DGAActive(stuff->screen)) return DGAErrorBase + XF86DGADirectNotActivated; - rc = dixLookupResourceByType((pointer *) &pcmp, stuff->id, RT_COLORMAP, + rc = dixLookupResourceByType((void **) &pcmp, stuff->id, RT_COLORMAP, client, DixInstallAccess); if (rc == Success) { DGAInstallCmap(pcmp); diff --git a/xserver/hw/xfree86/common/xf86DPMS.c b/xserver/hw/xfree86/common/xf86DPMS.c index 881cb2773..2b5a3ed1e 100644 --- a/xserver/hw/xfree86/common/xf86DPMS.c +++ b/xserver/hw/xfree86/common/xf86DPMS.c @@ -60,7 +60,7 @@ xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags) #ifdef DPMSExtension ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); DPMSPtr pDPMS; - pointer DPMSOpt; + void *DPMSOpt; MessageType enabled_from; DPMSKey = &DPMSKeyRec; @@ -166,7 +166,7 @@ DPMSSet(ClientPtr client, int level) return rc; } } else if (!xf86IsUnblank(screenIsSaved)) { - rc = dixSaveScreens(client, SCREEN_SAVER_FORCER, ScreenSaverReset); + rc = dixSaveScreens(client, SCREEN_SAVER_OFF, ScreenSaverReset); if (rc != Success) return rc; } diff --git a/xserver/hw/xfree86/common/xf86Events.c b/xserver/hw/xfree86/common/xf86Events.c index d0b14314b..35a673d15 100644 --- a/xserver/hw/xfree86/common/xf86Events.c +++ b/xserver/hw/xfree86/common/xf86Events.c @@ -56,6 +56,7 @@ #include <X11/X.h> #include <X11/Xpoll.h> #include <X11/Xproto.h> +#include <X11/Xatom.h> #include "misc.h" #include "compiler.h" #include "xf86.h" @@ -85,6 +86,8 @@ #endif #include "xf86platformBus.h" +#include "systemd-logind.h" + /* * This is a toggling variable: * FALSE = No VT switching keys have been pressed last time around @@ -114,7 +117,7 @@ static void xf86VTSwitch(void); typedef struct x_IHRec { int fd; InputHandlerProc ihproc; - pointer data; + void *data; Bool enabled; Bool is_input; struct x_IHRec *next; @@ -243,7 +246,7 @@ xf86ProcessActionEvent(ActionEvent action, void *arg) /* ARGSUSED */ void -xf86Wakeup(pointer blockData, int err, pointer pReadmask) +xf86Wakeup(void *blockData, int err, void *pReadmask) { fd_set *LastSelectMask = (fd_set *) pReadmask; fd_set devicesWithInput; @@ -407,184 +410,233 @@ xf86ReleaseKeys(DeviceIntPtr pDev) } } +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; +} + /* - * xf86VTSwitch -- - * Handle requests for switching the vt. + * 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 -xf86VTSwitch(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++) { + ChangeWindowProperty(xf86ScrnToScreen(xf86Screens[i])->root, + property_name, XA_INTEGER, 32, + PropModeReplace, 1, &value, TRUE); + } +} + +void +xf86VTLeave(void) { int i; InputInfoPtr pInfo; IHPtr ih; - DebugF("xf86VTSwitch()\n"); - -#ifdef XFreeXDGA - if (!DGAVTSwitch()) - return; + 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); + } /* - * Since all screens are currently all in the same state it is sufficient - * check the first. This might change in future. + * Keep the order: Disable Device > LeaveVT + * EnterVT > EnableDevice */ - if (xf86VTOwner()) { + 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); - DebugF("xf86VTSwitch: Leaving, xf86Exiting is %s\n", - BOOLTOSTRING((dispatchException & DE_TERMINATE) ? TRUE : FALSE)); -#ifdef DPMSExtension - if (DPMSPowerLevel != DPMSModeOn) - DPMSSet(serverClient, DPMSModeOn); + OsBlockSIGIO(); + for (i = 0; i < xf86NumScreens; i++) + xf86Screens[i]->LeaveVT(xf86Screens[i]); + for (i = 0; i < xf86NumGPUScreens; i++) + xf86GPUScreens[i]->LeaveVT(xf86GPUScreens[i]); + + xf86AccessLeave(); /* We need this here, otherwise */ + + if (!xf86VTSwitchAway()) + goto switch_failed; + +#ifdef XF86PM + if (xf86OSPMClose) + xf86OSPMClose(); + xf86OSPMClose = NULL; #endif - for (i = 0; i < xf86NumScreens; i++) { - if (!(dispatchException & DE_TERMINATE)) - if (xf86Screens[i]->EnableDisableFBAccess) - (*xf86Screens[i]->EnableDisableFBAccess) (xf86Screens[i], FALSE); - } + for (i = 0; i < xf86NumScreens; i++) { /* - * Keep the order: Disable Device > LeaveVT - * EnterVT > EnableDevice + * zero all access functions to + * trap calls when switched away. */ - for (ih = InputHandlers; ih; ih = ih->next) { - if (ih->is_input) - xf86DisableInputHandler(ih); - else - xf86DisableGeneralHandler(ih); - } - for (pInfo = xf86InputDevs; pInfo; pInfo = pInfo->next) { - if (pInfo->dev) { - if (!pInfo->dev->enabled) - pInfo->flags |= XI86_DEVICE_DISABLED; - xf86ReleaseKeys(pInfo->dev); - ProcessInputEvents(); - DisableDevice(pInfo->dev, TRUE); - } - } + xf86Screens[i]->vtSema = FALSE; + } + if (xorgHWAccess) + xf86DisableIO(); - OsBlockSIGIO(); - for (i = 0; i < xf86NumScreens; i++) - xf86Screens[i]->LeaveVT(xf86Screens[i]); - for (i = 0; i < xf86NumGPUScreens; i++) - xf86GPUScreens[i]->LeaveVT(xf86GPUScreens[i]); + xf86UpdateHasVTProperty(FALSE); - xf86AccessLeave(); /* We need this here, otherwise */ + return; - if (!xf86VTSwitchAway()) { - /* - * switch failed - */ +switch_failed: + DebugF("xf86VTSwitch: Leave failed\n"); + xf86AccessEnter(); + 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); + } + OsReleaseSIGIO(); +} - DebugF("xf86VTSwitch: Leave failed\n"); - xf86AccessEnter(); - 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); +void +xf86VTEnter(void) +{ + int i; + InputInfoPtr pInfo; + IHPtr ih; - pInfo = xf86InputDevs; - while (pInfo) { - if (pInfo->dev && (pInfo->flags & XI86_DEVICE_DISABLED) == 0) - EnableDevice(pInfo->dev, TRUE); - pInfo->flags &= ~XI86_DEVICE_DISABLED; - pInfo = pInfo->next; - } - for (ih = InputHandlers; ih; ih = ih->next) { - if (ih->is_input) - xf86EnableInputHandler(ih); - else - xf86EnableGeneralHandler(ih); - } - OsReleaseSIGIO(); + DebugF("xf86VTSwitch: Entering\n"); + if (!xf86VTSwitchTo()) + return; - } - else { #ifdef XF86PM - if (xf86OSPMClose) - xf86OSPMClose(); - xf86OSPMClose = NULL; + xf86OSPMClose = xf86OSPMOpen(); #endif - for (i = 0; i < xf86NumScreens; i++) { - /* - * zero all access functions to - * trap calls when switched away. - */ - xf86Screens[i]->vtSema = FALSE; - } - if (xorgHWAccess) - xf86DisableIO(); - } + if (xorgHWAccess) + xf86EnableIO(); + xf86AccessEnter(); + 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); } - else { - DebugF("xf86VTSwitch: Entering\n"); - if (!xf86VTSwitchTo()) - return; -#ifdef XF86PM - xf86OSPMClose = xf86OSPMOpen(); + /* Turn screen saver off when switching back */ + dixSaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset); + + /* If we use systemd-logind it will enable input devices for us */ + if (!systemd_logind_controls_session()) + 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); + } +#ifdef XSERVER_PLATFORM_BUS + /* check for any new output devices */ + xf86platformVTProbe(); #endif - if (xorgHWAccess) - xf86EnableIO(); - xf86AccessEnter(); - 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); - } + xf86UpdateHasVTProperty(TRUE); - /* Turn screen saver off when switching back */ - dixSaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset); + OsReleaseSIGIO(); +} - pInfo = xf86InputDevs; - while (pInfo) { - if (pInfo->dev && (pInfo->flags & XI86_DEVICE_DISABLED) == 0) - EnableDevice(pInfo->dev, TRUE); - pInfo->flags &= ~XI86_DEVICE_DISABLED; - pInfo = pInfo->next; - } +/* + * xf86VTSwitch -- + * Handle requests for switching the vt. + */ +static void +xf86VTSwitch(void) +{ + DebugF("xf86VTSwitch()\n"); - 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(); +#ifdef XFreeXDGA + if (!DGAVTSwitch()) + return; #endif - OsReleaseSIGIO(); - } + /* + * 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 pointer -addInputHandler(int fd, InputHandlerProc proc, pointer data) +static void * +addInputHandler(int fd, InputHandlerProc proc, void *data) { IHPtr ih; @@ -606,8 +658,8 @@ addInputHandler(int fd, InputHandlerProc proc, pointer data) return ih; } -pointer -xf86AddInputHandler(int fd, InputHandlerProc proc, pointer data) +void * +xf86AddInputHandler(int fd, InputHandlerProc proc, void *data) { IHPtr ih = addInputHandler(fd, proc, data); @@ -618,8 +670,8 @@ xf86AddInputHandler(int fd, InputHandlerProc proc, pointer data) return ih; } -pointer -xf86AddGeneralHandler(int fd, InputHandlerProc proc, pointer data) +void * +xf86AddGeneralHandler(int fd, InputHandlerProc proc, void *data) { IHPtr ih = addInputHandler(fd, proc, data); @@ -634,7 +686,7 @@ xf86AddGeneralHandler(int fd, InputHandlerProc proc, pointer data) * proc may be NULL if the server should not handle events on the console. */ InputHandlerProc -xf86SetConsoleHandler(InputHandlerProc proc, pointer data) +xf86SetConsoleHandler(InputHandlerProc proc, void *data) { static IHPtr handler = NULL; InputHandlerProc old_proc = NULL; @@ -667,7 +719,7 @@ removeInputHandler(IHPtr ih) } int -xf86RemoveInputHandler(pointer handler) +xf86RemoveInputHandler(void *handler) { IHPtr ih; int fd; @@ -686,7 +738,7 @@ xf86RemoveInputHandler(pointer handler) } int -xf86RemoveGeneralHandler(pointer handler) +xf86RemoveGeneralHandler(void *handler) { IHPtr ih; int fd; @@ -705,7 +757,7 @@ xf86RemoveGeneralHandler(pointer handler) } void -xf86DisableInputHandler(pointer handler) +xf86DisableInputHandler(void *handler) { IHPtr ih; @@ -719,7 +771,7 @@ xf86DisableInputHandler(pointer handler) } void -xf86DisableGeneralHandler(pointer handler) +xf86DisableGeneralHandler(void *handler) { IHPtr ih; @@ -733,7 +785,7 @@ xf86DisableGeneralHandler(pointer handler) } void -xf86EnableInputHandler(pointer handler) +xf86EnableInputHandler(void *handler) { IHPtr ih; @@ -747,7 +799,7 @@ xf86EnableInputHandler(pointer handler) } void -xf86EnableGeneralHandler(pointer handler) +xf86EnableGeneralHandler(void *handler) { IHPtr ih; diff --git a/xserver/hw/xfree86/common/xf86Extensions.c b/xserver/hw/xfree86/common/xf86Extensions.c index f9e791607..25b2bc3d0 100644 --- a/xserver/hw/xfree86/common/xf86Extensions.c +++ b/xserver/hw/xfree86/common/xf86Extensions.c @@ -89,7 +89,6 @@ load_extension_config(void) { XF86ConfModulePtr mod_con = xf86configptr->conf_modules; XF86LoadPtr modp; - int i; /* Only the best. */ if (!mod_con) @@ -133,10 +132,7 @@ load_extension_config(void) void xf86ExtensionInit(void) { - int i; - load_extension_config(); - for (i = 0; i < ARRAY_SIZE(extensionModules); i++) - LoadExtension(&extensionModules[i], TRUE); + LoadExtensionList(extensionModules, ARRAY_SIZE(extensionModules), TRUE); } diff --git a/xserver/hw/xfree86/common/xf86Globals.c b/xserver/hw/xfree86/common/xf86Globals.c index 7df7a80c4..984c39bca 100644 --- a/xserver/hw/xfree86/common/xf86Globals.c +++ b/xserver/hw/xfree86/common/xf86Globals.c @@ -143,7 +143,7 @@ const char *xf86ConfigFile = NULL; const char *xf86ConfigDir = NULL; const char *xf86ModulePath = DEFAULT_MODULE_PATH; MessageType xf86ModPathFrom = X_DEFAULT; -const char *xf86LogFile = DEFAULT_LOGPREFIX; +const char *xf86LogFile = DEFAULT_LOGDIR "/" DEFAULT_LOGPREFIX; MessageType xf86LogFileFrom = X_DEFAULT; Bool xf86LogFileWasOpened = FALSE; serverLayoutRec xf86ConfigLayout = { NULL, }; diff --git a/xserver/hw/xfree86/common/xf86Helper.c b/xserver/hw/xfree86/common/xf86Helper.c index 676cc8062..e2b32a074 100644 --- a/xserver/hw/xfree86/common/xf86Helper.c +++ b/xserver/hw/xfree86/common/xf86Helper.c @@ -67,7 +67,7 @@ static int xf86ScrnInfoPrivateCount = 0; /* Add a pointer to a new DriverRec to xf86DriverList */ void -xf86AddDriver(DriverPtr driver, pointer module, int flags) +xf86AddDriver(DriverPtr driver, void *module, int flags) { /* Don't add null entries */ if (!driver) @@ -107,7 +107,7 @@ xf86DeleteDriver(int drvIndex) /* Add a pointer to a new InputDriverRec to xf86InputDriverList */ void -xf86AddInputDriver(InputDriverPtr driver, pointer module, int flags) +xf86AddInputDriver(InputDriverPtr driver, void *module, int flags) { /* Don't add null entries */ if (!driver) @@ -422,7 +422,6 @@ xf86SetDepthBpp(ScrnInfoPtr scrp, int depth, int dummy, int fbbpp, * Check for DefaultDepth and DefaultFbBpp options in the * Device sections. */ - int i; GDevPtr device; Bool found = FALSE; @@ -1069,9 +1068,7 @@ void xf86EnableDisableFBAccess(ScrnInfoPtr pScrnInfo, Bool enable) { ScreenPtr pScreen = pScrnInfo->pScreen; - PixmapPtr pspix; - pspix = (*pScreen->GetScreenPixmap) (pScreen); if (enable) { /* * Restore all of the clip lists on the screen @@ -1220,16 +1217,45 @@ xf86ErrorF(const char *format, ...) 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 *lf = NULL; + 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"); @@ -1532,15 +1558,15 @@ xf86DisableRandR(void) } CARD32 -xf86GetModuleVersion(pointer module) +xf86GetModuleVersion(void *module) { return (CARD32) LoaderGetModuleVersion(module); } -pointer +void * xf86LoadDrvSubModule(DriverPtr drv, const char *name) { - pointer ret; + void *ret; int errmaj = 0, errmin = 0; ret = LoadSubModule(drv->module, name, NULL, NULL, NULL, NULL, @@ -1550,10 +1576,10 @@ xf86LoadDrvSubModule(DriverPtr drv, const char *name) return ret; } -pointer +void * xf86LoadSubModule(ScrnInfoPtr pScrn, const char *name) { - pointer ret; + void *ret; int errmaj = 0, errmin = 0; ret = LoadSubModule(pScrn->module, name, NULL, NULL, NULL, NULL, @@ -1566,12 +1592,12 @@ xf86LoadSubModule(ScrnInfoPtr pScrn, const char *name) /* * xf86LoadOneModule loads a single module. */ -pointer -xf86LoadOneModule(char *name, pointer opt) +void * +xf86LoadOneModule(const char *name, void *opt) { int errmaj, errmin; char *Name; - pointer mod; + void *mod; if (!name) return NULL; @@ -1595,7 +1621,7 @@ xf86LoadOneModule(char *name, pointer opt) } void -xf86UnloadSubModule(pointer mod) +xf86UnloadSubModule(void *mod) { UnloadSubModule(mod); } @@ -1698,9 +1724,9 @@ xf86SetSilkenMouse(ScreenPtr pScreen) /* Wrote this function for the PM2 Xv driver, preliminary. */ -pointer -xf86FindXvOptions(ScrnInfoPtr pScrn, int adaptor_index, char *port_name, - char **adaptor_name, pointer *adaptor_options) +void * +xf86FindXvOptions(ScrnInfoPtr pScrn, int adaptor_index, const char *port_name, + const char **adaptor_name, void **adaptor_options) { confXvAdaptorPtr adaptor; int i; @@ -1732,7 +1758,7 @@ xf86FindXvOptions(ScrnInfoPtr pScrn, int adaptor_index, char *port_name, static void xf86ConfigFbEntityInactive(EntityInfoPtr pEnt, EntityProc init, - EntityProc enter, EntityProc leave, pointer private) + EntityProc enter, EntityProc leave, void *private) { ScrnInfoPtr pScrn; @@ -1744,7 +1770,7 @@ xf86ConfigFbEntityInactive(EntityInfoPtr pEnt, EntityProc init, ScrnInfoPtr xf86ConfigFbEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex, EntityProc init, EntityProc enter, EntityProc leave, - pointer private) + void *private) { EntityInfoPtr pEnt = xf86GetEntityInfo(entityIndex); @@ -1786,7 +1812,7 @@ xf86IsScreenPrimary(ScrnInfoPtr pScrn) int xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type, - int format, unsigned long len, pointer value) + int format, unsigned long len, void *value) { RootWinPropPtr pNewProp = NULL, pRegProp; Bool existing = FALSE; @@ -1818,7 +1844,7 @@ xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type, pNewProp->next = NULL; } else { - free(pNewProp->name); + free((void *) pNewProp->name); existing = TRUE; } diff --git a/xserver/hw/xfree86/common/xf86InPriv.h b/xserver/hw/xfree86/common/xf86InPriv.h index 5826ac388..b8229d2c1 100644 --- a/xserver/hw/xfree86/common/xf86InPriv.h +++ b/xserver/hw/xfree86/common/xf86InPriv.h @@ -37,7 +37,4 @@ extern InputDriverPtr *xf86InputDriverList; extern int xf86NumInputDrivers; -/* xf86Helper.c */ -InputDriverPtr xf86LookupInputDriver(const char *name); - #endif /* _xf86InPriv_h */ diff --git a/xserver/hw/xfree86/common/xf86Init.c b/xserver/hw/xfree86/common/xf86Init.c index bad9128b9..bb5d8256c 100644 --- a/xserver/hw/xfree86/common/xf86Init.c +++ b/xserver/hw/xfree86/common/xf86Init.c @@ -53,6 +53,8 @@ #include "scrnintstr.h" #include "site.h" #include "mi.h" +#include "dbus-core.h" +#include "systemd-logind.h" #include "compiler.h" @@ -313,7 +315,7 @@ xf86CreateRootWindow(WindowPtr pWin) int err = Success; ScreenPtr pScreen = pWin->drawable.pScreen; RootWinPropPtr pProp; - CreateWindowProcPtr CreateWindow = (CreateWindowProcPtr) + CreateWindowProcPtr create_window = (CreateWindowProcPtr) dixLookupPrivate(&pScreen->devPrivates, xf86CreateRootWindowKey); DebugF("xf86CreateRootWindow(%p)\n", pWin); @@ -327,7 +329,7 @@ xf86CreateRootWindow(WindowPtr pWin) } /* Unhook this function ... */ - pScreen->CreateWindow = CreateWindow; + pScreen->CreateWindow = create_window; dixSetPrivate(&pScreen->devPrivates, xf86CreateRootWindowKey, NULL); /* ... and call the previous CreateWindow fuction, if any */ @@ -389,6 +391,11 @@ InstallSignalHandlers(void) } } +/* The memory storing the initial value of the XFree86_has_VT root window + * property. This has to remain available until server start-up, so we just + * use a global. */ +static CARD32 HasVTValue = 1; + /* * InitOutput -- * Initialize screenInfo for all actually accessible framebuffers. @@ -399,8 +406,8 @@ void InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv) { int i, j, k, scr_index; - char **modulelist; - pointer *optionlist; + const char **modulelist; + void **optionlist; Pix24Flags screenpix24, pix24; MessageType pix24From = X_DEFAULT; Bool pix24Fail = FALSE; @@ -460,6 +467,9 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv) if (xf86DoShowOptions) DoShowOptions(); + dbus_core_init(); + systemd_logind_init(); + /* Do a general bus probe. This will be a PCI probe for x86 platforms */ xf86BusProbe(); @@ -548,7 +558,8 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv) if (NEED_IO_ENABLED(flags)) want_hw_access = TRUE; - if (!(flags & HW_SKIP_CONSOLE)) + /* Non-seat0 X servers should not open console */ + if (!(flags & HW_SKIP_CONSOLE) && !ServerIsNotSeat0()) xorgHWOpenConsole = TRUE; } @@ -627,7 +638,9 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv) for (i = 0; i < xf86NumScreens; i++) { if (xf86Screens[i]->name == NULL) { - XNFasprintf(&xf86Screens[i]->name, "screen%d", i); + char *tmp; + XNFasprintf(&tmp, "screen%d", i); + xf86Screens[i]->name = tmp; xf86MsgVerb(X_WARNING, 0, "Screen driver %d has no name set, using `%s'.\n", i, xf86Screens[i]->name); @@ -727,7 +740,9 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv) if (xf86Info.vtno >= 0) { #define VT_ATOM_NAME "XFree86_VT" Atom VTAtom = -1; + Atom HasVTAtom = -1; CARD32 *VT = NULL; + CARD32 *HasVT = &HasVTValue; int ret; /* This memory needs to stay available until the screen has been @@ -740,6 +755,8 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv) *VT = xf86Info.vtno; VTAtom = MakeAtom(VT_ATOM_NAME, sizeof(VT_ATOM_NAME) - 1, TRUE); + HasVTAtom = MakeAtom(HAS_VT_ATOM_NAME, + sizeof(HAS_VT_ATOM_NAME) - 1, TRUE); for (i = 0, ret = Success; i < xf86NumScreens && ret == Success; i++) { @@ -747,9 +764,14 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char **argv) xf86RegisterRootWindowProperty(xf86Screens[i]->scrnIndex, VTAtom, XA_INTEGER, 32, 1, VT); + if (ret == Success) + ret = xf86RegisterRootWindowProperty(xf86Screens[i] + ->scrnIndex, + HasVTAtom, XA_INTEGER, + 32, 1, HasVT); if (ret != Success) xf86DrvMsg(xf86Screens[i]->scrnIndex, X_WARNING, - "Failed to register VT property\n"); + "Failed to register VT properties\n"); } } @@ -1071,6 +1093,9 @@ ddxGiveUp(enum ExitCode error) if (xorgHWOpenConsole) xf86CloseConsole(); + systemd_logind_fini(); + dbus_core_fini(); + xf86CloseLog(error); /* If an unexpected signal was caught, dump a core for debugging */ @@ -1572,10 +1597,10 @@ ddxUseMsg(void) * xf86LoadModules iterates over a list that is being passed in. */ Bool -xf86LoadModules(char **list, pointer *optlist) +xf86LoadModules(const char **list, void **optlist) { int errmaj, errmin; - pointer opt; + void *opt; int i; char *name; Bool failed = FALSE; diff --git a/xserver/hw/xfree86/common/xf86Mode.c b/xserver/hw/xfree86/common/xf86Mode.c index 706ab64fc..44bc55953 100644 --- a/xserver/hw/xfree86/common/xf86Mode.c +++ b/xserver/hw/xfree86/common/xf86Mode.c @@ -1354,7 +1354,7 @@ scanLineWidth(unsigned int xsize, /* pixels */ int xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes, - char **modeNames, ClockRangePtr clockRanges, + 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) @@ -1998,7 +1998,7 @@ xf86DeleteMode(DisplayModePtr * modeList, DisplayModePtr mode) mode->next->prev = mode->prev; } - free(mode->name); + free((void *) mode->name); free(mode); } diff --git a/xserver/hw/xfree86/common/xf86Module.h b/xserver/hw/xfree86/common/xf86Module.h index 265b55348..b848f53f1 100644 --- a/xserver/hw/xfree86/common/xf86Module.h +++ b/xserver/hw/xfree86/common/xf86Module.h @@ -80,8 +80,8 @@ typedef enum { * mask is 0xFFFF0000. */ #define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 4) -#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(15, 0) -#define ABI_XINPUT_VERSION SET_ABI_VERSION(20, 0) +#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(18, 0) +#define ABI_XINPUT_VERSION SET_ABI_VERSION(21, 0) #define ABI_EXTENSION_VERSION SET_ABI_VERSION(8, 0) #define ABI_FONT_VERSION SET_ABI_VERSION(0, 6) @@ -170,13 +170,13 @@ typedef struct { #define INITARGS void /* Prototypes for Loader functions that are exported to modules */ -extern _X_EXPORT pointer LoadSubModule(pointer, const char *, const char **, - const char **, pointer, +extern _X_EXPORT void *LoadSubModule(void *, const char *, const char **, + const char **, void *, const XF86ModReqInfo *, int *, int *); -extern _X_EXPORT void UnloadSubModule(pointer); -extern _X_EXPORT void UnloadModule(pointer); -extern _X_EXPORT pointer LoaderSymbol(const char *); -extern _X_EXPORT char **LoaderListDirs(const char **, const char **); +extern _X_EXPORT void UnloadSubModule(void *); +extern _X_EXPORT void UnloadModule(void *); +extern _X_EXPORT void *LoaderSymbol(const char *); +extern _X_EXPORT const char **LoaderListDirs(const char **, const char **); extern _X_EXPORT void LoaderFreeDirList(char **); extern _X_EXPORT void LoaderErrorMsg(const char *, const char *, int, int); extern _X_EXPORT void LoaderGetOS(const char **name, int *major, int *minor, @@ -184,11 +184,11 @@ extern _X_EXPORT void LoaderGetOS(const char **name, int *major, int *minor, extern _X_EXPORT Bool LoaderShouldIgnoreABI(void); extern _X_EXPORT int LoaderGetABIVersion(const char *abiclass); -typedef pointer (*ModuleSetupProc) (pointer, pointer, int *, int *); -typedef void (*ModuleTearDownProc) (pointer); +typedef void *(*ModuleSetupProc) (void *, void *, int *, int *); +typedef void (*ModuleTearDownProc) (void *); -#define MODULESETUPPROTO(func) pointer func(pointer, pointer, int*, int*) -#define MODULETEARDOWNPROTO(func) void func(pointer) +#define MODULESETUPPROTO(func) void *func(void *, void *, int*, int*) +#define MODULETEARDOWNPROTO(func) void func(void *) typedef struct { XF86ModuleVersionInfo *vers; diff --git a/xserver/hw/xfree86/common/xf86Opt.h b/xserver/hw/xfree86/common/xf86Opt.h index c3ba2d75c..3be2a0fc7 100644 --- a/xserver/hw/xfree86/common/xf86Opt.h +++ b/xserver/hw/xfree86/common/xf86Opt.h @@ -39,7 +39,7 @@ typedef struct { typedef union { unsigned long num; - char *str; + const char *str; double realnum; Bool bool; OptFrequency freq; @@ -123,7 +123,7 @@ extern _X_EXPORT OptionInfoPtr xf86TokenToOptinfo(const OptionInfoRec * table, extern _X_EXPORT const char *xf86TokenToOptName(const OptionInfoRec * table, int token); extern _X_EXPORT Bool xf86IsOptionSet(const OptionInfoRec * table, int token); -extern _X_EXPORT char *xf86GetOptValString(const OptionInfoRec * table, +extern _X_EXPORT const char *xf86GetOptValString(const OptionInfoRec * table, int token); extern _X_EXPORT Bool xf86GetOptValInteger(const OptionInfoRec * table, int token, int *value); diff --git a/xserver/hw/xfree86/common/xf86Option.c b/xserver/hw/xfree86/common/xf86Option.c index 607c33354..0e8bc1f83 100644 --- a/xserver/hw/xfree86/common/xf86Option.c +++ b/xserver/hw/xfree86/common/xf86Option.c @@ -478,7 +478,8 @@ static Bool ParseOptionValue(int scrnIndex, XF86OptionPtr options, OptionInfoPtr p, Bool markUsed) { - char *s, *end; + const char *s; + char *end; Bool wasUsed = FALSE; if ((s = xf86findOptionValue(options, p->name)) != NULL) { @@ -755,7 +756,7 @@ xf86IsOptionSet(const OptionInfoRec * table, int token) return p && p->found; } -char * +const char * xf86GetOptValString(const OptionInfoRec * table, int token) { OptionInfoPtr p; diff --git a/xserver/hw/xfree86/common/xf86Optionstr.h b/xserver/hw/xfree86/common/xf86Optionstr.h index c38499cb5..4ef917dee 100644 --- a/xserver/hw/xfree86/common/xf86Optionstr.h +++ b/xserver/hw/xfree86/common/xf86Optionstr.h @@ -31,10 +31,10 @@ */ typedef struct _XF86OptionRec { GenericListRec list; - char *opt_name; - char *opt_val; + const char *opt_name; + const char *opt_val; int opt_used; - char *opt_comment; + const char *opt_comment; } XF86OptionRec; typedef struct _InputOption *XF86OptionPtr; diff --git a/xserver/hw/xfree86/common/xf86PM.c b/xserver/hw/xfree86/common/xf86PM.c index 15257cb81..9e49e8eaf 100644 --- a/xserver/hw/xfree86/common/xf86PM.c +++ b/xserver/hw/xfree86/common/xf86PM.c @@ -196,7 +196,7 @@ DoApmEvent(pmEvent event, Bool undo) #define MAX_NO_EVENTS 8 void -xf86HandlePMEvents(int fd, pointer data) +xf86HandlePMEvents(int fd, void *data) { pmEvent events[MAX_NO_EVENTS]; int i, n; diff --git a/xserver/hw/xfree86/common/xf86Priv.h b/xserver/hw/xfree86/common/xf86Priv.h index 58cfe0a1a..6e374eb7e 100644 --- a/xserver/hw/xfree86/common/xf86Priv.h +++ b/xserver/hw/xfree86/common/xf86Priv.h @@ -139,11 +139,11 @@ DoShowOptions(void) /* xf86Events.c */ extern _X_EXPORT void -xf86Wakeup(pointer blockData, int err, pointer pReadmask); +xf86Wakeup(void *blockData, int err, void *pReadmask); extern _X_HIDDEN int xf86SigWrapper(int signo); extern _X_EXPORT void -xf86HandlePMEvents(int fd, pointer data); +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); @@ -156,7 +156,7 @@ xf86CloseLog(enum ExitCode error); /* xf86Init.c */ extern _X_EXPORT Bool -xf86LoadModules(char **list, pointer *optlist); +xf86LoadModules(const char **list, void **optlist); extern _X_EXPORT int xf86SetVerbosity(int verb); extern _X_EXPORT int diff --git a/xserver/hw/xfree86/common/xf86Privstr.h b/xserver/hw/xfree86/common/xf86Privstr.h index e20be03a9..410ef17ac 100644 --- a/xserver/hw/xfree86/common/xf86Privstr.h +++ b/xserver/hw/xfree86/common/xf86Privstr.h @@ -136,11 +136,11 @@ typedef struct { /* Information for root window properties. */ typedef struct _RootWinProp { struct _RootWinProp *next; - char *name; + const char *name; Atom type; short format; long size; - pointer data; + void *data; } RootWinProp, *RootWinPropPtr; /* ISC's cc can't handle ~ of UL constants, so explicitly type cast them. */ @@ -163,4 +163,8 @@ typedef struct _RootWinProp { #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 */ diff --git a/xserver/hw/xfree86/common/xf86VGAarbiter.c b/xserver/hw/xfree86/common/xf86VGAarbiter.c index 225fff06e..5cc24298b 100644 --- a/xserver/hw/xfree86/common/xf86VGAarbiter.c +++ b/xserver/hw/xfree86/common/xf86VGAarbiter.c @@ -257,7 +257,7 @@ VGAarbiterCloseScreen(ScreenPtr pScreen) UNWRAP_SCREEN_INFO(FreeScreen); UNWRAP_SPRITE; - free((pointer) pScreenPriv); + free((void *) pScreenPriv); xf86VGAarbiterLock(xf86ScreenToScrn(pScreen)); val = (*pScreen->CloseScreen) (pScreen); xf86VGAarbiterUnlock(xf86ScreenToScrn(pScreen)); @@ -266,7 +266,7 @@ VGAarbiterCloseScreen(ScreenPtr pScreen) static void VGAarbiterBlockHandler(ScreenPtr pScreen, - pointer pTimeout, pointer pReadmask) + void *pTimeout, void *pReadmask) { SCREEN_PROLOG(BlockHandler); VGAGet(pScreen); @@ -277,7 +277,7 @@ VGAarbiterBlockHandler(ScreenPtr pScreen, static void VGAarbiterWakeupHandler(ScreenPtr pScreen, unsigned long result, - pointer pReadmask) + void *pReadmask) { SCREEN_PROLOG(WakeupHandler); VGAGet(pScreen); @@ -586,7 +586,7 @@ VGAarbiterCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst) } static void -VGAarbiterChangeClip(GCPtr pGC, int type, pointer pvalue, int nrects) +VGAarbiterChangeClip(GCPtr pGC, int type, void *pvalue, int nrects) { GC_UNWRAP(pGC); (*pGC->funcs->ChangeClip) (pGC, type, pvalue, nrects); @@ -860,7 +860,7 @@ VGAarbiterImageGlyphBlt(DrawablePtr pDraw, GCPtr pGC, int xInit, int yInit, unsigned int nglyph, - CharInfoPtr * ppci, pointer pglyphBase) + CharInfoPtr * ppci, void *pglyphBase) { ScreenPtr pScreen = pGC->pScreen; @@ -877,7 +877,7 @@ VGAarbiterPolyGlyphBlt(DrawablePtr pDraw, GCPtr pGC, int xInit, int yInit, unsigned int nglyph, - CharInfoPtr * ppci, pointer pglyphBase) + CharInfoPtr * ppci, void *pglyphBase) { ScreenPtr pScreen = pGC->pScreen; diff --git a/xserver/hw/xfree86/common/xf86VGAarbiterPriv.h b/xserver/hw/xfree86/common/xf86VGAarbiterPriv.h index ba6edfcc3..ec21bc2f2 100644 --- a/xserver/hw/xfree86/common/xf86VGAarbiterPriv.h +++ b/xserver/hw/xfree86/common/xf86VGAarbiterPriv.h @@ -137,15 +137,15 @@ typedef struct _VGAarbiterScreen { } VGAarbiterScreenRec, *VGAarbiterScreenPtr; typedef struct _VGAarbiterGC { - GCOps *wrapOps; - GCFuncs *wrapFuncs; + const GCOps *wrapOps; + const GCFuncs *wrapFuncs; } VGAarbiterGCRec, *VGAarbiterGCPtr; /* Screen funcs */ -static void VGAarbiterBlockHandler(ScreenPtr pScreen, pointer pTimeout, - pointer pReadmask); +static void VGAarbiterBlockHandler(ScreenPtr pScreen, void *pTimeout, + void *pReadmask); static void VGAarbiterWakeupHandler(ScreenPtr pScreen, - unsigned long result, pointer pReadmask); + unsigned long result, void *pReadmask); static Bool VGAarbiterCloseScreen(ScreenPtr pScreen); static void VGAarbiterGetImage(DrawablePtr pDrawable, int sx, int sy, int w, int h, unsigned int format, @@ -188,7 +188,7 @@ static void VGAarbiterValidateGC(GCPtr pGC, unsigned long changes, 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, pointer pvalue, +static void VGAarbiterChangeClip(GCPtr pGC, int type, void *pvalue, int nrects); static void VGAarbiterDestroyClip(GCPtr pGC); static void VGAarbiterCopyClip(GCPtr pgcDst, GCPtr pgcSrc); @@ -236,10 +236,10 @@ 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, pointer pglyphBase); + CharInfoPtr * ppci, void *pglyphBase); static void VGAarbiterPolyGlyphBlt(DrawablePtr pDraw, GCPtr pGC, int xInit, int yInit, unsigned int nglyph, - CharInfoPtr * ppci, pointer pglyphBase); + CharInfoPtr * ppci, void *pglyphBase); static void VGAarbiterPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDraw, int dx, int dy, int xOrg, int yOrg); diff --git a/xserver/hw/xfree86/common/xf86VidMode.c b/xserver/hw/xfree86/common/xf86VidMode.c index a7d1c25bf..e708b2792 100644 --- a/xserver/hw/xfree86/common/xf86VidMode.c +++ b/xserver/hw/xfree86/common/xf86VidMode.c @@ -138,7 +138,7 @@ VidModeAvailable(int scrnIndex) } Bool -VidModeGetCurrentModeline(int scrnIndex, pointer *mode, int *dotClock) +VidModeGetCurrentModeline(int scrnIndex, void **mode, int *dotClock) { ScrnInfoPtr pScrn; @@ -148,7 +148,7 @@ VidModeGetCurrentModeline(int scrnIndex, pointer *mode, int *dotClock) pScrn = xf86Screens[scrnIndex]; if (pScrn->currentMode) { - *mode = (pointer) (pScrn->currentMode); + *mode = (void *) (pScrn->currentMode); *dotClock = pScrn->currentMode->Clock; return TRUE; @@ -211,7 +211,7 @@ VidModeGetClocks(int scrnIndex, int *Clocks) } Bool -VidModeGetFirstModeline(int scrnIndex, pointer *mode, int *dotClock) +VidModeGetFirstModeline(int scrnIndex, void **mode, int *dotClock) { ScrnInfoPtr pScrn; VidModePtr pVidMode; @@ -228,7 +228,7 @@ VidModeGetFirstModeline(int scrnIndex, pointer *mode, int *dotClock) pVidMode->Next = pVidMode->First->next; if (pVidMode->First->status == MODE_OK) { - *mode = (pointer) (pVidMode->First); + *mode = (void *) (pVidMode->First); *dotClock = VidModeGetDotClock(scrnIndex, pVidMode->First->Clock); return TRUE; } @@ -237,7 +237,7 @@ VidModeGetFirstModeline(int scrnIndex, pointer *mode, int *dotClock) } Bool -VidModeGetNextModeline(int scrnIndex, pointer *mode, int *dotClock) +VidModeGetNextModeline(int scrnIndex, void **mode, int *dotClock) { ScrnInfoPtr pScrn; VidModePtr pVidMode; @@ -252,7 +252,7 @@ VidModeGetNextModeline(int scrnIndex, pointer *mode, int *dotClock) for (p = pVidMode->Next; p != NULL && p != pVidMode->First; p = p->next) { if (p->status == MODE_OK) { pVidMode->Next = p->next; - *mode = (pointer) p; + *mode = (void *) p; *dotClock = VidModeGetDotClock(scrnIndex, p->Clock); return TRUE; } @@ -262,7 +262,7 @@ VidModeGetNextModeline(int scrnIndex, pointer *mode, int *dotClock) } Bool -VidModeDeleteModeline(int scrnIndex, pointer mode) +VidModeDeleteModeline(int scrnIndex, void *mode) { ScrnInfoPtr pScrn; @@ -323,7 +323,7 @@ VidModeGetViewPort(int scrnIndex, int *x, int *y) } Bool -VidModeSwitchMode(int scrnIndex, pointer mode) +VidModeSwitchMode(int scrnIndex, void *mode) { ScrnInfoPtr pScrn; DisplayModePtr pTmpMode; @@ -362,7 +362,7 @@ VidModeLockZoom(int scrnIndex, Bool lock) } Bool -VidModeGetMonitor(int scrnIndex, pointer *monitor) +VidModeGetMonitor(int scrnIndex, void **monitor) { ScrnInfoPtr pScrn; @@ -370,13 +370,13 @@ VidModeGetMonitor(int scrnIndex, pointer *monitor) return FALSE; pScrn = xf86Screens[scrnIndex]; - *monitor = (pointer) (pScrn->monitor); + *monitor = (void *) (pScrn->monitor); return TRUE; } ModeStatus -VidModeCheckModeForMonitor(int scrnIndex, pointer mode) +VidModeCheckModeForMonitor(int scrnIndex, void *mode) { ScrnInfoPtr pScrn; @@ -389,7 +389,7 @@ VidModeCheckModeForMonitor(int scrnIndex, pointer mode) } ModeStatus -VidModeCheckModeForDriver(int scrnIndex, pointer mode) +VidModeCheckModeForDriver(int scrnIndex, void *mode) { ScrnInfoPtr pScrn; @@ -402,7 +402,7 @@ VidModeCheckModeForDriver(int scrnIndex, pointer mode) } void -VidModeSetCrtcForMode(int scrnIndex, pointer mode) +VidModeSetCrtcForMode(int scrnIndex, void *mode) { ScrnInfoPtr pScrn; DisplayModePtr ScreenModes; @@ -421,7 +421,7 @@ VidModeSetCrtcForMode(int scrnIndex, pointer mode) } Bool -VidModeAddModeline(int scrnIndex, pointer mode) +VidModeAddModeline(int scrnIndex, void *mode) { ScrnInfoPtr pScrn; @@ -444,7 +444,7 @@ VidModeAddModeline(int scrnIndex, pointer mode) int VidModeGetNumOfModes(int scrnIndex) { - pointer mode = NULL; + void *mode = NULL; int dotClock = 0, nummodes = 0; if (!VidModeGetFirstModeline(scrnIndex, &mode, &dotClock)) @@ -526,7 +526,7 @@ VidModeGetGammaRampSize(int scrnIndex) return xf86GetGammaRampSize(xf86Screens[scrnIndex]->pScreen); } -pointer +void * VidModeCreateMode(void) { DisplayModePtr mode; @@ -543,13 +543,13 @@ VidModeCreateMode(void) } void -VidModeCopyMode(pointer modefrom, pointer modeto) +VidModeCopyMode(void *modefrom, void *modeto) { memcpy(modeto, modefrom, sizeof(DisplayModeRec)); } int -VidModeGetModeValue(pointer mode, int valtyp) +VidModeGetModeValue(void *mode, int valtyp) { int ret = 0; @@ -592,7 +592,7 @@ VidModeGetModeValue(pointer mode, int valtyp) } void -VidModeSetModeValue(pointer mode, int valtyp, int val) +VidModeSetModeValue(void *mode, int valtyp, int val) { switch (valtyp) { case VIDMODE_H_DISPLAY: @@ -633,7 +633,7 @@ VidModeSetModeValue(pointer mode, int valtyp, int val) } vidMonitorValue -VidModeGetMonitorValue(pointer monitor, int valtyp, int indx) +VidModeGetMonitorValue(void *monitor, int valtyp, int indx) { vidMonitorValue ret = { NULL, }; diff --git a/xserver/hw/xfree86/common/xf86Xinput.c b/xserver/hw/xfree86/common/xf86Xinput.c index 4b588a741..4e8060b0f 100644 --- a/xserver/hw/xfree86/common/xf86Xinput.c +++ b/xserver/hw/xfree86/common/xf86Xinput.c @@ -1,6 +1,6 @@ /* * Copyright 1995-1999 by Frederic Lepied, France. <Lepied@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 @@ -9,8 +9,8 @@ * 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. - * + * 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 @@ -63,6 +63,7 @@ #include "mipointer.h" #include "extinit.h" #include "loaderProcs.h" +#include "systemd-logind.h" #include "exevents.h" /* AddInputDevice */ #include "exglobals.h" @@ -80,6 +81,12 @@ #include <stdarg.h> #include <stdint.h> /* for int64_t */ +#include <sys/types.h> +#include <sys/stat.h> +#include <unistd.h> +#ifdef HAVE_SYS_MKDEV_H +#include <sys/mkdev.h> /* for major() & minor() on Solaris */ +#endif #include "mi.h" @@ -103,11 +110,14 @@ static int xf86InputDevicePostInit(DeviceIntPtr dev); +static InputInfoPtr *new_input_devices; +static int new_input_devices_count; + /** * Eval config and modify DeviceVelocityRec accordingly */ static void -ProcessVelocityConfiguration(DeviceIntPtr pDev, char *devname, pointer list, +ProcessVelocityConfiguration(DeviceIntPtr pDev, const char *devname, void *list, DeviceVelocityPtr s) { int tempi; @@ -305,7 +315,7 @@ ApplyTransformationMatrix(DeviceIntPtr dev) /*********************************************************************** * * xf86ProcessCommonOptions -- - * + * * Process global options. * *********************************************************************** @@ -661,7 +671,7 @@ MergeInputClasses(const InputInfoPtr idev, const InputAttributes * attrs) /* Collect class options and driver settings */ classopts = xf86optionListDup(cl->option_lst); if (cl->driver) { - free(idev->driver); + free((void *) idev->driver); idev->driver = xstrdup(cl->driver); if (!idev->driver) { xf86Msg(X_ERROR, "Failed to allocate memory while merging " @@ -760,6 +770,9 @@ xf86DeleteInput(InputInfoPtr pInp, int flags) 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; @@ -773,8 +786,8 @@ xf86DeleteInput(InputInfoPtr pInp, int flags) /* Else the entry wasn't in the xf86InputDevs list (ignore this). */ } - free(pInp->driver); - free(pInp->name); + free((void *) pInp->driver); + free((void *) pInp->name); xf86optionListFree(pInp->options); free(pInp); } @@ -794,6 +807,18 @@ xf86InputDevicePostInit(DeviceIntPtr 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); +} + /** * Create a new input device, activate and enable it. * @@ -816,7 +841,9 @@ xf86NewInputDevice(InputInfoPtr pInfo, DeviceIntPtr *pdev, BOOL enable) { InputDriverPtr drv = NULL; DeviceIntPtr dev = NULL; + Bool paused; int rval; + const char *path; /* Memory leak for every attached device if we don't * test if the module is already loaded first */ @@ -830,6 +857,29 @@ xf86NewInputDevice(InputInfoPtr pInfo, DeviceIntPtr *pdev, BOOL enable) 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 */ + new_input_devices = xnfrealloc(new_input_devices, + sizeof(pInfo) * (new_input_devices_count + 1)); + new_input_devices[new_input_devices_count] = pInfo; + new_input_devices_count++; + systemd_logind_release_fd(pInfo->major, pInfo->minor, fd); + return BadMatch; + } + pInfo->fd = fd; + pInfo->flags |= XI86_SERVER_FD; + pInfo->options = xf86ReplaceIntOption(pInfo->options, "fd", fd); + } + } + xf86Msg(X_INFO, "Using input driver '%s' for '%s'\n", drv->driverName, pInfo->name); @@ -949,6 +999,12 @@ NewInputDeviceRequest(InputOption *options, InputAttributes * attrs, 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) { @@ -1021,7 +1077,7 @@ DeleteInputDeviceRequest(DeviceIntPtr pDev) OsReleaseSignals(); } -/* +/* * convenient functions to post events */ @@ -1067,7 +1123,7 @@ xf86CheckMotionEvent4DGA(DeviceIntPtr device, int is_absolute, #if XFreeXDGA ScreenPtr scr = NULL; - int idx, i; + 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)) { @@ -1345,7 +1401,7 @@ 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) @@ -1419,7 +1475,7 @@ xf86InitValuatorDefaults(DeviceIntPtr dev, int axnum) * 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 @@ -1437,7 +1493,7 @@ xf86DisableDevice(DeviceIntPtr dev, Bool panic) /** * 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. + * Device will be re-activated, and an event sent to the client. */ void xf86EnableDevice(DeviceIntPtr dev) @@ -1469,4 +1525,32 @@ xf86PostTouchEvent(DeviceIntPtr dev, uint32_t touchid, uint16_t type, QueueTouchEvents(dev, type, touchid, flags, mask); } +void +xf86InputEnableVTProbe(void) +{ + int i, is_auto = 0; + InputOption *option = NULL; + DeviceIntPtr pdev; + + for (i = 0; i < new_input_devices_count; i++) { + InputInfoPtr pInfo = new_input_devices[i]; + + is_auto = 0; + nt_list_for_each_entry(option, pInfo->options, list.next) { + const char *key = input_option_get_key(option); + const char *value = input_option_get_value(option); + + if (strcmp(key, "_source") == 0 && + (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))); + } + new_input_devices_count = 0; +} + /* end of xf86Xinput.c */ diff --git a/xserver/hw/xfree86/common/xf86Xinput.h b/xserver/hw/xfree86/common/xf86Xinput.h index 35c38a554..ef9a117cb 100644 --- a/xserver/hw/xfree86/common/xf86Xinput.h +++ b/xserver/hw/xfree86/common/xf86Xinput.h @@ -64,6 +64,10 @@ /* 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 { @@ -74,13 +78,14 @@ typedef struct _InputDriverRec { struct _InputInfoRec * pInfo, int flags); void (*UnInit) (struct _InputDriverRec * drv, struct _InputInfoRec * pInfo, int flags); - pointer module; + void *module; const char **default_options; + int capabilities; } InputDriverRec, *InputDriverPtr; /* This is to input devices what the ScrnInfoRec is to screens. */ -typedef struct _InputInfoRec { +struct _InputInfoRec { struct _InputInfoRec *next; char *name; char *driver; @@ -96,14 +101,16 @@ typedef struct _InputInfoRec { int *valuators, int first_valuator, int num_valuators); int fd; + int major; + int minor; DeviceIntPtr dev; - pointer private; + void *private; const char *type_name; InputDriverPtr drv; - pointer module; + void *module; XF86OptionPtr options; InputAttributes *attrs; -} *InputInfoPtr; +}; /* xf86Globals.c */ extern InputInfoPtr xf86InputDevs; @@ -172,13 +179,14 @@ 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, pointer module, +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); diff --git a/xserver/hw/xfree86/common/xf86cmap.c b/xserver/hw/xfree86/common/xf86cmap.c index 85f35f8db..3f9c88035 100644 --- a/xserver/hw/xfree86/common/xf86cmap.c +++ b/xserver/hw/xfree86/common/xf86cmap.c @@ -224,7 +224,7 @@ xf86HandleColormaps(ScreenPtr pScreen, ComputeGamma(pScreenPriv); /* get the default map */ - dixLookupResourceByType((pointer *) &pDefMap, pScreen->defColormap, + dixLookupResourceByType((void **) &pDefMap, pScreen->defColormap, RT_COLORMAP, serverClient, DixInstallAccess); if (!CMapAllocateColormapPrivate(pDefMap)) { diff --git a/xserver/hw/xfree86/common/xf86fbman.c b/xserver/hw/xfree86/common/xf86fbman.c index 4da6af2b6..db715bd2f 100644 --- a/xserver/hw/xfree86/common/xf86fbman.c +++ b/xserver/hw/xfree86/common/xf86fbman.c @@ -74,7 +74,7 @@ xf86FBManagerRunning(ScreenPtr pScreen) Bool xf86RegisterFreeBoxCallback(ScreenPtr pScreen, FreeBoxCallbackProcPtr FreeBoxCallback, - pointer devPriv) + void *devPriv) { FBManagerFuncsPtr funcs; @@ -93,7 +93,7 @@ xf86AllocateOffscreenArea(ScreenPtr pScreen, int w, int h, int gran, MoveAreaCallbackProcPtr moveCB, - RemoveAreaCallbackProcPtr removeCB, pointer privData) + RemoveAreaCallbackProcPtr removeCB, void *privData) { FBManagerFuncsPtr funcs; @@ -113,7 +113,7 @@ xf86AllocateOffscreenLinear(ScreenPtr pScreen, int gran, MoveLinearCallbackProcPtr moveCB, RemoveLinearCallbackProcPtr removeCB, - pointer privData) + void *privData) { FBManagerFuncsPtr funcs; @@ -309,7 +309,7 @@ SendCallFreeBoxCallbacks(FBManagerPtr offman) static Bool localRegisterFreeBoxCallback(ScreenPtr pScreen, FreeBoxCallbackProcPtr FreeBoxCallback, - pointer devPriv) + void *devPriv) { FBManagerPtr offman; FreeBoxCallbackProcPtr *newCallbacks; @@ -346,7 +346,7 @@ AllocateArea(FBManagerPtr offman, int w, int h, int granularity, MoveAreaCallbackProcPtr moveCB, - RemoveAreaCallbackProcPtr removeCB, pointer privData) + RemoveAreaCallbackProcPtr removeCB, void *privData) { ScreenPtr pScreen = offman->pScreen; FBLinkPtr link = NULL; @@ -436,7 +436,7 @@ localAllocateOffscreenArea(ScreenPtr pScreen, int w, int h, int gran, MoveAreaCallbackProcPtr moveCB, - RemoveAreaCallbackProcPtr removeCB, pointer privData) + RemoveAreaCallbackProcPtr removeCB, void *privData) { FBManagerPtr offman; FBAreaPtr area = NULL; @@ -824,7 +824,7 @@ DumpDebug(FBLinearLinkPtr pLink) } static FBLinearPtr -AllocateLinear(FBManagerPtr offman, int size, int granularity, pointer privData) +AllocateLinear(FBManagerPtr offman, int size, int granularity, void *privData) { ScreenPtr pScreen = offman->pScreen; FBLinearLinkPtr linear = NULL; @@ -903,7 +903,7 @@ localAllocateOffscreenLinear(ScreenPtr pScreen, int gran, MoveLinearCallbackProcPtr moveCB, RemoveLinearCallbackProcPtr removeCB, - pointer privData) + void *privData) { FBManagerPtr offman; FBLinearLinkPtr link; @@ -1122,11 +1122,8 @@ localQueryLargestOffscreenLinear(ScreenPtr pScreen, if (localQueryLargestOffscreenArea(pScreen, &w, &h, gran, FAVOR_WIDTH_THEN_AREA, priority)) { - FBManagerPtr offman; BoxPtr extents; - offman = (FBManagerPtr) dixLookupPrivate(&pScreen->devPrivates, - xf86FBScreenKey); extents = RegionExtents(offman->InitialBoxes); if ((extents->x2 - extents->x1) == w) *size = w * h; @@ -1394,7 +1391,7 @@ xf86AllocateLinearOffscreenArea(ScreenPtr pScreen, int gran, MoveAreaCallbackProcPtr moveCB, RemoveAreaCallbackProcPtr removeCB, - pointer privData) + void *privData) { FBManagerFuncsPtr funcs; FBManagerPtr offman; diff --git a/xserver/hw/xfree86/common/xf86fbman.h b/xserver/hw/xfree86/common/xf86fbman.h index 99bf9917b..092c2e2dd 100644 --- a/xserver/hw/xfree86/common/xf86fbman.h +++ b/xserver/hw/xfree86/common/xf86fbman.h @@ -60,7 +60,7 @@ typedef struct _FBLinear { DevUnion devPrivate; } FBLinear, *FBLinearPtr; -typedef void (*FreeBoxCallbackProcPtr) (ScreenPtr, RegionPtr, pointer); +typedef void (*FreeBoxCallbackProcPtr) (ScreenPtr, RegionPtr, void *); typedef void (*MoveAreaCallbackProcPtr) (FBAreaPtr, FBAreaPtr); typedef void (*RemoveAreaCallbackProcPtr) (FBAreaPtr); @@ -73,7 +73,7 @@ typedef struct { int granularity, MoveAreaCallbackProcPtr moveCB, RemoveAreaCallbackProcPtr removeCB, - pointer privData); + void *privData); void (*FreeOffscreenArea) (FBAreaPtr area); Bool (*ResizeOffscreenArea) (FBAreaPtr area, int w, int h); Bool (*QueryLargestOffscreenArea) (ScreenPtr pScreen, @@ -82,14 +82,14 @@ typedef struct { int preferences, int priority); Bool (*RegisterFreeBoxCallback) (ScreenPtr pScreen, FreeBoxCallbackProcPtr FreeBoxCallback, - pointer devPriv); + void *devPriv); /* linear functions */ FBLinearPtr(*AllocateOffscreenLinear) (ScreenPtr pScreen, int size, int granularity, MoveLinearCallbackProcPtr moveCB, RemoveLinearCallbackProcPtr - removeCB, pointer privData); + removeCB, void *privData); void (*FreeOffscreenLinear) (FBLinearPtr area); Bool (*ResizeOffscreenLinear) (FBLinearPtr area, int size); Bool (*QueryLargestOffscreenLinear) (ScreenPtr pScreen, @@ -121,7 +121,7 @@ xf86AllocateOffscreenArea(ScreenPtr pScreen, int w, int h, int granularity, MoveAreaCallbackProcPtr moveCB, - RemoveAreaCallbackProcPtr removeCB, pointer privData); + RemoveAreaCallbackProcPtr removeCB, void *privData); extern _X_EXPORT FBAreaPtr xf86AllocateLinearOffscreenArea(ScreenPtr pScreen, @@ -129,7 +129,7 @@ xf86AllocateLinearOffscreenArea(ScreenPtr pScreen, int granularity, MoveAreaCallbackProcPtr moveCB, RemoveAreaCallbackProcPtr removeCB, - pointer privData); + void *privData); extern _X_EXPORT FBLinearPtr xf86AllocateOffscreenLinear(ScreenPtr pScreen, @@ -137,7 +137,7 @@ xf86AllocateOffscreenLinear(ScreenPtr pScreen, int granularity, MoveLinearCallbackProcPtr moveCB, RemoveLinearCallbackProcPtr removeCB, - pointer privData); + void *privData); extern _X_EXPORT void xf86FreeOffscreenArea(FBAreaPtr area); extern _X_EXPORT void xf86FreeOffscreenLinear(FBLinearPtr area); @@ -152,7 +152,7 @@ extern _X_EXPORT Bool xf86RegisterFreeBoxCallback(ScreenPtr pScreen, FreeBoxCallbackProcPtr FreeBoxCallback, - pointer devPriv); + void *devPriv); extern _X_EXPORT Bool xf86PurgeUnlockedOffscreenAreas(ScreenPtr pScreen); diff --git a/xserver/hw/xfree86/common/xf86pciBus.c b/xserver/hw/xfree86/common/xf86pciBus.c index 258988a84..c06b04033 100644 --- a/xserver/hw/xfree86/common/xf86pciBus.c +++ b/xserver/hw/xfree86/common/xf86pciBus.c @@ -575,7 +575,7 @@ xf86PciProbeDev(DriverPtr drvp) } void -xf86PciIsolateDevice(char *argument) +xf86PciIsolateDevice(const char *argument) { int bus, device, func; @@ -1013,7 +1013,7 @@ xf86MatchPciInstances(const char *driverName, int vendorID, static void xf86ConfigPciEntityInactive(EntityInfoPtr pEnt, PciChipsets * p_chip, EntityProc init, EntityProc enter, - EntityProc leave, pointer private) + EntityProc leave, void *private) { ScrnInfoPtr pScrn; @@ -1027,7 +1027,7 @@ xf86ConfigPciEntityInactive(EntityInfoPtr pEnt, PciChipsets * p_chip, ScrnInfoPtr xf86ConfigPciEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex, PciChipsets * p_chip, void *dummy, EntityProc init, - EntityProc enter, EntityProc leave, pointer private) + EntityProc enter, EntityProc leave, void *private) { EntityInfoPtr pEnt = xf86GetEntityInfo(entityIndex); @@ -1068,7 +1068,7 @@ xf86ConfigPciEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex, Bool xf86ConfigActivePciEntity(ScrnInfoPtr pScrn, int entityIndex, PciChipsets * p_chip, void *dummy, EntityProc init, - EntityProc enter, EntityProc leave, pointer private) + EntityProc enter, EntityProc leave, void *private) { EntityInfoPtr pEnt = xf86GetEntityInfo(entityIndex); @@ -1320,8 +1320,9 @@ xchomp(char *line) * 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(char **matches, uint16_t match_vendor, uint16_t match_chip) +int +xf86MatchDriverFromFiles(uint16_t match_vendor, uint16_t match_chip, + char *matches[], int nmatches) { DIR *idsdir; FILE *fp; @@ -1331,11 +1332,11 @@ xf86MatchDriverFromFiles(char **matches, uint16_t match_vendor, uint16_t match_c ssize_t read; char path_name[256], vendor_str[5], chip_str[5]; uint16_t vendor, chip; - int i, j; + int i = 0, j; idsdir = opendir(PCI_TXT_IDS_PATH); if (!idsdir) - return; + return 0; xf86Msg(X_INFO, "Scanning %s directory for additional PCI ID's supported by the drivers\n", @@ -1386,10 +1387,6 @@ xf86MatchDriverFromFiles(char **matches, uint16_t match_vendor, uint16_t match_c } } if (vendor == match_vendor && chip == match_chip) { - i = 0; - while (matches[i]) { - i++; - } matches[i] = (char *) malloc(sizeof(char) * strlen(direntry->d_name) - 3); @@ -1412,6 +1409,7 @@ xf86MatchDriverFromFiles(char **matches, uint16_t match_vendor, uint16_t match_c } xf86Msg(X_INFO, "Matched %s from file name %s\n", matches[i], direntry->d_name); + i++; } } else { @@ -1425,6 +1423,7 @@ xf86MatchDriverFromFiles(char **matches, uint16_t match_vendor, uint16_t match_c end: free(line); closedir(idsdir); + return i; } #endif /* __linux__ */ @@ -1435,7 +1434,7 @@ xf86MatchDriverFromFiles(char **matches, uint16_t match_vendor, uint16_t match_c int xf86PciMatchDriver(char *matches[], int nmatches) { - int i; + int i = 0; struct pci_device *info = NULL; struct pci_device_iterator *iter; @@ -1450,13 +1449,10 @@ xf86PciMatchDriver(char *matches[], int nmatches) pci_iterator_destroy(iter); #ifdef __linux__ if (info) - xf86MatchDriverFromFiles(matches, info->vendor_id, info->device_id); + i += xf86MatchDriverFromFiles(info->vendor_id, info->device_id, + matches, nmatches); #endif - for (i = 0; (i < nmatches) && (matches[i]); i++) { - /* find end of matches list */ - } - if ((info != NULL) && (i < nmatches)) { i += xf86VideoPtrToDriverList(info, &(matches[i]), nmatches - i); } @@ -1484,6 +1480,7 @@ xf86PciConfigureNewDev(void *busData, struct pci_device *pVideo, GDevRec * GDev, int *chipset) { char busnum[8]; + char *tmp; pVideo = (struct pci_device *) busData; @@ -1493,8 +1490,9 @@ xf86PciConfigureNewDev(void *busData, struct pci_device *pVideo, snprintf(busnum, sizeof(busnum), "%d@%d", pVideo->bus & 0x00ff, pVideo->bus >> 8); - XNFasprintf(&GDev->busID, "PCI:%s:%d:%d", + XNFasprintf(&tmp, "PCI:%s:%d:%d", busnum, pVideo->dev, pVideo->func); + GDev->busID = tmp; GDev->chipID = pVideo->device_id; GDev->chipRev = pVideo->revision; diff --git a/xserver/hw/xfree86/common/xf86pciBus.h b/xserver/hw/xfree86/common/xf86pciBus.h index 4972c3688..45b5a0fee 100644 --- a/xserver/hw/xfree86/common/xf86pciBus.h +++ b/xserver/hw/xfree86/common/xf86pciBus.h @@ -36,7 +36,7 @@ void xf86PciProbe(void); Bool xf86PciAddMatchingDev(DriverPtr drvp); Bool xf86PciProbeDev(DriverPtr drvp); -void xf86PciIsolateDevice(char *argument); +void xf86PciIsolateDevice(const char *argument); int xf86PciMatchDriver(char *matches[], int nmatches); Bool xf86PciConfigure(void *busData, struct pci_device *pDev); void xf86PciConfigureNewDev(void *busData, struct pci_device *pVideo, @@ -47,8 +47,9 @@ void xf86PciConfigureNewDev(void *busData, struct pci_device *pVideo, ((x)->func == (y)->func) && \ ((x)->dev == (y)->dev)) -void -xf86MatchDriverFromFiles(char **matches, uint16_t match_vendor, uint16_t match_chip); +int +xf86MatchDriverFromFiles(uint16_t match_vendor, uint16_t match_chip, + char *matches[], int nmatches); int xf86VideoPtrToDriverList(struct pci_device *dev, char *returnList[], int returnListMax); diff --git a/xserver/hw/xfree86/common/xf86platformBus.c b/xserver/hw/xfree86/common/xf86platformBus.c index 33b2b7dd8..c5417885d 100644 --- a/xserver/hw/xfree86/common/xf86platformBus.c +++ b/xserver/hw/xfree86/common/xf86platformBus.c @@ -38,6 +38,7 @@ #include <unistd.h> #include "os.h" #include "hotplug.h" +#include "systemd-logind.h" #include "xf86.h" #include "xf86_OSproc.h" @@ -46,16 +47,17 @@ #include "xf86Bus.h" #include "Pci.h" #include "xf86platformBus.h" +#include "xf86Config.h" #include "randrstr.h" int platformSlotClaimed; int xf86_num_platform_devices; -static struct xf86_platform_device *xf86_platform_devices; +struct xf86_platform_device *xf86_platform_devices; int -xf86_add_platform_device(struct OdevAttributes *attribs) +xf86_add_platform_device(struct OdevAttributes *attribs, Bool unowned) { xf86_platform_devices = xnfrealloc(xf86_platform_devices, (sizeof(struct xf86_platform_device) @@ -63,6 +65,8 @@ xf86_add_platform_device(struct OdevAttributes *attribs) 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; @@ -89,35 +93,55 @@ xf86_add_platform_device_attrib(int index, int attrib_id, char *attrib_name) return config_odev_add_attribute(device->attribs, attrib_id, attrib_name); } +Bool +xf86_add_platform_device_int_attrib(int index, int attrib_id, int attrib_value) +{ + return config_odev_add_int_attribute(xf86_platform_devices[index].attribs, attrib_id, attrib_value); +} + char * xf86_get_platform_attrib(int index, int attrib_id) { - struct xf86_platform_device *device = &xf86_platform_devices[index]; - struct OdevAttribute *oa; - - xorg_list_for_each_entry(oa, &device->attribs->list, member) { - if (oa->attrib_id == attrib_id) - return oa->attrib_name; - } - return NULL; + return config_odev_get_attribute(xf86_platform_devices[index].attribs, attrib_id); } char * xf86_get_platform_device_attrib(struct xf86_platform_device *device, int attrib_id) { - struct OdevAttribute *oa; + return config_odev_get_attribute(device->attribs, attrib_id); +} - xorg_list_for_each_entry(oa, &device->attribs->list, member) { - if (oa->attrib_id == attrib_id) - return oa->attrib_name; - } - return NULL; +int +xf86_get_platform_int_attrib(int index, int attrib_id, int def) +{ + return config_odev_get_int_attribute(xf86_platform_devices[index].attribs, attrib_id, def); +} + +int +xf86_get_platform_device_int_attrib(struct xf86_platform_device *device, int attrib_id, int def) +{ + return config_odev_get_int_attribute(device->attribs, attrib_id, def); } Bool xf86_get_platform_device_unowned(int index) { - return xf86_platform_devices[index].attribs->unowned; + 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_get_platform_int_attrib(i, ODEV_ATTRIB_MAJOR, 0); + attr_minor = xf86_get_platform_int_attrib(i, ODEV_ATTRIB_MINOR, 0); + if (attr_major == major && attr_minor == minor) + return &xf86_platform_devices[i]; + } + return NULL; } /* @@ -176,6 +200,81 @@ xf86_check_platform_slot(const struct xf86_platform_device *pd) 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, int index) +{ + char *driver = xf86_get_platform_attrib(index, ODEV_ATTRIB_DRIVER); + + if (!MatchToken(driver, &oclass->match_driver, strcmp)) + return FALSE; + + return TRUE; +} + +static int +xf86OutputClassDriverList(int index, char *matches[], int nmatches) +{ + XF86ConfOutputClassPtr cl; + int i = 0; + + if (nmatches == 0) + return 0; + + for (cl = xf86configptr->conf_outputclass_lst; cl; cl = cl->list.next) { + if (OutputClassMatches(cl, index)) { + char *path = xf86_get_platform_attrib(index, ODEV_ATTRIB_PATH); + + xf86Msg(X_INFO, "Applying OutputClass \"%s\" to %s\n", + cl->identifier, path); + xf86Msg(X_NONE, "\tloading driver: %s\n", cl->driver); + + matches[i++] = xstrdup(cl->driver); + } + + if (i >= nmatches) + break; + } + + return i; +} + /** * @return The numbers of found devices that match with the current system * drivers. @@ -195,16 +294,15 @@ xf86PlatformMatchDriver(char *matches[], int nmatches) else if (!xf86IsPrimaryPlatform(&xf86_platform_devices[i]) && (pass == 0)) continue; + j += xf86OutputClassDriverList(i, &matches[j], nmatches - j); + info = xf86_platform_devices[i].pdev; #ifdef __linux__ if (info) - xf86MatchDriverFromFiles(matches, info->vendor_id, info->device_id); + j += xf86MatchDriverFromFiles(info->vendor_id, info->device_id, + &matches[j], nmatches - j); #endif - for (j = 0; (j < nmatches) && (matches[j]); j++) { - /* find end of matches list */ - } - if ((info != NULL) && (j < nmatches)) { j += xf86VideoPtrToDriverList(info, &(matches[j]), nmatches - j); } @@ -288,15 +386,15 @@ static Bool doPlatformProbe(struct xf86_platform_device *dev, DriverPtr drvp, GDevPtr gdev, int flags, intptr_t match_data) { Bool foundScreen = FALSE; - int entity; + int entity, fd, major, minor; - if (gdev->screen == 0 && !xf86_check_platform_slot(dev)) + if (gdev && gdev->screen == 0 && !xf86_check_platform_slot(dev)) return FALSE; entity = xf86ClaimPlatformSlot(dev, drvp, 0, - gdev, gdev->active); + gdev, gdev ? gdev->active : 0); - if ((entity == -1) && (gdev->screen > 0)) { + if ((entity == -1) && gdev && (gdev->screen > 0)) { unsigned nent; for (nent = 0; nent < xf86NumEntities; nent++) { @@ -312,6 +410,16 @@ static Bool doPlatformProbe(struct xf86_platform_device *dev, DriverPtr drvp, } } if (entity != -1) { + if ((dev->flags & XF86_PDEV_SERVER_FD) && (!drvp->driverFunc || + !drvp->driverFunc(NULL, SUPPORTS_SERVER_FDS, NULL))) { + fd = xf86_get_platform_device_int_attrib(dev, ODEV_ATTRIB_FD, -1); + major = xf86_get_platform_device_int_attrib(dev, ODEV_ATTRIB_MAJOR, 0); + minor = xf86_get_platform_device_int_attrib(dev, ODEV_ATTRIB_MINOR, 0); + systemd_logind_release_fd(major, minor, fd); + config_odev_add_int_attribute(dev->attribs, ODEV_ATTRIB_FD, -1); + dev->flags &= ~XF86_PDEV_SERVER_FD; + } + if (drvp->platformProbe(drvp, entity, flags, dev, match_data)) foundScreen = TRUE; else @@ -368,10 +476,9 @@ xf86platformProbeDev(DriverPtr drvp) /* for non-seat0 servers assume first device is the master */ if (ServerIsNotSeat0()) break; - if (xf86_platform_devices[j].pdev) { - if (xf86IsPrimaryPlatform(&xf86_platform_devices[j])) - break; - } + + if (xf86IsPrimaryPlatform(&xf86_platform_devices[j])) + break; } } @@ -398,9 +505,8 @@ xf86platformAddDevice(int index) { int i, old_screens, scr_index; DriverPtr drvp = NULL; - int entity; screenLayoutPtr layout; - static char *hotplug_driver_name = "modesetting"; + static const char *hotplug_driver_name = "modesetting"; /* force load the driver for now */ xf86LoadOneModule(hotplug_driver_name, NULL); @@ -418,11 +524,8 @@ xf86platformAddDevice(int index) return -1; old_screens = xf86NumGPUScreens; - entity = xf86ClaimPlatformSlot(&xf86_platform_devices[index], - drvp, 0, 0, 0); - if (!drvp->platformProbe(drvp, entity, PLATFORM_PROBE_GPU_SCREEN, &xf86_platform_devices[index], 0)) { - xf86UnclaimPlatformSlot(&xf86_platform_devices[index], NULL); - } + doPlatformProbe(&xf86_platform_devices[index], drvp, NULL, + PLATFORM_PROBE_GPU_SCREEN, 0); if (old_screens == xf86NumGPUScreens) return -1; i = old_screens; @@ -524,11 +627,28 @@ void xf86platformVTProbe(void) int i; for (i = 0; i < xf86_num_platform_devices; i++) { - if (xf86_platform_devices[i].attribs->unowned == FALSE) + if (!(xf86_platform_devices[i].flags & XF86_PDEV_UNOWNED)) continue; - xf86_platform_devices[i].attribs->unowned = FALSE; + 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) { + char *syspath = xf86_get_platform_attrib(0, ODEV_ATTRIB_SYSPATH); + + primaryBus.id.plat = &xf86_platform_devices[0]; + primaryBus.type = BUS_PLATFORM; + + xf86Msg(X_NONE, "\tfalling back to %s\n", syspath); + } + } +} #endif diff --git a/xserver/hw/xfree86/common/xf86platformBus.h b/xserver/hw/xfree86/common/xf86platformBus.h index 4e1757854..dec195648 100644 --- a/xserver/hw/xfree86/common/xf86platformBus.h +++ b/xserver/hw/xfree86/common/xf86platformBus.h @@ -30,24 +30,36 @@ 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); extern int xf86_num_platform_devices; +extern struct xf86_platform_device *xf86_platform_devices; extern char * xf86_get_platform_attrib(int index, int attrib_id); extern int -xf86_add_platform_device(struct OdevAttributes *attribs); +xf86_get_platform_int_attrib(int index, int attrib_id, int def); +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); +/* Note starting with xserver 1.16 these 2 functions never fail */ +extern Bool xf86_add_platform_device_attrib(int index, int attrib_id, char *attrib_str); extern Bool -xf86_get_platform_device_unowned(int index); +xf86_add_platform_device_int_attrib(int index, int attrib_id, int attrib_value); extern int xf86platformAddDevice(int index); @@ -56,6 +68,8 @@ xf86platformRemoveDevice(int index); extern _X_EXPORT char * xf86_get_platform_device_attrib(struct xf86_platform_device *device, int attrib_id); +extern _X_EXPORT int +xf86_get_platform_device_int_attrib(struct xf86_platform_device *device, int attrib_id, int def); extern _X_EXPORT Bool xf86PlatformDeviceCheckBusID(struct xf86_platform_device *device, const char *busid); @@ -63,6 +77,7 @@ extern _X_EXPORT int xf86PlatformMatchDriver(char *matches[], int nmatches); extern void xf86platformVTProbe(void); +extern void xf86platformPrimary(void); #endif #endif diff --git a/xserver/hw/xfree86/common/xf86sbusBus.h b/xserver/hw/xfree86/common/xf86sbusBus.h index a4d9c6cde..9cfcbc574 100644 --- a/xserver/hw/xfree86/common/xf86sbusBus.h +++ b/xserver/hw/xfree86/common/xf86sbusBus.h @@ -52,16 +52,16 @@ typedef struct sbus_device { int fd; int width, height; sbusPromNode node; - char *descr; - char *device; + const char *descr; + const char *device; } sbusDevice, *sbusDevicePtr; struct sbus_devtable { int devId; int fbType; - char *promName; - char *driverName; - char *descr; + const char *promName; + const char *driverName; + const char *descr; }; extern _X_EXPORT void xf86SbusProbe(void); @@ -76,10 +76,10 @@ 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 pointer xf86MapSbusMem(sbusDevicePtr psdp, +extern _X_EXPORT void *xf86MapSbusMem(sbusDevicePtr psdp, unsigned long offset, unsigned long size); -extern _X_EXPORT void xf86UnmapSbusMem(sbusDevicePtr psdp, pointer addr, +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, diff --git a/xserver/hw/xfree86/common/xf86str.h b/xserver/hw/xfree86/common/xf86str.h index 4c2d147a2..a81e88614 100644 --- a/xserver/hw/xfree86/common/xf86str.h +++ b/xserver/hw/xfree86/common/xf86str.h @@ -145,7 +145,7 @@ typedef enum { typedef struct _DisplayModeRec { struct _DisplayModeRec *prev; struct _DisplayModeRec *next; - char *name; /* identifier for the mode */ + const char *name; /* identifier for the mode */ ModeStatus status; int type; @@ -212,9 +212,9 @@ typedef struct { #define GAMMA_ZERO (GAMMA_MIN / 100.0) typedef struct { - char *id; - char *vendor; - char *model; + const char *id; + const char *vendor; + const char *model; int nHsync; range hsync[MAX_HSYNC]; int nVrefresh; @@ -224,8 +224,8 @@ typedef struct { Gamma gamma; /* Gamma of the monitor */ int widthmm; int heightmm; - pointer options; - pointer DDC; + void *options; + void *DDC; Bool reducedblanking; /* Allow CVT reduced blanking modes? */ int maxPixClock; /* in kHz, like mode->Clock */ } MonRec, *MonPtr; @@ -256,10 +256,11 @@ typedef enum { RR_GET_INFO, RR_SET_CONFIG, RR_GET_MODE_MM, - GET_REQUIRED_HW_INTERFACES = 10 + GET_REQUIRED_HW_INTERFACES = 10, + SUPPORTS_SERVER_FDS = 11, } xorgDriverFuncOp; -typedef Bool xorgDriverFuncProc(ScrnInfoPtr, xorgDriverFuncOp, pointer); +typedef Bool xorgDriverFuncProc(ScrnInfoPtr, xorgDriverFuncOp, void *); /* RR_GET_INFO, RR_SET_CONFIG */ typedef struct { @@ -299,11 +300,11 @@ struct _DriverRec; typedef struct { int driverVersion; - char *driverName; + const char *driverName; void (*Identify) (int flags); Bool (*Probe) (struct _DriverRec * drv, int flags); const OptionInfoRec *(*AvailableOptions) (int chipid, int bustype); - pointer module; + void *module; int refCount; } DriverRec1; @@ -315,11 +316,11 @@ struct xf86_platform_device; typedef struct _DriverRec { int driverVersion; - char *driverName; + const char *driverName; void (*Identify) (int flags); Bool (*Probe) (struct _DriverRec * drv, int flags); const OptionInfoRec *(*AvailableOptions) (int chipid, int bustype); - pointer module; + void *module; int refCount; xorgDriverFuncProc *driverFunc; @@ -386,19 +387,19 @@ typedef enum { } DacSpeedIndex; typedef struct { - char *identifier; - char *vendor; - char *board; - char *chipset; - char *ramdac; - char *driver; + 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]; - char *clockchip; - char *busID; + const char *clockchip; + const char *busID; Bool active; Bool inUse; int videoRam; @@ -408,7 +409,7 @@ typedef struct { unsigned long IOBase; int chipID; int chipRev; - pointer options; + void *options; int irq; int screen; /* For multi-CRTC cards */ } GDevRec, *GDevPtr; @@ -424,24 +425,24 @@ typedef struct { rgb blackColour; rgb whiteColour; int defaultVisual; - char **modes; - pointer options; + const char **modes; + void *options; } DispRec, *DispPtr; typedef struct _confxvportrec { - char *identifier; - pointer options; + const char *identifier; + void *options; } confXvPortRec, *confXvPortPtr; typedef struct _confxvadaptrec { - char *identifier; + const char *identifier; int numports; confXvPortPtr ports; - pointer options; + void *options; } confXvAdaptorRec, *confXvAdaptorPtr; typedef struct _confscreenrec { - char *id; + const char *id; int screennum; int defaultdepth; int defaultbpp; @@ -452,7 +453,7 @@ typedef struct _confscreenrec { DispPtr displays; int numxvadaptors; confXvAdaptorPtr xvadaptors; - pointer options; + void *options; } confScreenRec, *confScreenPtr; typedef enum { @@ -467,29 +468,29 @@ typedef enum { typedef struct _screenlayoutrec { confScreenPtr screen; - char *topname; + const char *topname; confScreenPtr top; - char *bottomname; + const char *bottomname; confScreenPtr bottom; - char *leftname; + const char *leftname; confScreenPtr left; - char *rightname; + const char *rightname; confScreenPtr right; PositionType where; int x; int y; - char *refname; + const char *refname; confScreenPtr refscreen; } screenLayoutRec, *screenLayoutPtr; typedef struct _InputInfoRec InputInfoRec; typedef struct _serverlayoutrec { - char *id; + const char *id; screenLayoutPtr screens; GDevPtr inactives; InputInfoRec **inputs; /* NULL terminated */ - pointer options; + void *options; } serverLayoutRec, *serverLayoutPtr; typedef struct _confdribufferrec { @@ -512,7 +513,7 @@ typedef struct _confdrirec { #define NUM_RESERVED_POINTERS 14 #define NUM_RESERVED_FUNCS 10 -typedef pointer (*funcPointer) (void); +typedef void *(*funcPointer) (void); /* flags for depth 24 pixmap options */ typedef enum { @@ -581,7 +582,7 @@ typedef struct _PciChipsets { } PciChipsets; /* Entity properties */ -typedef void (*EntityProc) (int entityIndex, pointer private); +typedef void (*EntityProc) (int entityIndex, void *private); typedef struct _entityInfo { int index; @@ -671,7 +672,7 @@ typedef void xf86ModeSetProc(ScrnInfoPtr); typedef struct _ScrnInfoRec { int driverVersion; - char *driverName; /* canonical name used in */ + const char *driverName; /* canonical name used in */ /* the config file */ ScreenPtr pScreen; /* Pointer to the ScreenRec */ int scrnIndex; /* Number of this screen */ @@ -730,20 +731,20 @@ typedef struct _ScrnInfoRec { int heightmm; int xDpi; /* width DPI */ int yDpi; /* height DPI */ - char *name; /* Name to prefix messages */ - pointer driverPrivate; /* Driver private area */ + const char *name; /* Name to prefix messages */ + void *driverPrivate; /* Driver private area */ DevUnion *privates; /* Other privates can hook in * here */ DriverPtr drv; /* xf86DriverList[] entry */ - pointer module; /* Pointer to module head */ + void *module; /* Pointer to module head */ int colorKey; int overlayFlags; /* Some of these may be moved out of here into the driver private area */ - char *chipset; /* chipset name */ - char *ramdac; /* ramdac name */ - char *clockchip; /* clock name */ + 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 */ @@ -754,7 +755,7 @@ typedef struct _ScrnInfoRec { int memClk; /* memory clock */ int textClockFreq; /* clock of text mode */ Bool flipPixels; /* swap default black/white */ - pointer options; + void *options; int chipID; int chipRev; @@ -779,7 +780,7 @@ typedef struct _ScrnInfoRec { int *entityInstanceList; struct pci_device *vgaDev; - pointer reservedPtr[NUM_RESERVED_POINTERS]; + void *reservedPtr[NUM_RESERVED_POINTERS]; /* * Driver entry points. @@ -864,7 +865,7 @@ typedef enum { typedef void (*DPMSSetProcPtr) (ScrnInfoPtr, int, int); /* Input handler proc */ -typedef void (*InputHandlerProc) (int fd, pointer data); +typedef void (*InputHandlerProc) (int fd, void *data); /* These are used by xf86GetClocks */ #define CLK_REG_SAVE -1 diff --git a/xserver/hw/xfree86/common/xf86vmode.c b/xserver/hw/xfree86/common/xf86vmode.c index cad0e6a21..2b07833ad 100644 --- a/xserver/hw/xfree86/common/xf86vmode.c +++ b/xserver/hw/xfree86/common/xf86vmode.c @@ -216,7 +216,7 @@ setEventMask(ScreenPtr pScreen, ClientPtr client, unsigned long mask) } static int -XF86VidModeFreeEvents(pointer value, XID id) +XF86VidModeFreeEvents(void *value, XID id) { XF86VidModeEventPtr pOld = (XF86VidModeEventPtr) value; ScreenPtr pScreen = pOld->screen; @@ -314,7 +314,7 @@ ProcXF86VidModeGetModeLine(ClientPtr client) .type = X_Reply, .sequenceNumber = client->sequence }; - pointer mode; + void *mode; int dotClock; int ver; @@ -413,7 +413,7 @@ ProcXF86VidModeGetAllModeLines(ClientPtr client) { REQUEST(xXF86VidModeGetAllModeLinesReq); xXF86VidModeGetAllModeLinesReply rep; - pointer mode; + void *mode; int modecount, dotClock; int ver; @@ -524,7 +524,7 @@ ProcXF86VidModeAddModeLine(ClientPtr client) xXF86OldVidModeAddModeLineReq *oldstuff = (xXF86OldVidModeAddModeLineReq *) client->requestBuffer; xXF86VidModeAddModeLineReq newstuff; - pointer mode; + void *mode; int len; int dotClock; int ver; @@ -688,7 +688,7 @@ ProcXF86VidModeDeleteModeLine(ClientPtr client) xXF86OldVidModeDeleteModeLineReq *oldstuff = (xXF86OldVidModeDeleteModeLineReq *) client->requestBuffer; xXF86VidModeDeleteModeLineReq newstuff; - pointer mode; + void *mode; int len, dotClock; int ver; @@ -813,7 +813,7 @@ ProcXF86VidModeModModeLine(ClientPtr client) xXF86OldVidModeModModeLineReq *oldstuff = (xXF86OldVidModeModModeLineReq *) client->requestBuffer; xXF86VidModeModModeLineReq newstuff; - pointer mode, modetmp; + void *mode, *modetmp; int len, dotClock; int ver; @@ -942,7 +942,7 @@ ProcXF86VidModeValidateModeLine(ClientPtr client) (xXF86OldVidModeValidateModeLineReq *) client->requestBuffer; xXF86VidModeValidateModeLineReq newstuff; xXF86VidModeValidateModeLineReply rep; - pointer mode, modetmp = NULL; + void *mode, *modetmp = NULL; int len, status, dotClock; int ver; @@ -1080,7 +1080,7 @@ ProcXF86VidModeSwitchToMode(ClientPtr client) xXF86OldVidModeSwitchToModeReq *oldstuff = (xXF86OldVidModeSwitchToModeReq *) client->requestBuffer; xXF86VidModeSwitchToModeReq newstuff; - pointer mode; + void *mode; int len, dotClock; int ver; @@ -1205,7 +1205,7 @@ ProcXF86VidModeGetMonitor(ClientPtr client) }; CARD32 *hsyncdata, *vsyncdata; int i, nHsync, nVrefresh; - pointer monitor; + void *monitor; DEBUG_P("XF86VidModeGetMonitor"); diff --git a/xserver/hw/xfree86/common/xf86xv.c b/xserver/hw/xfree86/common/xf86xv.c index 92d0f6da2..b16cb5df3 100644 --- a/xserver/hw/xfree86/common/xf86xv.c +++ b/xserver/hw/xfree86/common/xf86xv.c @@ -261,7 +261,7 @@ xf86XVScreenInit(ScreenPtr pScreen, XF86VideoAdaptorPtr * adaptors, int num) sure that I appreciate that. */ ScreenPriv = malloc(sizeof(XF86XVScreenRec)); - pxvs->devPriv.ptr = (pointer) ScreenPriv; + pxvs->devPriv.ptr = (void *) ScreenPriv; if (!ScreenPriv) return FALSE; @@ -551,7 +551,7 @@ xf86XVInitAdaptors(ScreenPtr pScreen, XF86VideoAdaptorPtr * infoPtr, int number) adaptorPriv->PutImage = adaptorPtr->PutImage; adaptorPriv->ReputImage = adaptorPtr->ReputImage; /* image/still */ - pa->devPriv.ptr = (pointer) adaptorPriv; + pa->devPriv.ptr = (void *) adaptorPriv; if (!(pPort = calloc(adaptorPtr->nPorts, sizeof(XvPortRec)))) { xf86XVFreeAdaptor(pa); @@ -957,7 +957,7 @@ xf86XVReputImage(XvPortRecPrivatePtr portPriv) } static int -xf86XVReputAllVideo(WindowPtr pWin, pointer data) +xf86XVReputAllVideo(WindowPtr pWin, void *data) { XF86XVWindowPtr WinPriv = GET_XF86XV_WINDOW(pWin); @@ -1922,7 +1922,7 @@ xf86XVFillKeyHelper(ScreenPtr pScreen, CARD32 key, RegionPtr fillboxes) } void -xf86XVFillKeyHelperPort(DrawablePtr pDraw, pointer data, CARD32 key, +xf86XVFillKeyHelperPort(DrawablePtr pDraw, void *data, CARD32 key, RegionPtr clipboxes, Bool fillEverything) { WindowPtr pWin = (WindowPtr) pDraw; diff --git a/xserver/hw/xfree86/common/xf86xv.h b/xserver/hw/xfree86/common/xf86xv.h index 091efcaa9..8986e2e57 100644 --- a/xserver/hw/xfree86/common/xf86xv.h +++ b/xserver/hw/xfree86/common/xf86xv.h @@ -84,47 +84,47 @@ 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, DrawablePtr pDraw); + 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, pointer data, + 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, pointer data, + 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, pointer data, + RegionPtr clipBoxes, void *data, DrawablePtr pDraw); -typedef void (*StopVideoFuncPtr) (ScrnInfoPtr pScrn, pointer data, Bool Exit); +typedef void (*StopVideoFuncPtr) (ScrnInfoPtr pScrn, void *data, Bool Exit); typedef int (*SetPortAttributeFuncPtr) (ScrnInfoPtr pScrn, Atom attribute, - INT32 value, pointer data); + INT32 value, void *data); typedef int (*GetPortAttributeFuncPtr) (ScrnInfoPtr pScrn, Atom attribute, - INT32 *value, pointer data); + 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, pointer data); + 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, - pointer data, DrawablePtr pDraw); + 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, pointer data, + RegionPtr clipBoxes, void *data, DrawablePtr pDraw); typedef int (*QueryImageAttributesFuncPtr) (ScrnInfoPtr pScrn, int image, unsigned short *width, unsigned short *height, int *pitches, int *offsets); -typedef void (*ClipNotifyFuncPtr) (ScrnInfoPtr pScrn, pointer data, +typedef void (*ClipNotifyFuncPtr) (ScrnInfoPtr pScrn, void *data, WindowPtr window, int dx, int dy); typedef enum { @@ -137,7 +137,7 @@ typedef enum { typedef struct { int id; - char *name; + const char *name; unsigned short width, height; XvRationalRec rate; } XF86VideoEncodingRec, *XF86VideoEncodingPtr; @@ -151,13 +151,13 @@ typedef struct { int flags; int min_value; int max_value; - char *name; + const char *name; } XF86AttributeRec, *XF86AttributePtr; typedef struct { unsigned int type; int flags; - char *name; + const char *name; int nEncodings; XF86VideoEncodingPtr pEncodings; int nFormats; @@ -238,7 +238,7 @@ xf86XVFillKeyHelperDrawable(DrawablePtr pDraw, CARD32 key, RegionPtr clipboxes); extern _X_EXPORT void -xf86XVFillKeyHelperPort(DrawablePtr pDraw, pointer data, CARD32 key, +xf86XVFillKeyHelperPort(DrawablePtr pDraw, void *data, CARD32 key, RegionPtr clipboxes, Bool fillEverything); extern _X_EXPORT Bool diff --git a/xserver/hw/xfree86/common/xf86xvmc.h b/xserver/hw/xfree86/common/xf86xvmc.h index 2478fe344..aaa4e65f0 100644 --- a/xserver/hw/xfree86/common/xf86xvmc.h +++ b/xserver/hw/xfree86/common/xf86xvmc.h @@ -109,7 +109,7 @@ typedef void (*xf86XvMCDestroySubpictureProcPtr) (ScrnInfoPtr pScrn, XvMCSubpicturePtr subpicture); typedef struct { - char *name; + const char *name; int num_surfaces; XF86MCSurfaceInfoPtr *surfaces; int num_subpictures; diff --git a/xserver/hw/xfree86/ddc/Makefile.in b/xserver/hw/xfree86/ddc/Makefile.in index 602918d06..cc6c3709a 100644 --- a/xserver/hw/xfree86/ddc/Makefile.in +++ b/xserver/hw/xfree86/ddc/Makefile.in @@ -193,6 +193,8 @@ 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@ @@ -237,6 +239,10 @@ 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@ @@ -339,7 +345,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -348,6 +357,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -414,6 +424,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/xfree86/ddc/ddc.c b/xserver/hw/xfree86/ddc/ddc.c index 44c1d535c..04d1a09c5 100644 --- a/xserver/hw/xfree86/ddc/ddc.c +++ b/xserver/hw/xfree86/ddc/ddc.c @@ -299,7 +299,7 @@ xf86DoEDID_DDC1(ScrnInfoPtr pScrn, DDC1SetSpeedProc DDC1SetSpeed, /* DDC2 */ static I2CDevPtr -DDC2MakeDevice(I2CBusPtr pBus, int address, char *name) +DDC2MakeDevice(I2CBusPtr pBus, int address, const char *name) { I2CDevPtr dev = NULL; diff --git a/xserver/hw/xfree86/ddc/interpret_edid.c b/xserver/hw/xfree86/ddc/interpret_edid.c index 882a6b201..17a8f81c0 100644 --- a/xserver/hw/xfree86/ddc/interpret_edid.c +++ b/xserver/hw/xfree86/ddc/interpret_edid.c @@ -332,6 +332,97 @@ xf86ForEachVideoBlock(xf86MonPtr mon, handle_video_fn fn, void *data) } } +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) { @@ -666,49 +757,5 @@ validate_version(int scrnIndex, struct edid_version *r) Bool xf86MonitorIsHDMI(xf86MonPtr mon) { - int i = 0, version, offset; - char *edid = NULL; - - if (!mon) - return FALSE; - - if (!(mon->flags & EDID_COMPLETE_RAWDATA)) - return FALSE; - - if (!mon->no_sections) - return FALSE; - - edid = (char *) mon->rawData; - if (!edid) - return FALSE; - - /* find the CEA extension block */ - for (i = 1; i <= mon->no_sections; i++) - if (edid[i * 128] == 0x02) - break; - if (i == mon->no_sections + 1) - return FALSE; - edid += (i * 128); - - version = edid[1]; - offset = edid[2]; - if (version < 3 || offset < 4) - return FALSE; - - /* walk the cea data blocks */ - for (i = 4; i < offset; i += (edid[i] & 0x1f) + 1) { - char *x = edid + i; - - /* find a vendor specific block */ - if ((x[0] & 0xe0) >> 5 == 0x03) { - int oui = (x[3] << 16) + (x[2] << 8) + x[1]; - - /* find the HDMI vendor OUI */ - if (oui == 0x000c03) - return TRUE; - } - } - - /* guess it's not HDMI after all */ - return FALSE; + return xf86MonitorFindHDMIBlock(mon) != NULL; } diff --git a/xserver/hw/xfree86/ddc/xf86DDC.h b/xserver/hw/xfree86/ddc/xf86DDC.h index bdc7648a9..de8e71831 100644 --- a/xserver/hw/xfree86/ddc/xf86DDC.h +++ b/xserver/hw/xfree86/ddc/xf86DDC.h @@ -98,4 +98,6 @@ 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 diff --git a/xserver/hw/xfree86/dixmods/Makefile.am b/xserver/hw/xfree86/dixmods/Makefile.am index 3c43640ec..dd076e421 100644 --- a/xserver/hw/xfree86/dixmods/Makefile.am +++ b/xserver/hw/xfree86/dixmods/Makefile.am @@ -19,12 +19,12 @@ AM_CPPFLAGS = @XORG_INCS@ \ libfb_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG) libfb_la_LIBADD = $(top_builddir)/fb/libfb.la -libfb_la_SOURCES = $(top_builddir)/fb/fbcmap_mi.c fbmodule.c +libfb_la_SOURCES = fbmodule.c libfb_la_CFLAGS = $(AM_CFLAGS) libwfb_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG) libwfb_la_LIBADD = $(top_builddir)/fb/libwfb.la -libwfb_la_SOURCES = $(top_builddir)/fb/fbcmap_mi.c fbmodule.c +libwfb_la_SOURCES = fbmodule.c libwfb_la_CFLAGS = $(AM_CFLAGS) -DFB_ACCESS_WRAPPER libglx_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG) diff --git a/xserver/hw/xfree86/dixmods/Makefile.in b/xserver/hw/xfree86/dixmods/Makefile.in index 2af86613e..c19fb9a57 100644 --- a/xserver/hw/xfree86/dixmods/Makefile.in +++ b/xserver/hw/xfree86/dixmods/Makefile.in @@ -117,7 +117,7 @@ libdixmods_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libdixmods_la_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ libfb_la_DEPENDENCIES = $(top_builddir)/fb/libfb.la -am_libfb_la_OBJECTS = libfb_la-fbcmap_mi.lo libfb_la-fbmodule.lo +am_libfb_la_OBJECTS = libfb_la-fbmodule.lo libfb_la_OBJECTS = $(am_libfb_la_OBJECTS) libfb_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libfb_la_CFLAGS) \ @@ -141,7 +141,7 @@ 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-fbcmap_mi.lo libwfb_la-fbmodule.lo +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) \ @@ -235,6 +235,8 @@ 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@ @@ -279,6 +281,10 @@ 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@ @@ -381,7 +387,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -390,6 +399,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -456,6 +466,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ @@ -544,11 +558,11 @@ AM_CPPFLAGS = @XORG_INCS@ \ libfb_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG) libfb_la_LIBADD = $(top_builddir)/fb/libfb.la -libfb_la_SOURCES = $(top_builddir)/fb/fbcmap_mi.c fbmodule.c +libfb_la_SOURCES = fbmodule.c libfb_la_CFLAGS = $(AM_CFLAGS) libwfb_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG) libwfb_la_LIBADD = $(top_builddir)/fb/libwfb.la -libwfb_la_SOURCES = $(top_builddir)/fb/fbcmap_mi.c fbmodule.c +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) \ @@ -695,9 +709,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glxmodule.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdixmods_la-miinitext.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbcmap_mi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfb_la-fbmodule.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbcmap_mi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libwfb_la-fbmodule.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shmodule.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xkbKillSrv.Plo@am__quote@ @@ -732,13 +744,6 @@ libdixmods_la-miinitext.lo: $(top_srcdir)/mi/miinitext.c @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 -libfb_la-fbcmap_mi.lo: $(top_builddir)/fb/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 '$(top_builddir)/fb/fbcmap_mi.c' || echo '$(srcdir)/'`$(top_builddir)/fb/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='$(top_builddir)/fb/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 '$(top_builddir)/fb/fbcmap_mi.c' || echo '$(srcdir)/'`$(top_builddir)/fb/fbcmap_mi.c - libfb_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) $(libfb_la_CFLAGS) $(CFLAGS) -MT libfb_la-fbmodule.lo -MD -MP -MF $(DEPDIR)/libfb_la-fbmodule.Tpo -c -o libfb_la-fbmodule.lo `test -f 'fbmodule.c' || echo '$(srcdir)/'`fbmodule.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfb_la-fbmodule.Tpo $(DEPDIR)/libfb_la-fbmodule.Plo @@ -746,13 +751,6 @@ libfb_la-fbmodule.lo: fbmodule.c @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-fbmodule.lo `test -f 'fbmodule.c' || echo '$(srcdir)/'`fbmodule.c -libwfb_la-fbcmap_mi.lo: $(top_builddir)/fb/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 '$(top_builddir)/fb/fbcmap_mi.c' || echo '$(srcdir)/'`$(top_builddir)/fb/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='$(top_builddir)/fb/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 '$(top_builddir)/fb/fbcmap_mi.c' || echo '$(srcdir)/'`$(top_builddir)/fb/fbcmap_mi.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 diff --git a/xserver/hw/xfree86/dixmods/glxmodule.c b/xserver/hw/xfree86/dixmods/glxmodule.c index 133a2a65d..d53c6652d 100644 --- a/xserver/hw/xfree86/dixmods/glxmodule.c +++ b/xserver/hw/xfree86/dixmods/glxmodule.c @@ -47,10 +47,8 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. static MODULESETUPPROTO(glxSetup); -static const ExtensionModule GLXExt = { - GlxExtensionInit, - "GLX", - &noGlxExtension +static const ExtensionModule GLXExt[] = { + { GlxExtensionInit, "GLX", &noGlxExtension }, }; static XF86ModuleVersionInfo VersRec = { @@ -68,8 +66,8 @@ static XF86ModuleVersionInfo VersRec = { _X_EXPORT XF86ModuleData glxModuleData = { &VersRec, glxSetup, NULL }; -static pointer -glxSetup(pointer module, pointer opts, int *errmaj, int *errmin) +static void * +glxSetup(void *module, void *opts, int *errmaj, int *errmin) { static Bool setupDone = FALSE; __GLXprovider *provider; @@ -90,7 +88,7 @@ glxSetup(pointer module, pointer opts, int *errmaj, int *errmin) GlxPushProvider(provider); } - LoadExtension(&GLXExt, FALSE); + LoadExtensionList(GLXExt, ARRAY_SIZE(GLXExt), FALSE); return module; } diff --git a/xserver/hw/xfree86/doc/Makefile.in b/xserver/hw/xfree86/doc/Makefile.in index 2bfcce65d..257d825a9 100644 --- a/xserver/hw/xfree86/doc/Makefile.in +++ b/xserver/hw/xfree86/doc/Makefile.in @@ -151,6 +151,8 @@ 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@ @@ -195,6 +197,10 @@ 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@ @@ -297,7 +303,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -306,6 +315,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -372,6 +382,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/xfree86/doc/ddxDesign.xml b/xserver/hw/xfree86/doc/ddxDesign.xml index 7c2c20ff3..d1fd9af7b 100644 --- a/xserver/hw/xfree86/doc/ddxDesign.xml +++ b/xserver/hw/xfree86/doc/ddxDesign.xml @@ -5920,10 +5920,10 @@ These may be moved out of the loader at some point. <blockquote><para> <programlisting> - void LoadExtension(ExtensionModule *ext); + void LoadExtensionList(const ExtensionModule ext[]); </programlisting> <blockquote><para> - This registers the entry points for the extension identified by + This registers the entry points for the extension array identified by <parameter>ext</parameter>. The <structname>ExtensionModule</structname> struct is defined as: diff --git a/xserver/hw/xfree86/dri/Makefile.in b/xserver/hw/xfree86/dri/Makefile.in index 0108dccf2..8d1147b31 100644 --- a/xserver/hw/xfree86/dri/Makefile.in +++ b/xserver/hw/xfree86/dri/Makefile.in @@ -192,6 +192,8 @@ 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@ @@ -236,6 +238,10 @@ 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@ @@ -338,7 +344,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -347,6 +356,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -413,6 +423,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/xfree86/dri/dri.c b/xserver/hw/xfree86/dri/dri.c index 6af9fb9c5..5fc658e1b 100644 --- a/xserver/hw/xfree86/dri/dri.c +++ b/xserver/hw/xfree86/dri/dri.c @@ -100,6 +100,11 @@ drmServerInfo DRIDRMServerInfo; * 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, ...) { @@ -172,19 +177,15 @@ DRIOpenDRMMaster(ScrnInfoPtr pScrn, memset(&tmp, 0, sizeof(tmp)); /* Check the DRM lib version. - * drmGetLibVersion was not supported in version 1.0, so check for - * symbol first to avoid possible crash or hang. */ drmlibmajor = 1; drmlibminor = 0; - if (xf86LoaderCheckSymbol("drmGetLibVersion")) { - drmlibv = drmGetLibVersion(-1); - if (drmlibv != NULL) { - drmlibmajor = drmlibv->version_major; - drmlibminor = drmlibv->version_minor; - drmFreeVersion(drmlibv); - } + drmlibv = drmGetLibVersion(-1); + if (drmlibv != NULL) { + drmlibmajor = drmlibv->version_major; + drmlibminor = drmlibv->version_minor; + drmFreeVersion(drmlibv); } /* Check if the libdrm can handle falling back to loading based on name @@ -399,7 +400,7 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD) } DRIDrvMsg(pScreen->myNum, X_INFO, "[drm] added %d byte SAREA at %p\n", - pDRIPriv->pDriverInfo->SAREASize, pDRIPriv->hSAREA); + (int) pDRIPriv->pDriverInfo->SAREASize, (void *) (uintptr_t) pDRIPriv->hSAREA); /* Backwards compat. */ if (drmMap(pDRIPriv->drmFD, @@ -413,7 +414,7 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD) return FALSE; } DRIDrvMsg(pScreen->myNum, X_INFO, "[drm] mapped SAREA %p to %p\n", - pDRIPriv->hSAREA, pDRIPriv->pSAREA); + (void *) (uintptr_t) pDRIPriv->hSAREA, pDRIPriv->pSAREA); memset(pDRIPriv->pSAREA, 0, pDRIPriv->pDriverInfo->SAREASize); } else { @@ -441,7 +442,7 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD) return FALSE; } DRIDrvMsg(pScreen->myNum, X_INFO, "[drm] framebuffer handle = %p\n", - pDRIPriv->pDriverInfo->hFrameBuffer); + (void *) (uintptr_t) pDRIPriv->pDriverInfo->hFrameBuffer); } else { DRIDrvMsg(pScreen->myNum, X_INFO, @@ -454,14 +455,14 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD) /* Add tags for reserved contexts */ if ((reserved = drmGetReservedContextList(pDRIPriv->drmFD, &reserved_count))) { - int i; + int r; void *tag; - for (i = 0; i < reserved_count; i++) { + for (r = 0; r < reserved_count; r++) { tag = DRICreateContextPrivFromHandle(pScreen, - reserved[i], + reserved[r], DRI_CONTEXT_RESERVED); - drmAddContextTag(pDRIPriv->drmFD, reserved[i], tag); + drmAddContextTag(pDRIPriv->drmFD, reserved[r], tag); } drmFreeReservedContextList(reserved); DRIDrvMsg(pScreen->myNum, X_INFO, @@ -512,7 +513,7 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD) pDRIPriv->myContextPriv = pDRIContextPriv; DRIDrvMsg(pScreen->myNum, X_INFO, - "X context handle = %p\n", pDRIPriv->myContext); + "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. @@ -661,9 +662,9 @@ DRICloseScreen(ScreenPtr pScreen) pDRIPriv->wrap.ClipNotify = NULL; } if (pDRIInfo->wrap.AdjustFrame) { - ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); + ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen); - pScrn->AdjustFrame = pDRIPriv->wrap.AdjustFrame; + scrn->AdjustFrame = pDRIPriv->wrap.AdjustFrame; pDRIPriv->wrap.AdjustFrame = NULL; } @@ -706,13 +707,13 @@ DRICloseScreen(ScreenPtr pScreen) if (closeMaster || pDRIPriv->hSAREA != pDRIEntPriv->hLSAREA) { DRIDrvMsg(pScreen->myNum, X_INFO, "[drm] unmapping %d bytes of SAREA %p at %p\n", - pDRIInfo->SAREASize, pDRIPriv->hSAREA, pDRIPriv->pSAREA); + (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", - pDRIInfo->SAREASize, - pDRIPriv->hSAREA, pDRIPriv->pSAREA); + (int) pDRIInfo->SAREASize, + (void *) (uintptr_t) pDRIPriv->hSAREA, pDRIPriv->pSAREA); } } else { @@ -736,6 +737,10 @@ DRICloseScreen(ScreenPtr pScreen) 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; @@ -1018,7 +1023,7 @@ DRICreateContext(ScreenPtr pScreen, VisualPtr visual, } /* track this in case the client dies before cleanup */ - AddResource(context, DRIContextPrivResType, (pointer) pDRIContextPriv); + AddResource(context, DRIContextPrivResType, (void *) pDRIContextPriv); return TRUE; } @@ -1033,7 +1038,7 @@ DRIDestroyContext(ScreenPtr pScreen, XID context) /* DRIContextPrivDelete is called by the resource manager. */ Bool -DRIContextPrivDelete(pointer pResource, XID id) +DRIContextPrivDelete(void *pResource, XID id) { DRIContextPrivPtr pDRIContextPriv = (DRIContextPrivPtr) pResource; DRIScreenPrivPtr pDRIPriv; @@ -1116,7 +1121,7 @@ DRITransitionTo2d(ScreenPtr pScreen) } static int -DRIDCNTreeTraversal(WindowPtr pWin, pointer data) +DRIDCNTreeTraversal(WindowPtr pWin, void *data) { DRIDrawablePrivPtr pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin); @@ -1155,7 +1160,7 @@ DRIDriverClipNotify(ScreenPtr pScreen) if (pDRIPriv->nrWindows > 0) { pDRIPriv->nrWalked = 0; TraverseTree(pScreen->root, DRIDCNTreeTraversal, - (pointer) pDRIWindows); + (void *) pDRIWindows); } pDRIInfo->ClipNotify(pScreen, pDRIWindows, pDRIPriv->nrWindows); @@ -1250,7 +1255,7 @@ DRICreateDrawable(ScreenPtr pScreen, ClientPtr client, DrawablePtr pDrawable, /* track this in case the client dies */ AddResource(FakeClientID(client->index), DRIDrawablePrivResType, - (pointer) (intptr_t) pDrawable->id); + (void *) (intptr_t) pDrawable->id); if (pDRIDrawablePriv->hwDrawable) { drmUpdateDrawableInfo(pDRIPriv->drmFD, @@ -1303,7 +1308,7 @@ DRIDrawablePrivDestroy(WindowPtr pWin) } static Bool -DRIDestroyDrawableCB(pointer value, XID id, pointer data) +DRIDestroyDrawableCB(void *value, XID id, void *data) { if (value == data) { /* This calls back DRIDrawablePrivDelete which frees private area */ @@ -1321,7 +1326,7 @@ DRIDestroyDrawable(ScreenPtr pScreen, ClientPtr client, DrawablePtr pDrawable) if (pDrawable->type == DRAWABLE_WINDOW) { LookupClientResourceComplex(client, DRIDrawablePrivResType, DRIDestroyDrawableCB, - (pointer) (intptr_t) pDrawable->id); + (void *) (intptr_t) pDrawable->id); } else { /* pixmap (or for GLX 1.3, a PBuffer) */ /* NOT_DONE */ @@ -1332,7 +1337,7 @@ DRIDestroyDrawable(ScreenPtr pScreen, ClientPtr client, DrawablePtr pDrawable) } Bool -DRIDrawablePrivDelete(pointer pResource, XID id) +DRIDrawablePrivDelete(void *pResource, XID id) { WindowPtr pWin; int rc; @@ -1591,7 +1596,7 @@ DRIDestroyInfoRec(DRIInfoPtr DRIInfo) } void -DRIWakeupHandler(pointer wakeupData, int result, pointer pReadmask) +DRIWakeupHandler(void *wakeupData, int result, void *pReadmask) { int i; @@ -1606,7 +1611,7 @@ DRIWakeupHandler(pointer wakeupData, int result, pointer pReadmask) } void -DRIBlockHandler(pointer blockData, OSTimePtr pTimeout, pointer pReadmask) +DRIBlockHandler(void *blockData, OSTimePtr pTimeout, void *pReadmask) { int i; @@ -1622,7 +1627,7 @@ DRIBlockHandler(pointer blockData, OSTimePtr pTimeout, pointer pReadmask) void DRIDoWakeupHandler(ScreenPtr pScreen, - unsigned long result, pointer pReadmask) + unsigned long result, void *pReadmask) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); @@ -1640,7 +1645,7 @@ DRIDoWakeupHandler(ScreenPtr pScreen, void DRIDoBlockHandler(ScreenPtr pScreen, - pointer pTimeout, pointer pReadmask) + void *pTimeout, void *pReadmask) { DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); @@ -1843,7 +1848,7 @@ DRIWindowExposures(WindowPtr pWin, RegionPtr prgn, RegionPtr bsreg) } static int -DRITreeTraversal(WindowPtr pWin, pointer data) +DRITreeTraversal(WindowPtr pWin, void *data) { DRIDrawablePrivPtr pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin); @@ -1903,7 +1908,7 @@ DRICopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) RegionNull(®); pDRIPriv->nrWalked = 0; - TraverseTree(pWin, DRITreeTraversal, (pointer) (®)); + TraverseTree(pWin, DRITreeTraversal, (void *) (®)); if (RegionNotEmpty(®)) { RegionTranslate(®, ptOldOrg.x - pWin->drawable.x, @@ -2189,9 +2194,9 @@ DRILock(ScreenPtr pScreen, int flags) else if (*pDRIPriv->pLockingContext != pDRIPriv->myContext) { DRIDrvMsg(pScreen->myNum, X_ERROR, "[DRI] Locking deadlock.\n" - "\tAlready locked with context %d,\n" - "\ttrying to lock with context %d.\n", - pDRIPriv->pLockingContext, pDRIPriv->myContext); + "\tAlready locked with context %p,\n" + "\ttrying to lock with context %p.\n", + pDRIPriv->pLockingContext, (void *) (uintptr_t) pDRIPriv->myContext); } (*pDRIPriv->pLockRefCount)++; } @@ -2208,8 +2213,8 @@ DRIUnlock(ScreenPtr pScreen) if (pDRIPriv->myContext != *pDRIPriv->pLockingContext) { DRIDrvMsg(pScreen->myNum, X_ERROR, "[DRI] Unlocking inconsistency:\n" - "\tContext %d trying to unlock lock held by context %d\n", - pDRIPriv->pLockingContext, pDRIPriv->myContext); + "\tContext %p trying to unlock lock held by context %p\n", + pDRIPriv->pLockingContext, (void *) (uintptr_t) pDRIPriv->myContext); } (*pDRIPriv->pLockRefCount)--; } diff --git a/xserver/hw/xfree86/dri/dri.h b/xserver/hw/xfree86/dri/dri.h index 3606100b8..fa43a2cc2 100644 --- a/xserver/hw/xfree86/dri/dri.h +++ b/xserver/hw/xfree86/dri/dri.h @@ -151,7 +151,7 @@ typedef struct { int ddxDriverMajorVersion; int ddxDriverMinorVersion; int ddxDriverPatchVersion; - pointer frameBufferPhysicalAddress; + void *frameBufferPhysicalAddress; long frameBufferSize; long frameBufferStride; long SAREASize; @@ -224,7 +224,7 @@ extern _X_EXPORT Bool DRICreateContext(ScreenPtr pScreen, extern _X_EXPORT Bool DRIDestroyContext(ScreenPtr pScreen, XID context); -extern _X_EXPORT Bool DRIContextPrivDelete(pointer pResource, XID id); +extern _X_EXPORT Bool DRIContextPrivDelete(void *pResource, XID id); extern _X_EXPORT Bool DRICreateDrawable(ScreenPtr pScreen, ClientPtr client, @@ -235,7 +235,7 @@ extern _X_EXPORT Bool DRIDestroyDrawable(ScreenPtr pScreen, ClientPtr client, DrawablePtr pDrawable); -extern _X_EXPORT Bool DRIDrawablePrivDelete(pointer pResource, XID id); +extern _X_EXPORT Bool DRIDrawablePrivDelete(void *pResource, XID id); extern _X_EXPORT Bool DRIGetDrawableInfo(ScreenPtr pScreen, DrawablePtr pDrawable, @@ -265,18 +265,18 @@ extern _X_EXPORT void DRIDestroyInfoRec(DRIInfoPtr DRIInfo); extern _X_EXPORT Bool DRIFinishScreenInit(ScreenPtr pScreen); -extern _X_EXPORT void DRIWakeupHandler(pointer wakeupData, - int result, pointer pReadmask); +extern _X_EXPORT void DRIWakeupHandler(void *wakeupData, + int result, void *pReadmask); -extern _X_EXPORT void DRIBlockHandler(pointer blockData, - OSTimePtr pTimeout, pointer pReadmask); +extern _X_EXPORT void DRIBlockHandler(void *blockData, + OSTimePtr pTimeout, void *pReadmask); extern _X_EXPORT void DRIDoWakeupHandler(ScreenPtr pScreen, unsigned long result, - pointer pReadmask); + void *pReadmask); extern _X_EXPORT void DRIDoBlockHandler(ScreenPtr pScreen, - pointer pTimeout, pointer pReadmask); + void *pTimeout, void *pReadmask); extern _X_EXPORT void DRISwapContext(int drmFD, void *oldctx, void *newctx); diff --git a/xserver/hw/xfree86/dri2/Makefile.in b/xserver/hw/xfree86/dri2/Makefile.in index bf2825487..8be3ac22f 100644 --- a/xserver/hw/xfree86/dri2/Makefile.in +++ b/xserver/hw/xfree86/dri2/Makefile.in @@ -192,6 +192,8 @@ 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@ @@ -236,6 +238,10 @@ 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@ @@ -338,7 +344,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -347,6 +356,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -413,6 +423,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/xfree86/dri2/dri2.c b/xserver/hw/xfree86/dri2/dri2.c index 0b047f025..6459f11b1 100644 --- a/xserver/hw/xfree86/dri2/dri2.c +++ b/xserver/hw/xfree86/dri2/dri2.c @@ -130,6 +130,7 @@ typedef struct _DRI2Screen { HandleExposuresProcPtr HandleExposures; ConfigNotifyProcPtr ConfigNotify; + SetWindowPixmapProcPtr SetWindowPixmap; DRI2CreateBuffer2ProcPtr CreateBuffer2; DRI2DestroyBuffer2ProcPtr DestroyBuffer2; DRI2CopyRegion2ProcPtr CopyRegion2; @@ -156,11 +157,9 @@ GetScreenPrime(ScreenPtr master, int prime_id) ds = DRI2GetScreen(slave); if (ds->prime_id == prime_id) - break; + return slave; } - if (!slave) - return master; - return slave; + return master; } static DRI2ScreenPtr @@ -354,7 +353,7 @@ DRI2CreateDrawable(ClientPtr client, DrawablePtr pDraw, XID id, } static int -DRI2DrawableGone(pointer p, XID id) +DRI2DrawableGone(void *p, XID id) { DRI2DrawablePtr pPriv = p; DRI2DrawableRefPtr ref, next; @@ -417,18 +416,14 @@ DRI2DrawableGone(pointer p, XID id) } static DRI2BufferPtr -create_buffer(DrawablePtr pDraw, +create_buffer(DRI2ScreenPtr ds, DrawablePtr pDraw, unsigned int attachment, unsigned int format) { - ScreenPtr primeScreen; - DRI2DrawablePtr pPriv; - DRI2ScreenPtr ds; DRI2BufferPtr buffer; - pPriv = DRI2GetDrawable(pDraw); - primeScreen = GetScreenPrime(pDraw->pScreen, pPriv->prime_id); - ds = DRI2GetScreenPrime(pDraw->pScreen, pPriv->prime_id); if (ds->CreateBuffer2) - buffer = (*ds->CreateBuffer2)(primeScreen, pDraw, attachment, format); + buffer = (*ds->CreateBuffer2)(GetScreenPrime(pDraw->pScreen, + DRI2GetDrawable(pDraw)->prime_id), + pDraw, attachment, format); else buffer = (*ds->CreateBuffer)(pDraw, attachment, format); return buffer; @@ -477,7 +472,7 @@ allocate_or_reuse_buffer(DrawablePtr pDraw, DRI2ScreenPtr ds, if ((old_buf < 0) || attachment == DRI2BufferFrontLeft || !dimensions_match || (pPriv->buffers[old_buf]->format != format)) { - *buffer = create_buffer (pDraw, attachment, format); + *buffer = create_buffer(ds, pDraw, attachment, format); return TRUE; } @@ -540,7 +535,7 @@ do_get_buffers(DrawablePtr pDraw, int *width, int *height, return NULL; } - ds = DRI2GetScreen(pDraw->pScreen); + ds = DRI2GetScreenPrime(pDraw->pScreen, pPriv->prime_id); dimensions_match = (pDraw->width == pPriv->width) && (pDraw->height == pPriv->height); @@ -754,7 +749,7 @@ static inline PixmapPtr GetDrawablePixmap(DrawablePtr drawable) * pixmap */ static int -DRI2InvalidateWalk(WindowPtr pWin, pointer data) +DRI2InvalidateWalk(WindowPtr pWin, void *data) { if (pWin->drawable.pScreen->GetWindowPixmap(pWin) != data) return WT_DONTWALKCHILDREN; @@ -1092,6 +1087,14 @@ DRI2SwapBuffers(ClientPtr client, DrawablePtr pDraw, CARD64 target_msc, 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]; @@ -1149,17 +1152,13 @@ DRI2SwapBuffers(ClientPtr client, DrawablePtr pDraw, CARD64 target_msc, * we have to account for the current swap count, interval, and the * number of pending swaps. */ - *swap_target = pPriv->last_swap_target + pPriv->swap_interval; + target_msc = pPriv->last_swap_target + pPriv->swap_interval; } - else { - /* glXSwapBuffersMscOML could have a 0 target_msc, honor it */ - *swap_target = target_msc; - } pPriv->swapsPending++; ret = (*ds->ScheduleSwap) (client, pDraw, pDestBuffer, pSrcBuffer, - swap_target, divisor, remainder, func, data); + &target_msc, divisor, remainder, func, data); if (!ret) { pPriv->swapsPending--; /* didn't schedule */ xf86DrvMsg(pScreen->myNum, X_ERROR, @@ -1167,12 +1166,7 @@ DRI2SwapBuffers(ClientPtr client, DrawablePtr pDraw, CARD64 target_msc, return BadDrawable; } - pPriv->last_swap_target = *swap_target; - - /* According to spec, return expected swapbuffers count SBC after this swap - * will complete. - */ - *swap_target = pPriv->swap_count + pPriv->swapsPending; + pPriv->last_swap_target = target_msc; DRI2InvalidateDrawableAll(pDraw); @@ -1385,6 +1379,21 @@ DRI2ConfigNotify(WindowPtr pWin, int x, int y, int w, int h, int bw, return Success; } +static void +DRI2SetWindowPixmap(WindowPtr pWin, PixmapPtr pPix) +{ + DrawablePtr pDraw = (DrawablePtr) pWin; + ScreenPtr pScreen = pDraw->pScreen; + DRI2ScreenPtr ds = DRI2GetScreen(pScreen); + + pScreen->SetWindowPixmap = ds->SetWindowPixmap; + (*pScreen->SetWindowPixmap) (pWin, pPix); + ds->SetWindowPixmap = pScreen->SetWindowPixmap; + pScreen->SetWindowPixmap = DRI2SetWindowPixmap; + + DRI2InvalidateDrawableAll(pDraw); +} + #define MAX_PRIME DRI2DriverPrimeMask static int get_prime_id(void) @@ -1531,6 +1540,9 @@ DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info) 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 < sizeof(driverTypeNames) / sizeof(driverTypeNames[0]); i++) { if (i < ds->numDrivers && ds->driverNames[i]) { @@ -1555,6 +1567,7 @@ 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); @@ -1563,8 +1576,6 @@ DRI2CloseScreen(ScreenPtr pScreen) dixSetPrivate(&pScreen->devPrivates, dri2ScreenPrivateKey, NULL); } -extern Bool DRI2ModuleSetup(void); - /* Called by InitExtensions() */ Bool DRI2ModuleSetup(void) diff --git a/xserver/hw/xfree86/exa/Makefile.in b/xserver/hw/xfree86/exa/Makefile.in index b27e88e08..ecf602edb 100644 --- a/xserver/hw/xfree86/exa/Makefile.in +++ b/xserver/hw/xfree86/exa/Makefile.in @@ -232,6 +232,8 @@ 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@ @@ -276,6 +278,10 @@ 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@ @@ -378,7 +384,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -387,6 +396,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -453,6 +463,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/xfree86/exa/examodule.c b/xserver/hw/xfree86/exa/examodule.c index 4e809ea37..76f780ab6 100644 --- a/xserver/hw/xfree86/exa/examodule.c +++ b/xserver/hw/xfree86/exa/examodule.c @@ -128,7 +128,7 @@ exaDDXDriverInit(ScreenPtr pScreen) if (pExaScr->info->flags & EXA_OFFSCREEN_PIXMAPS) { if (!(pExaScr->info->flags & EXA_HANDLES_PIXMAPS) && pExaScr->info->offScreenBase < pExaScr->info->memorySize) { - char *heuristicName; + const char *heuristicName; heuristicName = xf86GetOptValString(pScreenPriv->options, EXAOPT_MIGRATION_HEURISTIC); diff --git a/xserver/hw/xfree86/exa/man/Makefile.in b/xserver/hw/xfree86/exa/man/Makefile.in index 689947de6..98e2150e7 100644 --- a/xserver/hw/xfree86/exa/man/Makefile.in +++ b/xserver/hw/xfree86/exa/man/Makefile.in @@ -160,6 +160,8 @@ 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@ @@ -204,6 +206,10 @@ 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@ @@ -268,6 +274,7 @@ MAN_SUBSTS = @MAN_SUBSTS@ -e 's|__logdir__|$(logdir)|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@ @@ -322,7 +329,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -331,6 +341,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -397,6 +408,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/xfree86/fbdevhw/Makefile.in b/xserver/hw/xfree86/fbdevhw/Makefile.in index 2892bb07b..37b6b020b 100644 --- a/xserver/hw/xfree86/fbdevhw/Makefile.in +++ b/xserver/hw/xfree86/fbdevhw/Makefile.in @@ -235,6 +235,8 @@ 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@ @@ -279,6 +281,10 @@ 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@ @@ -381,7 +387,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -390,6 +399,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -456,6 +466,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/xfree86/fbdevhw/fbdevhw.c b/xserver/hw/xfree86/fbdevhw/fbdevhw.c index cbb40930b..0450822ee 100644 --- a/xserver/hw/xfree86/fbdevhw/fbdevhw.c +++ b/xserver/hw/xfree86/fbdevhw/fbdevhw.c @@ -81,15 +81,13 @@ typedef struct { Bool fbdevHWGetRec(ScrnInfoPtr pScrn) { - fbdevHWPtr fPtr; - if (fbdevHWPrivateIndex < 0) fbdevHWPrivateIndex = xf86AllocateScrnInfoPrivateIndex(); if (FBDEVHWPTR(pScrn) != NULL) return TRUE; - fPtr = FBDEVHWPTRLVAL(pScrn) = xnfcalloc(sizeof(fbdevHWRec), 1); + FBDEVHWPTRLVAL(pScrn) = xnfcalloc(sizeof(fbdevHWRec), 1); return TRUE; } @@ -301,7 +299,7 @@ fbdev_open_pci(struct pci_device *pPci, char **namep) } static int -fbdev_open(int scrnIndex, char *dev, char **namep) +fbdev_open(int scrnIndex, const char *dev, char **namep) { struct fb_fix_screeninfo fix; int fd; @@ -497,7 +495,7 @@ fbdevHWSetMode(ScrnInfoPtr pScrn, DisplayModePtr mode, Bool check) void fbdevHWSetVideoModes(ScrnInfoPtr pScrn) { - char **modename; + const char **modename; DisplayModePtr mode, this, last = pScrn->modes; if (NULL == pScrn->display->modes) diff --git a/xserver/hw/xfree86/fbdevhw/man/Makefile.in b/xserver/hw/xfree86/fbdevhw/man/Makefile.in index 36eba871a..de2f00d52 100644 --- a/xserver/hw/xfree86/fbdevhw/man/Makefile.in +++ b/xserver/hw/xfree86/fbdevhw/man/Makefile.in @@ -160,6 +160,8 @@ 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@ @@ -204,6 +206,10 @@ 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@ @@ -268,6 +274,7 @@ MAN_SUBSTS = @MAN_SUBSTS@ -e 's|__logdir__|$(logdir)|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@ @@ -322,7 +329,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -331,6 +341,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -397,6 +408,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/xfree86/glamor_egl/Makefile.am b/xserver/hw/xfree86/glamor_egl/Makefile.am new file mode 100644 index 000000000..85e1c0c06 --- /dev/null +++ b/xserver/hw/xfree86/glamor_egl/Makefile.am @@ -0,0 +1,43 @@ +# 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 \ + $(top_srcdir)/glamor/glamor_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 \ + $() + +AM_CFLAGS = $(DIX_CFLAGS) $(XORG_CFLAGS) $(GLAMOR_CFLAGS) $(GBM_CFLAGS) diff --git a/xserver/hw/xfree86/glamor_egl/Makefile.in b/xserver/hw/xfree86/glamor_egl/Makefile.in new file mode 100644 index 000000000..2cb23328f --- /dev/null +++ b/xserver/hw/xfree86/glamor_egl/Makefile.in @@ -0,0 +1,900 @@ +# Makefile.in generated by automake 1.12.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2012 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__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } +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 +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/depcomp +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.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)/m4/xorg-tls.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +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/kdrive-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_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__depfiles_maybe = depfiles +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 +ETAGS = etags +CTAGS = ctags +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@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +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@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_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@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +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@ +GLX_TLS = @GLX_TLS@ +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_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@ +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@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +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@ +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@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +UDEV_CFLAGS = @UDEV_CFLAGS@ +UDEV_LIBS = @UDEV_LIBS@ +UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ +WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ +WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ +WINDRES = @WINDRES@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_CFLAGS = @XDMX_CFLAGS@ +XDMX_LIBS = @XDMX_LIBS@ +XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XF86CONFIGDIR = @XF86CONFIGDIR@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +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@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +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@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_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@ +__XCONFIGDIR__ = @__XCONFIGDIR__@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +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@ +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@ +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 \ + $(top_srcdir)/glamor/glamor_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 \ + $() + +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 +.PRECIOUS: 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__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + 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@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glamor_eglmodule.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glamor_xv.Plo@am__quote@ + +.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 $< + +.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 `$(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 + +glamor_xv.lo: $(top_srcdir)/glamor/glamor_xv.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_xv.lo -MD -MP -MF $(DEPDIR)/glamor_xv.Tpo -c -o glamor_xv.lo `test -f '$(top_srcdir)/glamor/glamor_xv.c' || echo '$(srcdir)/'`$(top_srcdir)/glamor/glamor_xv.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/glamor_xv.Tpo $(DEPDIR)/glamor_xv.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/glamor/glamor_xv.c' object='glamor_xv.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_xv.lo `test -f '$(top_srcdir)/glamor/glamor_xv.c' || echo '$(srcdir)/'`$(top_srcdir)/glamor/glamor_xv.c + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + 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 +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + 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: $(HEADERS) $(SOURCES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP)'; \ + 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: $(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 -rf ./$(DEPDIR) + -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 -rf ./$(DEPDIR) + -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 all all-am check check-am clean clean-generic \ + clean-libtool clean-moduleLTLIBRARIES cscopelist ctags \ + 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 uninstall uninstall-am \ + uninstall-moduleLTLIBRARIES + + +# 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: diff --git a/xserver/hw/xfree86/i2c/Makefile.in b/xserver/hw/xfree86/i2c/Makefile.in index 64cfd9ab3..f97c9a348 100644 --- a/xserver/hw/xfree86/i2c/Makefile.in +++ b/xserver/hw/xfree86/i2c/Makefile.in @@ -245,6 +245,8 @@ 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@ @@ -289,6 +291,10 @@ 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@ @@ -391,7 +397,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -400,6 +409,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -466,6 +476,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/xfree86/i2c/bt829.c b/xserver/hw/xfree86/i2c/bt829.c index 070cb2044..991c26eab 100644 --- a/xserver/hw/xfree86/i2c/bt829.c +++ b/xserver/hw/xfree86/i2c/bt829.c @@ -500,6 +500,7 @@ bt829_Detect(I2CBusPtr b, I2CSlaveAddr addr) { BT829Ptr bt; I2CByte a; + char *devname; bt = calloc(1, sizeof(BT829Rec)); if (bt == NULL) @@ -520,31 +521,31 @@ bt829_Detect(I2CBusPtr b, I2CSlaveAddr addr) bt->id = btread(bt, IDCODE); - free(bt->d.DevName); - bt->d.DevName = calloc(200, sizeof(char)); + free((void *) bt->d.DevName); + bt->d.DevName = devname = calloc(200, sizeof(char)); switch (BTVERSION) { case BT815: - sprintf(bt->d.DevName, "bt815a video decoder, revision %d", + sprintf(devname, "bt815a video decoder, revision %d", bt->id & 0xf); break; case BT817: - sprintf(bt->d.DevName, "bt817a video decoder, revision %d", + sprintf(devname, "bt817a video decoder, revision %d", bt->id & 0xf); break; case BT819: - sprintf(bt->d.DevName, "bt819a video decoder, revision %d", + sprintf(devname, "bt819a video decoder, revision %d", bt->id & 0xf); break; case BT827: - sprintf(bt->d.DevName, "bt827a/b video decoder, revision %d", + sprintf(devname, "bt827a/b video decoder, revision %d", bt->id & 0xf); break; case BT829: - sprintf(bt->d.DevName, "bt829a/b video decoder, revision %d", + sprintf(devname, "bt829a/b video decoder, revision %d", bt->id & 0xf); break; default: - sprintf(bt->d.DevName, + sprintf(devname, "bt8xx/unknown video decoder version %d, revision %d", bt->id >> 4, bt->id & 0xf); break; diff --git a/xserver/hw/xfree86/i2c/fi1236.c b/xserver/hw/xfree86/i2c/fi1236.c index 2eb27ba6d..ebd14547d 100644 --- a/xserver/hw/xfree86/i2c/fi1236.c +++ b/xserver/hw/xfree86/i2c/fi1236.c @@ -545,7 +545,7 @@ FI1236_set_tuner_type(FI1236Ptr f, int type) } static CARD32 -AFC_TimerCallback(OsTimerPtr timer, CARD32 time, pointer data) +AFC_TimerCallback(OsTimerPtr timer, CARD32 time, void *data) { FI1236Ptr f = (FI1236Ptr) data; diff --git a/xserver/hw/xfree86/i2c/msp3430.c b/xserver/hw/xfree86/i2c/msp3430.c index 312a2d1d1..a501489ee 100644 --- a/xserver/hw/xfree86/i2c/msp3430.c +++ b/xserver/hw/xfree86/i2c/msp3430.c @@ -163,7 +163,7 @@ DetectMSP3430(I2CBusPtr b, I2CSlaveAddr addr) m->d.ByteTimeout = b->ByteTimeout; if (!I2C_WriteRead(&(m->d), NULL, 0, &a, 1)) { - free(m->d.DevName); + free((void *) m->d.DevName); free(m); return NULL; } @@ -250,12 +250,12 @@ DetectMSP3430(I2CBusPtr b, I2CSlaveAddr addr) supported ? "" : " (unsupported)", rom_version, m->chip_id); if (!supported) { - free(m->d.DevName); + free((void *) m->d.DevName); free(m); return NULL; } if (!I2CDevInit(&(m->d))) { - free(m->d.DevName); + free((void *) m->d.DevName); free(m); return NULL; } diff --git a/xserver/hw/xfree86/i2c/xf86i2c.h b/xserver/hw/xfree86/i2c/xf86i2c.h index e296d7d81..26303ff6f 100644 --- a/xserver/hw/xfree86/i2c/xf86i2c.h +++ b/xserver/hw/xfree86/i2c/xf86i2c.h @@ -66,7 +66,7 @@ extern _X_EXPORT int xf86I2CGetScreenBuses(int scrnIndex, /* I2C slave devices */ typedef struct _I2CDevRec { - char *DevName; + const char *DevName; int BitTimeout; /* usec */ int ByteTimeout; /* usec */ diff --git a/xserver/hw/xfree86/int10/Makefile.in b/xserver/hw/xfree86/int10/Makefile.in index 98833518b..eff2531c4 100644 --- a/xserver/hw/xfree86/int10/Makefile.in +++ b/xserver/hw/xfree86/int10/Makefile.in @@ -211,6 +211,8 @@ 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@ @@ -255,6 +257,10 @@ 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@ @@ -357,7 +363,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -366,6 +375,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -432,6 +442,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/xfree86/int10/generic.c b/xserver/hw/xfree86/int10/generic.c index d7594def2..abbd36f3c 100644 --- a/xserver/hw/xfree86/int10/generic.c +++ b/xserver/hw/xfree86/int10/generic.c @@ -20,12 +20,12 @@ #define ALLOC_ENTRIES(x) ((V_RAM / x) - 1) -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); +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 @@ -87,8 +87,8 @@ xf86ExtendedInitInt10(int entityIndex, int Flags) if (!xf86Int10ExecSetup(pInt)) goto error0; pInt->mem = &genericMem; - pInt->private = (pointer) xnfcalloc(1, sizeof(genericInt10Priv)); - INTPriv(pInt)->alloc = (pointer) xnfcalloc(1, ALLOC_ENTRIES(getpagesize())); + 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); @@ -339,39 +339,39 @@ xf86Int10FreePages(xf86Int10InfoPtr pInt, void *pbase, int num) #define VRAM(addr) ((addr >= V_RAM) && (addr < (V_RAM + VRAM_SIZE))) #define V_ADDR_RB(addr) \ - (VRAM(addr)) ? MMIO_IN8((CARD8*)VRAM_BASE,VRAM_ADDR(addr)) \ - : *(CARD8*) V_ADDR(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((CARD16*)VRAM_BASE,VRAM_ADDR(addr)) \ - : ldw_u((pointer)V_ADDR(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((CARD32*)VRAM_BASE,VRAM_ADDR(addr)) \ - : ldl_u((pointer)V_ADDR(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((CARD8*)VRAM_BASE,VRAM_ADDR(addr),val); \ + MMIO_OUT8((uint8_t*)VRAM_BASE,VRAM_ADDR(addr),val); \ else \ - *(CARD8*) V_ADDR(addr) = val; + *(uint8_t*) V_ADDR(addr) = val; #define V_ADDR_WW(addr,val) \ if(VRAM(addr)) \ - MMIO_OUT16((CARD16*)VRAM_BASE,VRAM_ADDR(addr),val); \ + MMIO_OUT16((uint16_t*)VRAM_BASE,VRAM_ADDR(addr),val); \ else \ - stw_u((val),(pointer)(V_ADDR(addr))); + stw_u((val),(void *)(V_ADDR(addr))); #define V_ADDR_WL(addr,val) \ if (VRAM(addr)) \ - MMIO_OUT32((CARD32*)VRAM_BASE,VRAM_ADDR(addr),val); \ + MMIO_OUT32((uint32_t*)VRAM_BASE,VRAM_ADDR(addr),val); \ else \ - stl_u(val,(pointer)(V_ADDR(addr))); + stl_u(val,(void *)(V_ADDR(addr))); -static CARD8 +static uint8_t read_b(xf86Int10InfoPtr pInt, int addr) { return V_ADDR_RB(addr); } -static CARD16 +static uint16_t read_w(xf86Int10InfoPtr pInt, int addr) { #if X_BYTE_ORDER == X_LITTLE_ENDIAN @@ -381,7 +381,7 @@ read_w(xf86Int10InfoPtr pInt, int addr) return V_ADDR_RB(addr) | (V_ADDR_RB(addr + 1) << 8); } -static CARD32 +static uint32_t read_l(xf86Int10InfoPtr pInt, int addr) { #if X_BYTE_ORDER == X_LITTLE_ENDIAN @@ -394,7 +394,7 @@ read_l(xf86Int10InfoPtr pInt, int addr) } static void -write_b(xf86Int10InfoPtr pInt, int addr, CARD8 val) +write_b(xf86Int10InfoPtr pInt, int addr, uint8_t val) { V_ADDR_WB(addr, val); } @@ -412,7 +412,7 @@ write_w(xf86Int10InfoPtr pInt, int addr, CARD16 val) } static void -write_l(xf86Int10InfoPtr pInt, int addr, CARD32 val) +write_l(xf86Int10InfoPtr pInt, int addr, uint32_t val) { #if X_BYTE_ORDER == X_LITTLE_ENDIAN if (OFF(addr + 3) > 2) { @@ -425,8 +425,8 @@ write_l(xf86Int10InfoPtr pInt, int addr, CARD32 val) V_ADDR_WB(addr + 3, val >> 24); } -pointer -xf86int10Addr(xf86Int10InfoPtr pInt, CARD32 addr) +void * +xf86int10Addr(xf86Int10InfoPtr pInt, uint32_t addr) { return V_ADDR(addr); } diff --git a/xserver/hw/xfree86/int10/helper_exec.c b/xserver/hw/xfree86/int10/helper_exec.c index 1c58cf7ae..6a83f422e 100644 --- a/xserver/hw/xfree86/int10/helper_exec.c +++ b/xserver/hw/xfree86/int10/helper_exec.c @@ -37,12 +37,12 @@ #endif #include <pciaccess.h> -static int pciCfg1in(CARD16 addr, CARD32 *val); -static int pciCfg1out(CARD16 addr, CARD32 val); -static int pciCfg1inw(CARD16 addr, CARD16 *val); -static int pciCfg1outw(CARD16 addr, CARD16 val); -static int pciCfg1inb(CARD16 addr, CARD8 *val); -static int pciCfg1outb(CARD16 addr, CARD8 val); +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); @@ -58,13 +58,13 @@ setup_int(xf86Int10InfoPtr pInt) return -1; Int10Current = pInt; } - X86_EAX = (CARD32) pInt->ax; - X86_EBX = (CARD32) pInt->bx; - X86_ECX = (CARD32) pInt->cx; - X86_EDX = (CARD32) pInt->dx; - X86_ESI = (CARD32) pInt->si; - X86_EDI = (CARD32) pInt->di; - X86_EBP = (CARD32) pInt->bp; + 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; @@ -86,15 +86,15 @@ void finish_int(xf86Int10InfoPtr pInt, int sig) { OsReleaseSignals(); - pInt->ax = (CARD32) X86_EAX; - pInt->bx = (CARD32) X86_EBX; - pInt->cx = (CARD32) X86_ECX; - pInt->dx = (CARD32) X86_EDX; - pInt->si = (CARD32) X86_ESI; - pInt->di = (CARD32) X86_EDI; - pInt->es = (CARD16) X86_ES; - pInt->bp = (CARD32) X86_EBP; - pInt->flags = (CARD32) X86_FLAGS; + 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); @@ -102,23 +102,23 @@ finish_int(xf86Int10InfoPtr pInt, int sig) } /* general software interrupt handler */ -CARD32 +uint32_t getIntVect(xf86Int10InfoPtr pInt, int num) { return MEM_RW(pInt, num << 2) + (MEM_RW(pInt, (num << 2) + 2) << 4); } void -pushw(xf86Int10InfoPtr pInt, CARD16 val) +pushw(xf86Int10InfoPtr pInt, uint16_t val) { X86_ESP -= 2; - MEM_WW(pInt, ((CARD32) X86_SS << 4) + X86_SP, val); + MEM_WW(pInt, ((uint32_t) X86_SS << 4) + X86_SP, val); } int run_bios_int(int num, xf86Int10InfoPtr pInt) { - CARD32 eflags; + uint32_t eflags; #ifndef _PC /* check if bios vector is initialized */ @@ -167,10 +167,10 @@ void dump_code(xf86Int10InfoPtr pInt) { int i; - CARD32 lina = SEG_ADR((CARD32), X86_CS, IP); + uint32_t lina = SEG_ADR((uint32_t), X86_CS, IP); xf86DrvMsgVerb(pInt->pScrn->scrnIndex, X_INFO, 3, "code at 0x%8.8" PRIx32 ":\n", - lina); + (unsigned) lina); for (i = 0; i < 0x10; i++) xf86ErrorFVerb(3, " %2.2x", MEM_RB(pInt, lina + i)); xf86ErrorFVerb(3, "\n"); @@ -203,8 +203,8 @@ void stack_trace(xf86Int10InfoPtr pInt) { int i = 0; - unsigned long stack = SEG_ADR((CARD32), X86_SS, SP); - unsigned long tail = (CARD32) ((X86_SS << 4) + 0x1000); + unsigned long stack = SEG_ADR((uint32_t), X86_SS, SP); + unsigned long tail = (uint32_t) ((X86_SS << 4) + 0x1000); if (stack >= tail) return; @@ -222,14 +222,14 @@ stack_trace(xf86Int10InfoPtr pInt) int port_rep_inb(xf86Int10InfoPtr pInt, - CARD16 port, CARD32 base, int d_f, CARD32 count) + uint16_t port, uint32_t base, int d_f, uint32_t count) { register int inc = d_f ? -1 : 1; - CARD32 dst = base; + uint32_t dst = base; if (PRINT_PORT && DEBUG_IO_TRACE()) ErrorF(" rep_insb(%#x) %" PRIu32 " bytes at %8.8" PRIx32 " %s\n", - port, count, base, d_f ? "up" : "down"); + port, (unsigned) count, (unsigned) base, d_f ? "up" : "down"); while (count--) { MEM_WB(pInt, dst, x_inb(port)); dst += inc; @@ -239,14 +239,14 @@ port_rep_inb(xf86Int10InfoPtr pInt, int port_rep_inw(xf86Int10InfoPtr pInt, - CARD16 port, CARD32 base, int d_f, CARD32 count) + uint16_t port, uint32_t base, int d_f, uint32_t count) { register int inc = d_f ? -2 : 2; - CARD32 dst = base; + uint32_t dst = base; if (PRINT_PORT && DEBUG_IO_TRACE()) ErrorF(" rep_insw(%#x) %" PRIu32 " bytes at %8.8" PRIx32 " %s\n", - port, count, base, d_f ? "up" : "down"); + port, (unsigned) count, (unsigned) base, d_f ? "up" : "down"); while (count--) { MEM_WW(pInt, dst, x_inw(port)); dst += inc; @@ -256,14 +256,14 @@ port_rep_inw(xf86Int10InfoPtr pInt, int port_rep_inl(xf86Int10InfoPtr pInt, - CARD16 port, CARD32 base, int d_f, CARD32 count) + uint16_t port, uint32_t base, int d_f, uint32_t count) { register int inc = d_f ? -4 : 4; - CARD32 dst = base; + uint32_t dst = base; if (PRINT_PORT && DEBUG_IO_TRACE()) ErrorF(" rep_insl(%#x) %" PRIu32 " bytes at %8.8" PRIx32 " %s\n", - port, count, base, d_f ? "up" : "down"); + port, (unsigned) count, (unsigned) base, d_f ? "up" : "down"); while (count--) { MEM_WL(pInt, dst, x_inl(port)); dst += inc; @@ -273,14 +273,14 @@ port_rep_inl(xf86Int10InfoPtr pInt, int port_rep_outb(xf86Int10InfoPtr pInt, - CARD16 port, CARD32 base, int d_f, CARD32 count) + uint16_t port, uint32_t base, int d_f, uint32_t count) { register int inc = d_f ? -1 : 1; - CARD32 dst = base; + uint32_t dst = base; if (PRINT_PORT && DEBUG_IO_TRACE()) ErrorF(" rep_outb(%#x) %" PRIu32 " bytes at %8.8" PRIx32 " %s\n", - port, count, base, d_f ? "up" : "down"); + port, (unsigned) count, (unsigned) base, d_f ? "up" : "down"); while (count--) { x_outb(port, MEM_RB(pInt, dst)); dst += inc; @@ -290,14 +290,14 @@ port_rep_outb(xf86Int10InfoPtr pInt, int port_rep_outw(xf86Int10InfoPtr pInt, - CARD16 port, CARD32 base, int d_f, CARD32 count) + uint16_t port, uint32_t base, int d_f, uint32_t count) { register int inc = d_f ? -2 : 2; - CARD32 dst = base; + uint32_t dst = base; if (PRINT_PORT && DEBUG_IO_TRACE()) ErrorF(" rep_outw(%#x) %" PRIu32 " bytes at %8.8" PRIx32 " %s\n", - port, count, base, d_f ? "up" : "down"); + port, (unsigned) count, (unsigned) base, d_f ? "up" : "down"); while (count--) { x_outw(port, MEM_RW(pInt, dst)); dst += inc; @@ -307,14 +307,14 @@ port_rep_outw(xf86Int10InfoPtr pInt, int port_rep_outl(xf86Int10InfoPtr pInt, - CARD16 port, CARD32 base, int d_f, CARD32 count) + uint16_t port, uint32_t base, int d_f, uint32_t count) { register int inc = d_f ? -4 : 4; - CARD32 dst = base; + uint32_t dst = base; if (PRINT_PORT && DEBUG_IO_TRACE()) ErrorF(" rep_outl(%#x) %" PRIu32 " bytes at %8.8" PRIx32 " %s\n", - port, count, base, d_f ? "up" : "down"); + port, (unsigned) count, (unsigned) base, d_f ? "up" : "down"); while (count--) { x_outl(port, MEM_RL(pInt, dst)); dst += inc; @@ -322,14 +322,14 @@ port_rep_outl(xf86Int10InfoPtr pInt, return dst - base; } -CARD8 -x_inb(CARD16 port) +uint8_t +x_inb(uint16_t port) { - CARD8 val; + uint8_t val; if (port == 0x40) { Int10Current->inb40time++; - val = (CARD8) (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); @@ -353,10 +353,10 @@ x_inb(CARD16 port) return val; } -CARD16 -x_inw(CARD16 port) +uint16_t +x_inw(uint16_t port) { - CARD16 val; + uint16_t val; if (port == 0x5c) { struct timeval tv; @@ -366,7 +366,7 @@ x_inw(CARD16 port) * Approximate this by dividing by 3. */ X_GETTIMEOFDAY(&tv); - val = (CARD16) (tv.tv_usec / 3); + val = (uint16_t) (tv.tv_usec / 3); } else if (!pciCfg1inw(port, &val)) { val = pci_io_read16(Int10Current->io, port); @@ -377,7 +377,7 @@ x_inw(CARD16 port) } void -x_outb(CARD16 port, CARD8 val) +x_outb(uint16_t port, uint8_t val) { if ((port == 0x43) && (val == 0)) { struct timeval tv; @@ -389,7 +389,7 @@ x_outb(CARD16 port, CARD8 val) * the bottom bit as a byte select. See inb(0x40) above. */ X_GETTIMEOFDAY(&tv); - Int10Current->inb40time = (CARD16) (tv.tv_usec | 1); + 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__ @@ -411,7 +411,7 @@ x_outb(CARD16 port, CARD8 val) } void -x_outw(CARD16 port, CARD16 val) +x_outw(uint16_t port, uint16_t val) { if (!pciCfg1outw(port, val)) { @@ -421,66 +421,66 @@ x_outw(CARD16 port, CARD16 val) } } -CARD32 -x_inl(CARD16 port) +uint32_t +x_inl(uint16_t port) { - CARD32 val; + 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, val); + ErrorF(" inl(%#x) = %8.8" PRIx32 "\n", port, (unsigned) val); } return val; } void -x_outl(CARD16 port, CARD32 val) +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, val); + ErrorF(" outl(%#x, %8.8" PRIx32 ")\n", port, (unsigned) val); pci_io_write32(Int10Current->io, port, val); } } -CARD8 -Mem_rb(CARD32 addr) +uint8_t +Mem_rb(uint32_t addr) { return (*Int10Current->mem->rb) (Int10Current, addr); } -CARD16 -Mem_rw(CARD32 addr) +uint16_t +Mem_rw(uint32_t addr) { return (*Int10Current->mem->rw) (Int10Current, addr); } -CARD32 -Mem_rl(CARD32 addr) +uint32_t +Mem_rl(uint32_t addr) { return (*Int10Current->mem->rl) (Int10Current, addr); } void -Mem_wb(CARD32 addr, CARD8 val) +Mem_wb(uint32_t addr, uint8_t val) { (*Int10Current->mem->wb) (Int10Current, addr, val); } void -Mem_ww(CARD32 addr, CARD16 val) +Mem_ww(uint32_t addr, uint16_t val) { (*Int10Current->mem->ww) (Int10Current, addr, val); } void -Mem_wl(CARD32 addr, CARD32 val) +Mem_wl(uint32_t addr, uint32_t val) { (*Int10Current->mem->wl) (Int10Current, addr, val); } -static CARD32 PciCfg1Addr = 0; +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)) @@ -491,10 +491,10 @@ static CARD32 PciCfg1Addr = 0; #define PCI_TAG(x) ((x) & 0x7fffff00) static struct pci_device * -pci_device_for_cfg_address(CARD32 addr) +pci_device_for_cfg_address(uint32_t addr) { struct pci_device *dev = NULL; - CARD32 tag = PCI_TAG(addr); + uint32_t tag = PCI_TAG(addr); struct pci_slot_match slot_match = { .domain = PCI_DOM_FROM_TAG(tag), @@ -516,7 +516,7 @@ pci_device_for_cfg_address(CARD32 addr) } static int -pciCfg1in(CARD16 addr, CARD32 *val) +pciCfg1in(uint16_t addr, uint32_t *val) { if (addr == 0xCF8) { *val = PciCfg1Addr; @@ -526,15 +526,15 @@ pciCfg1in(CARD16 addr, CARD32 *val) 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", PciCfg1Addr, - *val); + ErrorF(" cfg_inl(%#" PRIx32 ") = %8.8" PRIx32 "\n", (unsigned) PciCfg1Addr, + (unsigned) *val); return 1; } return 0; } static int -pciCfg1out(CARD16 addr, CARD32 val) +pciCfg1out(uint16_t addr, uint32_t val) { if (addr == 0xCF8) { PciCfg1Addr = val; @@ -542,8 +542,8 @@ pciCfg1out(CARD16 addr, CARD32 val) } if (addr == 0xCFC) { if (PRINT_PORT && DEBUG_IO_TRACE()) - ErrorF(" cfg_outl(%#" PRIx32 ", %8.8" PRIx32 ")\n", PciCfg1Addr, - val); + 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; @@ -552,7 +552,7 @@ pciCfg1out(CARD16 addr, CARD32 val) } static int -pciCfg1inw(CARD16 addr, CARD16 *val) +pciCfg1inw(uint16_t addr, uint16_t *val) { int shift; @@ -567,30 +567,30 @@ pciCfg1inw(CARD16 addr, CARD16 *val) 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", PciCfg1Addr + offset, - *val); + ErrorF(" cfg_inw(%#" PRIx32 ") = %4.4x\n", (unsigned) (PciCfg1Addr + offset), + (unsigned) *val); return 1; } return 0; } static int -pciCfg1outw(CARD16 addr, CARD16 val) +pciCfg1outw(uint16_t addr, uint16_t val) { int shift; if ((addr >= 0xCF8) && (addr <= 0xCFB)) { shift = (addr - 0xCF8) * 8; PciCfg1Addr &= ~(0xffff << shift); - PciCfg1Addr |= ((CARD32) val) << 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", PciCfg1Addr + offset, - val); + 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; @@ -599,7 +599,7 @@ pciCfg1outw(CARD16 addr, CARD16 val) } static int -pciCfg1inb(CARD16 addr, CARD8 *val) +pciCfg1inb(uint16_t addr, uint8_t *val) { int shift; @@ -614,30 +614,30 @@ pciCfg1inb(CARD16 addr, CARD8 *val) 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", PciCfg1Addr + offset, - *val); + ErrorF(" cfg_inb(%#" PRIx32 ") = %2.2x\n", (unsigned) (PciCfg1Addr + offset), + (unsigned) *val); return 1; } return 0; } static int -pciCfg1outb(CARD16 addr, CARD8 val) +pciCfg1outb(uint16_t addr, uint8_t val) { int shift; if ((addr >= 0xCF8) && (addr <= 0xCFB)) { shift = (addr - 0xCF8) * 8; PciCfg1Addr &= ~(0xff << shift); - PciCfg1Addr |= ((CARD32) val) << 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", PciCfg1Addr + offset, - val); + 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; @@ -645,10 +645,10 @@ pciCfg1outb(CARD16 addr, CARD8 val) return 0; } -CARD8 -bios_checksum(const CARD8 *start, int size) +uint8_t +bios_checksum(const uint8_t *start, int size) { - CARD8 sum = 0; + uint8_t sum = 0; while (size-- > 0) sum += *start++; @@ -682,12 +682,12 @@ LockLegacyVGA(xf86Int10InfoPtr pInt, legacyVGAPtr vga) 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, ~(CARD8) 0x03 & vga->save_msr); - pci_io_write8(pInt->io, 0x03C3, ~(CARD8) 0x01 & vga->save_vse); + 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, ~(CARD8) 0x08 & vga->save_46e8); + pci_io_write8(pInt->io, 0x46E8, ~(uint8_t) 0x08 & vga->save_46e8); #endif - pci_io_write8(pInt->io, 0x0102, ~(CARD8) 0x01 & vga->save_pos102); + pci_io_write8(pInt->io, 0x0102, ~(uint8_t) 0x01 & vga->save_pos102); } void diff --git a/xserver/hw/xfree86/int10/helper_mem.c b/xserver/hw/xfree86/int10/helper_mem.c index 160c5aedf..1b5960e0c 100644 --- a/xserver/hw/xfree86/int10/helper_mem.c +++ b/xserver/hw/xfree86/int10/helper_mem.c @@ -199,7 +199,7 @@ xf86HandleInt10Options(ScrnInfoPtr pScrn, int entityIndex) OptionInfoPtr options = NULL; if (pEnt->device) { - pointer configOptions = NULL; + void *configOptions = NULL; /* Check if xf86CollectOptions() has already been called */ if (((pEnt->index < 0) || diff --git a/xserver/hw/xfree86/int10/stub.c b/xserver/hw/xfree86/int10/stub.c index 8fd079069..4bbcddeda 100644 --- a/xserver/hw/xfree86/int10/stub.c +++ b/xserver/hw/xfree86/int10/stub.c @@ -62,8 +62,8 @@ xf86ExecX86int10(xf86Int10InfoPtr pInt) return; } -pointer -xf86int10Addr(xf86Int10InfoPtr pInt, CARD32 addr) +void * +xf86int10Addr(xf86Int10InfoPtr pInt, uint32_t addr) { return 0; } diff --git a/xserver/hw/xfree86/int10/xf86int10.h b/xserver/hw/xfree86/int10/xf86int10.h index 6d564fc1a..83bab7e61 100644 --- a/xserver/hw/xfree86/int10/xf86int10.h +++ b/xserver/hw/xfree86/int10/xf86int10.h @@ -21,13 +21,13 @@ /* int10 info structure */ typedef struct { int entityIndex; - CARD16 BIOSseg; - CARD16 inb40time; + uint16_t BIOSseg; + uint16_t inb40time; ScrnInfoPtr pScrn; - pointer cpuRegs; + void *cpuRegs; char *BIOSScratch; int Flags; - pointer private; + void *private; struct _int10Mem *mem; int num; int ax; @@ -45,19 +45,19 @@ typedef struct { } xf86Int10InfoRec, *xf86Int10InfoPtr; typedef struct _int10Mem { - CARD8 (*rb) (xf86Int10InfoPtr, int); - CARD16 (*rw) (xf86Int10InfoPtr, int); - CARD32 (*rl) (xf86Int10InfoPtr, int); - void (*wb) (xf86Int10InfoPtr, int, CARD8); - void (*ww) (xf86Int10InfoPtr, int, CARD16); - void (*wl) (xf86Int10InfoPtr, int, CARD32); + 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 { - CARD8 save_msr; - CARD8 save_pos102; - CARD8 save_vse; - CARD8 save_46e8; + uint8_t save_msr; + uint8_t save_pos102; + uint8_t save_vse; + uint8_t save_46e8; } legacyVGARec, *legacyVGAPtr; /* OS dependent functions */ @@ -69,7 +69,7 @@ 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 pointer xf86int10Addr(xf86Int10InfoPtr pInt, CARD32 addr); +extern _X_EXPORT void *xf86int10Addr(xf86Int10InfoPtr pInt, uint32_t addr); /* x86 executor related functions */ extern _X_EXPORT void xf86ExecX86int10(xf86Int10InfoPtr pInt); @@ -127,13 +127,13 @@ int int_handler(xf86Int10InfoPtr pInt); /* helper_exec.c */ int setup_int(xf86Int10InfoPtr pInt); void finish_int(xf86Int10InfoPtr, int sig); -CARD32 getIntVect(xf86Int10InfoPtr pInt, int num); -void pushw(xf86Int10InfoPtr pInt, CARD16 val); +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); -CARD8 bios_checksum(const CARD8 *start, int size); +uint8_t bios_checksum(const uint8_t *start, int size); void LockLegacyVGA(xf86Int10InfoPtr pInt, legacyVGAPtr vga); void UnlockLegacyVGA(xf86Int10InfoPtr pInt, legacyVGAPtr vga); @@ -142,31 +142,31 @@ extern _X_EXPORT void xf86Int10SaveRestoreBIOSVars(xf86Int10InfoPtr pInt, Bool save); #endif int port_rep_inb(xf86Int10InfoPtr pInt, - CARD16 port, CARD32 base, int d_f, CARD32 count); + uint16_t port, uint32_t base, int d_f, uint32_t count); int port_rep_inw(xf86Int10InfoPtr pInt, - CARD16 port, CARD32 base, int d_f, CARD32 count); + uint16_t port, uint32_t base, int d_f, uint32_t count); int port_rep_inl(xf86Int10InfoPtr pInt, - CARD16 port, CARD32 base, int d_f, CARD32 count); + uint16_t port, uint32_t base, int d_f, uint32_t count); int port_rep_outb(xf86Int10InfoPtr pInt, - CARD16 port, CARD32 base, int d_f, CARD32 count); + uint16_t port, uint32_t base, int d_f, uint32_t count); int port_rep_outw(xf86Int10InfoPtr pInt, - CARD16 port, CARD32 base, int d_f, CARD32 count); + uint16_t port, uint32_t base, int d_f, uint32_t count); int port_rep_outl(xf86Int10InfoPtr pInt, - CARD16 port, CARD32 base, int d_f, CARD32 count); - -CARD8 x_inb(CARD16 port); -CARD16 x_inw(CARD16 port); -void x_outb(CARD16 port, CARD8 val); -void x_outw(CARD16 port, CARD16 val); -CARD32 x_inl(CARD16 port); -void x_outl(CARD16 port, CARD32 val); - -CARD8 Mem_rb(CARD32 addr); -CARD16 Mem_rw(CARD32 addr); -CARD32 Mem_rl(CARD32 addr); -void Mem_wb(CARD32 addr, CARD8 val); -void Mem_ww(CARD32 addr, CARD16 val); -void Mem_wl(CARD32 addr, CARD32 val); + 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); diff --git a/xserver/hw/xfree86/int10/xf86x86emu.c b/xserver/hw/xfree86/int10/xf86x86emu.c index 0f8737b49..4b0a13090 100644 --- a/xserver/hw/xfree86/int10/xf86x86emu.c +++ b/xserver/hw/xfree86/int10/xf86x86emu.c @@ -9,7 +9,6 @@ #include <x86emu.h> #include "xf86.h" -#include "compiler.h" #include "xf86_OSproc.h" #include "xf86Pci.h" #define _INT10_PRIVATE @@ -50,12 +49,12 @@ xf86Int10ExecSetup(xf86Int10InfoPtr pInt) X86EMU_intrFuncs intFuncs[256]; X86EMU_pioFuncs pioFuncs = { - (&x_inb), - (&x_inw), - (&x_inl), - (&x_outb), - (&x_outw), - (&x_outl) + .inb = x_inb, + .inw = x_inw, + .inl = x_inl, + .outb = x_outb, + .outw = x_outw, + .outl = x_outl }; X86EMU_memFuncs memFuncs = { diff --git a/xserver/hw/xfree86/loader/Makefile.in b/xserver/hw/xfree86/loader/Makefile.in index 3323c702c..ba2992f5e 100644 --- a/xserver/hw/xfree86/loader/Makefile.in +++ b/xserver/hw/xfree86/loader/Makefile.in @@ -163,6 +163,8 @@ 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@ @@ -207,6 +209,10 @@ 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@ @@ -309,7 +315,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -318,6 +327,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -384,6 +394,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/xfree86/loader/loaderProcs.h b/xserver/hw/xfree86/loader/loaderProcs.h index 8b4b53f28..cfc4d8069 100644 --- a/xserver/hw/xfree86/loader/loaderProcs.h +++ b/xserver/hw/xfree86/loader/loaderProcs.h @@ -72,10 +72,10 @@ typedef struct module_desc { void LoaderInit(void); -ModuleDescPtr LoadDriver(const char *, const char *, int, pointer, int *, +ModuleDescPtr LoadDriver(const char *, const char *, int, void *, int *, int *); ModuleDescPtr LoadModule(const char *, const char *, const char **, - const char **, pointer, const XF86ModReqInfo *, + const char **, void *, const XF86ModReqInfo *, int *, int *); ModuleDescPtr DuplicateModule(ModuleDescPtr mod, ModuleDescPtr parent); void UnloadDriver(ModuleDescPtr); diff --git a/xserver/hw/xfree86/loader/loadmod.c b/xserver/hw/xfree86/loader/loadmod.c index 2347b8e5b..e1f649a74 100644 --- a/xserver/hw/xfree86/loader/loadmod.c +++ b/xserver/hw/xfree86/loader/loadmod.c @@ -81,7 +81,7 @@ static void UnloadModuleOrDriver(ModuleDescPtr mod); static char *LoaderGetCanonicalName(const char *, PatternPtr); static void RemoveChild(ModuleDescPtr); static ModuleDescPtr doLoadModule(const char *, const char *, const char **, - const char **, pointer, + const char **, void *, const XF86ModReqInfo *, int *, int *); const ModuleVersions LoaderVersionInfo = { @@ -482,7 +482,7 @@ FindModule(const char *module, const char *dirname, const char **subdirlist, return name; } -char ** +const char ** LoaderListDirs(const char **subdirlist, const char **patternlist) { char buf[PATH_MAX + 1]; @@ -490,7 +490,7 @@ LoaderListDirs(const char **subdirlist, const char **patternlist) char **elem; const char **subdirs; const char **s; - PatternPtr patterns; + PatternPtr patterns = NULL; PatternPtr p; DIR *d; struct dirent *dp; @@ -571,7 +571,7 @@ LoaderListDirs(const char **subdirlist, const char **patternlist) FreePatterns(patterns); FreeSubdirs(subdirs); FreePathList(pathlist); - return ret; + return (const char **) ret; } void @@ -761,10 +761,10 @@ AddSibling(ModuleDescPtr head, ModuleDescPtr new) return new; } -pointer -LoadSubModule(pointer _parent, const char *module, +void * +LoadSubModule(void *_parent, const char *module, const char **subdirlist, const char **patternlist, - pointer options, const XF86ModReqInfo * modreq, + void *options, const XF86ModReqInfo * modreq, int *errmaj, int *errmin) { ModuleDescPtr submod; @@ -838,12 +838,18 @@ static const char *compiled_in_modules[] = { "extmod", "dri", "dri2", +#if DRI3 + "dri3", +#endif +#if PRESENT + "present", +#endif NULL }; static ModuleDescPtr doLoadModule(const char *module, const char *path, const char **subdirlist, - const char **patternlist, pointer options, + const char **patternlist, void *options, const XF86ModReqInfo * modreq, int *errmaj, int *errmin) { XF86ModuleData *initdata = NULL; @@ -1071,7 +1077,7 @@ doLoadModule(const char *module, const char *path, const char **subdirlist, */ ModuleDescPtr LoadModule(const char *module, const char *path, const char **subdirlist, - const char **patternlist, pointer options, + const char **patternlist, void *options, const XF86ModReqInfo * modreq, int *errmaj, int *errmin) { return doLoadModule(module, path, subdirlist, patternlist, options, @@ -1079,7 +1085,7 @@ LoadModule(const char *module, const char *path, const char **subdirlist, } void -UnloadModule(pointer mod) +UnloadModule(void *mod) { UnloadModuleOrDriver((ModuleDescPtr) mod); } @@ -1115,7 +1121,7 @@ UnloadModuleOrDriver(ModuleDescPtr mod) } void -UnloadSubModule(pointer _mod) +UnloadSubModule(void *_mod) { ModuleDescPtr mod = (ModuleDescPtr) _mod; diff --git a/xserver/hw/xfree86/man/Makefile.am b/xserver/hw/xfree86/man/Makefile.am index 80e22cbab..5da404cbb 100644 --- a/xserver/hw/xfree86/man/Makefile.am +++ b/xserver/hw/xfree86/man/Makefile.am @@ -1,3 +1,10 @@ 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 diff --git a/xserver/hw/xfree86/man/Makefile.in b/xserver/hw/xfree86/man/Makefile.in index 88aa3aa69..312361398 100644 --- a/xserver/hw/xfree86/man/Makefile.in +++ b/xserver/hw/xfree86/man/Makefile.in @@ -52,6 +52,9 @@ build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/manpages.am +@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 \ @@ -160,6 +163,8 @@ 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@ @@ -204,6 +209,10 @@ 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@ @@ -268,6 +277,7 @@ MAN_SUBSTS = @MAN_SUBSTS@ -e 's|__logdir__|$(logdir)|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@ @@ -322,7 +332,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -331,6 +344,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -397,6 +411,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ @@ -481,11 +499,12 @@ 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) +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 -fileman_PRE = xorg.conf.man xorg.conf.d.man +appman_PRE = Xorg.man $(am__append_1) +fileman_PRE = xorg.conf.man xorg.conf.d.man $(am__append_2) all: all-am .SUFFIXES: diff --git a/xserver/hw/xfree86/man/Xorg.man b/xserver/hw/xfree86/man/Xorg.man index a48c4e8dd..0d90d4745 100644 --- a/xserver/hw/xfree86/man/Xorg.man +++ b/xserver/hw/xfree86/man/Xorg.man @@ -309,9 +309,11 @@ Use the file called .I filename as the .B Xorg -server log file. The default log file is +server log file. The default log file when running as root is .BI __logdir__/Xorg. n .log -on most platforms, where +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 diff --git a/xserver/hw/xfree86/man/Xorg.wrap.man b/xserver/hw/xfree86/man/Xorg.wrap.man new file mode 100644 index 000000000..58937c74b --- /dev/null +++ b/xserver/hw/xfree86/man/Xorg.wrap.man @@ -0,0 +1,67 @@ +.\" 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.bin . +.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 letter 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) diff --git a/xserver/hw/xfree86/man/Xwrapper.config.man b/xserver/hw/xfree86/man/Xwrapper.config.man new file mode 100644 index 000000000..5c777c940 --- /dev/null +++ b/xserver/hw/xfree86/man/Xwrapper.config.man @@ -0,0 +1 @@ +.so man__appmansuffix__/Xorg.wrap.__appmansuffix__ diff --git a/xserver/hw/xfree86/man/xorg.conf.man b/xserver/hw/xfree86/man/xorg.conf.man index 85f9f2ee1..bc33df197 100644 --- a/xserver/hw/xfree86/man/xorg.conf.man +++ b/xserver/hw/xfree86/man/xorg.conf.man @@ -171,6 +171,7 @@ The section names are: .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" @@ -442,11 +443,15 @@ __modulepath__ .TP 7 .BI "LogFile \*q" path \*q sets the name of the Xorg server log file. -The default log file name is +The default log file name when running as root is .PP .RS 11 .RI __logdir__/Xorg. <n> .log .RE +and for non root it is +.RS 11 +.RI $XDG_DATA_HOME/xorg/Xorg. <n> .log +.RE .PP .RS 7 where @@ -1186,6 +1191,82 @@ entries. 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. .SH "DEVICE SECTION" The config file may have multiple .B Device @@ -1374,6 +1455,14 @@ for the regular text mode. The frequency is specified in MHz. This is rarely used. .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. @@ -1896,6 +1985,14 @@ 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 @@ -2291,6 +2388,14 @@ 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 diff --git a/xserver/hw/xfree86/modes/Makefile.in b/xserver/hw/xfree86/modes/Makefile.in index 678769e49..ffca81526 100644 --- a/xserver/hw/xfree86/modes/Makefile.in +++ b/xserver/hw/xfree86/modes/Makefile.in @@ -199,6 +199,8 @@ 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@ @@ -243,6 +245,10 @@ 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@ @@ -345,7 +351,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -354,6 +363,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -420,6 +430,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/xfree86/modes/xf86Crtc.c b/xserver/hw/xfree86/modes/xf86Crtc.c index a441fd16a..87ba0b74e 100644 --- a/xserver/hw/xfree86/modes/xf86Crtc.c +++ b/xserver/hw/xfree86/modes/xf86Crtc.c @@ -185,10 +185,10 @@ xf86CrtcSetScreenSubpixelOrder(ScreenPtr pScreen) Bool has_none = FALSE; ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen); xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); - int c, o; + int icrtc, o; - for (c = 0; c < xf86_config->num_crtc; c++) { - xf86CrtcPtr crtc = xf86_config->crtc[c]; + 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]; @@ -216,20 +216,20 @@ xf86CrtcSetScreenSubpixelOrder(ScreenPtr pScreen) SubPixelVerticalBGR, }; int rotate; - int c; + int sc; for (rotate = 0; rotate < 4; rotate++) if (crtc->rotation & (1 << rotate)) break; - for (c = 0; c < 4; c++) - if (circle[c] == subpixel_order) + for (sc = 0; sc < 4; sc++) + if (circle[sc] == subpixel_order) break; - c = (c + rotate) & 0x3; - if ((crtc->rotation & RR_Reflect_X) && !(c & 1)) - c ^= 2; - if ((crtc->rotation & RR_Reflect_Y) && (c & 1)) - c ^= 2; - subpixel_order = circle[c]; + 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; } } @@ -379,7 +379,7 @@ xf86CrtcSetModeTransform(xf86CrtcPtr crtc, DisplayModePtr mode, crtc->transformPresent = saved_transform_present; } - free(adjusted_mode->name); + free((void *) adjusted_mode->name); free(adjusted_mode); if (didLock) @@ -564,8 +564,8 @@ static const char *direction[4] = { static Rotation xf86OutputInitialRotation(xf86OutputPtr output) { - char *rotate_name = xf86GetOptValString(output->options, - OPTION_ROTATE); + const char *rotate_name = xf86GetOptValString(output->options, + OPTION_ROTATE); int i; if (!rotate_name) { @@ -926,7 +926,6 @@ xf86PickCrtcs(ScrnInfoPtr scrn, xf86OutputPtr output; xf86CrtcPtr crtc; xf86CrtcPtr *crtcs; - xf86CrtcPtr best_crtc; int best_score; int score; int my_score; @@ -939,7 +938,6 @@ xf86PickCrtcs(ScrnInfoPtr scrn, * Compute score with this output disabled */ best_crtcs[n] = NULL; - best_crtc = NULL; best_score = xf86PickCrtcs(scrn, best_crtcs, modes, n + 1, width, height); if (modes[n] == NULL) return best_score; @@ -993,7 +991,6 @@ xf86PickCrtcs(ScrnInfoPtr scrn, score = my_score + xf86PickCrtcs(scrn, crtcs, modes, n + 1, width, height); if (score > best_score) { - best_crtc = crtc; best_score = score; memcpy(best_crtcs, crtcs, config->num_output * sizeof(xf86CrtcPtr)); } @@ -1087,8 +1084,8 @@ xf86UserConfiguredOutputs(ScrnInfoPtr scrn, DisplayModePtr * modes) for (o = 0; o < config->num_output; o++) { xf86OutputPtr output = config->output[o]; - char *position; - char *relative_name; + const char *position; + const char *relative_name; OutputOpts relation; int r; @@ -1145,8 +1142,8 @@ xf86InitialOutputPositions(ScrnInfoPtr scrn, DisplayModePtr * modes) }; xf86OutputPtr output = config->output[o]; xf86OutputPtr relative; - char *relative_name; - char *position; + const char *relative_name; + const char *position; OutputOpts relation; int r; @@ -1306,7 +1303,7 @@ xf86InitialPanning(ScrnInfoPtr scrn) for (o = 0; o < config->num_output; o++) { xf86OutputPtr output = config->output[o]; - char *panning = xf86GetOptValString(output->options, OPTION_PANNING); + 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]; @@ -1389,7 +1386,7 @@ xf86SortModes(DisplayModePtr input) for (o = output; o && (n = o->next); o = n) { if (!strcmp(o->name, n->name) && xf86ModesEqual(o, n)) { o->next = n->next; - free(n->name); + free((void *) n->name); free(n); n = o; } @@ -1403,10 +1400,10 @@ xf86SortModes(DisplayModePtr input) return output; } -static char * +static const char * preferredMode(ScrnInfoPtr pScrn, xf86OutputPtr output) { - char *preferred_mode = NULL; + const char *preferred_mode = NULL; /* Check for a configured preference for a particular mode */ preferred_mode = xf86GetOptValString(output->options, @@ -1610,7 +1607,7 @@ xf86ProbeOutputModes(ScrnInfoPtr scrn, int maxX, int maxY) xf86OutputPtr output = config->output[o]; DisplayModePtr mode; DisplayModePtr config_modes = NULL, output_modes, default_modes = NULL; - char *preferred_mode; + const char *preferred_mode; xf86MonPtr edid_monitor; XF86ConfMonitorPtr conf_monitor; MonRec mon_rec; @@ -1676,6 +1673,7 @@ xf86ProbeOutputModes(ScrnInfoPtr scrn, int maxX, int maxY) if (edid_monitor) { struct det_monrec_parameter p; struct disp_features *features = &edid_monitor->features; + struct cea_data_block *hdmi_db; /* if display is not continuous-frequency, don't add default modes */ if (!GTF_SUPPORTED(features->msc)) @@ -1688,6 +1686,16 @@ xf86ProbeOutputModes(ScrnInfoPtr scrn, int maxX, int maxY) 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, @@ -1833,10 +1841,6 @@ xf86ProbeOutputModes(ScrnInfoPtr scrn, int maxX, int maxY) * Copy one of the output mode lists to the ScrnInfo record */ -/* XXX where does this function belong? Here? */ -void - xf86RandR12GetOriginalVirtualSize(ScrnInfoPtr scrn, int *x, int *y); - static DisplayModePtr biggestMode(DisplayModePtr a, DisplayModePtr b) { @@ -2144,10 +2148,10 @@ xf86TargetPreferred(ScrnInfoPtr scrn, xf86CrtcConfigPtr config, } else { for (mode = output->probed_modes; mode; mode = mode->next) { - Rotation r = output->initial_rotation; + Rotation ir = output->initial_rotation; - if (xf86ModeWidth(mode, r) == pref_width && - xf86ModeHeight(mode, r) == pref_height) { + if (xf86ModeWidth(mode, ir) == pref_width && + xf86ModeHeight(mode, ir) == pref_height) { preferred[o] = mode; match = TRUE; } diff --git a/xserver/hw/xfree86/modes/xf86Crtc.h b/xserver/hw/xfree86/modes/xf86Crtc.h index c127d78af..eebe6f472 100644 --- a/xserver/hw/xfree86/modes/xf86Crtc.h +++ b/xserver/hw/xfree86/modes/xf86Crtc.h @@ -188,12 +188,16 @@ typedef struct _xf86CrtcFuncs { */ 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 diff --git a/xserver/hw/xfree86/modes/xf86Cursors.c b/xserver/hw/xfree86/modes/xf86Cursors.c index 2b0db3492..379a27a76 100644 --- a/xserver/hw/xfree86/modes/xf86Cursors.c +++ b/xserver/hw/xfree86/modes/xf86Cursors.c @@ -209,9 +209,43 @@ set_bit(CARD8 *image, xf86CursorInfoPtr cursor_info, int x, int y, Bool mask) } /* + * Wrappers to deal with API compatibility with drivers that don't expose + * load_cursor_*_check + */ +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_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 void +static Bool xf86_crtc_convert_cursor_to_argb(xf86CrtcPtr crtc, unsigned char *src) { ScrnInfoPtr scrn = crtc->scrn; @@ -244,7 +278,7 @@ xf86_crtc_convert_cursor_to_argb(xf86CrtcPtr crtc, unsigned char *src) bits = 0; cursor_image[y * cursor_info->MaxWidth + x] = bits; } - crtc->funcs->load_cursor_argb(crtc, cursor_image); + return xf86_driver_load_cursor_argb(crtc, cursor_image); } /* @@ -269,7 +303,7 @@ xf86_set_cursor_colors(ScrnInfoPtr scrn, int bg, int fg) xf86CrtcPtr crtc = xf86_config->crtc[c]; if (crtc->enabled && !crtc->cursor_argb) { - if (crtc->funcs->load_cursor_image) + 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); @@ -415,7 +449,7 @@ xf86_set_cursor_position(ScrnInfoPtr scrn, int x, int y) /* * Load a two-color cursor into a crtc, performing rotation as needed */ -static void +static Bool xf86_crtc_load_cursor_image(xf86CrtcPtr crtc, CARD8 *src) { ScrnInfoPtr scrn = crtc->scrn; @@ -450,13 +484,13 @@ xf86_crtc_load_cursor_image(xf86CrtcPtr crtc, CARD8 *src) set_bit(cursor_image, cursor_info, x, y, TRUE); } } - crtc->funcs->load_cursor_image(crtc, cursor_image); + return xf86_driver_load_cursor_image(crtc, cursor_image); } /* * Load a cursor image into all active CRTCs */ -static void +static Bool xf86_load_cursor_image(ScrnInfoPtr scrn, unsigned char *src) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); @@ -466,12 +500,17 @@ xf86_load_cursor_image(ScrnInfoPtr scrn, unsigned char *src) xf86CrtcPtr crtc = xf86_config->crtc[c]; if (crtc->enabled) { - if (crtc->funcs->load_cursor_image) - xf86_crtc_load_cursor_image(crtc, src); - else if (crtc->funcs->load_cursor_argb) - xf86_crtc_convert_cursor_to_argb(crtc, src); + 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 @@ -516,7 +555,7 @@ xf86_use_hw_cursor_argb(ScreenPtr screen, CursorPtr cursor) return TRUE; } -static void +static Bool xf86_crtc_load_cursor_argb(xf86CrtcPtr crtc, CursorPtr cursor) { ScrnInfoPtr scrn = crtc->scrn; @@ -544,10 +583,10 @@ xf86_crtc_load_cursor_argb(xf86CrtcPtr crtc, CursorPtr cursor) cursor_image[y * image_width + x] = bits; } - crtc->funcs->load_cursor_argb(crtc, cursor_image); + return xf86_driver_load_cursor_argb(crtc, cursor_image); } -static void +static Bool xf86_load_cursor_argb(ScrnInfoPtr scrn, CursorPtr cursor) { xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); @@ -557,8 +596,10 @@ xf86_load_cursor_argb(ScrnInfoPtr scrn, CursorPtr cursor) xf86CrtcPtr crtc = xf86_config->crtc[c]; if (crtc->enabled) - xf86_crtc_load_cursor_argb(crtc, cursor); + if (!xf86_crtc_load_cursor_argb(crtc, cursor)) + return FALSE; } + return TRUE; } Bool @@ -587,14 +628,14 @@ xf86_cursors_init(ScreenPtr screen, int max_width, int max_height, int flags) cursor_info->SetCursorColors = xf86_set_cursor_colors; cursor_info->SetCursorPosition = xf86_set_cursor_position; - cursor_info->LoadCursorImage = xf86_load_cursor_image; + cursor_info->LoadCursorImageCheck = xf86_load_cursor_image; cursor_info->HideCursor = xf86_hide_cursors; cursor_info->ShowCursor = xf86_show_cursors; cursor_info->UseHWCursor = xf86_use_hw_cursor; #ifdef ARGB_CURSOR if (flags & HARDWARE_CURSOR_ARGB) { cursor_info->UseHWCursorARGB = xf86_use_hw_cursor_argb; - cursor_info->LoadCursorARGB = xf86_load_cursor_argb; + cursor_info->LoadCursorARGBCheck = xf86_load_cursor_argb; } #endif @@ -608,6 +649,8 @@ xf86_cursors_init(ScreenPtr screen, int max_width, int max_height, int flags) * Called when anything on the screen is reconfigured. * * Reloads cursor images as needed, then adjusts cursor positions + * @note We assume that all hardware cursors to be loaded have already been + * found to be usable by the hardware. */ void @@ -649,11 +692,11 @@ xf86_reload_cursors(ScreenPtr screen) dixLookupScreenPrivate(&cursor->devPrivates, CursorScreenKey, screen); #ifdef ARGB_CURSOR - if (cursor->bits->argb && cursor_info->LoadCursorARGB) - (*cursor_info->LoadCursorARGB) (scrn, cursor); + if (cursor->bits->argb && xf86DriverHasLoadCursorARGB(cursor_info)) + xf86DriverLoadCursorARGB(cursor_info, cursor); else if (src) #endif - (*cursor_info->LoadCursorImage) (scrn, src); + xf86DriverLoadCursorImage(cursor_info, src); x += scrn->frameX0 + cursor_screen_priv->HotX; y += scrn->frameY0 + cursor_screen_priv->HotY; diff --git a/xserver/hw/xfree86/modes/xf86EdidModes.c b/xserver/hw/xfree86/modes/xf86EdidModes.c index 4ee862da0..6fb0f9b92 100644 --- a/xserver/hw/xfree86/modes/xf86EdidModes.c +++ b/xserver/hw/xfree86/modes/xf86EdidModes.c @@ -162,6 +162,11 @@ quirk_detailed_use_maximum_size(int scrnIndex, xf86MonPtr DDC) 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; } @@ -973,11 +978,11 @@ handle_cea_svd(struct cea_video_block *video, void *data) } static DisplayModePtr -DDCModesFromCEAExtension(int scrnIndex, xf86MonPtr MonPtr) +DDCModesFromCEAExtension(int scrnIndex, xf86MonPtr mon_ptr) { DisplayModePtr Modes = NULL; - xf86ForEachVideoBlock(MonPtr, handle_cea_svd, &Modes); + xf86ForEachVideoBlock(mon_ptr, handle_cea_svd, &Modes); return Modes; } diff --git a/xserver/hw/xfree86/modes/xf86Modes.c b/xserver/hw/xfree86/modes/xf86Modes.c index c4a3eb0a3..43b223307 100644 --- a/xserver/hw/xfree86/modes/xf86Modes.c +++ b/xserver/hw/xfree86/modes/xf86Modes.c @@ -129,11 +129,13 @@ void xf86SetModeDefaultName(DisplayModePtr mode) { Bool interlaced = ! !(mode->Flags & V_INTERLACE); + char *tmp; - free(mode->name); + free((void *) mode->name); - XNFasprintf(&mode->name, "%dx%d%s", mode->HDisplay, mode->VDisplay, + XNFasprintf(&tmp, "%dx%d%s", mode->HDisplay, mode->VDisplay, interlaced ? "i" : ""); + mode->name = tmp; } /* diff --git a/xserver/hw/xfree86/modes/xf86RandR12.c b/xserver/hw/xfree86/modes/xf86RandR12.c index 019b41609..4075f6c49 100644 --- a/xserver/hw/xfree86/modes/xf86RandR12.c +++ b/xserver/hw/xfree86/modes/xf86RandR12.c @@ -454,7 +454,6 @@ xf86RandR12GetInfo(ScreenPtr pScreen, Rotation * rotations) ScrnInfoPtr scrp = xf86ScreenToScrn(pScreen); XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen); DisplayModePtr mode; - int refresh0 = 60; int maxX = 0, maxY = 0; *rotations = randrp->supported_rotations; @@ -479,8 +478,6 @@ xf86RandR12GetInfo(ScreenPtr pScreen, Rotation * rotations) if (maxY < mode->VDisplay) maxY = mode->VDisplay; } - if (mode == scrp->modes) - refresh0 = refresh; pSize = RRRegisterSize(pScreen, mode->HDisplay, mode->VDisplay, randrp->mmWidth, randrp->mmHeight); @@ -684,7 +681,6 @@ xf86RandR12ScreenSetSize(ScreenPtr pScreen, WindowPtr pRoot = pScreen->root; PixmapPtr pScrnPix; Bool ret = FALSE; - Bool panning = FALSE; int c; if (xf86RandR12Key) { @@ -716,7 +712,6 @@ xf86RandR12ScreenSetSize(ScreenPtr pScreen, crtc->panningTrackingArea.y2 += height - pScreen->height; xf86RandR13VerifyPanningArea(crtc, width, height); xf86RandR13Pan(crtc, randrp->pointerX, randrp->pointerY); - panning = TRUE; } } @@ -947,8 +942,6 @@ xf86RandR12SetRotations(ScreenPtr pScreen, Rotation rotations) void xf86RandR12SetTransformSupport(ScreenPtr pScreen, Bool transforms) { - XF86RandRInfoPtr randrp; - #if RANDR_13_INTERFACE ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); int c; @@ -958,7 +951,6 @@ xf86RandR12SetTransformSupport(ScreenPtr pScreen, Bool transforms) if (xf86RandR12Key == NULL) return; - randrp = XF86RANDRINFO(pScreen); #if RANDR_13_INTERFACE for (c = 0; c < config->num_crtc; c++) { xf86CrtcPtr crtc = config->crtc[c]; @@ -1211,7 +1203,6 @@ xf86RandR12CrtcSet(ScreenPtr pScreen, if (randr_mode) { DisplayModeRec mode; - RRTransformPtr transform = RRCrtcGetTransform(randr_crtc); xf86RandRModeConvert(pScrn, randr_mode, &mode); if (!xf86CrtcSetModeTransform @@ -1266,12 +1257,13 @@ xf86RandR12CrtcSetGamma(ScreenPtr pScreen, RRCrtcPtr randr_crtc) CARD16 *tmp_ptr; tmp_ptr = - realloc(crtc->gamma_red, 3 * crtc->gamma_size * sizeof(CARD16)); + realloc(crtc->gamma_red, + 3 * randr_crtc->gammaSize * sizeof(CARD16)); if (!tmp_ptr) return FALSE; crtc->gamma_red = tmp_ptr; - crtc->gamma_green = crtc->gamma_red + crtc->gamma_size; - crtc->gamma_blue = crtc->gamma_green + crtc->gamma_size; + crtc->gamma_green = crtc->gamma_red + randr_crtc->gammaSize; + crtc->gamma_blue = crtc->gamma_green + randr_crtc->gammaSize; } crtc->gamma_size = randr_crtc->gammaSize; @@ -1456,7 +1448,6 @@ xf86RandR12SetInfo12(ScreenPtr pScreen) RRCrtcPtr *crtcs; int ncrtc; int o, c, l; - RRCrtcPtr randr_crtc; int nclone; clones = malloc(config->num_output * sizeof(RROutputPtr)); @@ -1469,11 +1460,6 @@ xf86RandR12SetInfo12(ScreenPtr pScreen) if (output->possible_crtcs & (1 << c)) crtcs[ncrtc++] = config->crtc[c]->randr_crtc; - if (output->crtc) - randr_crtc = output->crtc->randr_crtc; - else - randr_crtc = NULL; - if (!RROutputSetCrtcs(output->randr_output, crtcs, ncrtc)) { free(crtcs); free(clones); diff --git a/xserver/hw/xfree86/modes/xf86Rotate.c b/xserver/hw/xfree86/modes/xf86Rotate.c index 495af9ba7..0ddd8408e 100644 --- a/xserver/hw/xfree86/modes/xf86Rotate.c +++ b/xserver/hw/xfree86/modes/xf86Rotate.c @@ -229,13 +229,12 @@ xf86RotateRedisplay(ScreenPtr pScreen) static void xf86RotateBlockHandler(ScreenPtr pScreen, - pointer pTimeout, pointer pReadmask) + void *pTimeout, void *pReadmask) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); - Bool rotation_active; - rotation_active = xf86RotateRedisplay(pScreen); + xf86RotateRedisplay(pScreen); pScreen->BlockHandler = xf86_config->BlockHandler; (*pScreen->BlockHandler) (pScreen, pTimeout, pReadmask); /* cannot avoid re-wrapping until all wrapping is audited */ @@ -247,7 +246,6 @@ void xf86RotateDestroy(xf86CrtcPtr crtc) { ScrnInfoPtr pScrn = crtc->scrn; - ScreenPtr pScreen = xf86ScrnToScreen(pScrn); xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(pScrn); int c; @@ -267,9 +265,6 @@ xf86RotateDestroy(xf86CrtcPtr crtc) * Clean up damage structures when no crtcs are rotated */ if (xf86_config->rotation_damage) { - DrawablePtr screenDrawable = NULL; - if (pScreen && pScreen->root) - screenDrawable = &pScreen->root->drawable; /* Free damage structure */ if (xf86_config->rotation_damage_registered) { xf86_config->rotation_damage_registered = FALSE; diff --git a/xserver/hw/xfree86/modes/xf86cvt.c b/xserver/hw/xfree86/modes/xf86cvt.c index de0784493..8b7bb8b03 100644 --- a/xserver/hw/xfree86/modes/xf86cvt.c +++ b/xserver/hw/xfree86/modes/xf86cvt.c @@ -89,6 +89,7 @@ xf86CVTMode(int HDisplay, int VDisplay, float VRefresh, Bool Reduced, int HDisplayRnd, HMargin; int VDisplayRnd, VMargin, VSync; float Interlace; /* Please rename this */ + char *tmp; /* CVT default is 60.0Hz */ if (!VRefresh) @@ -177,6 +178,7 @@ xf86CVTMode(int HDisplay, int VDisplay, float VRefresh, Bool Reduced, /* 10. Find number of lines in back porch */ VBackPorch = VSyncAndBackPorch - VSync; + (void) VBackPorch; /* 11. Find total number of lines in vertical field */ Mode->VTotal = VDisplayRnd + 2 * VMargin + VSyncAndBackPorch + Interlace @@ -282,7 +284,8 @@ xf86CVTMode(int HDisplay, int VDisplay, float VRefresh, Bool Reduced, if (Interlaced) Mode->VTotal *= 2; - XNFasprintf(&Mode->name, "%dx%d", HDisplay, VDisplay); + XNFasprintf(&tmp, "%dx%d", HDisplay, VDisplay); + Mode->name = tmp; if (Reduced) Mode->Flags |= V_PHSYNC | V_NVSYNC; diff --git a/xserver/hw/xfree86/modes/xf86gtf.c b/xserver/hw/xfree86/modes/xf86gtf.c index 23707b481..0a8078415 100644 --- a/xserver/hw/xfree86/modes/xf86gtf.c +++ b/xserver/hw/xfree86/modes/xf86gtf.c @@ -215,6 +215,7 @@ xf86GTFMode(int h_pixels, int v_lines, float freq, int interlaced, int margins) */ v_back_porch = vsync_plus_bp - V_SYNC_RQD; + (void) v_back_porch; /* 10. Find the total number of lines in Vertical field period: * @@ -253,6 +254,7 @@ xf86GTFMode(int h_pixels, int v_lines, float freq, int interlaced, int margins) */ v_frame_rate = interlaced ? v_field_rate / 2.0 : v_field_rate; + (void) v_frame_rate; /* 15. Find number of pixels in left margin: * diff --git a/xserver/hw/xfree86/os-support/Makefile.in b/xserver/hw/xfree86/os-support/Makefile.in index da5f4069a..bb0ca4840 100644 --- a/xserver/hw/xfree86/os-support/Makefile.in +++ b/xserver/hw/xfree86/os-support/Makefile.in @@ -227,6 +227,8 @@ 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@ @@ -271,6 +273,10 @@ 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@ @@ -373,7 +379,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -382,6 +391,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -448,6 +458,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/xfree86/os-support/bsd/Makefile.in b/xserver/hw/xfree86/os-support/bsd/Makefile.in index 91667b259..4d956c0a4 100644 --- a/xserver/hw/xfree86/os-support/bsd/Makefile.in +++ b/xserver/hw/xfree86/os-support/bsd/Makefile.in @@ -197,6 +197,8 @@ 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@ @@ -241,6 +243,10 @@ 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@ @@ -343,7 +349,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -352,6 +361,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -418,6 +428,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/xfree86/os-support/bsd/alpha_video.c b/xserver/hw/xfree86/os-support/bsd/alpha_video.c index 2da673c10..b1359dcfb 100644 --- a/xserver/hw/xfree86/os-support/bsd/alpha_video.c +++ b/xserver/hw/xfree86/os-support/bsd/alpha_video.c @@ -185,10 +185,10 @@ static int devMemFd = -1; #define DEV_APERTURE "/dev/xf86" #endif -static pointer mapVidMem(int, unsigned long, unsigned long, int); -static void unmapVidMem(int, pointer, unsigned long); -static pointer mapVidMemSparse(int, unsigned long, unsigned long, int); -static void unmapVidMemSparse(int, pointer, unsigned long); +static void *mapVidMem(int, unsigned long, unsigned long, int); +static void unmapVidMem(int, void *, unsigned long); +static void *mapVidMemSparse(int, unsigned long, unsigned long, int); +static void unmapVidMemSparse(int, void *, unsigned long); /* * Check if /dev/mem can be mmap'd. If it can't print a warning when @@ -199,7 +199,7 @@ checkDevMem(Bool warn) { static Bool devMemChecked = FALSE; int fd; - pointer base; + void *base; if (devMemChecked) return; @@ -291,10 +291,10 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem) pVidMem->initialised = TRUE; } -static pointer +static void * mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags) { - pointer base; + void *base; checkDevMem(FALSE); Base = Base & ((1L << 32) - 1); @@ -332,7 +332,7 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags) } static void -unmapVidMem(int ScreenNum, pointer Base, unsigned long Size) +unmapVidMem(int ScreenNum, void *Base, unsigned long Size) { munmap((caddr_t) Base, Size); } @@ -420,40 +420,40 @@ xf86DisableIO() #define vuip volatile unsigned int * -static pointer memSBase = 0; -static pointer memBase = 0; +static void *memSBase = 0; +static void *memBase = 0; -extern int readDense8(pointer Base, register unsigned long Offset); -extern int readDense16(pointer Base, register unsigned long Offset); -extern int readDense32(pointer Base, register unsigned long Offset); +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 - writeDenseNB8(int Value, pointer Base, register unsigned long Offset); + writeDenseNB8(int Value, void *Base, register unsigned long Offset); extern void - writeDenseNB16(int Value, pointer Base, register unsigned long Offset); + writeDenseNB16(int Value, void *Base, register unsigned long Offset); extern void - writeDenseNB32(int Value, pointer Base, register unsigned long Offset); + writeDenseNB32(int Value, void *Base, register unsigned long Offset); extern void - writeDense8(int Value, pointer Base, register unsigned long Offset); + writeDense8(int Value, void *Base, register unsigned long Offset); extern void - writeDense16(int Value, pointer Base, register unsigned long Offset); + writeDense16(int Value, void *Base, register unsigned long Offset); extern void - writeDense32(int Value, pointer Base, register unsigned long Offset); + writeDense32(int Value, void *Base, register unsigned long Offset); -static int readSparse8(pointer Base, register unsigned long Offset); -static int readSparse16(pointer Base, register unsigned long Offset); -static int readSparse32(pointer Base, register unsigned long Offset); +static int readSparse8(void *Base, register unsigned long Offset); +static int readSparse16(void *Base, register unsigned long Offset); +static int readSparse32(void *Base, register unsigned long Offset); static void - writeSparseNB8(int Value, pointer Base, register unsigned long Offset); + writeSparseNB8(int Value, void *Base, register unsigned long Offset); static void - writeSparseNB16(int Value, pointer Base, register unsigned long Offset); + writeSparseNB16(int Value, void *Base, register unsigned long Offset); static void - writeSparseNB32(int Value, pointer Base, register unsigned long Offset); + writeSparseNB32(int Value, void *Base, register unsigned long Offset); static void - writeSparse8(int Value, pointer Base, register unsigned long Offset); + writeSparse8(int Value, void *Base, register unsigned long Offset); static void - writeSparse16(int Value, pointer Base, register unsigned long Offset); + writeSparse16(int Value, void *Base, register unsigned long Offset); static void - writeSparse32(int Value, pointer Base, register unsigned long Offset); + writeSparse32(int Value, void *Base, register unsigned long Offset); #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) extern int sysarch(int, void *); @@ -477,7 +477,7 @@ sethae(u_int64_t hae) } #endif -static pointer +static void * mapVidMemSparse(int ScreenNum, unsigned long Base, unsigned long Size, int flags) { @@ -510,16 +510,16 @@ mapVidMemSparse(int ScreenNum, unsigned long Base, unsigned long Size, strerror(errno)); } } - return (pointer) ((unsigned long) memBase + Base); + return (void *) ((unsigned long) memBase + Base); } static void -unmapVidMemSparse(int ScreenNum, pointer Base, unsigned long Size) +unmapVidMemSparse(int ScreenNum, void *Base, unsigned long Size) { } static int -readSparse8(pointer Base, register unsigned long Offset) +readSparse8(void *Base, register unsigned long Offset) { register unsigned long result, shift; register unsigned long msb; @@ -540,7 +540,7 @@ readSparse8(pointer Base, register unsigned long Offset) } static int -readSparse16(pointer Base, register unsigned long Offset) +readSparse16(void *Base, register unsigned long Offset) { register unsigned long result, shift; register unsigned long msb; @@ -562,14 +562,14 @@ readSparse16(pointer Base, register unsigned long Offset) } static int -readSparse32(pointer Base, register unsigned long Offset) +readSparse32(void *Base, register unsigned long Offset) { mem_barrier(); return *(vuip) ((unsigned long) Base + (Offset)); } static void -writeSparse8(int Value, pointer Base, register unsigned long Offset) +writeSparse8(int Value, void *Base, register unsigned long Offset) { register unsigned long msb; register unsigned int b = Value & 0xffU; @@ -587,7 +587,7 @@ writeSparse8(int Value, pointer Base, register unsigned long Offset) } static void -writeSparse16(int Value, pointer Base, register unsigned long Offset) +writeSparse16(int Value, void *Base, register unsigned long Offset) { register unsigned long msb; register unsigned int w = Value & 0xffffU; @@ -607,7 +607,7 @@ writeSparse16(int Value, pointer Base, register unsigned long Offset) } static void -writeSparse32(int Value, pointer Base, register unsigned long Offset) +writeSparse32(int Value, void *Base, register unsigned long Offset) { write_mem_barrier(); *(vuip) ((unsigned long) Base + (Offset)) = Value; @@ -615,7 +615,7 @@ writeSparse32(int Value, pointer Base, register unsigned long Offset) } static void -writeSparseNB8(int Value, pointer Base, register unsigned long Offset) +writeSparseNB8(int Value, void *Base, register unsigned long Offset) { register unsigned long msb; register unsigned int b = Value & 0xffU; @@ -632,7 +632,7 @@ writeSparseNB8(int Value, pointer Base, register unsigned long Offset) } static void -writeSparseNB16(int Value, pointer Base, register unsigned long Offset) +writeSparseNB16(int Value, void *Base, register unsigned long Offset) { register unsigned long msb; register unsigned int w = Value & 0xffffU; @@ -650,29 +650,29 @@ writeSparseNB16(int Value, pointer Base, register unsigned long Offset) } static void -writeSparseNB32(int Value, pointer Base, register unsigned long Offset) +writeSparseNB32(int Value, void *Base, register unsigned long Offset) { *(vuip) ((unsigned long) Base + (Offset)) = Value; return; } -void (*xf86WriteMmio8) (int Value, pointer Base, unsigned long Offset) +void (*xf86WriteMmio8) (int Value, void *Base, unsigned long Offset) = writeDense8; -void (*xf86WriteMmio16) (int Value, pointer Base, unsigned long Offset) +void (*xf86WriteMmio16) (int Value, void *Base, unsigned long Offset) = writeDense16; -void (*xf86WriteMmio32) (int Value, pointer Base, unsigned long Offset) +void (*xf86WriteMmio32) (int Value, void *Base, unsigned long Offset) = writeDense32; -void (*xf86WriteMmioNB8) (int Value, pointer Base, unsigned long Offset) +void (*xf86WriteMmioNB8) (int Value, void *Base, unsigned long Offset) = writeDenseNB8; -void (*xf86WriteMmioNB16) (int Value, pointer Base, unsigned long Offset) +void (*xf86WriteMmioNB16) (int Value, void *Base, unsigned long Offset) = writeDenseNB16; -void (*xf86WriteMmioNB32) (int Value, pointer Base, unsigned long Offset) +void (*xf86WriteMmioNB32) (int Value, void *Base, unsigned long Offset) = writeDenseNB32; -int (*xf86ReadMmio8) (pointer Base, unsigned long Offset) +int (*xf86ReadMmio8) (void *Base, unsigned long Offset) = readDense8; -int (*xf86ReadMmio16) (pointer Base, unsigned long Offset) +int (*xf86ReadMmio16) (void *Base, unsigned long Offset) = readDense16; -int (*xf86ReadMmio32) (pointer Base, unsigned long Offset) +int (*xf86ReadMmio32) (void *Base, unsigned long Offset) = readDense32; /* diff --git a/xserver/hw/xfree86/os-support/bsd/arm_video.c b/xserver/hw/xfree86/os-support/bsd/arm_video.c index ea4e50455..0e66d1477 100644 --- a/xserver/hw/xfree86/os-support/bsd/arm_video.c +++ b/xserver/hw/xfree86/os-support/bsd/arm_video.c @@ -1,5 +1,5 @@ /* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/bsd/ppc_video.c,v 1.6 2003/10/07 23:14:55 herrb Exp $ */ -/* $OpenBSD: arm_video.c,v 1.10 2013/06/07 17:28:52 matthieu Exp $ */ +/* $OpenBSD: arm_video.c,v 1.11 2014/09/27 17:53:02 matthieu Exp $ */ /* * Copyright 1992 by Rich Murphey <Rich@Rice.edu> * Copyright 1993 by David Wexelblat <dwex@goblin.org> @@ -87,8 +87,8 @@ #define DEV_MEM "/dev/xf86" #endif -static pointer ppcMapVidMem(int, unsigned long, unsigned long, int flags); -static void ppcUnmapVidMem(int, pointer, unsigned long); +static void* ppcMapVidMem(int, unsigned long, unsigned long, int flags); +static void ppcUnmapVidMem(int, void *, unsigned long); void xf86OSInitVidMem(VidMemInfoPtr pVidMem) @@ -102,11 +102,11 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem) volatile unsigned char *ioBase = MAP_FAILED; -static pointer +static void* ppcMapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags) { int fd = xf86Info.consoleFd; - pointer base; + void *base; #ifdef DEBUG xf86MsgVerb(X_INFO, 3, "mapVidMem %lx, %lx, fd = %d", Base, Size, fd); @@ -124,7 +124,7 @@ ppcMapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags) } static void -ppcUnmapVidMem(int ScreenNum, pointer Base, unsigned long Size) +ppcUnmapVidMem(int ScreenNum, void *Base, unsigned long Size) { munmap(Base, Size); diff --git a/xserver/hw/xfree86/os-support/bsd/bsd_apm.c b/xserver/hw/xfree86/os-support/bsd/bsd_apm.c index b1938cf0d..1b929625e 100644 --- a/xserver/hw/xfree86/os-support/bsd/bsd_apm.c +++ b/xserver/hw/xfree86/os-support/bsd/bsd_apm.c @@ -14,7 +14,7 @@ #define APM_DEVICE "/dev/apm" -static pointer APMihPtr = NULL; +static void *APMihPtr = NULL; static void bsdCloseAPM(void); static struct { diff --git a/xserver/hw/xfree86/os-support/bsd/bsd_ev56.c b/xserver/hw/xfree86/os-support/bsd/bsd_ev56.c index 645377ed6..320bb23b6 100644 --- a/xserver/hw/xfree86/os-support/bsd/bsd_ev56.c +++ b/xserver/hw/xfree86/os-support/bsd/bsd_ev56.c @@ -22,77 +22,77 @@ */ __asm(".arch ev56"); -int readDense8(pointer Base, register unsigned long Offset); -int readDense16(pointer Base, register unsigned long Offset); -int readDense32(pointer Base, register unsigned long Offset); +int readDense8(void *Base, register unsigned long Offset); +int readDense16(void *Base, register unsigned long Offset); +int readDense32(void *Base, register unsigned long Offset); void - writeDenseNB8(int Value, pointer Base, register unsigned long Offset); + writeDenseNB8(int Value, void *Base, register unsigned long Offset); void - writeDenseNB16(int Value, pointer Base, register unsigned long Offset); + writeDenseNB16(int Value, void *Base, register unsigned long Offset); void - writeDenseNB32(int Value, pointer Base, register unsigned long Offset); + writeDenseNB32(int Value, void *Base, register unsigned long Offset); void - writeDense8(int Value, pointer Base, register unsigned long Offset); + writeDense8(int Value, void *Base, register unsigned long Offset); void - writeDense16(int Value, pointer Base, register unsigned long Offset); + writeDense16(int Value, void *Base, register unsigned long Offset); void - writeDense32(int Value, pointer Base, register unsigned long Offset); + writeDense32(int Value, void *Base, register unsigned long Offset); int -readDense8(pointer Base, register unsigned long Offset) +readDense8(void *Base, register unsigned long Offset) { mem_barrier(); - return (alpha_ldbu((pointer) ((unsigned long) Base + (Offset)))); + return (alpha_ldbu((void *) ((unsigned long) Base + (Offset)))); } int -readDense16(pointer Base, register unsigned long Offset) +readDense16(void *Base, register unsigned long Offset) { mem_barrier(); - return (alpha_ldwu((pointer) ((unsigned long) Base + (Offset)))); + return (alpha_ldwu((void *) ((unsigned long) Base + (Offset)))); } int -readDense32(pointer Base, register unsigned long Offset) +readDense32(void *Base, register unsigned long Offset) { mem_barrier(); return *(volatile CARD32 *) ((unsigned long) Base + (Offset)); } void -writeDenseNB8(int Value, pointer Base, register unsigned long Offset) +writeDenseNB8(int Value, void *Base, register unsigned long Offset) { - alpha_stb((pointer) ((unsigned long) Base + (Offset)), Value); + alpha_stb((void *) ((unsigned long) Base + (Offset)), Value); } void -writeDenseNB16(int Value, pointer Base, register unsigned long Offset) +writeDenseNB16(int Value, void *Base, register unsigned long Offset) { - alpha_stw((pointer) ((unsigned long) Base + (Offset)), Value); + alpha_stw((void *) ((unsigned long) Base + (Offset)), Value); } void -writeDenseNB32(int Value, pointer Base, register unsigned long Offset) +writeDenseNB32(int Value, void *Base, register unsigned long Offset) { *(volatile CARD32 *) ((unsigned long) Base + (Offset)) = Value; } void -writeDense8(int Value, pointer Base, register unsigned long Offset) +writeDense8(int Value, void *Base, register unsigned long Offset) { write_mem_barrier(); - alpha_stb((pointer) ((unsigned long) Base + (Offset)), Value); + alpha_stb((void *) ((unsigned long) Base + (Offset)), Value); } void -writeDense16(int Value, pointer Base, register unsigned long Offset) +writeDense16(int Value, void *Base, register unsigned long Offset) { write_mem_barrier(); - alpha_stw((pointer) ((unsigned long) Base + (Offset)), Value); + alpha_stw((void *) ((unsigned long) Base + (Offset)), Value); } void -writeDense32(int Value, pointer Base, register unsigned long Offset) +writeDense32(int Value, void *Base, register unsigned long Offset) { write_mem_barrier(); *(volatile CARD32 *) ((unsigned long) Base + (Offset)) = Value; diff --git a/xserver/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c b/xserver/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c index 8417c335a..b82c2ff7c 100644 --- a/xserver/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c +++ b/xserver/hw/xfree86/os-support/bsd/bsd_kqueue_apm.c @@ -45,7 +45,7 @@ #define _PATH_APM_DEV "/dev/apm" #define _PATH_APM_CTLDEV "/dev/apmctl" -static pointer APMihPtr = NULL; +static void *APMihPtr = NULL; static int devFd = -1; static int ctlFd = -1; static void bsdCloseAPM(void); diff --git a/xserver/hw/xfree86/os-support/bsd/bsd_sbus.c b/xserver/hw/xfree86/os-support/bsd/bsd_sbus.c index 883b2728a..87a8ddf2b 100644 --- a/xserver/hw/xfree86/os-support/bsd/bsd_sbus.c +++ b/xserver/hw/xfree86/os-support/bsd/bsd_sbus.c @@ -157,14 +157,14 @@ xf86SbusUseBuiltinMode(ScrnInfoPtr pScrn, sbusDevicePtr psdp) pScrn->virtualY = wdf.height; } -_X_EXPORT pointer +_X_EXPORT void * xf86MapSbusMem(sbusDevicePtr psdp, unsigned long Base, unsigned long Size) { return xf86MapVidMem(0, 0, Base, Size); } _X_EXPORT void -xf86UnmapSbusMem(sbusDevicePtr psdp, pointer Base, unsigned long Size) +xf86UnmapSbusMem(sbusDevicePtr psdp, void *Base, unsigned long Size) { xf86UnMapVidMem(0, Base, Size); } diff --git a/xserver/hw/xfree86/os-support/bsd/hppa_video.c b/xserver/hw/xfree86/os-support/bsd/hppa_video.c index 2938b1d26..4f4a1a70a 100644 --- a/xserver/hw/xfree86/os-support/bsd/hppa_video.c +++ b/xserver/hw/xfree86/os-support/bsd/hppa_video.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hppa_video.c,v 1.8 2013/06/07 17:28:52 matthieu Exp $ */ +/* $OpenBSD: hppa_video.c,v 1.9 2014/09/27 17:53:02 matthieu Exp $ */ /* * Copyright 1992 by Rich Murphey <Rich@Rice.edu> * Copyright 1993 by David Wexelblat <dwex@goblin.org> @@ -44,8 +44,8 @@ /* Video Memory Mapping section */ /***************************************************************************/ -static pointer hppaMapVidMem(int, unsigned long, unsigned long, int); -static void hppaUnmapVidMem(int, pointer, unsigned long); +static void *hppaMapVidMem(int, unsigned long, unsigned long, int); +static void hppaUnmapVidMem(int, void *, unsigned long); void @@ -65,11 +65,11 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem) volatile unsigned char *ioBase = MAP_FAILED; -static pointer +static void * hppaMapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags) { int fd = xf86Info.consoleFd; - pointer base; + void *base; #ifdef DEBUG xf86MsgVerb(X_INFO, 3, "mapVidMem %lx, %lx, fd = %d\n", @@ -86,7 +86,7 @@ hppaMapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags) static void -hppaUnmapVidMem(int ScreenNum, pointer Base, unsigned long Size) +hppaUnmapVidMem(int ScreenNum, void *Base, unsigned long Size) { munmap(Base, Size); diff --git a/xserver/hw/xfree86/os-support/bsd/i386_video.c b/xserver/hw/xfree86/os-support/bsd/i386_video.c index 3141e27c1..359e72ba6 100644 --- a/xserver/hw/xfree86/os-support/bsd/i386_video.c +++ b/xserver/hw/xfree86/os-support/bsd/i386_video.c @@ -84,18 +84,18 @@ static int devMemFd = -1; #define DEV_APERTURE "/dev/xf86" #endif -static pointer mapVidMem(int, unsigned long, unsigned long, int); -static void unmapVidMem(int, pointer, unsigned long); +static void *mapVidMem(int, unsigned long, unsigned long, int); +static void unmapVidMem(int, void *, unsigned long); #ifdef HAS_MTRR_SUPPORT -static pointer setWC(int, unsigned long, unsigned long, Bool, MessageType); -static void undoWC(int, pointer); +static void *setWC(int, unsigned long, unsigned long, Bool, MessageType); +static void undoWC(int, void *); static Bool cleanMTRR(void); #endif #if defined(HAS_MTRR_BUILTIN) && defined(__NetBSD__) -static pointer NetBSDsetWC(int, unsigned long, unsigned long, Bool, +static void *NetBSDsetWC(int, unsigned long, unsigned long, Bool, MessageType); -static void NetBSDundoWC(int, pointer); +static void NetBSDundoWC(int, void *); #endif /* @@ -107,8 +107,8 @@ checkDevMem(Bool warn) { static Bool devMemChecked = FALSE; int fd; - pointer base; - + void *base; + if (devMemChecked) return; devMemChecked = TRUE; @@ -202,11 +202,11 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem) pVidMem->initialised = TRUE; } -static pointer +static void * mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags) { - pointer base; - + void *base; + checkDevMem(FALSE); if (useDevMem) { @@ -244,7 +244,7 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags) } static void -unmapVidMem(int ScreenNum, pointer Base, unsigned long Size) +unmapVidMem(int ScreenNum, void *Base, unsigned long Size) { munmap((caddr_t) Base, Size); } @@ -686,7 +686,7 @@ fullCoverage(unsigned long base, unsigned long size, RangePtr overlap) return FALSE; } -static pointer +static void * addWC(int screenNum, unsigned long base, unsigned long size, MessageType from) { RangePtr uc = NULL, wc = NULL, retlist = NULL; @@ -727,7 +727,7 @@ addWC(int screenNum, unsigned long base, unsigned long size, MessageType from) } } -static pointer +static void * delWC(int screenNum, unsigned long base, unsigned long size, MessageType from) { RangePtr uc = NULL, wc = NULL, retlist = NULL; @@ -773,7 +773,7 @@ delWC(int screenNum, unsigned long base, unsigned long size, MessageType from) } } -static pointer +static void * setWC(int screenNum, unsigned long base, unsigned long size, Bool enable, MessageType from) { @@ -784,7 +784,7 @@ setWC(int screenNum, unsigned long base, unsigned long size, Bool enable, } static void -undoWC(int screenNum, pointer list) +undoWC(int screenNum, void *list) { RangePtr rp; struct mem_range_op mro; @@ -832,7 +832,7 @@ undoWC(int screenNum, pointer list) #endif /* HAS_MTRR_SUPPORT */ #if defined(HAS_MTRR_BUILTIN) && defined(__NetBSD__) -static pointer +static void * NetBSDsetWC(int screenNum, unsigned long base, unsigned long size, Bool enable, MessageType from) { @@ -868,7 +868,7 @@ NetBSDsetWC(int screenNum, unsigned long base, unsigned long size, Bool enable, } static void -NetBSDundoWC(int screenNum, pointer list) +NetBSDundoWC(int screenNum, void *list) { struct mtrr *mtrrp = (struct mtrr *) list; int n; diff --git a/xserver/hw/xfree86/os-support/bsd/ppc_video.c b/xserver/hw/xfree86/os-support/bsd/ppc_video.c index 548cb3644..06903692b 100644 --- a/xserver/hw/xfree86/os-support/bsd/ppc_video.c +++ b/xserver/hw/xfree86/os-support/bsd/ppc_video.c @@ -44,8 +44,8 @@ #define DEV_MEM "/dev/xf86" #endif -static pointer ppcMapVidMem(int, unsigned long, unsigned long, int flags); -static void ppcUnmapVidMem(int, pointer, unsigned long); +static void *ppcMapVidMem(int, unsigned long, unsigned long, int flags); +static void ppcUnmapVidMem(int, void *, unsigned long); #ifdef __NetBSD__ Bool xf86EnableIO(void); @@ -69,11 +69,11 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem) volatile unsigned char *ioBase = MAP_FAILED; -static pointer +static void * ppcMapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags) { int fd = xf86Info.consoleFd; - pointer base; + void *base; #ifdef DEBUG xf86MsgVerb(X_INFO, 3, "mapVidMem %lx, %lx, fd = %d", @@ -92,7 +92,7 @@ ppcMapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags) } static void -ppcUnmapVidMem(int ScreenNum, pointer Base, unsigned long Size) +ppcUnmapVidMem(int ScreenNum, void *Base, unsigned long Size) { munmap(Base, Size); } diff --git a/xserver/hw/xfree86/os-support/bsd/sgi_video.c b/xserver/hw/xfree86/os-support/bsd/sgi_video.c index 66d3d5f3b..ad30b3c27 100644 --- a/xserver/hw/xfree86/os-support/bsd/sgi_video.c +++ b/xserver/hw/xfree86/os-support/bsd/sgi_video.c @@ -42,8 +42,8 @@ /* Video Memory Mapping section */ /***************************************************************************/ -static pointer sgiMapVidMem(int, unsigned long, unsigned long, int); -static void sgiUnmapVidMem(int, pointer, unsigned long); +static void *sgiMapVidMem(int, unsigned long, unsigned long, int); +static void sgiUnmapVidMem(int, void *, unsigned long); void xf86OSInitVidMem(VidMemInfoPtr pVidMem) @@ -54,12 +54,12 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem) pVidMem->initialised = TRUE; } -static pointer +static void * sgiMapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags) { int fd = xf86Info.consoleFd; - pointer base; + void *base; #ifdef DEBUG xf86MsgVerb(X_INFO, 3, "mapVidMem %lx, %lx, fd = %d", @@ -77,7 +77,7 @@ sgiMapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, } static void -sgiUnmapVidMem(int ScreenNum, pointer Base, unsigned long Size) +sgiUnmapVidMem(int ScreenNum, void *Base, unsigned long Size) { munmap(Base, Size); } diff --git a/xserver/hw/xfree86/os-support/bsd/sparc64_video.c b/xserver/hw/xfree86/os-support/bsd/sparc64_video.c index c500f5e11..c701f4497 100644 --- a/xserver/hw/xfree86/os-support/bsd/sparc64_video.c +++ b/xserver/hw/xfree86/os-support/bsd/sparc64_video.c @@ -38,8 +38,8 @@ /* Video Memory Mapping section */ /***************************************************************************/ -static pointer sparc64MapVidMem(int, unsigned long, unsigned long, int); -static void sparc64UnmapVidMem(int, pointer, unsigned long); +static void *sparc64MapVidMem(int, unsigned long, unsigned long, int); +static void sparc64UnmapVidMem(int, void *, unsigned long); void xf86OSInitVidMem(VidMemInfoPtr pVidMem) @@ -53,12 +53,12 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem) pVidMem->initialised = TRUE; } -static pointer +static void * sparc64MapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags) { int fd = xf86Info.consoleFd; - pointer base; + void *base; #ifdef DEBUG xf86MsgVerb(X_INFO, 3, "mapVidMem %lx, %lx, fd = %d", Base, Size, fd); @@ -74,7 +74,7 @@ sparc64MapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, } static void -sparc64UnmapVidMem(int ScreenNum, pointer Base, unsigned long Size) +sparc64UnmapVidMem(int ScreenNum, void *Base, unsigned long Size) { munmap(Base, Size); } diff --git a/xserver/hw/xfree86/os-support/bus/Makefile.in b/xserver/hw/xfree86/os-support/bus/Makefile.in index 239093479..fd5e5f880 100644 --- a/xserver/hw/xfree86/os-support/bus/Makefile.in +++ b/xserver/hw/xfree86/os-support/bus/Makefile.in @@ -201,6 +201,8 @@ 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@ @@ -245,6 +247,10 @@ 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@ @@ -347,7 +353,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -356,6 +365,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -422,6 +432,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/xfree86/os-support/bus/Sbus.c b/xserver/hw/xfree86/os-support/bus/Sbus.c index 14e6d4bfd..16ce5b58a 100644 --- a/xserver/hw/xfree86/os-support/bus/Sbus.c +++ b/xserver/hw/xfree86/os-support/bus/Sbus.c @@ -641,10 +641,10 @@ sparcPromPathname2Node(const char *pathName) return i; } -pointer +void * xf86MapSbusMem(sbusDevicePtr psdp, unsigned long offset, unsigned long size) { - pointer ret; + void *ret; unsigned long pagemask = getpagesize() - 1; unsigned long off = offset & ~pagemask; unsigned long len = ((offset + size + pagemask) & ~pagemask) - off; @@ -657,26 +657,26 @@ xf86MapSbusMem(sbusDevicePtr psdp, unsigned long offset, unsigned long size) else if (psdp->fd < 0) return NULL; - ret = (pointer) mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_PRIVATE, + ret = (void *) mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_PRIVATE, psdp->fd, off); - if (ret == (pointer) -1) { - ret = (pointer) mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_SHARED, + if (ret == (void *) -1) { + ret = (void *) mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_SHARED, psdp->fd, off); } - if (ret == (pointer) -1) + if (ret == (void *) -1) return NULL; return (char *) ret + (offset - off); } void -xf86UnmapSbusMem(sbusDevicePtr psdp, pointer addr, unsigned long size) +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((pointer) base, len); + munmap((void *) base, len); } /* Tell OS that we are driving the HW cursor ourselves. */ diff --git a/xserver/hw/xfree86/os-support/bus/nobus.c b/xserver/hw/xfree86/os-support/bus/nobus.c index dc36ecd0a..4872c5be8 100644 --- a/xserver/hw/xfree86/os-support/bus/nobus.c +++ b/xserver/hw/xfree86/os-support/bus/nobus.c @@ -1,4 +1,7 @@ -static void +void +__noop_to_appease_ar__(void); + +void __noop_to_appease_ar__(void) { return; diff --git a/xserver/hw/xfree86/os-support/hurd/Makefile.in b/xserver/hw/xfree86/os-support/hurd/Makefile.in index a885f8f8f..0bef8dd26 100644 --- a/xserver/hw/xfree86/os-support/hurd/Makefile.in +++ b/xserver/hw/xfree86/os-support/hurd/Makefile.in @@ -164,6 +164,8 @@ 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@ @@ -208,6 +210,10 @@ 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@ @@ -310,7 +316,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -319,6 +328,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -385,6 +395,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/xfree86/os-support/hurd/hurd_video.c b/xserver/hw/xfree86/os-support/hurd/hurd_video.c index b3b94c9f2..dc1a8e670 100644 --- a/xserver/hw/xfree86/os-support/hurd/hurd_video.c +++ b/xserver/hw/xfree86/os-support/hurd/hurd_video.c @@ -42,7 +42,7 @@ /************************************************************************** * Video Memory Mapping section ***************************************************************************/ -static pointer +static void * mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int Flags) { mach_port_t device, mem_dev; @@ -89,11 +89,11 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int Flags) ("xf86MapVidMem() can't mach_port_deallocate.(mem_dev) (%s)\n", strerror(errno)); } - return (pointer) addr; + return (void *) addr; } static void -unmapVidMem(int ScreenNum, pointer Base, unsigned long Size) +unmapVidMem(int ScreenNum, void *Base, unsigned long Size) { kern_return_t err = vm_deallocate(mach_task_self(), (int) Base, Size); diff --git a/xserver/hw/xfree86/os-support/linux/Makefile.am b/xserver/hw/xfree86/os-support/linux/Makefile.am index 83e7e0027..1686dc2c1 100644 --- a/xserver/hw/xfree86/os-support/linux/Makefile.am +++ b/xserver/hw/xfree86/os-support/linux/Makefile.am @@ -21,6 +21,11 @@ APM_SRCS = lnx_apm.c XORG_CFLAGS += -DHAVE_APM endif +if SYSTEMD_LOGIND +LOGIND_SRCS = systemd-logind.c +XORG_CFLAGS += $(DBUS_CFLAGS) +endif + liblinux_la_SOURCES = lnx_init.c lnx_video.c \ lnx_agp.c lnx_kmod.c lnx_bell.c lnx_platform.c \ $(srcdir)/../shared/bios_mmap.c \ @@ -30,6 +35,7 @@ liblinux_la_SOURCES = lnx_init.c lnx_video.c \ $(srcdir)/../shared/sigio.c \ $(ACPI_SRCS) \ $(APM_SRCS) \ + $(LOGIND_SRCS) \ $(PLATFORM_PCI_SUPPORT) AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(DIX_CFLAGS) $(XORG_CFLAGS) $(PLATFORM_DEFINES) diff --git a/xserver/hw/xfree86/os-support/linux/Makefile.in b/xserver/hw/xfree86/os-support/linux/Makefile.in index 675082a0c..3cff329a0 100644 --- a/xserver/hw/xfree86/os-support/linux/Makefile.in +++ b/xserver/hw/xfree86/os-support/linux/Makefile.in @@ -53,6 +53,7 @@ host_triplet = @host@ @LINUX_ALPHA_TRUE@am__append_1 = liblinuxev56.la @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 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(top_srcdir)/depcomp @@ -82,14 +83,16 @@ am__liblinux_la_SOURCES_DIST = lnx_init.c lnx_video.c lnx_agp.c \ $(srcdir)/../shared/bios_mmap.c $(srcdir)/../shared/VTsw_usl.c \ $(srcdir)/../shared/posix_tty.c $(srcdir)/../shared/vidmem.c \ $(srcdir)/../shared/sigio.c lnx_acpi.c lnx_apm.c \ - $(srcdir)/lnx_axp.c $(srcdir)/../shared/xf86Axp.c + systemd-logind.c $(srcdir)/lnx_axp.c \ + $(srcdir)/../shared/xf86Axp.c @LNXACPI_TRUE@am__objects_1 = lnx_acpi.lo lnx_apm.lo @LNXAPM_TRUE@am__objects_2 = lnx_apm.lo -@LINUX_ALPHA_TRUE@am__objects_3 = lnx_axp.lo xf86Axp.lo +@SYSTEMD_LOGIND_TRUE@am__objects_3 = systemd-logind.lo +@LINUX_ALPHA_TRUE@am__objects_4 = lnx_axp.lo xf86Axp.lo am_liblinux_la_OBJECTS = lnx_init.lo lnx_video.lo lnx_agp.lo \ lnx_kmod.lo lnx_bell.lo lnx_platform.lo bios_mmap.lo \ VTsw_usl.lo posix_tty.lo vidmem.lo sigio.lo $(am__objects_1) \ - $(am__objects_2) $(am__objects_3) + $(am__objects_2) $(am__objects_3) $(am__objects_4) liblinux_la_OBJECTS = $(am_liblinux_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) @@ -188,6 +191,8 @@ 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@ @@ -232,6 +237,10 @@ 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@ @@ -334,7 +343,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -343,6 +355,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -378,7 +391,8 @@ 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) +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@ @@ -409,6 +423,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ @@ -490,6 +508,7 @@ noinst_LTLIBRARIES = liblinux.la $(am__append_1) @LINUX_ALPHA_TRUE@liblinuxev56_la_SOURCES = lnx_ev56.c @LNXACPI_TRUE@ACPI_SRCS = lnx_acpi.c lnx_apm.c @LNXAPM_TRUE@APM_SRCS = lnx_apm.c +@SYSTEMD_LOGIND_TRUE@LOGIND_SRCS = systemd-logind.c liblinux_la_SOURCES = lnx_init.c lnx_video.c \ lnx_agp.c lnx_kmod.c lnx_bell.c lnx_platform.c \ $(srcdir)/../shared/bios_mmap.c \ @@ -499,6 +518,7 @@ liblinux_la_SOURCES = lnx_init.c lnx_video.c \ $(srcdir)/../shared/sigio.c \ $(ACPI_SRCS) \ $(APM_SRCS) \ + $(LOGIND_SRCS) \ $(PLATFORM_PCI_SUPPORT) AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(DIX_CFLAGS) $(XORG_CFLAGS) $(PLATFORM_DEFINES) @@ -577,6 +597,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lnx_video.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/posix_tty.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigio.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/systemd-logind.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vidmem.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xf86Axp.Plo@am__quote@ diff --git a/xserver/hw/xfree86/os-support/linux/int10/linux.c b/xserver/hw/xfree86/os-support/linux/int10/linux.c index 8bca37524..6181eb9c5 100644 --- a/xserver/hw/xfree86/os-support/linux/int10/linux.c +++ b/xserver/hw/xfree86/os-support/linux/int10/linux.c @@ -18,7 +18,7 @@ #define DEV_MEM "/dev/mem" #endif #define ALLOC_ENTRIES(x) ((V_RAM / x) - 1) -#define SHMERRORPTR (pointer)(-1) +#define SHMERRORPTR (void *)(-1) #include <fcntl.h> #include <errno.h> @@ -153,9 +153,9 @@ xf86ExtendedInitInt10(int entityIndex, int Flags) goto error0; pInt->mem = &linuxMem; pagesize = getpagesize(); - pInt->private = (pointer) xnfcalloc(1, sizeof(linuxInt10Priv)); + pInt->private = (void *) xnfcalloc(1, sizeof(linuxInt10Priv)); ((linuxInt10Priv *) pInt->private)->alloc = - (pointer) xnfcalloc(1, ALLOC_ENTRIES(pagesize)); + (void *) xnfcalloc(1, ALLOC_ENTRIES(pagesize)); if (!xf86IsEntityPrimary(entityIndex)) { DebugF("Mapping high memory area\n"); @@ -233,10 +233,10 @@ xf86ExtendedInitInt10(int entityIndex, int Flags) * 64K bytes at a time. */ if (!videoBiosMapped) { - memset((pointer) V_BIOS, 0, SYS_BIOS - V_BIOS); + 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 (xf86ReadBIOS(cs, 0, (pointer) cs, V_BIOS_SIZE) < V_BIOS_SIZE) + if (xf86ReadBIOS(cs, 0, (void *) cs, V_BIOS_SIZE) < V_BIOS_SIZE) xf86DrvMsg(screen, X_WARNING, "Unable to retrieve all of segment 0x%06lX.\n", (long) cs); @@ -319,7 +319,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags) Bool MapCurrentInt10(xf86Int10InfoPtr pInt) { - pointer addr; + void *addr; int fd = -1; if (Int10Current) { @@ -327,7 +327,7 @@ MapCurrentInt10(xf86Int10InfoPtr pInt) if (((linuxInt10Priv *) Int10Current->private)->highMem >= 0) shmdt((char *) HIGH_MEM); else - munmap((pointer) V_BIOS, (SYS_BIOS - V_BIOS)); + munmap((void *) V_BIOS, (SYS_BIOS - V_BIOS)); } addr = shmat(((linuxInt10Priv *) pInt->private)->lowMem, (char *) 1, SHM_RND); @@ -392,7 +392,7 @@ xf86FreeInt10(xf86Int10InfoPtr pInt) if (((linuxInt10Priv *) pInt->private)->highMem >= 0) shmdt((char *) HIGH_MEM); else - munmap((pointer) V_BIOS, (SYS_BIOS - V_BIOS)); + munmap((void *) V_BIOS, (SYS_BIOS - V_BIOS)); Int10Current = NULL; } @@ -486,22 +486,22 @@ write_l(xf86Int10InfoPtr pInt, int addr, CARD32 val) *((CARD32 *) (memType) addr) = val; } -pointer +void * xf86int10Addr(xf86Int10InfoPtr pInt, CARD32 addr) { if (addr < V_RAM) return ((linuxInt10Priv *) pInt->private)->base + addr; else if (addr < V_BIOS) - return (pointer) (memType) addr; + return (void *) (memType) addr; else if (addr < SYS_BIOS) { if (((linuxInt10Priv *) pInt->private)->base_high) - return (pointer) (((linuxInt10Priv *) pInt->private)->base_high + return (void *) (((linuxInt10Priv *) pInt->private)->base_high - V_BIOS + addr); else - return (pointer) (memType) addr; + return (void *) (memType) addr; } else - return (pointer) (memType) addr; + return (void *) (memType) addr; } #if defined DoSubModules diff --git a/xserver/hw/xfree86/os-support/linux/lnx_acpi.c b/xserver/hw/xfree86/os-support/linux/lnx_acpi.c index dcaa19ee1..dbd5afe90 100644 --- a/xserver/hw/xfree86/os-support/linux/lnx_acpi.c +++ b/xserver/hw/xfree86/os-support/linux/lnx_acpi.c @@ -33,14 +33,14 @@ #define ACPI_VIDEO_HEAD_END (~0u) static void lnxCloseACPI(void); -static pointer ACPIihPtr = NULL; +static void *ACPIihPtr = NULL; PMClose lnxACPIOpen(void); /* in milliseconds */ #define ACPI_REOPEN_DELAY 1000 static CARD32 -lnxACPIReopen(OsTimerPtr timer, CARD32 time, pointer arg) +lnxACPIReopen(OsTimerPtr timer, CARD32 time, void *arg) { if (lnxACPIOpen()) { TimerFree(timer); @@ -74,13 +74,12 @@ lnxACPIGetEventFromOs(int fd, pmEvent * events, int num) /* Check that we have a video event */ if (!strncmp(ev, "video", 5)) { - char *video = NULL; char *GFX = NULL; char *notify = NULL; char *data = NULL; /* doesn't appear to be used in the kernel */ - unsigned long int notify_l, data_l; + unsigned long int notify_l; - video = strtok(ev, " "); + strtok(ev, " "); if (!(GFX = strtok(NULL, " "))) return 0; @@ -97,8 +96,8 @@ lnxACPIGetEventFromOs(int fd, pmEvent * events, int num) if (!(data = strtok(NULL, " "))) return 0; - data_l = strtoul(data, NULL, 16); #if 0 + data_l = strtoul(data, NULL, 16); ErrorF("data: 0x%lx\n", data_l); #endif diff --git a/xserver/hw/xfree86/os-support/linux/lnx_apm.c b/xserver/hw/xfree86/os-support/linux/lnx_apm.c index 387934099..621691997 100644 --- a/xserver/hw/xfree86/os-support/linux/lnx_apm.c +++ b/xserver/hw/xfree86/os-support/linux/lnx_apm.c @@ -36,7 +36,7 @@ extern PMClose lnxACPIOpen(void); static PMClose lnxAPMOpen(void); static void lnxCloseAPM(void); -static pointer APMihPtr = NULL; +static void *APMihPtr = NULL; static struct { apm_event_t apmLinux; diff --git a/xserver/hw/xfree86/os-support/linux/lnx_ev56.c b/xserver/hw/xfree86/os-support/linux/lnx_ev56.c index 49950705a..b6950009c 100644 --- a/xserver/hw/xfree86/os-support/linux/lnx_ev56.c +++ b/xserver/hw/xfree86/os-support/linux/lnx_ev56.c @@ -6,77 +6,77 @@ #include "xf86.h" #include "compiler.h" -int readDense8(pointer Base, register unsigned long Offset); -int readDense16(pointer Base, register unsigned long Offset); -int readDense32(pointer Base, register unsigned long Offset); +int readDense8(void *Base, register unsigned long Offset); +int readDense16(void *Base, register unsigned long Offset); +int readDense32(void *Base, register unsigned long Offset); void - writeDenseNB8(int Value, pointer Base, register unsigned long Offset); + writeDenseNB8(int Value, void *Base, register unsigned long Offset); void - writeDenseNB16(int Value, pointer Base, register unsigned long Offset); + writeDenseNB16(int Value, void *Base, register unsigned long Offset); void - writeDenseNB32(int Value, pointer Base, register unsigned long Offset); + writeDenseNB32(int Value, void *Base, register unsigned long Offset); void - writeDense8(int Value, pointer Base, register unsigned long Offset); + writeDense8(int Value, void *Base, register unsigned long Offset); void - writeDense16(int Value, pointer Base, register unsigned long Offset); + writeDense16(int Value, void *Base, register unsigned long Offset); void - writeDense32(int Value, pointer Base, register unsigned long Offset); + writeDense32(int Value, void *Base, register unsigned long Offset); int -readDense8(pointer Base, register unsigned long Offset) +readDense8(void *Base, register unsigned long Offset) { mem_barrier(); return *(volatile CARD8 *) ((unsigned long) Base + (Offset)); } int -readDense16(pointer Base, register unsigned long Offset) +readDense16(void *Base, register unsigned long Offset) { mem_barrier(); return *(volatile CARD16 *) ((unsigned long) Base + (Offset)); } int -readDense32(pointer Base, register unsigned long Offset) +readDense32(void *Base, register unsigned long Offset) { mem_barrier(); return *(volatile CARD32 *) ((unsigned long) Base + (Offset)); } void -writeDenseNB8(int Value, pointer Base, register unsigned long Offset) +writeDenseNB8(int Value, void *Base, register unsigned long Offset) { *(volatile CARD8 *) ((unsigned long) Base + (Offset)) = Value; } void -writeDenseNB16(int Value, pointer Base, register unsigned long Offset) +writeDenseNB16(int Value, void *Base, register unsigned long Offset) { *(volatile CARD16 *) ((unsigned long) Base + (Offset)) = Value; } void -writeDenseNB32(int Value, pointer Base, register unsigned long Offset) +writeDenseNB32(int Value, void *Base, register unsigned long Offset) { *(volatile CARD32 *) ((unsigned long) Base + (Offset)) = Value; } void -writeDense8(int Value, pointer Base, register unsigned long Offset) +writeDense8(int Value, void *Base, register unsigned long Offset) { write_mem_barrier(); *(volatile CARD8 *) ((unsigned long) Base + (Offset)) = Value; } void -writeDense16(int Value, pointer Base, register unsigned long Offset) +writeDense16(int Value, void *Base, register unsigned long Offset) { write_mem_barrier(); *(volatile CARD16 *) ((unsigned long) Base + (Offset)) = Value; } void -writeDense32(int Value, pointer Base, register unsigned long Offset) +writeDense32(int Value, void *Base, register unsigned long Offset) { write_mem_barrier(); *(volatile CARD32 *) ((unsigned long) Base + (Offset)) = Value; diff --git a/xserver/hw/xfree86/os-support/linux/lnx_init.c b/xserver/hw/xfree86/os-support/linux/lnx_init.c index bcb039f3f..85709c629 100644 --- a/xserver/hw/xfree86/os-support/linux/lnx_init.c +++ b/xserver/hw/xfree86/os-support/linux/lnx_init.c @@ -79,20 +79,15 @@ switch_to(int vt, const char *from) void xf86OpenConsole(void) { - int i, fd = -1, ret; + int i, fd = -1, ret, current_vt = -1; struct vt_mode VT; struct vt_stat vts; + struct stat st; MessageType from = X_PROBED; - char *tty0[] = { "/dev/tty0", "/dev/vc/0", NULL }; - char *vcs[] = { "/dev/vc/%d", "/dev/tty%d", NULL }; + const char *tty0[] = { "/dev/tty0", "/dev/vc/0", NULL }; + const char *vcs[] = { "/dev/vc/%d", "/dev/tty%d", NULL }; if (serverGeneration == 1) { - - /* when KeepTty check if we're run with euid==0 */ - if (KeepTty && geteuid() != 0) - FatalError("xf86OpenConsole:" - " Server must be suid root for option \"KeepTTY\"\n"); - /* * setup the virtual terminal manager */ @@ -132,6 +127,22 @@ xf86OpenConsole(void) 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; + } + if (!KeepTty) { pid_t ppid = getppid(); pid_t ppgid; @@ -155,6 +166,7 @@ xf86OpenConsole(void) i = 0; while (vcs[i] != NULL) { +#pragma GCC diagnostic ignored "-Wformat-nonliteral" snprintf(vtname, sizeof(vtname), vcs[i], xf86Info.vtno); /* /dev/tty1-64 */ if ((xf86Info.consoleFd = open(vtname, O_RDWR | O_NDELAY, 0)) >= 0) break; diff --git a/xserver/hw/xfree86/os-support/linux/lnx_kmod.c b/xserver/hw/xfree86/os-support/linux/lnx_kmod.c index 0a17c2a81..f5917eefb 100644 --- a/xserver/hw/xfree86/os-support/linux/lnx_kmod.c +++ b/xserver/hw/xfree86/os-support/linux/lnx_kmod.c @@ -37,7 +37,7 @@ int xf86LoadKernelModule(const char *modName) { char mpPath[MAX_PATH] = ""; - int fd = -1, status, n; + int fd = -1, status; pid_t pid; /* get the path to the modprobe program */ @@ -76,7 +76,7 @@ xf86LoadKernelModule(const char *modName) "Setting of real/effective user Id to 0/0 failed"); } setenv("PATH", "/sbin", 1); - n = execl(mpPath, "modprobe", modName, NULL); + 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; diff --git a/xserver/hw/xfree86/os-support/linux/lnx_platform.c b/xserver/hw/xfree86/os-support/linux/lnx_platform.c index 1865b31b9..d660761c5 100644 --- a/xserver/hw/xfree86/os-support/linux/lnx_platform.c +++ b/xserver/hw/xfree86/os-support/linux/lnx_platform.c @@ -18,16 +18,36 @@ #include "xf86Bus.h" #include "hotplug.h" +#include "systemd-logind.h" static Bool get_drm_info(struct OdevAttributes *attribs, char *path, int delayed_index) { drmSetVersion sv; + drmVersionPtr v; char *buf; - int fd; + int major, minor, fd; int err = 0; + Bool paused, server_fd = FALSE; + + major = config_odev_get_int_attribute(attribs, ODEV_ATTRIB_MAJOR, 0); + minor = config_odev_get_int_attribute(attribs, ODEV_ATTRIB_MINOR, 0); + + fd = systemd_logind_take_fd(major, 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(major, minor, -1); + return FALSE; + } + config_odev_add_int_attribute(attribs, ODEV_ATTRIB_FD, fd); + server_fd = TRUE; + } + + if (fd == -1) + fd = open(path, O_RDWR, O_CLOEXEC); - fd = open(path, O_RDWR, O_CLOEXEC); if (fd == -1) return FALSE; @@ -38,22 +58,38 @@ get_drm_info(struct OdevAttributes *attribs, char *path, int delayed_index) err = drmSetInterfaceVersion(fd, &sv); if (err) { - ErrorF("setversion 1.4 failed: %s\n", strerror(-err)); - goto out; + xf86Msg(X_ERROR, "%s: failed to set DRM interface version 1.4: %s\n", + path, strerror(-err)); + goto out; } /* for a delayed probe we've already added the device */ if (delayed_index == -1) { - xf86_add_platform_device(attribs); + 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; + buf = drmGetBusid(fd); xf86_add_platform_device_attrib(delayed_index, ODEV_ATTRIB_BUSID, buf); drmFreeBusid(buf); + + v = drmGetVersion(fd); + if (!v) { + xf86Msg(X_ERROR, "%s: failed to query DRM version\n", path); + goto out; + } + + xf86_add_platform_device_attrib(delayed_index, ODEV_ATTRIB_DRIVER, + v->name); + drmFreeVersion(v); + out: - close(fd); + if (!server_fd) + close(fd); return (err == 0); } @@ -118,17 +154,11 @@ xf86PlatformReprobeDevice(int index, struct OdevAttributes *attribs) void xf86PlatformDeviceProbe(struct OdevAttributes *attribs) { - struct OdevAttribute *attrib; int i; char *path = NULL; Bool ret; - xorg_list_for_each_entry(attrib, &attribs->list, member) { - if (attrib->attrib_id == ODEV_ATTRIB_PATH) { - path = attrib->attrib_name; - break; - } - } + path = config_odev_get_attribute(attribs, ODEV_ATTRIB_PATH); if (!path) goto out_free; @@ -148,8 +178,7 @@ xf86PlatformDeviceProbe(struct OdevAttributes *attribs) if (!xf86VTOwner()) { /* if we don't currently own the VT then don't probe the device, just mark it as unowned for later use */ - attribs->unowned = TRUE; - xf86_add_platform_device(attribs); + xf86_add_platform_device(attribs, TRUE); return; } diff --git a/xserver/hw/xfree86/os-support/linux/lnx_video.c b/xserver/hw/xfree86/os-support/linux/lnx_video.c index 43d0a364a..652f963a2 100644 --- a/xserver/hw/xfree86/os-support/linux/lnx_video.c +++ b/xserver/hw/xfree86/os-support/linux/lnx_video.c @@ -59,7 +59,9 @@ static Bool ExtendedEnabled = FALSE; !defined(__mips__) && \ !defined(__nds32__) && \ !defined(__arm__) && \ - !defined(__aarch64__) + !defined(__aarch64__) && \ + !defined(__arc__) && \ + !defined(__xtensa__) /* * Due to conflicts with "compiler.h", don't rely on <sys/io.h> to declare @@ -80,17 +82,17 @@ extern int iopl(int __level); /* Video Memory Mapping section */ /***************************************************************************/ -static pointer mapVidMem(int, unsigned long, unsigned long, int); -static void unmapVidMem(int, pointer, unsigned long); +static void *mapVidMem(int, unsigned long, unsigned long, int); +static void unmapVidMem(int, void *, unsigned long); #if defined (__alpha__) extern void sethae(unsigned long hae); extern unsigned long _bus_base __P((void)) __attribute__ ((const)); extern unsigned long _bus_base_sparse __P((void)) __attribute__ ((const)); -static pointer mapVidMemSparse(int, unsigned long, unsigned long, int); +static void *mapVidMemSparse(int, unsigned long, unsigned long, int); extern axpDevice lnxGetAXP(void); -static void unmapVidMemSparse(int, pointer, unsigned long); +static void unmapVidMemSparse(int, void *, unsigned long); static axpDevice axpSystem = -1; static Bool needSparse; static unsigned long hae_thresh; @@ -102,8 +104,8 @@ static unsigned long bus_base; #define SPLIT_WC_REGIONS 1 -static pointer setWC(int, unsigned long, unsigned long, Bool, MessageType); -static void undoWC(int, pointer); +static void *setWC(int, unsigned long, unsigned long, Bool, MessageType); +static void undoWC(int, void *); /* The file desc for /proc/mtrr. Once opened, left opened, and the mtrr driver will clean up when we exit. */ @@ -204,7 +206,7 @@ mtrr_cull_wc_region(int screenNum, unsigned long base, unsigned long size, xf86DrvMsgVerb(screenNum, X_WARNING, 0, "Failed to remove MMIO " "write-combining range (0x%lx,0x%lx)\n", - gent.base, (unsigned long) gent.size); + (unsigned long)gent.base, (unsigned long) gent.size); } } return wcreturn; @@ -339,7 +341,7 @@ mtrr_undo_wc_region(int screenNum, struct mtrr_wc_region *wcr) } } -static pointer +static void * setWC(int screenNum, unsigned long base, unsigned long size, Bool enable, MessageType from) { @@ -350,7 +352,7 @@ setWC(int screenNum, unsigned long base, unsigned long size, Bool enable, } static void -undoWC(int screenNum, pointer regioninfo) +undoWC(int screenNum, void *regioninfo) { mtrr_undo_wc_region(screenNum, regioninfo); } @@ -396,16 +398,16 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem) /* Basically, you simply cannot do this on Sparc. You have to do something portable * like use /dev/fb* or mmap() on /proc/bus/pci/X/Y nodes. -DaveM */ -static pointer +static void * mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags) { return NULL; } #else -static pointer +static void * mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags) { - pointer base; + void *base; int fd; int mapflags = MAP_SHARED; int prot; @@ -460,7 +462,7 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags) #endif /* !(__sparc__) */ static void -unmapVidMem(int ScreenNum, pointer Base, unsigned long Size) +unmapVidMem(int ScreenNum, void *Base, unsigned long Size) { uintptr_t alignOff = (uintptr_t) Base - ((uintptr_t) Base & ~(getpagesize() - 1)); @@ -565,44 +567,44 @@ xf86DisableIO(void) #define vuip volatile unsigned int * -extern int readDense8(pointer Base, register unsigned long Offset); -extern int readDense16(pointer Base, register unsigned long Offset); -extern int readDense32(pointer Base, register unsigned long Offset); +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 - writeDenseNB8(int Value, pointer Base, register unsigned long Offset); + writeDenseNB8(int Value, void *Base, register unsigned long Offset); extern void - writeDenseNB16(int Value, pointer Base, register unsigned long Offset); + writeDenseNB16(int Value, void *Base, register unsigned long Offset); extern void - writeDenseNB32(int Value, pointer Base, register unsigned long Offset); + writeDenseNB32(int Value, void *Base, register unsigned long Offset); extern void - writeDense8(int Value, pointer Base, register unsigned long Offset); + writeDense8(int Value, void *Base, register unsigned long Offset); extern void - writeDense16(int Value, pointer Base, register unsigned long Offset); + writeDense16(int Value, void *Base, register unsigned long Offset); extern void - writeDense32(int Value, pointer Base, register unsigned long Offset); + writeDense32(int Value, void *Base, register unsigned long Offset); -static int readSparse8(pointer Base, register unsigned long Offset); -static int readSparse16(pointer Base, register unsigned long Offset); -static int readSparse32(pointer Base, register unsigned long Offset); +static int readSparse8(void *Base, register unsigned long Offset); +static int readSparse16(void *Base, register unsigned long Offset); +static int readSparse32(void *Base, register unsigned long Offset); static void - writeSparseNB8(int Value, pointer Base, register unsigned long Offset); + writeSparseNB8(int Value, void *Base, register unsigned long Offset); static void - writeSparseNB16(int Value, pointer Base, register unsigned long Offset); + writeSparseNB16(int Value, void *Base, register unsigned long Offset); static void - writeSparseNB32(int Value, pointer Base, register unsigned long Offset); + writeSparseNB32(int Value, void *Base, register unsigned long Offset); static void - writeSparse8(int Value, pointer Base, register unsigned long Offset); + writeSparse8(int Value, void *Base, register unsigned long Offset); static void - writeSparse16(int Value, pointer Base, register unsigned long Offset); + writeSparse16(int Value, void *Base, register unsigned long Offset); static void - writeSparse32(int Value, pointer Base, register unsigned long Offset); + writeSparse32(int Value, void *Base, register unsigned long Offset); #define DENSE_BASE 0x2ff00000000UL #define SPARSE_BASE 0x30000000000UL static unsigned long msb_set = 0; -static pointer +static void * mapVidMemSparse(int ScreenNum, unsigned long Base, unsigned long Size, int flags) { @@ -689,11 +691,11 @@ mapVidMemSparse(int ScreenNum, unsigned long Base, unsigned long Size, " to DENSE only at 0x%lx\n", Base, Size, ret); #endif - return (pointer) ret; + return (void *) ret; } static void -unmapVidMemSparse(int ScreenNum, pointer Base, unsigned long Size) +unmapVidMemSparse(int ScreenNum, void *Base, unsigned long Size) { unsigned long Offset = (unsigned long) Base - DENSE_BASE; @@ -709,7 +711,7 @@ unmapVidMemSparse(int ScreenNum, pointer Base, unsigned long Size) } static int -readSparse8(pointer Base, register unsigned long Offset) +readSparse8(void *Base, register unsigned long Offset) { register unsigned long result, shift; register unsigned long msb; @@ -733,7 +735,7 @@ readSparse8(pointer Base, register unsigned long Offset) } static int -readSparse16(pointer Base, register unsigned long Offset) +readSparse16(void *Base, register unsigned long Offset) { register unsigned long result, shift; register unsigned long msb; @@ -757,7 +759,7 @@ readSparse16(pointer Base, register unsigned long Offset) } static int -readSparse32(pointer Base, register unsigned long Offset) +readSparse32(void *Base, register unsigned long Offset) { /* NOTE: this is really using DENSE. */ mem_barrier(); @@ -765,7 +767,7 @@ readSparse32(pointer Base, register unsigned long Offset) } static void -writeSparse8(int Value, pointer Base, register unsigned long Offset) +writeSparse8(int Value, void *Base, register unsigned long Offset) { register unsigned long msb; register unsigned int b = Value & 0xffU; @@ -786,7 +788,7 @@ writeSparse8(int Value, pointer Base, register unsigned long Offset) } static void -writeSparse16(int Value, pointer Base, register unsigned long Offset) +writeSparse16(int Value, void *Base, register unsigned long Offset) { register unsigned long msb; register unsigned int w = Value & 0xffffU; @@ -807,7 +809,7 @@ writeSparse16(int Value, pointer Base, register unsigned long Offset) } static void -writeSparse32(int Value, pointer Base, register unsigned long Offset) +writeSparse32(int Value, void *Base, register unsigned long Offset) { /* NOTE: this is really using DENSE. */ write_mem_barrier(); @@ -816,7 +818,7 @@ writeSparse32(int Value, pointer Base, register unsigned long Offset) } static void -writeSparseNB8(int Value, pointer Base, register unsigned long Offset) +writeSparseNB8(int Value, void *Base, register unsigned long Offset) { register unsigned long msb; register unsigned int b = Value & 0xffU; @@ -834,7 +836,7 @@ writeSparseNB8(int Value, pointer Base, register unsigned long Offset) } static void -writeSparseNB16(int Value, pointer Base, register unsigned long Offset) +writeSparseNB16(int Value, void *Base, register unsigned long Offset) { register unsigned long msb; register unsigned int w = Value & 0xffffU; @@ -852,30 +854,30 @@ writeSparseNB16(int Value, pointer Base, register unsigned long Offset) } static void -writeSparseNB32(int Value, pointer Base, register unsigned long Offset) +writeSparseNB32(int Value, void *Base, register unsigned long Offset) { /* NOTE: this is really using DENSE. */ *(vuip) ((unsigned long) Base + (Offset)) = Value; return; } -void (*xf86WriteMmio8) (int Value, pointer Base, unsigned long Offset) +void (*xf86WriteMmio8) (int Value, void *Base, unsigned long Offset) = writeDense8; -void (*xf86WriteMmio16) (int Value, pointer Base, unsigned long Offset) +void (*xf86WriteMmio16) (int Value, void *Base, unsigned long Offset) = writeDense16; -void (*xf86WriteMmio32) (int Value, pointer Base, unsigned long Offset) +void (*xf86WriteMmio32) (int Value, void *Base, unsigned long Offset) = writeDense32; -void (*xf86WriteMmioNB8) (int Value, pointer Base, unsigned long Offset) +void (*xf86WriteMmioNB8) (int Value, void *Base, unsigned long Offset) = writeDenseNB8; -void (*xf86WriteMmioNB16) (int Value, pointer Base, unsigned long Offset) +void (*xf86WriteMmioNB16) (int Value, void *Base, unsigned long Offset) = writeDenseNB16; -void (*xf86WriteMmioNB32) (int Value, pointer Base, unsigned long Offset) +void (*xf86WriteMmioNB32) (int Value, void *Base, unsigned long Offset) = writeDenseNB32; -int (*xf86ReadMmio8) (pointer Base, unsigned long Offset) +int (*xf86ReadMmio8) (void *Base, unsigned long Offset) = readDense8; -int (*xf86ReadMmio16) (pointer Base, unsigned long Offset) +int (*xf86ReadMmio16) (void *Base, unsigned long Offset) = readDense16; -int (*xf86ReadMmio32) (pointer Base, unsigned long Offset) +int (*xf86ReadMmio32) (void *Base, unsigned long Offset) = readDense32; #endif /* __alpha__ */ diff --git a/xserver/hw/xfree86/os-support/linux/systemd-logind.c b/xserver/hw/xfree86/os-support/linux/systemd-logind.c new file mode 100644 index 000000000..73a8d55bf --- /dev/null +++ b/xserver/hw/xfree86/os-support/linux/systemd-logind.c @@ -0,0 +1,608 @@ +/* + * 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 <hdegoede@redhat.com> + */ + +#ifdef HAVE_XORG_CONFIG_H +#include <xorg-config.h> +#endif + +#include <dbus/dbus.h> +#include <string.h> +#include <sys/types.h> +#include <unistd.h> + +#include "os.h" +#include "dbus-core.h" +#include "xf86.h" +#include "xf86platformBus.h" +#include "xf86Xinput.h" + +#include "systemd-logind.h" + +#define DBUS_TIMEOUT 500 /* Wait max 0.5 seconds */ + +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, &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, &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, &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); +} + +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; + + dbus_error_init(&error); + + if (dbus_message_is_signal(message, + "org.freedesktop.DBus", "NameOwnerChanged")) { + char *name, *old_owner, *new_owner; + + 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)) { + LogMessage(X_ERROR, "systemd-logind: NameOwnerChanged: %s\n", + error.message); + dbus_error_free(&error); + return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + } + + if (name && strcmp(name, "org.freedesktop.login1") == 0) + FatalError("systemd-logind disappeared (stopped/restarted?)\n"); + + return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + } + + if (strcmp(dbus_message_get_path(message), info->session) != 0) + return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; + + 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); + + /* Always call vtenter(), in case there are only legacy video devs */ + 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, &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, &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.DBus',interface='org.freedesktop.DBus',member='NameOwnerChanged',path='/org/freedesktop/DBus'", + &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, &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) +{ + 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); +} diff --git a/xserver/hw/xfree86/os-support/misc/Makefile.in b/xserver/hw/xfree86/os-support/misc/Makefile.in index 7f58e629e..2808d9c86 100644 --- a/xserver/hw/xfree86/os-support/misc/Makefile.in +++ b/xserver/hw/xfree86/os-support/misc/Makefile.in @@ -162,6 +162,8 @@ 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@ @@ -206,6 +208,10 @@ 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@ @@ -308,7 +314,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -317,6 +326,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -383,6 +393,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/xfree86/os-support/shared/posix_tty.c b/xserver/hw/xfree86/os-support/shared/posix_tty.c index af4900473..ce758602d 100644 --- a/xserver/hw/xfree86/os-support/shared/posix_tty.c +++ b/xserver/hw/xfree86/os-support/shared/posix_tty.c @@ -61,9 +61,8 @@ #include "xf86Priv.h" #include "xf86_OSlib.h" - -static int -GetBaud (int baudrate) +static int +GetBaud(int baudrate) { #ifdef B300 if (baudrate == 300) @@ -119,62 +118,67 @@ xf86OpenSerial(XF86OptionPtr options) int fd, i; char *dev; - dev = xf86SetStrOption (options, "Device", NULL); + dev = xf86SetStrOption(options, "Device", NULL); if (!dev) { - xf86Msg (X_ERROR, "xf86OpenSerial: No Device specified.\n"); + xf86Msg(X_ERROR, "xf86OpenSerial: No Device specified.\n"); return -1; } + + fd = xf86CheckIntOption(options, "fd", -1); + + if (fd == -1) #ifndef X_PRIVSEP - SYSCALL (fd = open (dev, O_RDWR | O_NONBLOCK)); + SYSCALL(fd = open(dev, O_RDWR | O_NONBLOCK)); #else - fd = priv_open_device (dev); + fd = priv_open_device(dev); #endif + if (fd == -1) { - xf86Msg (X_ERROR, - "xf86OpenSerial: Cannot open device %s\n\t%s.\n", - dev, strerror (errno)); + xf86Msg(X_ERROR, + "xf86OpenSerial: Cannot open device %s\n\t%s.\n", + dev, strerror(errno)); free(dev); return -1; } - if (!isatty (fd)) { + 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); + 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_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)); + SYSCALL(tcsetattr(fd, TCSANOW, &t)); - if (xf86SetSerial (fd, options) == -1) { - SYSCALL (close (fd)); + if (xf86SetSerial(fd, options) == -1) { + SYSCALL(close(fd)); free(dev); return -1; } - SYSCALL (i = fcntl (fd, F_GETFL, 0)); + SYSCALL(i = fcntl(fd, F_GETFL, 0)); if (i == -1) { - SYSCALL (close (fd)); + SYSCALL(close(fd)); free(dev); return -1; } i &= ~O_NONBLOCK; - SYSCALL (i = fcntl (fd, F_SETFL, i)); + SYSCALL(i = fcntl(fd, F_SETFL, i)); if (i == -1) { - SYSCALL (close (fd)); + SYSCALL(close(fd)); free(dev); return -1; } diff --git a/xserver/hw/xfree86/os-support/shared/vidmem.c b/xserver/hw/xfree86/os-support/shared/vidmem.c index 68ed30e41..f473293c7 100644 --- a/xserver/hw/xfree86/os-support/shared/vidmem.c +++ b/xserver/hw/xfree86/os-support/shared/vidmem.c @@ -51,8 +51,8 @@ typedef struct { unsigned long size; - pointer virtBase; - pointer mtrrInfo; + void *virtBase; + void *mtrrInfo; } MappingRec, *MappingPtr; typedef struct { @@ -104,7 +104,7 @@ newMapping(VidMapPtr vp) } static MappingPtr -findMapping(VidMapPtr vp, pointer vbase, unsigned long size) +findMapping(VidMapPtr vp, void *vbase, unsigned long size) { int i; @@ -165,10 +165,10 @@ xf86InitVidMem(void) } } -pointer +void * xf86MapVidMem(int ScreenNum, int Flags, unsigned long Base, unsigned long Size) { - pointer vbase = NULL; + void *vbase = NULL; VidMapPtr vp; MappingPtr mp; @@ -182,7 +182,7 @@ xf86MapVidMem(int ScreenNum, int Flags, unsigned long Base, unsigned long Size) vbase = vidMemInfo.mapMem(ScreenNum, Base, Size, Flags); - if (!vbase || vbase == (pointer) -1) + if (!vbase || vbase == (void *) -1) return NULL; vp = getVidMapRec(ScreenNum); @@ -208,7 +208,7 @@ xf86MapVidMem(int ScreenNum, int Flags, unsigned long Base, unsigned long Size) } void -xf86UnMapVidMem(int ScreenNum, pointer Base, unsigned long Size) +xf86UnMapVidMem(int ScreenNum, void *Base, unsigned long Size) { VidMapPtr vp; MappingPtr mp; diff --git a/xserver/hw/xfree86/os-support/solaris/Makefile.in b/xserver/hw/xfree86/os-support/solaris/Makefile.in index d0cb0f6b7..cbba4d87e 100644 --- a/xserver/hw/xfree86/os-support/solaris/Makefile.in +++ b/xserver/hw/xfree86/os-support/solaris/Makefile.in @@ -217,6 +217,8 @@ 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@ @@ -261,6 +263,10 @@ 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@ @@ -363,7 +369,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -372,6 +381,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -438,6 +448,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/xfree86/os-support/solaris/sun_apm.c b/xserver/hw/xfree86/os-support/solaris/sun_apm.c index b6a1432f6..38fa5ecf2 100644 --- a/xserver/hw/xfree86/os-support/solaris/sun_apm.c +++ b/xserver/hw/xfree86/os-support/solaris/sun_apm.c @@ -90,7 +90,7 @@ typedef struct apm_event_info { #define APM_DEVICE "/dev/srn" #define APM_DEVICE1 "/dev/apm" -static pointer APMihPtr = NULL; +static void *APMihPtr = NULL; static void sunCloseAPM(void); static struct { diff --git a/xserver/hw/xfree86/os-support/solaris/sun_init.c b/xserver/hw/xfree86/os-support/solaris/sun_init.c index 68527a577..16fc1b739 100644 --- a/xserver/hw/xfree86/os-support/solaris/sun_init.c +++ b/xserver/hw/xfree86/os-support/solaris/sun_init.c @@ -316,7 +316,7 @@ xf86CloseConsole(void) " attributes (%s)\n", strerror(errno)); } else { - pointer fbdata; + void *fbdata; fbdata = mmap(NULL, fbattr.fbtype.fb_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); diff --git a/xserver/hw/xfree86/os-support/solaris/sun_vid.c b/xserver/hw/xfree86/os-support/solaris/sun_vid.c index 67ef17689..fc464871d 100644 --- a/xserver/hw/xfree86/os-support/solaris/sun_vid.c +++ b/xserver/hw/xfree86/os-support/solaris/sun_vid.c @@ -107,10 +107,10 @@ solOpenAperture(void) return TRUE; } -static pointer +static void * solMapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int Flags) { - pointer base; + void *base; int fd; int prot; @@ -144,7 +144,7 @@ solMapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int Flags) /* ARGSUSED */ static void -solUnMapVidMem(int ScreenNum, pointer Base, unsigned long Size) +solUnMapVidMem(int ScreenNum, void *Base, unsigned long Size) { if (munmap(Base, Size) != 0) { xf86DrvMsgVerb(ScreenNum, X_WARNING, 0, diff --git a/xserver/hw/xfree86/os-support/stub/Makefile.in b/xserver/hw/xfree86/os-support/stub/Makefile.in index e99acf66a..4e9ea05ab 100644 --- a/xserver/hw/xfree86/os-support/stub/Makefile.in +++ b/xserver/hw/xfree86/os-support/stub/Makefile.in @@ -164,6 +164,8 @@ 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@ @@ -208,6 +210,10 @@ 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@ @@ -310,7 +316,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -319,6 +328,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -385,6 +395,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/xfree86/os-support/xf86OSpriv.h b/xserver/hw/xfree86/os-support/xf86OSpriv.h index bd734f554..7f003e8ce 100644 --- a/xserver/hw/xfree86/os-support/xf86OSpriv.h +++ b/xserver/hw/xfree86/os-support/xf86OSpriv.h @@ -32,12 +32,12 @@ #ifndef _XF86OSPRIV_H #define _XF86OSPRIV_H -typedef pointer (*MapMemProcPtr) (int, unsigned long, unsigned long, int); -typedef void (*UnmapMemProcPtr) (int, pointer, unsigned long); -typedef pointer (*SetWCProcPtr) (int, unsigned long, unsigned long, Bool, +typedef void *(*MapMemProcPtr) (int, unsigned long, unsigned long, int); +typedef void (*UnmapMemProcPtr) (int, void *, unsigned long); +typedef void *(*SetWCProcPtr) (int, unsigned long, unsigned long, Bool, MessageType); -typedef void (*ProtectMemProcPtr) (int, pointer, unsigned long, Bool); -typedef void (*UndoWCProcPtr) (int, pointer); +typedef void (*ProtectMemProcPtr) (int, void *, unsigned long, Bool); +typedef void (*UndoWCProcPtr) (int, void *); typedef struct { Bool initialised; diff --git a/xserver/hw/xfree86/os-support/xf86_OSproc.h b/xserver/hw/xfree86/os-support/xf86_OSproc.h index 106168aba..8d27e8b7b 100644 --- a/xserver/hw/xfree86/os-support/xf86_OSproc.h +++ b/xserver/hw/xfree86/os-support/xf86_OSproc.h @@ -132,9 +132,9 @@ _XFUNCPROTOBEGIN /* public functions */ extern _X_EXPORT Bool xf86LinearVidMem(void); extern _X_EXPORT _X_DEPRECATED Bool xf86CheckMTRR(int); -extern _X_EXPORT _X_DEPRECATED pointer xf86MapVidMem(int, int, unsigned long, +extern _X_EXPORT _X_DEPRECATED void *xf86MapVidMem(int, int, unsigned long, unsigned long); -extern _X_EXPORT _X_DEPRECATED void xf86UnMapVidMem(int, pointer, +extern _X_EXPORT _X_DEPRECATED void xf86UnMapVidMem(int, void *, unsigned long); extern _X_EXPORT int xf86ReadBIOS(unsigned long, unsigned long, unsigned char *, int); diff --git a/xserver/hw/xfree86/parser/Configint.h b/xserver/hw/xfree86/parser/Configint.h index 81cc1fc59..e85322006 100644 --- a/xserver/hw/xfree86/parser/Configint.h +++ b/xserver/hw/xfree86/parser/Configint.h @@ -79,6 +79,8 @@ typedef struct { ParserNumType numType; /* used to enforce correct number formatting */ } LexRec, *LexPtr; +extern LexRec xf86_lex_val; + #ifndef TRUE #define TRUE 1 #endif @@ -90,7 +92,7 @@ typedef struct { #include "configProcs.h" #include <stdlib.h> -#define TestFree(a) if (a) { free (a); a = NULL; } +#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; } diff --git a/xserver/hw/xfree86/parser/DRI.c b/xserver/hw/xfree86/parser/DRI.c index e8d26255f..6be32d7ea 100644 --- a/xserver/hw/xfree86/parser/DRI.c +++ b/xserver/hw/xfree86/parser/DRI.c @@ -31,11 +31,11 @@ #include <xorg-config.h> #endif +#include "os.h" #include "xf86Parser.h" #include "xf86tokens.h" #include "Configint.h" -extern LexRec val; static xf86ConfigSymTabRec DRITab[] = { {ENDSECTION, "endsection"}, @@ -59,24 +59,24 @@ xf86parseDRISection(void) switch (token) { case GROUP: if ((token = xf86getSubToken(&(ptr->dri_comment))) == STRING) - ptr->dri_group_name = val.str; + ptr->dri_group_name = xf86_lex_val.str; else if (token == NUMBER) - ptr->dri_group = val.num; + 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 (val.numType != PARSE_OCTAL) - Error(MUST_BE_OCTAL_MSG, val.num); - ptr->dri_mode = val.num; + 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, val.str); + ptr->dri_comment = xf86addComment(ptr->dri_comment, xf86_lex_val.str); break; default: Error(INVALID_KEYWORD_MSG, xf86tokenString()); diff --git a/xserver/hw/xfree86/parser/Device.c b/xserver/hw/xfree86/parser/Device.c index bb1ba88fb..d3ac29351 100644 --- a/xserver/hw/xfree86/parser/Device.c +++ b/xserver/hw/xfree86/parser/Device.c @@ -60,7 +60,6 @@ #include "xf86tokens.h" #include "Configint.h" -extern LexRec val; static xf86ConfigSymTabRec DeviceTab[] = { @@ -72,6 +71,7 @@ xf86ConfigSymTabRec DeviceTab[] = { {RAMDAC, "ramdac"}, {DACSPEED, "dacspeed"}, {CLOCKS, "clocks"}, + {MATCHSEAT, "matchseat"}, {OPTION, "option"}, {VIDEORAM, "videoram"}, {BIOSBASE, "biosbase"}, @@ -107,45 +107,45 @@ xf86parseDeviceSection(void) while ((token = xf86getToken(DeviceTab)) != ENDSECTION) { switch (token) { case COMMENT: - ptr->dev_comment = xf86addComment(ptr->dev_comment, val.str); + ptr->dev_comment = xf86addComment(ptr->dev_comment, xf86_lex_val.str); break; case IDENTIFIER: if (xf86getSubToken(&(ptr->dev_comment)) != STRING) Error(QUOTE_MSG, "Identifier"); if (has_ident == TRUE) Error(MULTIPLE_MSG, "Identifier"); - ptr->dev_identifier = val.str; + 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 = val.str; + ptr->dev_vendor = xf86_lex_val.str; break; case BOARD: if (xf86getSubToken(&(ptr->dev_comment)) != STRING) Error(QUOTE_MSG, "Board"); - ptr->dev_board = val.str; + ptr->dev_board = xf86_lex_val.str; break; case CHIPSET: if (xf86getSubToken(&(ptr->dev_comment)) != STRING) Error(QUOTE_MSG, "Chipset"); - ptr->dev_chipset = val.str; + ptr->dev_chipset = xf86_lex_val.str; break; case CARD: if (xf86getSubToken(&(ptr->dev_comment)) != STRING) Error(QUOTE_MSG, "Card"); - ptr->dev_card = val.str; + ptr->dev_card = xf86_lex_val.str; break; case DRIVER: if (xf86getSubToken(&(ptr->dev_comment)) != STRING) Error(QUOTE_MSG, "Driver"); - ptr->dev_driver = val.str; + ptr->dev_driver = xf86_lex_val.str; break; case RAMDAC: if (xf86getSubToken(&(ptr->dev_comment)) != STRING) Error(QUOTE_MSG, "Ramdac"); - ptr->dev_ramdac = val.str; + ptr->dev_ramdac = xf86_lex_val.str; break; case DACSPEED: for (i = 0; i < CONF_MAXDACSPEEDS; i++) @@ -154,11 +154,11 @@ xf86parseDeviceSection(void) Error(DACSPEED_MSG, CONF_MAXDACSPEEDS); } else { - ptr->dev_dacSpeeds[0] = (int) (val.realnum * 1000.0 + 0.5); + 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) - (val.realnum * 1000.0 + 0.5); + (xf86_lex_val.realnum * 1000.0 + 0.5); else { xf86unGetToken(token); break; @@ -169,44 +169,44 @@ xf86parseDeviceSection(void) case VIDEORAM: if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER) Error(NUMBER_MSG, "VideoRam"); - ptr->dev_videoram = val.num; + ptr->dev_videoram = xf86_lex_val.num; break; case BIOSBASE: if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER) Error(NUMBER_MSG, "BIOSBase"); - ptr->dev_bios_base = val.num; + ptr->dev_bios_base = xf86_lex_val.num; break; case MEMBASE: if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER) Error(NUMBER_MSG, "MemBase"); - ptr->dev_mem_base = val.num; + 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 = val.num; + ptr->dev_io_base = xf86_lex_val.num; break; case CLOCKCHIP: if (xf86getSubToken(&(ptr->dev_comment)) != STRING) Error(QUOTE_MSG, "ClockChip"); - ptr->dev_clockchip = val.str; + ptr->dev_clockchip = xf86_lex_val.str; break; case CHIPID: if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER) Error(NUMBER_MSG, "ChipID"); - ptr->dev_chipid = val.num; + ptr->dev_chipid = xf86_lex_val.num; break; case CHIPREV: if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER) Error(NUMBER_MSG, "ChipRev"); - ptr->dev_chiprev = val.num; + 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) (val.realnum * 1000.0 + 0.5); + ptr->dev_clock[i] = (int) (xf86_lex_val.realnum * 1000.0 + 0.5); token = xf86getSubToken(&(ptr->dev_comment)); } ptr->dev_clocks = i; @@ -215,7 +215,12 @@ xf86parseDeviceSection(void) case TEXTCLOCKFRQ: if ((token = xf86getSubToken(&(ptr->dev_comment))) != NUMBER) Error(NUMBER_MSG, "TextClockFreq"); - ptr->dev_textclockfreq = (int) (val.realnum * 1000.0 + 0.5); + ptr->dev_textclockfreq = (int) (xf86_lex_val.realnum * 1000.0 + 0.5); + 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); @@ -223,17 +228,17 @@ xf86parseDeviceSection(void) case BUSID: if (xf86getSubToken(&(ptr->dev_comment)) != STRING) Error(QUOTE_MSG, "BusID"); - ptr->dev_busid = val.str; + ptr->dev_busid = xf86_lex_val.str; break; case IRQ: if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER) Error(QUOTE_MSG, "IRQ"); - ptr->dev_irq = val.num; + ptr->dev_irq = xf86_lex_val.num; break; case SCREEN: if (xf86getSubToken(&(ptr->dev_comment)) != NUMBER) Error(NUMBER_MSG, "Screen"); - ptr->dev_screen = val.num; + ptr->dev_screen = xf86_lex_val.num; break; case EOF_TOKEN: Error(UNEXPECTED_EOF_MSG); diff --git a/xserver/hw/xfree86/parser/Extensions.c b/xserver/hw/xfree86/parser/Extensions.c index ec0bda4c0..a6fcb56f0 100644 --- a/xserver/hw/xfree86/parser/Extensions.c +++ b/xserver/hw/xfree86/parser/Extensions.c @@ -35,11 +35,11 @@ #include <xorg-config.h> #endif +#include "os.h" #include "xf86Parser.h" #include "xf86tokens.h" #include "Configint.h" -extern LexRec val; static xf86ConfigSymTabRec ExtensionsTab[] = { {ENDSECTION, "endsection"}, @@ -66,7 +66,7 @@ xf86parseExtensionsSection(void) break; case COMMENT: ptr->extensions_comment = - xf86addComment(ptr->extensions_comment, val.str); + xf86addComment(ptr->extensions_comment, xf86_lex_val.str); break; default: Error(INVALID_KEYWORD_MSG, xf86tokenString()); diff --git a/xserver/hw/xfree86/parser/Files.c b/xserver/hw/xfree86/parser/Files.c index 0d3e47ac5..24940a9c2 100644 --- a/xserver/hw/xfree86/parser/Files.c +++ b/xserver/hw/xfree86/parser/Files.c @@ -60,7 +60,6 @@ #include "xf86tokens.h" #include "Configint.h" -extern LexRec val; static xf86ConfigSymTabRec FilesTab[] = { {ENDSECTION, "endsection"}, @@ -89,16 +88,15 @@ xf86parseFilesSection(void) while ((token = xf86getToken(FilesTab)) != ENDSECTION) { switch (token) { case COMMENT: - ptr->file_comment = xf86addComment(ptr->file_comment, val.str); + ptr->file_comment = xf86addComment(ptr->file_comment, xf86_lex_val.str); break; case FONTPATH: if (xf86getSubToken(&(ptr->file_comment)) != STRING) Error(QUOTE_MSG, "FontPath"); j = FALSE; - str = val.str; + str = xf86_lex_val.str; if (ptr->file_fontpath == NULL) { - ptr->file_fontpath = malloc(1); - ptr->file_fontpath[0] = '\0'; + ptr->file_fontpath = calloc(1, 1); i = strlen(str) + 1; } else { @@ -113,13 +111,13 @@ xf86parseFilesSection(void) strcat(ptr->file_fontpath, ","); strcat(ptr->file_fontpath, str); - free(val.str); + free(xf86_lex_val.str); break; case MODULEPATH: if (xf86getSubToken(&(ptr->file_comment)) != STRING) Error(QUOTE_MSG, "ModulePath"); l = FALSE; - str = val.str; + str = xf86_lex_val.str; if (ptr->file_modulepath == NULL) { ptr->file_modulepath = malloc(1); ptr->file_modulepath[0] = '\0'; @@ -138,17 +136,17 @@ xf86parseFilesSection(void) strcat(ptr->file_modulepath, ","); strcat(ptr->file_modulepath, str); - free(val.str); + free(xf86_lex_val.str); break; case LOGFILEPATH: if (xf86getSubToken(&(ptr->file_comment)) != STRING) Error(QUOTE_MSG, "LogFile"); - ptr->file_logfile = val.str; + ptr->file_logfile = xf86_lex_val.str; break; case XKBDIR: if (xf86getSubToken(&(ptr->file_xkbdir)) != STRING) Error(QUOTE_MSG, "XkbDir"); - ptr->file_xkbdir = val.str; + ptr->file_xkbdir = xf86_lex_val.str; break; case EOF_TOKEN: Error(UNEXPECTED_EOF_MSG); diff --git a/xserver/hw/xfree86/parser/Flags.c b/xserver/hw/xfree86/parser/Flags.c index 2461476d1..71b50acf7 100644 --- a/xserver/hw/xfree86/parser/Flags.c +++ b/xserver/hw/xfree86/parser/Flags.c @@ -62,7 +62,6 @@ #include "Xprintf.h" #include "optionstr.h" -extern LexRec val; static xf86ConfigSymTabRec ServerFlagsTab[] = { {ENDSECTION, "endsection"}, @@ -99,7 +98,7 @@ xf86parseFlagsSection(void) switch (token) { case COMMENT: - ptr->flg_comment = xf86addComment(ptr->flg_comment, val.str); + ptr->flg_comment = xf86addComment(ptr->flg_comment, xf86_lex_val.str); break; /* * these old keywords are turned into standard generic options. @@ -135,12 +134,12 @@ xf86parseFlagsSection(void) if (strvalue) { if (tokentype != STRING) Error(QUOTE_MSG, tmp); - valstr = val.str; + valstr = xf86_lex_val.str; } else { if (tokentype != NUMBER) Error(NUMBER_MSG, tmp); - if (asprintf(&valstr, "%d", val.num) == -1) + if (asprintf(&valstr, "%d", xf86_lex_val.num) == -1) valstr = NULL; } } @@ -189,7 +188,7 @@ xf86printServerFlagsSection(FILE * f, XF86ConfFlagsPtr flags) } static XF86OptionPtr -addNewOption2(XF86OptionPtr head, char *name, char *val, int used) +addNewOption2(XF86OptionPtr head, char *name, char *_val, int used) { XF86OptionPtr new, old = NULL; @@ -202,7 +201,7 @@ addNewOption2(XF86OptionPtr head, char *name, char *val, int used) else new = calloc(1, sizeof(*new)); new->opt_name = name; - new->opt_val = val; + new->opt_val = _val; new->opt_used = used; if (old) @@ -211,9 +210,9 @@ addNewOption2(XF86OptionPtr head, char *name, char *val, int used) } XF86OptionPtr -xf86addNewOption(XF86OptionPtr head, char *name, char *val) +xf86addNewOption(XF86OptionPtr head, char *name, char *_val) { - return addNewOption2(head, name, val, 0); + return addNewOption2(head, name, _val, 0); } void @@ -230,11 +229,11 @@ XF86OptionPtr xf86optionListDup(XF86OptionPtr opt) { XF86OptionPtr newopt = NULL; - char *val; + char *_val; while (opt) { - val = opt->opt_val ? strdup(opt->opt_val) : NULL; - newopt = xf86addNewOption(newopt, strdup(opt->opt_name), val); + _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); @@ -435,12 +434,12 @@ xf86parseOption(XF86OptionPtr head) return head; } - name = val.str; + name = xf86_lex_val.str; if ((token = xf86getSubToken(&comment)) == STRING) { - option = xf86newOption(name, val.str); + option = xf86newOption(name, xf86_lex_val.str); option->opt_comment = comment; if ((token = xf86getToken(NULL)) == COMMENT) - option->opt_comment = xf86addComment(option->opt_comment, val.str); + option->opt_comment = xf86addComment(option->opt_comment, xf86_lex_val.str); else xf86unGetToken(token); } @@ -448,7 +447,7 @@ xf86parseOption(XF86OptionPtr head) option = xf86newOption(name, NULL); option->opt_comment = comment; if (token == COMMENT) - option->opt_comment = xf86addComment(option->opt_comment, val.str); + option->opt_comment = xf86addComment(option->opt_comment, xf86_lex_val.str); else xf86unGetToken(token); } diff --git a/xserver/hw/xfree86/parser/Input.c b/xserver/hw/xfree86/parser/Input.c index ff2b9acbc..1bfe5c100 100644 --- a/xserver/hw/xfree86/parser/Input.c +++ b/xserver/hw/xfree86/parser/Input.c @@ -61,7 +61,6 @@ #include "xf86tokens.h" #include "Configint.h" -extern LexRec val; static xf86ConfigSymTabRec InputTab[] = { @@ -85,25 +84,25 @@ xf86parseInputSection(void) while ((token = xf86getToken(InputTab)) != ENDSECTION) { switch (token) { case COMMENT: - ptr->inp_comment = xf86addComment(ptr->inp_comment, val.str); + ptr->inp_comment = xf86addComment(ptr->inp_comment, xf86_lex_val.str); break; case IDENTIFIER: if (xf86getSubToken(&(ptr->inp_comment)) != STRING) Error(QUOTE_MSG, "Identifier"); if (has_ident == TRUE) Error(MULTIPLE_MSG, "Identifier"); - ptr->inp_identifier = val.str; + 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(val.str, "keyboard") == 0) { + if (strcmp(xf86_lex_val.str, "keyboard") == 0) { ptr->inp_driver = strdup("kbd"); - free(val.str); + free(xf86_lex_val.str); } else - ptr->inp_driver = val.str; + ptr->inp_driver = xf86_lex_val.str; break; case OPTION: ptr->inp_option_lst = xf86parseOption(ptr->inp_option_lst); diff --git a/xserver/hw/xfree86/parser/InputClass.c b/xserver/hw/xfree86/parser/InputClass.c index de6a816ea..c2fbd22a7 100644 --- a/xserver/hw/xfree86/parser/InputClass.c +++ b/xserver/hw/xfree86/parser/InputClass.c @@ -33,7 +33,6 @@ #include "xf86tokens.h" #include "Configint.h" -extern LexRec val; static xf86ConfigSymTabRec InputClassTab[] = { @@ -97,25 +96,25 @@ xf86parseInputClassSection(void) while ((token = xf86getToken(InputClassTab)) != ENDSECTION) { switch (token) { case COMMENT: - ptr->comment = xf86addComment(ptr->comment, val.str); + ptr->comment = xf86addComment(ptr->comment, xf86_lex_val.str); break; case IDENTIFIER: if (xf86getSubToken(&(ptr->comment)) != STRING) Error(QUOTE_MSG, "Identifier"); if (has_ident == TRUE) Error(MULTIPLE_MSG, "Identifier"); - ptr->identifier = val.str; + ptr->identifier = xf86_lex_val.str; has_ident = TRUE; break; case DRIVER: if (xf86getSubToken(&(ptr->comment)) != STRING) Error(QUOTE_MSG, "Driver"); - if (strcmp(val.str, "keyboard") == 0) { + if (strcmp(xf86_lex_val.str, "keyboard") == 0) { ptr->driver = strdup("kbd"); - free(val.str); + free(xf86_lex_val.str); } else - ptr->driver = val.str; + ptr->driver = xf86_lex_val.str; break; case OPTION: ptr->option_lst = xf86parseOption(ptr->option_lst); @@ -124,69 +123,69 @@ xf86parseInputClassSection(void) if (xf86getSubToken(&(ptr->comment)) != STRING) Error(QUOTE_MSG, "MatchProduct"); add_group_entry(&ptr->match_product, - xstrtokenize(val.str, TOKEN_SEP)); - free(val.str); + xstrtokenize(xf86_lex_val.str, TOKEN_SEP)); + free(xf86_lex_val.str); break; case MATCH_VENDOR: if (xf86getSubToken(&(ptr->comment)) != STRING) Error(QUOTE_MSG, "MatchVendor"); add_group_entry(&ptr->match_vendor, - xstrtokenize(val.str, TOKEN_SEP)); - free(val.str); + xstrtokenize(xf86_lex_val.str, TOKEN_SEP)); + free(xf86_lex_val.str); break; case MATCH_DEVICE_PATH: if (xf86getSubToken(&(ptr->comment)) != STRING) Error(QUOTE_MSG, "MatchDevicePath"); add_group_entry(&ptr->match_device, - xstrtokenize(val.str, TOKEN_SEP)); - free(val.str); + xstrtokenize(xf86_lex_val.str, TOKEN_SEP)); + free(xf86_lex_val.str); break; case MATCH_OS: if (xf86getSubToken(&(ptr->comment)) != STRING) Error(QUOTE_MSG, "MatchOS"); - add_group_entry(&ptr->match_os, xstrtokenize(val.str, TOKEN_SEP)); - free(val.str); + add_group_entry(&ptr->match_os, xstrtokenize(xf86_lex_val.str, TOKEN_SEP)); + free(xf86_lex_val.str); break; case MATCH_PNPID: if (xf86getSubToken(&(ptr->comment)) != STRING) Error(QUOTE_MSG, "MatchPnPID"); add_group_entry(&ptr->match_pnpid, - xstrtokenize(val.str, TOKEN_SEP)); - free(val.str); + xstrtokenize(xf86_lex_val.str, TOKEN_SEP)); + free(xf86_lex_val.str); break; case MATCH_USBID: if (xf86getSubToken(&(ptr->comment)) != STRING) Error(QUOTE_MSG, "MatchUSBID"); add_group_entry(&ptr->match_usbid, - xstrtokenize(val.str, TOKEN_SEP)); - free(val.str); + xstrtokenize(xf86_lex_val.str, TOKEN_SEP)); + free(xf86_lex_val.str); break; case MATCH_DRIVER: if (xf86getSubToken(&(ptr->comment)) != STRING) Error(QUOTE_MSG, "MatchDriver"); add_group_entry(&ptr->match_driver, - xstrtokenize(val.str, TOKEN_SEP)); - free(val.str); + xstrtokenize(xf86_lex_val.str, TOKEN_SEP)); + free(xf86_lex_val.str); break; case MATCH_TAG: if (xf86getSubToken(&(ptr->comment)) != STRING) Error(QUOTE_MSG, "MatchTag"); - add_group_entry(&ptr->match_tag, xstrtokenize(val.str, TOKEN_SEP)); - free(val.str); + add_group_entry(&ptr->match_tag, xstrtokenize(xf86_lex_val.str, TOKEN_SEP)); + free(xf86_lex_val.str); break; case MATCH_LAYOUT: if (xf86getSubToken(&(ptr->comment)) != STRING) Error(QUOTE_MSG, "MatchLayout"); add_group_entry(&ptr->match_layout, - xstrtokenize(val.str, TOKEN_SEP)); - free(val.str); + xstrtokenize(xf86_lex_val.str, TOKEN_SEP)); + 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, - val.str); - free(val.str); + xf86_lex_val.str); + free(xf86_lex_val.str); if (!ptr->is_keyboard.set) Error(BOOL_MSG, "MatchIsKeyboard"); break; @@ -194,8 +193,8 @@ xf86parseInputClassSection(void) if (xf86getSubToken(&(ptr->comment)) != STRING) Error(QUOTE_MSG, "MatchIsPointer"); ptr->is_pointer.set = xf86getBoolValue(&ptr->is_pointer.val, - val.str); - free(val.str); + xf86_lex_val.str); + free(xf86_lex_val.str); if (!ptr->is_pointer.set) Error(BOOL_MSG, "MatchIsPointer"); break; @@ -203,16 +202,16 @@ xf86parseInputClassSection(void) if (xf86getSubToken(&(ptr->comment)) != STRING) Error(QUOTE_MSG, "MatchIsJoystick"); ptr->is_joystick.set = xf86getBoolValue(&ptr->is_joystick.val, - val.str); - free(val.str); + 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, val.str); - free(val.str); + 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; @@ -220,8 +219,8 @@ xf86parseInputClassSection(void) if (xf86getSubToken(&(ptr->comment)) != STRING) Error(QUOTE_MSG, "MatchIsTouchpad"); ptr->is_touchpad.set = xf86getBoolValue(&ptr->is_touchpad.val, - val.str); - free(val.str); + xf86_lex_val.str); + free(xf86_lex_val.str); if (!ptr->is_touchpad.set) Error(BOOL_MSG, "MatchIsTouchpad"); break; @@ -229,8 +228,8 @@ xf86parseInputClassSection(void) if (xf86getSubToken(&(ptr->comment)) != STRING) Error(QUOTE_MSG, "MatchIsTouchscreen"); ptr->is_touchscreen.set = xf86getBoolValue(&ptr->is_touchscreen.val, - val.str); - free(val.str); + xf86_lex_val.str); + free(xf86_lex_val.str); if (!ptr->is_touchscreen.set) Error(BOOL_MSG, "MatchIsTouchscreen"); break; diff --git a/xserver/hw/xfree86/parser/Layout.c b/xserver/hw/xfree86/parser/Layout.c index cbd8d247a..994b31ae4 100644 --- a/xserver/hw/xfree86/parser/Layout.c +++ b/xserver/hw/xfree86/parser/Layout.c @@ -65,12 +65,12 @@ /* Needed for auto server layout */ extern int xf86CheckBoolOption(void *optlist, const char *name, int deflt); -extern LexRec val; static xf86ConfigSymTabRec LayoutTab[] = { {ENDSECTION, "endsection"}, {SCREEN, "screen"}, {IDENTIFIER, "identifier"}, + {MATCHSEAT, "matchseat"}, {INACTIVE, "inactive"}, {INPUTDEVICE, "inputdevice"}, {OPTION, "option"}, @@ -100,16 +100,21 @@ xf86parseLayoutSection(void) while ((token = xf86getToken(LayoutTab)) != ENDSECTION) { switch (token) { case COMMENT: - ptr->lay_comment = xf86addComment(ptr->lay_comment, val.str); + ptr->lay_comment = xf86addComment(ptr->lay_comment, xf86_lex_val.str); break; case IDENTIFIER: if (xf86getSubToken(&(ptr->lay_comment)) != STRING) Error(QUOTE_MSG, "Identifier"); if (has_ident == TRUE) Error(MULTIPLE_MSG, "Identifier"); - ptr->lay_identifier = val.str; + 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; @@ -120,7 +125,7 @@ xf86parseLayoutSection(void) free(iptr); Error(INACTIVE_MSG); } - iptr->inactive_device_str = val.str; + iptr->inactive_device_str = xf86_lex_val.str; ptr->lay_inactive_lst = (XF86ConfInactivePtr) xf86addListItem((glp) ptr->lay_inactive_lst, (glp) iptr); } @@ -138,7 +143,7 @@ xf86parseLayoutSection(void) aptr->adj_y = 0; aptr->adj_refscreen = NULL; if ((token = xf86getSubToken(&(ptr->lay_comment))) == NUMBER) - aptr->adj_scrnum = val.num; + aptr->adj_scrnum = xf86_lex_val.num; else xf86unGetToken(token); token = xf86getSubToken(&(ptr->lay_comment)); @@ -146,7 +151,7 @@ xf86parseLayoutSection(void) free(aptr); Error(SCREEN_MSG); } - aptr->adj_screen_str = val.str; + aptr->adj_screen_str = xf86_lex_val.str; token = xf86getSubTokenWithTab(&(ptr->lay_comment), AdjTab); switch (token) { @@ -186,13 +191,13 @@ xf86parseLayoutSection(void) if (absKeyword) token = xf86getSubToken(&(ptr->lay_comment)); if (token == NUMBER) { - aptr->adj_x = val.num; + aptr->adj_x = xf86_lex_val.num; token = xf86getSubToken(&(ptr->lay_comment)); if (token != NUMBER) { free(aptr); Error(INVALID_SCR_MSG); } - aptr->adj_y = val.num; + aptr->adj_y = xf86_lex_val.num; } else { if (absKeyword) { @@ -213,46 +218,46 @@ xf86parseLayoutSection(void) free(aptr); Error(INVALID_SCR_MSG); } - aptr->adj_refscreen = val.str; + 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 = val.num; + aptr->adj_x = xf86_lex_val.num; token = xf86getSubToken(&(ptr->lay_comment)); if (token != NUMBER) { free(aptr); Error(INVALID_SCR_MSG); } - aptr->adj_y = val.num; + aptr->adj_y = xf86_lex_val.num; } break; case CONF_ADJ_OBSOLETE: /* top */ - aptr->adj_top_str = val.str; + aptr->adj_top_str = xf86_lex_val.str; /* bottom */ if (xf86getSubToken(&(ptr->lay_comment)) != STRING) { free(aptr); Error(SCREEN_MSG); } - aptr->adj_bottom_str = val.str; + aptr->adj_bottom_str = xf86_lex_val.str; /* left */ if (xf86getSubToken(&(ptr->lay_comment)) != STRING) { free(aptr); Error(SCREEN_MSG); } - aptr->adj_left_str = val.str; + aptr->adj_left_str = xf86_lex_val.str; /* right */ if (xf86getSubToken(&(ptr->lay_comment)) != STRING) { free(aptr); Error(SCREEN_MSG); } - aptr->adj_right_str = val.str; + aptr->adj_right_str = xf86_lex_val.str; } ptr->lay_adjacency_lst = (XF86ConfAdjacencyPtr) @@ -270,10 +275,10 @@ xf86parseLayoutSection(void) free(iptr); Error(INPUTDEV_MSG); } - iptr->iref_inputdev_str = val.str; + iptr->iref_inputdev_str = xf86_lex_val.str; while ((token = xf86getSubToken(&(ptr->lay_comment))) == STRING) { iptr->iref_option_lst = - xf86addNewOption(iptr->iref_option_lst, val.str, NULL); + xf86addNewOption(iptr->iref_option_lst, xf86_lex_val.str, NULL); } xf86unGetToken(token); ptr->lay_input_lst = (XF86ConfInputrefPtr) diff --git a/xserver/hw/xfree86/parser/Makefile.am b/xserver/hw/xfree86/parser/Makefile.am index 3bf62e8af..4d0bb4fd8 100644 --- a/xserver/hw/xfree86/parser/Makefile.am +++ b/xserver/hw/xfree86/parser/Makefile.am @@ -14,6 +14,7 @@ INTERNAL_SOURCES= \ Flags.c \ Input.c \ InputClass.c \ + OutputClass.c \ Layout.c \ Module.c \ Video.c \ diff --git a/xserver/hw/xfree86/parser/Makefile.in b/xserver/hw/xfree86/parser/Makefile.in index 96a7ac583..56b4ae003 100644 --- a/xserver/hw/xfree86/parser/Makefile.in +++ b/xserver/hw/xfree86/parser/Makefile.in @@ -105,13 +105,13 @@ LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES) libxf86config_la_LIBADD = am__objects_1 = libxf86config_la-Device.lo libxf86config_la-Files.lo \ libxf86config_la-Flags.lo libxf86config_la-Input.lo \ - libxf86config_la-InputClass.lo libxf86config_la-Layout.lo \ - libxf86config_la-Module.lo libxf86config_la-Video.lo \ - libxf86config_la-Monitor.lo libxf86config_la-Pointer.lo \ - libxf86config_la-Screen.lo libxf86config_la-Vendor.lo \ - libxf86config_la-read.lo libxf86config_la-scan.lo \ - libxf86config_la-write.lo libxf86config_la-DRI.lo \ - libxf86config_la-Extensions.lo + libxf86config_la-InputClass.lo libxf86config_la-OutputClass.lo \ + libxf86config_la-Layout.lo libxf86config_la-Module.lo \ + libxf86config_la-Video.lo libxf86config_la-Monitor.lo \ + libxf86config_la-Pointer.lo libxf86config_la-Screen.lo \ + libxf86config_la-Vendor.lo libxf86config_la-read.lo \ + libxf86config_la-scan.lo libxf86config_la-write.lo \ + libxf86config_la-DRI.lo libxf86config_la-Extensions.lo am_libxf86config_la_OBJECTS = libxf86config_la-xprintf.lo \ $(am__objects_1) libxf86config_la_OBJECTS = $(am_libxf86config_la_OBJECTS) @@ -127,8 +127,9 @@ libxf86config_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ @INSTALL_LIBXF86CONFIG_TRUE@ $(libdir) libxf86config_internal_la_LIBADD = am__objects_2 = Device.lo Files.lo Flags.lo Input.lo InputClass.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 + 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_internal_la_OBJECTS = $(am__objects_2) libxf86config_internal_la_OBJECTS = \ $(am_libxf86config_internal_la_OBJECTS) @@ -219,6 +220,8 @@ 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@ @@ -263,6 +266,10 @@ 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@ @@ -365,7 +372,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -374,6 +384,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -440,6 +451,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ @@ -525,6 +540,7 @@ INTERNAL_SOURCES = \ Flags.c \ Input.c \ InputClass.c \ + OutputClass.c \ Layout.c \ Module.c \ Video.c \ @@ -663,6 +679,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Layout.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Module.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Monitor.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/OutputClass.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Pointer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Screen.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Vendor.Plo@am__quote@ @@ -677,6 +694,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxf86config_la-Layout.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxf86config_la-Module.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxf86config_la-Monitor.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxf86config_la-OutputClass.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxf86config_la-Pointer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxf86config_la-Screen.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libxf86config_la-Vendor.Plo@am__quote@ @@ -752,6 +770,13 @@ libxf86config_la-InputClass.lo: InputClass.c @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) $(libxf86config_la_CFLAGS) $(CFLAGS) -c -o libxf86config_la-InputClass.lo `test -f 'InputClass.c' || echo '$(srcdir)/'`InputClass.c +libxf86config_la-OutputClass.lo: OutputClass.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) $(libxf86config_la_CFLAGS) $(CFLAGS) -MT libxf86config_la-OutputClass.lo -MD -MP -MF $(DEPDIR)/libxf86config_la-OutputClass.Tpo -c -o libxf86config_la-OutputClass.lo `test -f 'OutputClass.c' || echo '$(srcdir)/'`OutputClass.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libxf86config_la-OutputClass.Tpo $(DEPDIR)/libxf86config_la-OutputClass.Plo +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='OutputClass.c' object='libxf86config_la-OutputClass.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) $(libxf86config_la_CFLAGS) $(CFLAGS) -c -o libxf86config_la-OutputClass.lo `test -f 'OutputClass.c' || echo '$(srcdir)/'`OutputClass.c + libxf86config_la-Layout.lo: Layout.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) $(libxf86config_la_CFLAGS) $(CFLAGS) -MT libxf86config_la-Layout.lo -MD -MP -MF $(DEPDIR)/libxf86config_la-Layout.Tpo -c -o libxf86config_la-Layout.lo `test -f 'Layout.c' || echo '$(srcdir)/'`Layout.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libxf86config_la-Layout.Tpo $(DEPDIR)/libxf86config_la-Layout.Plo diff --git a/xserver/hw/xfree86/parser/Module.c b/xserver/hw/xfree86/parser/Module.c index 87ddfc635..e2d9120cb 100644 --- a/xserver/hw/xfree86/parser/Module.c +++ b/xserver/hw/xfree86/parser/Module.c @@ -60,7 +60,6 @@ #include "xf86tokens.h" #include "Configint.h" -extern LexRec val; static xf86ConfigSymTabRec SubModuleTab[] = { {ENDSUBSECTION, "endsubsection"}, @@ -95,7 +94,7 @@ xf86parseModuleSubSection(XF86LoadPtr head, char *name) while ((token = xf86getToken(SubModuleTab)) != ENDSUBSECTION) { switch (token) { case COMMENT: - ptr->load_comment = xf86addComment(ptr->load_comment, val.str); + ptr->load_comment = xf86addComment(ptr->load_comment, xf86_lex_val.str); break; case OPTION: ptr->load_opt = xf86parseOption(ptr->load_opt); @@ -126,34 +125,34 @@ xf86parseModuleSection(void) while ((token = xf86getToken(ModuleTab)) != ENDSECTION) { switch (token) { case COMMENT: - ptr->mod_comment = xf86addComment(ptr->mod_comment, val.str); + ptr->mod_comment = xf86addComment(ptr->mod_comment, xf86_lex_val.str); break; case LOAD: if (xf86getSubToken(&(ptr->mod_comment)) != STRING) Error(QUOTE_MSG, "Load"); ptr->mod_load_lst = - xf86addNewLoadDirective(ptr->mod_load_lst, val.str, + 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, val.str, + 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, val.str, + 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, val.str); + xf86parseModuleSubSection(ptr->mod_load_lst, xf86_lex_val.str); break; case EOF_TOKEN: Error(UNEXPECTED_EOF_MSG); @@ -218,7 +217,7 @@ xf86printModuleSection(FILE * cf, XF86ConfModulePtr ptr) } XF86LoadPtr -xf86addNewLoadDirective(XF86LoadPtr head, char *name, int type, +xf86addNewLoadDirective(XF86LoadPtr head, const char *name, int type, XF86OptionPtr opts) { XF86LoadPtr new; @@ -232,7 +231,7 @@ xf86addNewLoadDirective(XF86LoadPtr head, char *name, int type, new->list.next = NULL; if ((token = xf86getToken(NULL)) == COMMENT) - new->load_comment = xf86addComment(new->load_comment, val.str); + new->load_comment = xf86addComment(new->load_comment, xf86_lex_val.str); else xf86unGetToken(token); diff --git a/xserver/hw/xfree86/parser/Monitor.c b/xserver/hw/xfree86/parser/Monitor.c index 36b4ebe35..8aebce079 100644 --- a/xserver/hw/xfree86/parser/Monitor.c +++ b/xserver/hw/xfree86/parser/Monitor.c @@ -60,7 +60,6 @@ #include "xf86tokens.h" #include "Configint.h" -extern LexRec val; static xf86ConfigSymTabRec MonitorTab[] = { {ENDSECTION, "endsection"}, @@ -140,52 +139,52 @@ xf86parseModeLine(void) /* Identifier */ if (xf86getSubToken(&(ptr->ml_comment)) != STRING) Error("ModeLine identifier expected"); - ptr->ml_identifier = val.str; + ptr->ml_identifier = xf86_lex_val.str; /* DotClock */ if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER) Error("ModeLine dotclock expected"); - ptr->ml_clock = (int) (val.realnum * 1000.0 + 0.5); + 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 = val.num; + ptr->ml_hdisplay = xf86_lex_val.num; /* HSyncStart */ if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER) Error("ModeLine HSyncStart expected"); - ptr->ml_hsyncstart = val.num; + ptr->ml_hsyncstart = xf86_lex_val.num; /* HSyncEnd */ if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER) Error("ModeLine HSyncEnd expected"); - ptr->ml_hsyncend = val.num; + ptr->ml_hsyncend = xf86_lex_val.num; /* HTotal */ if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER) Error("ModeLine HTotal expected"); - ptr->ml_htotal = val.num; + ptr->ml_htotal = xf86_lex_val.num; /* VDisplay */ if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER) Error("ModeLine Vdisplay expected"); - ptr->ml_vdisplay = val.num; + ptr->ml_vdisplay = xf86_lex_val.num; /* VSyncStart */ if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER) Error("ModeLine VSyncStart expected"); - ptr->ml_vsyncstart = val.num; + ptr->ml_vsyncstart = xf86_lex_val.num; /* VSyncEnd */ if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER) Error("ModeLine VSyncEnd expected"); - ptr->ml_vsyncend = val.num; + ptr->ml_vsyncend = xf86_lex_val.num; /* VTotal */ if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER) Error("ModeLine VTotal expected"); - ptr->ml_vtotal = val.num; + ptr->ml_vtotal = xf86_lex_val.num; token = xf86getSubTokenWithTab(&(ptr->ml_comment), TimingTab); while ((token == TT_INTERLACE) || (token == TT_PHSYNC) || @@ -226,7 +225,7 @@ xf86parseModeLine(void) case TT_HSKEW: if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER) Error(NUMBER_MSG, "Hskew"); - ptr->ml_hskew = val.num; + ptr->ml_hskew = xf86_lex_val.num; ptr->ml_flags |= XF86CONF_HSKEW; break; case TT_BCAST: @@ -235,7 +234,7 @@ xf86parseModeLine(void) case TT_VSCAN: if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER) Error(NUMBER_MSG, "Vscan"); - ptr->ml_vscan = val.num; + ptr->ml_vscan = xf86_lex_val.num; ptr->ml_flags |= XF86CONF_VSCAN; break; case EOF_TOKEN: @@ -265,58 +264,58 @@ xf86parseVerboseMode(void) if (xf86getSubToken(&(ptr->ml_comment)) != STRING) Error("Mode name expected"); - ptr->ml_identifier = val.str; + ptr->ml_identifier = xf86_lex_val.str; while ((token = xf86getToken(ModeTab)) != ENDMODE) { switch (token) { case COMMENT: - ptr->ml_comment = xf86addComment(ptr->ml_comment, val.str); + ptr->ml_comment = xf86addComment(ptr->ml_comment, xf86_lex_val.str); break; case DOTCLOCK: if ((token = xf86getSubToken(&(ptr->ml_comment))) != NUMBER) Error(NUMBER_MSG, "DotClock"); - ptr->ml_clock = (int) (val.realnum * 1000.0 + 0.5); + 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 = val.num; + ptr->ml_hdisplay = xf86_lex_val.num; else Error("Horizontal display expected"); if (xf86getSubToken(&(ptr->ml_comment)) == NUMBER) - ptr->ml_hsyncstart = val.num; + ptr->ml_hsyncstart = xf86_lex_val.num; else Error("Horizontal sync start expected"); if (xf86getSubToken(&(ptr->ml_comment)) == NUMBER) - ptr->ml_hsyncend = val.num; + ptr->ml_hsyncend = xf86_lex_val.num; else Error("Horizontal sync end expected"); if (xf86getSubToken(&(ptr->ml_comment)) == NUMBER) - ptr->ml_htotal = val.num; + 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 = val.num; + ptr->ml_vdisplay = xf86_lex_val.num; else Error("Vertical display expected"); if (xf86getSubToken(&(ptr->ml_comment)) == NUMBER) - ptr->ml_vsyncstart = val.num; + ptr->ml_vsyncstart = xf86_lex_val.num; else Error("Vertical sync start expected"); if (xf86getSubToken(&(ptr->ml_comment)) == NUMBER) - ptr->ml_vsyncend = val.num; + ptr->ml_vsyncend = xf86_lex_val.num; else Error("Vertical sync end expected"); if (xf86getSubToken(&(ptr->ml_comment)) == NUMBER) - ptr->ml_vtotal = val.num; + ptr->ml_vtotal = xf86_lex_val.num; else Error("Vertical total expected"); had_vtimings = 1; @@ -370,13 +369,13 @@ xf86parseVerboseMode(void) if (xf86getSubToken(&(ptr->ml_comment)) != NUMBER) Error("Horizontal skew expected"); ptr->ml_flags |= XF86CONF_HSKEW; - ptr->ml_hskew = val.num; + 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 = val.num; + ptr->ml_vscan = xf86_lex_val.num; break; case EOF_TOKEN: Error(UNEXPECTED_EOF_MSG); @@ -413,25 +412,25 @@ xf86parseMonitorSection(void) while ((token = xf86getToken(MonitorTab)) != ENDSECTION) { switch (token) { case COMMENT: - ptr->mon_comment = xf86addComment(ptr->mon_comment, val.str); + ptr->mon_comment = xf86addComment(ptr->mon_comment, xf86_lex_val.str); break; case IDENTIFIER: if (xf86getSubToken(&(ptr->mon_comment)) != STRING) Error(QUOTE_MSG, "Identifier"); if (has_ident == TRUE) Error(MULTIPLE_MSG, "Identifier"); - ptr->mon_identifier = val.str; + 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 = val.str; + ptr->mon_vendor = xf86_lex_val.str; break; case MODEL: if (xf86getSubToken(&(ptr->mon_comment)) != STRING) Error(QUOTE_MSG, "ModelName"); - ptr->mon_modelname = val.str; + ptr->mon_modelname = xf86_lex_val.str; break; case MODE: HANDLE_LIST(mon_modeline_lst, xf86parseVerboseMode, @@ -444,10 +443,10 @@ xf86parseMonitorSection(void) case DISPLAYSIZE: if (xf86getSubToken(&(ptr->mon_comment)) != NUMBER) Error(DISPLAYSIZE_MSG); - ptr->mon_width = val.realnum; + ptr->mon_width = xf86_lex_val.realnum; if (xf86getSubToken(&(ptr->mon_comment)) != NUMBER) Error(DISPLAYSIZE_MSG); - ptr->mon_height = val.realnum; + ptr->mon_height = xf86_lex_val.realnum; break; case HORIZSYNC: @@ -456,7 +455,7 @@ xf86parseMonitorSection(void) do { if (ptr->mon_n_hsync >= CONF_MAX_HSYNC) Error("Sorry. Too many horizontal sync intervals."); - ptr->mon_hsync[ptr->mon_n_hsync].lo = val.realnum; + 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 = @@ -464,10 +463,10 @@ xf86parseMonitorSection(void) break; case DASH: if (xf86getSubToken(&(ptr->mon_comment)) != NUMBER || - (float) val.realnum < + (float) xf86_lex_val.realnum < ptr->mon_hsync[ptr->mon_n_hsync].lo) Error(HORIZSYNC_MSG); - ptr->mon_hsync[ptr->mon_n_hsync].hi = val.realnum; + ptr->mon_hsync[ptr->mon_n_hsync].hi = xf86_lex_val.realnum; if ((token = xf86getSubToken(&(ptr->mon_comment))) == COMMA) break; ptr->mon_n_hsync++; @@ -491,7 +490,7 @@ xf86parseMonitorSection(void) if (xf86getSubToken(&(ptr->mon_comment)) != NUMBER) Error(VERTREFRESH_MSG); do { - ptr->mon_vrefresh[ptr->mon_n_vrefresh].lo = val.realnum; + 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 = @@ -499,10 +498,10 @@ xf86parseMonitorSection(void) break; case DASH: if (xf86getSubToken(&(ptr->mon_comment)) != NUMBER || - (float) val.realnum < + (float) xf86_lex_val.realnum < ptr->mon_vrefresh[ptr->mon_n_vrefresh].lo) Error(VERTREFRESH_MSG); - ptr->mon_vrefresh[ptr->mon_n_vrefresh].hi = val.realnum; + ptr->mon_vrefresh[ptr->mon_n_vrefresh].hi = xf86_lex_val.realnum; if ((token = xf86getSubToken(&(ptr->mon_comment))) == COMMA) break; ptr->mon_n_vrefresh++; @@ -530,11 +529,11 @@ xf86parseMonitorSection(void) } else { ptr->mon_gamma_red = ptr->mon_gamma_green = - ptr->mon_gamma_blue = val.realnum; + ptr->mon_gamma_blue = xf86_lex_val.realnum; if (xf86getSubToken(&(ptr->mon_comment)) == NUMBER) { - ptr->mon_gamma_green = val.realnum; + ptr->mon_gamma_green = xf86_lex_val.realnum; if (xf86getSubToken(&(ptr->mon_comment)) == NUMBER) { - ptr->mon_gamma_blue = val.realnum; + ptr->mon_gamma_blue = xf86_lex_val.realnum; } else { Error(INVALID_GAMMA_MSG); @@ -558,7 +557,7 @@ xf86parseMonitorSection(void) referenced here */ mptr = calloc(1, sizeof(XF86ConfModesLinkRec)); mptr->list.next = NULL; - mptr->ml_modes_str = val.str; + 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, @@ -599,14 +598,14 @@ xf86parseModesSection(void) while ((token = xf86getToken(ModesTab)) != ENDSECTION) { switch (token) { case COMMENT: - ptr->modes_comment = xf86addComment(ptr->modes_comment, val.str); + ptr->modes_comment = xf86addComment(ptr->modes_comment, xf86_lex_val.str); break; case IDENTIFIER: if (xf86getSubToken(&(ptr->modes_comment)) != STRING) Error(QUOTE_MSG, "Identifier"); if (has_ident == TRUE) Error(MULTIPLE_MSG, "Identifier"); - ptr->modes_identifier = val.str; + ptr->modes_identifier = xf86_lex_val.str; has_ident = TRUE; break; case MODE: diff --git a/xserver/hw/xfree86/parser/OutputClass.c b/xserver/hw/xfree86/parser/OutputClass.c new file mode 100644 index 000000000..7e9a8ac1a --- /dev/null +++ b/xserver/hw/xfree86/parser/OutputClass.c @@ -0,0 +1,167 @@ +/* + * 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 <xorg-config.h> +#endif + +#include "os.h" +#include "xf86Parser.h" +#include "xf86tokens.h" +#include "Configint.h" + +static +xf86ConfigSymTabRec OutputClassTab[] = { + {ENDSECTION, "endsection"}, + {IDENTIFIER, "identifier"}, + {DRIVER, "driver"}, + {MATCH_DRIVER, "matchdriver"}, + {-1, ""}, +}; + +#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); + 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 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; + } +} + +void +xf86freeOutputClassList(XF86ConfOutputClassPtr ptr) +{ + XF86ConfOutputClassPtr prev; + + while (ptr) { + xf86MatchGroup *group, *next; + char **list; + + TestFree(ptr->identifier); + TestFree(ptr->comment); + TestFree(ptr->driver); + + 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); + } + + prev = ptr; + ptr = ptr->list.next; + free(prev); + } +} diff --git a/xserver/hw/xfree86/parser/Pointer.c b/xserver/hw/xfree86/parser/Pointer.c index ff748d99a..fe60d95aa 100644 --- a/xserver/hw/xfree86/parser/Pointer.c +++ b/xserver/hw/xfree86/parser/Pointer.c @@ -61,7 +61,6 @@ #include "Configint.h" #include "Xprintf.h" -extern LexRec val; static xf86ConfigSymTabRec PointerTab[] = { {PROTOCOL, "protocol"}, @@ -104,19 +103,19 @@ xf86parsePointerSection(void) while ((token = xf86getToken(PointerTab)) != ENDSECTION) { switch (token) { case COMMENT: - ptr->inp_comment = xf86addComment(ptr->inp_comment, val.str); + ptr->inp_comment = xf86addComment(ptr->inp_comment, xf86_lex_val.str); break; case PROTOCOL: if (xf86getSubToken(&(ptr->inp_comment)) != STRING) Error(QUOTE_MSG, "Protocol"); ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst, - strdup("Protocol"), val.str); + 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"), val.str); + strdup("Device"), xf86_lex_val.str); break; case EMULATE3: ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst, @@ -124,9 +123,9 @@ xf86parsePointerSection(void) NULL); break; case EM3TIMEOUT: - if (xf86getSubToken(&(ptr->inp_comment)) != NUMBER || val.num < 0) + if (xf86getSubToken(&(ptr->inp_comment)) != NUMBER || xf86_lex_val.num < 0) Error(POSITIVE_INT_MSG, "Emulate3Timeout"); - s = xf86uLongToString(val.num); + s = xf86uLongToString(xf86_lex_val.num); ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst, strdup("Emulate3Timeout"), s); @@ -136,30 +135,30 @@ xf86parsePointerSection(void) strdup("ChordMiddle"), NULL); break; case PBUTTONS: - if (xf86getSubToken(&(ptr->inp_comment)) != NUMBER || val.num < 0) + if (xf86getSubToken(&(ptr->inp_comment)) != NUMBER || xf86_lex_val.num < 0) Error(POSITIVE_INT_MSG, "Buttons"); - s = xf86uLongToString(val.num); + 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 || val.num < 0) + if (xf86getSubToken(&(ptr->inp_comment)) != NUMBER || xf86_lex_val.num < 0) Error(POSITIVE_INT_MSG, "BaudRate"); - s = xf86uLongToString(val.num); + 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 || val.num < 0) + if (xf86getSubToken(&(ptr->inp_comment)) != NUMBER || xf86_lex_val.num < 0) Error(POSITIVE_INT_MSG, "SampleRate"); - s = xf86uLongToString(val.num); + 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 || val.num < 0) + if (xf86getSubToken(&(ptr->inp_comment)) != NUMBER || xf86_lex_val.num < 0) Error(POSITIVE_INT_MSG, "Resolution"); - s = xf86uLongToString(val.num); + s = xf86uLongToString(xf86_lex_val.num); ptr->inp_option_lst = xf86addNewOption(ptr->inp_option_lst, strdup("Resolution"), s); break; @@ -174,14 +173,14 @@ xf86parsePointerSection(void) case ZAXISMAPPING: switch (xf86getToken(ZMapTab)) { case NUMBER: - if (val.num < 0) + if (xf86_lex_val.num < 0) Error(ZAXISMAPPING_MSG); - val1 = val.num; + val1 = xf86_lex_val.num; if (xf86getSubToken(&(ptr->inp_comment)) != NUMBER || - val.num < 0) { + xf86_lex_val.num < 0) { Error(ZAXISMAPPING_MSG); } - if (asprintf(&s, "%lu %u", val1, val.num) == -1) + if (asprintf(&s, "%lu %u", val1, xf86_lex_val.num) == -1) s = NULL; break; case XAXIS: diff --git a/xserver/hw/xfree86/parser/Screen.c b/xserver/hw/xfree86/parser/Screen.c index f294ec490..0e9746ae5 100644 --- a/xserver/hw/xfree86/parser/Screen.c +++ b/xserver/hw/xfree86/parser/Screen.c @@ -60,7 +60,6 @@ #include "xf86tokens.h" #include "Configint.h" -extern LexRec val; static xf86ConfigSymTabRec DisplayTab[] = { {ENDSUBSECTION, "endsubsection"}, @@ -92,71 +91,71 @@ xf86parseDisplaySubSection(void) while ((token = xf86getToken(DisplayTab)) != ENDSUBSECTION) { switch (token) { case COMMENT: - ptr->disp_comment = xf86addComment(ptr->disp_comment, val.str); + ptr->disp_comment = xf86addComment(ptr->disp_comment, xf86_lex_val.str); break; case VIEWPORT: if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER) Error(VIEWPORT_MSG); - ptr->disp_frameX0 = val.num; + ptr->disp_frameX0 = xf86_lex_val.num; if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER) Error(VIEWPORT_MSG); - ptr->disp_frameY0 = val.num; + ptr->disp_frameY0 = xf86_lex_val.num; break; case VIRTUAL: if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER) Error(VIRTUAL_MSG); - ptr->disp_virtualX = val.num; + ptr->disp_virtualX = xf86_lex_val.num; if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER) Error(VIRTUAL_MSG); - ptr->disp_virtualY = val.num; + ptr->disp_virtualY = xf86_lex_val.num; break; case DEPTH: if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER) Error(NUMBER_MSG, "Display"); - ptr->disp_depth = val.num; + ptr->disp_depth = xf86_lex_val.num; break; case BPP: if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER) Error(NUMBER_MSG, "Display"); - ptr->disp_bpp = val.num; + ptr->disp_bpp = xf86_lex_val.num; break; case VISUAL: if (xf86getSubToken(&(ptr->disp_comment)) != STRING) Error(QUOTE_MSG, "Display"); - ptr->disp_visual = val.str; + ptr->disp_visual = xf86_lex_val.str; break; case WEIGHT: if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER) Error(WEIGHT_MSG); - ptr->disp_weight.red = val.num; + ptr->disp_weight.red = xf86_lex_val.num; if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER) Error(WEIGHT_MSG); - ptr->disp_weight.green = val.num; + ptr->disp_weight.green = xf86_lex_val.num; if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER) Error(WEIGHT_MSG); - ptr->disp_weight.blue = val.num; + 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 = val.num; + ptr->disp_black.red = xf86_lex_val.num; if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER) Error(BLACK_MSG); - ptr->disp_black.green = val.num; + ptr->disp_black.green = xf86_lex_val.num; if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER) Error(BLACK_MSG); - ptr->disp_black.blue = val.num; + 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 = val.num; + ptr->disp_white.red = xf86_lex_val.num; if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER) Error(WHITE_MSG); - ptr->disp_white.green = val.num; + ptr->disp_white.green = xf86_lex_val.num; if (xf86getSubToken(&(ptr->disp_comment)) != NUMBER) Error(WHITE_MSG); - ptr->disp_white.blue = val.num; + ptr->disp_white.blue = xf86_lex_val.num; break; case MODES: { @@ -166,7 +165,7 @@ xf86parseDisplaySubSection(void) xf86getSubTokenWithTab(&(ptr->disp_comment), DisplayTab)) == STRING) { mptr = calloc(1, sizeof(XF86ModeRec)); - mptr->mode_name = val.str; + mptr->mode_name = xf86_lex_val.str; mptr->list.next = NULL; ptr->disp_mode_lst = (XF86ModePtr) xf86addListItem((glp) ptr->disp_mode_lst, (glp) mptr); @@ -199,6 +198,7 @@ xf86parseDisplaySubSection(void) static xf86ConfigSymTabRec ScreenTab[] = { {ENDSECTION, "endsection"}, {IDENTIFIER, "identifier"}, + {MATCHSEAT, "matchseat"}, {OBSDRIVER, "driver"}, {MDEVICE, "device"}, {MONITOR, "monitor"}, @@ -227,20 +227,25 @@ xf86parseScreenSection(void) while ((token = xf86getToken(ScreenTab)) != ENDSECTION) { switch (token) { case COMMENT: - ptr->scrn_comment = xf86addComment(ptr->scrn_comment, val.str); + ptr->scrn_comment = xf86addComment(ptr->scrn_comment, xf86_lex_val.str); break; case IDENTIFIER: if (xf86getSubToken(&(ptr->scrn_comment)) != STRING) Error(QUOTE_MSG, "Identifier"); - ptr->scrn_identifier = val.str; + 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 = val.str; + ptr->scrn_obso_driver = xf86_lex_val.str; if (has_ident || has_driver) Error(ONLY_ONE_MSG, "Identifier or Driver"); has_driver = TRUE; @@ -248,27 +253,27 @@ xf86parseScreenSection(void) case DEFAULTDEPTH: if (xf86getSubToken(&(ptr->scrn_comment)) != NUMBER) Error(NUMBER_MSG, "DefaultDepth"); - ptr->scrn_defaultdepth = val.num; + ptr->scrn_defaultdepth = xf86_lex_val.num; break; case DEFAULTBPP: if (xf86getSubToken(&(ptr->scrn_comment)) != NUMBER) Error(NUMBER_MSG, "DefaultBPP"); - ptr->scrn_defaultbpp = val.num; + ptr->scrn_defaultbpp = xf86_lex_val.num; break; case DEFAULTFBBPP: if (xf86getSubToken(&(ptr->scrn_comment)) != NUMBER) Error(NUMBER_MSG, "DefaultFbBPP"); - ptr->scrn_defaultfbbpp = val.num; + ptr->scrn_defaultfbbpp = xf86_lex_val.num; break; case MDEVICE: if (xf86getSubToken(&(ptr->scrn_comment)) != STRING) Error(QUOTE_MSG, "Device"); - ptr->scrn_device_str = val.str; + ptr->scrn_device_str = xf86_lex_val.str; break; case MONITOR: if (xf86getSubToken(&(ptr->scrn_comment)) != STRING) Error(QUOTE_MSG, "Monitor"); - ptr->scrn_monitor_str = val.str; + ptr->scrn_monitor_str = xf86_lex_val.str; break; case VIDEOADAPTOR: { @@ -280,13 +285,13 @@ xf86parseScreenSection(void) /* Don't allow duplicates */ for (aptr = ptr->scrn_adaptor_lst; aptr; aptr = (XF86ConfAdaptorLinkPtr) aptr->list.next) - if (xf86nameCompare(val.str, aptr->al_adaptor_str) == 0) + 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 = val.str; + aptr->al_adaptor_str = xf86_lex_val.str; ptr->scrn_adaptor_lst = (XF86ConfAdaptorLinkPtr) xf86addListItem((glp) ptr->scrn_adaptor_lst, (glp) aptr); } @@ -295,10 +300,10 @@ xf86parseScreenSection(void) case VIRTUAL: if (xf86getSubToken(&(ptr->scrn_comment)) != NUMBER) Error(VIRTUAL_MSG); - ptr->scrn_virtualX = val.num; + ptr->scrn_virtualX = xf86_lex_val.num; if (xf86getSubToken(&(ptr->scrn_comment)) != NUMBER) Error(VIRTUAL_MSG); - ptr->scrn_virtualY = val.num; + ptr->scrn_virtualY = xf86_lex_val.num; break; case OPTION: ptr->scrn_option_lst = xf86parseOption(ptr->scrn_option_lst); @@ -307,7 +312,7 @@ xf86parseScreenSection(void) if (xf86getSubToken(&(ptr->scrn_comment)) != STRING) Error(QUOTE_MSG, "SubSection"); { - free(val.str); + free(xf86_lex_val.str); HANDLE_LIST(scrn_display_lst, xf86parseDisplaySubSection, XF86ConfDisplayPtr); } diff --git a/xserver/hw/xfree86/parser/Vendor.c b/xserver/hw/xfree86/parser/Vendor.c index 9b7695c8e..2c870ae7f 100644 --- a/xserver/hw/xfree86/parser/Vendor.c +++ b/xserver/hw/xfree86/parser/Vendor.c @@ -60,7 +60,6 @@ #include "xf86tokens.h" #include "Configint.h" -extern LexRec val; static xf86ConfigSymTabRec VendorSubTab[] = { {ENDSUBSECTION, "endsubsection"}, @@ -82,14 +81,14 @@ xf86parseVendorSubSection(void) while ((token = xf86getToken(VendorSubTab)) != ENDSUBSECTION) { switch (token) { case COMMENT: - ptr->vs_comment = xf86addComment(ptr->vs_comment, val.str); + ptr->vs_comment = xf86addComment(ptr->vs_comment, xf86_lex_val.str); break; case IDENTIFIER: if (xf86getSubToken(&(ptr->vs_comment))) Error(QUOTE_MSG, "Identifier"); if (has_ident == TRUE) Error(MULTIPLE_MSG, "Identifier"); - ptr->vs_identifier = val.str; + ptr->vs_identifier = xf86_lex_val.str; has_ident = TRUE; break; case OPTION: @@ -135,14 +134,14 @@ xf86parseVendorSection(void) while ((token = xf86getToken(VendorTab)) != ENDSECTION) { switch (token) { case COMMENT: - ptr->vnd_comment = xf86addComment(ptr->vnd_comment, val.str); + ptr->vnd_comment = xf86addComment(ptr->vnd_comment, xf86_lex_val.str); break; case IDENTIFIER: if (xf86getSubToken(&(ptr->vnd_comment)) != STRING) Error(QUOTE_MSG, "Identifier"); if (has_ident == TRUE) Error(MULTIPLE_MSG, "Identifier"); - ptr->vnd_identifier = val.str; + ptr->vnd_identifier = xf86_lex_val.str; has_ident = TRUE; break; case OPTION: diff --git a/xserver/hw/xfree86/parser/Video.c b/xserver/hw/xfree86/parser/Video.c index 68d611ae7..93209c499 100644 --- a/xserver/hw/xfree86/parser/Video.c +++ b/xserver/hw/xfree86/parser/Video.c @@ -60,7 +60,6 @@ #include "xf86tokens.h" #include "Configint.h" -extern LexRec val; static xf86ConfigSymTabRec VideoPortTab[] = { {ENDSUBSECTION, "endsubsection"}, @@ -97,14 +96,14 @@ xf86parseVideoPortSubSection(void) while ((token = xf86getToken(VideoPortTab)) != ENDSUBSECTION) { switch (token) { case COMMENT: - ptr->vp_comment = xf86addComment(ptr->vp_comment, val.str); + ptr->vp_comment = xf86addComment(ptr->vp_comment, xf86_lex_val.str); break; case IDENTIFIER: if (xf86getSubToken(&(ptr->vp_comment)) != STRING) Error(QUOTE_MSG, "Identifier"); if (has_ident == TRUE) Error(MULTIPLE_MSG, "Identifier"); - ptr->vp_identifier = val.str; + ptr->vp_identifier = xf86_lex_val.str; has_ident = TRUE; break; case OPTION: @@ -154,12 +153,12 @@ xf86parseVideoAdaptorSection(void) while ((token = xf86getToken(VideoAdaptorTab)) != ENDSECTION) { switch (token) { case COMMENT: - ptr->va_comment = xf86addComment(ptr->va_comment, val.str); + ptr->va_comment = xf86addComment(ptr->va_comment, xf86_lex_val.str); break; case IDENTIFIER: if (xf86getSubToken(&(ptr->va_comment)) != STRING) Error(QUOTE_MSG, "Identifier"); - ptr->va_identifier = val.str; + ptr->va_identifier = xf86_lex_val.str; if (has_ident == TRUE) Error(MULTIPLE_MSG, "Identifier"); has_ident = TRUE; @@ -167,22 +166,22 @@ xf86parseVideoAdaptorSection(void) case VENDOR: if (xf86getSubToken(&(ptr->va_comment)) != STRING) Error(QUOTE_MSG, "Vendor"); - ptr->va_vendor = val.str; + ptr->va_vendor = xf86_lex_val.str; break; case BOARD: if (xf86getSubToken(&(ptr->va_comment)) != STRING) Error(QUOTE_MSG, "Board"); - ptr->va_board = val.str; + ptr->va_board = xf86_lex_val.str; break; case BUSID: if (xf86getSubToken(&(ptr->va_comment)) != STRING) Error(QUOTE_MSG, "BusID"); - ptr->va_busid = val.str; + ptr->va_busid = xf86_lex_val.str; break; case DRIVER: if (xf86getSubToken(&(ptr->va_comment)) != STRING) Error(QUOTE_MSG, "Driver"); - ptr->va_driver = val.str; + ptr->va_driver = xf86_lex_val.str; break; case OPTION: ptr->va_option_lst = xf86parseOption(ptr->va_option_lst); diff --git a/xserver/hw/xfree86/parser/configProcs.h b/xserver/hw/xfree86/parser/configProcs.h index 1250f3922..774e2a2da 100644 --- a/xserver/hw/xfree86/parser/configProcs.h +++ b/xserver/hw/xfree86/parser/configProcs.h @@ -57,6 +57,11 @@ XF86ConfInputClassPtr xf86parseInputClassSection(void); void xf86printInputClassSection(FILE * f, XF86ConfInputClassPtr ptr); void xf86freeInputClassList(XF86ConfInputClassPtr ptr); +/* OutputClass.c */ +XF86ConfOutputClassPtr xf86parseOutputClassSection(void); +void xf86printOutputClassSection(FILE * f, XF86ConfOutputClassPtr ptr); +void xf86freeOutputClassList(XF86ConfOutputClassPtr ptr); + /* Layout.c */ XF86ConfLayoutPtr xf86parseLayoutSection(void); void xf86printLayoutSection(FILE * cf, XF86ConfLayoutPtr ptr); @@ -67,7 +72,7 @@ int xf86validateLayout(XF86ConfigPtr p); XF86ConfModulePtr xf86parseModuleSection(void); void xf86printModuleSection(FILE * cf, XF86ConfModulePtr ptr); extern _X_EXPORT XF86LoadPtr xf86addNewLoadDirective(XF86LoadPtr head, - char *name, int type, + const char *name, int type, XF86OptionPtr opts); void xf86freeModules(XF86ConfModulePtr ptr); @@ -141,7 +146,7 @@ xf86freeExtensions(XF86ConfExtensionsPtr ptr); #include <xorg-config.h> #endif -#ifndef IN_XSERVER +#ifndef HAVE_XORG_CONFIG_H /* Externally provided functions */ void ErrorF(const char *f, ...); diff --git a/xserver/hw/xfree86/parser/read.c b/xserver/hw/xfree86/parser/read.c index 6545bcdae..22f6e6af4 100644 --- a/xserver/hw/xfree86/parser/read.c +++ b/xserver/hw/xfree86/parser/read.c @@ -60,7 +60,6 @@ #include "xf86tokens.h" #include "Configint.h" -extern LexRec val; static xf86ConfigSymTabRec TopLevelTab[] = { {SECTION, "section"}, @@ -99,7 +98,7 @@ xf86readConfigFile(void) while ((token = xf86getToken(TopLevelTab)) != EOF_TOKEN) { switch (token) { case COMMENT: - ptr->conf_comment = xf86addComment(ptr->conf_comment, val.str); + ptr->conf_comment = xf86addComment(ptr->conf_comment, xf86_lex_val.str); break; case SECTION: if (xf86getSubToken(&(ptr->conf_comment)) != STRING) { @@ -107,101 +106,107 @@ xf86readConfigFile(void) CLEANUP(ptr); return NULL; } - xf86setSection(val.str); - if (xf86nameCompare(val.str, "files") == 0) { - free(val.str); - val.str = 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(val.str, "serverflags") == 0) { - free(val.str); - val.str = NULL; + 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(val.str, "pointer") == 0) { - free(val.str); - val.str = NULL; + 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(val.str, "videoadaptor") == 0) { - free(val.str); - val.str = NULL; + 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(val.str, "device") == 0) { - free(val.str); - val.str = NULL; + 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(val.str, "monitor") == 0) { - free(val.str); - val.str = NULL; + 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(val.str, "modes") == 0) { - free(val.str); - val.str = NULL; + 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(val.str, "screen") == 0) { - free(val.str); - val.str = NULL; + 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(val.str, "inputdevice") == 0) { - free(val.str); - val.str = NULL; + 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(val.str, "inputclass") == 0) { - free(val.str); - val.str = NULL; + 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(val.str, "module") == 0) { - free(val.str); - val.str = NULL; + 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(val.str, "serverlayout") == 0) { - free(val.str); - val.str = NULL; + 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(val.str, "vendor") == 0) { - free(val.str); - val.str = NULL; + 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(val.str, "dri") == 0) { - free(val.str); - val.str = NULL; + 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(val.str, "extensions") == 0) { - free(val.str); - val.str = NULL; + 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(val.str); - val.str = NULL; + free(xf86_lex_val.str); + xf86_lex_val.str = NULL; Error(INVALID_SECTION_MSG, xf86tokenString()); } break; default: - free(val.str); - val.str = NULL; + free(xf86_lex_val.str); + xf86_lex_val.str = NULL; Error(INVALID_KEYWORD_MSG, xf86tokenString()); } } diff --git a/xserver/hw/xfree86/parser/scan.c b/xserver/hw/xfree86/parser/scan.c index f852b83ec..a6c12957b 100644 --- a/xserver/hw/xfree86/parser/scan.c +++ b/xserver/hw/xfree86/parser/scan.c @@ -103,7 +103,7 @@ 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 val; +LexRec xf86_lex_val; /* * xf86getNextLine -- @@ -332,7 +332,7 @@ xf86getToken(xf86ConfigSymTabRec * tab) /* XXX no private copy. * Use xf86addComment when setting a comment. */ - val.str = configRBuf; + xf86_lex_val.str = configRBuf; return COMMENT; } @@ -354,15 +354,15 @@ xf86getToken(xf86ConfigSymTabRec * tab) if ((configBuf[configPos] == 'x') || (configBuf[configPos] == 'X')) { base = 16; - val.numType = PARSE_HEX; + xf86_lex_val.numType = PARSE_HEX; } else { base = 8; - val.numType = PARSE_OCTAL; + xf86_lex_val.numType = PARSE_OCTAL; } else { base = 10; - val.numType = PARSE_DECIMAL; + xf86_lex_val.numType = PARSE_DECIMAL; } configRBuf[0] = c; @@ -374,8 +374,8 @@ xf86getToken(xf86ConfigSymTabRec * tab) configRBuf[i++] = c; configPos--; /* GJA -- one too far */ configRBuf[i] = '\0'; - val.num = strtoul(configRBuf, NULL, 0); - val.realnum = atof(configRBuf); + xf86_lex_val.num = strtoul(configRBuf, NULL, 0); + xf86_lex_val.realnum = atof(configRBuf); return NUMBER; } @@ -389,8 +389,8 @@ xf86getToken(xf86ConfigSymTabRec * tab) } while ((c != '\"') && (c != '\n') && (c != '\r') && (c != '\0')); configRBuf[i] = '\0'; - val.str = malloc(strlen(configRBuf) + 1); - strcpy(val.str, configRBuf); /* private copy ! */ + xf86_lex_val.str = malloc(strlen(configRBuf) + 1); + strcpy(xf86_lex_val.str, configRBuf); /* private copy ! */ return STRING; } @@ -452,7 +452,7 @@ xf86getSubToken(char **comment) token = xf86getToken(NULL); if (token == COMMENT) { if (comment) - *comment = xf86addComment(*comment, val.str); + *comment = xf86addComment(*comment, xf86_lex_val.str); } else return token; @@ -468,7 +468,7 @@ xf86getSubTokenWithTab(char **comment, xf86ConfigSymTabRec * tab) token = xf86getToken(tab); if (token == COMMENT) { if (comment) - *comment = xf86addComment(*comment, val.str); + *comment = xf86addComment(*comment, xf86_lex_val.str); } else return token; @@ -820,7 +820,7 @@ static char * OpenConfigDir(const char *path, const char *cmdline, const char *projroot, const char *confname) { - char *dirpath, *pathcopy; + char *dirpath = NULL, *pathcopy; const char *template; Bool found = FALSE; int cmdlineUsed = 0; @@ -1025,7 +1025,7 @@ xf86setSection(const char *section) int xf86getStringToken(xf86ConfigSymTabRec * tab) { - return StringToToken(val.str, tab); + return StringToToken(xf86_lex_val.str, tab); } static int @@ -1078,9 +1078,10 @@ xf86nameCompare(const char *s1, const char *s2) } char * -xf86addComment(char *cur, char *add) +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') @@ -1095,14 +1096,14 @@ xf86addComment(char *cur, char *add) else curlen = 0; - str = add; + cstr = add; iscomment = 0; - while (*str) { - if (*str != ' ' && *str != '\t') + while (*cstr) { + if (*cstr != ' ' && *cstr != '\t') break; - ++str; + ++cstr; } - iscomment = (*str == '#'); + iscomment = (*cstr == '#'); len = strlen(add); endnewline = add[len - 1] == '\n'; diff --git a/xserver/hw/xfree86/parser/write.c b/xserver/hw/xfree86/parser/write.c index 26739b933..472b27ba1 100644 --- a/xserver/hw/xfree86/parser/write.c +++ b/xserver/hw/xfree86/parser/write.c @@ -114,6 +114,8 @@ doWriteConfigFile(const char *filename, XF86ConfigPtr cptr) xf86printInputClassSection(cf, cptr->conf_inputclass_lst); + xf86printOutputClassSection(cf, cptr->conf_outputclass_lst); + xf86printVideoAdaptorSection(cf, cptr->conf_videoadaptor_lst); xf86printModesSection(cf, cptr->conf_modes_lst); diff --git a/xserver/hw/xfree86/parser/xf86Parser.h b/xserver/hw/xfree86/parser/xf86Parser.h index e7210e811..3fa5b716d 100644 --- a/xserver/hw/xfree86/parser/xf86Parser.h +++ b/xserver/hw/xfree86/parser/xf86Parser.h @@ -85,7 +85,7 @@ typedef struct { typedef struct { GenericListRec list; int load_type; - char *load_name; + const char *load_name; XF86OptionPtr load_opt; char *load_comment; int ignore; @@ -116,7 +116,7 @@ typedef struct { typedef struct { GenericListRec list; - char *ml_identifier; + const char *ml_identifier; int ml_clock; int ml_hdisplay; int ml_hsyncstart; @@ -134,21 +134,21 @@ typedef struct { typedef struct { GenericListRec list; - char *vp_identifier; + const char *vp_identifier; XF86OptionPtr vp_option_lst; char *vp_comment; } XF86ConfVideoPortRec, *XF86ConfVideoPortPtr; typedef struct { GenericListRec list; - char *va_identifier; - char *va_vendor; - char *va_board; - char *va_busid; - char *va_driver; + 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; - char *va_fwdref; + const char *va_fwdref; char *va_comment; } XF86ConfVideoAdaptorRec, *XF86ConfVideoAdaptorPtr; @@ -165,21 +165,21 @@ typedef struct { typedef struct { GenericListRec list; - char *modes_identifier; + const char *modes_identifier; XF86ConfModeLinePtr mon_modeline_lst; char *modes_comment; } XF86ConfModesRec, *XF86ConfModesPtr; typedef struct { GenericListRec list; - char *ml_modes_str; + const char *ml_modes_str; XF86ConfModesPtr ml_modes; } XF86ConfModesLinkRec, *XF86ConfModesLinkPtr; typedef struct { GenericListRec list; - char *mon_identifier; - char *mon_vendor; + const char *mon_identifier; + const char *mon_vendor; char *mon_modelname; int mon_width; /* in mm */ int mon_height; /* in mm */ @@ -201,21 +201,21 @@ typedef struct { typedef struct { GenericListRec list; - char *dev_identifier; - char *dev_vendor; - char *dev_board; - char *dev_chipset; - char *dev_busid; - char *dev_card; - char *dev_driver; - char *dev_ramdac; + 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; int dev_textclockfreq; unsigned long dev_bios_base; unsigned long dev_mem_base; unsigned long dev_io_base; - char *dev_clockchip; + const char *dev_clockchip; int dev_clocks; int dev_clock[CONF_MAXCLOCKS]; int dev_chipid; @@ -224,11 +224,12 @@ typedef struct { int dev_screen; XF86OptionPtr dev_option_lst; char *dev_comment; + char *match_seat; } XF86ConfDeviceRec, *XF86ConfDevicePtr; typedef struct { GenericListRec list; - char *mode_name; + const char *mode_name; } XF86ModeRec, *XF86ModePtr; typedef struct { @@ -239,7 +240,7 @@ typedef struct { int disp_virtualY; int disp_depth; int disp_bpp; - char *disp_visual; + const char *disp_visual; parser_rgb disp_weight; parser_rgb disp_black; parser_rgb disp_white; @@ -255,26 +256,27 @@ typedef struct { typedef struct { GenericListRec list; - char *al_adaptor_str; + const char *al_adaptor_str; XF86ConfVideoAdaptorPtr al_adaptor; } XF86ConfAdaptorLinkRec, *XF86ConfAdaptorLinkPtr; typedef struct { GenericListRec list; - char *scrn_identifier; - char *scrn_obso_driver; + const char *scrn_identifier; + const char *scrn_obso_driver; int scrn_defaultdepth; int scrn_defaultbpp; int scrn_defaultfbbpp; - char *scrn_monitor_str; + const char *scrn_monitor_str; XF86ConfMonitorPtr scrn_monitor; - char *scrn_device_str; + 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; } XF86ConfScreenRec, *XF86ConfScreenPtr; typedef struct { @@ -325,6 +327,14 @@ typedef struct { char *comment; } XF86ConfInputClassRec, *XF86ConfInputClassPtr; +typedef struct { + GenericListRec list; + char *identifier; + char *driver; + struct xorg_list match_driver; + char *comment; +} XF86ConfOutputClassRec, *XF86ConfOutputClassPtr; + /* Values for adj_where */ #define CONF_ADJ_OBSOLETE -1 #define CONF_ADJ_ABSOLUTE 0 @@ -338,55 +348,56 @@ typedef struct { GenericListRec list; int adj_scrnum; XF86ConfScreenPtr adj_screen; - char *adj_screen_str; + const char *adj_screen_str; XF86ConfScreenPtr adj_top; - char *adj_top_str; + const char *adj_top_str; XF86ConfScreenPtr adj_bottom; - char *adj_bottom_str; + const char *adj_bottom_str; XF86ConfScreenPtr adj_left; - char *adj_left_str; + const char *adj_left_str; XF86ConfScreenPtr adj_right; - char *adj_right_str; + const char *adj_right_str; int adj_where; int adj_x; int adj_y; - char *adj_refscreen; + const char *adj_refscreen; } XF86ConfAdjacencyRec, *XF86ConfAdjacencyPtr; typedef struct { GenericListRec list; - char *inactive_device_str; + const char *inactive_device_str; XF86ConfDevicePtr inactive_device; } XF86ConfInactiveRec, *XF86ConfInactivePtr; typedef struct { GenericListRec list; - char *lay_identifier; + 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; - char *vs_name; - char *vs_identifier; + const char *vs_name; + const char *vs_identifier; XF86OptionPtr vs_option_lst; char *vs_comment; } XF86ConfVendSubRec, *XF86ConfVendSubPtr; typedef struct { GenericListRec list; - char *vnd_identifier; + const char *vnd_identifier; XF86OptionPtr vnd_option_lst; XF86ConfVendSubPtr vnd_sub_lst; char *vnd_comment; } XF86ConfVendorRec, *XF86ConfVendorPtr; typedef struct { - char *dri_group_name; + const char *dri_group_name; int dri_group; int dri_mode; char *dri_comment; @@ -408,6 +419,7 @@ typedef struct { 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; @@ -462,7 +474,7 @@ extern _X_EXPORT int xf86itemNotSublist(GenericListPtr list_1, extern _X_EXPORT int xf86pathIsAbsolute(const char *path); extern _X_EXPORT int xf86pathIsSafe(const char *path); -extern _X_EXPORT char *xf86addComment(char *cur, char *add); +extern _X_EXPORT char *xf86addComment(char *cur, const char *add); extern _X_EXPORT Bool xf86getBoolValue(Bool *val, const char *str); #endif /* _xf86Parser_h_ */ diff --git a/xserver/hw/xfree86/parser/xf86tokens.h b/xserver/hw/xfree86/parser/xf86tokens.h index f751b7b0e..5c01ce701 100644 --- a/xserver/hw/xfree86/parser/xf86tokens.h +++ b/xserver/hw/xfree86/parser/xf86tokens.h @@ -87,6 +87,7 @@ typedef enum { VENDOR, DASH, COMMA, + MATCHSEAT, OPTION, COMMENT, diff --git a/xserver/hw/xfree86/ramdac/IBM.c b/xserver/hw/xfree86/ramdac/IBM.c index bc716231a..45876cfb7 100644 --- a/xserver/hw/xfree86/ramdac/IBM.c +++ b/xserver/hw/xfree86/ramdac/IBM.c @@ -570,7 +570,7 @@ IBMramdac640SetCursorColors(ScrnInfoPtr pScrn, int bg, int fg) (*ramdacPtr->WriteData) (pScrn, bg); } -static void +static Bool IBMramdac526LoadCursorImage(ScrnInfoPtr pScrn, unsigned char *src) { RamDacRecPtr ramdacPtr = RAMDACSCRPTR(pScrn); @@ -582,9 +582,10 @@ IBMramdac526LoadCursorImage(ScrnInfoPtr pScrn, unsigned char *src) */ for (i = 0; i < 1024; i++) (*ramdacPtr->WriteDAC) (pScrn, IBMRGB_curs_array + i, 0x00, (*src++)); + return TRUE; } -static void +static Bool IBMramdac640LoadCursorImage(ScrnInfoPtr pScrn, unsigned char *src) { RamDacRecPtr ramdacPtr = RAMDACSCRPTR(pScrn); @@ -596,6 +597,7 @@ IBMramdac640LoadCursorImage(ScrnInfoPtr pScrn, unsigned char *src) */ for (i = 0; i < 1024; i++) (*ramdacPtr->WriteDAC) (pScrn, RGB640_CURS_WRITE + i, 0x00, (*src++)); + return TRUE; } static Bool @@ -620,7 +622,7 @@ IBMramdac526HWCursorInit(xf86CursorInfoPtr infoPtr) HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_1; infoPtr->SetCursorColors = IBMramdac526SetCursorColors; infoPtr->SetCursorPosition = IBMramdac526SetCursorPosition; - infoPtr->LoadCursorImage = IBMramdac526LoadCursorImage; + infoPtr->LoadCursorImageCheck = IBMramdac526LoadCursorImage; infoPtr->HideCursor = IBMramdac526HideCursor; infoPtr->ShowCursor = IBMramdac526ShowCursor; infoPtr->UseHWCursor = IBMramdac526UseHWCursor; @@ -636,7 +638,7 @@ IBMramdac640HWCursorInit(xf86CursorInfoPtr infoPtr) HARDWARE_CURSOR_SOURCE_MASK_INTERLEAVE_1; infoPtr->SetCursorColors = IBMramdac640SetCursorColors; infoPtr->SetCursorPosition = IBMramdac640SetCursorPosition; - infoPtr->LoadCursorImage = IBMramdac640LoadCursorImage; + infoPtr->LoadCursorImageCheck = IBMramdac640LoadCursorImage; infoPtr->HideCursor = IBMramdac640HideCursor; infoPtr->ShowCursor = IBMramdac640ShowCursor; infoPtr->UseHWCursor = IBMramdac640UseHWCursor; diff --git a/xserver/hw/xfree86/ramdac/Makefile.in b/xserver/hw/xfree86/ramdac/Makefile.in index a29e3e16e..8bb4c19fc 100644 --- a/xserver/hw/xfree86/ramdac/Makefile.in +++ b/xserver/hw/xfree86/ramdac/Makefile.in @@ -193,6 +193,8 @@ 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@ @@ -237,6 +239,10 @@ 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@ @@ -339,7 +345,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -348,6 +357,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -414,6 +424,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/xfree86/ramdac/TI.c b/xserver/hw/xfree86/ramdac/TI.c index 393b774d4..2492bb531 100644 --- a/xserver/hw/xfree86/ramdac/TI.c +++ b/xserver/hw/xfree86/ramdac/TI.c @@ -642,7 +642,7 @@ TIramdacSetCursorColors(ScrnInfoPtr pScrn, int bg, int fg) (*ramdacPtr->WriteDAC) (pScrn, TIDAC_CURS_COLOR, 0, (fg & 0x000000ff)); } -static void +static Bool TIramdacLoadCursorImage(ScrnInfoPtr pScrn, unsigned char *src) { RamDacRecPtr ramdacPtr = RAMDACSCRPTR(pScrn); @@ -657,6 +657,7 @@ TIramdacLoadCursorImage(ScrnInfoPtr pScrn, unsigned char *src) /* NOT_DONE: might need a delay here */ (*ramdacPtr->WriteDAC) (pScrn, TIDAC_CURS_RAM_DATA, 0, *(src++)); } + return TRUE; } static Bool @@ -675,7 +676,7 @@ TIramdacHWCursorInit(xf86CursorInfoPtr infoPtr) HARDWARE_CURSOR_SOURCE_MASK_NOT_INTERLEAVED; infoPtr->SetCursorColors = TIramdacSetCursorColors; infoPtr->SetCursorPosition = TIramdacSetCursorPosition; - infoPtr->LoadCursorImage = TIramdacLoadCursorImage; + infoPtr->LoadCursorImageCheck = TIramdacLoadCursorImage; infoPtr->HideCursor = TIramdacHideCursor; infoPtr->ShowCursor = TIramdacShowCursor; infoPtr->UseHWCursor = TIramdacUseHWCursor; diff --git a/xserver/hw/xfree86/ramdac/xf86Cursor.c b/xserver/hw/xfree86/ramdac/xf86Cursor.c index 860704e1c..fac682210 100644 --- a/xserver/hw/xfree86/ramdac/xf86Cursor.c +++ b/xserver/hw/xfree86/ramdac/xf86Cursor.c @@ -352,12 +352,13 @@ xf86CursorSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs, (*ScreenPriv->spriteFuncs->SetCursor) (pDev, pScreen, NullCursor, x, y); - xf86SetCursor(pScreen, cursor, x, y); - ScreenPriv->SWCursor = FALSE; - ScreenPriv->isUp = TRUE; + if (xf86SetCursor(pScreen, cursor, x, y)) { + ScreenPriv->SWCursor = FALSE; + ScreenPriv->isUp = TRUE; - miPointerSetWaitForUpdate(pScreen, !infoPtr->pScrn->silkenMouse); - return; + miPointerSetWaitForUpdate(pScreen, !infoPtr->pScrn->silkenMouse); + return; + } } miPointerSetWaitForUpdate(pScreen, TRUE); diff --git a/xserver/hw/xfree86/ramdac/xf86Cursor.h b/xserver/hw/xfree86/ramdac/xf86Cursor.h index 5658e7b30..a389a9988 100644 --- a/xserver/hw/xfree86/ramdac/xf86Cursor.h +++ b/xserver/hw/xfree86/ramdac/xf86Cursor.h @@ -13,6 +13,7 @@ typedef struct _xf86CursorInfoRec { 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); unsigned char *(*RealizeCursor) (struct _xf86CursorInfoRec *, CursorPtr); @@ -21,10 +22,41 @@ typedef struct _xf86CursorInfoRec { #ifdef ARGB_CURSOR Bool (*UseHWCursorARGB) (ScreenPtr, CursorPtr); void (*LoadCursorARGB) (ScrnInfoPtr, CursorPtr); + Bool (*LoadCursorARGBCheck) (ScrnInfoPtr, CursorPtr); #endif } 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 +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); diff --git a/xserver/hw/xfree86/ramdac/xf86CursorPriv.h b/xserver/hw/xfree86/ramdac/xf86CursorPriv.h index 04be14135..f34c1c7fc 100644 --- a/xserver/hw/xfree86/ramdac/xf86CursorPriv.h +++ b/xserver/hw/xfree86/ramdac/xf86CursorPriv.h @@ -34,10 +34,10 @@ typedef struct { int ForceHWCursorCount; Bool HWCursorForced; - pointer transparentData; + void *transparentData; } xf86CursorScreenRec, *xf86CursorScreenPtr; -void xf86SetCursor(ScreenPtr pScreen, CursorPtr pCurs, int x, int y); +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); diff --git a/xserver/hw/xfree86/ramdac/xf86HWCurs.c b/xserver/hw/xfree86/ramdac/xf86HWCurs.c index 197abff8f..953c86abc 100644 --- a/xserver/hw/xfree86/ramdac/xf86HWCurs.c +++ b/xserver/hw/xfree86/ramdac/xf86HWCurs.c @@ -87,7 +87,7 @@ xf86InitHardwareCursor(ScreenPtr pScreen, xf86CursorInfoPtr infoPtr) /* These are required for now */ if (!infoPtr->SetCursorPosition || - !infoPtr->LoadCursorImage || + !xf86DriverHasLoadCursorImage(infoPtr) || !infoPtr->HideCursor || !infoPtr->ShowCursor || !infoPtr->SetCursorColors) return FALSE; @@ -119,7 +119,7 @@ xf86InitHardwareCursor(ScreenPtr pScreen, xf86CursorInfoPtr infoPtr) return TRUE; } -void +Bool xf86SetCursor(ScreenPtr pScreen, CursorPtr pCurs, int x, int y) { xf86CursorScreenPtr ScreenPriv = @@ -130,7 +130,7 @@ xf86SetCursor(ScreenPtr pScreen, CursorPtr pCurs, int x, int y) if (pCurs == NullCursor) { (*infoPtr->HideCursor) (infoPtr->pScrn); - return; + return TRUE; } bits = @@ -140,7 +140,7 @@ xf86SetCursor(ScreenPtr pScreen, CursorPtr pCurs, int x, int y) y -= infoPtr->pScrn->frameY0 + ScreenPriv->HotY; #ifdef ARGB_CURSOR - if (!pCurs->bits->argb || !infoPtr->LoadCursorARGB) + if (!pCurs->bits->argb || !xf86DriverHasLoadCursorARGB(infoPtr)) #endif if (!bits) { bits = (*infoPtr->RealizeCursor) (infoPtr, pCurs); @@ -152,18 +152,21 @@ xf86SetCursor(ScreenPtr pScreen, CursorPtr pCurs, int x, int y) (*infoPtr->HideCursor) (infoPtr->pScrn); #ifdef ARGB_CURSOR - if (pCurs->bits->argb && infoPtr->LoadCursorARGB) - (*infoPtr->LoadCursorARGB) (infoPtr->pScrn, pCurs); - else + if (pCurs->bits->argb && xf86DriverHasLoadCursorARGB(infoPtr)) { + if (!xf86DriverLoadCursorARGB (infoPtr, pCurs)) + return FALSE; + } else #endif if (bits) - (*infoPtr->LoadCursorImage) (infoPtr->pScrn, bits); + if (!xf86DriverLoadCursorImage (infoPtr, bits)) + return FALSE; xf86RecolorCursor(pScreen, pCurs, 1); (*infoPtr->SetCursorPosition) (infoPtr->pScrn, x, y); (*infoPtr->ShowCursor) (infoPtr->pScrn); + return TRUE; } void @@ -182,8 +185,8 @@ xf86SetTransparentCursor(ScreenPtr pScreen) (*infoPtr->HideCursor) (infoPtr->pScrn); if (ScreenPriv->transparentData) - (*infoPtr->LoadCursorImage) (infoPtr->pScrn, - ScreenPriv->transparentData); + xf86DriverLoadCursorImage (infoPtr, + ScreenPriv->transparentData); (*infoPtr->ShowCursor) (infoPtr->pScrn); } @@ -462,9 +465,9 @@ RealizeCursorInterleave16(xf86CursorInfoPtr infoPtr, CursorPtr pCurs) } /* 16 bit interleave */ - DstS = (pointer) mem2; + DstS = (void *) mem2; DstM = DstS + (size >> 2); - pntr = (pointer) mem; + pntr = (void *) mem; count = (size >> 1); while (count) { *pntr++ = *DstS++; @@ -497,9 +500,9 @@ RealizeCursorInterleave32(xf86CursorInfoPtr infoPtr, CursorPtr pCurs) } /* 32 bit interleave */ - DstS = (pointer) mem2; + DstS = (void *) mem2; DstM = DstS + (size >> 3); - pntr = (pointer) mem; + pntr = (void *) mem; count = (size >> 2); while (count) { *pntr++ = *DstS++; @@ -532,9 +535,9 @@ RealizeCursorInterleave64(xf86CursorInfoPtr infoPtr, CursorPtr pCurs) } /* 64 bit interleave */ - DstS = (pointer) mem2; + DstS = (void *) mem2; DstM = DstS + (size >> 3); - pntr = (pointer) mem; + pntr = (void *) mem; count = (size >> 2); while (count) { *pntr++ = *DstS++; diff --git a/xserver/hw/xfree86/sdksyms.sh b/xserver/hw/xfree86/sdksyms.sh index ef0c86849..f48078584 100644 --- a/xserver/hw/xfree86/sdksyms.sh +++ b/xserver/hw/xfree86/sdksyms.sh @@ -260,6 +260,7 @@ cat > sdksyms.c << EOF #include "dix.h" #include "dixaccess.h" #include "dixevents.h" +#define _FONTPROTO_H #include "dixfont.h" #include "dixfontstr.h" #include "dixfontstubs.h" diff --git a/xserver/hw/xfree86/shadowfb/Makefile.in b/xserver/hw/xfree86/shadowfb/Makefile.in index 42caa6624..198d5da70 100644 --- a/xserver/hw/xfree86/shadowfb/Makefile.in +++ b/xserver/hw/xfree86/shadowfb/Makefile.in @@ -197,6 +197,8 @@ 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@ @@ -241,6 +243,10 @@ 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@ @@ -343,7 +349,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -352,6 +361,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -418,6 +428,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/xfree86/shadowfb/shadow.c b/xserver/hw/xfree86/shadowfb/shadow.c index 614501770..d2481ed8a 100644 --- a/xserver/hw/xfree86/shadowfb/shadow.c +++ b/xserver/hw/xfree86/shadowfb/shadow.c @@ -1,8 +1,8 @@ /* 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) */ @@ -29,107 +29,23 @@ #include "picturestr.h" static Bool ShadowCloseScreen(ScreenPtr pScreen); -static void ShadowCopyWindow(WindowPtr pWin, - DDXPointRec ptOldOrg, RegionPtr prgn); -static Bool ShadowCreateGC(GCPtr pGC); - -static Bool ShadowEnterVT(ScrnInfoPtr pScrn); -static void ShadowLeaveVT(ScrnInfoPtr pScrn); - -static void ShadowComposite(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 Bool ShadowCreateRootWindow(WindowPtr pWin); typedef struct { ScrnInfoPtr pScrn; RefreshAreaFuncPtr preRefresh; RefreshAreaFuncPtr postRefresh; CloseScreenProcPtr CloseScreen; - CopyWindowProcPtr CopyWindow; - CreateGCProcPtr CreateGC; - ModifyPixmapHeaderProcPtr ModifyPixmapHeader; - CompositeProcPtr Composite; - Bool (*EnterVT) (ScrnInfoPtr); - void (*LeaveVT) (ScrnInfoPtr); - Bool vtSema; + CreateWindowProcPtr CreateWindow; } ShadowScreenRec, *ShadowScreenPtr; -typedef struct { - GCOps *ops; - GCFuncs *funcs; -} ShadowGCRec, *ShadowGCPtr; - static DevPrivateKeyRec ShadowScreenKeyRec; -#define ShadowScreenKey (&ShadowScreenKeyRec) - -static DevPrivateKeyRec ShadowGCKeyRec; - -#define ShadowGCKey (&ShadowGCKeyRec) - -#define GET_SCREEN_PRIVATE(pScreen) \ - (ShadowScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, ShadowScreenKey) -#define GET_GC_PRIVATE(pGC) \ - (ShadowGCPtr)dixLookupPrivate(&(pGC)->devPrivates, ShadowGCKey) - -#define SHADOW_GC_FUNC_PROLOGUE(pGC)\ - ShadowGCPtr pGCPriv = GET_GC_PRIVATE(pGC);\ - (pGC)->funcs = pGCPriv->funcs;\ - if(pGCPriv->ops)\ - (pGC)->ops = pGCPriv->ops - -#define SHADOW_GC_FUNC_EPILOGUE(pGC)\ - pGCPriv->funcs = (pGC)->funcs;\ - (pGC)->funcs = &ShadowGCFuncs;\ - if(pGCPriv->ops) {\ - pGCPriv->ops = (pGC)->ops;\ - (pGC)->ops = &ShadowGCOps;\ - } - -#define SHADOW_GC_OP_PROLOGUE(pGC)\ - ShadowScreenPtr pPriv = GET_SCREEN_PRIVATE(pGC->pScreen); \ - ShadowGCPtr pGCPriv = GET_GC_PRIVATE(pGC);\ - GCFuncs *oldFuncs = pGC->funcs;\ - pGC->funcs = pGCPriv->funcs;\ - pGC->ops = pGCPriv->ops - -#define SHADOW_GC_OP_EPILOGUE(pGC)\ - pGCPriv->ops = pGC->ops;\ - pGC->funcs = oldFuncs;\ - pGC->ops = &ShadowGCOps - -#define IS_VISIBLE(pWin) (pPriv->vtSema && \ - (((WindowPtr)pWin)->visibility != VisibilityFullyObscured)) - -#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)) +static ShadowScreenPtr +shadowfbGetScreenPrivate(ScreenPtr pScreen) +{ + return dixLookupPrivate(&(pScreen)->devPrivates, &ShadowScreenKeyRec); +} Bool ShadowFBInit2(ScreenPtr pScreen, @@ -138,7 +54,6 @@ ShadowFBInit2(ScreenPtr pScreen, { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); ShadowScreenPtr pPriv; - PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); if (!preRefreshArea && !postRefreshArea) return FALSE; @@ -146,39 +61,20 @@ ShadowFBInit2(ScreenPtr pScreen, if (!dixRegisterPrivateKey(&ShadowScreenKeyRec, PRIVATE_SCREEN, 0)) return FALSE; - if (!dixRegisterPrivateKey - (&ShadowGCKeyRec, PRIVATE_GC, sizeof(ShadowGCRec))) - return FALSE; - if (!(pPriv = (ShadowScreenPtr) malloc(sizeof(ShadowScreenRec)))) return FALSE; - dixSetPrivate(&pScreen->devPrivates, ShadowScreenKey, pPriv); + dixSetPrivate(&pScreen->devPrivates, &ShadowScreenKeyRec, pPriv); pPriv->pScrn = pScrn; pPriv->preRefresh = preRefreshArea; pPriv->postRefresh = postRefreshArea; - pPriv->vtSema = TRUE; pPriv->CloseScreen = pScreen->CloseScreen; - pPriv->CopyWindow = pScreen->CopyWindow; - pPriv->CreateGC = pScreen->CreateGC; - pPriv->ModifyPixmapHeader = pScreen->ModifyPixmapHeader; - - pPriv->EnterVT = pScrn->EnterVT; - pPriv->LeaveVT = pScrn->LeaveVT; + pPriv->CreateWindow = pScreen->CreateWindow; pScreen->CloseScreen = ShadowCloseScreen; - pScreen->CopyWindow = ShadowCopyWindow; - pScreen->CreateGC = ShadowCreateGC; - - pScrn->EnterVT = ShadowEnterVT; - pScrn->LeaveVT = ShadowLeaveVT; - - if (ps) { - pPriv->Composite = ps->Composite; - ps->Composite = ShadowComposite; - } + pScreen->CreateWindow = ShadowCreateRootWindow; return TRUE; } @@ -189,1451 +85,87 @@ ShadowFBInit(ScreenPtr pScreen, RefreshAreaFuncPtr refreshArea) return ShadowFBInit2(pScreen, NULL, refreshArea); } -/**********************************************************/ - -static Bool -ShadowEnterVT(ScrnInfoPtr pScrn) -{ - Bool ret; - ShadowScreenPtr pPriv = GET_SCREEN_PRIVATE(pScrn->pScreen); - - pScrn->EnterVT = pPriv->EnterVT; - ret = (*pPriv->EnterVT) (pScrn); - pPriv->EnterVT = pScrn->EnterVT; - pScrn->EnterVT = ShadowEnterVT; - if (ret) { - pPriv->vtSema = TRUE; - return TRUE; - } - - return FALSE; -} - -static void -ShadowLeaveVT(ScrnInfoPtr pScrn) -{ - ShadowScreenPtr pPriv = GET_SCREEN_PRIVATE(pScrn->pScreen); - - pPriv->vtSema = FALSE; - - pScrn->LeaveVT = pPriv->LeaveVT; - (*pPriv->LeaveVT) (pScrn); - pPriv->LeaveVT = pScrn->LeaveVT; - pScrn->LeaveVT = ShadowLeaveVT; -} - -/**********************************************************/ - -static Bool -ShadowCloseScreen(ScreenPtr pScreen) -{ - ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); - ShadowScreenPtr pPriv = GET_SCREEN_PRIVATE(pScreen); - PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); - - pScreen->CloseScreen = pPriv->CloseScreen; - pScreen->CopyWindow = pPriv->CopyWindow; - pScreen->CreateGC = pPriv->CreateGC; - pScreen->ModifyPixmapHeader = pPriv->ModifyPixmapHeader; - - pScrn->EnterVT = pPriv->EnterVT; - pScrn->LeaveVT = pPriv->LeaveVT; - - if (ps) { - ps->Composite = pPriv->Composite; - } - - free((pointer) pPriv); - - return (*pScreen->CloseScreen) (pScreen); -} +/* + * 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 -ShadowCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgn) +shadowfbReportPre(DamagePtr damage, RegionPtr reg, void *closure) { - ScreenPtr pScreen = pWin->drawable.pScreen; - ShadowScreenPtr pPriv = GET_SCREEN_PRIVATE(pScreen); - int num = 0; - RegionRec rgnDst; - - if (pPriv->vtSema) { - RegionNull(&rgnDst); - RegionCopy(&rgnDst, prgn); - - RegionTranslate(&rgnDst, - pWin->drawable.x - ptOldOrg.x, - pWin->drawable.y - ptOldOrg.y); - RegionIntersect(&rgnDst, &pWin->borderClip, &rgnDst); - if ((num = RegionNumRects(&rgnDst))) { - if (pPriv->preRefresh) - (*pPriv->preRefresh) (pPriv->pScrn, num, RegionRects(&rgnDst)); - } - else { - RegionUninit(&rgnDst); - } - } + ShadowScreenPtr pPriv = closure; - pScreen->CopyWindow = pPriv->CopyWindow; - (*pScreen->CopyWindow) (pWin, ptOldOrg, prgn); - pScreen->CopyWindow = ShadowCopyWindow; + if (!pPriv->pScrn->vtSema) + return; - if (num) { - if (pPriv->postRefresh) - (*pPriv->postRefresh) (pPriv->pScrn, num, RegionRects(&rgnDst)); - RegionUninit(&rgnDst); - } + pPriv->preRefresh(pPriv->pScrn, RegionNumRects(reg), RegionRects(reg)); } static void -ShadowComposite(CARD8 op, - PicturePtr pSrc, - PicturePtr pMask, - PicturePtr pDst, - INT16 xSrc, - INT16 ySrc, - INT16 xMask, - INT16 yMask, - INT16 xDst, INT16 yDst, CARD16 width, CARD16 height) +shadowfbReportPost(DamagePtr damage, RegionPtr reg, void *closure) { - ScreenPtr pScreen = pDst->pDrawable->pScreen; - ShadowScreenPtr pPriv = GET_SCREEN_PRIVATE(pScreen); - PictureScreenPtr ps = GetPictureScreen(pScreen); - BoxRec box; - BoxPtr extents; - Bool boxNotEmpty = FALSE; - - if (pPriv->vtSema && pDst->pDrawable->type == DRAWABLE_WINDOW) { - - box.x1 = pDst->pDrawable->x + xDst; - box.y1 = pDst->pDrawable->y + yDst; - box.x2 = box.x1 + width; - box.y2 = box.y1 + height; - - 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; - - if (BOX_NOT_EMPTY(box)) { - if (pPriv->preRefresh) - (*pPriv->preRefresh) (pPriv->pScrn, 1, &box); - boxNotEmpty = TRUE; - } - } + ShadowScreenPtr pPriv = closure; - ps->Composite = pPriv->Composite; - (*ps->Composite) (op, pSrc, pMask, pDst, xSrc, ySrc, - xMask, yMask, xDst, yDst, width, height); - ps->Composite = ShadowComposite; + if (!pPriv->pScrn->vtSema) + return; - if (pPriv->postRefresh && boxNotEmpty) { - (*pPriv->postRefresh) (pPriv->pScrn, 1, &box); - } + pPriv->postRefresh(pPriv->pScrn, RegionNumRects(reg), RegionRects(reg)); } -/**********************************************************/ - -static void ShadowValidateGC(GCPtr, unsigned long, DrawablePtr); -static void ShadowChangeGC(GCPtr, unsigned long); -static void ShadowCopyGC(GCPtr, unsigned long, GCPtr); -static void ShadowDestroyGC(GCPtr); -static void ShadowChangeClip(GCPtr, int, pointer, int); -static void ShadowDestroyClip(GCPtr); -static void ShadowCopyClip(GCPtr, GCPtr); - -GCFuncs ShadowGCFuncs = { - ShadowValidateGC, ShadowChangeGC, ShadowCopyGC, ShadowDestroyGC, - ShadowChangeClip, ShadowDestroyClip, ShadowCopyClip -}; - -extern GCOps ShadowGCOps; - static Bool -ShadowCreateGC(GCPtr pGC) +ShadowCreateRootWindow(WindowPtr pWin) { - ScreenPtr pScreen = pGC->pScreen; - ShadowScreenPtr pPriv = GET_SCREEN_PRIVATE(pScreen); - ShadowGCPtr pGCPriv = GET_GC_PRIVATE(pGC); Bool ret; + ScreenPtr pScreen = pWin->drawable.pScreen; + ShadowScreenPtr pPriv = shadowfbGetScreenPrivate(pScreen); - pScreen->CreateGC = pPriv->CreateGC; - if ((ret = (*pScreen->CreateGC) (pGC))) { - pGCPriv->ops = NULL; - pGCPriv->funcs = pGC->funcs; - pGC->funcs = &ShadowGCFuncs; - } - pScreen->CreateGC = ShadowCreateGC; - - return ret; -} - -static void -ShadowValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDraw) -{ - SHADOW_GC_FUNC_PROLOGUE(pGC); - (*pGC->funcs->ValidateGC) (pGC, changes, pDraw); - if (pDraw->type == DRAWABLE_WINDOW) - pGCPriv->ops = pGC->ops; /* just so it's not NULL */ - else - pGCPriv->ops = NULL; - SHADOW_GC_FUNC_EPILOGUE(pGC); -} - -static void -ShadowDestroyGC(GCPtr pGC) -{ - SHADOW_GC_FUNC_PROLOGUE(pGC); - (*pGC->funcs->DestroyGC) (pGC); - SHADOW_GC_FUNC_EPILOGUE(pGC); -} - -static void -ShadowChangeGC(GCPtr pGC, unsigned long mask) -{ - SHADOW_GC_FUNC_PROLOGUE(pGC); - (*pGC->funcs->ChangeGC) (pGC, mask); - SHADOW_GC_FUNC_EPILOGUE(pGC); -} - -static void -ShadowCopyGC(GCPtr pGCSrc, unsigned long mask, GCPtr pGCDst) -{ - SHADOW_GC_FUNC_PROLOGUE(pGCDst); - (*pGCDst->funcs->CopyGC) (pGCSrc, mask, pGCDst); - SHADOW_GC_FUNC_EPILOGUE(pGCDst); -} - -static void -ShadowChangeClip(GCPtr pGC, int type, pointer pvalue, int nrects) -{ - SHADOW_GC_FUNC_PROLOGUE(pGC); - (*pGC->funcs->ChangeClip) (pGC, type, pvalue, nrects); - SHADOW_GC_FUNC_EPILOGUE(pGC); -} - -static void -ShadowCopyClip(GCPtr pgcDst, GCPtr pgcSrc) -{ - SHADOW_GC_FUNC_PROLOGUE(pgcDst); - (*pgcDst->funcs->CopyClip) (pgcDst, pgcSrc); - SHADOW_GC_FUNC_EPILOGUE(pgcDst); -} - -static void -ShadowDestroyClip(GCPtr pGC) -{ - SHADOW_GC_FUNC_PROLOGUE(pGC); - (*pGC->funcs->DestroyClip) (pGC); - SHADOW_GC_FUNC_EPILOGUE(pGC); -} - -/**********************************************************/ - -static void -ShadowFillSpans(DrawablePtr pDraw, - GC * pGC, - int nInit, DDXPointPtr pptInit, int *pwidthInit, int fSorted) -{ - SHADOW_GC_OP_PROLOGUE(pGC); - - if (IS_VISIBLE(pDraw) && nInit) { - DDXPointPtr ppt = pptInit; - int *pwidth = pwidthInit; - int i = nInit; - BoxRec box; - Bool boxNotEmpty = FALSE; - - 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++; - - if (!pGC->miTranslate) { - TRANSLATE_BOX(box, pDraw); - } - TRIM_BOX(box, pGC); - - if (BOX_NOT_EMPTY(box)) { - if (pPriv->preRefresh) - (*pPriv->preRefresh) (pPriv->pScrn, 1, &box); - boxNotEmpty = TRUE; - } - - (*pGC->ops->FillSpans) (pDraw, pGC, nInit, pptInit, pwidthInit, - fSorted); - - if (boxNotEmpty && pPriv->postRefresh) - (*pPriv->postRefresh) (pPriv->pScrn, 1, &box); - } - else - (*pGC->ops->FillSpans) (pDraw, pGC, nInit, pptInit, pwidthInit, - fSorted); - - SHADOW_GC_OP_EPILOGUE(pGC); -} - -static void -ShadowSetSpans(DrawablePtr pDraw, - GCPtr pGC, - char *pcharsrc, - DDXPointPtr pptInit, int *pwidthInit, int nspans, int fSorted) -{ - SHADOW_GC_OP_PROLOGUE(pGC); - - if (IS_VISIBLE(pDraw) && nspans) { - DDXPointPtr ppt = pptInit; - int *pwidth = pwidthInit; - int i = nspans; - BoxRec box; - Bool boxNotEmpty = FALSE; - - 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++; - - if (!pGC->miTranslate) { - TRANSLATE_BOX(box, pDraw); - } - TRIM_BOX(box, pGC); - - if (BOX_NOT_EMPTY(box)) { - if (pPriv->preRefresh) - (*pPriv->preRefresh) (pPriv->pScrn, 1, &box); - boxNotEmpty = TRUE; - } - - (*pGC->ops->SetSpans) (pDraw, pGC, pcharsrc, pptInit, - pwidthInit, nspans, fSorted); - - if (boxNotEmpty && pPriv->postRefresh) - (*pPriv->postRefresh) (pPriv->pScrn, 1, &box); - } - else - (*pGC->ops->SetSpans) (pDraw, pGC, pcharsrc, pptInit, - pwidthInit, nspans, fSorted); - - SHADOW_GC_OP_EPILOGUE(pGC); -} - -static void -ShadowPutImage(DrawablePtr pDraw, - GCPtr pGC, - int depth, - int x, int y, int w, int h, - int leftPad, int format, char *pImage) -{ - BoxRec box; - Bool boxNotEmpty = FALSE; + /* paranoia */ + if (pWin != pScreen->root) + ErrorF("ShadowCreateRootWindow called unexpectedly\n"); - SHADOW_GC_OP_PROLOGUE(pGC); + /* 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); - if (IS_VISIBLE(pDraw)) { - box.x1 = x + pDraw->x; - box.x2 = box.x1 + w; - box.y1 = y + pDraw->y; - box.y2 = box.y1 + h; + /* this might look like it leaks, but the damage code reaps listeners + * when their drawable disappears. + */ + if (ret) { + DamagePtr damage; - TRIM_BOX(box, pGC); - if (BOX_NOT_EMPTY(box)) { - if (pPriv->preRefresh) - (*pPriv->preRefresh) (pPriv->pScrn, 1, &box); - boxNotEmpty = TRUE; + if (pPriv->preRefresh) { + damage = DamageCreate(shadowfbReportPre, NULL, + DamageReportRawRegion, + TRUE, pScreen, pPriv); + DamageRegister(&pWin->drawable, damage); } - } - - (*pGC->ops->PutImage) (pDraw, pGC, depth, x, y, w, h, - leftPad, format, pImage); - - if (boxNotEmpty && pPriv->postRefresh) - (*pPriv->postRefresh) (pPriv->pScrn, 1, &box); - - SHADOW_GC_OP_EPILOGUE(pGC); - -} - -static RegionPtr -ShadowCopyArea(DrawablePtr pSrc, - DrawablePtr pDst, - GC * pGC, - int srcx, int srcy, int width, int height, int dstx, int dsty) -{ - RegionPtr ret; - BoxRec box; - Bool boxNotEmpty = FALSE; - - SHADOW_GC_OP_PROLOGUE(pGC); - - if (IS_VISIBLE(pDst)) { - 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)) { - if (pPriv->preRefresh) - (*pPriv->preRefresh) (pPriv->pScrn, 1, &box); - boxNotEmpty = TRUE; + if (pPriv->postRefresh) { + damage = DamageCreate(shadowfbReportPost, NULL, + DamageReportRawRegion, + TRUE, pScreen, pPriv); + DamageSetReportAfterOp(damage, TRUE); + DamageRegister(&pWin->drawable, damage); } } - ret = (*pGC->ops->CopyArea) (pSrc, pDst, - pGC, srcx, srcy, width, height, dstx, dsty); - - if (boxNotEmpty && pPriv->postRefresh) - (*pPriv->postRefresh) (pPriv->pScrn, 1, &box); - - SHADOW_GC_OP_EPILOGUE(pGC); - return ret; } -static RegionPtr -ShadowCopyPlane(DrawablePtr pSrc, - DrawablePtr pDst, - GCPtr pGC, - int srcx, int srcy, - int width, int height, - int dstx, int dsty, unsigned long bitPlane) -{ - RegionPtr ret; - BoxRec box; - Bool boxNotEmpty = FALSE; - - SHADOW_GC_OP_PROLOGUE(pGC); - - if (IS_VISIBLE(pDst)) { - 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)) { - if (pPriv->preRefresh) - (*pPriv->preRefresh) (pPriv->pScrn, 1, &box); - boxNotEmpty = TRUE; - } - } - - ret = (*pGC->ops->CopyPlane) (pSrc, pDst, - pGC, srcx, srcy, width, height, dstx, dsty, - bitPlane); - - if (boxNotEmpty && pPriv->postRefresh) - (*pPriv->postRefresh) (pPriv->pScrn, 1, &box); - - SHADOW_GC_OP_EPILOGUE(pGC); - - return ret; -} - -static void -ShadowPolyPoint(DrawablePtr pDraw, - GCPtr pGC, int mode, int nptInit, xPoint * pptInit) -{ - BoxRec box; - Bool boxNotEmpty = FALSE; - - SHADOW_GC_OP_PROLOGUE(pGC); - - if (IS_VISIBLE(pDraw) && nptInit) { - xPoint *ppt = pptInit; - int npt = nptInit; - - box.x2 = box.x1 = pptInit->x; - box.y2 = box.y1 = pptInit->y; - - /* this could be slow if the points were spread out */ - - while (--npt) { - 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++; - - TRIM_AND_TRANSLATE_BOX(box, pDraw, pGC); - if (BOX_NOT_EMPTY(box)) { - if (pPriv->preRefresh) - (*pPriv->preRefresh) (pPriv->pScrn, 1, &box); - boxNotEmpty = TRUE; - } - } - - (*pGC->ops->PolyPoint) (pDraw, pGC, mode, nptInit, pptInit); - - if (boxNotEmpty && pPriv->postRefresh) - (*pPriv->postRefresh) (pPriv->pScrn, 1, &box); - - SHADOW_GC_OP_EPILOGUE(pGC); -} - -static void -ShadowPolylines(DrawablePtr pDraw, - GCPtr pGC, int mode, int nptInit, DDXPointPtr pptInit) -{ - BoxRec box; - Bool boxNotEmpty = FALSE; - - SHADOW_GC_OP_PROLOGUE(pGC); - - if (IS_VISIBLE(pDraw) && nptInit) { - DDXPointPtr ppt = pptInit; - int npt = nptInit; - 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) { - 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 (--npt) { - 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++; - - if (extra) { - box.x1 -= extra; - box.x2 += extra; - box.y1 -= extra; - box.y2 += extra; - } - - TRIM_AND_TRANSLATE_BOX(box, pDraw, pGC); - if (BOX_NOT_EMPTY(box)) { - if (pPriv->preRefresh) - (*pPriv->preRefresh) (pPriv->pScrn, 1, &box); - boxNotEmpty = TRUE; - } - } - - (*pGC->ops->Polylines) (pDraw, pGC, mode, nptInit, pptInit); - - if (boxNotEmpty && pPriv->postRefresh) - (*pPriv->postRefresh) (pPriv->pScrn, 1, &box); - - SHADOW_GC_OP_EPILOGUE(pGC); -} - -static void -ShadowPolySegment(DrawablePtr pDraw, - GCPtr pGC, int nsegInit, xSegment * pSegInit) -{ - BoxRec box; - Bool boxNotEmpty = FALSE; - - SHADOW_GC_OP_PROLOGUE(pGC); - - if (IS_VISIBLE(pDraw) && nsegInit) { - int extra = pGC->lineWidth; - xSegment *pSeg = pSegInit; - int nseg = nsegInit; - - 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, pDraw, pGC); - if (BOX_NOT_EMPTY(box)) { - if (pPriv->preRefresh) - (*pPriv->preRefresh) (pPriv->pScrn, 1, &box); - boxNotEmpty = TRUE; - } - } - - (*pGC->ops->PolySegment) (pDraw, pGC, nsegInit, pSegInit); - - if (boxNotEmpty && pPriv->postRefresh) - (*pPriv->postRefresh) (pPriv->pScrn, 1, &box); - - SHADOW_GC_OP_EPILOGUE(pGC); -} - -static void -ShadowPolyRectangle(DrawablePtr pDraw, - GCPtr pGC, int nRectsInit, xRectangle *pRectsInit) -{ - BoxRec box; - BoxPtr pBoxInit = NULL; - Bool boxNotEmpty = FALSE; - int num = 0; - - SHADOW_GC_OP_PROLOGUE(pGC); - - if (IS_VISIBLE(pDraw) && nRectsInit) { - xRectangle *pRects = pRectsInit; - int nRects = nRectsInit; - - if (nRects >= 32) { - int extra = pGC->lineWidth >> 1; - - 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; - } - - if (extra) { - box.x1 -= extra; - box.x2 += extra; - box.y1 -= extra; - box.y2 += extra; - } - - box.x2++; - box.y2++; - - TRIM_AND_TRANSLATE_BOX(box, pDraw, pGC); - if (BOX_NOT_EMPTY(box)) { - if (pPriv->preRefresh) - (*pPriv->preRefresh) (pPriv->pScrn, 1, &box); - boxNotEmpty = TRUE; - } - } - else { - BoxPtr pbox; - int offset1, offset2, offset3; - - offset2 = pGC->lineWidth; - if (!offset2) - offset2 = 1; - offset1 = offset2 >> 1; - offset3 = offset2 - offset1; - - pBoxInit = (BoxPtr) malloc(nRects * 4 * sizeof(BoxRec)); - pbox = pBoxInit; - - while (nRects--) { - pbox->x1 = pRects->x - offset1; - pbox->y1 = pRects->y - offset1; - pbox->x2 = pbox->x1 + pRects->width + offset2; - pbox->y2 = pbox->y1 + offset2; - TRIM_AND_TRANSLATE_BOX((*pbox), pDraw, pGC); - if (BOX_NOT_EMPTY((*pbox))) { - num++; - pbox++; - } - - pbox->x1 = pRects->x - offset1; - pbox->y1 = pRects->y + offset3; - pbox->x2 = pbox->x1 + offset2; - pbox->y2 = pbox->y1 + pRects->height - offset2; - TRIM_AND_TRANSLATE_BOX((*pbox), pDraw, pGC); - if (BOX_NOT_EMPTY((*pbox))) { - num++; - pbox++; - } - - pbox->x1 = pRects->x + pRects->width - offset1; - pbox->y1 = pRects->y + offset3; - pbox->x2 = pbox->x1 + offset2; - pbox->y2 = pbox->y1 + pRects->height - offset2; - TRIM_AND_TRANSLATE_BOX((*pbox), pDraw, pGC); - if (BOX_NOT_EMPTY((*pbox))) { - num++; - pbox++; - } - - pbox->x1 = pRects->x - offset1; - pbox->y1 = pRects->y + pRects->height - offset1; - pbox->x2 = pbox->x1 + pRects->width + offset2; - pbox->y2 = pbox->y1 + offset2; - TRIM_AND_TRANSLATE_BOX((*pbox), pDraw, pGC); - if (BOX_NOT_EMPTY((*pbox))) { - num++; - pbox++; - } - - pRects++; - } - - if (num) { - if (pPriv->preRefresh) - (*pPriv->preRefresh) (pPriv->pScrn, num, pBoxInit); - } - else { - free(pBoxInit); - } - } - } - - (*pGC->ops->PolyRectangle) (pDraw, pGC, nRectsInit, pRectsInit); - - if (boxNotEmpty && pPriv->postRefresh) { - (*pPriv->postRefresh) (pPriv->pScrn, 1, &box); - } - else if (num) { - if (pPriv->postRefresh) - (*pPriv->postRefresh) (pPriv->pScrn, num, pBoxInit); - free(pBoxInit); - } - - SHADOW_GC_OP_EPILOGUE(pGC); - -} - -static void -ShadowPolyArc(DrawablePtr pDraw, GCPtr pGC, int narcsInit, xArc * parcsInit) -{ - BoxRec box; - Bool boxNotEmpty = FALSE; - - SHADOW_GC_OP_PROLOGUE(pGC); - - if (IS_VISIBLE(pDraw) && narcsInit) { - int narcs = narcsInit; - xArc *parcs = parcsInit; - int extra = pGC->lineWidth >> 1; - - 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, pDraw, pGC); - if (BOX_NOT_EMPTY(box)) { - if (pPriv->preRefresh) - (*pPriv->preRefresh) (pPriv->pScrn, 1, &box); - boxNotEmpty = TRUE; - } - } - - (*pGC->ops->PolyArc) (pDraw, pGC, narcsInit, parcsInit); - - if (boxNotEmpty && pPriv->postRefresh) - (*pPriv->postRefresh) (pPriv->pScrn, 1, &box); - - SHADOW_GC_OP_EPILOGUE(pGC); - -} - -static void -ShadowFillPolygon(DrawablePtr pDraw, - GCPtr pGC, - int shape, int mode, int count, DDXPointPtr pptInit) -{ - SHADOW_GC_OP_PROLOGUE(pGC); - - if (IS_VISIBLE(pDraw) && (count > 2)) { - DDXPointPtr ppt = pptInit; - int i = count; - BoxRec box; - Bool boxNotEmpty = FALSE; - - 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++; - - TRIM_AND_TRANSLATE_BOX(box, pDraw, pGC); - if (BOX_NOT_EMPTY(box)) { - if (pPriv->preRefresh) - (*pPriv->preRefresh) (pPriv->pScrn, 1, &box); - boxNotEmpty = TRUE; - } - - (*pGC->ops->FillPolygon) (pDraw, pGC, shape, mode, count, pptInit); - - if (boxNotEmpty && pPriv->postRefresh) - (*pPriv->postRefresh) (pPriv->pScrn, 1, &box); - } - else - (*pGC->ops->FillPolygon) (pDraw, pGC, shape, mode, count, pptInit); - - SHADOW_GC_OP_EPILOGUE(pGC); -} - -static void -ShadowPolyFillRect(DrawablePtr pDraw, - GCPtr pGC, int nRectsInit, xRectangle *pRectsInit) -{ - SHADOW_GC_OP_PROLOGUE(pGC); - - if (IS_VISIBLE(pDraw) && nRectsInit) { - BoxRec box; - Bool boxNotEmpty = FALSE; - 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; - } - - /* cfb messes with the pRectsInit so we have to do our - calculations first */ - - TRIM_AND_TRANSLATE_BOX(box, pDraw, pGC); - if (BOX_NOT_EMPTY(box)) { - if (pPriv->preRefresh) - (*pPriv->preRefresh) (pPriv->pScrn, 1, &box); - boxNotEmpty = TRUE; - } - - (*pGC->ops->PolyFillRect) (pDraw, pGC, nRectsInit, pRectsInit); - - if (boxNotEmpty && pPriv->postRefresh) - (*pPriv->postRefresh) (pPriv->pScrn, 1, &box); - } - else - (*pGC->ops->PolyFillRect) (pDraw, pGC, nRectsInit, pRectsInit); - - SHADOW_GC_OP_EPILOGUE(pGC); -} - -static void -ShadowPolyFillArc(DrawablePtr pDraw, GCPtr pGC, int narcsInit, xArc * parcsInit) -{ - BoxRec box; - Bool boxNotEmpty = FALSE; - - SHADOW_GC_OP_PROLOGUE(pGC); - - if (IS_VISIBLE(pDraw) && narcsInit) { - xArc *parcs = parcsInit; - int narcs = narcsInit; - - 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; - } - - TRIM_AND_TRANSLATE_BOX(box, pDraw, pGC); - if (BOX_NOT_EMPTY(box)) { - if (pPriv->preRefresh) - (*pPriv->preRefresh) (pPriv->pScrn, 1, &box); - boxNotEmpty = TRUE; - } - } - - (*pGC->ops->PolyFillArc) (pDraw, pGC, narcsInit, parcsInit); - - if (boxNotEmpty && pPriv->postRefresh) - (*pPriv->postRefresh) (pPriv->pScrn, 1, &box); - - SHADOW_GC_OP_EPILOGUE(pGC); -} - -static void -ShadowTextExtent(FontPtr pFont, int count, char *chars, - FontEncoding fontEncoding, BoxPtr box) -{ - unsigned long n, i; - int w; - CharInfoPtr charinfo[255]; /* encoding only has 1 byte for count */ - - GetGlyphs(pFont, (unsigned long) count, (unsigned char *) chars, - fontEncoding, &n, charinfo); - w = 0; - for (i = 0; i < n; i++) { - w += charinfo[i]->metrics.characterWidth; - } - if (i) { - w += charinfo[i - 1]->metrics.rightSideBearing; - } - - box->x1 = 0; - if (n) { - if (charinfo[0]->metrics.leftSideBearing < 0) { - box->x1 = charinfo[0]->metrics.leftSideBearing; - } - } - box->x2 = w; - box->y1 = -FONTMAXBOUNDS(pFont, ascent); - box->y2 = FONTMAXBOUNDS(pFont, descent); -} - -static void -ShadowFontToBox(BoxPtr BB, DrawablePtr pDrawable, GCPtr pGC, int x, int y, - int count, char *chars, int wide) -{ - FontPtr pFont; - - pFont = pGC->font; - if (pFont->info.constantWidth) { - int ascent, descent, left, right = 0; - - ascent = max(pFont->info.fontAscent, pFont->info.maxbounds.ascent); - descent = max(pFont->info.fontDescent, pFont->info.maxbounds.descent); - left = pFont->info.maxbounds.leftSideBearing; - if (count > 0) { - right = (count - 1) * pFont->info.maxbounds.characterWidth; - } - right += pFont->info.maxbounds.rightSideBearing; - BB->x1 = - max(pDrawable->x + x - left, - RegionExtents(&((WindowPtr) pDrawable)->winSize)->x1); - BB->y1 = - max(pDrawable->y + y - ascent, - RegionExtents(&((WindowPtr) pDrawable)->winSize)->y1); - BB->x2 = - min(pDrawable->x + x + right, - RegionExtents(&((WindowPtr) pDrawable)->winSize)->x2); - BB->y2 = - min(pDrawable->y + y + descent, - RegionExtents(&((WindowPtr) pDrawable)->winSize)->y2); - } - else { - ShadowTextExtent(pFont, count, chars, wide ? (FONTLASTROW(pFont) == 0) - ? Linear16Bit : TwoD16Bit : Linear8Bit, BB); - BB->x1 = - max(pDrawable->x + x + BB->x1, - RegionExtents(&((WindowPtr) pDrawable)->winSize)->x1); - BB->y1 = - max(pDrawable->y + y + BB->y1, - RegionExtents(&((WindowPtr) pDrawable)->winSize)->y1); - BB->x2 = - min(pDrawable->x + x + BB->x2, - RegionExtents(&((WindowPtr) pDrawable)->winSize)->x2); - BB->y2 = - min(pDrawable->y + y + BB->y2, - RegionExtents(&((WindowPtr) pDrawable)->winSize)->y2); - } -} - -static int -ShadowPolyText8(DrawablePtr pDraw, - GCPtr pGC, int x, int y, int count, char *chars) -{ - int width; - BoxRec box; - Bool boxNotEmpty = FALSE; - - SHADOW_GC_OP_PROLOGUE(pGC); - - if (IS_VISIBLE(pDraw)) { - ShadowFontToBox(&box, pDraw, pGC, x, y, count, chars, 0); - - TRIM_BOX(box, pGC); - if (BOX_NOT_EMPTY(box)) { - if (pPriv->preRefresh) - (*pPriv->preRefresh) (pPriv->pScrn, 1, &box); - boxNotEmpty = TRUE; - } - } - - width = (*pGC->ops->PolyText8) (pDraw, pGC, x, y, count, chars); - - if (boxNotEmpty && pPriv->postRefresh) - (*pPriv->postRefresh) (pPriv->pScrn, 1, &box); - - SHADOW_GC_OP_EPILOGUE(pGC); - - return width; -} - -static int -ShadowPolyText16(DrawablePtr pDraw, - GCPtr pGC, int x, int y, int count, unsigned short *chars) -{ - int width; - BoxRec box; - Bool boxNotEmpty = FALSE; - - SHADOW_GC_OP_PROLOGUE(pGC); - - if (IS_VISIBLE(pDraw)) { - ShadowFontToBox(&box, pDraw, pGC, x, y, count, (char *) chars, 1); - - TRIM_BOX(box, pGC); - if (BOX_NOT_EMPTY(box)) { - if (pPriv->preRefresh) - (*pPriv->preRefresh) (pPriv->pScrn, 1, &box); - boxNotEmpty = TRUE; - } - } - - width = (*pGC->ops->PolyText16) (pDraw, pGC, x, y, count, chars); - - if (boxNotEmpty && pPriv->postRefresh) - (*pPriv->postRefresh) (pPriv->pScrn, 1, &box); - - SHADOW_GC_OP_EPILOGUE(pGC); - - return width; -} - -static void -ShadowImageText8(DrawablePtr pDraw, - GCPtr pGC, int x, int y, int count, char *chars) -{ - BoxRec box; - Bool boxNotEmpty = FALSE; - - SHADOW_GC_OP_PROLOGUE(pGC); - - if (IS_VISIBLE(pDraw) && count) { - int top, bot, Min, Max; - - 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 = pDraw->x + x + Min + FONTMINBOUNDS(pGC->font, leftSideBearing); - box.x2 = pDraw->x + x + Max + - FONTMAXBOUNDS(pGC->font, rightSideBearing); - - box.y1 = pDraw->y + y - top; - box.y2 = pDraw->y + y + bot; - - TRIM_BOX(box, pGC); - if (BOX_NOT_EMPTY(box)) { - if (pPriv->preRefresh) - (*pPriv->preRefresh) (pPriv->pScrn, 1, &box); - boxNotEmpty = TRUE; - } - } - - (*pGC->ops->ImageText8) (pDraw, pGC, x, y, count, chars); - - if (boxNotEmpty && pPriv->postRefresh) - (*pPriv->postRefresh) (pPriv->pScrn, 1, &box); - - SHADOW_GC_OP_EPILOGUE(pGC); -} - -static void -ShadowImageText16(DrawablePtr pDraw, - GCPtr pGC, int x, int y, int count, unsigned short *chars) -{ - BoxRec box; - Bool boxNotEmpty = FALSE; - - SHADOW_GC_OP_PROLOGUE(pGC); - - if (IS_VISIBLE(pDraw) && count) { - int top, bot, Min, Max; - - 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 = pDraw->x + x + Min + FONTMINBOUNDS(pGC->font, leftSideBearing); - box.x2 = pDraw->x + x + Max + - FONTMAXBOUNDS(pGC->font, rightSideBearing); - - box.y1 = pDraw->y + y - top; - box.y2 = pDraw->y + y + bot; - - TRIM_BOX(box, pGC); - if (BOX_NOT_EMPTY(box)) { - if (pPriv->preRefresh) - (*pPriv->preRefresh) (pPriv->pScrn, 1, &box); - boxNotEmpty = TRUE; - } - } - - (*pGC->ops->ImageText16) (pDraw, pGC, x, y, count, chars); - - if (boxNotEmpty && pPriv->postRefresh) - (*pPriv->postRefresh) (pPriv->pScrn, 1, &box); - - SHADOW_GC_OP_EPILOGUE(pGC); -} - -static void -ShadowImageGlyphBlt(DrawablePtr pDraw, - GCPtr pGC, - int x, int y, - unsigned int nglyphInit, - CharInfoPtr * ppciInit, pointer pglyphBase) -{ - BoxRec box; - Bool boxNotEmpty = FALSE; - - SHADOW_GC_OP_PROLOGUE(pGC); - - if (IS_VISIBLE(pDraw) && nglyphInit) { - CharInfoPtr *ppci = ppciInit; - unsigned int nglyph = nglyphInit; - int top, bot, width = 0; - - 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 += pDraw->x + x; - box.x1 += pDraw->x + x; - - while (nglyph--) { - width += (*ppci)->metrics.characterWidth; - ppci++; - } - - if (width > 0) - box.x2 += width; - else - box.x1 += width; - - box.y1 = pDraw->y + y - top; - box.y2 = pDraw->y + y + bot; - - TRIM_BOX(box, pGC); - if (BOX_NOT_EMPTY(box)) { - if (pPriv->preRefresh) - (*pPriv->preRefresh) (pPriv->pScrn, 1, &box); - boxNotEmpty = TRUE; - } - } - - (*pGC->ops->ImageGlyphBlt) (pDraw, pGC, x, y, nglyphInit, - ppciInit, pglyphBase); - - if (boxNotEmpty && pPriv->postRefresh) - (*pPriv->postRefresh) (pPriv->pScrn, 1, &box); - - SHADOW_GC_OP_EPILOGUE(pGC); -} - -static void -ShadowPolyGlyphBlt(DrawablePtr pDraw, - GCPtr pGC, - int x, int y, - unsigned int nglyphInit, - CharInfoPtr * ppciInit, pointer pglyphBase) -{ - BoxRec box; - Bool boxNotEmpty = FALSE; - - SHADOW_GC_OP_PROLOGUE(pGC); - - if (IS_VISIBLE(pDraw) && nglyphInit) { - CharInfoPtr *ppci = ppciInit; - unsigned int nglyph = nglyphInit; - - /* ugh */ - box.x1 = pDraw->x + x + ppci[0]->metrics.leftSideBearing; - box.x2 = pDraw->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 = pDraw->y + y - FONTMAXBOUNDS(pGC->font, ascent); - box.y2 = pDraw->y + y + FONTMAXBOUNDS(pGC->font, descent); - - TRIM_BOX(box, pGC); - if (BOX_NOT_EMPTY(box)) { - if (pPriv->preRefresh) - (*pPriv->preRefresh) (pPriv->pScrn, 1, &box); - boxNotEmpty = TRUE; - } - } - - (*pGC->ops->PolyGlyphBlt) (pDraw, pGC, x, y, nglyphInit, - ppciInit, pglyphBase); - - if (boxNotEmpty && pPriv->postRefresh) - (*pPriv->postRefresh) (pPriv->pScrn, 1, &box); - - SHADOW_GC_OP_EPILOGUE(pGC); -} - -static void -ShadowPushPixels(GCPtr pGC, - PixmapPtr pBitMap, - DrawablePtr pDraw, int dx, int dy, int xOrg, int yOrg) +static Bool +ShadowCloseScreen(ScreenPtr pScreen) { - BoxRec box; - Bool boxNotEmpty = FALSE; - - SHADOW_GC_OP_PROLOGUE(pGC); - - if (IS_VISIBLE(pDraw)) { - box.x1 = xOrg; - box.y1 = yOrg; - - if (!pGC->miTranslate) { - box.x1 += pDraw->x; - box.y1 += pDraw->y; - } + ShadowScreenPtr pPriv = shadowfbGetScreenPrivate(pScreen); - box.x2 = box.x1 + dx; - box.y2 = box.y1 + dy; - - TRIM_BOX(box, pGC); - if (BOX_NOT_EMPTY(box)) { - if (pPriv->preRefresh) - (*pPriv->preRefresh) (pPriv->pScrn, 1, &box); - boxNotEmpty = TRUE; - } - } - - (*pGC->ops->PushPixels) (pGC, pBitMap, pDraw, dx, dy, xOrg, yOrg); + pScreen->CloseScreen = pPriv->CloseScreen; - if (boxNotEmpty && pPriv->postRefresh) - (*pPriv->postRefresh) (pPriv->pScrn, 1, &box); + free(pPriv); - SHADOW_GC_OP_EPILOGUE(pGC); + return (*pScreen->CloseScreen) (pScreen); } - -GCOps ShadowGCOps = { - ShadowFillSpans, ShadowSetSpans, - ShadowPutImage, ShadowCopyArea, - ShadowCopyPlane, ShadowPolyPoint, - ShadowPolylines, ShadowPolySegment, - ShadowPolyRectangle, ShadowPolyArc, - ShadowFillPolygon, ShadowPolyFillRect, - ShadowPolyFillArc, ShadowPolyText8, - ShadowPolyText16, ShadowImageText8, - ShadowImageText16, ShadowImageGlyphBlt, - ShadowPolyGlyphBlt, ShadowPushPixels, -}; diff --git a/xserver/hw/xfree86/utils/Makefile.in b/xserver/hw/xfree86/utils/Makefile.in index ed94baa8e..7e8c7d22b 100644 --- a/xserver/hw/xfree86/utils/Makefile.in +++ b/xserver/hw/xfree86/utils/Makefile.in @@ -168,6 +168,8 @@ 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@ @@ -212,6 +214,10 @@ 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@ @@ -314,7 +320,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -323,6 +332,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -389,6 +399,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/xfree86/utils/cvt/Makefile.in b/xserver/hw/xfree86/utils/cvt/Makefile.in index 29be15fb0..27bf6d9b8 100644 --- a/xserver/hw/xfree86/utils/cvt/Makefile.in +++ b/xserver/hw/xfree86/utils/cvt/Makefile.in @@ -190,6 +190,8 @@ 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@ @@ -234,6 +236,10 @@ 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@ @@ -336,7 +342,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -345,6 +354,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -411,6 +421,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/xfree86/utils/cvt/cvt.c b/xserver/hw/xfree86/utils/cvt/cvt.c index 5e2888e94..d5df17fd9 100644 --- a/xserver/hw/xfree86/utils/cvt/cvt.c +++ b/xserver/hw/xfree86/utils/cvt/cvt.c @@ -39,10 +39,10 @@ FatalError(const char *f, ...) } /* xnfalloc implementation used by the server code we built in */ -pointer +void * XNFalloc(unsigned long n) { - pointer r; + void *r; r = malloc(n); if (!r) { @@ -53,10 +53,10 @@ XNFalloc(unsigned long n) } /* xnfcalloc implementation used by the server code we built in */ -pointer +void * XNFcalloc(unsigned long n) { - pointer r; + void *r; r = calloc(1, n); if (!r) { diff --git a/xserver/hw/xfree86/utils/gtf/Makefile.in b/xserver/hw/xfree86/utils/gtf/Makefile.in index 4d2204b9a..fb3b898e4 100644 --- a/xserver/hw/xfree86/utils/gtf/Makefile.in +++ b/xserver/hw/xfree86/utils/gtf/Makefile.in @@ -189,6 +189,8 @@ 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@ @@ -233,6 +235,10 @@ 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@ @@ -335,7 +341,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -344,6 +353,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -410,6 +420,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/xfree86/utils/man/Makefile.in b/xserver/hw/xfree86/utils/man/Makefile.in index fdb4f6b0b..0c0450636 100644 --- a/xserver/hw/xfree86/utils/man/Makefile.in +++ b/xserver/hw/xfree86/utils/man/Makefile.in @@ -160,6 +160,8 @@ 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@ @@ -204,6 +206,10 @@ 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@ @@ -268,6 +274,7 @@ MAN_SUBSTS = @MAN_SUBSTS@ -e 's|__logdir__|$(logdir)|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@ @@ -322,7 +329,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -331,6 +341,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -397,6 +408,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/xfree86/vbe/Makefile.in b/xserver/hw/xfree86/vbe/Makefile.in index 040bf0b26..8ad9996e2 100644 --- a/xserver/hw/xfree86/vbe/Makefile.in +++ b/xserver/hw/xfree86/vbe/Makefile.in @@ -195,6 +195,8 @@ 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@ @@ -239,6 +241,10 @@ 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@ @@ -341,7 +347,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -350,6 +359,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -416,6 +426,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/xfree86/vbe/vbe.c b/xserver/hw/xfree86/vbe/vbe.c index 39f0cefb6..d41e61ba8 100644 --- a/xserver/hw/xfree86/vbe/vbe.c +++ b/xserver/hw/xfree86/vbe/vbe.c @@ -50,7 +50,7 @@ vbeInfoPtr VBEExtendedInit(xf86Int10InfoPtr pInt, int entityIndex, int Flags) { int RealOff; - pointer page = NULL; + void *page = NULL; ScrnInfoPtr pScrn = xf86FindScreenForEntity(entityIndex); vbeControllerInfoPtr vbe = NULL; Bool init_int10 = FALSE; @@ -259,7 +259,7 @@ static unsigned char * vbeReadEDID(vbeInfoPtr pVbe) { int RealOff = pVbe->real_mode_base; - pointer page = pVbe->memory; + void *page = pVbe->memory; unsigned char *tmp = NULL; Bool novbe = FALSE; Bool noddc = FALSE; @@ -319,7 +319,7 @@ vbeReadEDID(vbeInfoPtr pVbe) } xf86MonPtr -vbeDoEDID(vbeInfoPtr pVbe, pointer unused) +vbeDoEDID(vbeInfoPtr pVbe, void *unused) { unsigned char *DDC_data = NULL; @@ -545,7 +545,7 @@ VBEFreeModeInfo(VbeModeInfoBlock * block) Bool VBESaveRestore(vbeInfoPtr pVbe, vbeSaveRestoreFunction function, - pointer *memory, int *size, int *real_mode_pages) + void **memory, int *size, int *real_mode_pages) { /* Input: @@ -929,7 +929,7 @@ VBEVesaSaveRestore(vbeInfoPtr pVbe, vbeSaveRestorePtr vbe_sr, memcpy(vbe_sr->state, vbe_sr->pstate, vbe_sr->stateSize); ErrorF("VBESaveRestore\n"); if ((VBESaveRestore(pVbe, function, - (pointer) &vbe_sr->state, + (void *) &vbe_sr->state, &vbe_sr->stateSize, &vbe_sr->statePage))) { if (function == MODE_SAVE) { SaveSucc = TRUE; @@ -1055,7 +1055,7 @@ struct vbePanelID * VBEReadPanelID(vbeInfoPtr pVbe) { int RealOff = pVbe->real_mode_base; - pointer page = pVbe->memory; + void *page = pVbe->memory; void *tmp = NULL; int screen = pVbe->pInt10->pScrn->scrnIndex; diff --git a/xserver/hw/xfree86/vbe/vbe.h b/xserver/hw/xfree86/vbe/vbe.h index 3907c53f3..bc3653334 100644 --- a/xserver/hw/xfree86/vbe/vbe.h +++ b/xserver/hw/xfree86/vbe/vbe.h @@ -25,7 +25,7 @@ typedef enum { typedef struct { xf86Int10InfoPtr pInt10; int version; - pointer memory; + void *memory; int real_mode_base; int num_pages; Bool init_int10; @@ -40,7 +40,7 @@ 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, pointer pDDCModule); +extern _X_EXPORT xf86MonPtr vbeDoEDID(vbeInfoPtr pVbe, void *pDDCModule); #pragma pack(1) @@ -227,7 +227,7 @@ typedef enum { extern _X_EXPORT Bool VBESaveRestore(vbeInfoPtr pVbe, vbeSaveRestoreFunction fuction, - pointer *memory, int *size, int *real_mode_pages); + void **memory, int *size, int *real_mode_pages); /* * INT 5 diff --git a/xserver/hw/xfree86/vbe/vbeModes.c b/xserver/hw/xfree86/vbe/vbeModes.c index 415167d0e..50ac50d2c 100644 --- a/xserver/hw/xfree86/vbe/vbeModes.c +++ b/xserver/hw/xfree86/vbe/vbeModes.c @@ -356,8 +356,10 @@ VBESetModeNames(DisplayModePtr pMode) pMode->name = strdup("BADMODE"); } else { - XNFasprintf(&pMode->name, "%dx%d", + char *tmp; + XNFasprintf(&tmp, "%dx%d", pMode->HDisplay, pMode->VDisplay); + pMode->name = tmp; } } pMode = pMode->next; @@ -433,7 +435,7 @@ VBESetModeParameters(ScrnInfoPtr pScrn, vbeInfoPtr pVbe) */ int VBEValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes, - char **modeNames, ClockRangePtr clockRanges, + 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) diff --git a/xserver/hw/xfree86/vbe/vbeModes.h b/xserver/hw/xfree86/vbe/vbeModes.h index affd5b639..ee0257c15 100644 --- a/xserver/hw/xfree86/vbe/vbeModes.h +++ b/xserver/hw/xfree86/vbe/vbeModes.h @@ -82,7 +82,7 @@ extern _X_EXPORT void VBESetModeParameters(ScrnInfoPtr pScrn, vbeInfoPtr pVbe); */ extern _X_EXPORT int VBEValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes, - char **modeNames, + const char **modeNames, ClockRangePtr clockRanges, int *linePitches, int minPitch, int maxPitch, int pitchInc, int minHeight, diff --git a/xserver/hw/xfree86/vgahw/Makefile.am b/xserver/hw/xfree86/vgahw/Makefile.am index f0b65740c..4b718b489 100644 --- a/xserver/hw/xfree86/vgahw/Makefile.am +++ b/xserver/hw/xfree86/vgahw/Makefile.am @@ -1,5 +1,6 @@ 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) diff --git a/xserver/hw/xfree86/vgahw/Makefile.in b/xserver/hw/xfree86/vgahw/Makefile.in index b53750d05..ec4aa6507 100644 --- a/xserver/hw/xfree86/vgahw/Makefile.in +++ b/xserver/hw/xfree86/vgahw/Makefile.in @@ -102,7 +102,8 @@ am__uninstall_files_from_dir = { \ } am__installdirs = "$(DESTDIR)$(moduledir)" "$(DESTDIR)$(sdkdir)" LTLIBRARIES = $(module_LTLIBRARIES) -libvgahw_la_LIBADD = +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@) @@ -195,6 +196,8 @@ 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@ @@ -239,6 +242,10 @@ 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@ @@ -341,7 +348,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -350,6 +360,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -416,6 +427,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ @@ -490,6 +505,7 @@ 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) diff --git a/xserver/hw/xfree86/vgahw/vgaCmap.c b/xserver/hw/xfree86/vgahw/vgaCmap.c index e7a0d023e..6e028a7f5 100644 --- a/xserver/hw/xfree86/vgahw/vgaCmap.c +++ b/xserver/hw/xfree86/vgahw/vgaCmap.c @@ -252,7 +252,7 @@ ColormapPtr pmap; if (pmap != GetInstalledmiColormap(pmap->pScreen)) return; - dixLookupResourceByType((pointer *) &defColormap, + dixLookupResourceByType((void **) &defColormap, pmap->pScreen->defColormap, RT_COLORMAP, serverClient, DixInstallAccess); diff --git a/xserver/hw/xfree86/vgahw/vgaHW.h b/xserver/hw/xfree86/vgahw/vgaHW.h index 937a8a507..63a10f42b 100644 --- a/xserver/hw/xfree86/vgahw/vgaHW.h +++ b/xserver/hw/xfree86/vgahw/vgaHW.h @@ -107,18 +107,18 @@ typedef void (*vgaHWMiscProcPtr) (vgaHWPtr hwp); * via the first 17 attribute registers and not the main 8-bit palette. */ typedef struct _vgaHWRec { - pointer Base; /* Address of "VGA" memory */ + 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 */ - pointer FontInfo1; /* save area for fonts in + void *FontInfo1; /* save area for fonts in plane 2 */ - pointer FontInfo2; /* save area for fonts in + void *FontInfo2; /* save area for fonts in plane 3 */ - pointer TextInfo; /* save area for text */ + void *TextInfo; /* save area for text */ vgaRegRec SavedReg; /* saved registers */ vgaRegRec ModeReg; /* register settings for current mode */ @@ -148,7 +148,7 @@ typedef struct _vgaHWRec { vgaHWWriteProcPtr writeDacReadAddr; vgaHWWriteProcPtr writeDacData; vgaHWReadProcPtr readDacData; - pointer ddc; + void *ddc; struct pci_io_handle *io; vgaHWReadProcPtr readEnable; vgaHWWriteProcPtr writeEnable; diff --git a/xserver/hw/xfree86/x86emu/Makefile.in b/xserver/hw/xfree86/x86emu/Makefile.in index 7f53eac65..4fd8b37ec 100644 --- a/xserver/hw/xfree86/x86emu/Makefile.in +++ b/xserver/hw/xfree86/x86emu/Makefile.in @@ -164,6 +164,8 @@ 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@ @@ -208,6 +210,10 @@ 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@ @@ -310,7 +316,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -319,6 +328,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -385,6 +395,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/xfree86/x86emu/ops.c b/xserver/hw/xfree86/x86emu/ops.c index 76b83581f..b50badb28 100644 --- a/xserver/hw/xfree86/x86emu/ops.c +++ b/xserver/hw/xfree86/x86emu/ops.c @@ -10189,8 +10189,8 @@ Handles opcode 0xe8 static void x86emuOp_call_near_IMM(u8 X86EMU_UNUSED(op1)) { - s16 ip16; - s32 ip32; + s16 ip16 = 0; + s32 ip32 = 0; START_OF_INSTR(); DECODE_PRINTF("CALL\t"); @@ -11705,38 +11705,38 @@ x86emuOp_opcFF_word_RM(u8 X86EMU_UNUSED(op1)) switch (rh) { case 0: /* inc word ptr ... */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { - u32 destval; + u32 destval32; - destval = fetch_data_long(destoffset); + destval32 = fetch_data_long(destoffset); TRACE_AND_STEP(); - destval = inc_long(destval); - store_data_long(destoffset, destval); + destval32 = inc_long(destval32); + store_data_long(destoffset, destval32); } else { - u16 destval; + u16 destval16; - destval = fetch_data_word(destoffset); + destval16 = fetch_data_word(destoffset); TRACE_AND_STEP(); - destval = inc_word(destval); - store_data_word(destoffset, destval); + destval16 = inc_word(destval16); + store_data_word(destoffset, destval16); } break; case 1: /* dec word ptr ... */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { - u32 destval; + u32 destval32; - destval = fetch_data_long(destoffset); + destval32 = fetch_data_long(destoffset); TRACE_AND_STEP(); - destval = dec_long(destval); - store_data_long(destoffset, destval); + destval32 = dec_long(destval32); + store_data_long(destoffset, destval32); } else { - u16 destval; + u16 destval16; - destval = fetch_data_word(destoffset); + destval16 = fetch_data_word(destoffset); TRACE_AND_STEP(); - destval = dec_word(destval); - store_data_word(destoffset, destval); + destval16 = dec_word(destval16); + store_data_word(destoffset, destval16); } break; case 2: /* call word ptr ... */ @@ -11768,18 +11768,18 @@ x86emuOp_opcFF_word_RM(u8 X86EMU_UNUSED(op1)) break; case 6: /* push word ptr ... */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { - u32 destval; + u32 destval32; - destval = fetch_data_long(destoffset); + destval32 = fetch_data_long(destoffset); TRACE_AND_STEP(); - push_long(destval); + push_long(destval32); } else { - u16 destval; + u16 destval16; - destval = fetch_data_word(destoffset); + destval16 = fetch_data_word(destoffset); TRACE_AND_STEP(); - push_word(destval); + push_word(destval16); } break; } @@ -11790,38 +11790,38 @@ x86emuOp_opcFF_word_RM(u8 X86EMU_UNUSED(op1)) switch (rh) { case 0: if (M.x86.mode & SYSMODE_PREFIX_DATA) { - u32 destval; + u32 destval32; - destval = fetch_data_long(destoffset); + destval32 = fetch_data_long(destoffset); TRACE_AND_STEP(); - destval = inc_long(destval); - store_data_long(destoffset, destval); + destval32 = inc_long(destval32); + store_data_long(destoffset, destval32); } else { - u16 destval; + u16 destval16; - destval = fetch_data_word(destoffset); + destval16 = fetch_data_word(destoffset); TRACE_AND_STEP(); - destval = inc_word(destval); - store_data_word(destoffset, destval); + destval16 = inc_word(destval16); + store_data_word(destoffset, destval16); } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_DATA) { - u32 destval; + u32 destval32; - destval = fetch_data_long(destoffset); + destval32 = fetch_data_long(destoffset); TRACE_AND_STEP(); - destval = dec_long(destval); - store_data_long(destoffset, destval); + destval32 = dec_long(destval32); + store_data_long(destoffset, destval32); } else { - u16 destval; + u16 destval16; - destval = fetch_data_word(destoffset); + destval16 = fetch_data_word(destoffset); TRACE_AND_STEP(); - destval = dec_word(destval); - store_data_word(destoffset, destval); + destval16 = dec_word(destval16); + store_data_word(destoffset, destval16); } break; case 2: /* call word ptr ... */ @@ -11853,18 +11853,18 @@ x86emuOp_opcFF_word_RM(u8 X86EMU_UNUSED(op1)) break; case 6: /* push word ptr ... */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { - u32 destval; + u32 destval32; - destval = fetch_data_long(destoffset); + destval32 = fetch_data_long(destoffset); TRACE_AND_STEP(); - push_long(destval); + push_long(destval32); } else { - u16 destval; + u16 destval16; - destval = fetch_data_word(destoffset); + destval16 = fetch_data_word(destoffset); TRACE_AND_STEP(); - push_word(destval); + push_word(destval16); } break; } @@ -11875,38 +11875,38 @@ x86emuOp_opcFF_word_RM(u8 X86EMU_UNUSED(op1)) switch (rh) { case 0: if (M.x86.mode & SYSMODE_PREFIX_DATA) { - u32 destval; + u32 destval32; - destval = fetch_data_long(destoffset); + destval32 = fetch_data_long(destoffset); TRACE_AND_STEP(); - destval = inc_long(destval); - store_data_long(destoffset, destval); + destval32 = inc_long(destval32); + store_data_long(destoffset, destval32); } else { - u16 destval; + u16 destval16; - destval = fetch_data_word(destoffset); + destval16 = fetch_data_word(destoffset); TRACE_AND_STEP(); - destval = inc_word(destval); - store_data_word(destoffset, destval); + destval16 = inc_word(destval16); + store_data_word(destoffset, destval16); } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_DATA) { - u32 destval; + u32 destval32; - destval = fetch_data_long(destoffset); + destval32 = fetch_data_long(destoffset); TRACE_AND_STEP(); - destval = dec_long(destval); - store_data_long(destoffset, destval); + destval32 = dec_long(destval32); + store_data_long(destoffset, destval32); } else { - u16 destval; + u16 destval16; - destval = fetch_data_word(destoffset); + destval16 = fetch_data_word(destoffset); TRACE_AND_STEP(); - destval = dec_word(destval); - store_data_word(destoffset, destval); + destval16 = dec_word(destval16); + store_data_word(destoffset, destval16); } break; case 2: /* call word ptr ... */ @@ -11938,18 +11938,18 @@ x86emuOp_opcFF_word_RM(u8 X86EMU_UNUSED(op1)) break; case 6: /* push word ptr ... */ if (M.x86.mode & SYSMODE_PREFIX_DATA) { - u32 destval; + u32 destval32; - destval = fetch_data_long(destoffset); + destval32 = fetch_data_long(destoffset); TRACE_AND_STEP(); - push_long(destval); + push_long(destval32); } else { - u16 destval; + u16 destval16; - destval = fetch_data_word(destoffset); + destval16 = fetch_data_word(destoffset); TRACE_AND_STEP(); - push_word(destval); + push_word(destval16); } break; } @@ -11958,38 +11958,38 @@ x86emuOp_opcFF_word_RM(u8 X86EMU_UNUSED(op1)) switch (rh) { case 0: if (M.x86.mode & SYSMODE_PREFIX_DATA) { - u32 *destreg; + u32 *destreg32; - destreg = DECODE_RM_LONG_REGISTER(rl); + destreg32 = DECODE_RM_LONG_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); - *destreg = inc_long(*destreg); + *destreg32 = inc_long(*destreg32); } else { - u16 *destreg; + u16 *destreg16; - destreg = DECODE_RM_WORD_REGISTER(rl); + destreg16 = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); - *destreg = inc_word(*destreg); + *destreg16 = inc_word(*destreg16); } break; case 1: if (M.x86.mode & SYSMODE_PREFIX_DATA) { - u32 *destreg; + u32 *destreg32; - destreg = DECODE_RM_LONG_REGISTER(rl); + destreg32 = DECODE_RM_LONG_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); - *destreg = dec_long(*destreg); + *destreg32 = dec_long(*destreg32); } else { - u16 *destreg; + u16 *destreg16; - destreg = DECODE_RM_WORD_REGISTER(rl); + destreg16 = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); - *destreg = dec_word(*destreg); + *destreg16 = dec_word(*destreg16); } break; case 2: /* call word ptr ... */ @@ -12018,20 +12018,20 @@ x86emuOp_opcFF_word_RM(u8 X86EMU_UNUSED(op1)) break; case 6: if (M.x86.mode & SYSMODE_PREFIX_DATA) { - u32 *destreg; + u32 *destreg32; - destreg = DECODE_RM_LONG_REGISTER(rl); + destreg32 = DECODE_RM_LONG_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); - push_long(*destreg); + push_long(*destreg32); } else { - u16 *destreg; + u16 *destreg16; - destreg = DECODE_RM_WORD_REGISTER(rl); + destreg16 = DECODE_RM_WORD_REGISTER(rl); DECODE_PRINTF("\n"); TRACE_AND_STEP(); - push_word(*destreg); + push_word(*destreg16); } break; } diff --git a/xserver/hw/xfree86/x86emu/x86emu/regs.h b/xserver/hw/xfree86/x86emu/x86emu/regs.h index 2ecafa047..3a7456e4c 100644 --- a/xserver/hw/xfree86/x86emu/x86emu/regs.h +++ b/xserver/hw/xfree86/x86emu/x86emu/regs.h @@ -39,6 +39,8 @@ #ifndef __X86EMU_REGS_H #define __X86EMU_REGS_H +#include <X11/Xfuncproto.h> + /*---------------------- Macros and type definitions ----------------------*/ #ifdef PACK @@ -337,7 +339,8 @@ extern "C" { /* Use "C" linkage when in C++ mode */ /* Function to log information at runtime */ - void printk(const char *fmt, ...); + void printk(const char *fmt, ...) + _X_ATTRIBUTE_PRINTF(1, 2); #ifdef __cplusplus } /* End of "C" linkage for C++ */ diff --git a/xserver/hw/xfree86/xorg-wrapper.c b/xserver/hw/xfree86/xorg-wrapper.c new file mode 100644 index 000000000..4ea47331b --- /dev/null +++ b/xserver/hw/xfree86/xorg-wrapper.c @@ -0,0 +1,272 @@ +/* + * 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 <hdegoede@redhat.com> + */ + +#include "dix-config.h" + +#include <errno.h> +#include <fcntl.h> +#include <limits.h> +#include <stdint.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <sys/ioctl.h> +#include <sys/stat.h> +#include <sys/types.h> +#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) +#include <sys/consio.h> +#endif +#include <unistd.h> +#include <drm.h> +#include <xf86drm.h> /* For DRM_DEV_NAME */ + +#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[]) +{ + struct drm_mode_card_res res; + 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; + + 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; + } + } + + /* Detect if we need root rights, except when overriden 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 && res.count_connectors > 0) + kms_cards++; + + close(fd); + } + } + + /* 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.bin", 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/Xorg.bin: %s\n", + progname, SUID_WRAPPER_DIR, strerror(errno)); + exit(1); + } + + argv[0] = buf; + (void) execv(argv[0], argv); + fprintf(stderr, "%s: Failed to execute %s/Xorg.bin: %s\n", + progname, SUID_WRAPPER_DIR, strerror(errno)); + exit(1); +} diff --git a/xserver/hw/xnest/Color.c b/xserver/hw/xnest/Color.c index 7ef137d59..95c334308 100644 --- a/xserver/hw/xnest/Color.c +++ b/xserver/hw/xnest/Color.c @@ -137,7 +137,7 @@ xnestDestroyColormap(ColormapPtr pCmap) (xnestWindow(pWin) != None && wColormap(pWin) == icws->cmapIDs[i]) static int -xnestCountInstalledColormapWindows(WindowPtr pWin, pointer ptr) +xnestCountInstalledColormapWindows(WindowPtr pWin, void *ptr) { xnestInstalledColormapWindows *icws = (xnestInstalledColormapWindows *) ptr; int i; @@ -152,7 +152,7 @@ xnestCountInstalledColormapWindows(WindowPtr pWin, pointer ptr) } static int -xnestGetInstalledColormapWindows(WindowPtr pWin, pointer ptr) +xnestGetInstalledColormapWindows(WindowPtr pWin, void *ptr) { xnestInstalledColormapWindows *icws = (xnestInstalledColormapWindows *) ptr; int i; @@ -198,12 +198,12 @@ xnestSetInstalledColormapWindows(ScreenPtr pScreen) sizeof(Colormap)); icws.numCmapIDs = xnestListInstalledColormaps(pScreen, icws.cmapIDs); icws.numWindows = 0; - WalkTree(pScreen, xnestCountInstalledColormapWindows, (pointer) &icws); + WalkTree(pScreen, xnestCountInstalledColormapWindows, (void *) &icws); if (icws.numWindows) { icws.windows = (Window *) malloc((icws.numWindows + 1) * sizeof(Window)); icws.index = 0; - WalkTree(pScreen, xnestGetInstalledColormapWindows, (pointer) &icws); + WalkTree(pScreen, xnestGetInstalledColormapWindows, (void *) &icws); icws.windows[icws.numWindows] = xnestDefaultWindows[pScreen->myNum]; numWindows = icws.numWindows + 1; } @@ -252,11 +252,11 @@ xnestSetInstalledColormapWindows(ScreenPtr pScreen) visual = xnestVisualFromID(pScreen, wVisual(pWin)); if (visual == xnestDefaultVisual(pScreen)) - dixLookupResourceByType((pointer *) &pCmap, wColormap(pWin), + dixLookupResourceByType((void **) &pCmap, wColormap(pWin), RT_COLORMAP, serverClient, DixUseAccess); else - dixLookupResourceByType((pointer *) &pCmap, + dixLookupResourceByType((void **) &pCmap, pScreen->defColormap, RT_COLORMAP, serverClient, DixUseAccess); @@ -309,7 +309,7 @@ xnestDirectInstallColormaps(ScreenPtr pScreen) for (i = 0; i < n; i++) { ColormapPtr pCmap; - dixLookupResourceByType((pointer *) &pCmap, pCmapIDs[i], RT_COLORMAP, + dixLookupResourceByType((void **) &pCmap, pCmapIDs[i], RT_COLORMAP, serverClient, DixInstallAccess); if (pCmap) XInstallColormap(xnestDisplay, xnestColormap(pCmap)); @@ -330,7 +330,7 @@ xnestDirectUninstallColormaps(ScreenPtr pScreen) for (i = 0; i < n; i++) { ColormapPtr pCmap; - dixLookupResourceByType((pointer *) &pCmap, pCmapIDs[i], RT_COLORMAP, + dixLookupResourceByType((void **) &pCmap, pCmapIDs[i], RT_COLORMAP, serverClient, DixUninstallAccess); if (pCmap) XUninstallColormap(xnestDisplay, xnestColormap(pCmap)); @@ -347,10 +347,10 @@ xnestInstallColormap(ColormapPtr pCmap) /* Uninstall pInstalledMap. Notify all interested parties. */ if (pOldCmap != (ColormapPtr) None) - WalkTree(pCmap->pScreen, TellLostMap, (pointer) &pOldCmap->mid); + WalkTree(pCmap->pScreen, TellLostMap, (void *) &pOldCmap->mid); SetInstalledColormap(pCmap->pScreen, pCmap); - WalkTree(pCmap->pScreen, TellGainedMap, (pointer) &pCmap->mid); + WalkTree(pCmap->pScreen, TellGainedMap, (void *) &pCmap->mid); xnestSetInstalledColormapWindows(pCmap->pScreen); xnestDirectInstallColormaps(pCmap->pScreen); @@ -364,7 +364,7 @@ xnestUninstallColormap(ColormapPtr pCmap) if (pCmap == pCurCmap) { if (pCmap->mid != pCmap->pScreen->defColormap) { - dixLookupResourceByType((pointer *) &pCurCmap, + dixLookupResourceByType((void **) &pCurCmap, pCmap->pScreen->defColormap, RT_COLORMAP, serverClient, DixInstallAccess); diff --git a/xserver/hw/xnest/Events.c b/xserver/hw/xnest/Events.c index 447d5a72b..3ff095bb8 100644 --- a/xserver/hw/xnest/Events.c +++ b/xserver/hw/xnest/Events.c @@ -64,15 +64,15 @@ SetTimeSinceLastInputEvent(void) } static Bool -xnestExposurePredicate(Display * display, XEvent * event, char *args) +xnestExposurePredicate(Display * dpy, XEvent * event, char *args) { return event->type == Expose || event->type == ProcessedExpose; } static Bool -xnestNotExposurePredicate(Display * display, XEvent * event, char *args) +xnestNotExposurePredicate(Display * dpy, XEvent * event, char *args) { - return !xnestExposurePredicate(display, event, args); + return !xnestExposurePredicate(dpy, event, args); } void diff --git a/xserver/hw/xnest/Font.c b/xserver/hw/xnest/Font.c index 1e95588ef..ffdfd2497 100644 --- a/xserver/hw/xnest/Font.c +++ b/xserver/hw/xnest/Font.c @@ -35,7 +35,7 @@ int xnestFontPrivateIndex; Bool xnestRealizeFont(ScreenPtr pScreen, FontPtr pFont) { - pointer priv; + void *priv; Atom name_atom, value_atom; int nprops; FontPropPtr props; @@ -64,7 +64,7 @@ xnestRealizeFont(ScreenPtr pScreen, FontPtr pFont) if (!name) return False; - priv = (pointer) malloc(sizeof(xnestPrivFont)); + priv = (void *) malloc(sizeof(xnestPrivFont)); FontSetPrivate(pFont, xnestFontPrivateIndex, priv); xnestFontPriv(pFont)->font_struct = XLoadQueryFont(xnestDisplay, name); diff --git a/xserver/hw/xnest/GC.c b/xserver/hw/xnest/GC.c index cfaf71475..0ec60fcdc 100644 --- a/xserver/hw/xnest/GC.c +++ b/xserver/hw/xnest/GC.c @@ -188,7 +188,7 @@ xnestDestroyGC(GCPtr pGC) } void -xnestChangeClip(GCPtr pGC, int type, pointer pValue, int nRects) +xnestChangeClip(GCPtr pGC, int type, void *pValue, int nRects) { int i, size; BoxPtr pBox; @@ -225,7 +225,7 @@ xnestChangeClip(GCPtr pGC, int type, pointer pValue, int nRects) * current pixmap contents. */ pGC->clientClip = - (pointer) (*pGC->pScreen->BitmapToRegion) ((PixmapPtr) pValue); + (void *) (*pGC->pScreen->BitmapToRegion) ((PixmapPtr) pValue); (*pGC->pScreen->DestroyPixmap) ((PixmapPtr) pValue); pValue = pGC->clientClip; type = CT_REGION; @@ -269,7 +269,7 @@ xnestChangeClip(GCPtr pGC, int type, pointer pValue, int nRects) * other parts of server can only deal with CT_NONE, * CT_PIXMAP and CT_REGION client clips. */ - pGC->clientClip = (pointer) RegionFromRects(nRects, + pGC->clientClip = (void *) RegionFromRects(nRects, (xRectangle *) pValue, type); free(pValue); diff --git a/xserver/hw/xnest/GCOps.c b/xserver/hw/xnest/GCOps.c index d00511d71..e1cf9d65f 100644 --- a/xserver/hw/xnest/GCOps.c +++ b/xserver/hw/xnest/GCOps.c @@ -95,7 +95,7 @@ xnestPutImage(DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y, } static int -xnestIgnoreErrorHandler (Display *display, +xnestIgnoreErrorHandler (Display *dpy, XErrorEvent *event) { return False; /* return value is ignored */ @@ -127,7 +127,7 @@ xnestGetImage(DrawablePtr pDrawable, int x, int y, int w, int h, } static Bool -xnestBitBlitPredicate(Display * display, XEvent * event, char *args) +xnestBitBlitPredicate(Display * dpy, XEvent * event, char *args) { return event->type == GraphicsExpose || event->type == NoExpose; } @@ -308,7 +308,7 @@ xnestImageText16(DrawablePtr pDrawable, GCPtr pGC, int x, int y, int count, void xnestImageGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, int x, int y, unsigned int nGlyphs, CharInfoPtr * pCharInfo, - pointer pGlyphBase) + void *pGlyphBase) { ErrorF("xnest warning: function xnestImageGlyphBlt not implemented\n"); } @@ -316,7 +316,7 @@ xnestImageGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, int x, int y, void xnestPolyGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, int x, int y, unsigned int nGlyphs, CharInfoPtr * pCharInfo, - pointer pGlyphBase) + void *pGlyphBase) { ErrorF("xnest warning: function xnestPolyGlyphBlt not implemented\n"); } diff --git a/xserver/hw/xnest/GCOps.h b/xserver/hw/xnest/GCOps.h index b1cad110c..fd1f6bfc2 100644 --- a/xserver/hw/xnest/GCOps.h +++ b/xserver/hw/xnest/GCOps.h @@ -58,10 +58,10 @@ 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, - pointer pGlyphBase); + void *pGlyphBase); void xnestPolyGlyphBlt(DrawablePtr pDrawable, GCPtr pGC, int x, int y, unsigned int nGlyphs, CharInfoPtr * pCharInfo, - pointer pGlyphBase); + void *pGlyphBase); void xnestPushPixels(GCPtr pGC, PixmapPtr pBitmap, DrawablePtr pDrawable, int width, int height, int x, int y); diff --git a/xserver/hw/xnest/Handlers.c b/xserver/hw/xnest/Handlers.c index 4605b90bd..05d559d8f 100644 --- a/xserver/hw/xnest/Handlers.c +++ b/xserver/hw/xnest/Handlers.c @@ -32,14 +32,14 @@ is" without express or implied warranty. #include "Handlers.h" void -xnestBlockHandler(pointer blockData, OSTimePtr pTimeout, pointer pReadMask) +xnestBlockHandler(void *blockData, OSTimePtr pTimeout, void *pReadMask) { xnestCollectExposures(); XFlush(xnestDisplay); } void -xnestWakeupHandler(pointer blockData, int result, pointer pReadMask) +xnestWakeupHandler(void *blockData, int result, void *pReadMask) { xnestCollectEvents(); } diff --git a/xserver/hw/xnest/Handlers.h b/xserver/hw/xnest/Handlers.h index 7160bdd13..d4ad6d254 100644 --- a/xserver/hw/xnest/Handlers.h +++ b/xserver/hw/xnest/Handlers.h @@ -15,8 +15,8 @@ is" without express or implied warranty. #ifndef XNESTHANDLERS_H #define XNESTHANDLERS_H -void xnestBlockHandler(pointer blockData, OSTimePtr pTimeout, - pointer pReadMask); -void xnestWakeupHandler(pointer blockData, int result, pointer pReadMask); +void xnestBlockHandler(void *blockData, OSTimePtr pTimeout, + void *pReadMask); +void xnestWakeupHandler(void *blockData, int result, void *pReadMask); #endif /* XNESTHANDLERS_H */ diff --git a/xserver/hw/xnest/Init.c b/xserver/hw/xnest/Init.c index 330b8ca17..d9f490b85 100644 --- a/xserver/hw/xnest/Init.c +++ b/xserver/hw/xnest/Init.c @@ -46,29 +46,29 @@ is" without express or implied warranty. Bool xnestDoFullGeneration = True; void -InitOutput(ScreenInfo * screenInfo, int argc, char *argv[]) +InitOutput(ScreenInfo * screen_info, int argc, char *argv[]) { int i, j; xnestOpenDisplay(argc, argv); - screenInfo->imageByteOrder = ImageByteOrder(xnestDisplay); - screenInfo->bitmapScanlineUnit = BitmapUnit(xnestDisplay); - screenInfo->bitmapScanlinePad = BitmapPad(xnestDisplay); - screenInfo->bitmapBitOrder = BitmapBitOrder(xnestDisplay); + screen_info->imageByteOrder = ImageByteOrder(xnestDisplay); + screen_info->bitmapScanlineUnit = BitmapUnit(xnestDisplay); + screen_info->bitmapScanlinePad = BitmapPad(xnestDisplay); + screen_info->bitmapBitOrder = BitmapBitOrder(xnestDisplay); - screenInfo->numPixmapFormats = 0; + 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])) { - screenInfo->formats[screenInfo->numPixmapFormats].depth = + screen_info->formats[screen_info->numPixmapFormats].depth = xnestPixmapFormats[i].depth; - screenInfo->formats[screenInfo->numPixmapFormats].bitsPerPixel = + screen_info->formats[screen_info->numPixmapFormats].bitsPerPixel = xnestPixmapFormats[i].bits_per_pixel; - screenInfo->formats[screenInfo->numPixmapFormats].scanlinePad = + screen_info->formats[screen_info->numPixmapFormats].scanlinePad = xnestPixmapFormats[i].scanline_pad; - screenInfo->numPixmapFormats++; + screen_info->numPixmapFormats++; break; } @@ -80,7 +80,7 @@ InitOutput(ScreenInfo * screenInfo, int argc, char *argv[]) for (i = 0; i < xnestNumScreens; i++) AddScreen(xnestOpenScreen, argc, argv); - xnestNumScreens = screenInfo->numScreens; + xnestNumScreens = screen_info->numScreens; xnestDoFullGeneration = xnestFullGeneration; } diff --git a/xserver/hw/xnest/Keyboard.c b/xserver/hw/xnest/Keyboard.c index d013dc91e..2cf16246b 100644 --- a/xserver/hw/xnest/Keyboard.c +++ b/xserver/hw/xnest/Keyboard.c @@ -59,7 +59,7 @@ extern Status XkbGetControls(Display * /* dpy */ , DeviceIntPtr xnestKeyboardDevice = NULL; void -xnestBell(int volume, DeviceIntPtr pDev, pointer ctrl, int cls) +xnestBell(int volume, DeviceIntPtr pDev, void *ctrl, int cls) { XBell(xnestDisplay, volume); } diff --git a/xserver/hw/xnest/Keyboard.h b/xserver/hw/xnest/Keyboard.h index 45d56bc08..dc5eaa2de 100644 --- a/xserver/hw/xnest/Keyboard.h +++ b/xserver/hw/xnest/Keyboard.h @@ -20,7 +20,7 @@ is" without express or implied warranty. extern DeviceIntPtr xnestKeyboardDevice; -void xnestBell(int volume, DeviceIntPtr pDev, pointer ctrl, int cls); +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); diff --git a/xserver/hw/xnest/Makefile.am b/xserver/hw/xnest/Makefile.am index 3c099cd6b..eb550c0f7 100644 --- a/xserver/hw/xnest/Makefile.am +++ b/xserver/hw/xnest/Makefile.am @@ -1,7 +1,6 @@ SUBDIRS = man bin_PROGRAMS = Xnest -noinst_LIBRARIES = libfbcmap.a AM_CFLAGS = -DHAVE_XNEST_CONFIG_H \ $(DIX_CFLAGS) \ @@ -42,16 +41,12 @@ SRCS = Args.c \ XNPixmap.h \ XNWindow.h \ xnest-config.h \ - $(top_srcdir)/Xext/dpmsstubs.c \ - $(top_srcdir)/Xi/stubs.c \ $(top_srcdir)/mi/miinitext.c -libfbcmap_a_SOURCES = $(top_srcdir)/fb/fbcmap_mi.c -libfbcmap_a_CFLAGS = $(AM_CFLAGS) - XNEST_LIBS = \ @XNEST_LIBS@ \ - libfbcmap.a + $(top_builddir)/Xext/libXextdpmsstubs.la \ + $(top_builddir)/Xi/libXistubs.la Xnest_SOURCES = $(SRCS) diff --git a/xserver/hw/xnest/Makefile.in b/xserver/hw/xnest/Makefile.in index 563169d64..b53a6595f 100644 --- a/xserver/hw/xnest/Makefile.in +++ b/xserver/hw/xnest/Makefile.in @@ -14,7 +14,6 @@ @SET_MAKE@ - VPATH = @srcdir@ am__make_dryrun = \ { \ @@ -74,16 +73,6 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -LIBRARIES = $(noinst_LIBRARIES) -ARFLAGS = cru -AM_V_AR = $(am__v_AR_@AM_V@) -am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) -am__v_AR_0 = @echo " AR " $@; -am__v_AR_1 = -libfbcmap_a_AR = $(AR) $(ARFLAGS) -libfbcmap_a_LIBADD = -am_libfbcmap_a_OBJECTS = libfbcmap_a-fbcmap_mi.$(OBJEXT) -libfbcmap_a_OBJECTS = $(am_libfbcmap_a_OBJECTS) am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am__objects_1 = Args.$(OBJEXT) Color.$(OBJEXT) Cursor.$(OBJEXT) \ @@ -91,10 +80,11 @@ am__objects_1 = Args.$(OBJEXT) Color.$(OBJEXT) Cursor.$(OBJEXT) \ GCOps.$(OBJEXT) Handlers.$(OBJEXT) Init.$(OBJEXT) \ Keyboard.$(OBJEXT) Pixmap.$(OBJEXT) Pointer.$(OBJEXT) \ Screen.$(OBJEXT) Visual.$(OBJEXT) Window.$(OBJEXT) \ - dpmsstubs.$(OBJEXT) stubs.$(OBJEXT) miinitext.$(OBJEXT) + miinitext.$(OBJEXT) am_Xnest_OBJECTS = $(am__objects_1) Xnest_OBJECTS = $(am_Xnest_OBJECTS) -am__DEPENDENCIES_1 = libfbcmap.a +am__DEPENDENCIES_1 = $(top_builddir)/Xext/libXextdpmsstubs.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@) @@ -137,8 +127,8 @@ 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 = $(libfbcmap_a_SOURCES) $(Xnest_SOURCES) -DIST_SOURCES = $(libfbcmap_a_SOURCES) $(Xnest_SOURCES) +SOURCES = $(Xnest_SOURCES) +DIST_SOURCES = $(Xnest_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ @@ -223,6 +213,8 @@ 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@ @@ -267,6 +259,10 @@ 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@ @@ -369,7 +365,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -378,6 +377,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -413,7 +413,8 @@ XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ XNEST_LIBS = \ @XNEST_LIBS@ \ - libfbcmap.a + $(top_builddir)/Xext/libXextdpmsstubs.la \ + $(top_builddir)/Xi/libXistubs.la XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ XORG_CFLAGS = @XORG_CFLAGS@ @@ -447,6 +448,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ @@ -520,7 +525,6 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = man -noinst_LIBRARIES = libfbcmap.a AM_CFLAGS = -DHAVE_XNEST_CONFIG_H \ $(DIX_CFLAGS) \ $(XNESTMODULES_CFLAGS) @@ -560,12 +564,8 @@ SRCS = Args.c \ XNPixmap.h \ XNWindow.h \ xnest-config.h \ - $(top_srcdir)/Xext/dpmsstubs.c \ - $(top_srcdir)/Xi/stubs.c \ $(top_srcdir)/mi/miinitext.c -libfbcmap_a_SOURCES = $(top_srcdir)/fb/fbcmap_mi.c -libfbcmap_a_CFLAGS = $(AM_CFLAGS) Xnest_SOURCES = $(SRCS) Xnest_DEPENDENCIES = $(XNEST_LIBS) Xnest_LDADD = $(XNEST_LIBS) $(XNEST_SYS_LIBS) $(XSERVER_SYS_LIBS) @@ -607,13 +607,6 @@ $(top_srcdir)/configure: $(am__configure_deps) $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): - -clean-noinstLIBRARIES: - -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) -libfbcmap.a: $(libfbcmap_a_OBJECTS) $(libfbcmap_a_DEPENDENCIES) $(EXTRA_libfbcmap_a_DEPENDENCIES) - $(AM_V_at)-rm -f libfbcmap.a - $(AM_V_AR)$(libfbcmap_a_AR) libfbcmap.a $(libfbcmap_a_OBJECTS) $(libfbcmap_a_LIBADD) - $(AM_V_at)$(RANLIB) libfbcmap.a install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ @@ -686,10 +679,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Screen.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Visual.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Window.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dpmsstubs.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libfbcmap_a-fbcmap_mi.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/miinitext.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stubs.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -712,48 +702,6 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< -libfbcmap_a-fbcmap_mi.o: $(top_srcdir)/fb/fbcmap_mi.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfbcmap_a_CFLAGS) $(CFLAGS) -MT libfbcmap_a-fbcmap_mi.o -MD -MP -MF $(DEPDIR)/libfbcmap_a-fbcmap_mi.Tpo -c -o libfbcmap_a-fbcmap_mi.o `test -f '$(top_srcdir)/fb/fbcmap_mi.c' || echo '$(srcdir)/'`$(top_srcdir)/fb/fbcmap_mi.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfbcmap_a-fbcmap_mi.Tpo $(DEPDIR)/libfbcmap_a-fbcmap_mi.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/fb/fbcmap_mi.c' object='libfbcmap_a-fbcmap_mi.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) $(libfbcmap_a_CFLAGS) $(CFLAGS) -c -o libfbcmap_a-fbcmap_mi.o `test -f '$(top_srcdir)/fb/fbcmap_mi.c' || echo '$(srcdir)/'`$(top_srcdir)/fb/fbcmap_mi.c - -libfbcmap_a-fbcmap_mi.obj: $(top_srcdir)/fb/fbcmap_mi.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libfbcmap_a_CFLAGS) $(CFLAGS) -MT libfbcmap_a-fbcmap_mi.obj -MD -MP -MF $(DEPDIR)/libfbcmap_a-fbcmap_mi.Tpo -c -o libfbcmap_a-fbcmap_mi.obj `if test -f '$(top_srcdir)/fb/fbcmap_mi.c'; then $(CYGPATH_W) '$(top_srcdir)/fb/fbcmap_mi.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/fb/fbcmap_mi.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libfbcmap_a-fbcmap_mi.Tpo $(DEPDIR)/libfbcmap_a-fbcmap_mi.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/fb/fbcmap_mi.c' object='libfbcmap_a-fbcmap_mi.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) $(libfbcmap_a_CFLAGS) $(CFLAGS) -c -o libfbcmap_a-fbcmap_mi.obj `if test -f '$(top_srcdir)/fb/fbcmap_mi.c'; then $(CYGPATH_W) '$(top_srcdir)/fb/fbcmap_mi.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/fb/fbcmap_mi.c'; fi` - -dpmsstubs.o: $(top_srcdir)/Xext/dpmsstubs.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dpmsstubs.o -MD -MP -MF $(DEPDIR)/dpmsstubs.Tpo -c -o dpmsstubs.o `test -f '$(top_srcdir)/Xext/dpmsstubs.c' || echo '$(srcdir)/'`$(top_srcdir)/Xext/dpmsstubs.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dpmsstubs.Tpo $(DEPDIR)/dpmsstubs.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/Xext/dpmsstubs.c' object='dpmsstubs.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 dpmsstubs.o `test -f '$(top_srcdir)/Xext/dpmsstubs.c' || echo '$(srcdir)/'`$(top_srcdir)/Xext/dpmsstubs.c - -dpmsstubs.obj: $(top_srcdir)/Xext/dpmsstubs.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dpmsstubs.obj -MD -MP -MF $(DEPDIR)/dpmsstubs.Tpo -c -o dpmsstubs.obj `if test -f '$(top_srcdir)/Xext/dpmsstubs.c'; then $(CYGPATH_W) '$(top_srcdir)/Xext/dpmsstubs.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/Xext/dpmsstubs.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dpmsstubs.Tpo $(DEPDIR)/dpmsstubs.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/Xext/dpmsstubs.c' object='dpmsstubs.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 dpmsstubs.obj `if test -f '$(top_srcdir)/Xext/dpmsstubs.c'; then $(CYGPATH_W) '$(top_srcdir)/Xext/dpmsstubs.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/Xext/dpmsstubs.c'; fi` - -stubs.o: $(top_srcdir)/Xi/stubs.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stubs.o -MD -MP -MF $(DEPDIR)/stubs.Tpo -c -o stubs.o `test -f '$(top_srcdir)/Xi/stubs.c' || echo '$(srcdir)/'`$(top_srcdir)/Xi/stubs.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stubs.Tpo $(DEPDIR)/stubs.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/Xi/stubs.c' object='stubs.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 stubs.o `test -f '$(top_srcdir)/Xi/stubs.c' || echo '$(srcdir)/'`$(top_srcdir)/Xi/stubs.c - -stubs.obj: $(top_srcdir)/Xi/stubs.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stubs.obj -MD -MP -MF $(DEPDIR)/stubs.Tpo -c -o stubs.obj `if test -f '$(top_srcdir)/Xi/stubs.c'; then $(CYGPATH_W) '$(top_srcdir)/Xi/stubs.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/Xi/stubs.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stubs.Tpo $(DEPDIR)/stubs.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/Xi/stubs.c' object='stubs.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 stubs.obj `if test -f '$(top_srcdir)/Xi/stubs.c'; then $(CYGPATH_W) '$(top_srcdir)/Xi/stubs.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/Xi/stubs.c'; fi` - 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 @@ -957,7 +905,7 @@ distdir: $(DISTFILES) done check-am: all-am check: check-recursive -all-am: Makefile $(LIBRARIES) $(PROGRAMS) +all-am: Makefile $(PROGRAMS) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(bindir)"; do \ @@ -995,8 +943,7 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive -clean-am: clean-binPROGRAMS clean-generic clean-libtool \ - clean-noinstLIBRARIES mostlyclean-am +clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) @@ -1070,20 +1017,19 @@ uninstall-am: uninstall-binPROGRAMS .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool clean-noinstLIBRARIES cscopelist \ - cscopelist-recursive ctags ctags-recursive 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-recursive uninstall uninstall-am \ - uninstall-binPROGRAMS + clean-generic clean-libtool cscopelist cscopelist-recursive \ + ctags ctags-recursive 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-recursive \ + uninstall uninstall-am uninstall-binPROGRAMS # -UDPMSExtension for miinitext? can't put into diff --git a/xserver/hw/xnest/Pixmap.c b/xserver/hw/xnest/Pixmap.c index 2902acd56..6514f3b31 100644 --- a/xserver/hw/xnest/Pixmap.c +++ b/xserver/hw/xnest/Pixmap.c @@ -80,7 +80,7 @@ xnestDestroyPixmap(PixmapPtr pPixmap) Bool xnestModifyPixmapHeader(PixmapPtr pPixmap, int width, int height, int depth, - int bitsPerPixel, int devKind, pointer pPixData) + int bitsPerPixel, int devKind, void *pPixData) { if(!xnestPixmapPriv(pPixmap)->pixmap && width > 0 && height > 0) { xnestPixmapPriv(pPixmap)->pixmap = diff --git a/xserver/hw/xnest/Window.c b/xserver/hw/xnest/Window.c index e2b21b58e..fc87e823e 100644 --- a/xserver/hw/xnest/Window.c +++ b/xserver/hw/xnest/Window.c @@ -42,7 +42,7 @@ is" without express or implied warranty. DevPrivateKeyRec xnestWindowPrivateKeyRec; static int -xnestFindWindowMatch(WindowPtr pWin, pointer ptr) +xnestFindWindowMatch(WindowPtr pWin, void *ptr) { xnestWindowMatch *wm = (xnestWindowMatch *) ptr; @@ -64,7 +64,7 @@ xnestWindowPtr(Window window) wm.window = window; for (i = 0; i < xnestNumScreens; i++) { - WalkTree(screenInfo.screens[i], xnestFindWindowMatch, (pointer) &wm); + WalkTree(screenInfo.screens[i], xnestFindWindowMatch, (void *) &wm); if (wm.pWin) break; } @@ -96,7 +96,7 @@ xnestCreateWindow(WindowPtr pWin) xnestVisualFromID(pWin->drawable.pScreen, wVisual(pWin)); mask |= CWColormap; if (pWin->optional->colormap) { - dixLookupResourceByType((pointer *) &pCmap, wColormap(pWin), + dixLookupResourceByType((void **) &pCmap, wColormap(pWin), RT_COLORMAP, serverClient, DixUseAccess); attributes.colormap = xnestColormap(pCmap); @@ -109,7 +109,7 @@ xnestCreateWindow(WindowPtr pWin) } else { /* root windows have their own colormaps at creation time */ visual = xnestVisualFromID(pWin->drawable.pScreen, wVisual(pWin)); - dixLookupResourceByType((pointer *) &pCmap, wColormap(pWin), + dixLookupResourceByType((void **) &pCmap, wColormap(pWin), RT_COLORMAP, serverClient, DixUseAccess); mask |= CWColormap; attributes.colormap = xnestColormap(pCmap); @@ -331,7 +331,7 @@ xnestChangeWindowAttributes(WindowPtr pWin, unsigned long mask) if (mask & CWColormap) { ColormapPtr pCmap; - dixLookupResourceByType((pointer *) &pCmap, wColormap(pWin), + dixLookupResourceByType((void **) &pCmap, wColormap(pWin), RT_COLORMAP, serverClient, DixUseAccess); attributes.colormap = xnestColormap(pCmap); @@ -380,7 +380,7 @@ xnestClipNotify(WindowPtr pWin, int dx, int dy) } static Bool -xnestWindowExposurePredicate(Display * display, XEvent * event, XPointer ptr) +xnestWindowExposurePredicate(Display * dpy, XEvent * event, XPointer ptr) { return (event->type == Expose && event->xexpose.window == *(Window *) ptr); } diff --git a/xserver/hw/xnest/XNGC.h b/xserver/hw/xnest/XNGC.h index c7c25e426..e2f10fb9c 100644 --- a/xserver/hw/xnest/XNGC.h +++ b/xserver/hw/xnest/XNGC.h @@ -35,7 +35,7 @@ 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, pointer pValue, int nRects); +void xnestChangeClip(GCPtr pGC, int type, void *pValue, int nRects); void xnestDestroyClip(GCPtr pGC); void xnestDestroyClipHelper(GCPtr pGC); void xnestCopyClip(GCPtr pGCDst, GCPtr pGCSrc); diff --git a/xserver/hw/xnest/XNPixmap.h b/xserver/hw/xnest/XNPixmap.h index 5b2e796fe..b7b10e907 100644 --- a/xserver/hw/xnest/XNPixmap.h +++ b/xserver/hw/xnest/XNPixmap.h @@ -34,7 +34,7 @@ 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, pointer pPixData); + int bitsPerPixel, int devKind, void *pPixData); RegionPtr xnestPixmapToRegion(PixmapPtr pPixmap); #endif /* XNESTPIXMAP_H */ diff --git a/xserver/hw/xnest/man/Makefile.in b/xserver/hw/xnest/man/Makefile.in index fd3d74c73..56ec8eae1 100644 --- a/xserver/hw/xnest/man/Makefile.in +++ b/xserver/hw/xnest/man/Makefile.in @@ -160,6 +160,8 @@ 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@ @@ -204,6 +206,10 @@ 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@ @@ -268,6 +274,7 @@ MAN_SUBSTS = @MAN_SUBSTS@ -e 's|__logdir__|$(logdir)|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@ @@ -322,7 +329,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -331,6 +341,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -397,6 +408,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/xquartz/GL/Makefile.in b/xserver/hw/xquartz/GL/Makefile.in index 828438206..f70a9d302 100644 --- a/xserver/hw/xquartz/GL/Makefile.in +++ b/xserver/hw/xquartz/GL/Makefile.in @@ -163,6 +163,8 @@ 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@ @@ -207,6 +209,10 @@ 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@ @@ -309,7 +315,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -318,6 +327,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -384,6 +394,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/xquartz/Makefile.am b/xserver/hw/xquartz/Makefile.am index 2ca953cf9..4da896d76 100644 --- a/xserver/hw/xquartz/Makefile.am +++ b/xserver/hw/xquartz/Makefile.am @@ -20,7 +20,6 @@ SUBDIRS = bundle . $(GL_DIR) xpr pbproxy mach-startup man DIST_SUBDIRS = bundle . GL xpr pbproxy mach-startup man libXquartz_la_SOURCES = \ - $(top_srcdir)/fb/fbcmap_mi.c \ $(top_srcdir)/mi/miinitext.c \ X11Application.m \ X11Controller.m \ diff --git a/xserver/hw/xquartz/Makefile.in b/xserver/hw/xquartz/Makefile.in index 25c25539c..6da2977a6 100644 --- a/xserver/hw/xquartz/Makefile.in +++ b/xserver/hw/xquartz/Makefile.in @@ -75,7 +75,7 @@ CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libXquartz_la_DEPENDENCIES = \ $(top_builddir)/pseudoramiX/libPseudoramiX.la -am_libXquartz_la_OBJECTS = fbcmap_mi.lo miinitext.lo X11Application.lo \ +am_libXquartz_la_OBJECTS = miinitext.lo X11Application.lo \ X11Controller.lo applewm.lo darwin.lo darwinEvents.lo \ darwinXinput.lo keysym2ucs.lo quartz.lo quartzCocoa.lo \ quartzKeyboard.lo quartzStartup.lo quartzRandR.lo \ @@ -219,6 +219,8 @@ 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@ @@ -263,6 +265,10 @@ 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@ @@ -365,7 +371,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -374,6 +383,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -440,6 +450,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ @@ -529,7 +543,6 @@ AM_CPPFLAGS = \ SUBDIRS = bundle . $(GL_DIR) xpr pbproxy mach-startup man DIST_SUBDIRS = bundle . GL xpr pbproxy mach-startup man libXquartz_la_SOURCES = \ - $(top_srcdir)/fb/fbcmap_mi.c \ $(top_srcdir)/mi/miinitext.c \ X11Application.m \ X11Controller.m \ @@ -623,7 +636,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/darwin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/darwinEvents.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/darwinXinput.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fbcmap_mi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/keysym2ucs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/miinitext.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quartz.Plo@am__quote@ @@ -653,13 +665,6 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< -fbcmap_mi.lo: $(top_srcdir)/fb/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) $(AM_CFLAGS) $(CFLAGS) -MT fbcmap_mi.lo -MD -MP -MF $(DEPDIR)/fbcmap_mi.Tpo -c -o fbcmap_mi.lo `test -f '$(top_srcdir)/fb/fbcmap_mi.c' || echo '$(srcdir)/'`$(top_srcdir)/fb/fbcmap_mi.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fbcmap_mi.Tpo $(DEPDIR)/fbcmap_mi.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/fb/fbcmap_mi.c' object='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) $(AM_CFLAGS) $(CFLAGS) -c -o fbcmap_mi.lo `test -f '$(top_srcdir)/fb/fbcmap_mi.c' || echo '$(srcdir)/'`$(top_srcdir)/fb/fbcmap_mi.c - 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 diff --git a/xserver/hw/xquartz/applewm.c b/xserver/hw/xquartz/applewm.c index 0d734bd88..cc91c9608 100644 --- a/xserver/hw/xquartz/applewm.c +++ b/xserver/hw/xquartz/applewm.c @@ -83,9 +83,9 @@ static XID eventResource; static unsigned int eventMask = 0; static int -WMFreeClient(pointer data, XID id); +WMFreeClient(void *data, XID id); static int -WMFreeEvents(pointer data, XID id); +WMFreeEvents(void *data, XID id); static void SNotifyEvent(xAppleWMNotifyEvent *from, xAppleWMNotifyEvent *to); @@ -175,7 +175,7 @@ updateEventMask(WMEventPtr *pHead) /*ARGSUSED*/ static int -WMFreeClient(pointer data, XID id) +WMFreeClient(void *data, XID id) { WMEventPtr pEvent; WMEventPtr *pHead, pCur, pPrev; @@ -183,7 +183,7 @@ WMFreeClient(pointer data, XID id) pEvent = (WMEventPtr)data; i = dixLookupResourceByType( - (pointer *)&pHead, eventResource, EventType, serverClient, + (void **)&pHead, eventResource, EventType, serverClient, DixReadAccess | DixWriteAccess | DixDestroyAccess); if (i == Success && pHead) { @@ -198,13 +198,13 @@ WMFreeClient(pointer data, XID id) } updateEventMask(pHead); } - free((pointer)pEvent); + free((void *)pEvent); return 1; } /*ARGSUSED*/ static int -WMFreeEvents(pointer data, XID id) +WMFreeEvents(void *data, XID id) { WMEventPtr *pHead, pCur, pNext; @@ -212,9 +212,9 @@ WMFreeEvents(pointer data, XID id) for (pCur = *pHead; pCur; pCur = pNext) { pNext = pCur->next; FreeResource(pCur->clientResource, ClientType); - free((pointer)pCur); + free((void *)pCur); } - free((pointer)pHead); + free((void *)pHead); eventMask = 0; return 1; } @@ -229,7 +229,7 @@ ProcAppleWMSelectInput(register ClientPtr client) REQUEST_SIZE_MATCH(xAppleWMSelectInputReq); i = - dixLookupResourceByType((pointer *)&pHead, eventResource, EventType, + dixLookupResourceByType((void **)&pHead, eventResource, EventType, client, DixWriteAccess); if (stuff->mask != 0) { @@ -257,7 +257,7 @@ ProcAppleWMSelectInput(register ClientPtr client) */ clientResource = FakeClientID(client->index); pNewEvent->clientResource = clientResource; - if (!AddResource(clientResource, ClientType, (pointer)pNewEvent)) + if (!AddResource(clientResource, ClientType, (void *)pNewEvent)) return BadAlloc; /* * create a resource to contain a pointer to the list @@ -268,7 +268,7 @@ ProcAppleWMSelectInput(register ClientPtr client) if (i != Success || !pHead) { pHead = (WMEventPtr *)malloc(sizeof(WMEventPtr)); if (!pHead || - !AddResource(eventResource, EventType, (pointer)pHead)) { + !AddResource(eventResource, EventType, (void *)pHead)) { FreeResource(clientResource, RT_NONE); return BadAlloc; } @@ -317,7 +317,7 @@ AppleWMSendEvent(int type, unsigned int mask, int which, int arg) int i; i = - dixLookupResourceByType((pointer *)&pHead, eventResource, EventType, + dixLookupResourceByType((void **)&pHead, eventResource, EventType, serverClient, DixReadAccess); if (i != Success || !pHead) diff --git a/xserver/hw/xquartz/bundle/Makefile.in b/xserver/hw/xquartz/bundle/Makefile.in index e4d74fb45..83f6c895c 100644 --- a/xserver/hw/xquartz/bundle/Makefile.in +++ b/xserver/hw/xquartz/bundle/Makefile.in @@ -167,6 +167,8 @@ 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@ @@ -211,6 +213,10 @@ 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@ @@ -313,7 +319,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -322,6 +331,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -388,6 +398,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/xquartz/mach-startup/Makefile.in b/xserver/hw/xquartz/mach-startup/Makefile.in index f5ffb11ed..406fb3b2b 100644 --- a/xserver/hw/xquartz/mach-startup/Makefile.in +++ b/xserver/hw/xquartz/mach-startup/Makefile.in @@ -198,6 +198,8 @@ 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@ @@ -242,6 +244,10 @@ 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@ @@ -344,7 +350,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -353,6 +362,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -419,6 +429,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/xquartz/man/Makefile.in b/xserver/hw/xquartz/man/Makefile.in index 6d69228e2..dae566e92 100644 --- a/xserver/hw/xquartz/man/Makefile.in +++ b/xserver/hw/xquartz/man/Makefile.in @@ -160,6 +160,8 @@ 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@ @@ -204,6 +206,10 @@ 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@ @@ -268,6 +274,7 @@ MAN_SUBSTS = @MAN_SUBSTS@ -e 's|__logdir__|$(logdir)|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@ @@ -322,7 +329,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -331,6 +341,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -397,6 +408,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/xquartz/pbproxy/Makefile.in b/xserver/hw/xquartz/pbproxy/Makefile.in index cd40e3460..28e696b38 100644 --- a/xserver/hw/xquartz/pbproxy/Makefile.in +++ b/xserver/hw/xquartz/pbproxy/Makefile.in @@ -193,6 +193,8 @@ 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@ @@ -237,6 +239,10 @@ 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@ @@ -339,7 +345,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -348,6 +357,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -414,6 +424,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/xquartz/quartz.c b/xserver/hw/xquartz/quartz.c index bc6c8d048..d7229cecb 100644 --- a/xserver/hw/xquartz/quartz.c +++ b/xserver/hw/xquartz/quartz.c @@ -164,10 +164,7 @@ static const ExtensionModule quartzExtensions[] = { */ static void QuartzExtensionInit(void) { - int i; - - for (i = 0; i < ARRAY_SIZE(quartzExtensions); i++) - LoadExtension(&quartzExtensions[i], TRUE); + LoadExtensionList(quartzExtensions, ARRAY_SIZE(quartzExtensions), TRUE); } /* diff --git a/xserver/hw/xquartz/quartzCocoa.m b/xserver/hw/xquartz/quartzCocoa.m index db2b3cfd6..d21fb7d91 100644 --- a/xserver/hw/xquartz/quartzCocoa.m +++ b/xserver/hw/xquartz/quartzCocoa.m @@ -48,9 +48,9 @@ * Clean out any autoreleased objects. */ void -QuartzBlockHandler(pointer blockData, +QuartzBlockHandler(void *blockData, OSTimePtr pTimeout, - pointer pReadmask) + void *pReadmask) { static NSAutoreleasePool *aPool = nil; @@ -62,9 +62,9 @@ QuartzBlockHandler(pointer blockData, * QuartzWakeupHandler */ void -QuartzWakeupHandler(pointer blockData, +QuartzWakeupHandler(void *blockData, int result, - pointer pReadmask) + void *pReadmask) { // nothing here } diff --git a/xserver/hw/xquartz/quartzCommon.h b/xserver/hw/xquartz/quartzCommon.h index 813bc7713..308a3f173 100644 --- a/xserver/hw/xquartz/quartzCommon.h +++ b/xserver/hw/xquartz/quartzCommon.h @@ -47,8 +47,8 @@ extern int aquaMenuBarHeight; extern const char *quartzOpenGLBundle; void -QuartzBlockHandler(pointer blockData, OSTimePtr pTimeout, pointer pReadmask); +QuartzBlockHandler(void *blockData, OSTimePtr pTimeout, void *pReadmask); void -QuartzWakeupHandler(pointer blockData, int result, pointer pReadmask); +QuartzWakeupHandler(void *blockData, int result, void *pReadmask); #endif /* _QUARTZCOMMON_H */ diff --git a/xserver/hw/xquartz/xpr/Makefile.in b/xserver/hw/xquartz/xpr/Makefile.in index 5cf1ac7ba..9b427cfdb 100644 --- a/xserver/hw/xquartz/xpr/Makefile.in +++ b/xserver/hw/xquartz/xpr/Makefile.in @@ -164,6 +164,8 @@ 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@ @@ -208,6 +210,10 @@ 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@ @@ -310,7 +316,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -319,6 +328,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -385,6 +395,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/xquartz/xpr/dri.c b/xserver/hw/xquartz/xpr/dri.c index adba69cca..014709b04 100644 --- a/xserver/hw/xquartz/xpr/dri.c +++ b/xserver/hw/xquartz/xpr/dri.c @@ -455,7 +455,7 @@ DRICreateSurface(ScreenPtr pScreen, Drawable id, pDRIDrawablePriv->sid), pDRIDrawablePriv); /* track this in case this window is destroyed */ - AddResource(id, DRIDrawablePrivResType, (pointer)pDrawable); + AddResource(id, DRIDrawablePrivResType, (void *)pDrawable); /* Initialize shape */ DRIUpdateSurface(pDRIDrawablePriv, pDrawable); @@ -529,7 +529,7 @@ DRIDestroySurface(ScreenPtr pScreen, Drawable id, DrawablePtr pDrawable, * drops to <= 0, or the window/pixmap is destroyed. */ Bool -DRIDrawablePrivDelete(pointer pResource, XID id) +DRIDrawablePrivDelete(void *pResource, XID id) { DrawablePtr pDrawable = (DrawablePtr)pResource; DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pDrawable->pScreen); @@ -829,7 +829,7 @@ DRICreatePixmap(ScreenPtr pScreen, Drawable id, dixSetPrivate(&pPix->devPrivates, DRIPixmapBufferPrivKey, shared); - AddResource(id, DRIDrawablePrivResType, (pointer)pDrawable); + AddResource(id, DRIDrawablePrivResType, (void *)pDrawable); return TRUE; } @@ -884,7 +884,7 @@ DRIFreePixmapImp(DrawablePtr pDrawable) shm_unlink(shared->shmPath); free(shared); - dixSetPrivate(&pPix->devPrivates, DRIPixmapBufferPrivKey, (pointer)NULL); + dixSetPrivate(&pPix->devPrivates, DRIPixmapBufferPrivKey, (void *)NULL); return TRUE; } diff --git a/xserver/hw/xquartz/xpr/dri.h b/xserver/hw/xquartz/xpr/dri.h index 8717a5186..70cb8b6d6 100644 --- a/xserver/hw/xquartz/xpr/dri.h +++ b/xserver/hw/xquartz/xpr/dri.h @@ -99,7 +99,7 @@ DRIDestroySurface(ScreenPtr pScreen, Drawable id, DrawablePtr pDrawable, void *data), void *notify_data); extern Bool -DRIDrawablePrivDelete(pointer pResource, XID id); +DRIDrawablePrivDelete(void *pResource, XID id); extern DRIWrappedFuncsRec * DRIGetWrappedFuncs(ScreenPtr pScreen); diff --git a/xserver/hw/xquartz/xpr/driWrap.c b/xserver/hw/xquartz/xpr/driWrap.c index 5f9f3abd3..42282d52b 100644 --- a/xserver/hw/xquartz/xpr/driWrap.c +++ b/xserver/hw/xquartz/xpr/driWrap.c @@ -447,7 +447,7 @@ DRIImageText16(DrawablePtr dst, GCPtr pGC, static void DRIImageGlyphBlt(DrawablePtr dst, GCPtr pGC, int x, int y, unsigned int nglyphInit, - CharInfoPtr *ppciInit, pointer unused) + CharInfoPtr *ppciInit, void *unused) { DRISavedDrawableState saved; @@ -465,7 +465,7 @@ DRIImageGlyphBlt(DrawablePtr dst, GCPtr pGC, static void DRIPolyGlyphBlt(DrawablePtr dst, GCPtr pGC, int x, int y, unsigned int nglyph, - CharInfoPtr *ppci, pointer pglyphBase) + CharInfoPtr *ppci, void *pglyphBase) { DRISavedDrawableState saved; diff --git a/xserver/hw/xquartz/xpr/xprScreen.c b/xserver/hw/xquartz/xpr/xprScreen.c index 7aa1ae1df..d0a525ff4 100644 --- a/xserver/hw/xquartz/xpr/xprScreen.c +++ b/xserver/hw/xquartz/xpr/xprScreen.c @@ -169,14 +169,25 @@ displayScreenBounds(CGDirectDisplayID id) (int)frame.size.width, (int)frame.size.height, (int)frame.origin.x, (int)frame.origin.y); - /* Remove menubar to help standard X11 window managers. - * On Mavericks and later, the menu bar is on all displays. - */ - if (XQuartzIsRootless + Boolean spacePerDisplay = false; #if MAC_OS_X_VERSION_MIN_REQUIRED < 1090 - && (NSAppKitVersionNumber >= 1265 || (frame.origin.x == 0 && frame.origin.y == 0)) + if (NSAppKitVersionNumber >= 1265) #endif - ) { + { + 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; } diff --git a/xserver/hw/xwayland/Makefile.am b/xserver/hw/xwayland/Makefile.am new file mode 100644 index 000000000..4e0e1bb00 --- /dev/null +++ b/xserver/hw/xwayland/Makefile.am @@ -0,0 +1,59 @@ +bin_PROGRAMS = Xwayland + +Xwayland_CFLAGS = \ + -I$(top_srcdir)/glamor \ + -I$(top_srcdir)/dri3 \ + -DHAVE_DIX_CONFIG_H \ + $(XWAYLANDMODULES_CFLAGS) \ + $(DIX_CFLAGS) \ + $(GLAMOR_CFLAGS) \ + $(GBM_CFLAGS) + +Xwayland_SOURCES = \ + xwayland.c \ + xwayland-input.c \ + xwayland-cursor.c \ + xwayland-shm.c \ + xwayland-output.c \ + xwayland-cvt.c \ + xwayland.h \ + $(top_srcdir)/Xext/dpmsstubs.c \ + $(top_srcdir)/Xi/stubs.c \ + $(top_srcdir)/mi/miinitext.c + +Xwayland_LDADD = \ + $(glamor_lib) \ + $(XWAYLAND_LIBS) \ + $(XWAYLAND_SYS_LIBS) \ + $(XSERVER_SYS_LIBS) +Xwayland_DEPENDENCIES = $(XWAYLAND_LIBS) +Xwayland_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) + + +if GLAMOR_EGL +Xwayland_SOURCES += xwayland-glamor.c + +nodist_Xwayland_SOURCES = \ + drm-client-protocol.h \ + drm-protocol.c + +CLEANFILES = $(nodist_Xwayland_SOURCES) + +xwayland-glamor.c : $(nodist_Xwayland_SOURCES) + +glamor_lib = $(top_builddir)/glamor/libglamor.la + +Xwayland_LDADD += $(GLAMOR_LIBS) $(GBM_LIBS) -lEGL -lGL +endif + +EXTRA_DIST = drm.xml + + +relink: + $(AM_V_at)rm -f Xwayland$(EXEEXT) && $(MAKE) Xwayland$(EXEEXT) + +%-protocol.c : %.xml + $(AM_V_GEN)$(WAYLAND_SCANNER) code < $< > $@ + +%-client-protocol.h : %.xml + $(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@ diff --git a/xserver/hw/xwayland/Makefile.in b/xserver/hw/xwayland/Makefile.in new file mode 100644 index 000000000..fde4d0387 --- /dev/null +++ b/xserver/hw/xwayland/Makefile.in @@ -0,0 +1,1037 @@ +# Makefile.in generated by automake 1.12.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2012 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__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } +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 = Xwayland$(EXEEXT) +@GLAMOR_EGL_TRUE@am__append_1 = xwayland-glamor.c +@GLAMOR_EGL_TRUE@am__append_2 = $(GLAMOR_LIBS) $(GBM_LIBS) -lEGL -lGL +subdir = hw/xwayland +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ + $(top_srcdir)/depcomp +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.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)/m4/xorg-tls.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +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/kdrive-config.h \ + $(top_builddir)/include/version-config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +am__installdirs = "$(DESTDIR)$(bindir)" +PROGRAMS = $(bin_PROGRAMS) +am__Xwayland_SOURCES_DIST = xwayland.c xwayland-input.c \ + xwayland-cursor.c xwayland-shm.c xwayland-output.c \ + xwayland-cvt.c xwayland.h $(top_srcdir)/Xext/dpmsstubs.c \ + $(top_srcdir)/Xi/stubs.c $(top_srcdir)/mi/miinitext.c \ + xwayland-glamor.c +@GLAMOR_EGL_TRUE@am__objects_1 = Xwayland-xwayland-glamor.$(OBJEXT) +am_Xwayland_OBJECTS = Xwayland-xwayland.$(OBJEXT) \ + Xwayland-xwayland-input.$(OBJEXT) \ + Xwayland-xwayland-cursor.$(OBJEXT) \ + Xwayland-xwayland-shm.$(OBJEXT) \ + Xwayland-xwayland-output.$(OBJEXT) \ + Xwayland-xwayland-cvt.$(OBJEXT) Xwayland-dpmsstubs.$(OBJEXT) \ + Xwayland-stubs.$(OBJEXT) Xwayland-miinitext.$(OBJEXT) \ + $(am__objects_1) +@GLAMOR_EGL_TRUE@nodist_Xwayland_OBJECTS = \ +@GLAMOR_EGL_TRUE@ Xwayland-drm-protocol.$(OBJEXT) +Xwayland_OBJECTS = $(am_Xwayland_OBJECTS) $(nodist_Xwayland_OBJECTS) +am__DEPENDENCIES_1 = +@GLAMOR_EGL_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) \ +@GLAMOR_EGL_TRUE@ $(am__DEPENDENCIES_1) +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 = +Xwayland_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CCLD) $(Xwayland_CFLAGS) \ + $(CFLAGS) $(Xwayland_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__depfiles_maybe = depfiles +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 = $(Xwayland_SOURCES) $(nodist_Xwayland_SOURCES) +DIST_SOURCES = $(am__Xwayland_SOURCES_DIST) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +ETAGS = etags +CTAGS = ctags +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@ +BUILD_DATE = @BUILD_DATE@ +BUILD_TIME = @BUILD_TIME@ +BUNDLE_ID_PREFIX = @BUNDLE_ID_PREFIX@ +CC = @CC@ +CCAS = @CCAS@ +CCASDEPMODE = @CCASDEPMODE@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +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@ +DMXEXAMPLES_DEP_CFLAGS = @DMXEXAMPLES_DEP_CFLAGS@ +DMXEXAMPLES_DEP_LIBS = @DMXEXAMPLES_DEP_LIBS@ +DMXMODULES_CFLAGS = @DMXMODULES_CFLAGS@ +DMXMODULES_LIBS = @DMXMODULES_LIBS@ +DMXXIEXAMPLES_DEP_CFLAGS = @DMXXIEXAMPLES_DEP_CFLAGS@ +DMXXIEXAMPLES_DEP_LIBS = @DMXXIEXAMPLES_DEP_LIBS@ +DMXXMUEXAMPLES_DEP_CFLAGS = @DMXXMUEXAMPLES_DEP_CFLAGS@ +DMXXMUEXAMPLES_DEP_LIBS = @DMXXMUEXAMPLES_DEP_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@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +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@ +GLX_TLS = @GLX_TLS@ +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_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@ +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@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +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@ +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@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_LIBS = @TSLIB_LIBS@ +UDEV_CFLAGS = @UDEV_CFLAGS@ +UDEV_LIBS = @UDEV_LIBS@ +UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ +WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ +WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ +WINDRES = @WINDRES@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMXCONFIG_DEP_CFLAGS = @XDMXCONFIG_DEP_CFLAGS@ +XDMXCONFIG_DEP_LIBS = @XDMXCONFIG_DEP_LIBS@ +XDMX_CFLAGS = @XDMX_CFLAGS@ +XDMX_LIBS = @XDMX_LIBS@ +XDMX_SYS_LIBS = @XDMX_SYS_LIBS@ +XEPHYR_CFLAGS = @XEPHYR_CFLAGS@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XF86CONFIGDIR = @XF86CONFIGDIR@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +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@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +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@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_LIBS = @XVFB_LIBS@ +XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_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@ +__XCONFIGDIR__ = @__XCONFIGDIR__@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +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@ +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@ +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@ +Xwayland_CFLAGS = \ + -I$(top_srcdir)/glamor \ + -I$(top_srcdir)/dri3 \ + -DHAVE_DIX_CONFIG_H \ + $(XWAYLANDMODULES_CFLAGS) \ + $(DIX_CFLAGS) \ + $(GLAMOR_CFLAGS) \ + $(GBM_CFLAGS) + +Xwayland_SOURCES = xwayland.c xwayland-input.c xwayland-cursor.c \ + xwayland-shm.c xwayland-output.c xwayland-cvt.c xwayland.h \ + $(top_srcdir)/Xext/dpmsstubs.c $(top_srcdir)/Xi/stubs.c \ + $(top_srcdir)/mi/miinitext.c $(am__append_1) +Xwayland_LDADD = $(glamor_lib) $(XWAYLAND_LIBS) $(XWAYLAND_SYS_LIBS) \ + $(XSERVER_SYS_LIBS) $(am__append_2) +Xwayland_DEPENDENCIES = $(XWAYLAND_LIBS) +Xwayland_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) +@GLAMOR_EGL_TRUE@nodist_Xwayland_SOURCES = \ +@GLAMOR_EGL_TRUE@ drm-client-protocol.h \ +@GLAMOR_EGL_TRUE@ drm-protocol.c + +@GLAMOR_EGL_TRUE@CLEANFILES = $(nodist_Xwayland_SOURCES) +@GLAMOR_EGL_TRUE@glamor_lib = $(top_builddir)/glamor/libglamor.la +EXTRA_DIST = drm.xml +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/xwayland/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign hw/xwayland/Makefile +.PRECIOUS: 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__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + 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 +Xwayland$(EXEEXT): $(Xwayland_OBJECTS) $(Xwayland_DEPENDENCIES) $(EXTRA_Xwayland_DEPENDENCIES) + @rm -f Xwayland$(EXEEXT) + $(AM_V_CCLD)$(Xwayland_LINK) $(Xwayland_OBJECTS) $(Xwayland_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xwayland-dpmsstubs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xwayland-drm-protocol.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xwayland-miinitext.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xwayland-stubs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xwayland-xwayland-cursor.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xwayland-xwayland-cvt.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xwayland-xwayland-glamor.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xwayland-xwayland-input.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xwayland-xwayland-output.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xwayland-xwayland-shm.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Xwayland-xwayland.Po@am__quote@ + +.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 $< + +.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 `$(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 $@ $< + +Xwayland-xwayland.o: xwayland.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-xwayland.o -MD -MP -MF $(DEPDIR)/Xwayland-xwayland.Tpo -c -o Xwayland-xwayland.o `test -f 'xwayland.c' || echo '$(srcdir)/'`xwayland.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-xwayland.Tpo $(DEPDIR)/Xwayland-xwayland.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xwayland.c' object='Xwayland-xwayland.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) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-xwayland.o `test -f 'xwayland.c' || echo '$(srcdir)/'`xwayland.c + +Xwayland-xwayland.obj: xwayland.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-xwayland.obj -MD -MP -MF $(DEPDIR)/Xwayland-xwayland.Tpo -c -o Xwayland-xwayland.obj `if test -f 'xwayland.c'; then $(CYGPATH_W) 'xwayland.c'; else $(CYGPATH_W) '$(srcdir)/xwayland.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-xwayland.Tpo $(DEPDIR)/Xwayland-xwayland.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xwayland.c' object='Xwayland-xwayland.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) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-xwayland.obj `if test -f 'xwayland.c'; then $(CYGPATH_W) 'xwayland.c'; else $(CYGPATH_W) '$(srcdir)/xwayland.c'; fi` + +Xwayland-xwayland-input.o: xwayland-input.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-xwayland-input.o -MD -MP -MF $(DEPDIR)/Xwayland-xwayland-input.Tpo -c -o Xwayland-xwayland-input.o `test -f 'xwayland-input.c' || echo '$(srcdir)/'`xwayland-input.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-xwayland-input.Tpo $(DEPDIR)/Xwayland-xwayland-input.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xwayland-input.c' object='Xwayland-xwayland-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) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-xwayland-input.o `test -f 'xwayland-input.c' || echo '$(srcdir)/'`xwayland-input.c + +Xwayland-xwayland-input.obj: xwayland-input.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-xwayland-input.obj -MD -MP -MF $(DEPDIR)/Xwayland-xwayland-input.Tpo -c -o Xwayland-xwayland-input.obj `if test -f 'xwayland-input.c'; then $(CYGPATH_W) 'xwayland-input.c'; else $(CYGPATH_W) '$(srcdir)/xwayland-input.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-xwayland-input.Tpo $(DEPDIR)/Xwayland-xwayland-input.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xwayland-input.c' object='Xwayland-xwayland-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) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-xwayland-input.obj `if test -f 'xwayland-input.c'; then $(CYGPATH_W) 'xwayland-input.c'; else $(CYGPATH_W) '$(srcdir)/xwayland-input.c'; fi` + +Xwayland-xwayland-cursor.o: xwayland-cursor.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-xwayland-cursor.o -MD -MP -MF $(DEPDIR)/Xwayland-xwayland-cursor.Tpo -c -o Xwayland-xwayland-cursor.o `test -f 'xwayland-cursor.c' || echo '$(srcdir)/'`xwayland-cursor.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-xwayland-cursor.Tpo $(DEPDIR)/Xwayland-xwayland-cursor.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xwayland-cursor.c' object='Xwayland-xwayland-cursor.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) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-xwayland-cursor.o `test -f 'xwayland-cursor.c' || echo '$(srcdir)/'`xwayland-cursor.c + +Xwayland-xwayland-cursor.obj: xwayland-cursor.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-xwayland-cursor.obj -MD -MP -MF $(DEPDIR)/Xwayland-xwayland-cursor.Tpo -c -o Xwayland-xwayland-cursor.obj `if test -f 'xwayland-cursor.c'; then $(CYGPATH_W) 'xwayland-cursor.c'; else $(CYGPATH_W) '$(srcdir)/xwayland-cursor.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-xwayland-cursor.Tpo $(DEPDIR)/Xwayland-xwayland-cursor.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xwayland-cursor.c' object='Xwayland-xwayland-cursor.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) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-xwayland-cursor.obj `if test -f 'xwayland-cursor.c'; then $(CYGPATH_W) 'xwayland-cursor.c'; else $(CYGPATH_W) '$(srcdir)/xwayland-cursor.c'; fi` + +Xwayland-xwayland-shm.o: xwayland-shm.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-xwayland-shm.o -MD -MP -MF $(DEPDIR)/Xwayland-xwayland-shm.Tpo -c -o Xwayland-xwayland-shm.o `test -f 'xwayland-shm.c' || echo '$(srcdir)/'`xwayland-shm.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-xwayland-shm.Tpo $(DEPDIR)/Xwayland-xwayland-shm.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xwayland-shm.c' object='Xwayland-xwayland-shm.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) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-xwayland-shm.o `test -f 'xwayland-shm.c' || echo '$(srcdir)/'`xwayland-shm.c + +Xwayland-xwayland-shm.obj: xwayland-shm.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-xwayland-shm.obj -MD -MP -MF $(DEPDIR)/Xwayland-xwayland-shm.Tpo -c -o Xwayland-xwayland-shm.obj `if test -f 'xwayland-shm.c'; then $(CYGPATH_W) 'xwayland-shm.c'; else $(CYGPATH_W) '$(srcdir)/xwayland-shm.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-xwayland-shm.Tpo $(DEPDIR)/Xwayland-xwayland-shm.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xwayland-shm.c' object='Xwayland-xwayland-shm.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) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-xwayland-shm.obj `if test -f 'xwayland-shm.c'; then $(CYGPATH_W) 'xwayland-shm.c'; else $(CYGPATH_W) '$(srcdir)/xwayland-shm.c'; fi` + +Xwayland-xwayland-output.o: xwayland-output.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-xwayland-output.o -MD -MP -MF $(DEPDIR)/Xwayland-xwayland-output.Tpo -c -o Xwayland-xwayland-output.o `test -f 'xwayland-output.c' || echo '$(srcdir)/'`xwayland-output.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-xwayland-output.Tpo $(DEPDIR)/Xwayland-xwayland-output.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xwayland-output.c' object='Xwayland-xwayland-output.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) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-xwayland-output.o `test -f 'xwayland-output.c' || echo '$(srcdir)/'`xwayland-output.c + +Xwayland-xwayland-output.obj: xwayland-output.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-xwayland-output.obj -MD -MP -MF $(DEPDIR)/Xwayland-xwayland-output.Tpo -c -o Xwayland-xwayland-output.obj `if test -f 'xwayland-output.c'; then $(CYGPATH_W) 'xwayland-output.c'; else $(CYGPATH_W) '$(srcdir)/xwayland-output.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-xwayland-output.Tpo $(DEPDIR)/Xwayland-xwayland-output.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xwayland-output.c' object='Xwayland-xwayland-output.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) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-xwayland-output.obj `if test -f 'xwayland-output.c'; then $(CYGPATH_W) 'xwayland-output.c'; else $(CYGPATH_W) '$(srcdir)/xwayland-output.c'; fi` + +Xwayland-xwayland-cvt.o: xwayland-cvt.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-xwayland-cvt.o -MD -MP -MF $(DEPDIR)/Xwayland-xwayland-cvt.Tpo -c -o Xwayland-xwayland-cvt.o `test -f 'xwayland-cvt.c' || echo '$(srcdir)/'`xwayland-cvt.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-xwayland-cvt.Tpo $(DEPDIR)/Xwayland-xwayland-cvt.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xwayland-cvt.c' object='Xwayland-xwayland-cvt.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) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-xwayland-cvt.o `test -f 'xwayland-cvt.c' || echo '$(srcdir)/'`xwayland-cvt.c + +Xwayland-xwayland-cvt.obj: xwayland-cvt.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-xwayland-cvt.obj -MD -MP -MF $(DEPDIR)/Xwayland-xwayland-cvt.Tpo -c -o Xwayland-xwayland-cvt.obj `if test -f 'xwayland-cvt.c'; then $(CYGPATH_W) 'xwayland-cvt.c'; else $(CYGPATH_W) '$(srcdir)/xwayland-cvt.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-xwayland-cvt.Tpo $(DEPDIR)/Xwayland-xwayland-cvt.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xwayland-cvt.c' object='Xwayland-xwayland-cvt.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) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-xwayland-cvt.obj `if test -f 'xwayland-cvt.c'; then $(CYGPATH_W) 'xwayland-cvt.c'; else $(CYGPATH_W) '$(srcdir)/xwayland-cvt.c'; fi` + +Xwayland-dpmsstubs.o: $(top_srcdir)/Xext/dpmsstubs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-dpmsstubs.o -MD -MP -MF $(DEPDIR)/Xwayland-dpmsstubs.Tpo -c -o Xwayland-dpmsstubs.o `test -f '$(top_srcdir)/Xext/dpmsstubs.c' || echo '$(srcdir)/'`$(top_srcdir)/Xext/dpmsstubs.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-dpmsstubs.Tpo $(DEPDIR)/Xwayland-dpmsstubs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/Xext/dpmsstubs.c' object='Xwayland-dpmsstubs.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) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-dpmsstubs.o `test -f '$(top_srcdir)/Xext/dpmsstubs.c' || echo '$(srcdir)/'`$(top_srcdir)/Xext/dpmsstubs.c + +Xwayland-dpmsstubs.obj: $(top_srcdir)/Xext/dpmsstubs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-dpmsstubs.obj -MD -MP -MF $(DEPDIR)/Xwayland-dpmsstubs.Tpo -c -o Xwayland-dpmsstubs.obj `if test -f '$(top_srcdir)/Xext/dpmsstubs.c'; then $(CYGPATH_W) '$(top_srcdir)/Xext/dpmsstubs.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/Xext/dpmsstubs.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-dpmsstubs.Tpo $(DEPDIR)/Xwayland-dpmsstubs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/Xext/dpmsstubs.c' object='Xwayland-dpmsstubs.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) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-dpmsstubs.obj `if test -f '$(top_srcdir)/Xext/dpmsstubs.c'; then $(CYGPATH_W) '$(top_srcdir)/Xext/dpmsstubs.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/Xext/dpmsstubs.c'; fi` + +Xwayland-stubs.o: $(top_srcdir)/Xi/stubs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-stubs.o -MD -MP -MF $(DEPDIR)/Xwayland-stubs.Tpo -c -o Xwayland-stubs.o `test -f '$(top_srcdir)/Xi/stubs.c' || echo '$(srcdir)/'`$(top_srcdir)/Xi/stubs.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-stubs.Tpo $(DEPDIR)/Xwayland-stubs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/Xi/stubs.c' object='Xwayland-stubs.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) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-stubs.o `test -f '$(top_srcdir)/Xi/stubs.c' || echo '$(srcdir)/'`$(top_srcdir)/Xi/stubs.c + +Xwayland-stubs.obj: $(top_srcdir)/Xi/stubs.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-stubs.obj -MD -MP -MF $(DEPDIR)/Xwayland-stubs.Tpo -c -o Xwayland-stubs.obj `if test -f '$(top_srcdir)/Xi/stubs.c'; then $(CYGPATH_W) '$(top_srcdir)/Xi/stubs.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/Xi/stubs.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-stubs.Tpo $(DEPDIR)/Xwayland-stubs.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/Xi/stubs.c' object='Xwayland-stubs.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) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-stubs.obj `if test -f '$(top_srcdir)/Xi/stubs.c'; then $(CYGPATH_W) '$(top_srcdir)/Xi/stubs.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/Xi/stubs.c'; fi` + +Xwayland-miinitext.o: $(top_srcdir)/mi/miinitext.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-miinitext.o -MD -MP -MF $(DEPDIR)/Xwayland-miinitext.Tpo -c -o Xwayland-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)/Xwayland-miinitext.Tpo $(DEPDIR)/Xwayland-miinitext.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/mi/miinitext.c' object='Xwayland-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) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-miinitext.o `test -f '$(top_srcdir)/mi/miinitext.c' || echo '$(srcdir)/'`$(top_srcdir)/mi/miinitext.c + +Xwayland-miinitext.obj: $(top_srcdir)/mi/miinitext.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-miinitext.obj -MD -MP -MF $(DEPDIR)/Xwayland-miinitext.Tpo -c -o Xwayland-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)/Xwayland-miinitext.Tpo $(DEPDIR)/Xwayland-miinitext.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/mi/miinitext.c' object='Xwayland-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) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-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` + +Xwayland-xwayland-glamor.o: xwayland-glamor.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-xwayland-glamor.o -MD -MP -MF $(DEPDIR)/Xwayland-xwayland-glamor.Tpo -c -o Xwayland-xwayland-glamor.o `test -f 'xwayland-glamor.c' || echo '$(srcdir)/'`xwayland-glamor.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-xwayland-glamor.Tpo $(DEPDIR)/Xwayland-xwayland-glamor.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xwayland-glamor.c' object='Xwayland-xwayland-glamor.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) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-xwayland-glamor.o `test -f 'xwayland-glamor.c' || echo '$(srcdir)/'`xwayland-glamor.c + +Xwayland-xwayland-glamor.obj: xwayland-glamor.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-xwayland-glamor.obj -MD -MP -MF $(DEPDIR)/Xwayland-xwayland-glamor.Tpo -c -o Xwayland-xwayland-glamor.obj `if test -f 'xwayland-glamor.c'; then $(CYGPATH_W) 'xwayland-glamor.c'; else $(CYGPATH_W) '$(srcdir)/xwayland-glamor.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-xwayland-glamor.Tpo $(DEPDIR)/Xwayland-xwayland-glamor.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xwayland-glamor.c' object='Xwayland-xwayland-glamor.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) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-xwayland-glamor.obj `if test -f 'xwayland-glamor.c'; then $(CYGPATH_W) 'xwayland-glamor.c'; else $(CYGPATH_W) '$(srcdir)/xwayland-glamor.c'; fi` + +Xwayland-drm-protocol.o: drm-protocol.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-drm-protocol.o -MD -MP -MF $(DEPDIR)/Xwayland-drm-protocol.Tpo -c -o Xwayland-drm-protocol.o `test -f 'drm-protocol.c' || echo '$(srcdir)/'`drm-protocol.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-drm-protocol.Tpo $(DEPDIR)/Xwayland-drm-protocol.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='drm-protocol.c' object='Xwayland-drm-protocol.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) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-drm-protocol.o `test -f 'drm-protocol.c' || echo '$(srcdir)/'`drm-protocol.c + +Xwayland-drm-protocol.obj: drm-protocol.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(Xwayland_CFLAGS) $(CFLAGS) -MT Xwayland-drm-protocol.obj -MD -MP -MF $(DEPDIR)/Xwayland-drm-protocol.Tpo -c -o Xwayland-drm-protocol.obj `if test -f 'drm-protocol.c'; then $(CYGPATH_W) 'drm-protocol.c'; else $(CYGPATH_W) '$(srcdir)/drm-protocol.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/Xwayland-drm-protocol.Tpo $(DEPDIR)/Xwayland-drm-protocol.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='drm-protocol.c' object='Xwayland-drm-protocol.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) $(Xwayland_CFLAGS) $(CFLAGS) -c -o Xwayland-drm-protocol.obj `if test -f 'drm-protocol.c'; then $(CYGPATH_W) 'drm-protocol.c'; else $(CYGPATH_W) '$(srcdir)/drm-protocol.c'; fi` + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + set x; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + 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 +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in files) print i; }; }'`; \ + 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: $(HEADERS) $(SOURCES) $(LISP) + list='$(SOURCES) $(HEADERS) $(LISP)'; \ + 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: $(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: + -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 mostlyclean-am + +distclean: distclean-am + -rm -rf ./$(DEPDIR) + -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 -rf ./$(DEPDIR) + -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 all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool cscopelist ctags 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 uninstall uninstall-am uninstall-binPROGRAMS + + +@GLAMOR_EGL_TRUE@xwayland-glamor.c : $(nodist_Xwayland_SOURCES) + +relink: + $(AM_V_at)rm -f Xwayland$(EXEEXT) && $(MAKE) Xwayland$(EXEEXT) + +%-protocol.c : %.xml + $(AM_V_GEN)$(WAYLAND_SCANNER) code < $< > $@ + +%-client-protocol.h : %.xml + $(AM_V_GEN)$(WAYLAND_SCANNER) client-header < $< > $@ + +# 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: diff --git a/xserver/hw/xwayland/drm.xml b/xserver/hw/xwayland/drm.xml new file mode 100644 index 000000000..8a3ad69b2 --- /dev/null +++ b/xserver/hw/xwayland/drm.xml @@ -0,0 +1,182 @@ +<?xml version="1.0" encoding="UTF-8"?> +<protocol name="drm"> + + <copyright> + Copyright © 2008-2011 Kristian Høgsberg + Copyright © 2010-2011 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\n the above copyright 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> + + <!-- drm support. This object is created by the server and published + using the display's global event. --> + <interface name="wl_drm" version="2"> + <enum name="error"> + <entry name="authenticate_fail" value="0"/> + <entry name="invalid_format" value="1"/> + <entry name="invalid_name" value="2"/> + </enum> + + <enum name="format"> + <!-- The drm format codes match the #defines in drm_fourcc.h. + The formats actually supported by the compositor will be + reported by the format event. --> + <entry name="c8" value="0x20203843"/> + <entry name="rgb332" value="0x38424752"/> + <entry name="bgr233" value="0x38524742"/> + <entry name="xrgb4444" value="0x32315258"/> + <entry name="xbgr4444" value="0x32314258"/> + <entry name="rgbx4444" value="0x32315852"/> + <entry name="bgrx4444" value="0x32315842"/> + <entry name="argb4444" value="0x32315241"/> + <entry name="abgr4444" value="0x32314241"/> + <entry name="rgba4444" value="0x32314152"/> + <entry name="bgra4444" value="0x32314142"/> + <entry name="xrgb1555" value="0x35315258"/> + <entry name="xbgr1555" value="0x35314258"/> + <entry name="rgbx5551" value="0x35315852"/> + <entry name="bgrx5551" value="0x35315842"/> + <entry name="argb1555" value="0x35315241"/> + <entry name="abgr1555" value="0x35314241"/> + <entry name="rgba5551" value="0x35314152"/> + <entry name="bgra5551" value="0x35314142"/> + <entry name="rgb565" value="0x36314752"/> + <entry name="bgr565" value="0x36314742"/> + <entry name="rgb888" value="0x34324752"/> + <entry name="bgr888" value="0x34324742"/> + <entry name="xrgb8888" value="0x34325258"/> + <entry name="xbgr8888" value="0x34324258"/> + <entry name="rgbx8888" value="0x34325852"/> + <entry name="bgrx8888" value="0x34325842"/> + <entry name="argb8888" value="0x34325241"/> + <entry name="abgr8888" value="0x34324241"/> + <entry name="rgba8888" value="0x34324152"/> + <entry name="bgra8888" value="0x34324142"/> + <entry name="xrgb2101010" value="0x30335258"/> + <entry name="xbgr2101010" value="0x30334258"/> + <entry name="rgbx1010102" value="0x30335852"/> + <entry name="bgrx1010102" value="0x30335842"/> + <entry name="argb2101010" value="0x30335241"/> + <entry name="abgr2101010" value="0x30334241"/> + <entry name="rgba1010102" value="0x30334152"/> + <entry name="bgra1010102" value="0x30334142"/> + <entry name="yuyv" value="0x56595559"/> + <entry name="yvyu" value="0x55595659"/> + <entry name="uyvy" value="0x59565955"/> + <entry name="vyuy" value="0x59555956"/> + <entry name="ayuv" value="0x56555941"/> + <entry name="nv12" value="0x3231564e"/> + <entry name="nv21" value="0x3132564e"/> + <entry name="nv16" value="0x3631564e"/> + <entry name="nv61" value="0x3136564e"/> + <entry name="yuv410" value="0x39565559"/> + <entry name="yvu410" value="0x39555659"/> + <entry name="yuv411" value="0x31315559"/> + <entry name="yvu411" value="0x31315659"/> + <entry name="yuv420" value="0x32315559"/> + <entry name="yvu420" value="0x32315659"/> + <entry name="yuv422" value="0x36315559"/> + <entry name="yvu422" value="0x36315659"/> + <entry name="yuv444" value="0x34325559"/> + <entry name="yvu444" value="0x34325659"/> + </enum> + + <!-- Call this request with the magic received from drmGetMagic(). + It will be passed on to the drmAuthMagic() or + DRIAuthConnection() call. This authentication must be + completed before create_buffer could be used. --> + <request name="authenticate"> + <arg name="id" type="uint"/> + </request> + + <!-- Create a wayland buffer for the named DRM buffer. The DRM + surface must have a name using the flink ioctl --> + <request name="create_buffer"> + <arg name="id" type="new_id" interface="wl_buffer"/> + <arg name="name" type="uint"/> + <arg name="width" type="int"/> + <arg name="height" type="int"/> + <arg name="stride" type="uint"/> + <arg name="format" type="uint"/> + </request> + + <!-- Create a wayland buffer for the named DRM buffer. The DRM + surface must have a name using the flink ioctl --> + <request name="create_planar_buffer"> + <arg name="id" type="new_id" interface="wl_buffer"/> + <arg name="name" type="uint"/> + <arg name="width" type="int"/> + <arg name="height" type="int"/> + <arg name="format" type="uint"/> + <arg name="offset0" type="int"/> + <arg name="stride0" type="int"/> + <arg name="offset1" type="int"/> + <arg name="stride1" type="int"/> + <arg name="offset2" type="int"/> + <arg name="stride2" type="int"/> + </request> + + <!-- Create a wayland buffer for the prime fd. Use for regular and planar + buffers. Pass 0 for offset and stride for unused planes. --> + <request name="create_prime_buffer" since="2"> + <arg name="id" type="new_id" interface="wl_buffer"/> + <arg name="name" type="fd"/> + <arg name="width" type="int"/> + <arg name="height" type="int"/> + <arg name="format" type="uint"/> + <arg name="offset0" type="int"/> + <arg name="stride0" type="int"/> + <arg name="offset1" type="int"/> + <arg name="stride1" type="int"/> + <arg name="offset2" type="int"/> + <arg name="stride2" type="int"/> + </request> + + <!-- Notification of the path of the drm device which is used by + the server. The client should use this device for creating + local buffers. Only buffers created from this device should + be be passed to the server using this drm object's + create_buffer request. --> + <event name="device"> + <arg name="name" type="string"/> + </event> + + <event name="format"> + <arg name="format" type="uint"/> + </event> + + <!-- Raised if the authenticate request succeeded --> + <event name="authenticated"/> + + <enum name="capability" since="2"> + <description summary="wl_drm capability bitmask"> + Bitmask of capabilities. + </description> + <entry name="prime" value="1" summary="wl_drm prime available"/> + </enum> + + <event name="capabilities"> + <arg name="value" type="uint"/> + </event> + </interface> + +</protocol> diff --git a/xserver/hw/xwayland/xwayland-cursor.c b/xserver/hw/xwayland/xwayland-cursor.c new file mode 100644 index 000000000..5a9d1fe70 --- /dev/null +++ b/xserver/hw/xwayland/xwayland-cursor.c @@ -0,0 +1,193 @@ +/* + * Copyright © 2014 Intel Corporation + * Copyright © 2011 Kristian Høgsberg + * + * Permission to use, copy, modify, distribute, and sell this software + * and its documentation for any purpose is hereby granted without + * fee, provided that the above copyright 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 "xwayland.h" + +#include <mipointer.h> + +static DevPrivateKeyRec xwl_cursor_private_key; + +static void +expand_source_and_mask(CursorPtr cursor, CARD32 *data) +{ + CARD32 *p, d, fg, bg; + CursorBitsPtr bits = cursor->bits; + int x, y, stride, i, bit; + + p = data; + fg = ((cursor->foreRed & 0xff00) << 8) | + (cursor->foreGreen & 0xff00) | (cursor->foreGreen >> 8); + bg = ((cursor->backRed & 0xff00) << 8) | + (cursor->backGreen & 0xff00) | (cursor->backGreen >> 8); + stride = (bits->width / 8 + 3) & ~3; + for (y = 0; y < bits->height; y++) + for (x = 0; x < bits->width; x++) { + i = y * stride + x / 8; + bit = 1 << (x & 7); + if (bits->source[i] & bit) + d = fg; + else + d = bg; + if (bits->mask[i] & bit) + d |= 0xff000000; + else + d = 0x00000000; + + *p++ = d; + } +} + +static Bool +xwl_realize_cursor(DeviceIntPtr device, ScreenPtr screen, CursorPtr cursor) +{ + PixmapPtr pixmap; + + pixmap = xwl_shm_create_pixmap(screen, cursor->bits->width, + cursor->bits->height, 32, 0); + dixSetPrivate(&cursor->devPrivates, &xwl_cursor_private_key, pixmap); + + return TRUE; +} + +static Bool +xwl_unrealize_cursor(DeviceIntPtr device, ScreenPtr screen, CursorPtr cursor) +{ + PixmapPtr pixmap; + + pixmap = dixGetPrivate(&cursor->devPrivates, &xwl_cursor_private_key); + + return xwl_shm_destroy_pixmap(pixmap); +} + +void +xwl_seat_set_cursor(struct xwl_seat *xwl_seat) +{ + PixmapPtr pixmap; + CursorPtr cursor; + int stride; + + if (!xwl_seat->wl_pointer) + return; + + if (!xwl_seat->x_cursor) { + wl_pointer_set_cursor(xwl_seat->wl_pointer, + xwl_seat->pointer_enter_serial, NULL, 0, 0); + return; + } + + cursor = xwl_seat->x_cursor; + pixmap = dixGetPrivate(&cursor->devPrivates, &xwl_cursor_private_key); + stride = cursor->bits->width * 4; + if (cursor->bits->argb) + memcpy(pixmap->devPrivate.ptr, + cursor->bits->argb, cursor->bits->height * stride); + else + expand_source_and_mask(cursor, pixmap->devPrivate.ptr); + + wl_pointer_set_cursor(xwl_seat->wl_pointer, + xwl_seat->pointer_enter_serial, + xwl_seat->cursor, + xwl_seat->x_cursor->bits->xhot, + xwl_seat->x_cursor->bits->yhot); + wl_surface_attach(xwl_seat->cursor, + xwl_shm_pixmap_get_wl_buffer(pixmap), 0, 0); + wl_surface_damage(xwl_seat->cursor, 0, 0, + xwl_seat->x_cursor->bits->width, + xwl_seat->x_cursor->bits->height); + wl_surface_commit(xwl_seat->cursor); +} + +static void +xwl_set_cursor(DeviceIntPtr device, + ScreenPtr screen, CursorPtr cursor, int x, int y) +{ + struct xwl_seat *xwl_seat; + + xwl_seat = device->public.devicePrivate; + if (xwl_seat == NULL) + return; + + xwl_seat->x_cursor = cursor; + xwl_seat_set_cursor(xwl_seat); +} + +static void +xwl_move_cursor(DeviceIntPtr device, ScreenPtr screen, int x, int y) +{ +} + +static Bool +xwl_device_cursor_initialize(DeviceIntPtr device, ScreenPtr screen) +{ + return TRUE; +} + +static void +xwl_device_cursor_cleanup(DeviceIntPtr device, ScreenPtr screen) +{ +} + +static miPointerSpriteFuncRec xwl_pointer_sprite_funcs = { + xwl_realize_cursor, + xwl_unrealize_cursor, + xwl_set_cursor, + xwl_move_cursor, + xwl_device_cursor_initialize, + xwl_device_cursor_cleanup +}; + +static Bool +xwl_cursor_off_screen(ScreenPtr *ppScreen, int *x, int *y) +{ + return FALSE; +} + +static void +xwl_cross_screen(ScreenPtr pScreen, Bool entering) +{ +} + +static void +xwl_pointer_warp_cursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) +{ +} + +static miPointerScreenFuncRec xwl_pointer_screen_funcs = { + xwl_cursor_off_screen, + xwl_cross_screen, + xwl_pointer_warp_cursor +}; + +Bool +xwl_screen_init_cursor(struct xwl_screen *xwl_screen) +{ + if (!dixRegisterPrivateKey(&xwl_cursor_private_key, PRIVATE_CURSOR_BITS, 0)) + return FALSE; + + return miPointerInitialize(xwl_screen->screen, + &xwl_pointer_sprite_funcs, + &xwl_pointer_screen_funcs, TRUE); +} diff --git a/xserver/hw/xwayland/xwayland-cvt.c b/xserver/hw/xwayland/xwayland-cvt.c new file mode 100644 index 000000000..35665597f --- /dev/null +++ b/xserver/hw/xwayland/xwayland-cvt.c @@ -0,0 +1,304 @@ +/* Copied from hw/xfree86/modes/xf86cvt.c into xwayland DDX and + * changed to generate an RRMode */ + +/* + * 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. + */ + +/* + * The reason for having this function in a file of its own is + * so that ../utils/cvt/cvt can link to it, and that xf86CVTMode + * code is shared directly. + */ + +#ifdef HAVE_DIX_CONFIG_H +#include <dix-config.h> +#endif + +#include <string.h> +#include <randrstr.h> +#include "xwayland.h" + +/* + * Generate a CVT standard mode from HDisplay, VDisplay and VRefresh. + * + * These calculations are stolen from the CVT calculation spreadsheet written + * by Graham Loveridge. He seems to be claiming no copyright and there seems to + * be no license attached to this. He apparently just wants to see his name + * mentioned. + * + * This file can be found at http://www.vesa.org/Public/CVT/CVTd6r1.xls + * + * Comments and structure corresponds to the comments and structure of the xls. + * This should ease importing of future changes to the standard (not very + * likely though). + * + * About margins; i'm sure that they are to be the bit between HDisplay and + * HBlankStart, HBlankEnd and HTotal, VDisplay and VBlankStart, VBlankEnd and + * VTotal, where the overscan colour is shown. FB seems to call _all_ blanking + * outside sync "margin" for some reason. Since we prefer seeing proper + * blanking instead of the overscan colour, and since the Crtc* values will + * probably get altered after us, we will disable margins altogether. With + * these calculations, Margins will plainly expand H/VDisplay, and we don't + * want that. -- libv + * + */ +RRModePtr +xwayland_cvt(int HDisplay, int VDisplay, float VRefresh, Bool Reduced, + Bool Interlaced) +{ + /* 1) top/bottom margin size (% of height) - default: 1.8 */ +#define CVT_MARGIN_PERCENTAGE 1.8 + + /* 2) character cell horizontal granularity (pixels) - default 8 */ +#define CVT_H_GRANULARITY 8 + + /* 4) Minimum vertical porch (lines) - default 3 */ +#define CVT_MIN_V_PORCH 3 + + /* 4) Minimum number of vertical back porch lines - default 6 */ +#define CVT_MIN_V_BPORCH 6 + + /* Pixel Clock step (kHz) */ +#define CVT_CLOCK_STEP 250 + + Bool Margins = FALSE; + float VFieldRate, HPeriod; + int HDisplayRnd, HMargin; + int VDisplayRnd, VMargin, VSync; + float Interlace; /* Please rename this */ + char name[128]; + xRRModeInfo modeinfo; + + memset(&modeinfo, 0, sizeof modeinfo); + + /* CVT default is 60.0Hz */ + if (!VRefresh) + VRefresh = 60.0; + + /* 1. Required field rate */ + if (Interlaced) + VFieldRate = VRefresh * 2; + else + VFieldRate = VRefresh; + + /* 2. Horizontal pixels */ + HDisplayRnd = HDisplay - (HDisplay % CVT_H_GRANULARITY); + + /* 3. Determine left and right borders */ + if (Margins) { + /* right margin is actually exactly the same as left */ + HMargin = (((float) HDisplayRnd) * CVT_MARGIN_PERCENTAGE / 100.0); + HMargin -= HMargin % CVT_H_GRANULARITY; + } + else + HMargin = 0; + + /* 4. Find total active pixels */ + modeinfo.width = HDisplayRnd + 2 * HMargin; + + /* 5. Find number of lines per field */ + if (Interlaced) + VDisplayRnd = VDisplay / 2; + else + VDisplayRnd = VDisplay; + + /* 6. Find top and bottom margins */ + /* nope. */ + if (Margins) + /* top and bottom margins are equal again. */ + VMargin = (((float) VDisplayRnd) * CVT_MARGIN_PERCENTAGE / 100.0); + else + VMargin = 0; + + modeinfo.height = VDisplay + 2 * VMargin; + + /* 7. Interlace */ + if (Interlaced) + Interlace = 0.5; + else + Interlace = 0.0; + + /* Determine VSync Width from aspect ratio */ + if (!(VDisplay % 3) && ((VDisplay * 4 / 3) == HDisplay)) + VSync = 4; + else if (!(VDisplay % 9) && ((VDisplay * 16 / 9) == HDisplay)) + VSync = 5; + else if (!(VDisplay % 10) && ((VDisplay * 16 / 10) == HDisplay)) + VSync = 6; + else if (!(VDisplay % 4) && ((VDisplay * 5 / 4) == HDisplay)) + VSync = 7; + else if (!(VDisplay % 9) && ((VDisplay * 15 / 9) == HDisplay)) + VSync = 7; + else /* Custom */ + VSync = 10; + + if (!Reduced) { /* simplified GTF calculation */ + + /* 4) Minimum time of vertical sync + back porch interval (µs) + * default 550.0 */ +#define CVT_MIN_VSYNC_BP 550.0 + + /* 3) Nominal HSync width (% of line period) - default 8 */ +#define CVT_HSYNC_PERCENTAGE 8 + + float HBlankPercentage; + int VSyncAndBackPorch, VBackPorch; + int HBlank; + + /* 8. Estimated Horizontal period */ + HPeriod = ((float) (1000000.0 / VFieldRate - CVT_MIN_VSYNC_BP)) / + (VDisplayRnd + 2 * VMargin + CVT_MIN_V_PORCH + Interlace); + + /* 9. Find number of lines in sync + backporch */ + if (((int) (CVT_MIN_VSYNC_BP / HPeriod) + 1) < + (VSync + CVT_MIN_V_PORCH)) + VSyncAndBackPorch = VSync + CVT_MIN_V_PORCH; + else + VSyncAndBackPorch = (int) (CVT_MIN_VSYNC_BP / HPeriod) + 1; + + /* 10. Find number of lines in back porch */ + VBackPorch = VSyncAndBackPorch - VSync; + (void) VBackPorch; + + /* 11. Find total number of lines in vertical field */ + modeinfo.vTotal = + VDisplayRnd + 2 * VMargin + VSyncAndBackPorch + Interlace + + CVT_MIN_V_PORCH; + + /* 5) Definition of Horizontal blanking time limitation */ + /* Gradient (%/kHz) - default 600 */ +#define CVT_M_FACTOR 600 + + /* Offset (%) - default 40 */ +#define CVT_C_FACTOR 40 + + /* Blanking time scaling factor - default 128 */ +#define CVT_K_FACTOR 128 + + /* Scaling factor weighting - default 20 */ +#define CVT_J_FACTOR 20 + +#define CVT_M_PRIME CVT_M_FACTOR * CVT_K_FACTOR / 256 +#define CVT_C_PRIME (CVT_C_FACTOR - CVT_J_FACTOR) * CVT_K_FACTOR / 256 + \ + CVT_J_FACTOR + + /* 12. Find ideal blanking duty cycle from formula */ + HBlankPercentage = CVT_C_PRIME - CVT_M_PRIME * HPeriod / 1000.0; + + /* 13. Blanking time */ + if (HBlankPercentage < 20) + HBlankPercentage = 20; + + HBlank = modeinfo.width * HBlankPercentage / (100.0 - HBlankPercentage); + HBlank -= HBlank % (2 * CVT_H_GRANULARITY); + + /* 14. Find total number of pixels in a line. */ + modeinfo.hTotal = modeinfo.width + HBlank; + + /* Fill in HSync values */ + modeinfo.hSyncEnd = modeinfo.width + HBlank / 2; + + modeinfo.hSyncStart = modeinfo.hSyncEnd - + (modeinfo.hTotal * CVT_HSYNC_PERCENTAGE) / 100; + modeinfo.hSyncStart += CVT_H_GRANULARITY - + modeinfo.hSyncStart % CVT_H_GRANULARITY; + + /* Fill in VSync values */ + modeinfo.vSyncStart = modeinfo.height + CVT_MIN_V_PORCH; + modeinfo.vSyncEnd = modeinfo.vSyncStart + VSync; + + } + else { /* Reduced blanking */ + /* Minimum vertical blanking interval time (µs) - default 460 */ +#define CVT_RB_MIN_VBLANK 460.0 + + /* Fixed number of clocks for horizontal sync */ +#define CVT_RB_H_SYNC 32.0 + + /* Fixed number of clocks for horizontal blanking */ +#define CVT_RB_H_BLANK 160.0 + + /* Fixed number of lines for vertical front porch - default 3 */ +#define CVT_RB_VFPORCH 3 + + int VBILines; + + /* 8. Estimate Horizontal period. */ + HPeriod = ((float) (1000000.0 / VFieldRate - CVT_RB_MIN_VBLANK)) / + (VDisplayRnd + 2 * VMargin); + + /* 9. Find number of lines in vertical blanking */ + VBILines = ((float) CVT_RB_MIN_VBLANK) / HPeriod + 1; + + /* 10. Check if vertical blanking is sufficient */ + if (VBILines < (CVT_RB_VFPORCH + VSync + CVT_MIN_V_BPORCH)) + VBILines = CVT_RB_VFPORCH + VSync + CVT_MIN_V_BPORCH; + + /* 11. Find total number of lines in vertical field */ + modeinfo.vTotal = VDisplayRnd + 2 * VMargin + Interlace + VBILines; + + /* 12. Find total number of pixels in a line */ + modeinfo.hTotal = modeinfo.width + CVT_RB_H_BLANK; + + /* Fill in HSync values */ + modeinfo.hSyncEnd = modeinfo.width + CVT_RB_H_BLANK / 2; + modeinfo.hSyncStart = modeinfo.hSyncEnd - CVT_RB_H_SYNC; + + /* Fill in VSync values */ + modeinfo.vSyncStart = modeinfo.height + CVT_RB_VFPORCH; + modeinfo.vSyncEnd = modeinfo.vSyncStart + VSync; + } + + /* 15/13. Find pixel clock frequency (kHz for xf86) */ + modeinfo.dotClock = modeinfo.hTotal * 1000.0 / HPeriod; + modeinfo.dotClock -= modeinfo.dotClock % CVT_CLOCK_STEP; + modeinfo.dotClock *= 1000.0; +#if 0 + /* 16/14. Find actual Horizontal Frequency (kHz) */ + modeinfo.hSync = ((float) modeinfo.dotClock) / ((float) modeinfo.hTotal); +#endif + +#if 0 + /* 17/15. Find actual Field rate */ + modeinfo.vRefresh = (1000.0 * ((float) modeinfo.dotClock)) / + ((float) (modeinfo.hTotal * modeinfo.vTotal)); +#endif + + /* 18/16. Find actual vertical frame frequency */ + /* ignore - just set the mode flag for interlaced */ + if (Interlaced) + modeinfo.vTotal *= 2; + + if (Reduced) + modeinfo.modeFlags |= RR_HSyncPositive | RR_VSyncNegative; + else + modeinfo.modeFlags |= RR_HSyncNegative | RR_VSyncPositive; + + if (Interlaced) + modeinfo.modeFlags |= RR_Interlace; + + snprintf(name, sizeof name, "%dx%d@%.1fHz", + modeinfo.width, modeinfo.height, VRefresh); + modeinfo.nameLength = strlen(name); + + return RRModeGet(&modeinfo, name); +} diff --git a/xserver/hw/xwayland/xwayland-glamor.c b/xserver/hw/xwayland/xwayland-glamor.c new file mode 100644 index 000000000..4be883fa3 --- /dev/null +++ b/xserver/hw/xwayland/xwayland-glamor.c @@ -0,0 +1,570 @@ +/* + * Copyright © 2011-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. + */ + +#include "xwayland.h" + +#include <fcntl.h> +#include <sys/stat.h> +#include <xf86drm.h> + +#define MESA_EGL_NO_X11_HEADERS +#include <gbm.h> +#include <epoxy/egl.h> +#include <epoxy/gl.h> + +#include <glamor.h> +#include <glamor_context.h> +#include <dri3.h> +#include "drm-client-protocol.h" + +struct xwl_pixmap { + struct wl_buffer *buffer; + struct gbm_bo *bo; + void *image; + unsigned int texture; +}; + +static void +xwl_glamor_egl_make_current(struct glamor_context *glamor_ctx) +{ + 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 uint32_t +drm_format_for_depth(int depth) +{ + switch (depth) { + case 15: + return WL_DRM_FORMAT_XRGB1555; + case 16: + return WL_DRM_FORMAT_RGB565; + case 24: + return WL_DRM_FORMAT_XRGB8888; + default: + ErrorF("unexpected depth: %d\n", depth); + case 32: + return WL_DRM_FORMAT_ARGB8888; + } +} + +static uint32_t +gbm_format_for_depth(int depth) +{ + switch (depth) { + case 16: + return GBM_FORMAT_RGB565; + case 24: + return GBM_FORMAT_XRGB8888; + default: + ErrorF("unexpected depth: %d\n", depth); + case 32: + return GBM_FORMAT_ARGB8888; + } +} + +void +glamor_egl_screen_init(ScreenPtr screen, struct glamor_context *glamor_ctx) +{ + struct xwl_screen *xwl_screen = xwl_screen_get(screen); + + glamor_ctx->ctx = xwl_screen->egl_context; + glamor_ctx->display = xwl_screen->egl_display; + + glamor_ctx->make_current = xwl_glamor_egl_make_current; + + xwl_screen->glamor_ctx = glamor_ctx; +} + +static PixmapPtr +xwl_glamor_create_pixmap_for_bo(ScreenPtr screen, struct gbm_bo *bo, int depth) +{ + PixmapPtr pixmap; + struct xwl_pixmap *xwl_pixmap; + struct xwl_screen *xwl_screen = xwl_screen_get(screen); + + xwl_pixmap = malloc(sizeof *xwl_pixmap); + if (xwl_pixmap == NULL) + return NULL; + + pixmap = glamor_create_pixmap(screen, + gbm_bo_get_width(bo), + gbm_bo_get_height(bo), + depth, + GLAMOR_CREATE_PIXMAP_NO_TEXTURE); + if (pixmap == NULL) { + free(xwl_pixmap); + return NULL; + } + + if (lastGLContext != xwl_screen->glamor_ctx) { + lastGLContext = xwl_screen->glamor_ctx; + xwl_glamor_egl_make_current(xwl_screen->glamor_ctx); + } + + xwl_pixmap->bo = bo; + xwl_pixmap->buffer = NULL; + xwl_pixmap->image = eglCreateImageKHR(xwl_screen->egl_display, + xwl_screen->egl_context, + EGL_NATIVE_PIXMAP_KHR, + xwl_pixmap->bo, NULL); + + glGenTextures(1, &xwl_pixmap->texture); + glBindTexture(GL_TEXTURE_2D, xwl_pixmap->texture); + glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, xwl_pixmap->image); + glBindTexture(GL_TEXTURE_2D, 0); + + xwl_pixmap_set_private(pixmap, xwl_pixmap); + + glamor_set_pixmap_texture(pixmap, xwl_pixmap->texture); + glamor_set_pixmap_type(pixmap, GLAMOR_TEXTURE_DRM); + + return pixmap; +} + +struct wl_buffer * +xwl_glamor_pixmap_get_wl_buffer(PixmapPtr pixmap) +{ + struct xwl_screen *xwl_screen = xwl_screen_get(pixmap->drawable.pScreen); + struct xwl_pixmap *xwl_pixmap = xwl_pixmap_get(pixmap); + int prime_fd; + + if (xwl_pixmap->buffer) + return xwl_pixmap->buffer; + + prime_fd = gbm_bo_get_fd(xwl_pixmap->bo); + if (prime_fd == -1) + return NULL; + + xwl_pixmap->buffer = + wl_drm_create_prime_buffer(xwl_screen->drm, prime_fd, + pixmap->drawable.width, + pixmap->drawable.height, + drm_format_for_depth(pixmap->drawable.depth), + 0, gbm_bo_get_stride(xwl_pixmap->bo), + 0, 0, + 0, 0); + + close(prime_fd); + + return xwl_pixmap->buffer; +} + +static PixmapPtr +xwl_glamor_create_pixmap(ScreenPtr screen, + int width, int height, int depth, unsigned int hint) +{ + struct xwl_screen *xwl_screen = xwl_screen_get(screen); + struct gbm_bo *bo; + + if (width > 0 && height > 0 && depth >= 15 && + (hint == 0 || + hint == CREATE_PIXMAP_USAGE_BACKING_PIXMAP || + hint == CREATE_PIXMAP_USAGE_SHARED)) { + bo = gbm_bo_create(xwl_screen->gbm, width, height, + gbm_format_for_depth(depth), + GBM_BO_USE_SCANOUT | GBM_BO_USE_RENDERING); + + if (bo) + return xwl_glamor_create_pixmap_for_bo(screen, bo, depth); + } + + return glamor_create_pixmap(screen, width, height, depth, hint); +} + +static Bool +xwl_glamor_destroy_pixmap(PixmapPtr pixmap) +{ + struct xwl_screen *xwl_screen = xwl_screen_get(pixmap->drawable.pScreen); + struct xwl_pixmap *xwl_pixmap = xwl_pixmap_get(pixmap); + + if (xwl_pixmap && pixmap->refcnt == 1) { + if (xwl_pixmap->buffer) + wl_buffer_destroy(xwl_pixmap->buffer); + + eglDestroyImageKHR(xwl_screen->egl_display, xwl_pixmap->image); + gbm_bo_destroy(xwl_pixmap->bo); + free(xwl_pixmap); + } + + return glamor_destroy_pixmap(pixmap); +} + +static Bool +xwl_glamor_create_screen_resources(ScreenPtr screen) +{ + struct xwl_screen *xwl_screen = xwl_screen_get(screen); + int ret; + + screen->CreateScreenResources = xwl_screen->CreateScreenResources; + ret = (*screen->CreateScreenResources) (screen); + xwl_screen->CreateScreenResources = screen->CreateScreenResources; + screen->CreateScreenResources = xwl_glamor_create_screen_resources; + + if (!ret) + return ret; + + if (xwl_screen->rootless) + screen->devPrivate = + fbCreatePixmap(screen, 0, 0, screen->rootDepth, 0); + else { + screen->devPrivate = + xwl_glamor_create_pixmap(screen, screen->width, screen->height, + screen->rootDepth, + CREATE_PIXMAP_USAGE_BACKING_PIXMAP); + if (screen->devPrivate) + glamor_set_screen_pixmap(screen->devPrivate, NULL); + } + + return screen->devPrivate != NULL; +} + +static char +is_fd_render_node(int fd) +{ + struct stat render; + + if (fstat(fd, &render)) + return 0; + if (!S_ISCHR(render.st_mode)) + return 0; + if (render.st_rdev & 0x80) + return 1; + + return 0; +} + +static void +xwl_drm_init_egl(struct xwl_screen *xwl_screen) +{ + EGLint major, minor; + const char *version; + + if (xwl_screen->egl_display) + return; + + xwl_screen->expecting_event--; + + xwl_screen->gbm = gbm_create_device(xwl_screen->drm_fd); + if (xwl_screen->gbm == NULL) { + ErrorF("couldn't get display device\n"); + return; + } + + xwl_screen->egl_display = eglGetDisplay(xwl_screen->gbm); + if (xwl_screen->egl_display == EGL_NO_DISPLAY) { + ErrorF("eglGetDisplay() failed\n"); + return; + } + + eglBindAPI(EGL_OPENGL_API); + if (!eglInitialize(xwl_screen->egl_display, &major, &minor)) { + ErrorF("eglInitialize() failed\n"); + return; + } + + version = eglQueryString(xwl_screen->egl_display, EGL_VERSION); + ErrorF("glamor: EGL version %s:\n", version); + + xwl_screen->egl_context = eglCreateContext(xwl_screen->egl_display, + NULL, EGL_NO_CONTEXT, NULL); + if (xwl_screen->egl_context == EGL_NO_CONTEXT) { + ErrorF("Failed to create EGL context\n"); + return; + } + + if (!eglMakeCurrent(xwl_screen->egl_display, + EGL_NO_SURFACE, EGL_NO_SURFACE, + xwl_screen->egl_context)) { + ErrorF("Failed to make EGL context current\n"); + return; + } + + if (!epoxy_has_gl_extension("GL_OES_EGL_image")) { + ErrorF("GL_OES_EGL_image no available"); + return; + } + + return; +} + +static void +xwl_drm_handle_device(void *data, struct wl_drm *drm, const char *device) +{ + struct xwl_screen *xwl_screen = data; + drm_magic_t magic; + + xwl_screen->device_name = strdup(device); + if (!xwl_screen->device_name) + return; + + xwl_screen->drm_fd = open(xwl_screen->device_name, O_RDWR | O_CLOEXEC); + if (xwl_screen->drm_fd == -1) { + ErrorF("wayland-egl: could not open %s (%s)", + xwl_screen->device_name, strerror(errno)); + return; + } + + if (is_fd_render_node(xwl_screen->drm_fd)) { + xwl_screen->fd_render_node = 1; + xwl_drm_init_egl(xwl_screen); + } else { + drmGetMagic(xwl_screen->drm_fd, &magic); + wl_drm_authenticate(xwl_screen->drm, magic); + } +} + +static void +xwl_drm_handle_format(void *data, struct wl_drm *drm, uint32_t format) +{ + struct xwl_screen *xwl_screen = data; + + switch (format) { + case WL_DRM_FORMAT_ARGB8888: + xwl_screen->formats |= XWL_FORMAT_ARGB8888; + break; + case WL_DRM_FORMAT_XRGB8888: + xwl_screen->formats |= XWL_FORMAT_XRGB8888; + break; + case WL_DRM_FORMAT_RGB565: + xwl_screen->formats |= XWL_FORMAT_RGB565; + break; + } +} + +static void +xwl_drm_handle_authenticated(void *data, struct wl_drm *drm) +{ + struct xwl_screen *xwl_screen = data; + + if (!xwl_screen->egl_display) + xwl_drm_init_egl(xwl_screen); +} + +static void +xwl_drm_handle_capabilities(void *data, struct wl_drm *drm, uint32_t value) +{ + struct xwl_screen *xwl_screen = data; + + xwl_screen->capabilities = value; +} + +static const struct wl_drm_listener xwl_drm_listener = { + xwl_drm_handle_device, + xwl_drm_handle_format, + xwl_drm_handle_authenticated, + xwl_drm_handle_capabilities +}; + +Bool +xwl_screen_init_glamor(struct xwl_screen *xwl_screen, + uint32_t id, uint32_t version) +{ + if (version < 2) + return FALSE; + + xwl_screen->drm = + wl_registry_bind(xwl_screen->registry, id, &wl_drm_interface, 2); + wl_drm_add_listener(xwl_screen->drm, &xwl_drm_listener, xwl_screen); + xwl_screen->expecting_event++; + + return TRUE; +} + +void +glamor_egl_destroy_textured_pixmap(PixmapPtr pixmap) +{ + glamor_destroy_textured_pixmap(pixmap); +} + +int +glamor_egl_dri3_fd_name_from_tex(ScreenPtr screen, + PixmapPtr pixmap, + unsigned int tex, + Bool want_name, CARD16 *stride, CARD32 *size) +{ + return 0; +} + +unsigned int +glamor_egl_create_argb8888_based_texture(ScreenPtr screen, int w, int h) +{ + return 0; +} + +struct xwl_auth_state { + int fd; + ClientPtr client; +}; + +static void +sync_callback(void *data, struct wl_callback *callback, uint32_t serial) +{ + struct xwl_auth_state *state = data; + + dri3_send_open_reply(state->client, state->fd); + AttendClient(state->client); + free(state); + wl_callback_destroy(callback); +} + +static const struct wl_callback_listener sync_listener = { + sync_callback +}; + +static int +xwl_dri3_open_client(ClientPtr client, + ScreenPtr screen, + RRProviderPtr provider, + int *pfd) +{ + struct xwl_screen *xwl_screen = xwl_screen_get(screen); + struct xwl_auth_state *state; + struct wl_callback *callback; + drm_magic_t magic; + int fd; + + fd = open(xwl_screen->device_name, O_RDWR | O_CLOEXEC); + if (fd < 0) + return BadAlloc; + if (xwl_screen->fd_render_node) { + *pfd = fd; + return Success; + } + + state = malloc(sizeof *state); + if (state == NULL) { + close(fd); + return BadAlloc; + } + + state->client = client; + state->fd = fd; + + if (drmGetMagic(state->fd, &magic) < 0) { + close(state->fd); + free(state); + return BadMatch; + } + + wl_drm_authenticate(xwl_screen->drm, magic); + callback = wl_display_sync(xwl_screen->display); + wl_callback_add_listener(callback, &sync_listener, state); + + IgnoreClient(client); + + return Success; +} + +static PixmapPtr +xwl_dri3_pixmap_from_fd(ScreenPtr screen, int fd, + CARD16 width, CARD16 height, CARD16 stride, + CARD8 depth, CARD8 bpp) +{ + struct xwl_screen *xwl_screen = xwl_screen_get(screen); + struct gbm_import_fd_data data; + struct gbm_bo *bo; + PixmapPtr pixmap; + + if (width == 0 || height == 0 || + depth < 15 || bpp != BitsPerPixel(depth) || stride < width * bpp / 8) + return NULL; + + data.fd = fd; + data.width = width; + data.height = height; + data.stride = stride; + data.format = gbm_format_for_depth(depth); + bo = gbm_bo_import(xwl_screen->gbm, GBM_BO_IMPORT_FD, &data, + GBM_BO_USE_SCANOUT | GBM_BO_USE_RENDERING); + if (bo == NULL) + return NULL; + + pixmap = xwl_glamor_create_pixmap_for_bo(screen, bo, depth); + if (pixmap == NULL) { + gbm_bo_destroy(bo); + return NULL; + } + + return pixmap; +} + +static int +xwl_dri3_fd_from_pixmap(ScreenPtr screen, PixmapPtr pixmap, + CARD16 *stride, CARD32 *size) +{ + struct xwl_pixmap *xwl_pixmap; + + xwl_pixmap = xwl_pixmap_get(pixmap); + + *stride = gbm_bo_get_stride(xwl_pixmap->bo); + *size = pixmap->drawable.width * *stride; + + return gbm_bo_get_fd(xwl_pixmap->bo); +} + +static dri3_screen_info_rec xwl_dri3_info = { + .version = 1, + .open = NULL, + .pixmap_from_fd = xwl_dri3_pixmap_from_fd, + .fd_from_pixmap = xwl_dri3_fd_from_pixmap, + .open_client = xwl_dri3_open_client, +}; + +Bool +xwl_glamor_init(struct xwl_screen *xwl_screen) +{ + ScreenPtr screen = xwl_screen->screen; + + if (xwl_screen->egl_context == EGL_NO_CONTEXT) { + ErrorF("Disabling glamor and dri3, EGL setup failed\n"); + return FALSE; + } + + if (!glamor_init(xwl_screen->screen, + GLAMOR_INVERTED_Y_AXIS | + GLAMOR_USE_EGL_SCREEN | + GLAMOR_USE_SCREEN | + GLAMOR_USE_PICTURE_SCREEN)) { + ErrorF("Failed to initialize glamor\n"); + return FALSE; + } + + if (!dri3_screen_init(xwl_screen->screen, &xwl_dri3_info)) { + ErrorF("Failed to initialize dri3\n"); + return FALSE; + } + + xwl_screen->CreateScreenResources = screen->CreateScreenResources; + screen->CreateScreenResources = xwl_glamor_create_screen_resources; + screen->CreatePixmap = xwl_glamor_create_pixmap; + screen->DestroyPixmap = xwl_glamor_destroy_pixmap; + + return TRUE; +} diff --git a/xserver/hw/xwayland/xwayland-input.c b/xserver/hw/xwayland/xwayland-input.c new file mode 100644 index 000000000..990cb82d8 --- /dev/null +++ b/xserver/hw/xwayland/xwayland-input.c @@ -0,0 +1,666 @@ +/* + * Copyright © 2014 Intel Corporation + * Copyright © 2008 Kristian Høgsberg + * + * Permission to use, copy, modify, distribute, and sell this software + * and its documentation for any purpose is hereby granted without + * fee, provided that the above copyright 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 "xwayland.h" + +#include <linux/input.h> + +#include <sys/mman.h> +#include <xkbsrv.h> +#include <xserver-properties.h> +#include <inpututils.h> + +static void +xwl_pointer_control(DeviceIntPtr device, PtrCtrl *ctrl) +{ + /* Nothing to do, dix handles all settings */ +} + +static int +xwl_pointer_proc(DeviceIntPtr device, 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 }; + + switch (what) { + case DEVICE_INIT: + device->public.on = FALSE; + + 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_ABS_X); + axes_labels[1] = XIGetKnownProperty(AXIS_LABEL_PROP_ABS_Y); + + if (!InitValuatorClassDeviceStruct(device, 2, btn_labels, + GetMotionHistorySize(), Absolute)) + return BadValue; + + /* Valuators */ + InitValuatorAxisStruct(device, 0, axes_labels[0], + 0, 0xFFFF, 10000, 0, 10000, Absolute); + InitValuatorAxisStruct(device, 1, axes_labels[1], + 0, 0xFFFF, 10000, 0, 10000, Absolute); + + if (!InitPtrFeedbackClassDeviceStruct(device, xwl_pointer_control)) + return BadValue; + + if (!InitButtonClassDeviceStruct(device, 3, btn_labels, map)) + return BadValue; + + return Success; + + case DEVICE_ON: + device->public.on = TRUE; + return Success; + + case DEVICE_OFF: + case DEVICE_CLOSE: + device->public.on = FALSE; + return Success; + } + + return BadMatch; + +#undef NBUTTONS +#undef NAXES +} + +static void +xwl_keyboard_control(DeviceIntPtr device, KeybdCtrl *ctrl) +{ +} + +static int +xwl_keyboard_proc(DeviceIntPtr device, int what) +{ + struct xwl_seat *xwl_seat = device->public.devicePrivate; + int len; + + switch (what) { + case DEVICE_INIT: + device->public.on = FALSE; + if (xwl_seat->keymap) + len = strnlen(xwl_seat->keymap, xwl_seat->keymap_size); + else + len = 0; + if (!InitKeyboardDeviceStructFromString(device, xwl_seat->keymap, + len, + NULL, xwl_keyboard_control)) + return BadValue; + + return Success; + case DEVICE_ON: + device->public.on = TRUE; + return Success; + + case DEVICE_OFF: + case DEVICE_CLOSE: + device->public.on = FALSE; + return Success; + } + + return BadMatch; +} + +static void +pointer_handle_enter(void *data, struct wl_pointer *pointer, + uint32_t serial, struct wl_surface *surface, + wl_fixed_t sx_w, wl_fixed_t sy_w) +{ + struct xwl_seat *xwl_seat = data; + DeviceIntPtr dev = xwl_seat->pointer; + int i; + int sx = wl_fixed_to_int(sx_w); + int sy = wl_fixed_to_int(sy_w); + ScreenPtr pScreen = xwl_seat->xwl_screen->screen; + ValuatorMask mask; + + xwl_seat->xwl_screen->serial = serial; + xwl_seat->pointer_enter_serial = serial; + + xwl_seat->focus_window = wl_surface_get_user_data(surface); + + (*pScreen->SetCursorPosition) (dev, pScreen, sx, sy, TRUE); + CheckMotion(NULL, GetMaster(dev, MASTER_POINTER)); + + /* Ideally, X clients shouldn't see these button releases. When + * the pointer leaves a window with buttons down, it means that + * the wayland compositor has grabbed the pointer. The button + * release event is consumed by whatever grab in the compositor + * and won't be sent to clients (the X server is a client). + * However, we need to reset X's idea of which buttons are up and + * down, and they're all up (by definition) when the pointer + * enters a window. We should figure out a way to swallow these + * events, perhaps using an X grab whenever the pointer is not in + * any X window, but for now just send the events. */ + valuator_mask_zero(&mask); + for (i = 0; i < dev->button->numButtons; i++) + if (BitIsOn(dev->button->down, i)) + QueuePointerEvents(xwl_seat->pointer, ButtonRelease, i, 0, &mask); +} + +static void +pointer_handle_leave(void *data, struct wl_pointer *pointer, + uint32_t serial, struct wl_surface *surface) +{ + struct xwl_seat *xwl_seat = data; + DeviceIntPtr dev = xwl_seat->pointer; + + xwl_seat->xwl_screen->serial = serial; + + xwl_seat->focus_window = NULL; + CheckMotion(NULL, GetMaster(dev, MASTER_POINTER)); +} + +static void +pointer_handle_motion(void *data, struct wl_pointer *pointer, + uint32_t time, wl_fixed_t sx_w, wl_fixed_t sy_w) +{ + struct xwl_seat *xwl_seat = data; + int32_t dx, dy; + int sx = wl_fixed_to_int(sx_w); + int sy = wl_fixed_to_int(sy_w); + ValuatorMask mask; + + if (!xwl_seat->focus_window) + return; + + dx = xwl_seat->focus_window->window->drawable.x; + dy = xwl_seat->focus_window->window->drawable.y; + + valuator_mask_zero(&mask); + valuator_mask_set(&mask, 0, dx + sx); + valuator_mask_set(&mask, 1, dy + sy); + + QueuePointerEvents(xwl_seat->pointer, MotionNotify, 0, + POINTER_ABSOLUTE | POINTER_SCREEN, &mask); +} + +static void +pointer_handle_button(void *data, struct wl_pointer *pointer, uint32_t serial, + uint32_t time, uint32_t button, uint32_t state) +{ + struct xwl_seat *xwl_seat = data; + int index; + ValuatorMask mask; + + xwl_seat->xwl_screen->serial = serial; + + switch (button) { + case BTN_MIDDLE: + index = 2; + break; + case BTN_RIGHT: + index = 3; + break; + default: + index = button - BTN_LEFT + 1; + break; + } + + valuator_mask_zero(&mask); + QueuePointerEvents(xwl_seat->pointer, + state ? ButtonPress : ButtonRelease, index, 0, &mask); +} + +static void +pointer_handle_axis(void *data, struct wl_pointer *pointer, + uint32_t time, uint32_t axis, wl_fixed_t value) +{ + struct xwl_seat *xwl_seat = data; + int index, count; + int i, val; + const int divisor = 10; + ValuatorMask mask; + + if (time - xwl_seat->scroll_time > 2000) { + xwl_seat->vertical_scroll = 0; + xwl_seat->horizontal_scroll = 0; + } + xwl_seat->scroll_time = time; + + /* FIXME: Need to do proper smooth scrolling here! */ + switch (axis) { + case WL_POINTER_AXIS_VERTICAL_SCROLL: + xwl_seat->vertical_scroll += value / divisor; + val = wl_fixed_to_int(xwl_seat->vertical_scroll); + xwl_seat->vertical_scroll -= wl_fixed_from_int(val); + + if (val <= -1) + index = 4; + else if (val >= 1) + index = 5; + else + return; + break; + case WL_POINTER_AXIS_HORIZONTAL_SCROLL: + xwl_seat->horizontal_scroll += value / divisor; + val = wl_fixed_to_int(xwl_seat->horizontal_scroll); + xwl_seat->horizontal_scroll -= wl_fixed_from_int(val); + + if (val <= -1) + index = 6; + else if (val >= 1) + index = 7; + else + return; + break; + default: + return; + } + + valuator_mask_zero(&mask); + + count = abs(val); + for (i = 0; i < count; i++) { + QueuePointerEvents(xwl_seat->pointer, ButtonPress, index, 0, &mask); + QueuePointerEvents(xwl_seat->pointer, ButtonRelease, index, 0, &mask); + } +} + +static const struct wl_pointer_listener pointer_listener = { + pointer_handle_enter, + pointer_handle_leave, + pointer_handle_motion, + pointer_handle_button, + pointer_handle_axis, +}; + +static void +keyboard_handle_key(void *data, struct wl_keyboard *keyboard, uint32_t serial, + uint32_t time, uint32_t key, uint32_t state) +{ + struct xwl_seat *xwl_seat = data; + uint32_t *k, *end; + ValuatorMask mask; + + xwl_seat->xwl_screen->serial = serial; + + end = (uint32_t *) ((char *) xwl_seat->keys.data + xwl_seat->keys.size); + for (k = xwl_seat->keys.data; k < end; k++) { + if (*k == key) + *k = *--end; + } + xwl_seat->keys.size = (char *) end - (char *) xwl_seat->keys.data; + if (state) { + k = wl_array_add(&xwl_seat->keys, sizeof *k); + *k = key; + } + + valuator_mask_zero(&mask); + QueueKeyboardEvents(xwl_seat->keyboard, + state ? KeyPress : KeyRelease, key + 8, &mask); +} + +static void +keyboard_handle_keymap(void *data, struct wl_keyboard *keyboard, + uint32_t format, int fd, uint32_t size) +{ + struct xwl_seat *xwl_seat = data; + DeviceIntPtr master; + XkbDescPtr xkb; + XkbChangesRec changes = { 0 }; + + if (xwl_seat->keymap) + munmap(xwl_seat->keymap, xwl_seat->keymap_size); + + xwl_seat->keymap_size = size; + xwl_seat->keymap = mmap(NULL, size, PROT_READ, MAP_SHARED, fd, 0); + if (xwl_seat->keymap == MAP_FAILED) { + xwl_seat->keymap_size = 0; + xwl_seat->keymap = NULL; + goto out; + } + + xkb = XkbCompileKeymapFromString(xwl_seat->keyboard, xwl_seat->keymap, + strnlen(xwl_seat->keymap, + xwl_seat->keymap_size)); + if (!xkb) + goto out; + + XkbUpdateDescActions(xkb, xkb->min_key_code, XkbNumKeys(xkb), &changes); + + if (xwl_seat->keyboard->key) + /* Keep the current controls */ + XkbCopyControls(xkb, xwl_seat->keyboard->key->xkbInfo->desc); + + XkbDeviceApplyKeymap(xwl_seat->keyboard, xkb); + + master = GetMaster(xwl_seat->keyboard, MASTER_KEYBOARD); + if (master && master->lastSlave == xwl_seat->keyboard) + XkbDeviceApplyKeymap(master, xkb); + + XkbFreeKeyboard(xkb, XkbAllComponentsMask, TRUE); + + out: + close(fd); +} + +static void +keyboard_handle_enter(void *data, struct wl_keyboard *keyboard, + uint32_t serial, + struct wl_surface *surface, struct wl_array *keys) +{ + struct xwl_seat *xwl_seat = data; + ValuatorMask mask; + uint32_t *k; + + xwl_seat->xwl_screen->serial = serial; + xwl_seat->keyboard_focus = surface; + + wl_array_copy(&xwl_seat->keys, keys); + valuator_mask_zero(&mask); + wl_array_for_each(k, &xwl_seat->keys) + QueueKeyboardEvents(xwl_seat->keyboard, KeyPress, *k + 8, &mask); +} + +static void +keyboard_handle_leave(void *data, struct wl_keyboard *keyboard, + uint32_t serial, struct wl_surface *surface) +{ + struct xwl_seat *xwl_seat = data; + ValuatorMask mask; + uint32_t *k; + + xwl_seat->xwl_screen->serial = serial; + + valuator_mask_zero(&mask); + wl_array_for_each(k, &xwl_seat->keys) + QueueKeyboardEvents(xwl_seat->keyboard, KeyRelease, *k + 8, &mask); + + xwl_seat->keyboard_focus = NULL; +} + +static void +keyboard_handle_modifiers(void *data, struct wl_keyboard *keyboard, + uint32_t serial, uint32_t mods_depressed, + uint32_t mods_latched, uint32_t mods_locked, + uint32_t group) +{ + struct xwl_seat *xwl_seat = data; + DeviceIntPtr dev; + XkbStateRec old_state, *new_state; + xkbStateNotify sn; + CARD16 changed; + + /* We don't need any of this while we have keyboard focus since + the regular key event processing already takes care of setting + our internal state correctly. */ + if (xwl_seat->keyboard_focus) + return; + + for (dev = inputInfo.devices; dev; dev = dev->next) { + if (dev != xwl_seat->keyboard && + dev != GetMaster(xwl_seat->keyboard, MASTER_KEYBOARD)) + continue; + + old_state = dev->key->xkbInfo->state; + new_state = &dev->key->xkbInfo->state; + + new_state->locked_group = group & XkbAllGroupsMask; + new_state->locked_mods = mods_locked & XkbAllModifiersMask; + XkbLatchModifiers(dev, XkbAllModifiersMask, + mods_latched & XkbAllModifiersMask); + + XkbComputeDerivedState(dev->key->xkbInfo); + + changed = XkbStateChangedFlags(&old_state, new_state); + if (!changed) + continue; + + sn.keycode = 0; + sn.eventType = 0; + sn.requestMajor = XkbReqCode; + sn.requestMinor = X_kbLatchLockState; /* close enough */ + sn.changed = changed; + XkbSendStateNotify(dev, &sn); + } +} + +static const struct wl_keyboard_listener keyboard_listener = { + keyboard_handle_keymap, + keyboard_handle_enter, + keyboard_handle_leave, + keyboard_handle_key, + keyboard_handle_modifiers, +}; + +static DeviceIntPtr +add_device(struct xwl_seat *xwl_seat, + const char *driver, DeviceProc device_proc) +{ + DeviceIntPtr dev = NULL; + static Atom type_atom; + char name[32]; + + dev = AddInputDevice(serverClient, device_proc, TRUE); + if (dev == NULL) + return NULL; + + if (type_atom == None) + type_atom = MakeAtom(driver, strlen(driver), TRUE); + snprintf(name, sizeof name, "%s:%d", driver, xwl_seat->id); + AssignTypeAndName(dev, type_atom, name); + dev->public.devicePrivate = xwl_seat; + dev->type = SLAVE; + dev->spriteInfo->spriteOwner = FALSE; + + return dev; +} + +static void +seat_handle_capabilities(void *data, struct wl_seat *seat, + enum wl_seat_capability caps) +{ + struct xwl_seat *xwl_seat = data; + + if (caps & WL_SEAT_CAPABILITY_POINTER && xwl_seat->pointer == NULL) { + xwl_seat->wl_pointer = wl_seat_get_pointer(seat); + wl_pointer_add_listener(xwl_seat->wl_pointer, + &pointer_listener, xwl_seat); + xwl_seat_set_cursor(xwl_seat); + xwl_seat->pointer = + add_device(xwl_seat, "xwayland-pointer", xwl_pointer_proc); + } + else if (!(caps & WL_SEAT_CAPABILITY_POINTER) && xwl_seat->pointer) { + wl_pointer_release(xwl_seat->wl_pointer); + RemoveDevice(xwl_seat->pointer, FALSE); + xwl_seat->pointer = NULL; + } + + if (caps & WL_SEAT_CAPABILITY_KEYBOARD && xwl_seat->keyboard == NULL) { + xwl_seat->wl_keyboard = wl_seat_get_keyboard(seat); + wl_keyboard_add_listener(xwl_seat->wl_keyboard, + &keyboard_listener, xwl_seat); + xwl_seat->keyboard = + add_device(xwl_seat, "xwayland-keyboard", xwl_keyboard_proc); + } + else if (!(caps & WL_SEAT_CAPABILITY_KEYBOARD) && xwl_seat->keyboard) { + wl_keyboard_release(xwl_seat->wl_keyboard); + RemoveDevice(xwl_seat->keyboard, FALSE); + xwl_seat->keyboard = NULL; + } + + xwl_seat->xwl_screen->expecting_event--; + /* FIXME: Touch ... */ +} + +static void +seat_handle_name(void *data, struct wl_seat *seat, + const char *name) +{ + +} + +static const struct wl_seat_listener seat_listener = { + seat_handle_capabilities, + seat_handle_name +}; + +static void +create_input_device(struct xwl_screen *xwl_screen, uint32_t id) +{ + struct xwl_seat *xwl_seat; + + xwl_seat = calloc(sizeof *xwl_seat, 1); + if (xwl_seat == NULL) { + ErrorF("create_input ENOMEM"); + return; + } + + xwl_seat->xwl_screen = xwl_screen; + xorg_list_add(&xwl_seat->link, &xwl_screen->seat_list); + + xwl_seat->seat = + wl_registry_bind(xwl_screen->registry, id, &wl_seat_interface, 3); + xwl_seat->id = id; + + xwl_seat->cursor = wl_compositor_create_surface(xwl_screen->compositor); + wl_seat_add_listener(xwl_seat->seat, &seat_listener, xwl_seat); + wl_array_init(&xwl_seat->keys); +} + +void +xwl_seat_destroy(struct xwl_seat *xwl_seat) +{ + RemoveDevice(xwl_seat->pointer, FALSE); + RemoveDevice(xwl_seat->keyboard, FALSE); + wl_seat_destroy(xwl_seat->seat); + wl_surface_destroy(xwl_seat->cursor); + wl_array_release(&xwl_seat->keys); + free(xwl_seat); +} + +static void +input_handler(void *data, struct wl_registry *registry, uint32_t id, + const char *interface, uint32_t version) +{ + struct xwl_screen *xwl_screen = data; + + if (strcmp(interface, "wl_seat") == 0 && version >= 3) { + create_input_device(xwl_screen, id); + xwl_screen->expecting_event++; + } +} + +static void +global_remove(void *data, struct wl_registry *registry, uint32_t name) +{ +} + +static const struct wl_registry_listener input_listener = { + input_handler, + global_remove, +}; + +Bool +LegalModifier(unsigned int key, DeviceIntPtr pDev) +{ + return TRUE; +} + +void +ProcessInputEvents(void) +{ + mieqProcessInputEvents(); +} + +void +DDXRingBell(int volume, int pitch, int duration) +{ +} + +static WindowPtr +xwl_xy_to_window(ScreenPtr screen, SpritePtr sprite, int x, int y) +{ + struct xwl_seat *xwl_seat = NULL; + DeviceIntPtr device; + + for (device = inputInfo.devices; device; device = device->next) { + if (device->deviceProc == xwl_pointer_proc && + device->spriteInfo->sprite == sprite) { + xwl_seat = device->public.devicePrivate; + break; + } + } + + if (xwl_seat == NULL) { + /* XTEST device */ + sprite->spriteTraceGood = 1; + return sprite->spriteTrace[0]; + } + + if (xwl_seat->focus_window) { + sprite->spriteTraceGood = 2; + sprite->spriteTrace[1] = xwl_seat->focus_window->window; + return miSpriteTrace(sprite, x, y); + } + else { + sprite->spriteTraceGood = 1; + return sprite->spriteTrace[0]; + } +} + +void +InitInput(int argc, char *argv[]) +{ + ScreenPtr pScreen = screenInfo.screens[0]; + struct xwl_screen *xwl_screen = xwl_screen_get(pScreen); + + mieqInit(); + + xwl_screen->input_registry = wl_display_get_registry(xwl_screen->display); + wl_registry_add_listener(xwl_screen->input_registry, &input_listener, + xwl_screen); + + xwl_screen->XYToWindow = pScreen->XYToWindow; + pScreen->XYToWindow = xwl_xy_to_window; + + xwl_screen->expecting_event = 0; + wl_display_roundtrip(xwl_screen->display); + while (xwl_screen->expecting_event) + wl_display_roundtrip(xwl_screen->display); +} + +void +CloseInput(void) +{ + mieqFini(); +} diff --git a/xserver/hw/xwayland/xwayland-output.c b/xserver/hw/xwayland/xwayland-output.c new file mode 100644 index 000000000..778914c61 --- /dev/null +++ b/xserver/hw/xwayland/xwayland-output.c @@ -0,0 +1,226 @@ +/* + * Copyright © 2011-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 "xwayland.h" +#include <randrstr.h> + +static Rotation +wl_transform_to_xrandr(enum wl_output_transform transform) +{ + switch (transform) { + default: + case WL_OUTPUT_TRANSFORM_NORMAL: + return RR_Rotate_0; + case WL_OUTPUT_TRANSFORM_90: + return RR_Rotate_90; + case WL_OUTPUT_TRANSFORM_180: + return RR_Rotate_180; + case WL_OUTPUT_TRANSFORM_270: + return RR_Rotate_270; + case WL_OUTPUT_TRANSFORM_FLIPPED: + return RR_Reflect_X | RR_Rotate_0; + case WL_OUTPUT_TRANSFORM_FLIPPED_90: + return RR_Reflect_X | RR_Rotate_90; + case WL_OUTPUT_TRANSFORM_FLIPPED_180: + return RR_Reflect_X | RR_Rotate_180; + case WL_OUTPUT_TRANSFORM_FLIPPED_270: + return RR_Reflect_X | RR_Rotate_270; + } +} + +static int +wl_subpixel_to_xrandr(int subpixel) +{ + switch (subpixel) { + default: + case WL_OUTPUT_SUBPIXEL_UNKNOWN: + return SubPixelUnknown; + case WL_OUTPUT_SUBPIXEL_NONE: + return SubPixelNone; + case WL_OUTPUT_SUBPIXEL_HORIZONTAL_RGB: + return SubPixelHorizontalRGB; + case WL_OUTPUT_SUBPIXEL_HORIZONTAL_BGR: + return SubPixelHorizontalBGR; + case WL_OUTPUT_SUBPIXEL_VERTICAL_RGB: + return SubPixelVerticalRGB; + case WL_OUTPUT_SUBPIXEL_VERTICAL_BGR: + return SubPixelVerticalBGR; + } +} + +static void +output_handle_geometry(void *data, struct wl_output *wl_output, int x, int y, + int physical_width, int physical_height, int subpixel, + const char *make, const char *model, int transform) +{ + struct xwl_output *xwl_output = data; + + RROutputSetPhysicalSize(xwl_output->randr_output, + physical_width, physical_height); + RROutputSetSubpixelOrder(xwl_output->randr_output, + wl_subpixel_to_xrandr(subpixel)); + xwl_output->x = x; + xwl_output->y = y; + + xwl_output->rotation = wl_transform_to_xrandr(transform); +} + +static void +output_handle_mode(void *data, struct wl_output *wl_output, uint32_t flags, + int width, int height, int refresh) +{ + struct xwl_output *xwl_output = data; + RRModePtr randr_mode; + + if (!(flags & WL_OUTPUT_MODE_CURRENT)) + return; + + xwl_output->width = width; + xwl_output->height = height; + + randr_mode = xwayland_cvt(width, height, refresh / 1000.0, 0, 0); + + RROutputSetModes(xwl_output->randr_output, &randr_mode, 1, 1); + + RRCrtcNotify(xwl_output->randr_crtc, randr_mode, + xwl_output->x, xwl_output->y, + xwl_output->rotation, NULL, 1, &xwl_output->randr_output); +} + +static void +output_handle_done(void *data, struct wl_output *wl_output) +{ + struct xwl_output *xwl_output = data; + struct xwl_screen *xwl_screen = xwl_output->xwl_screen; + int width, height; + + xorg_list_append(&xwl_output->link, &xwl_screen->output_list); + + width = 0; + height = 0; + xorg_list_for_each_entry(xwl_output, &xwl_screen->output_list, link) { + if (width < xwl_output->x + xwl_output->width) + width = xwl_output->x + xwl_output->width; + if (height < xwl_output->y + xwl_output->height) + height = xwl_output->y + xwl_output->height; + } + + xwl_screen->width = width; + xwl_screen->height = height; + RRScreenSizeNotify(xwl_screen->screen); + + xwl_screen->expecting_event--; +} + +static void +output_handle_scale(void *data, struct wl_output *wl_output, int32_t factor) +{ +} + +static const struct wl_output_listener output_listener = { + output_handle_geometry, + output_handle_mode, + output_handle_done, + output_handle_scale +}; + +struct xwl_output * +xwl_output_create(struct xwl_screen *xwl_screen, uint32_t id) +{ + struct xwl_output *xwl_output; + static int serial; + char name[256]; + + xwl_output = calloc(sizeof *xwl_output, 1); + if (xwl_output == NULL) { + ErrorF("create_output ENOMEM"); + return NULL; + } + + xwl_output->output = wl_registry_bind(xwl_screen->registry, id, + &wl_output_interface, 2); + wl_output_add_listener(xwl_output->output, &output_listener, xwl_output); + + if (snprintf(name, sizeof name, "XWAYLAND%d", serial++) < 0) { + ErrorF("create_output ENOMEM"); + free(xwl_output); + return NULL; + } + + xwl_output->xwl_screen = xwl_screen; + xwl_output->randr_crtc = RRCrtcCreate(xwl_screen->screen, xwl_output); + xwl_output->randr_output = RROutputCreate(xwl_screen->screen, name, + strlen(name), xwl_output); + RRCrtcGammaSetSize(xwl_output->randr_crtc, 256); + RROutputSetCrtcs(xwl_output->randr_output, &xwl_output->randr_crtc, 1); + RROutputSetConnection(xwl_output->randr_output, RR_Connected); + + return xwl_output; +} + +void +xwl_output_destroy(struct xwl_output *xwl_output) +{ + wl_output_destroy(xwl_output->output); + RRCrtcDestroy(xwl_output->randr_crtc); + RROutputDestroy(xwl_output->randr_output); + free(xwl_output); +} + +static Bool +xwl_randr_get_info(ScreenPtr pScreen, Rotation * rotations) +{ + *rotations = 0; + + return TRUE; +} + +static Bool +xwl_randr_set_config(ScreenPtr pScreen, + Rotation rotation, int rate, RRScreenSizePtr pSize) +{ + return FALSE; +} + +Bool +xwl_screen_init_output(struct xwl_screen *xwl_screen) +{ + rrScrPrivPtr rp; + + if (!RRScreenInit(xwl_screen->screen)) + return FALSE; + + RRScreenSetSizeRange(xwl_screen->screen, 320, 200, 8192, 8192); + + rp = rrGetScrPriv(xwl_screen->screen); + rp->rrGetInfo = xwl_randr_get_info; + rp->rrSetConfig = xwl_randr_set_config; + + return TRUE; +} diff --git a/xserver/hw/xwayland/xwayland-shm.c b/xserver/hw/xwayland/xwayland-shm.c new file mode 100644 index 000000000..2d0ce3eb6 --- /dev/null +++ b/xserver/hw/xwayland/xwayland-shm.c @@ -0,0 +1,292 @@ +/* + * Copyright © 2014 Intel Corporation + * Copyright © 2012 Collabora, 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. + */ + +#include "xwayland.h" + +#include <sys/mman.h> +#include <sys/types.h> +#include <unistd.h> +#include <fcntl.h> +#include <errno.h> +#include <string.h> +#include <stdlib.h> + +struct xwl_pixmap { + struct wl_buffer *buffer; + int fd; + void *data; + size_t size; +}; + +#ifndef HAVE_MKOSTEMP +static int +set_cloexec_or_close(int fd) +{ + long flags; + + if (fd == -1) + return -1; + + flags = fcntl(fd, F_GETFD); + if (flags == -1) + goto err; + + if (fcntl(fd, F_SETFD, flags | FD_CLOEXEC) == -1) + goto err; + + return fd; + + err: + close(fd); + return -1; +} +#endif + +static int +create_tmpfile_cloexec(char *tmpname) +{ + int fd; + +#ifdef HAVE_MKOSTEMP + fd = mkostemp(tmpname, O_CLOEXEC); + if (fd >= 0) + unlink(tmpname); +#else + fd = mkstemp(tmpname); + if (fd >= 0) { + fd = set_cloexec_or_close(fd); + unlink(tmpname); + } +#endif + + return fd; +} + +/* + * Create a new, unique, anonymous file of the given size, and + * return the file descriptor for it. The file descriptor is set + * CLOEXEC. The file is immediately suitable for mmap()'ing + * the given size at offset zero. + * + * The file should not have a permanent backing store like a disk, + * but may have if XDG_RUNTIME_DIR is not properly implemented in OS. + * + * The file name is deleted from the file system. + * + * The file is suitable for buffer sharing between processes by + * transmitting the file descriptor over Unix sockets using the + * SCM_RIGHTS methods. + * + * If the C library implements posix_fallocate(), it is used to + * guarantee that disk space is available for the file at the + * given size. If disk space is insufficent, errno is set to ENOSPC. + * If posix_fallocate() is not supported, program may receive + * SIGBUS on accessing mmap()'ed file contents instead. + */ +static int +os_create_anonymous_file(off_t size) +{ + static const char template[] = "/weston-shared-XXXXXX"; + const char *path; + char *name; + int fd; + int ret; + + path = getenv("XDG_RUNTIME_DIR"); + if (!path) { + errno = ENOENT; + return -1; + } + + name = malloc(strlen(path) + sizeof(template)); + if (!name) + return -1; + + strcpy(name, path); + strcat(name, template); + + fd = create_tmpfile_cloexec(name); + + free(name); + + if (fd < 0) + return -1; + +#ifdef HAVE_POSIX_FALLOCATE + ret = posix_fallocate(fd, 0, size); + if (ret != 0) { + close(fd); + errno = ret; + return -1; + } +#else + ret = ftruncate(fd, size); + if (ret < 0) { + close(fd); + return -1; + } +#endif + + return fd; +} + +static uint32_t +shm_format_for_depth(int depth) +{ + switch (depth) { + case 32: + return WL_SHM_FORMAT_ARGB8888; + case 24: + default: + return WL_SHM_FORMAT_XRGB8888; +#ifdef WL_SHM_FORMAT_RGB565 + case 16: + /* XXX: Check run-time protocol version too */ + return WL_SHM_FORMAT_RGB565; +#endif + } +} + +PixmapPtr +xwl_shm_create_pixmap(ScreenPtr screen, + int width, int height, int depth, unsigned int hint) +{ + PixmapPtr pixmap; + struct xwl_pixmap *xwl_pixmap; + size_t size, stride; + + if (hint == CREATE_PIXMAP_USAGE_GLYPH_PICTURE || + (width == 0 && height == 0) || depth < 15) + return fbCreatePixmap(screen, width, height, depth, hint); + + pixmap = fbCreatePixmap(screen, 0, 0, depth, hint); + if (!pixmap) + return NULL; + + xwl_pixmap = malloc(sizeof *xwl_pixmap); + if (xwl_pixmap == NULL) + goto err_destroy_pixmap; + + stride = PixmapBytePad(width, depth); + size = stride * height; + xwl_pixmap->buffer = NULL; + xwl_pixmap->size = size; + xwl_pixmap->fd = os_create_anonymous_file(size); + if (xwl_pixmap->fd < 0) + goto err_free_xwl_pixmap; + + xwl_pixmap->data = mmap(NULL, size, PROT_READ | PROT_WRITE, + MAP_SHARED, xwl_pixmap->fd, 0); + if (xwl_pixmap->data == MAP_FAILED) + goto err_close_fd; + + if (!(*screen->ModifyPixmapHeader) (pixmap, width, height, depth, + BitsPerPixel(depth), + stride, xwl_pixmap->data)) + goto err_munmap; + + xwl_pixmap_set_private(pixmap, xwl_pixmap); + + return pixmap; + + err_munmap: + munmap(xwl_pixmap->data, size); + err_close_fd: + close(xwl_pixmap->fd); + err_free_xwl_pixmap: + free(xwl_pixmap); + err_destroy_pixmap: + fbDestroyPixmap(pixmap); + + return NULL; +} + +Bool +xwl_shm_destroy_pixmap(PixmapPtr pixmap) +{ + struct xwl_pixmap *xwl_pixmap = xwl_pixmap_get(pixmap); + + if (xwl_pixmap && pixmap->refcnt == 1) { + if (xwl_pixmap->buffer) + wl_buffer_destroy(xwl_pixmap->buffer); + munmap(xwl_pixmap->data, xwl_pixmap->size); + close(xwl_pixmap->fd); + free(xwl_pixmap); + } + + return fbDestroyPixmap(pixmap); +} + +struct wl_buffer * +xwl_shm_pixmap_get_wl_buffer(PixmapPtr pixmap) +{ + struct xwl_screen *xwl_screen = xwl_screen_get(pixmap->drawable.pScreen); + struct xwl_pixmap *xwl_pixmap = xwl_pixmap_get(pixmap); + struct wl_shm_pool *pool; + uint32_t format; + + if (xwl_pixmap->buffer) + return xwl_pixmap->buffer; + + pool = wl_shm_create_pool(xwl_screen->shm, + xwl_pixmap->fd, xwl_pixmap->size); + + format = shm_format_for_depth(pixmap->drawable.depth); + xwl_pixmap->buffer = wl_shm_pool_create_buffer(pool, 0, + pixmap->drawable.width, + pixmap->drawable.height, + pixmap->devKind, format); + + wl_shm_pool_destroy(pool); + + return xwl_pixmap->buffer; +} + +Bool +xwl_shm_create_screen_resources(ScreenPtr screen) +{ + struct xwl_screen *xwl_screen = xwl_screen_get(screen); + int ret; + + screen->CreateScreenResources = xwl_screen->CreateScreenResources; + ret = (*screen->CreateScreenResources) (screen); + xwl_screen->CreateScreenResources = screen->CreateScreenResources; + screen->CreateScreenResources = xwl_shm_create_screen_resources; + + if (!ret) + return ret; + + if (xwl_screen->rootless) + screen->devPrivate = + fbCreatePixmap(screen, 0, 0, screen->rootDepth, 0); + else + screen->devPrivate = + xwl_shm_create_pixmap(screen, screen->width, screen->height, + screen->rootDepth, + CREATE_PIXMAP_USAGE_BACKING_PIXMAP); + + return screen->devPrivate != NULL; +} diff --git a/xserver/hw/xwayland/xwayland.c b/xserver/hw/xwayland/xwayland.c new file mode 100644 index 000000000..17b7bf7fd --- /dev/null +++ b/xserver/hw/xwayland/xwayland.c @@ -0,0 +1,684 @@ +/* + * Copyright © 2011-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. + */ + +#include "xwayland.h" + +#include <stdio.h> + +#include <selection.h> +#include <micmap.h> +#include <misyncshm.h> +#include <compositeext.h> +#include <glx_extinit.h> + +void +ddxGiveUp(enum ExitCode error) +{ +} + +void +AbortDDX(enum ExitCode error) +{ + ddxGiveUp(error); +} + +void +OsVendorInit(void) +{ +} + +void +OsVendorFatalError(const char *f, va_list args) +{ +} + +#if defined(DDXBEFORERESET) +void +ddxBeforeReset(void) +{ + return; +} +#endif + +void +ddxUseMsg(void) +{ + ErrorF("-rootless run rootless, requires wm support\n"); + ErrorF("-wm fd create X client for wm on given fd\n"); + ErrorF("-listen fd add give fd as a listen socket\n"); +} + +int +ddxProcessArgument(int argc, char *argv[], int i) +{ + if (strcmp(argv[i], "-rootless") == 0) { + return 1; + } + else if (strcmp(argv[i], "-listen") == 0) { + NoListenAll = TRUE; + return 2; + } + else if (strcmp(argv[i], "-wm") == 0) { + return 2; + } + else if (strcmp(argv[i], "-shm") == 0) { + return 1; + } + + return 0; +} + +static DevPrivateKeyRec xwl_window_private_key; +static DevPrivateKeyRec xwl_screen_private_key; +static DevPrivateKeyRec xwl_pixmap_private_key; + +struct xwl_screen * +xwl_screen_get(ScreenPtr screen) +{ + return dixLookupPrivate(&screen->devPrivates, &xwl_screen_private_key); +} + +static Bool +xwl_close_screen(ScreenPtr screen) +{ + struct xwl_screen *xwl_screen = xwl_screen_get(screen); + struct xwl_output *xwl_output, *next_xwl_output; + struct xwl_seat *xwl_seat, *next_xwl_seat; + + xorg_list_for_each_entry_safe(xwl_output, next_xwl_output, + &xwl_screen->output_list, link) + xwl_output_destroy(xwl_output); + + xorg_list_for_each_entry_safe(xwl_seat, next_xwl_seat, + &xwl_screen->seat_list, link) + xwl_seat_destroy(xwl_seat); + + wl_display_disconnect(xwl_screen->display); + + screen->CloseScreen = xwl_screen->CloseScreen; + free(xwl_screen); + + return screen->CloseScreen(screen); +} + +static void +damage_report(DamagePtr pDamage, RegionPtr pRegion, void *data) +{ + struct xwl_window *xwl_window = data; + struct xwl_screen *xwl_screen = xwl_window->xwl_screen; + + xorg_list_add(&xwl_window->link_damage, &xwl_screen->damage_window_list); +} + +static void +damage_destroy(DamagePtr pDamage, void *data) +{ +} + +static void +shell_surface_ping(void *data, + struct wl_shell_surface *shell_surface, uint32_t serial) +{ + wl_shell_surface_pong(shell_surface, serial); +} + +static void +shell_surface_configure(void *data, + struct wl_shell_surface *wl_shell_surface, + uint32_t edges, int32_t width, int32_t height) +{ +} + +static void +shell_surface_popup_done(void *data, struct wl_shell_surface *wl_shell_surface) +{ +} + +static const struct wl_shell_surface_listener shell_surface_listener = { + shell_surface_ping, + shell_surface_configure, + shell_surface_popup_done +}; + +void +xwl_pixmap_set_private(PixmapPtr pixmap, struct xwl_pixmap *xwl_pixmap) +{ + dixSetPrivate(&pixmap->devPrivates, &xwl_pixmap_private_key, xwl_pixmap); +} + +struct xwl_pixmap * +xwl_pixmap_get(PixmapPtr pixmap) +{ + return dixLookupPrivate(&pixmap->devPrivates, &xwl_pixmap_private_key); +} + +static void +send_surface_id_event(struct xwl_window *xwl_window) +{ + static const char atom_name[] = "WL_SURFACE_ID"; + static Atom type_atom; + DeviceIntPtr dev; + xEvent e; + + if (type_atom == None) + type_atom = MakeAtom(atom_name, strlen(atom_name), TRUE); + + e.u.u.type = ClientMessage; + e.u.u.detail = 32; + e.u.clientMessage.window = xwl_window->window->drawable.id; + e.u.clientMessage.u.l.type = type_atom; + e.u.clientMessage.u.l.longs0 = + wl_proxy_get_id((struct wl_proxy *) xwl_window->surface); + e.u.clientMessage.u.l.longs1 = 0; + e.u.clientMessage.u.l.longs2 = 0; + e.u.clientMessage.u.l.longs3 = 0; + e.u.clientMessage.u.l.longs4 = 0; + + dev = PickPointer(serverClient); + DeliverEventsToWindow(dev, xwl_window->xwl_screen->screen->root, + &e, 1, SubstructureRedirectMask, NullGrab); +} + +static Bool +xwl_realize_window(WindowPtr window) +{ + ScreenPtr screen = window->drawable.pScreen; + struct xwl_screen *xwl_screen; + struct xwl_window *xwl_window; + struct wl_region *region; + Bool ret; + + xwl_screen = xwl_screen_get(screen); + + screen->RealizeWindow = xwl_screen->RealizeWindow; + ret = (*screen->RealizeWindow) (window); + xwl_screen->RealizeWindow = screen->RealizeWindow; + screen->RealizeWindow = xwl_realize_window; + + if (xwl_screen->rootless && !window->parent) { + RegionNull(&window->clipList); + RegionNull(&window->borderClip); + RegionNull(&window->winSize); + } + + if (xwl_screen->rootless) { + if (window->redirectDraw != RedirectDrawManual) + return ret; + } + else { + if (window->parent) + return ret; + } + + xwl_window = calloc(sizeof *xwl_window, 1); + xwl_window->xwl_screen = xwl_screen; + xwl_window->window = window; + xwl_window->surface = wl_compositor_create_surface(xwl_screen->compositor); + if (xwl_window->surface == NULL) { + ErrorF("wl_display_create_surface failed\n"); + return FALSE; + } + + if (!xwl_screen->rootless) { + xwl_window->shell_surface = + wl_shell_get_shell_surface(xwl_screen->shell, xwl_window->surface); + wl_shell_surface_add_listener(xwl_window->shell_surface, + &shell_surface_listener, xwl_window); + + wl_shell_surface_set_toplevel(xwl_window->shell_surface); + + region = wl_compositor_create_region(xwl_screen->compositor); + wl_region_add(region, 0, 0, + window->drawable.width, window->drawable.height); + wl_surface_set_opaque_region(xwl_window->surface, region); + wl_region_destroy(region); + } + + wl_display_flush(xwl_screen->display); + + send_surface_id_event(xwl_window); + + wl_surface_set_user_data(xwl_window->surface, xwl_window); + + dixSetPrivate(&window->devPrivates, &xwl_window_private_key, xwl_window); + + xwl_window->damage = + DamageCreate(damage_report, damage_destroy, DamageReportNonEmpty, + FALSE, screen, xwl_window); + DamageRegister(&window->drawable, xwl_window->damage); + DamageSetReportAfterOp(xwl_window->damage, TRUE); + + xorg_list_init(&xwl_window->link_damage); + + return ret; +} + +static Bool +xwl_unrealize_window(WindowPtr window) +{ + ScreenPtr screen = window->drawable.pScreen; + struct xwl_screen *xwl_screen; + struct xwl_window *xwl_window; + struct xwl_seat *xwl_seat; + Bool ret; + + xwl_screen = xwl_screen_get(screen); + + xorg_list_for_each_entry(xwl_seat, &xwl_screen->seat_list, link) { + if (!xwl_seat->focus_window) + continue; + if (xwl_seat->focus_window->window == window) + xwl_seat->focus_window = NULL; + } + + screen->UnrealizeWindow = xwl_screen->UnrealizeWindow; + ret = (*screen->UnrealizeWindow) (window); + xwl_screen->UnrealizeWindow = screen->UnrealizeWindow; + screen->UnrealizeWindow = xwl_unrealize_window; + + xwl_window = + dixLookupPrivate(&window->devPrivates, &xwl_window_private_key); + if (!xwl_window) + return ret; + + wl_surface_destroy(xwl_window->surface); + if (RegionNotEmpty(DamageRegion(xwl_window->damage))) + xorg_list_del(&xwl_window->link_damage); + DamageUnregister(xwl_window->damage); + DamageDestroy(xwl_window->damage); + free(xwl_window); + dixSetPrivate(&window->devPrivates, &xwl_window_private_key, NULL); + + return ret; +} + +static Bool +xwl_save_screen(ScreenPtr pScreen, int on) +{ + return TRUE; +} + +static void +xwl_screen_post_damage(struct xwl_screen *xwl_screen) +{ + struct xwl_window *xwl_window; + RegionPtr region; + BoxPtr box; + int count, i; + struct wl_buffer *buffer; + PixmapPtr pixmap; + + xorg_list_for_each_entry(xwl_window, &xwl_screen->damage_window_list, + link_damage) { + region = DamageRegion(xwl_window->damage); + count = RegionNumRects(region); + + pixmap = (*xwl_screen->screen->GetWindowPixmap) (xwl_window->window); + +#if GLAMOR_HAS_GBM + if (xwl_screen->glamor) + buffer = xwl_glamor_pixmap_get_wl_buffer(pixmap); +#endif + if (!xwl_screen->glamor) + buffer = xwl_shm_pixmap_get_wl_buffer(pixmap); + + wl_surface_attach(xwl_window->surface, buffer, 0, 0); + for (i = 0; i < count; i++) { + box = &RegionRects(region)[i]; + wl_surface_damage(xwl_window->surface, + box->x1, box->y1, + box->x2 - box->x1, box->y2 - box->y1); + } + wl_surface_commit(xwl_window->surface); + DamageEmpty(xwl_window->damage); + } + + xorg_list_init(&xwl_screen->damage_window_list); +} + +static void +registry_global(void *data, struct wl_registry *registry, uint32_t id, + const char *interface, uint32_t version) +{ + struct xwl_screen *xwl_screen = data; + + if (strcmp(interface, "wl_compositor") == 0) { + xwl_screen->compositor = + wl_registry_bind(registry, id, &wl_compositor_interface, 1); + } + else if (strcmp(interface, "wl_shm") == 0) { + xwl_screen->shm = wl_registry_bind(registry, id, &wl_shm_interface, 1); + } + else if (strcmp(interface, "wl_shell") == 0) { + xwl_screen->shell = + wl_registry_bind(registry, id, &wl_shell_interface, 1); + } + else if (strcmp(interface, "wl_output") == 0 && version >= 2) { + xwl_output_create(xwl_screen, id); + xwl_screen->expecting_event++; + } +#ifdef GLAMOR_HAS_GBM + else if (xwl_screen->glamor && + strcmp(interface, "wl_drm") == 0 && version >= 2) { + xwl_screen_init_glamor(xwl_screen, id, version); + } +#endif +} + +static void +global_remove(void *data, struct wl_registry *registry, uint32_t name) +{ + /* Nothing to do here, wl_compositor and wl_shm should not be removed */ +} + +static const struct wl_registry_listener registry_listener = { + registry_global, + global_remove +}; + +static void +wakeup_handler(void *data, int err, void *read_mask) +{ + struct xwl_screen *xwl_screen = data; + int ret; + + if (err < 0) + return; + + if (!FD_ISSET(xwl_screen->wayland_fd, (fd_set *) read_mask)) + return; + + ret = wl_display_read_events(xwl_screen->display); + if (ret == -1) + FatalError("failed to dispatch Wayland events: %s\n", strerror(errno)); + + xwl_screen->prepare_read = 0; + + ret = wl_display_dispatch_pending(xwl_screen->display); + if (ret == -1) + FatalError("failed to dispatch Wayland events: %s\n", strerror(errno)); +} + +static void +block_handler(void *data, struct timeval **tv, void *read_mask) +{ + struct xwl_screen *xwl_screen = data; + int ret; + + xwl_screen_post_damage(xwl_screen); + + while (xwl_screen->prepare_read == 0 && + wl_display_prepare_read(xwl_screen->display) == -1) { + ret = wl_display_dispatch_pending(xwl_screen->display); + if (ret == -1) + FatalError("failed to dispatch Wayland events: %s\n", + strerror(errno)); + } + + xwl_screen->prepare_read = 1; + + ret = wl_display_flush(xwl_screen->display); + if (ret == -1) + FatalError("failed to write to XWayland fd: %s\n", strerror(errno)); +} + +static CARD32 +add_client_fd(OsTimerPtr timer, CARD32 time, void *arg) +{ + struct xwl_screen *xwl_screen = arg; + + if (!AddClientOnOpenFD(xwl_screen->wm_fd)) + FatalError("Failed to add wm client\n"); + + TimerFree(timer); + + return 0; +} + +static void +listen_on_fds(struct xwl_screen *xwl_screen) +{ + int i; + + for (i = 0; i < xwl_screen->listen_fd_count; i++) + ListenOnOpenFD(xwl_screen->listen_fds[i], TRUE); +} + +static void +wm_selection_callback(CallbackListPtr *p, void *data, void *arg) +{ + SelectionInfoRec *info = arg; + struct xwl_screen *xwl_screen = data; + static const char atom_name[] = "WM_S0"; + static Atom atom_wm_s0; + + if (atom_wm_s0 == None) + atom_wm_s0 = MakeAtom(atom_name, strlen(atom_name), TRUE); + if (info->selection->selection != atom_wm_s0 || + info->kind != SelectionSetOwner) + return; + + listen_on_fds(xwl_screen); + + DeleteCallback(&SelectionCallback, wm_selection_callback, xwl_screen); +} + +static Bool +xwl_screen_init(ScreenPtr pScreen, int argc, char **argv) +{ + struct xwl_screen *xwl_screen; + Pixel red_mask, blue_mask, green_mask; + int ret, bpc, green_bpc, i; + + xwl_screen = calloc(sizeof *xwl_screen, 1); + xwl_screen->wm_fd = -1; + if (xwl_screen == NULL) + return FALSE; + + if (!dixRegisterPrivateKey(&xwl_screen_private_key, PRIVATE_SCREEN, 0)) + return FALSE; + if (!dixRegisterPrivateKey(&xwl_window_private_key, PRIVATE_WINDOW, 0)) + return FALSE; + if (!dixRegisterPrivateKey(&xwl_pixmap_private_key, PRIVATE_PIXMAP, 0)) + return FALSE; + + dixSetPrivate(&pScreen->devPrivates, &xwl_screen_private_key, xwl_screen); + xwl_screen->screen = pScreen; + +#ifdef GLAMOR_HAS_GBM + xwl_screen->glamor = 1; +#endif + + for (i = 1; i < argc; i++) { + if (strcmp(argv[i], "-rootless") == 0) { + xwl_screen->rootless = 1; + } + else if (strcmp(argv[i], "-wm") == 0) { + xwl_screen->wm_fd = atoi(argv[i + 1]); + i++; + TimerSet(NULL, 0, 1, add_client_fd, xwl_screen); + } + else if (strcmp(argv[i], "-listen") == 0) { + if (xwl_screen->listen_fd_count == + ARRAY_SIZE(xwl_screen->listen_fds)) + FatalError("Too many -listen arguments given, max is %ld\n", + ARRAY_SIZE(xwl_screen->listen_fds)); + + xwl_screen->listen_fds[xwl_screen->listen_fd_count++] = + atoi(argv[i + 1]); + i++; + } + else if (strcmp(argv[i], "-shm") == 0) { + xwl_screen->glamor = 0; + } + } + + if (xwl_screen->listen_fd_count > 0) { + if (xwl_screen->wm_fd >= 0) + AddCallback(&SelectionCallback, wm_selection_callback, xwl_screen); + else + listen_on_fds(xwl_screen); + } + + xorg_list_init(&xwl_screen->output_list); + xorg_list_init(&xwl_screen->seat_list); + xorg_list_init(&xwl_screen->damage_window_list); + xwl_screen->depth = 24; + + xwl_screen->display = wl_display_connect(NULL); + if (xwl_screen->display == NULL) { + ErrorF("could not connect to wayland server\n"); + return FALSE; + } + + if (!xwl_screen_init_output(xwl_screen)) + return FALSE; + + xwl_screen->expecting_event = 0; + xwl_screen->registry = wl_display_get_registry(xwl_screen->display); + wl_registry_add_listener(xwl_screen->registry, + ®istry_listener, xwl_screen); + ret = wl_display_roundtrip(xwl_screen->display); + if (ret == -1) { + ErrorF("could not connect to wayland server\n"); + return FALSE; + } + + while (xwl_screen->expecting_event > 0) + wl_display_roundtrip(xwl_screen->display); + + bpc = xwl_screen->depth / 3; + green_bpc = xwl_screen->depth - 2 * bpc; + blue_mask = (1 << bpc) - 1; + green_mask = ((1 << green_bpc) - 1) << bpc; + red_mask = blue_mask << (green_bpc + bpc); + + miSetVisualTypesAndMasks(xwl_screen->depth, + ((1 << TrueColor) | (1 << DirectColor)), + green_bpc, TrueColor, + red_mask, green_mask, blue_mask); + + miSetPixmapDepths(); + + ret = fbScreenInit(pScreen, NULL, + xwl_screen->width, xwl_screen->height, + 96, 96, 0, + BitsPerPixel(xwl_screen->depth)); + if (!ret) + return FALSE; + + fbPictureInit(pScreen, 0, 0); + +#ifdef HAVE_XSHMFENCE + if (!miSyncShmScreenInit(pScreen)) + return FALSE; +#endif + + xwl_screen->wayland_fd = wl_display_get_fd(xwl_screen->display); + AddGeneralSocket(xwl_screen->wayland_fd); + RegisterBlockAndWakeupHandlers(block_handler, wakeup_handler, xwl_screen); + + pScreen->SaveScreen = xwl_save_screen; + + pScreen->blackPixel = 0; + pScreen->whitePixel = 1; + + ret = fbCreateDefColormap(pScreen); + + if (!xwl_screen_init_cursor(xwl_screen)) + return FALSE; + +#ifdef GLAMOR_HAS_GBM + if (xwl_screen->glamor && !xwl_glamor_init(xwl_screen)) { + ErrorF("Failed to initialize glamor, falling back to sw\n"); + xwl_screen->glamor = 0; + } +#endif + + if (!xwl_screen->glamor) { + xwl_screen->CreateScreenResources = pScreen->CreateScreenResources; + pScreen->CreateScreenResources = xwl_shm_create_screen_resources; + pScreen->CreatePixmap = xwl_shm_create_pixmap; + pScreen->DestroyPixmap = xwl_shm_destroy_pixmap; + } + + xwl_screen->RealizeWindow = pScreen->RealizeWindow; + pScreen->RealizeWindow = xwl_realize_window; + + xwl_screen->UnrealizeWindow = pScreen->UnrealizeWindow; + pScreen->UnrealizeWindow = xwl_unrealize_window; + + xwl_screen->CloseScreen = pScreen->CloseScreen; + pScreen->CloseScreen = xwl_close_screen; + + return ret; +} + +static void _X_ATTRIBUTE_PRINTF(1, 0) +xwl_log_handler(const char *format, va_list args) +{ + char msg[256]; + + vsnprintf(msg, sizeof msg, format, args); + FatalError("%s", msg); +} + +static const ExtensionModule xwayland_extensions[] = { +#ifdef GLXEXT + { GlxExtensionInit, "GLX", &noGlxExtension }, +#endif +}; + +void +InitOutput(ScreenInfo * screen_info, int argc, char **argv) +{ + int depths[] = { 1, 4, 8, 15, 16, 24, 32 }; + int bpp[] = { 1, 8, 8, 16, 16, 32, 32 }; + int i; + + for (i = 0; i < ARRAY_SIZE(depths); i++) { + screen_info->formats[i].depth = depths[i]; + screen_info->formats[i].bitsPerPixel = bpp[i]; + screen_info->formats[i].scanlinePad = BITMAP_SCANLINE_PAD; + } + + 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 = ARRAY_SIZE(depths); + + LoadExtensionList(xwayland_extensions, + ARRAY_SIZE(xwayland_extensions), FALSE); + + /* Cast away warning from missing printf annotation for + * wl_log_func_t. Wayland 1.5 will have the annotation, so we can + * remove the cast and require that when it's released. */ + wl_log_set_handler_client((void *) xwl_log_handler); + + if (AddScreen(xwl_screen_init, argc, argv) == -1) { + FatalError("Couldn't add screen\n"); + } +} diff --git a/xserver/hw/xwayland/xwayland.h b/xserver/hw/xwayland/xwayland.h new file mode 100644 index 000000000..fc6855044 --- /dev/null +++ b/xserver/hw/xwayland/xwayland.h @@ -0,0 +1,181 @@ +/* + * 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. + */ + +#ifndef XWAYLAND_H +#define XWAYLAND_H + +#include <dix-config.h> +#include <xorg-server.h> + +#include <stdio.h> +#include <unistd.h> +#include <errno.h> + +#include <wayland-client.h> + +#include <X11/X.h> + +#include <fb.h> +#include <input.h> +#include <dix.h> +#include <randrstr.h> +#include <exevents.h> + +struct xwl_screen { + int width; + int height; + int depth; + ScreenPtr screen; + WindowPtr pointer_limbo_window; + int expecting_event; + + int wm_fd; + int listen_fds[5]; + int listen_fd_count; + int rootless; + int glamor; + + CreateScreenResourcesProcPtr CreateScreenResources; + CloseScreenProcPtr CloseScreen; + CreateWindowProcPtr CreateWindow; + DestroyWindowProcPtr DestroyWindow; + RealizeWindowProcPtr RealizeWindow; + UnrealizeWindowProcPtr UnrealizeWindow; + XYToWindowProcPtr XYToWindow; + + struct xorg_list output_list; + struct xorg_list seat_list; + struct xorg_list damage_window_list; + + int wayland_fd; + struct wl_display *display; + struct wl_registry *registry; + struct wl_registry *input_registry; + struct wl_compositor *compositor; + struct wl_shm *shm; + struct wl_shell *shell; + + uint32_t serial; + +#define XWL_FORMAT_ARGB8888 (1 << 0) +#define XWL_FORMAT_XRGB8888 (1 << 1) +#define XWL_FORMAT_RGB565 (1 << 2) + + int prepare_read; + + char *device_name; + int drm_fd; + int fd_render_node; + struct wl_drm *drm; + uint32_t formats; + uint32_t capabilities; + void *egl_display, *egl_context; + struct gbm_device *gbm; + struct glamor_context *glamor_ctx; +}; + +struct xwl_window { + struct xwl_screen *xwl_screen; + struct wl_surface *surface; + struct wl_shell_surface *shell_surface; + WindowPtr window; + DamagePtr damage; + struct xorg_list link_damage; +}; + +#define MODIFIER_META 0x01 + +struct xwl_seat { + DeviceIntPtr pointer; + DeviceIntPtr keyboard; + struct xwl_screen *xwl_screen; + struct wl_seat *seat; + struct wl_pointer *wl_pointer; + struct wl_keyboard *wl_keyboard; + struct wl_array keys; + struct wl_surface *cursor; + struct xwl_window *focus_window; + uint32_t id; + uint32_t pointer_enter_serial; + struct xorg_list link; + CursorPtr x_cursor; + + wl_fixed_t horizontal_scroll; + wl_fixed_t vertical_scroll; + uint32_t scroll_time; + + size_t keymap_size; + char *keymap; + struct wl_surface *keyboard_focus; +}; + +struct xwl_output { + struct xorg_list link; + struct wl_output *output; + struct xwl_screen *xwl_screen; + RROutputPtr randr_output; + RRCrtcPtr randr_crtc; + int32_t x, y, width, height; + Rotation rotation; +}; + +struct xwl_pixmap; + +Bool xwl_screen_init_cursor(struct xwl_screen *xwl_screen); + +struct xwl_screen *xwl_screen_get(ScreenPtr screen); + +void xwl_seat_set_cursor(struct xwl_seat *xwl_seat); + +void xwl_seat_destroy(struct xwl_seat *xwl_seat); + +Bool xwl_screen_init_output(struct xwl_screen *xwl_screen); + +struct xwl_output *xwl_output_create(struct xwl_screen *xwl_screen, + uint32_t id); + +void xwl_output_destroy(struct xwl_output *xwl_output); + +RRModePtr xwayland_cvt(int HDisplay, int VDisplay, + float VRefresh, Bool Reduced, Bool Interlaced); + +void xwl_pixmap_set_private(PixmapPtr pixmap, struct xwl_pixmap *xwl_pixmap); +struct xwl_pixmap *xwl_pixmap_get(PixmapPtr pixmap); + + +Bool xwl_shm_create_screen_resources(ScreenPtr screen); +PixmapPtr xwl_shm_create_pixmap(ScreenPtr screen, int width, int height, + int depth, unsigned int hint); +Bool xwl_shm_destroy_pixmap(PixmapPtr pixmap); +struct wl_buffer *xwl_shm_pixmap_get_wl_buffer(PixmapPtr pixmap); + + +Bool xwl_glamor_init(struct xwl_screen *xwl_screen); + +Bool xwl_screen_init_glamor(struct xwl_screen *xwl_screen, + uint32_t id, uint32_t version); +struct wl_buffer *xwl_glamor_pixmap_get_wl_buffer(PixmapPtr pixmap); + +#endif diff --git a/xserver/hw/xwin/InitInput.c b/xserver/hw/xwin/InitInput.c index 36346b7e1..38203c906 100644 --- a/xserver/hw/xwin/InitInput.c +++ b/xserver/hw/xwin/InitInput.c @@ -108,10 +108,11 @@ InitInput(int argc, char *argv[]) } #endif - g_pwinPointer = AddInputDevice(serverClient, winMouseProc, TRUE); - g_pwinKeyboard = AddInputDevice(serverClient, winKeybdProc, TRUE); - g_pwinPointer->name = strdup("Windows mouse"); - g_pwinKeyboard->name = strdup("Windows keyboard"); + if (AllocDevicePair(serverClient, "Windows", + &g_pwinPointer, &g_pwinKeyboard, + winMouseProc, winKeybdProc, + FALSE) != Success) + FatalError("InitInput - Failed to allocate slave devices.\n"); mieqInit(); diff --git a/xserver/hw/xwin/InitOutput.c b/xserver/hw/xwin/InitOutput.c index b05ca2736..6b5c38d92 100644 --- a/xserver/hw/xwin/InitOutput.c +++ b/xserver/hw/xwin/InitOutput.c @@ -58,8 +58,11 @@ typedef WINAPI HRESULT(*SHGETFOLDERPATHPROC) (HWND hwndOwner, HANDLE hToken, DWORD dwFlags, LPTSTR pszPath); #endif - #include "glx_extinit.h" +#ifdef XWIN_GLX_WINDOWS +#include "glx/glwindows.h" +#endif + /* * References to external symbols */ @@ -160,8 +163,6 @@ static const ExtensionModule xwinExtensions[] = { static void XwinExtensionInit(void) { - int i; - #ifdef XWIN_GLX_WINDOWS if (g_fNativeGl) { /* install the native GL provider */ @@ -169,8 +170,7 @@ void XwinExtensionInit(void) } #endif - for (i = 0; i < ARRAY_SIZE(xwinExtensions); i++) - LoadExtension(&xwinExtensions[i], TRUE); + LoadExtensionList(xwinExtensions, ARRAY_SIZE(xwinExtensions), TRUE); } #if defined(DDXBEFORERESET) @@ -268,10 +268,10 @@ ddxGiveUp(enum ExitCode error) PostQuitMessage(0); { - winDebug("ddxGiveUp - Releasing termination mutex\n"); - 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); @@ -783,6 +783,9 @@ winUseMsg(void) ErrorF("-fullscreen\n" "\tRun the server in fullscreen mode.\n"); + ErrorF("-hostintitle\n" + "\tIn multiwindow mode, add remote host names to window titles.\n"); + ErrorF("-ignoreinput\n" "\tIgnore keyboard and mouse input.\n"); #ifdef XWIN_MULTIWINDOWEXTWM diff --git a/xserver/hw/xwin/Makefile.am b/xserver/hw/xwin/Makefile.am index 7f0eaf097..4ee963227 100644 --- a/xserver/hw/xwin/Makefile.am +++ b/xserver/hw/xwin/Makefile.am @@ -127,10 +127,7 @@ SRCS = InitInput.c \ winresource.h \ winwindow.h \ XWin.rc \ - $(top_srcdir)/Xext/dpmsstubs.c \ - $(top_srcdir)/Xi/stubs.c \ $(top_srcdir)/mi/miinitext.c \ - $(top_srcdir)/fb/fbcmap_mi.c \ $(SRCS_CLIPBOARD) \ $(SRCS_MULTIWINDOW) \ $(SRCS_MULTIWINDOWEXTWM) \ @@ -153,11 +150,13 @@ XWin_SOURCES = $(SRCS) AM_CPPFLAGS = -I$(top_srcdir)/miext/rootless XWIN_SYS_LIBS += -ldxguid -XWIN_LIBS += $(top_builddir)/pseudoramiX/libPseudoramiX.la - +XWIN_LIBS += $(top_builddir)/pseudoramiX/libPseudoramiX.la \ + $(top_builddir)/Xext/libXextdpmsstubs.la \ + $(top_builddir)/Xi/libXistubs.la XWin_DEPENDENCIES = $(MULTIWINDOWEXTWM_LIBS) $(XWIN_GLX_LIBS) $(XWIN_LIBS) $(XSERVER_LIBS) XWin_LDADD = $(MULTIWINDOW_LIBS) $(MULTIWINDOWEXTWM_LIBS) $(XWIN_GLX_LIBS) $(XWIN_GLX_LINK_FLAGS) $(XWIN_LIBS) $(MAIN_LIB) $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) $(XWIN_SYS_LIBS) -XWin_LDFLAGS = -mwindows -static -Wl,--disable-stdcall-fixup +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 diff --git a/xserver/hw/xwin/Makefile.in b/xserver/hw/xwin/Makefile.in index e385e9741..65c8a9605 100644 --- a/xserver/hw/xwin/Makefile.in +++ b/xserver/hw/xwin/Makefile.in @@ -89,9 +89,7 @@ am__XWin_SOURCES_DIST = InitInput.c InitOutput.c winallpriv.c \ 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 XWin.rc \ - $(top_srcdir)/Xext/dpmsstubs.c $(top_srcdir)/Xi/stubs.c \ - $(top_srcdir)/mi/miinitext.c $(top_srcdir)/fb/fbcmap_mi.c \ + winresource.h winwindow.h XWin.rc $(top_srcdir)/mi/miinitext.c \ winclipboardinit.c winclipboardtextconv.c winclipboardthread.c \ winclipboardwndproc.c winclipboardwrappers.c \ winclipboardxevents.c winmultiwindowshape.c \ @@ -141,14 +139,15 @@ am__objects_8 = InitInput.$(OBJEXT) InitOutput.$(OBJEXT) \ winshadgdi.$(OBJEXT) wintaskbar.$(OBJEXT) \ wintrayicon.$(OBJEXT) winvalargs.$(OBJEXT) winwakeup.$(OBJEXT) \ winwindow.$(OBJEXT) winwndproc.$(OBJEXT) XWin.$(OBJEXT) \ - dpmsstubs.$(OBJEXT) stubs.$(OBJEXT) miinitext.$(OBJEXT) \ - fbcmap_mi.$(OBJEXT) $(am__objects_1) $(am__objects_2) \ + miinitext.$(OBJEXT) $(am__objects_1) $(am__objects_2) \ $(am__objects_3) $(am__objects_4) $(am__objects_5) \ $(am__objects_6) $(am__objects_7) am_XWin_OBJECTS = $(am__objects_8) XWin_OBJECTS = $(am_XWin_OBJECTS) am__DEPENDENCIES_1 = -am__DEPENDENCIES_2 = $(top_builddir)/pseudoramiX/libPseudoramiX.la +am__DEPENDENCIES_2 = $(top_builddir)/pseudoramiX/libPseudoramiX.la \ + $(top_builddir)/Xext/libXextdpmsstubs.la \ + $(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 @@ -320,6 +319,8 @@ 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_CLIPBOARD) \ $(DEFS_GLX_WINDOWS) \ $(DEFS_MULTIWINDOW) \ @@ -372,6 +373,10 @@ 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@ @@ -474,7 +479,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -483,6 +491,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -549,9 +558,15 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ -XWIN_LIBS = @XWIN_LIBS@ $(top_builddir)/pseudoramiX/libPseudoramiX.la +XWIN_LIBS = @XWIN_LIBS@ $(top_builddir)/pseudoramiX/libPseudoramiX.la \ + $(top_builddir)/Xext/libXextdpmsstubs.la \ + $(top_builddir)/Xi/libXistubs.la XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ -ldxguid YACC = @YACC@ @@ -731,10 +746,7 @@ SRCS = InitInput.c \ winresource.h \ winwindow.h \ XWin.rc \ - $(top_srcdir)/Xext/dpmsstubs.c \ - $(top_srcdir)/Xi/stubs.c \ $(top_srcdir)/mi/miinitext.c \ - $(top_srcdir)/fb/fbcmap_mi.c \ $(SRCS_CLIPBOARD) \ $(SRCS_MULTIWINDOW) \ $(SRCS_MULTIWINDOWEXTWM) \ @@ -747,7 +759,7 @@ XWin_SOURCES = $(SRCS) AM_CPPFLAGS = -I$(top_srcdir)/miext/rootless XWin_DEPENDENCIES = $(MULTIWINDOWEXTWM_LIBS) $(XWIN_GLX_LIBS) $(XWIN_LIBS) $(XSERVER_LIBS) XWin_LDADD = $(MULTIWINDOW_LIBS) $(MULTIWINDOWEXTWM_LIBS) $(XWIN_GLX_LIBS) $(XWIN_GLX_LINK_FLAGS) $(XWIN_LIBS) $(MAIN_LIB) $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) $(XWIN_SYS_LIBS) -XWin_LDFLAGS = -mwindows -static -Wl,--disable-stdcall-fixup +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 @@ -860,10 +872,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/InitInput.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/InitOutput.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dpmsstubs.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fbcmap_mi.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/miinitext.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stubs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winSetAppUserModelID.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winallpriv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winauth.Po@am__quote@ @@ -948,34 +957,6 @@ distclean-compile: @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< -dpmsstubs.o: $(top_srcdir)/Xext/dpmsstubs.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dpmsstubs.o -MD -MP -MF $(DEPDIR)/dpmsstubs.Tpo -c -o dpmsstubs.o `test -f '$(top_srcdir)/Xext/dpmsstubs.c' || echo '$(srcdir)/'`$(top_srcdir)/Xext/dpmsstubs.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dpmsstubs.Tpo $(DEPDIR)/dpmsstubs.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/Xext/dpmsstubs.c' object='dpmsstubs.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 dpmsstubs.o `test -f '$(top_srcdir)/Xext/dpmsstubs.c' || echo '$(srcdir)/'`$(top_srcdir)/Xext/dpmsstubs.c - -dpmsstubs.obj: $(top_srcdir)/Xext/dpmsstubs.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT dpmsstubs.obj -MD -MP -MF $(DEPDIR)/dpmsstubs.Tpo -c -o dpmsstubs.obj `if test -f '$(top_srcdir)/Xext/dpmsstubs.c'; then $(CYGPATH_W) '$(top_srcdir)/Xext/dpmsstubs.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/Xext/dpmsstubs.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/dpmsstubs.Tpo $(DEPDIR)/dpmsstubs.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/Xext/dpmsstubs.c' object='dpmsstubs.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 dpmsstubs.obj `if test -f '$(top_srcdir)/Xext/dpmsstubs.c'; then $(CYGPATH_W) '$(top_srcdir)/Xext/dpmsstubs.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/Xext/dpmsstubs.c'; fi` - -stubs.o: $(top_srcdir)/Xi/stubs.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stubs.o -MD -MP -MF $(DEPDIR)/stubs.Tpo -c -o stubs.o `test -f '$(top_srcdir)/Xi/stubs.c' || echo '$(srcdir)/'`$(top_srcdir)/Xi/stubs.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stubs.Tpo $(DEPDIR)/stubs.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/Xi/stubs.c' object='stubs.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 stubs.o `test -f '$(top_srcdir)/Xi/stubs.c' || echo '$(srcdir)/'`$(top_srcdir)/Xi/stubs.c - -stubs.obj: $(top_srcdir)/Xi/stubs.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT stubs.obj -MD -MP -MF $(DEPDIR)/stubs.Tpo -c -o stubs.obj `if test -f '$(top_srcdir)/Xi/stubs.c'; then $(CYGPATH_W) '$(top_srcdir)/Xi/stubs.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/Xi/stubs.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/stubs.Tpo $(DEPDIR)/stubs.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/Xi/stubs.c' object='stubs.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 stubs.obj `if test -f '$(top_srcdir)/Xi/stubs.c'; then $(CYGPATH_W) '$(top_srcdir)/Xi/stubs.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/Xi/stubs.c'; fi` - 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 @@ -990,20 +971,6 @@ miinitext.obj: $(top_srcdir)/mi/miinitext.c @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` -fbcmap_mi.o: $(top_srcdir)/fb/fbcmap_mi.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fbcmap_mi.o -MD -MP -MF $(DEPDIR)/fbcmap_mi.Tpo -c -o fbcmap_mi.o `test -f '$(top_srcdir)/fb/fbcmap_mi.c' || echo '$(srcdir)/'`$(top_srcdir)/fb/fbcmap_mi.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fbcmap_mi.Tpo $(DEPDIR)/fbcmap_mi.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/fb/fbcmap_mi.c' object='fbcmap_mi.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 fbcmap_mi.o `test -f '$(top_srcdir)/fb/fbcmap_mi.c' || echo '$(srcdir)/'`$(top_srcdir)/fb/fbcmap_mi.c - -fbcmap_mi.obj: $(top_srcdir)/fb/fbcmap_mi.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fbcmap_mi.obj -MD -MP -MF $(DEPDIR)/fbcmap_mi.Tpo -c -o fbcmap_mi.obj `if test -f '$(top_srcdir)/fb/fbcmap_mi.c'; then $(CYGPATH_W) '$(top_srcdir)/fb/fbcmap_mi.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/fb/fbcmap_mi.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/fbcmap_mi.Tpo $(DEPDIR)/fbcmap_mi.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$(top_srcdir)/fb/fbcmap_mi.c' object='fbcmap_mi.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 fbcmap_mi.obj `if test -f '$(top_srcdir)/fb/fbcmap_mi.c'; then $(CYGPATH_W) '$(top_srcdir)/fb/fbcmap_mi.c'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/fb/fbcmap_mi.c'; fi` - .l.c: $(AM_V_LEX)$(am__skiplex) $(SHELL) $(YLWRAP) $< $(LEX_OUTPUT_ROOT).c $@ -- $(LEXCOMPILE) diff --git a/xserver/hw/xwin/glx/Makefile.in b/xserver/hw/xwin/glx/Makefile.in index 3400aa89a..ceefa104b 100644 --- a/xserver/hw/xwin/glx/Makefile.in +++ b/xserver/hw/xwin/glx/Makefile.in @@ -198,6 +198,8 @@ 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_MULTIWINDOW) $(DEFS_MULTIWINDOWEXTWM) $(DEFS_GLX_WINDOWS) DEPDIR = @DEPDIR@ DGA_CFLAGS = @DGA_CFLAGS@ @@ -242,6 +244,10 @@ 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@ @@ -344,7 +350,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -353,6 +362,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -419,6 +429,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/xwin/glx/gen_gl_wrappers.py b/xserver/hw/xwin/glx/gen_gl_wrappers.py index 683b9d903..cdbba638a 100644 --- a/xserver/hw/xwin/glx/gen_gl_wrappers.py +++ b/xserver/hw/xwin/glx/gen_gl_wrappers.py @@ -43,35 +43,18 @@ thunkdefs=False staticwrappers=False nodebug=False -#exclude base WGL API -WinGDI={key: 1 for key in [ - "wglCopyContext" - ,"wglCreateContext" - ,"wglCreateLayerContext" - ,"wglDeleteContext" - ,"wglGetCurrentContext" - ,"wglGetCurrentDC" - ,"wglGetProcAddress" - ,"wglMakeCurrent" - ,"wglShareLists" - ,"wglUseFontBitmapsA" - ,"wglUseFontBitmapsW" - ,"wglUseFontBitmaps" - ,"SwapBuffers" - ,"wglUseFontOutlinesA" - ,"wglUseFontOutlinesW" - ,"wglUseFontOutlines" - ,"wglDescribeLayerPlane" - ,"wglSetLayerPaletteEntries" - ,"wglGetLayerPaletteEntries" - ,"wglRealizeLayerPalette" - ,"wglSwapLayerBuffers" - ,"wglSwapMultipleBuffers" - ,"ChoosePixelFormat" - ,"DescribePixelFormat" - ,"GetEnhMetaFilePixelFormat" - ,"GetPixelFormat" - ,"SetPixelFormat" +# 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__': @@ -162,7 +145,7 @@ class PreResolveOutputGenerator(OutputGenerator): def genCmd(self, cmd, name): OutputGenerator.genCmd(self, cmd, name) - if name in WinGDI: + if prefix == 'wgl' and not name in used_wgl_ext_fns: return self.outFile.write('RESOLVE_DECL(PFN' + name.upper() + 'PROC);\n') @@ -190,7 +173,7 @@ class WrapperOutputGenerator(OutputGenerator): def genCmd(self, cmd, name): OutputGenerator.genCmd(self, cmd, name) - if name in WinGDI: + if prefix == 'wgl' and not name in used_wgl_ext_fns: return proto=noneStr(cmd.elem.find('proto')) diff --git a/xserver/hw/xwin/glx/indirect.c b/xserver/hw/xwin/glx/indirect.c index 3d01bed39..9bfaac03d 100644 --- a/xserver/hw/xwin/glx/indirect.c +++ b/xserver/hw/xwin/glx/indirect.c @@ -832,7 +832,7 @@ glxWinCopyWindow(WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc) GLWIN_TRACE_MSG("glxWinCopyWindow pWindow %p", pWindow); - dixLookupResourceByType((pointer) &pGlxDraw, pWindow->drawable.id, + dixLookupResourceByType((void *) &pGlxDraw, pWindow->drawable.id, __glXDrawableRes, NullClient, DixUnknownAccess); /* @@ -929,17 +929,6 @@ glxWinDrawableDestroy(__GLXdrawable * base) { __GLXWinDrawable *glxPriv = (__GLXWinDrawable *) base; - if (glxPriv->drawContext && - (__glXLastContext == &((glxPriv->drawContext)->base))) { - // if this context is current and has unflushed commands, say we have flushed them - // (don't actually flush them, the window is going away anyhow, and an implict flush occurs - // on the next context change) - // (GLX core considers it an error when we try to select a new current context if the old one - // has unflushed commands, but the window has disappeared..) - __glXLastContext->hasUnflushedCommands = FALSE; - __glXLastContext = NULL; - } - if (glxPriv->hPbuffer) if (!wglDestroyPbufferARBWrapper(glxPriv->hPbuffer)) { ErrorF("wglDestroyPbufferARB failed: %s\n", glxWinErrorMessage()); @@ -1542,7 +1531,7 @@ glxWinContextLoseCurrent(__GLXcontext * base) 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 (__glXLastContext != NULL) { + 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", @@ -1613,7 +1602,7 @@ glxWinCreateContext(__GLXscreen * screen, glxWinReleaseTexImage }; - context = (__GLXWinContext *) calloc(1, sizeof(__GLXWinContext)); + context = calloc(1, sizeof(__GLXWinContext)); if (!context) return NULL; diff --git a/xserver/hw/xwin/man/Makefile.in b/xserver/hw/xwin/man/Makefile.in index 5c5c72c5b..f7f370757 100644 --- a/xserver/hw/xwin/man/Makefile.in +++ b/xserver/hw/xwin/man/Makefile.in @@ -160,6 +160,8 @@ 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@ @@ -204,6 +206,10 @@ 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@ @@ -268,6 +274,7 @@ MAN_SUBSTS = @MAN_SUBSTS@ -e 's|__logdir__|$(logdir)|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@ @@ -322,7 +329,10 @@ 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@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_LIBS = @TSLIB_LIBS@ @@ -331,6 +341,7 @@ UDEV_LIBS = @UDEV_LIBS@ UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ VERSION = @VERSION@ +WAYLAND_SCANNER = @WAYLAND_SCANNER@ WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ WINDRES = @WINDRES@ @@ -397,6 +408,10 @@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_LIBS = @XVFB_LIBS@ XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XWAYLANDMODULES_CFLAGS = @XWAYLANDMODULES_CFLAGS@ +XWAYLANDMODULES_LIBS = @XWAYLANDMODULES_LIBS@ +XWAYLAND_LIBS = @XWAYLAND_LIBS@ +XWAYLAND_SYS_LIBS = @XWAYLAND_SYS_LIBS@ XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ XWINMODULES_LIBS = @XWINMODULES_LIBS@ XWIN_LIBS = @XWIN_LIBS@ diff --git a/xserver/hw/xwin/man/XWin.man b/xserver/hw/xwin/man/XWin.man index 18ee667d4..c71f6a154 100644 --- a/xserver/hw/xwin/man/XWin.man +++ b/xserver/hw/xwin/man/XWin.man @@ -165,6 +165,12 @@ The maximum dimensions of the screen are the dimensions of the \fIWindows\fP vir on its own is equivalent to \fB\-resize=randr\fP .RE +.SH OPTIONS FOR MULTIWINDOW MODE +.TP 8 +.B \-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. + .SH OPTIONS CONTROLLING WINDOWS INTEGRATION .TP 8 .B \-[no]clipboard diff --git a/xserver/hw/xwin/win.h b/xserver/hw/xwin/win.h index ce89348fe..a738a5940 100644 --- a/xserver/hw/xwin/win.h +++ b/xserver/hw/xwin/win.h @@ -609,7 +609,7 @@ typedef struct { #endif typedef struct { - pointer value; + void *value; XID id; } WindowIDPairRec, *WindowIDPairPtr; @@ -751,7 +751,7 @@ Bool winAllocatePrivates(ScreenPtr pScreen); Bool - winInitCmapPrivates(ColormapPtr pCmap, int index); + winInitCmapPrivates(ColormapPtr pCmap, int i); Bool winAllocateCmapPrivates(ColormapPtr pCmap); @@ -773,7 +773,7 @@ void winSetAuthorization(void); void winBlockHandler(ScreenPtr pScreen, - pointer pTimeout, pointer pReadMask); + void *pTimeout, void *pReadMask); #ifdef XWIN_NATIVEGDI /* @@ -1035,7 +1035,7 @@ winModifyPixmapHeaderNativeGDI(PixmapPtr pPixmap, int iWidth, int iHeight, int iDepth, int iBitsPerPixel, - int devKind, pointer pPixData); + int devKind, void *pPixData); #endif #ifdef XWIN_NATIVEGDI @@ -1056,12 +1056,12 @@ Bool winScreenInit(ScreenPtr pScreen, int argc, char **argv); Bool - winFinishScreenInitFB(int index, ScreenPtr pScreen, int argc, char **argv); + winFinishScreenInitFB(int i, ScreenPtr pScreen, int argc, char **argv); #if defined(XWIN_NATIVEGDI) Bool -winFinishScreenInitNativeGDI(int index, +winFinishScreenInitNativeGDI(int i, ScreenPtr pScreen, int argc, char **argv); #endif @@ -1106,7 +1106,7 @@ Bool void winWakeupHandler(ScreenPtr pScreen, - unsigned long ulResult, pointer pReadmask); + unsigned long ulResult, void *pReadmask); /* * winwindow.c @@ -1336,9 +1336,6 @@ void winMWExtWMMoveResizeXWindow(WindowPtr pWin, int x, int y, int w, int h); void - winMWExtWMUpdateIcon(Window id); - -void winMWExtWMUpdateWindowDecoration(win32RootlessWindowPtr pRLWinPriv, winScreenInfoPtr pScreenInfo); diff --git a/xserver/hw/xwin/winallpriv.c b/xserver/hw/xwin/winallpriv.c index cc3b3d1ba..629af92c9 100644 --- a/xserver/hw/xwin/winallpriv.c +++ b/xserver/hw/xwin/winallpriv.c @@ -58,7 +58,7 @@ winAllocatePrivates(ScreenPtr pScreen) } /* Allocate memory for the screen private structure */ - pScreenPriv = (winPrivScreenPtr) malloc(sizeof(winPrivScreenRec)); + pScreenPriv = malloc(sizeof(winPrivScreenRec)); if (!pScreenPriv) { ErrorF("winAllocateScreenPrivates - malloc () failed\n"); return FALSE; @@ -150,7 +150,7 @@ winAllocateCmapPrivates(ColormapPtr pCmap) } /* Allocate memory for our private structure */ - pCmapPriv = (winPrivCmapPtr) malloc(sizeof(winPrivCmapRec)); + pCmapPriv = malloc(sizeof(winPrivCmapRec)); if (!pCmapPriv) { ErrorF("winAllocateCmapPrivates - malloc () failed\n"); return FALSE; diff --git a/xserver/hw/xwin/winauth.c b/xserver/hw/xwin/winauth.c index a6a7366a4..7efa1c00f 100644 --- a/xserver/hw/xwin/winauth.c +++ b/xserver/hw/xwin/winauth.c @@ -97,9 +97,9 @@ MitGenerateCookie(unsigned data_length, static XID GenerateAuthorization(unsigned name_length, - char *name, + const char *name, unsigned data_length, - char *data, + const char *data, unsigned *data_length_return, char **data_return) { return MitGenerateCookie(data_length, data, diff --git a/xserver/hw/xwin/winblock.c b/xserver/hw/xwin/winblock.c index c3ef4becd..07e907828 100644 --- a/xserver/hw/xwin/winblock.c +++ b/xserver/hw/xwin/winblock.c @@ -37,7 +37,7 @@ /* See Porting Layer Definition - p. 6 */ void winBlockHandler(ScreenPtr pScreen, - pointer pTimeout, pointer pReadMask) + void *pTimeout, void *pReadMask) { #if defined(XWIN_CLIPBOARD) || defined(XWIN_MULTIWINDOW) winScreenPriv(pScreen); diff --git a/xserver/hw/xwin/winclipboardinit.c b/xserver/hw/xwin/winclipboardinit.c index 304e6df9f..157006dab 100644 --- a/xserver/hw/xwin/winclipboardinit.c +++ b/xserver/hw/xwin/winclipboardinit.c @@ -77,7 +77,7 @@ winInitClipboard(void) } /* - * Create the Windows window that we use to recieve Windows messages + * Create the Windows window that we use to receive Windows messages */ HWND diff --git a/xserver/hw/xwin/winclipboardxevents.c b/xserver/hw/xwin/winclipboardxevents.c index 226c3f055..7d3c30e85 100644 --- a/xserver/hw/xwin/winclipboardxevents.c +++ b/xserver/hw/xwin/winclipboardxevents.c @@ -248,7 +248,7 @@ winClipboardFlushXEvents(HWND hwnd, (LPCWSTR) pszGlobalData, -1, NULL, 0, NULL, NULL); /* NOTE: iConvertDataLen includes space for null terminator */ - pszConvertData = (char *) malloc(iConvertDataLen); + pszConvertData = malloc(iConvertDataLen); WideCharToMultiByte(CP_UTF8, 0, (LPCWSTR) pszGlobalData, @@ -581,8 +581,7 @@ winClipboardFlushXEvents(HWND hwnd, pszReturnData, -1, NULL, 0); /* Allocate memory for the Unicode string */ - pwszUnicodeStr - = (wchar_t *) malloc(sizeof(wchar_t) * (iUnicodeLen + 1)); + pwszUnicodeStr = malloc(sizeof(wchar_t) * (iUnicodeLen + 1)); if (!pwszUnicodeStr) { ErrorF("winClipboardFlushXEvents - SelectionNotify " "malloc failed for pwszUnicodeStr, aborting.\n"); diff --git a/xserver/hw/xwin/wincmap.c b/xserver/hw/xwin/wincmap.c index 610437ad4..5dcc8bceb 100644 --- a/xserver/hw/xwin/wincmap.c +++ b/xserver/hw/xwin/wincmap.c @@ -177,7 +177,7 @@ winUninstallColormap(ColormapPtr pmap) /* Install the default cmap in place of the cmap to be uninstalled */ if (pmap->mid != pmap->pScreen->defColormap) { - dixLookupResourceByType((pointer) &curpmap, pmap->pScreen->defColormap, + dixLookupResourceByType((void *) &curpmap, pmap->pScreen->defColormap, RT_COLORMAP, NullClient, DixUnknownAccess); (*pmap->pScreen->InstallColormap) (curpmap); } diff --git a/xserver/hw/xwin/winconfig.c b/xserver/hw/xwin/winconfig.c index 9e38113a5..a6d3c0a1f 100644 --- a/xserver/hw/xwin/winconfig.c +++ b/xserver/hw/xwin/winconfig.c @@ -106,7 +106,7 @@ winInfoRec g_winInfo = { #ifdef XWIN_XF86CONFIG serverLayoutRec g_winConfigLayout; -static Bool ParseOptionValue(int scrnIndex, pointer options, OptionInfoPtr p); +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); @@ -188,7 +188,7 @@ winReadConfigfile() /* Check if layout is given in the config file */ if (g_xf86configptr->conf_flags != NULL) { char *dfltlayout = NULL; - pointer optlist = g_xf86configptr->conf_flags->flg_option_lst; + void *optlist = g_xf86configptr->conf_flags->flg_option_lst; if (optlist && winFindOption(optlist, "defaultserverlayout")) dfltlayout = @@ -588,7 +588,7 @@ winConfigScreens(void) #ifdef XWIN_XF86CONFIG char * -winSetStrOption(pointer optlist, const char *name, char *deflt) +winSetStrOption(void *optlist, const char *name, char *deflt) { OptionInfoRec o; @@ -603,7 +603,7 @@ winSetStrOption(pointer optlist, const char *name, char *deflt) } int -winSetBoolOption(pointer optlist, const char *name, int deflt) +winSetBoolOption(void *optlist, const char *name, int deflt) { OptionInfoRec o; @@ -615,7 +615,7 @@ winSetBoolOption(pointer optlist, const char *name, int deflt) } int -winSetIntOption(pointer optlist, const char *name, int deflt) +winSetIntOption(void *optlist, const char *name, int deflt) { OptionInfoRec o; @@ -627,7 +627,7 @@ winSetIntOption(pointer optlist, const char *name, int deflt) } double -winSetRealOption(pointer optlist, const char *name, double deflt) +winSetRealOption(void *optlist, const char *name, double deflt) { OptionInfoRec o; @@ -639,7 +639,7 @@ winSetRealOption(pointer optlist, const char *name, double deflt) } double -winSetPercentOption(pointer optlist, const char *name, double deflt) +winSetPercentOption(void *optlist, const char *name, double deflt) { OptionInfoRec o; @@ -734,7 +734,7 @@ winFindOptionValue(XF86OptionPtr list, const char *name) */ static Bool -ParseOptionValue(int scrnIndex, pointer options, OptionInfoPtr p) +ParseOptionValue(int scrnIndex, void *options, OptionInfoPtr p) { char *s, *end; diff --git a/xserver/hw/xwin/winconfig.h b/xserver/hw/xwin/winconfig.h index 94571ff71..798c779a6 100644 --- a/xserver/hw/xwin/winconfig.h +++ b/xserver/hw/xwin/winconfig.h @@ -58,15 +58,15 @@ typedef struct { Bool inUse; int videoRam; int textClockFreq; - pointer options; + void *options; int screen; /* For multi-CRTC cards */ } GDevRec, *GDevPtr; typedef struct { char *identifier; char *driver; - pointer commonOptions; - pointer extraOptions; + void *commonOptions; + void *extraOptions; } IDevRec, *IDevPtr; typedef struct { @@ -81,19 +81,19 @@ typedef struct { rgb whiteColour; int defaultVisual; char **modes; - pointer options; + void *options; } DispRec, *DispPtr; typedef struct _confxvportrec { char *identifier; - pointer options; + void *options; } confXvPortRec, *confXvPortPtr; typedef struct _confxvadaptrec { char *identifier; int numports; confXvPortPtr ports; - pointer options; + void *options; } confXvAdaptorRec, *confXvAdaptorPtr; typedef struct _confscreenrec { @@ -107,7 +107,7 @@ typedef struct _confscreenrec { DispPtr displays; int numxvadaptors; confXvAdaptorPtr xvadaptors; - pointer options; + void *options; } confScreenRec, *confScreenPtr; typedef enum { @@ -142,7 +142,7 @@ typedef struct _serverlayoutrec { screenLayoutPtr screens; GDevPtr inactives; IDevPtr inputs; - pointer options; + void *options; } serverLayoutRec, *serverLayoutPtr; /* @@ -233,11 +233,11 @@ typedef struct { * Function prototypes */ -char *winSetStrOption(pointer optlist, const char *name, char *deflt); -int winSetBoolOption(pointer optlist, const char *name, int deflt); -int winSetIntOption(pointer optlist, const char *name, int deflt); -double winSetRealOption(pointer optlist, const char *name, double deflt); -double winSetPercentOption(pointer optlist, const char *name, double deflt); +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); diff --git a/xserver/hw/xwin/wincursor.c b/xserver/hw/xwin/wincursor.c index a35336a34..f3ac0f7ae 100644 --- a/xserver/hw/xwin/wincursor.c +++ b/xserver/hw/xwin/wincursor.c @@ -255,10 +255,8 @@ winLoadCursor(ScreenPtr pScreen, CursorPtr pCursor, int screen) bi.bV4BlueMask = 0x000000FF; bi.bV4AlphaMask = 0xFF000000; - lpBits = - (uint32_t *) calloc(pScreenPriv->cursor.sm_cx * - pScreenPriv->cursor.sm_cy, - sizeof(uint32_t)); + lpBits = calloc(pScreenPriv->cursor.sm_cx * pScreenPriv->cursor.sm_cy, + sizeof(uint32_t)); if (lpBits) { int y; @@ -302,9 +300,7 @@ winLoadCursor(ScreenPtr pScreen, CursorPtr pCursor, int screen) pbmiColors[2].rgbBlue = pCursor->foreBlue >> 8; pbmiColors[2].rgbReserved = 0; - lpBits = - (uint32_t *) calloc(pScreenPriv->cursor.sm_cx * - pScreenPriv->cursor.sm_cy, sizeof(char)); + lpBits = calloc(pScreenPriv->cursor.sm_cx * pScreenPriv->cursor.sm_cy, 1); pCur = (unsigned char *) lpBits; if (lpBits) { diff --git a/xserver/hw/xwin/windialogs.c b/xserver/hw/xwin/windialogs.c index 054ee95b5..c9af0e203 100644 --- a/xserver/hw/xwin/windialogs.c +++ b/xserver/hw/xwin/windialogs.c @@ -574,10 +574,7 @@ winAboutDlgProc(HWND hwndDialog, UINT message, WPARAM wParam, LPARAM lParam) winInitDialog(hwndDialog); /* Override the URL buttons */ - winOverrideURLButton(hwndDialog, ID_ABOUT_CHANGELOG); winOverrideURLButton(hwndDialog, ID_ABOUT_WEBSITE); - winOverrideURLButton(hwndDialog, ID_ABOUT_UG); - winOverrideURLButton(hwndDialog, ID_ABOUT_FAQ); return TRUE; @@ -608,30 +605,10 @@ winAboutDlgProc(HWND hwndDialog, UINT message, WPARAM wParam, LPARAM lParam) PostMessage(s_pScreenPriv->hwndScreen, WM_NULL, 0, 0); /* Restore window procedures for URL buttons */ - winUnoverrideURLButton(hwndDialog, ID_ABOUT_CHANGELOG); winUnoverrideURLButton(hwndDialog, ID_ABOUT_WEBSITE); - winUnoverrideURLButton(hwndDialog, ID_ABOUT_UG); - winUnoverrideURLButton(hwndDialog, ID_ABOUT_FAQ); return TRUE; - case ID_ABOUT_CHANGELOG: - { - INT_PTR iReturn; - - const char *pszWinPath = "http://x.cygwin.com/" - "devel/server/changelog.html"; - - iReturn = (INT_PTR) ShellExecute(NULL, - "open", - pszWinPath, NULL, NULL, SW_MAXIMIZE); - if (iReturn < 32) { - ErrorF("winAboutDlgProc - WM_COMMAND - ID_ABOUT_CHANGELOG - " - "ShellExecute failed: %d\n", (int)iReturn); - } - } - return TRUE; - case ID_ABOUT_WEBSITE: { const char *pszPath = __VENDORDWEBSUPPORT__; @@ -647,36 +624,6 @@ winAboutDlgProc(HWND hwndDialog, UINT message, WPARAM wParam, LPARAM lParam) } } return TRUE; - - case ID_ABOUT_UG: - { - const char *pszPath = "http://x.cygwin.com/docs/ug/"; - INT_PTR iReturn; - - iReturn = (INT_PTR) ShellExecute(NULL, - "open", - pszPath, NULL, NULL, SW_MAXIMIZE); - if (iReturn < 32) { - ErrorF("winAboutDlgProc - WM_COMMAND - ID_ABOUT_UG - " - "ShellExecute failed: %d\n", (int)iReturn); - } - } - return TRUE; - - case ID_ABOUT_FAQ: - { - const char *pszPath = "http://x.cygwin.com/docs/faq/"; - INT_PTR iReturn; - - iReturn = (INT_PTR) ShellExecute(NULL, - "open", - pszPath, NULL, NULL, SW_MAXIMIZE); - if (iReturn < 32) { - ErrorF("winAboutDlgProc - WM_COMMAND - ID_ABOUT_FAQ - " - "ShellExecute failed: %d\n", (int)iReturn); - } - } - return TRUE; } break; @@ -690,10 +637,7 @@ winAboutDlgProc(HWND hwndDialog, UINT message, WPARAM wParam, LPARAM lParam) PostMessage(s_pScreenPriv->hwndScreen, WM_NULL, 0, 0); /* Restore window procedures for URL buttons */ - winUnoverrideURLButton(hwndDialog, ID_ABOUT_CHANGELOG); winUnoverrideURLButton(hwndDialog, ID_ABOUT_WEBSITE); - winUnoverrideURLButton(hwndDialog, ID_ABOUT_UG); - winUnoverrideURLButton(hwndDialog, ID_ABOUT_FAQ); return TRUE; } diff --git a/xserver/hw/xwin/wingc.c b/xserver/hw/xwin/wingc.c index 814d53113..5986e0a47 100644 --- a/xserver/hw/xwin/wingc.c +++ b/xserver/hw/xwin/wingc.c @@ -56,7 +56,7 @@ static void #if 0 static void - winChangeClipNativeGDI(GCPtr pGC, int nType, pointer pValue, int nRects); + winChangeClipNativeGDI(GCPtr pGC, int nType, void *pValue, int nRects); static void winDestroyClipNativeGDI(GCPtr pGC); @@ -214,7 +214,7 @@ winDestroyGCNativeGDI(GCPtr pGC) #if 0 /* See Porting Layer Definition - p. 46 */ static void -winChangeClipNativeGDI(GCPtr pGC, int nType, pointer pValue, int nRects) +winChangeClipNativeGDI(GCPtr pGC, int nType, void *pValue, int nRects) { } diff --git a/xserver/hw/xwin/winglobals.c b/xserver/hw/xwin/winglobals.c index d28132247..b9ad294d5 100644 --- a/xserver/hw/xwin/winglobals.c +++ b/xserver/hw/xwin/winglobals.c @@ -78,6 +78,7 @@ Bool g_fNoHelpMessageBox = FALSE; Bool g_fSoftwareCursor = FALSE; Bool g_fSilentDupError = FALSE; Bool g_fNativeGl = TRUE; +Bool g_fHostInTitle = FALSE; pthread_mutex_t g_pmTerminating = PTHREAD_MUTEX_INITIALIZER; #ifdef XWIN_CLIPBOARD diff --git a/xserver/hw/xwin/winglobals.h b/xserver/hw/xwin/winglobals.h index 58a919c65..60c00da42 100644 --- a/xserver/hw/xwin/winglobals.h +++ b/xserver/hw/xwin/winglobals.h @@ -54,6 +54,7 @@ extern Bool g_fXdmcpEnabled; extern Bool g_fNoHelpMessageBox; extern Bool g_fSilentDupError; extern Bool g_fNativeGl; +extern Bool g_fHostInTitle; extern HWND g_hDlgDepthChange; extern HWND g_hDlgExit; diff --git a/xserver/hw/xwin/winkeybd.c b/xserver/hw/xwin/winkeybd.c index 9c5d4e9cd..3a75ab268 100644 --- a/xserver/hw/xwin/winkeybd.c +++ b/xserver/hw/xwin/winkeybd.c @@ -51,7 +51,7 @@ static Bool g_winKeyState[NUM_KEYCODES]; */ static void - winKeybdBell(int iPercent, DeviceIntPtr pDeviceInt, pointer pCtrl, int iClass); + winKeybdBell(int iPercent, DeviceIntPtr pDeviceInt, void *pCtrl, int iClass); static void winKeybdCtrl(DeviceIntPtr pDevice, KeybdCtrl * pCtrl); @@ -120,7 +120,7 @@ winTranslateKey(WPARAM wParam, LPARAM lParam) /* Ring the keyboard bell (system speaker on PCs) */ static void -winKeybdBell(int iPercent, DeviceIntPtr pDeviceInt, pointer pCtrl, int iClass) +winKeybdBell(int iPercent, DeviceIntPtr pDeviceInt, void *pCtrl, int iClass) { /* * We can't use Beep () here because it uses the PC speaker @@ -128,7 +128,7 @@ winKeybdBell(int iPercent, DeviceIntPtr pDeviceInt, pointer pCtrl, int iClass) * sound on systems with a sound card or it will beep the PC speaker * on systems that do not have a sound card. */ - MessageBeep(MB_OK); + if (iPercent > 0) MessageBeep(MB_OK); } /* Change some keyboard configuration parameters */ diff --git a/xserver/hw/xwin/winmonitors.h b/xserver/hw/xwin/winmonitors.h index 8201e47f4..5fe3ecd52 100644 --- a/xserver/hw/xwin/winmonitors.h +++ b/xserver/hw/xwin/winmonitors.h @@ -40,4 +40,4 @@ struct GetMonitorInfoData { HMONITOR monitorHandle; }; -Bool QueryMonitor(int index, struct GetMonitorInfoData *data); +Bool QueryMonitor(int i, struct GetMonitorInfoData *data); diff --git a/xserver/hw/xwin/winmsgwindow.c b/xserver/hw/xwin/winmsgwindow.c index 8067c693c..59f1da503 100644 --- a/xserver/hw/xwin/winmsgwindow.c +++ b/xserver/hw/xwin/winmsgwindow.c @@ -22,6 +22,10 @@ * */ +#ifdef HAVE_XWIN_CONFIG_H +#include <xwin-config.h> +#endif + #include "win.h" /* diff --git a/xserver/hw/xwin/winmultiwindowicons.c b/xserver/hw/xwin/winmultiwindowicons.c index 0531ad6c7..93d389d46 100644 --- a/xserver/hw/xwin/winmultiwindowicons.c +++ b/xserver/hw/xwin/winmultiwindowicons.c @@ -372,13 +372,12 @@ winXIconToHICON(Display * pDisplay, Window id, int iconSize) unsigned char *mask, *image = NULL, *imageMask; unsigned char *dst, *src; int planes, bpp, i; - int biggest_size = 0; + unsigned int biggest_size = 0; HDC hDC; ICONINFO ii; XWMHints *hints; HICON hIcon = NULL; uint32_t *biggest_icon = NULL; - static Atom _XA_NET_WM_ICON; static int generation; uint32_t *icon, *icon_data = NULL; @@ -405,10 +404,25 @@ winXIconToHICON(Display * pDisplay, Window id, int iconSize) (icon_data != NULL)) { for (icon = icon_data; icon < &icon_data[size] && *icon; icon = &icon[icon[0] * icon[1] + 2]) { - /* Find an exact match to the size we require... */ + 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: found %lu x %lu NetIcon\n", icon[0], - icon[1]); + winDebug("winXIconToHICON: selected %d x %d NetIcon\n", + iconSize, iconSize); hIcon = NetWMToWinIcon(bpp, icon); break; } @@ -421,7 +435,7 @@ winXIconToHICON(Display * pDisplay, Window id, int iconSize) if (!hIcon && biggest_icon) { winDebug - ("winXIconToHICON: selected %lu x %lu NetIcon for scaling to %u x %u\n", + ("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); diff --git a/xserver/hw/xwin/winmultiwindowwindow.c b/xserver/hw/xwin/winmultiwindowwindow.c index 44ad19302..f2e7907b8 100644 --- a/xserver/hw/xwin/winmultiwindowwindow.c +++ b/xserver/hw/xwin/winmultiwindowwindow.c @@ -53,7 +53,7 @@ static void winUpdateWindowsWindow(WindowPtr pWin); static void - winFindWindow(pointer value, XID id, pointer cdata); + winFindWindow(void *value, XID id, void *cdata); static void @@ -724,7 +724,7 @@ winGetWindowID(WindowPtr pWin) */ static void -winFindWindow(pointer value, XID id, pointer cdata) +winFindWindow(void *value, XID id, void *cdata) { WindowIDPairPtr wi = (WindowIDPairPtr) cdata; @@ -813,7 +813,7 @@ winMinimizeWindow(Window id) ErrorF("winMinimizeWindow\n"); #endif - dixLookupResourceByType((pointer) &pWin, id, RT_WINDOW, NullClient, + dixLookupResourceByType((void *) &pWin, id, RT_WINDOW, NullClient, DixUnknownAccess); if (!pWin) { ErrorF("%s: NULL pWin. Leaving\n", __FUNCTION__); diff --git a/xserver/hw/xwin/winmultiwindowwm.c b/xserver/hw/xwin/winmultiwindowwm.c index 1dd8ba5b3..618e38121 100644 --- a/xserver/hw/xwin/winmultiwindowwm.c +++ b/xserver/hw/xwin/winmultiwindowwm.c @@ -60,6 +60,7 @@ #include "window.h" #include "pixmapstr.h" #include "windowstr.h" +#include "winglobals.h" #ifdef XWIN_MULTIWINDOWEXTWM #include <X11/extensions/windowswmstr.h> @@ -69,6 +70,10 @@ #define WINDOWSWM_NATIVE_HWND "_WINDOWSWM_NATIVE_HWND" #endif +#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); @@ -111,6 +116,7 @@ typedef struct _WMInfo { WMMsgQueueRec wmMsgQueue; Atom atmWmProtos; Atom atmWmDelete; + Atom atmWmTakeFocus; Atom atmPrivMap; Bool fAllowOtherWM; } WMInfoRec, *WMInfoPtr; @@ -405,7 +411,7 @@ Xutf8TextPropertyToString(Display * pDisplay, XTextProperty * xtp) for (i = 0; i < nNum; i++) iLen += strlen(ppList[i]); - pszReturnData = (char *) malloc(iLen + 1); + pszReturnData = malloc(iLen + 1); pszReturnData[0] = '\0'; for (i = 0; i < nNum; i++) strcat(pszReturnData, ppList[i]); @@ -413,7 +419,7 @@ Xutf8TextPropertyToString(Display * pDisplay, XTextProperty * xtp) XFreeStringList(ppList); } else { - pszReturnData = (char *) malloc(1); + pszReturnData = malloc(1); pszReturnData[0] = '\0'; } @@ -429,7 +435,10 @@ GetWindowName(Display * pDisplay, Window iWin, char **ppWindowName) { int nResult; XTextProperty xtpWindowName; + XTextProperty xtpClientMachine; char *pszWindowName; + char *pszClientMachine; + char hostname[HOST_NAME_MAX + 1]; #if CYGMULTIWINDOW_DEBUG ErrorF("GetWindowName\n"); @@ -449,10 +458,66 @@ GetWindowName(Display * pDisplay, Window iWin, char **ppWindowName) pszWindowName = Xutf8TextPropertyToString(pDisplay, &xtpWindowName); XFree(xtpWindowName.value); + + if (g_fHostInTitle) { + /* Try to get client machine name */ + nResult = XGetWMClientMachine(pDisplay, iWin, &xtpClientMachine); + if (nResult && xtpClientMachine.value && xtpClientMachine.nitems) { + pszClientMachine = + Xutf8TextPropertyToString(pDisplay, &xtpClientMachine); + XFree(xtpClientMachine.value); + + /* + If we have a client machine name + and it's not the local host name + and it's not already in the window title... + */ + if (strlen(pszClientMachine) && + !gethostname(hostname, HOST_NAME_MAX + 1) && + strcmp(hostname, pszClientMachine) && + (strstr(pszWindowName, pszClientMachine) == 0)) { + /* ... add '@<clientmachine>' to end of window name */ + *ppWindowName = + malloc(strlen(pszWindowName) + + strlen(pszClientMachine) + 2); + strcpy(*ppWindowName, pszWindowName); + strcat(*ppWindowName, "@"); + strcat(*ppWindowName, pszClientMachine); + + free(pszWindowName); + free(pszClientMachine); + + return; + } + } + } + + /* otherwise just return the window name */ *ppWindowName = pszWindowName; } /* + * Does the client support the specified WM_PROTOCOLS protocol? + */ + +static Bool +IsWmProtocolAvailable(Display * pDisplay, Window iWindow, Atom atmProtocol) +{ + int i, n, found = 0; + Atom *protocols; + + if (XGetWMProtocols(pDisplay, iWindow, &protocols, &n)) { + for (i = 0; i < n; ++i) + if (protocols[i] == atmProtocol) + ++found; + + XFree(protocols); + } + + return found > 0; +} + +/* * Send a message to the X server from the WM thread */ @@ -537,7 +602,7 @@ UpdateName(WMInfoPtr pWMInfo, Window iWindow) int iLen = MultiByteToWideChar(CP_UTF8, 0, pszWindowName, -1, NULL, 0); wchar_t *pwszWideWindowName = - (wchar_t *) malloc(sizeof(wchar_t) * (iLen + 1)); + malloc(sizeof(wchar_t)*(iLen + 1)); MultiByteToWideChar(CP_UTF8, 0, pszWindowName, -1, pwszWideWindowName, iLen); @@ -805,21 +870,10 @@ winMultiWindowWMProc(void *pArg) ErrorF("\tWM_WM_KILL\n"); #endif { - int i, n, found = 0; - Atom *protocols; - - /* --- */ - if (XGetWMProtocols(pWMInfo->pDisplay, - pNode->msg.iWindow, &protocols, &n)) { - for (i = 0; i < n; ++i) - if (protocols[i] == pWMInfo->atmWmDelete) - ++found; - - XFree(protocols); - } - /* --- */ - if (found) + if (IsWmProtocolAvailable(pWMInfo->pDisplay, + pNode->msg.iWindow, + pWMInfo->atmWmDelete)) SendXMessage(pWMInfo->pDisplay, pNode->msg.iWindow, pWMInfo->atmWmProtos, pWMInfo->atmWmDelete); @@ -832,11 +886,39 @@ winMultiWindowWMProc(void *pArg) #if CYGMULTIWINDOW_DEBUG ErrorF("\tWM_WM_ACTIVATE\n"); #endif - /* Set the input focus */ - XSetInputFocus(pWMInfo->pDisplay, - pNode->msg.iWindow, - RevertToPointerRoot, CurrentTime); + + /* + 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; + XWMHints *hints = XGetWMHints(pWMInfo->pDisplay, pNode->msg.iWindow); + + if (hints) { + if (hints->flags & InputHint) + neverFocus = !hints->input; + XFree(hints); + } + + if (!neverFocus) + XSetInputFocus(pWMInfo->pDisplay, + pNode->msg.iWindow, + RevertToPointerRoot, CurrentTime); + + if (IsWmProtocolAvailable(pWMInfo->pDisplay, + pNode->msg.iWindow, + pWMInfo->atmWmTakeFocus)) + SendXMessage(pWMInfo->pDisplay, + pNode->msg.iWindow, + pWMInfo->atmWmProtos, pWMInfo->atmWmTakeFocus); + + } break; case WM_WM_NAME_EVENT: @@ -1237,9 +1319,9 @@ winInitWM(void **ppWMInfo, pthread_mutex_t * ppmServerStarted, int dwScreen, HWND hwndScreen, BOOL allowOtherWM) { - WMProcArgPtr pArg = (WMProcArgPtr) malloc(sizeof(WMProcArgRec)); - WMInfoPtr pWMInfo = (WMInfoPtr) malloc(sizeof(WMInfoRec)); - XMsgProcArgPtr pXMsgArg = (XMsgProcArgPtr) malloc(sizeof(XMsgProcArgRec)); + 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) { @@ -1404,6 +1486,8 @@ winInitMultiWindowWM(WMInfoPtr pWMInfo, WMProcArgPtr pProcArg) "WM_PROTOCOLS", False); pWMInfo->atmWmDelete = XInternAtom(pWMInfo->pDisplay, "WM_DELETE_WINDOW", False); + pWMInfo->atmWmTakeFocus = XInternAtom(pWMInfo->pDisplay, + "WM_TAKE_FOCUS", False); pWMInfo->atmPrivMap = XInternAtom(pWMInfo->pDisplay, WINDOWSWM_NATIVE_HWND, False); @@ -1432,7 +1516,7 @@ winSendMessageToWM(void *pWMInfo, winWMMessagePtr pMsg) ErrorF("winSendMessageToWM ()\n"); #endif - pNode = (WMMsgNodePtr) malloc(sizeof(WMMsgNodeRec)); + pNode = malloc(sizeof(WMMsgNodeRec)); if (pNode != NULL) { memcpy(&pNode->msg, pMsg, sizeof(winWMMessageRec)); PushMessage(&((WMInfoPtr) pWMInfo)->wmMsgQueue, pNode); @@ -1577,10 +1661,10 @@ winDeinitMultiWindowWM(void) } /* Windows window styles */ -#define HINT_NOFRAME (1l<<0) +#define HINT_NOFRAME (1L<<0) #define HINT_BORDER (1L<<1) -#define HINT_SIZEBOX (1l<<2) -#define HINT_CAPTION (1l<<3) +#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) diff --git a/xserver/hw/xwin/winmultiwindowwndproc.c b/xserver/hw/xwin/winmultiwindowwndproc.c index abb87ee4b..17823baf2 100644 --- a/xserver/hw/xwin/winmultiwindowwndproc.c +++ b/xserver/hw/xwin/winmultiwindowwndproc.c @@ -316,6 +316,7 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) static Bool s_fTracking = FALSE; Bool needRestack = FALSE; LRESULT ret; + static Bool hasEnteredSizeMove = FALSE; #if CYGDEBUG winDebugWin32Message("winTopLevelWindowProc", hwnd, message, wParam, @@ -837,7 +838,7 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) break; case WM_CLOSE: - /* Removep AppUserModelID property */ + /* Remove AppUserModelID property */ winSetAppUserModelID(hwnd, NULL); /* Branch on if the window was killed in X already */ if (pWinPriv->fXKilled) { @@ -872,7 +873,9 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) case WM_MOVE: /* Adjust the X Window to the moved Windows window */ - winAdjustXWindow(pWin, hwnd); + if (!hasEnteredSizeMove) + winAdjustXWindow(pWin, hwnd); + /* else: Wait for WM_EXITSIZEMOVE */ return 0; case WM_SHOWWINDOW: @@ -1005,6 +1008,16 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) */ 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 @@ -1029,8 +1042,11 @@ winTopLevelWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) (int) (GetTickCount())); } #endif - /* Adjust the X Window to the moved Windows window */ - winAdjustXWindow(pWin, hwnd); + 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: diff --git a/xserver/hw/xwin/winnativegdi.c b/xserver/hw/xwin/winnativegdi.c index a2a5123a0..1859698a0 100644 --- a/xserver/hw/xwin/winnativegdi.c +++ b/xserver/hw/xwin/winnativegdi.c @@ -344,8 +344,7 @@ winCreateDIBNativeGDI(int iWidth, int iHeight, int iDepth, } /* Allocate bitmap info header */ - pbmih = (BITMAPINFOHEADER *) malloc(sizeof(BITMAPINFOHEADER) - + 256 * sizeof(RGBQUAD)); + pbmih = malloc(sizeof(BITMAPINFOHEADER) + 256 * sizeof(RGBQUAD)); if (pbmih == NULL) { ErrorF("winCreateDIBNativeGDI - malloc () failed\n"); return FALSE; diff --git a/xserver/hw/xwin/winpfbdd.c b/xserver/hw/xwin/winpfbdd.c index f87000726..010616101 100644 --- a/xserver/hw/xwin/winpfbdd.c +++ b/xserver/hw/xwin/winpfbdd.c @@ -306,7 +306,7 @@ winCloseScreenPrimaryDD(ScreenPtr pScreen) pScreenInfo->pScreen = NULL; /* Free the screen privates for this screen */ - free((pointer) pScreenPriv); + free((void *) pScreenPriv); return fReturn; } diff --git a/xserver/hw/xwin/winpixmap.c b/xserver/hw/xwin/winpixmap.c index d8a12d58e..ef158c854 100644 --- a/xserver/hw/xwin/winpixmap.c +++ b/xserver/hw/xwin/winpixmap.c @@ -178,7 +178,7 @@ Bool winModifyPixmapHeaderNativeGDI(PixmapPtr pPixmap, int iWidth, int iHeight, int iDepth, - int iBitsPerPixel, int devKind, pointer pPixData) + int iBitsPerPixel, int devKind, void *pPixData) { FatalError("winModifyPixmapHeaderNativeGDI ()\n"); return TRUE; diff --git a/xserver/hw/xwin/winprefslex.l b/xserver/hw/xwin/winprefslex.l index 15f707766..fd13edc05 100644 --- a/xserver/hw/xwin/winprefslex.l +++ b/xserver/hw/xwin/winprefslex.l @@ -45,7 +45,7 @@ extern void ErrorF (const char* /*f*/, ...); static char *makestr(char *str) { char *ptr; - ptr = (char*)malloc (strlen(str)+1); + ptr = malloc(strlen(str)+1); if (!ptr) { ErrorF ("winMultiWindowLex:makestr() out of memory\n"); @@ -90,6 +90,7 @@ ALWAYSONTOP { return ALWAYSONTOP; } DEBUG { return DEBUGOUTPUT; } RELOAD { return RELOAD; } TRAYICON { return TRAYICON; } +FORCEEXIT { return FORCEEXIT; } SILENTEXIT { return SILENTEXIT; } "{" { return LB; } "}" { return RB; } diff --git a/xserver/hw/xwin/winprefsyacc.y b/xserver/hw/xwin/winprefsyacc.y index 3b376b3e7..683fc44ca 100644 --- a/xserver/hw/xwin/winprefsyacc.y +++ b/xserver/hw/xwin/winprefsyacc.y @@ -311,10 +311,9 @@ static void AddMenuLine (char *text, MENUCOMMANDTYPE cmd, char *param) { if (menu.menuItem==NULL) - menu.menuItem = (MENUITEM*)malloc(sizeof(MENUITEM)); + menu.menuItem = malloc(sizeof(MENUITEM)); else - menu.menuItem = (MENUITEM*) - realloc(menu.menuItem, sizeof(MENUITEM)*(menu.menuItems+1)); + 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; @@ -339,10 +338,9 @@ CloseMenu (void) } if (pref.menuItems) - pref.menu = (MENUPARSED*) - realloc (pref.menu, (pref.menuItems+1)*sizeof(MENUPARSED)); + pref.menu = realloc (pref.menu, (pref.menuItems+1)*sizeof(MENUPARSED)); else - pref.menu = (MENUPARSED*)malloc (sizeof(MENUPARSED)); + pref.menu = malloc (sizeof(MENUPARSED)); memcpy (pref.menu+pref.menuItems, &menu, sizeof(MENUPARSED)); pref.menuItems++; @@ -365,10 +363,9 @@ static void AddIconLine (char *matchstr, char *iconfile) { if (pref.icon==NULL) - pref.icon = (ICONITEM*)malloc(sizeof(ICONITEM)); + pref.icon = malloc(sizeof(ICONITEM)); else - pref.icon = (ICONITEM*) - realloc(pref.icon, sizeof(ICONITEM)*(pref.iconItems+1)); + 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; @@ -401,10 +398,9 @@ static void AddStyleLine (char *matchstr, unsigned long style) { if (pref.style==NULL) - pref.style = (STYLEITEM*)malloc(sizeof(STYLEITEM)); + pref.style = malloc(sizeof(STYLEITEM)); else - pref.style = (STYLEITEM*) - realloc(pref.style, sizeof(STYLEITEM)*(pref.styleItems+1)); + 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; @@ -434,10 +430,9 @@ static void AddSysMenuLine (char *matchstr, char *menuname, int pos) { if (pref.sysMenu==NULL) - pref.sysMenu = (SYSMENUITEM*)malloc(sizeof(SYSMENUITEM)); + pref.sysMenu = malloc(sizeof(SYSMENUITEM)); else - pref.sysMenu = (SYSMENUITEM*) - realloc(pref.sysMenu, sizeof(SYSMENUITEM)*(pref.sysMenuItems+1)); + 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; diff --git a/xserver/hw/xwin/winprocarg.c b/xserver/hw/xwin/winprocarg.c index 858be4a56..f2bf05bad 100644 --- a/xserver/hw/xwin/winprocarg.c +++ b/xserver/hw/xwin/winprocarg.c @@ -1074,6 +1074,11 @@ ddxProcessArgument(int argc, char *argv[], int i) return 1; } + if (IS_OPTION("-hostintitle")) { + g_fHostInTitle = TRUE; + return 1; + } + return 0; } diff --git a/xserver/hw/xwin/winresource.h b/xserver/hw/xwin/winresource.h index a14d402e1..afbf9f28d 100644 --- a/xserver/hw/xwin/winresource.h +++ b/xserver/hw/xwin/winresource.h @@ -44,9 +44,6 @@ #define ID_APP_ALWAYS_ON_TOP 202 #define ID_APP_ABOUT 203 -#define ID_ABOUT_UG 300 -#define ID_ABOUT_FAQ 301 -#define ID_ABOUT_CHANGELOG 302 #define ID_ABOUT_WEBSITE 303 #endif diff --git a/xserver/hw/xwin/winshaddd.c b/xserver/hw/xwin/winshaddd.c index 2e7060838..5f3b658fb 100644 --- a/xserver/hw/xwin/winshaddd.c +++ b/xserver/hw/xwin/winshaddd.c @@ -676,7 +676,7 @@ winCloseScreenShadowDD(ScreenPtr pScreen) pScreenInfo->pScreen = NULL; /* Free the screen privates for this screen */ - free((pointer) pScreenPriv); + free((void *) pScreenPriv); return fReturn; } diff --git a/xserver/hw/xwin/winshadddnl.c b/xserver/hw/xwin/winshadddnl.c index 01097f295..55af5c383 100644 --- a/xserver/hw/xwin/winshadddnl.c +++ b/xserver/hw/xwin/winshadddnl.c @@ -703,7 +703,7 @@ winCloseScreenShadowDDNL(ScreenPtr pScreen) pScreenInfo->pScreen = NULL; /* Free the screen privates for this screen */ - free((pointer) pScreenPriv); + free((void *) pScreenPriv); return fReturn; } diff --git a/xserver/hw/xwin/winshadgdi.c b/xserver/hw/xwin/winshadgdi.c index ebc233924..5c815eb73 100644 --- a/xserver/hw/xwin/winshadgdi.c +++ b/xserver/hw/xwin/winshadgdi.c @@ -184,8 +184,7 @@ winQueryRGBBitsAndMasks(ScreenPtr pScreen) } /* Allocate a bitmap header and color table */ - pbmih = (BITMAPINFOHEADER *) malloc(sizeof(BITMAPINFOHEADER) - + 256 * sizeof(RGBQUAD)); + pbmih = malloc(sizeof(BITMAPINFOHEADER) + 256 * sizeof(RGBQUAD)); if (pbmih == NULL) { ErrorF("winQueryRGBBitsAndMasks - malloc failed\n"); return FALSE; @@ -545,8 +544,7 @@ winInitScreenShadowGDI(ScreenPtr pScreen) pScreenPriv->hdcShadow = CreateCompatibleDC(pScreenPriv->hdcScreen); /* Allocate bitmap info header */ - pScreenPriv->pbmih = (BITMAPINFOHEADER *) malloc(sizeof(BITMAPINFOHEADER) - + 256 * sizeof(RGBQUAD)); + pScreenPriv->pbmih = malloc(sizeof(BITMAPINFOHEADER) + 256 * sizeof(RGBQUAD)); if (pScreenPriv->pbmih == NULL) { ErrorF("winInitScreenShadowGDI - malloc () failed\n"); return FALSE; @@ -629,7 +627,7 @@ winCloseScreenShadowGDI(ScreenPtr pScreen) pScreenInfo->pScreen = NULL; /* Free the screen privates for this screen */ - free((pointer) pScreenPriv); + free((void *) pScreenPriv); return fReturn; } diff --git a/xserver/hw/xwin/winwakeup.c b/xserver/hw/xwin/winwakeup.c index 795221a1a..ebcb0fad9 100644 --- a/xserver/hw/xwin/winwakeup.c +++ b/xserver/hw/xwin/winwakeup.c @@ -39,7 +39,7 @@ /* See Porting Layer Definition - p. 7 */ void winWakeupHandler(ScreenPtr pScreen, - unsigned long ulResult, pointer pReadmask) + unsigned long ulResult, void *pReadmask) { MSG msg; diff --git a/xserver/hw/xwin/winwin32rootless.c b/xserver/hw/xwin/winwin32rootless.c index 724976a84..660a78f2d 100644 --- a/xserver/hw/xwin/winwin32rootless.c +++ b/xserver/hw/xwin/winwin32rootless.c @@ -39,7 +39,6 @@ #include <winuser.h> #define _WINDOWSWM_SERVER_ #include <X11/extensions/windowswmstr.h> -#include "dixevents.h" #include "winmultiwindowclass.h" #include <X11/Xatom.h> @@ -184,8 +183,8 @@ InitWin32RootlessEngine(win32RootlessWindowPtr pRLWinPriv) /* Allocate bitmap info header */ pRLWinPriv->pbmihShadow = - (BITMAPINFOHEADER *) malloc(sizeof(BITMAPINFOHEADER) - + 256 * sizeof(RGBQUAD)); + malloc(sizeof(BITMAPINFOHEADER) + + 256 * sizeof(RGBQUAD)); if (pRLWinPriv->pbmihShadow == NULL) { ErrorF("InitWin32RootlessEngine - malloc () failed\n"); return; @@ -214,8 +213,7 @@ winMWExtWMCreateFrame(RootlessWindowPtr pFrame, ScreenPtr pScreen, newX, newY, pFrame->width, pFrame->height); #endif - pRLWinPriv = - (win32RootlessWindowPtr) malloc(sizeof(win32RootlessWindowRec)); + pRLWinPriv = malloc(sizeof(win32RootlessWindowRec)); pRLWinPriv->pFrame = pFrame; pRLWinPriv->pfb = NULL; pRLWinPriv->hbmpShadow = NULL; diff --git a/xserver/hw/xwin/winwindow.c b/xserver/hw/xwin/winwindow.c index 029bd855d..8c1c28f2a 100644 --- a/xserver/hw/xwin/winwindow.c +++ b/xserver/hw/xwin/winwindow.c @@ -39,7 +39,7 @@ */ static int - winAddRgn(WindowPtr pWindow, pointer data); + winAddRgn(WindowPtr pWindow, void *data); static void @@ -155,7 +155,7 @@ winCopyWindowNativeGDI(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) nbox = RegionNumRects(prgnDst); /* Allocate source points for each box */ - if (!(pptSrc = (DDXPointPtr) malloc(nbox * sizeof(DDXPointRec)))) + if (!(pptSrc = malloc(nbox * sizeof(DDXPointRec)))) return; /* Set an iterator pointer */ @@ -456,7 +456,7 @@ winSetShapeRootless(WindowPtr pWin, int kind) static int -winAddRgn(WindowPtr pWin, pointer data) +winAddRgn(WindowPtr pWin, void *data) { int iX, iY, iWidth, iHeight, iBorder; HRGN hRgn = *(HRGN *) data; diff --git a/xserver/hw/xwin/winwindowswm.c b/xserver/hw/xwin/winwindowswm.c index be43265e0..2805ff7ce 100644 --- a/xserver/hw/xwin/winwindowswm.c +++ b/xserver/hw/xwin/winwindowswm.c @@ -53,8 +53,8 @@ static XID eventResource; /* Currently selected events */ static unsigned int eventMask = 0; -static int WMFreeClient(pointer data, XID id); -static int WMFreeEvents(pointer data, XID id); +static int WMFreeClient(void *data, XID id); +static int WMFreeEvents(void *data, XID id); static void SNotifyEvent(xWindowsWMNotifyEvent * from, xWindowsWMNotifyEvent * to); @@ -99,13 +99,13 @@ updateEventMask(WMEventPtr * pHead) } /*ARGSUSED*/ static int -WMFreeClient(pointer data, XID id) +WMFreeClient(void *data, XID id) { WMEventPtr pEvent; WMEventPtr *pHead, pCur, pPrev; pEvent = (WMEventPtr) data; - dixLookupResourceByType((pointer) &pHead, eventResource, eventResourceType, + dixLookupResourceByType((void *) &pHead, eventResource, eventResourceType, NullClient, DixUnknownAccess); if (pHead) { pPrev = 0; @@ -119,12 +119,12 @@ WMFreeClient(pointer data, XID id) } updateEventMask(pHead); } - free((pointer) pEvent); + free((void *) pEvent); return 1; } /*ARGSUSED*/ static int -WMFreeEvents(pointer data, XID id) +WMFreeEvents(void *data, XID id) { WMEventPtr *pHead, pCur, pNext; @@ -132,9 +132,9 @@ WMFreeEvents(pointer data, XID id) for (pCur = *pHead; pCur; pCur = pNext) { pNext = pCur->next; FreeResource(pCur->clientResource, ClientType); - free((pointer) pCur); + free((void *) pCur); } - free((pointer) pHead); + free((void *) pHead); eventMask = 0; return 1; } @@ -147,7 +147,7 @@ ProcWindowsWMSelectInput(ClientPtr client) XID clientResource; REQUEST_SIZE_MATCH(xWindowsWMSelectInputReq); - dixLookupResourceByType((pointer) &pHead, eventResource, eventResourceType, + dixLookupResourceByType((void *) &pHead, eventResource, eventResourceType, client, DixWriteAccess); if (stuff->mask != 0) { if (pHead) { @@ -162,7 +162,7 @@ ProcWindowsWMSelectInput(ClientPtr client) } /* build the entry */ - pNewEvent = (WMEventPtr) malloc(sizeof(WMEventRec)); + pNewEvent = malloc(sizeof(WMEventRec)); if (!pNewEvent) return BadAlloc; pNewEvent->next = 0; @@ -174,7 +174,7 @@ ProcWindowsWMSelectInput(ClientPtr client) */ clientResource = FakeClientID(client->index); pNewEvent->clientResource = clientResource; - if (!AddResource(clientResource, ClientType, (pointer) pNewEvent)) + if (!AddResource(clientResource, ClientType, (void *) pNewEvent)) return BadAlloc; /* * create a resource to contain a pointer to the list @@ -183,9 +183,9 @@ ProcWindowsWMSelectInput(ClientPtr client) * done through the resource database. */ if (!pHead) { - pHead = (WMEventPtr *) malloc(sizeof(WMEventPtr)); + pHead = malloc(sizeof(WMEventPtr)); if (!pHead || - !AddResource(eventResource, eventResourceType, (pointer) pHead)) + !AddResource(eventResource, eventResourceType, (void *) pHead)) { FreeResource(clientResource, RT_NONE); return BadAlloc; @@ -239,7 +239,7 @@ winWindowsWMSendEvent(int type, unsigned int mask, int which, int arg, ErrorF("winWindowsWMSendEvent %d %d %d %d, %d %d - %d %d\n", type, mask, which, arg, x, y, w, h); #endif - dixLookupResourceByType((pointer) &pHead, eventResource, eventResourceType, + dixLookupResourceByType((void *) &pHead, eventResource, eventResourceType, NullClient, DixUnknownAccess); if (!pHead) return; diff --git a/xserver/hw/xwin/winwndproc.c b/xserver/hw/xwin/winwndproc.c index c73a75c6f..bee223de7 100644 --- a/xserver/hw/xwin/winwndproc.c +++ b/xserver/hw/xwin/winwndproc.c @@ -955,11 +955,11 @@ winWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) 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) + if (g_fButton[0] && !wL) PostMessage(hwnd, WM_LBUTTONUP, wCtrl | wM | wR | wShift, lPos); - if (g_fButton[1] & !wM) + if (g_fButton[1] && !wM) PostMessage(hwnd, WM_MBUTTONUP, wCtrl | wL | wR | wShift, lPos); - if (g_fButton[2] & !wR) + if (g_fButton[2] && !wR) PostMessage(hwnd, WM_RBUTTONUP, wCtrl | wL | wM | wShift, lPos); } } |