From 428261197a554a028df1fd098203da36fb5306b4 Mon Sep 17 00:00:00 2001 From: matthieu Date: Sun, 5 Dec 2010 15:36:02 +0000 Subject: [PATCH] Upgrade to xorg-server 1.9.2. Tested by ajacoutot@, krw@, shadchin@ and jasper@ on various configurations including multihead with both zaphod and xrandr. --- xserver/ChangeLog | 7790 ++++++++++++-- xserver/Makefile.bsd-wrapper | 3 +- xserver/Makefile.in | 32 +- xserver/Xext/Makefile.am | 10 - xserver/Xext/Makefile.in | 66 +- xserver/Xext/bigreq.c | 2 +- xserver/Xext/dpms.c | 16 +- xserver/Xext/geext.c | 8 +- xserver/Xext/geint.h | 3 +- xserver/Xext/mbuf.c | 2014 ---- xserver/Xext/mbufbf.c | 1007 -- xserver/Xext/mbufpx.c | 648 -- xserver/Xext/panoramiX.c | 204 +- xserver/Xext/panoramiX.h | 22 - xserver/Xext/panoramiXprocs.c | 546 +- xserver/Xext/panoramiXsrv.h | 3 - xserver/Xext/saver.c | 76 +- xserver/Xext/security.c | 54 +- xserver/Xext/shape.c | 123 +- xserver/Xext/shm.c | 109 +- xserver/Xext/sleepuntil.c | 6 +- xserver/Xext/sync.c | 101 +- xserver/Xext/xace.c | 193 +- xserver/Xext/xcalibrate.c | 10 +- xserver/Xext/xcmisc.c | 10 +- xserver/Xext/xf86bigfont.c | 50 +- xserver/Xext/xres.c | 16 +- xserver/Xext/xselinux_ext.c | 22 +- xserver/Xext/xselinux_hooks.c | 62 +- xserver/Xext/xselinux_label.c | 8 +- xserver/Xext/xselinuxint.h | 13 +- xserver/Xext/xtest.c | 43 +- xserver/Xext/xvdisp.c | 250 +- xserver/Xext/xvdix.h | 2 +- xserver/Xext/xvmain.c | 73 +- xserver/Xext/xvmc.c | 60 +- xserver/Xi/Makefile.in | 30 +- xserver/Xi/closedev.c | 2 +- xserver/Xi/exevents.c | 170 +- xserver/Xi/exglobals.h | 4 +- xserver/Xi/extinit.c | 8 +- xserver/Xi/getdctl.c | 4 +- xserver/Xi/getfctl.c | 4 +- xserver/Xi/getkmap.c | 4 +- xserver/Xi/getmmap.c | 2 +- xserver/Xi/getprop.c | 6 +- xserver/Xi/getselev.c | 4 +- xserver/Xi/gtmotion.c | 3 +- xserver/Xi/listdev.c | 10 +- xserver/Xi/opendev.c | 2 +- xserver/Xi/queryst.c | 4 +- xserver/Xi/sendexev.c | 5 +- xserver/Xi/stubs.c | 8 +- xserver/Xi/xichangecursor.c | 4 +- xserver/Xi/xichangehierarchy.c | 12 +- xserver/Xi/xipassivegrab.c | 6 +- xserver/Xi/xiproperty.c | 61 +- xserver/Xi/xiquerydevice.c | 13 +- xserver/Xi/xiquerypointer.c | 13 +- xserver/Xi/xiselectev.c | 6 +- xserver/aclocal.m4 | 213 +- xserver/composite/Makefile.in | 30 +- xserver/composite/compalloc.c | 39 +- xserver/composite/compext.c | 25 +- xserver/composite/compinit.c | 33 +- xserver/composite/compint.h | 16 +- xserver/composite/compoverlay.c | 6 +- xserver/composite/compwindow.c | 181 +- xserver/config/Makefile.am | 2 +- xserver/config/Makefile.in | 32 +- xserver/config/config.c | 6 +- xserver/config/dbus.c | 21 +- xserver/config/fdi2iclass.py | 202 + xserver/config/hal.c | 124 +- xserver/config/udev.c | 78 +- xserver/configure | 1017 +- xserver/configure.ac | 102 +- xserver/damageext/Makefile.in | 30 +- xserver/damageext/damageext.c | 51 +- xserver/damageext/damageextint.h | 3 +- xserver/dbe/Makefile.in | 30 +- xserver/dbe/dbe.c | 186 +- xserver/dbe/dbestruct.h | 12 - xserver/dbe/midbe.c | 56 +- xserver/dbe/midbe.h | 11 + xserver/dbe/midbestr.h | 16 - xserver/dix/Makefile.am | 1 + xserver/dix/Makefile.in | 36 +- xserver/dix/atom.c | 54 +- xserver/dix/colormap.c | 320 +- xserver/dix/cursor.c | 75 +- xserver/dix/devices.c | 228 +- xserver/dix/dispatch.c | 674 +- xserver/dix/dixfonts.c | 293 +- xserver/dix/dixutils.c | 66 +- xserver/dix/enterleave.c | 39 +- xserver/dix/eventconvert.c | 8 +- xserver/dix/events.c | 382 +- xserver/dix/extension.c | 49 +- xserver/dix/gc.c | 440 +- xserver/dix/getevents.c | 122 +- xserver/dix/globals.c | 6 - xserver/dix/glyphcurs.c | 9 +- xserver/dix/grabs.c | 38 +- xserver/dix/inpututils.c | 88 +- xserver/dix/main.c | 39 +- xserver/dix/pixmap.c | 19 +- xserver/dix/privates.c | 614 +- xserver/dix/property.c | 94 +- xserver/dix/ptrveloc.c | 43 +- xserver/{mi/miregion.c => dix/region.c} | 442 +- xserver/dix/registry.c | 14 +- xserver/dix/resource.c | 129 +- xserver/dix/selection.c | 28 +- xserver/dix/swaprep.c | 12 +- xserver/dix/swapreq.c | 2 +- xserver/dix/window.c | 443 +- xserver/doc/Makefile.am | 2 + xserver/doc/Makefile.in | 249 +- xserver/doc/xml/Makefile.am | 35 + xserver/doc/xml/Makefile.in | 250 +- xserver/doc/xml/Xserver-spec.xml | 5202 +++++++++ xserver/doc/xml/dtrace/Makefile.am | 36 + xserver/doc/xml/dtrace/Makefile.in | 872 ++ xserver/doc/xml/dtrace/Xserver-DTrace.xml | 579 + xserver/doc/xml/xmlrules.in | 78 + xserver/doc/xml/xserver.ent.in | 3 + xserver/exa/Makefile.in | 30 +- xserver/exa/exa.c | 85 +- xserver/exa/exa_accel.c | 98 +- xserver/exa/exa_classic.c | 15 +- xserver/exa/exa_driver.c | 7 +- xserver/exa/exa_glyphs.c | 16 +- xserver/exa/exa_migration_classic.c | 60 +- xserver/exa/exa_mixed.c | 14 +- xserver/exa/exa_offscreen.c | 8 +- xserver/exa/exa_priv.h | 30 +- xserver/exa/exa_render.c | 50 +- xserver/exa/exa_unaccel.c | 88 +- xserver/fb/Makefile.am | 2 + xserver/fb/Makefile.in | 37 +- xserver/fb/fb.h | 26 +- xserver/fb/fb24_32.c | 8 +- xserver/fb/fballpriv.c | 44 +- xserver/fb/fbarc.c | 2 +- xserver/fb/fbbits.h | 6 +- xserver/fb/fbcmap.c | 32 +- xserver/fb/fbcopy.c | 4 +- xserver/fb/fbfill.c | 2 +- xserver/fb/fbfillrect.c | 6 +- xserver/fb/fbfillsp.c | 6 +- xserver/fb/fbgc.c | 2 +- xserver/fb/fbglyph.c | 6 +- xserver/fb/fbimage.c | 8 +- xserver/fb/fbline.c | 4 +- xserver/fb/fboverlay.c | 70 +- xserver/fb/fbpict.c | 38 +- xserver/fb/fbpixmap.c | 22 +- xserver/fb/fbpoint.c | 2 +- xserver/fb/fbpush.c | 4 +- xserver/fb/fbscreen.c | 19 +- xserver/fb/fbseg.c | 8 +- xserver/fb/fbsetsp.c | 4 +- xserver/fb/fbtrap.c | 3 - xserver/fb/fbwindow.c | 14 +- xserver/fb/wfbrename.h | 8 +- xserver/glx/Makefile.in | 30 +- xserver/glx/glxcmds.c | 36 +- xserver/glx/glxdri.c | 74 +- xserver/glx/glxdri2.c | 75 +- xserver/glx/glxdricommon.c | 15 +- xserver/glx/glxdricommon.h | 3 +- xserver/glx/glxdriswrast.c | 37 +- xserver/glx/glxext.c | 31 +- xserver/glx/glxscreens.c | 21 +- xserver/glx/indirect_util.c | 2 +- xserver/glx/single2.c | 26 +- xserver/glx/single2swap.c | 4 +- xserver/glx/singlesize.c | 4 +- xserver/glx/unpack.h | 2 +- xserver/glx/xfont.c | 25 +- xserver/hw/Makefile.in | 30 +- xserver/hw/dmx/Makefile.in | 30 +- xserver/hw/dmx/config/Makefile.in | 30 +- xserver/hw/dmx/config/dmxparse.c | 4 +- xserver/hw/dmx/dmx.c | 76 +- xserver/hw/dmx/dmx.h | 29 +- xserver/hw/dmx/dmx_glxvisuals.c | 12 +- xserver/hw/dmx/dmxclient.h | 2 - xserver/hw/dmx/dmxcmap.c | 10 +- xserver/hw/dmx/dmxcmap.h | 3 - xserver/hw/dmx/dmxcursor.c | 66 +- xserver/hw/dmx/dmxextension.c | 40 +- xserver/hw/dmx/dmxfont.c | 46 +- xserver/hw/dmx/dmxgc.c | 10 +- xserver/hw/dmx/dmxgc.h | 3 - xserver/hw/dmx/dmxgcops.c | 18 +- xserver/hw/dmx/dmxinit.c | 20 +- xserver/hw/dmx/dmxpict.c | 38 +- xserver/hw/dmx/dmxpict.h | 4 - xserver/hw/dmx/dmxpixmap.c | 28 +- xserver/hw/dmx/dmxpixmap.h | 3 - xserver/hw/dmx/dmxprop.c | 8 +- xserver/hw/dmx/dmxscrinit.c | 40 +- xserver/hw/dmx/dmxscrinit.h | 3 - xserver/hw/dmx/dmxshadow.c | 4 +- xserver/hw/dmx/dmxstat.c | 2 +- xserver/hw/dmx/dmxsync.c | 2 +- xserver/hw/dmx/dmxwindow.c | 30 +- xserver/hw/dmx/dmxwindow.h | 7 +- xserver/hw/dmx/doc/DMXSpec-v1.txt | 2 +- xserver/hw/dmx/doc/DMXSpec.txt | 2 +- xserver/hw/dmx/doc/Makefile.am | 37 +- xserver/hw/dmx/doc/Makefile.in | 124 +- xserver/hw/dmx/doc/{dmx.sgml => dmx.xml} | 2554 +++-- .../hw/dmx/doc/{scaled.sgml => scaled.xml} | 574 +- xserver/hw/dmx/examples/Makefile.in | 30 +- xserver/hw/dmx/glxProxy/Makefile.in | 30 +- xserver/hw/dmx/glxProxy/compsize.c | 8 +- xserver/hw/dmx/glxProxy/g_renderswap.c | 151 +- xserver/hw/dmx/glxProxy/glxcmds.c | 36 +- xserver/hw/dmx/glxProxy/glxcmdsswap.c | 9 + xserver/hw/dmx/glxProxy/glxext.c | 6 +- xserver/hw/dmx/glxProxy/glxfbconfig.c | 6 +- xserver/hw/dmx/glxProxy/glxscreens.c | 27 +- xserver/hw/dmx/glxProxy/glxsingle.c | 40 +- xserver/hw/dmx/glxProxy/glxswap.c | 10 +- xserver/hw/dmx/glxProxy/glxutil.c | 6 +- xserver/hw/dmx/glxProxy/glxvendor.c | 18 +- xserver/hw/dmx/glxProxy/glxvisuals.c | 25 +- xserver/hw/dmx/glxProxy/render2swap.c | 11 +- xserver/hw/dmx/glxProxy/renderpixswap.c | 2 +- xserver/hw/dmx/glxProxy/unpack.h | 6 +- xserver/hw/dmx/input/Makefile.in | 30 +- xserver/hw/dmx/input/atKeynames.h | 2 - xserver/hw/dmx/input/dmxbackend.c | 2 +- xserver/hw/dmx/input/dmxcommon.c | 9 +- xserver/hw/dmx/input/dmxconsole.c | 29 +- xserver/hw/dmx/input/dmxinputinit.c | 35 +- xserver/hw/dmx/input/dmxinputinit.h | 4 +- xserver/hw/dmx/input/dmxmotion.c | 2 +- xserver/hw/dmx/input/dmxxinput.c | 57 - xserver/hw/dmx/input/lnx-keyboard.c | 4 +- xserver/hw/dmx/input/lnx-ms.c | 2 +- xserver/hw/dmx/input/lnx-ps2.c | 2 +- xserver/hw/dmx/input/usb-common.c | 2 +- xserver/hw/dmx/input/usb-keyboard.c | 4 +- xserver/hw/kdrive/Makefile.in | 30 +- xserver/hw/kdrive/ephyr/Makefile.in | 30 +- xserver/hw/kdrive/ephyr/XF86dri.c | 10 +- xserver/hw/kdrive/ephyr/ephyr.c | 133 +- xserver/hw/kdrive/ephyr/ephyr_draw.c | 27 +- xserver/hw/kdrive/ephyr/ephyrdriext.c | 71 +- xserver/hw/kdrive/ephyr/ephyrglxext.c | 10 +- xserver/hw/kdrive/ephyr/ephyrhostvideo.c | 31 +- xserver/hw/kdrive/ephyr/ephyrvideo.c | 36 +- xserver/hw/kdrive/ephyr/hostx.c | 27 +- xserver/hw/kdrive/fake/Makefile.in | 30 +- xserver/hw/kdrive/fake/fake.c | 13 +- xserver/hw/kdrive/fbdev/Makefile.in | 30 +- xserver/hw/kdrive/fbdev/fbdev.c | 14 +- xserver/hw/kdrive/linux/Makefile.in | 30 +- xserver/hw/kdrive/linux/evdev.c | 20 +- xserver/hw/kdrive/linux/keyboard.c | 4 +- xserver/hw/kdrive/linux/mouse.c | 4 +- xserver/hw/kdrive/linux/tslib.c | 4 +- xserver/hw/kdrive/openbsd/Makefile.in | 30 +- xserver/hw/kdrive/openbsd/openbsd.c | 2 +- xserver/hw/kdrive/sdl/Makefile.in | 854 ++ xserver/hw/kdrive/src/Makefile.in | 30 +- xserver/hw/kdrive/src/kcmap.c | 2 +- xserver/hw/kdrive/src/kdrive.c | 43 +- xserver/hw/kdrive/src/kdrive.h | 4 +- xserver/hw/kdrive/src/kinfo.c | 36 +- xserver/hw/kdrive/src/kinput.c | 36 +- xserver/hw/kdrive/src/kshadow.c | 6 +- xserver/hw/kdrive/src/kxv.c | 254 +- xserver/hw/kdrive/wscons/Makefile.in | 30 +- xserver/hw/vfb/InitInput.c | 2 - xserver/hw/vfb/InitOutput.c | 159 +- xserver/hw/vfb/Makefile.am | 1 - xserver/hw/vfb/Makefile.in | 31 +- xserver/hw/vfb/lk201kbd.h | 158 - xserver/hw/xfree86/Makefile.in | 30 +- xserver/hw/xfree86/common/Makefile.am | 1 + xserver/hw/xfree86/common/Makefile.in | 33 +- xserver/hw/xfree86/common/compiler.h | 416 +- xserver/hw/xfree86/common/xf86.h | 85 +- xserver/hw/xfree86/common/xf86AutoConfig.c | 267 +- xserver/hw/xfree86/common/xf86Bus.c | 334 +- xserver/hw/xfree86/common/xf86Bus.h | 1 - xserver/hw/xfree86/common/xf86Config.c | 59 +- xserver/hw/xfree86/common/xf86Configure.c | 81 +- xserver/hw/xfree86/common/xf86Cursor.c | 108 +- xserver/hw/xfree86/common/xf86DGA.c | 61 +- xserver/hw/xfree86/common/xf86DPMS.c | 9 +- xserver/hw/xfree86/common/xf86Events.c | 8 +- xserver/hw/xfree86/common/xf86Globals.c | 12 +- xserver/hw/xfree86/common/xf86Helper.c | 586 +- xserver/hw/xfree86/common/xf86Init.c | 354 +- xserver/hw/xfree86/common/xf86Mode.c | 204 +- xserver/hw/xfree86/common/xf86Module.h | 6 +- xserver/hw/xfree86/common/xf86Opt.h | 4 + xserver/hw/xfree86/common/xf86Option.c | 63 +- xserver/hw/xfree86/common/xf86Priv.h | 7 +- xserver/hw/xfree86/common/xf86Privstr.h | 3 - xserver/hw/xfree86/common/xf86RandR.c | 16 +- xserver/hw/xfree86/common/xf86ShowOpts.c | 8 +- xserver/hw/xfree86/common/xf86VGAarbiter.c | 39 +- .../hw/xfree86/common/xf86VGAarbiterPriv.h | 16 +- xserver/hw/xfree86/common/xf86VidMode.c | 20 +- xserver/hw/xfree86/common/xf86Xinput.c | 265 +- xserver/hw/xfree86/common/xf86Xinput.h | 1 + xserver/hw/xfree86/common/xf86cmap.c | 122 +- xserver/hw/xfree86/common/xf86cmap.h | 4 + xserver/hw/xfree86/common/xf86fbman.c | 190 +- xserver/hw/xfree86/common/xf86pciBus.c | 943 +- xserver/hw/xfree86/common/xf86pciBus.h | 4 + xserver/hw/xfree86/common/xf86sbusBus.c | 21 +- xserver/hw/xfree86/common/xf86str.h | 3 +- xserver/hw/xfree86/common/xf86xv.c | 338 +- xserver/hw/xfree86/common/xf86xvmc.c | 23 +- xserver/hw/xfree86/common/xisb.c | 24 +- xserver/hw/xfree86/ddc/Makefile.in | 30 +- xserver/hw/xfree86/ddc/ddc.c | 49 +- xserver/hw/xfree86/ddc/ddcProperty.c | 2 +- xserver/hw/xfree86/ddc/interpret_edid.c | 6 +- xserver/hw/xfree86/dixmods/Makefile.in | 30 +- xserver/hw/xfree86/dixmods/extmod/Makefile.in | 30 +- xserver/hw/xfree86/dixmods/extmod/modinit.c | 13 +- xserver/hw/xfree86/dixmods/extmod/modinit.h | 5 - xserver/hw/xfree86/dixmods/extmod/xf86dga2.c | 175 +- xserver/hw/xfree86/dixmods/extmod/xf86vmode.c | 126 +- xserver/hw/xfree86/doc/Makefile.am | 4 +- xserver/hw/xfree86/doc/Makefile.in | 34 +- xserver/hw/xfree86/doc/README.DRI | 1256 --- xserver/hw/xfree86/doc/README.rapidaccess | 48 - xserver/hw/xfree86/doc/devel/Makefile.in | 30 +- xserver/hw/xfree86/doc/man/Makefile.in | 30 +- xserver/hw/xfree86/doc/man/Xorg.man.pre | 10 + xserver/hw/xfree86/doc/man/xorg.conf.man.pre | 82 +- xserver/hw/xfree86/doc/sgml/DESIGN.sgml | 7414 ------------- xserver/hw/xfree86/doc/sgml/DESIGN.xml | 9402 +++++++++++++++++ xserver/hw/xfree86/doc/sgml/Makefile.am | 37 +- xserver/hw/xfree86/doc/sgml/Makefile.in | 123 +- xserver/hw/xfree86/dri/Makefile.in | 30 +- xserver/hw/xfree86/dri/dri.c | 88 +- xserver/hw/xfree86/dri/dristruct.h | 3 +- xserver/hw/xfree86/dri/xf86dri.c | 28 +- xserver/hw/xfree86/dri2/Makefile.in | 30 +- xserver/hw/xfree86/dri2/dri2.c | 280 +- xserver/hw/xfree86/dri2/dri2.h | 19 +- xserver/hw/xfree86/dri2/dri2ext.c | 64 +- xserver/hw/xfree86/exa/Makefile.in | 30 +- xserver/hw/xfree86/exa/examodule.c | 13 +- xserver/hw/xfree86/fbdevhw/Makefile.am | 3 +- xserver/hw/xfree86/fbdevhw/Makefile.in | 85 +- xserver/hw/xfree86/fbdevhw/fbdevhw.c | 2 +- xserver/hw/xfree86/i2c/Makefile.in | 30 +- xserver/hw/xfree86/i2c/bt829.c | 4 +- xserver/hw/xfree86/i2c/fi1236.c | 6 +- xserver/hw/xfree86/i2c/msp3430.c | 18 +- xserver/hw/xfree86/i2c/tda8425.c | 6 +- xserver/hw/xfree86/i2c/tda9850.c | 6 +- xserver/hw/xfree86/i2c/tda9885.c | 6 +- xserver/hw/xfree86/i2c/uda1380.c | 6 +- xserver/hw/xfree86/i2c/xf86i2c.c | 8 +- xserver/hw/xfree86/int10/Makefile.am | 1 + xserver/hw/xfree86/int10/Makefile.in | 34 +- xserver/hw/xfree86/int10/generic.c | 22 +- xserver/hw/xfree86/int10/helper_exec.c | 2 +- xserver/hw/xfree86/int10/helper_mem.c | 11 +- xserver/hw/xfree86/loader/Makefile.in | 30 +- xserver/hw/xfree86/loader/loadext.c | 20 +- xserver/hw/xfree86/loader/loadmod.c | 82 +- xserver/hw/xfree86/loader/sdksyms.sh | 16 +- xserver/hw/xfree86/modes/Makefile.in | 30 +- xserver/hw/xfree86/modes/xf86Crtc.c | 163 +- xserver/hw/xfree86/modes/xf86Cursors.c | 20 +- xserver/hw/xfree86/modes/xf86DiDGA.c | 5 +- xserver/hw/xfree86/modes/xf86DisplayIDModes.c | 2 +- xserver/hw/xfree86/modes/xf86EdidModes.c | 2 +- xserver/hw/xfree86/modes/xf86Modes.c | 8 +- xserver/hw/xfree86/modes/xf86RandR12.c | 80 +- xserver/hw/xfree86/modes/xf86RandR12.h | 1 + xserver/hw/xfree86/modes/xf86Rotate.c | 30 +- xserver/hw/xfree86/os-support/Makefile.in | 30 +- xserver/hw/xfree86/os-support/bsd/Makefile.in | 30 +- .../hw/xfree86/os-support/bsd/alpha_video.c | 10 +- xserver/hw/xfree86/os-support/bsd/arm_video.c | 2 +- xserver/hw/xfree86/os-support/bsd/bsd_VTsw.c | 16 +- xserver/hw/xfree86/os-support/bsd/bsd_init.c | 12 +- .../hw/xfree86/os-support/bsd/hppa_video.c | 2 +- .../hw/xfree86/os-support/bsd/i386_video.c | 22 +- .../hw/xfree86/os-support/bsd/sparc64_video.c | 2 +- xserver/hw/xfree86/os-support/bus/Makefile.in | 30 +- xserver/hw/xfree86/os-support/bus/Pci.c | 1 - xserver/hw/xfree86/os-support/bus/Pci.h | 8 - xserver/hw/xfree86/os-support/bus/Sbus.c | 16 +- .../hw/xfree86/os-support/hurd/Makefile.in | 30 +- .../hw/xfree86/os-support/linux/Makefile.in | 30 +- .../hw/xfree86/os-support/linux/int10/linux.c | 18 +- xserver/hw/xfree86/os-support/linux/lnx_agp.c | 4 +- .../hw/xfree86/os-support/linux/lnx_init.c | 17 +- .../hw/xfree86/os-support/linux/lnx_video.c | 10 +- .../hw/xfree86/os-support/misc/Makefile.in | 30 +- xserver/hw/xfree86/os-support/sco/Makefile.in | 30 +- xserver/hw/xfree86/os-support/sco/VTsw_sco.c | 12 +- xserver/hw/xfree86/os-support/sco/sco_init.c | 16 +- .../hw/xfree86/os-support/shared/VTsw_noop.c | 8 +- .../hw/xfree86/os-support/shared/VTsw_usl.c | 14 +- .../xfree86/os-support/shared/bios_devmem.c | 8 +- .../hw/xfree86/os-support/shared/bios_mmap.c | 12 +- .../hw/xfree86/os-support/shared/posix_tty.c | 63 +- xserver/hw/xfree86/os-support/shared/vidmem.c | 4 +- .../hw/xfree86/os-support/solaris/Makefile.in | 30 +- .../hw/xfree86/os-support/solaris/sun_VTsw.c | 20 +- .../hw/xfree86/os-support/solaris/sun_agp.c | 14 +- .../hw/xfree86/os-support/solaris/sun_bell.c | 2 +- .../hw/xfree86/os-support/sysv/Makefile.in | 30 +- .../hw/xfree86/os-support/sysv/sysv_init.c | 10 +- .../hw/xfree86/os-support/sysv/sysv_video.c | 4 +- xserver/hw/xfree86/parser/Configint.h | 4 +- xserver/hw/xfree86/parser/Device.c | 4 +- xserver/hw/xfree86/parser/Flags.c | 21 +- xserver/hw/xfree86/parser/Input.c | 19 +- xserver/hw/xfree86/parser/InputClass.c | 197 +- xserver/hw/xfree86/parser/Layout.c | 10 +- xserver/hw/xfree86/parser/Makefile.in | 30 +- xserver/hw/xfree86/parser/Monitor.c | 20 +- xserver/hw/xfree86/parser/Screen.c | 12 +- xserver/hw/xfree86/parser/Video.c | 4 +- xserver/hw/xfree86/parser/read.c | 16 +- xserver/hw/xfree86/parser/scan.c | 88 +- xserver/hw/xfree86/parser/xf86Parser.h | 20 +- xserver/hw/xfree86/parser/xf86tokens.h | 4 + xserver/hw/xfree86/ramdac/IBM.c | 8 +- xserver/hw/xfree86/ramdac/Makefile.in | 30 +- xserver/hw/xfree86/ramdac/TI.c | 2 +- xserver/hw/xfree86/ramdac/xf86Cursor.c | 30 +- xserver/hw/xfree86/ramdac/xf86CursorPriv.h | 3 +- xserver/hw/xfree86/ramdac/xf86HWCurs.c | 32 +- xserver/hw/xfree86/ramdac/xf86RamDac.c | 16 +- xserver/hw/xfree86/shadowfb/Makefile.in | 30 +- xserver/hw/xfree86/shadowfb/shadow.c | 94 +- xserver/hw/xfree86/utils/Makefile.in | 30 +- xserver/hw/xfree86/utils/cvt/Makefile.in | 30 +- xserver/hw/xfree86/utils/gtf/Makefile.in | 30 +- xserver/hw/xfree86/utils/gtf/gtf.c | 6 +- xserver/hw/xfree86/vbe/Makefile.in | 30 +- xserver/hw/xfree86/vbe/vbe.c | 151 +- xserver/hw/xfree86/vbe/vbe.h | 6 +- xserver/hw/xfree86/vbe/vbeModes.c | 2 +- xserver/hw/xfree86/vgahw/Makefile.in | 30 +- xserver/hw/xfree86/vgahw/vgaCmap.c | 32 +- xserver/hw/xfree86/vgahw/vgaHW.c | 27 +- xserver/hw/xfree86/vgahw/vgaHW.h | 2 +- xserver/hw/xfree86/x86emu/Makefile.in | 30 +- xserver/hw/xfree86/xaa/Makefile.in | 30 +- xserver/hw/xfree86/xaa/xaa.h | 7 - xserver/hw/xfree86/xaa/xaaBitBlt.c | 38 +- xserver/hw/xfree86/xaa/xaaCpyArea.c | 38 +- xserver/hw/xfree86/xaa/xaaCpyPlane.c | 20 +- xserver/hw/xfree86/xaa/xaaCpyWin.c | 20 +- xserver/hw/xfree86/xaa/xaaDashLine.c | 4 +- xserver/hw/xfree86/xaa/xaaFillArc.c | 4 +- xserver/hw/xfree86/xaa/xaaFillPoly.c | 12 +- xserver/hw/xfree86/xaa/xaaFillRect.c | 24 +- xserver/hw/xfree86/xaa/xaaGC.c | 7 +- xserver/hw/xfree86/xaa/xaaImage.c | 8 +- xserver/hw/xfree86/xaa/xaaInit.c | 67 +- xserver/hw/xfree86/xaa/xaaInitAccel.c | 4 +- xserver/hw/xfree86/xaa/xaaLine.c | 4 +- xserver/hw/xfree86/xaa/xaaLineMisc.c | 5 +- xserver/hw/xfree86/xaa/xaaNonTEText.c | 28 +- xserver/hw/xfree86/xaa/xaaOffscreen.c | 8 +- xserver/hw/xfree86/xaa/xaaOverlay.c | 22 +- xserver/hw/xfree86/xaa/xaaOverlayDF.c | 47 +- xserver/hw/xfree86/xaa/xaaPCache.c | 72 +- xserver/hw/xfree86/xaa/xaaPict.c | 44 +- xserver/hw/xfree86/xaa/xaaRect.c | 4 +- xserver/hw/xfree86/xaa/xaaSpans.c | 10 +- xserver/hw/xfree86/xaa/xaaStateChange.c | 13 +- xserver/hw/xfree86/xaa/xaaTEGlyph.c | 8 +- xserver/hw/xfree86/xaa/xaaTEText.c | 17 +- xserver/hw/xfree86/xaa/xaaWideLine.c | 4 +- xserver/hw/xfree86/xaa/xaaWrapper.c | 27 +- xserver/hw/xfree86/xaa/xaalocal.h | 9 +- xserver/hw/xfree86/xaa/xaawrap.h | 4 +- xserver/hw/xfree86/xf8_16bpp/Makefile.in | 30 +- xserver/hw/xnest/Color.c | 63 +- xserver/hw/xnest/Cursor.c | 4 +- xserver/hw/xnest/Display.c | 4 +- xserver/hw/xnest/Drawable.h | 2 +- xserver/hw/xnest/Events.c | 4 +- xserver/hw/xnest/Font.c | 4 +- xserver/hw/xnest/GC.c | 21 +- xserver/hw/xnest/GCOps.c | 16 +- xserver/hw/xnest/Keyboard.c | 14 +- xserver/hw/xnest/Makefile.in | 30 +- xserver/hw/xnest/Pixmap.c | 28 +- xserver/hw/xnest/Screen.c | 35 +- xserver/hw/xnest/Window.c | 47 +- xserver/hw/xnest/XNCursor.h | 3 +- xserver/hw/xnest/XNGC.h | 3 +- xserver/hw/xnest/XNPixmap.h | 3 +- xserver/hw/xnest/XNWindow.h | 5 +- xserver/hw/xquartz/GL/Makefile.in | 30 +- xserver/hw/xquartz/GL/glcontextmodes.c | 6 +- xserver/hw/xquartz/GL/indirect.c | 45 +- xserver/hw/xquartz/GL/visualConfigs.c | 2 +- xserver/hw/xquartz/Makefile.am | 2 + xserver/hw/xquartz/Makefile.in | 35 +- xserver/hw/xquartz/X11Application.h | 3 - xserver/hw/xquartz/X11Application.m | 72 +- xserver/hw/xquartz/X11Controller.m | 42 +- xserver/hw/xquartz/applewm.c | 58 +- xserver/hw/xquartz/bundle/Info.plist.cpp | 4 +- xserver/hw/xquartz/bundle/Makefile.in | 30 +- .../Resources/Dutch.lproj/locversion.plist | 4 +- .../Dutch.lproj/main.nib/designable.nib | 1591 ++- .../Resources/French.lproj/locversion.plist | 4 +- .../French.lproj/main.nib/designable.nib | 1720 ++- .../Resources/German.lproj/locversion.plist | 4 +- .../German.lproj/main.nib/designable.nib | 1598 ++- .../Resources/Italian.lproj/locversion.plist | 4 +- .../Italian.lproj/main.nib/designable.nib | 1543 ++- .../Resources/Japanese.lproj/locversion.plist | 4 +- .../Japanese.lproj/main.nib/designable.nib | 1618 ++- .../Resources/Spanish.lproj/locversion.plist | 4 +- .../Spanish.lproj/main.nib/designable.nib | 1586 ++- .../Resources/ar.lproj/locversion.plist | 14 + .../ar.lproj/main.nib/designable.nib | 2585 ++--- .../Resources/da.lproj/locversion.plist | 4 +- .../da.lproj/main.nib/designable.nib | 1530 ++- .../Resources/fi.lproj/locversion.plist | 4 +- .../fi.lproj/main.nib/designable.nib | 1678 ++- .../Resources/ko.lproj/locversion.plist | 4 +- .../ko.lproj/main.nib/designable.nib | 1544 ++- .../Resources/no.lproj/locversion.plist | 4 +- .../no.lproj/main.nib/designable.nib | 1588 ++- .../Resources/pl.lproj/locversion.plist | 4 +- .../pl.lproj/main.nib/designable.nib | 1554 ++- .../Resources/pt.lproj/locversion.plist | 4 +- .../pt.lproj/main.nib/designable.nib | 1530 ++- .../Resources/pt_PT.lproj/locversion.plist | 4 +- .../pt_PT.lproj/main.nib/designable.nib | 1530 ++- .../Resources/ru.lproj/locversion.plist | 4 +- .../ru.lproj/main.nib/designable.nib | 1537 ++- .../Resources/sv.lproj/locversion.plist | 4 +- .../sv.lproj/main.nib/designable.nib | 1583 ++- .../Resources/zh_CN.lproj/locversion.plist | 4 +- .../zh_CN.lproj/main.nib/designable.nib | 1564 ++- .../Resources/zh_TW.lproj/locversion.plist | 4 +- .../zh_TW.lproj/main.nib/designable.nib | 1598 ++- xserver/hw/xquartz/darwin.c | 56 +- xserver/hw/xquartz/darwin.h | 3 +- xserver/hw/xquartz/darwinEvents.c | 28 +- xserver/hw/xquartz/darwinXinput.c | 8 +- xserver/hw/xquartz/doc/Makefile.in | 30 +- xserver/hw/xquartz/mach-startup/Makefile.in | 30 +- xserver/hw/xquartz/mach-startup/bundle-main.c | 2 +- xserver/hw/xquartz/mach-startup/launchd_fd.h | 2 +- xserver/hw/xquartz/pbproxy/Makefile.in | 30 +- xserver/hw/xquartz/pbproxy/main.m | 2 + xserver/hw/xquartz/pseudoramiX.c | 16 +- xserver/hw/xquartz/quartz.c | 230 +- xserver/hw/xquartz/quartz.h | 17 +- xserver/hw/xquartz/quartzAudio.c | 4 +- xserver/hw/xquartz/quartzCocoa.m | 11 - xserver/hw/xquartz/quartzCommon.h | 37 +- xserver/hw/xquartz/quartzKeyboard.c | 36 +- xserver/hw/xquartz/quartzRandR.c | 560 + xserver/hw/xquartz/quartzRandR.h | 80 + xserver/hw/xquartz/xpr/Makefile.in | 30 +- xserver/hw/xquartz/xpr/appledri.c | 22 +- xserver/hw/xquartz/xpr/dri.c | 61 +- xserver/hw/xquartz/xpr/driWrap.c | 20 +- xserver/hw/xquartz/xpr/x-hook.c | 8 +- xserver/hw/xquartz/xpr/xprAppleWM.c | 2 +- xserver/hw/xquartz/xpr/xprCursor.c | 30 +- xserver/hw/xquartz/xpr/xprEvent.c | 2 +- xserver/hw/xquartz/xpr/xprFrame.c | 24 +- xserver/hw/xquartz/xpr/xprScreen.c | 20 +- xserver/hw/xwin/InitOutput.c | 61 +- xserver/hw/xwin/Makefile.am | 26 +- xserver/hw/xwin/Makefile.in | 268 +- xserver/hw/xwin/glx/Makefile.am | 60 + xserver/hw/xwin/glx/Makefile.in | 9 + xserver/hw/xwin/glx/gen_gl_wrappers.py | 319 + xserver/hw/xwin/glx/glwindows.h | 98 +- xserver/hw/xwin/glx/glwrap.c | 685 +- xserver/hw/xwin/glx/indirect.c | 3535 ++++--- xserver/hw/xwin/glx/wgl_ext_api.c | 75 + xserver/hw/xwin/glx/wgl_ext_api.h | 87 + xserver/hw/xwin/{ => glx}/winpriv.c | 106 +- xserver/hw/xwin/glx/winpriv.h | 11 + xserver/hw/xwin/win.h | 32 +- xserver/hw/xwin/winallpriv.c | 20 +- xserver/hw/xwin/winauth.c | 4 +- xserver/hw/xwin/winclipboardxevents.c | 9 +- xserver/hw/xwin/winconfig.c | 51 +- xserver/hw/xwin/winconfig.h | 2 + xserver/hw/xwin/windialogs.c | 2 +- xserver/hw/xwin/winerror.c | 6 +- xserver/hw/xwin/winfillsp.c | 6 +- xserver/hw/xwin/wingc.c | 2 +- xserver/hw/xwin/winglobals.c | 21 +- xserver/hw/xwin/winkeybd.c | 2 +- xserver/hw/xwin/winkeynames.h | 1 - xserver/hw/xwin/winmultiwindowshape.c | 21 +- xserver/hw/xwin/winmultiwindowwindow.c | 3 +- xserver/hw/xwin/winprefs.c | 12 +- xserver/hw/xwin/winpriv.h | 15 - xserver/hw/xwin/winprocarg.c | 636 +- xserver/hw/xwin/winscrinit.c | 10 +- xserver/hw/xwin/winsetsp.c | 4 +- xserver/hw/xwin/winshaddd.c | 6 +- xserver/hw/xwin/winshadddnl.c | 6 +- xserver/hw/xwin/winshadgdi.c | 6 +- xserver/hw/xwin/winvalargs.c | 31 +- xserver/hw/xwin/winvideo.c | 4 +- xserver/hw/xwin/winwin32rootless.c | 4 +- xserver/hw/xwin/winwin32rootlesswindow.c | 2 +- xserver/hw/xwin/winwindow.c | 39 +- xserver/hw/xwin/winwindowswm.c | 40 +- xserver/include/Makefile.am | 1 + xserver/include/Makefile.in | 37 +- xserver/include/callback.h | 87 + xserver/include/closestr.h | 5 - xserver/include/colormap.h | 6 +- xserver/include/cursor.h | 5 +- xserver/include/cursorstr.h | 4 + xserver/include/dix-config.h.in | 9 +- xserver/include/dix.h | 43 +- xserver/include/dixfont.h | 8 +- xserver/include/dixstruct.h | 7 +- xserver/include/do-not-use-config.h.in | 9 +- xserver/include/extnsionst.h | 2 +- xserver/include/gc.h | 20 +- xserver/include/gcstruct.h | 5 +- xserver/include/globals.h | 9 - xserver/include/input.h | 19 +- xserver/include/inputstr.h | 18 +- xserver/include/list.h | 6 +- xserver/include/os.h | 96 +- xserver/include/pixmap.h | 3 + xserver/include/privates.h | 262 +- xserver/include/protocol-versions.h | 2 +- xserver/include/ptrveloc.h | 5 +- xserver/include/regionstr.h | 433 +- xserver/include/resource.h | 17 +- xserver/include/scrnintstr.h | 42 +- xserver/include/windowstr.h | 13 +- xserver/include/xkbsrv.h | 28 +- xserver/include/xorg-config.h.in | 3 + xserver/include/xserver-properties.h | 7 + xserver/mi/Makefile.am | 5 +- xserver/mi/Makefile.in | 54 +- xserver/mi/mi.h | 21 +- xserver/mi/miarc.c | 224 +- xserver/mi/mibank.c | 2314 ---- xserver/mi/mibank.h | 112 - xserver/mi/mibitblt.c | 130 +- xserver/mi/micmap.c | 43 +- xserver/mi/micmap.h | 8 +- xserver/mi/micopy.c | 40 +- xserver/mi/midispcur.c | 437 +- xserver/mi/mieq.c | 8 +- xserver/mi/miexpose.c | 154 +- xserver/mi/mifillarc.c | 40 +- xserver/mi/mifillrct.c | 12 +- xserver/mi/mifpolycon.c | 20 +- xserver/mi/migc.c | 52 +- xserver/mi/miglblt.c | 36 +- xserver/mi/miinitext.c | 26 +- xserver/mi/miline.h | 3 +- xserver/mi/mioverlay.c | 528 +- xserver/mi/mipointer.c | 80 +- xserver/mi/mipointer.h | 11 +- xserver/mi/mipolycon.c | 26 +- xserver/mi/mipolygen.c | 14 +- xserver/mi/mipolypnt.c | 16 +- xserver/mi/mipolyrect.c | 4 +- xserver/mi/mipolyutil.c | 6 +- xserver/mi/mipushpxl.c | 4 +- xserver/mi/miscrinit.c | 19 +- xserver/mi/mispans.c | 76 +- xserver/mi/mispans.h | 10 - xserver/mi/misprite.c | 180 +- xserver/mi/misprite.h | 81 +- xserver/mi/mivaltree.c | 150 +- xserver/mi/miwideline.c | 283 +- xserver/mi/miwideline.h | 72 +- xserver/mi/miwindow.c | 213 +- xserver/mi/mizerarc.c | 18 +- xserver/mi/mizerline.c | 8 +- xserver/miext/Makefile.in | 30 +- xserver/miext/cw/Makefile.in | 30 +- xserver/miext/cw/cw.c | 76 +- xserver/miext/cw/cw.h | 15 +- xserver/miext/cw/cw_render.c | 9 +- xserver/miext/damage/Makefile.in | 30 +- xserver/miext/damage/damage.c | 178 +- xserver/miext/damage/damagestr.h | 4 - xserver/miext/rootless/Makefile.in | 30 +- xserver/miext/rootless/rootless.h | 4 +- xserver/miext/rootless/rootlessCommon.c | 60 +- xserver/miext/rootless/rootlessCommon.h | 21 +- xserver/miext/rootless/rootlessGC.c | 2 +- xserver/miext/rootless/rootlessScreen.c | 44 +- xserver/miext/rootless/rootlessValTree.c | 111 +- xserver/miext/rootless/rootlessWindow.c | 142 +- xserver/miext/rootless/rootlessWindow.h | 2 +- xserver/miext/shadow/Makefile.in | 30 +- xserver/miext/shadow/shadow.c | 23 +- xserver/miext/shadow/shadow.h | 2 - xserver/miext/shadow/shalloc.c | 2 +- xserver/miext/shadow/shpacked.c | 4 +- xserver/miext/shadow/shplanar.c | 4 +- xserver/miext/shadow/shplanar8.c | 4 +- xserver/miext/shadow/shrotate.c | 4 +- xserver/miext/shadow/shrotpack.h | 4 +- xserver/miext/shadow/shrotpackYX.h | 4 +- xserver/os/Makefile.in | 30 +- xserver/os/WaitFor.c | 6 +- xserver/os/access.c | 75 +- xserver/os/auth.c | 15 +- xserver/os/connection.c | 36 +- xserver/os/io.c | 99 +- xserver/os/log.c | 10 +- xserver/os/mitauth.c | 22 +- xserver/os/osdep.h | 24 +- xserver/os/osinit.c | 5 +- xserver/os/privsep.c | 12 +- xserver/os/rpcauth.c | 14 +- xserver/os/strcasecmp.c | 2 +- xserver/os/strcasestr.c | 2 +- xserver/os/strlcpy.c | 2 +- xserver/os/utils.c | 237 +- xserver/os/xdmauth.c | 62 +- xserver/os/xdmcp.c | 80 +- xserver/os/xprintf.c | 4 +- xserver/os/xsha1.c | 20 +- xserver/randr/Makefile.in | 30 +- xserver/randr/randr.c | 34 +- xserver/randr/randrstr.h | 32 +- xserver/randr/rrcrtc.c | 124 +- xserver/randr/rrdispatch.c | 8 +- xserver/randr/rrinfo.c | 14 +- xserver/randr/rrmode.c | 29 +- xserver/randr/rroutput.c | 61 +- xserver/randr/rrproperty.c | 160 +- xserver/randr/rrscreen.c | 53 +- xserver/randr/rrtransform.c | 36 +- xserver/randr/rrxinerama.c | 14 +- xserver/record/Makefile.in | 30 +- xserver/record/record.c | 111 +- xserver/record/set.c | 12 +- xserver/render/Makefile.in | 30 +- xserver/render/animcur.c | 91 +- xserver/render/filter.c | 28 +- xserver/render/glyph.c | 57 +- xserver/render/miindex.c | 12 +- xserver/render/mipict.c | 44 +- xserver/render/mirect.c | 30 +- xserver/render/mitri.c | 8 +- xserver/render/picture.c | 92 +- xserver/render/picture.h | 1 - xserver/render/picturestr.h | 18 +- xserver/render/render.c | 431 +- xserver/test/Makefile.am | 3 +- xserver/test/Makefile.in | 36 +- xserver/test/input.c | 133 + xserver/test/xi2/Makefile.in | 30 +- xserver/test/xi2/protocol-common.c | 17 +- xserver/test/xi2/protocol-eventconvert.c | 18 +- xserver/test/xtest.c | 4 +- xserver/xfixes/Makefile.in | 30 +- xserver/xfixes/cursor.c | 105 +- xserver/xfixes/region.c | 153 +- xserver/xfixes/saveset.c | 12 +- xserver/xfixes/select.c | 12 +- xserver/xfixes/xfixes.c | 9 +- xserver/xfixes/xfixes.h | 5 +- xserver/xkb/Makefile.am | 4 +- xserver/xkb/Makefile.in | 40 +- xserver/xkb/XKBAlloc.c | 58 +- xserver/xkb/XKBGAlloc.c | 74 +- xserver/xkb/XKBMAlloc.c | 179 +- xserver/xkb/XKBMisc.c | 10 +- xserver/xkb/ddxDevBtn.c | 69 - xserver/xkb/ddxFakeMtn.c | 67 - xserver/xkb/ddxList.c | 15 +- xserver/xkb/ddxLoad.c | 21 +- xserver/xkb/maprules.c | 78 +- xserver/xkb/xkb.c | 223 +- xserver/xkb/xkbAccessX.c | 33 +- xserver/xkb/xkbActions.c | 167 +- xserver/xkb/xkbEvents.c | 8 +- xserver/xkb/xkbInit.c | 79 +- xserver/xkb/xkbLEDs.c | 50 +- xserver/xkb/xkbUtils.c | 406 +- xserver/xkb/xkbfmisc.c | 2 +- xserver/xkb/xkbout.c | 9 +- xserver/xkb/xkmread.c | 12 +- xserver/xorg-server.pc.in | 1 + 807 files changed, 59584 insertions(+), 54506 deletions(-) delete mode 100644 xserver/Xext/mbuf.c delete mode 100644 xserver/Xext/mbufbf.c delete mode 100644 xserver/Xext/mbufpx.c create mode 100644 xserver/config/fdi2iclass.py rename xserver/{mi/miregion.c => dix/region.c} (82%) create mode 100644 xserver/doc/xml/Makefile.am create mode 100644 xserver/doc/xml/Xserver-spec.xml create mode 100644 xserver/doc/xml/dtrace/Makefile.am create mode 100644 xserver/doc/xml/dtrace/Makefile.in create mode 100644 xserver/doc/xml/dtrace/Xserver-DTrace.xml create mode 100644 xserver/doc/xml/xmlrules.in create mode 100644 xserver/doc/xml/xserver.ent.in rename xserver/hw/dmx/doc/{dmx.sgml => dmx.xml} (63%) rename xserver/hw/dmx/doc/{scaled.sgml => scaled.xml} (73%) create mode 100644 xserver/hw/kdrive/sdl/Makefile.in delete mode 100644 xserver/hw/vfb/lk201kbd.h delete mode 100644 xserver/hw/xfree86/doc/README.DRI delete mode 100644 xserver/hw/xfree86/doc/README.rapidaccess delete mode 100644 xserver/hw/xfree86/doc/sgml/DESIGN.sgml create mode 100644 xserver/hw/xfree86/doc/sgml/DESIGN.xml create mode 100644 xserver/hw/xquartz/bundle/Resources/ar.lproj/locversion.plist create mode 100644 xserver/hw/xquartz/quartzRandR.c create mode 100644 xserver/hw/xquartz/quartzRandR.h create mode 100644 xserver/hw/xwin/glx/Makefile.am create mode 100644 xserver/hw/xwin/glx/gen_gl_wrappers.py create mode 100644 xserver/hw/xwin/glx/wgl_ext_api.c create mode 100644 xserver/hw/xwin/glx/wgl_ext_api.h rename xserver/hw/xwin/{ => glx}/winpriv.c (51%) create mode 100644 xserver/hw/xwin/glx/winpriv.h delete mode 100644 xserver/hw/xwin/winpriv.h create mode 100644 xserver/include/callback.h delete mode 100644 xserver/mi/mibank.c delete mode 100644 xserver/mi/mibank.h delete mode 100644 xserver/xkb/ddxDevBtn.c delete mode 100644 xserver/xkb/ddxFakeMtn.c diff --git a/xserver/ChangeLog b/xserver/ChangeLog index 4fe2ab1be..3a79c2e38 100644 --- a/xserver/ChangeLog +++ b/xserver/ChangeLog @@ -1,27 +1,2302 @@ -commit 4f9df125750ac8df0f58fdc44a3a29c3371ce6b6 -Author: Peter Hutterer -Date: Thu Jul 1 14:42:18 2010 +1000 +commit e3769c20d5f656f76e2c475a722db97c58089260 +Author: Jeremy Huddleston +Date: Sat Oct 30 19:49:42 2010 -0700 - xserver 1.8.2 + Bump version to 1.9.2 + + Signed-off-by: Jeremy Huddleston + +commit e0ab016d85f828a78cb53ee9bcb171535de6032e +Author: Jeremy Huddleston +Date: Sat Oct 30 19:48:22 2010 -0700 + + Revert "rootless: Remove ROOTLESS_WORKAROUND" + + Christof Wolf has reported a regression that seems to be caused by + this change, so reverting the change in the 1.9 branch. We'll + investigate a proper fix in master for 1.10. + + This reverts commit c89f0521044083a11d538ebfeaabee6fc7fb9a03. + +commit 6e1f78bddfb854933206f9f5fd8d1dfc66ba8820 +Author: Jeremy Huddleston +Date: Fri Oct 22 20:18:38 2010 -0700 + + Bump version to 1.9.1 + + Signed-off-by: Jeremy Huddleston + +commit 4dd316f25261707620cd4c52e2987b93627ff260 +Author: Jeremy Huddleston +Date: Fri Oct 15 11:08:42 2010 -0700 + + Bump version to 1.9.0.902 (1.9.1 rc2) + + Signed-off-by: Jeremy Huddleston + +commit 712853fbcbc644575d791fa48fbd5757cd850f1d +Author: Jon TURNEY +Date: Wed Oct 13 17:34:31 2010 +0100 + + event_size is currently never assigned to in mieqProcessInputEvents(). + + event_size is never assigned to in mieqProcessInputEvents(), so realloc() + is always called. This is benign, but I'm guessing not intended. + + Signed-off-by: Jon TURNEY + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + (cherry picked from commit da4eebe58ec81e2297cc1773af1fb622fb392bbd) + +commit efeb2ebd7e307224a735469ff89a3a6af4cf143b +Author: Adam Jackson +Date: Tue Oct 5 11:24:28 2010 -0400 + + vbe: Fix copying the mode info block + + Just use memcpy, seriously. + + Reviewed-by: Rémi Cardona + Signed-off-by: Adam Jackson + Signed-off-by: Keith Packard + (cherry picked from commit 853d7ebfa3e2d281d92890a39010ff5787a00ffd) + +commit e5b19f14eac609e3c315e14e20ca1935de8de0e3 +Author: Jeremy Huddleston +Date: Tue Oct 12 17:42:55 2010 -0700 + + Revert "dix: don't create core motion events for non-x/y valuators." + + Reverting due to fallout discussed in bug #30267. See: + https://bugs.freedesktop.org/show_bug.cgi?id=30267 + + This reverts commit d4ef63f602325a9920dc1cbf64e3969dfa394d5f. + + Signed-off-by: Jeremy Huddleston + +commit 8ab87dc7ff48d4db8e5f95a74df627dac9c53c0a +Author: Jeremy Huddleston +Date: Fri Oct 1 13:37:49 2010 -0700 + + Bump version to 1.9.0.901 (1.9.1 rc1) + + Signed-off-by: Jeremy Huddleston + +commit 5fb1780d6a44c7fca5143e5f456259499ddb0852 +Author: Jeremy Huddleston +Date: Fri Oct 1 14:05:03 2010 -0700 + + test: Fix make distcheck when not building unit tests + + Signed-off-by: Jeremy Huddleston + +commit 4d2542a16bd955ae448cc2cb160d1e0f2d9c291b +Merge: 5b64f85 560e425 +Author: Jeremy Huddleston +Date: Thu Sep 30 00:19:24 2010 -0700 + + Merge remote branch 'ajax/server-1.9-xfree86' into server-1.9-branch + +commit 5b64f85b1b34d42f581db617ce3f3f7b12e6cdf8 +Author: Tobias Droste +Date: Wed Sep 29 22:51:48 2010 +0200 + + randr: set error numbers of resource types in RRExtenstionInit() (V2) + + Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=30367 + + Currently the ddx calls xf86RandR12Init() + (-> RRScreenInit() + -> RRInit() + -> RRModeInit() + -> RRCrtcInit() + -> RROutputInit()) + before RRExtensionInit() is called. This causes RRErrorBase + being 0 while setting resource type error values (resource types: + RROutput, RRMode and RRCrtc). The fix moves the setting of error + values to own functions which are called in RRExtensionInit() + to get the right RRErrorBase. + + V2: With header file + + Signed-off-by: Tobias Droste + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + (cherry picked from commit c7e4222c9a27094ce4fc2831ac92acbb7b21fb1a) + +commit 560e4254997df26b6abaa93ca2f59bcf7f68d551 +Author: Adam Jackson +Date: Mon Sep 27 17:06:46 2010 -0400 + + xfree86: Add 18bpp support + + Signed-off-by: Adam Jackson + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + (cherry picked from commit 9df4fb0adf66fb82f0c007897d79af0f54a6dad9) + +commit 5ae0c0cdb29dd35e0c10e6429e0df59f064a5c73 +Author: Macpaul Lin +Date: Tue Sep 21 15:13:34 2010 +0800 + + xfree86: nds32: add nds32 support for compiler related mmio codes + + Add nds32 support for compiler related mmio codes. + It includes byte-swap or non-swap operations. + + Signed-off-by: Macpaul Lin + Acked-by: Tiago Vignatti + Signed-off-by: Keith Packard + (cherry picked from commit 58bd317e29f4abf7f950891339d2a6a78ddf7903) + +commit dfef37797c79d767d156a356ad7ea69316d4f693 +Author: Macpaul Lin +Date: Tue Sep 21 15:13:33 2010 +0800 + + xfree86: nds32: add nds32 support for compiler specific codes + + Add nds32 definitions and related assembly codes to compiler header files. + + Signed-off-by: Macpaul Lin + Acked-by: Tiago Vignatti + Signed-off-by: Keith Packard + (cherry picked from commit 28e6de66b42062a885ba38416387f2dbc15707fd) + +commit 7c016917b0fb5ab06f04f48914f78591482abb12 +Author: Macpaul Lin +Date: Tue Sep 21 15:13:32 2010 +0800 + + xfree86: nds32: add nds32 definition for vgaHW support. + + Add __nds32__ definitions for vgaHW support. + + Signed-off-by: Macpaul Lin + Acked-by: Tiago Vignatti + Signed-off-by: Keith Packard + (cherry picked from commit 2b24b2bd859a4b4b8ccaf3b7d1b529dcda2d3b94) + +commit 8d6e2e9906fb0389db2b777d9d8bc2373f537f88 +Author: Peter Hutterer +Date: Fri Jul 23 14:48:32 2010 +1000 + + xfree86: fix compiler warning about implicied decl of DuplicateModule. + + ../../../../hw/xfree86/common/xf86Xinput.c: In function ‘xf86AllocateInput’: + ../../../../hw/xfree86/common/xf86Xinput.c:722: warning: implicit + declaration of function ‘DuplicateModule’ + ../../../../hw/xfree86/common/xf86Xinput.c:722: warning: nested extern + declaration of ‘DuplicateModule’ + ../../../../hw/xfree86/common/xf86Xinput.c:722: warning: assignment makes + pointer from integer without a cast + + Signed-off-by: Peter Hutterer + Reviewed-by: Adam Jackson + Reviewed-by: Daniel Stone + (cherry picked from commit 3cc5e4422430e9ca44615f3e63feccd2e5729046) + +commit 223794505e64ab5aa215f4847822d66cd6f3450f +Author: Jesse Adkins +Date: Wed Aug 4 09:21:31 2010 +0000 + + xfree86: Fix leaks in OpenConfigFile and OpenConfigDir + + [mattst88: fixed whitespace and a missing semicolon] + + Signed-off-by: Jesse Adkins + Signed-off-by: Matt Turner + (cherry picked from commit 18b62e0479f15e965611880ada6e0195367df025) + +commit 6a0b4051972a4fa6f1a3b22ec1ae54bd1849bc9f +Author: Jeremy Huddleston +Date: Tue Aug 3 12:51:51 2010 -0700 + + XQuartz: RandR: Refactor legacy mode-switching to be better integrated with RandR + + Adds three new functions + void QuartzRandRSetFakeRootless (void); + void QuartzRandRSetFakeFullscreen (void); + void QuartzRandRToggleFullscreen (void); + + The first two are identical to requesting the fake modes from a RandR client + The third responds to cmd-alt-a to leave fullscreen or RandR. + + Signed-off-by: Jeremy Huddleston + (cherry picked from commit c45bea0c044ad37bedb42209f7e6ea8b587999f0) + +commit abfb3c7994ee4459d2de93083e4d5ba388095d55 +Author: Jeremy Huddleston +Date: Mon Jul 26 23:34:49 2010 -0700 + + XQuartz: RandR: Don't change the rootless preference when changing RandR mode + + Also renames a bunch of other variables for better consistency. + + Signed-off-by: Jeremy Huddleston + (cherry picked from commit 229323a19b06f80d9b03f487e598b933b9b31d87) + +commit 92b3dc67eef47db336674cf55ced4af40a6c29d7 +Author: Jeremy Huddleston +Date: Mon Jul 26 11:45:59 2010 -0700 + + XQuartz: RandR: Better handle switching betwen RandR modes that share CG modes + + Signed-off-by: Jeremy Huddleston + (cherry picked from commit 721edc69c3597578d3e7f711769ff0195af6068a) + +commit 0402a4409641598427c7d3385aa006964ae0b75a +Author: Jeremy Huddleston +Date: Mon Jul 26 01:17:12 2010 -0700 + + XQuartz: RandR: Respond better to resolution changes made outside X + + Signed-off-by: Jeremy Huddleston + (cherry picked from commit 026a47e21226b64eb9a7624ada3d74c3fe5fa763) + +commit e540c517a831a256a6e76a8c2b92629fe87aa8df +Author: Jeremy Huddleston +Date: Sun Jul 25 22:25:49 2010 -0700 + + XQuartz: RandR: Use deprecated CG APIs only on Leopard and earlier + + Signed-off-by: Jeremy Huddleston + (cherry picked from commit 59cd93f48a3a0a34781d4a94a3cd05a575e2d4ba) + +commit e4918634ab166b72d9d44663d69443e13f153fd7 +Author: Jan Hauffa +Date: Fri Jul 16 17:56:44 2010 +0200 + + XQuartz: RandR: Remove FAKE_RANDR code. + + Signed-off-by: Jan Hauffa + Reviewed-by: Jeremy Huddleston + (cherry picked from commit 629c3f473b7415069a87ef4717ec3d701978dc48) + +commit b374b9e68a8d8f18a8220e90a98d983ec4068938 +Author: Jan Hauffa +Date: Fri Jul 16 17:54:55 2010 +0200 + + XQuartz: RandR: Toggle rootless mode on XRandR mode switch. + + Report a fake screen mode that corresponds to the screen mode at startup of the + server excluding the height of the menu bar. If a client requests this mode, + rootless mode is enabled. In all other modes, the root window is shown. + + Signed-off-by: Jan Hauffa + Reviewed-by: Jeremy Huddleston + (cherry picked from commit 97b5f5306437bfd13390485fc7a58a363c261ec9) + +commit 29e9c25efb3e006b22019575fdb9ec1cc958c096 +Author: Jan Hauffa +Date: Fri Jul 16 17:18:03 2010 +0200 + + XQuartz: RandR: Implement basic RandR functionality. + + Querying and changing of resolution and refresh rate is supported, + rotation is not implemented yet. + + Signed-off-by: Jan Hauffa + Reviewed-by: Jeremy Huddleston + (cherry picked from commit 2d411472c2915614bdeb8fdc15d19dae4621444d) + +commit f939ab0175e1662f5df664449cba5d72fa1dbe1c +Author: Chris Wilson +Date: Mon Sep 27 17:30:13 2010 +0100 + + modes: Beware the driver switching root pixmaps + + Program received signal SIGSEGV, Segmentation fault. + 0x080d4a2d in xf86RandR12ScreenSetSize (pScreen=0x8dca3a0, width=800, + height=600, mmWidth=210, mmHeight=157) + at ../../../../hw/xfree86/modes/xf86RandR12.c:731 + 731 ../../../../hw/xfree86/modes/xf86RandR12.c: No such file or directory. + in ../../../../hw/xfree86/modes/xf86RandR12.c + (gdb) bt full + height=600, mmWidth=210, mmHeight=157) + at ../../../../hw/xfree86/modes/xf86RandR12.c:731 + randrp = 0x8dcae68 + pScrn = 0x8dbeb28 + config = + pRoot = 0x8e08e30 + pScrnPix = 0xb6d12008 + ret = 1 + c = + mmWidth=210, mmHeight=157) at ../../randr/rrscreen.c:185 + No locals. + at ../../randr/rrscreen.c:307 + pWin = 0x8e08e30 + pScreen = 0x8dca3a0 + i = + rc = 0 + ../../randr/randr.c:485 + + Signed-off-by: Chris Wilson + Cc: Julien Cristau + Tested-by: Julien Cristau + Cc: Keith Packard + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + (cherry picked from commit fdabcec57ae0fdc9910060609bb0848552c1db4d) + +commit 3ea7d271c8847a3135442ea24b8d5ff81d5e20b7 +Author: Aaron Plattner +Date: Fri Aug 27 10:20:29 2010 -0700 + + os: Return BadLength instead of disconnecting BigReq clients (#4565) + + If a client sends a big request that's too big (i.e. bigger than + maxBigRequestSize << 2 bytes), the server just disconnects it. This makes the + client receive SIGPIPE the next time it tries to send something. + + The X Test Suite sends requests that are too big when the test specifies the + TOO_LONG test type. When the client receives SIGPIPE, XTS marks it as + UNRESOLVED, which counts as a failure. + + Instead, remember how long the request is supposed to be and then return that + size. Dispatch() checks the length and sends BadLength to the client. Then, + whenever oci->ignoreBytes is nonzero, ignore the data read instead of trying to + process it as a request. + + Signed-off-by: Aaron Plattner + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + (cherry picked from commit cf88363db0ebb42df7cc286b85d30d7898aea840) + +commit 3b687814a5b999305042775a2bddc3c10706f6da +Author: Kristian Høgsberg +Date: Thu Sep 23 09:04:11 2010 -0400 + + glx: Fix use after free in DrawableGone + + (note that nearly identical patches were proposed by Kristian and Chris) + + Signed-off-by: Kristian Høgsberg + Signed-off-by: Chris Wilson + Reported-by: Julien Cristau + Reviewed-by: Adam Jackson + Reviewed-by: Jamey Sharp + Tested-by: Chris Wilson + Signed-off-by: Keith Packard + (cherry picked from commit 2f0abd7d690c3bcce2a80c093a0880f43e56d8cb) + +commit 57d454758994312b8572a753501dd1e5c89b4f7e +Author: Thomas Hellstrom +Date: Thu Sep 2 10:53:28 2010 +0200 + + linux: Don't lose console events on non-evdev drivers (#29969) + + The drain_console() function will race with new keyboard events being added + by the hardware causing the server to lose keyboard events if the console fd + is used for input. + + Only use the drain_console() when AllowEmptyInput is off which is the best + indicator we have for whether the keyboard driver will be used. This patch + will only fix the bug when hotplugging is disabled. + What we really need is a way to figure out either whether we're _not_ using + the keyboard driver (not predictable) or a way for the keyboard driver to + disable drain_console(). + + X.Org Bug 29969 + + Signed-off-by: Thomas Hellstrom + Reviewed-by: Peter Hutterer + Reviewed-by: Adam Jackson + Signed-off-by: Peter Hutterer + (cherry picked from commit 71972c2534d490284d3d42b456c2f34b964b2894) + +commit 918cb214ab4240be4772a141d1209c0ff5dfd63b +Author: Peter Hutterer +Date: Mon Aug 23 08:35:01 2010 +1000 + + xfree86: Check for existence of button class before dereferencing it. + + The Irxon Super Mini Bluetooth Wireless Keyboard for PC/PDA/Cell Phones + keyboards have axes but not buttons. The evdev driver doesn't set up a + button class for these keyboards and a motion event handled by + DGAProcessPointerEvent dereferences the dev->button NULL pointer, causing a + server crash. + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + (cherry picked from commit e00e2e7b68fbc932269d607ac5dc2c441d07ad9d) + +commit 5a29cb126de577a2a0a41e10d9af13091a73d334 +Author: Peter Hutterer +Date: Tue Aug 24 13:46:35 2010 +1000 + + dix: don't set time to CurrentTime in DeviceChangedEvents. + + CurrentTime is used by clients to skip setting the time, but not by the + server. + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + (cherry picked from commit 86560b5d05f14bdf04d21b3457a66c0d5045db9c) + +commit 72e3e6f4a7690f70a6b5f7689633cdea859535e1 +Author: Peter Hutterer +Date: Mon Aug 23 13:20:09 2010 +1000 + + dix: fix crash when removing devices on a buttonless MD pointer (#29669) + + If the master does not have a button class, recalculating the number of + buttons required for this master dereferences a NULL pointer. Guard against + this, if the master pointer doesn't have a button class, it doesn't need to + update it's number of buttons. + + Reproducible: + Two devices on the same master, device NB with axes but no buttons, device + A+B with axes and button . + If NB was the last one to send an event through the master when A+B is + removed from the server, master->button is NULL and leads to the above + NULL-pointer dereference. + + X.Org Bug 29669 + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + (cherry picked from commit ff055506f0cbb852bed17acb9f9bbf1d715a854e) + +commit 0f3a0ab1f01ec5314ccb0bfb932c49f8c61b9866 +Author: Chase Douglas +Date: Wed Sep 1 14:45:34 2010 +1000 + + Fix udev population of Bluetooth input device product IDs + + The udev device_added function takes the vendor and model IDs of added + devices and converts them into an attribute that can be matched for by + an InputClass configuration using MatchUSBID. Currently, the udev + mechanism works for USB devices, but fails to work properly for + Bluetooth devices. The product IDs of the event node are actually the + IDs of the Bluetooth receiver instead of the device. + + This patch reads the product ID from the PRODUCT property of the parent + of the added device. This tag is set correctly for both USB and + Bluetooth input devices. The following devices have been tested by + specifying individual InputClass sections in xorg.conf: + + * Apple Keyboard (Bluetooth) + * Apple Magic Trackpad (Bluetooth) + * Apple Magic Mouse (Bluetooth) + * Microsoft Bluetooth Notebook Mouse 5000 (Bluetooth) + * Microsoft IntelliMouse Optical (USB) + * N-Trig Touchscreen (USB) + * Wacom Bamboo Touch (USB) + + Signed-off-by: Chase Douglas + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + (cherry picked from commit 7925e8945649d4af237e6c3c5593b895a461bd1e) + +commit a0040f9870c78fd1f7e7ac81555cb783c152e287 +Author: Jesse Adkins +Date: Wed Aug 25 13:48:29 2010 -0700 + + xfree86: Document terminate not mapped by default (bug 25083) + + Document that terminate is not mapped to Ctrl+Alt+Backspace by default, to help alleviate some confusion. + + Signed-off-by: Jesse Adkins + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + (cherry picked from commit 4a12aecac670debd0dafb17c245fccb93eea2d60) + +commit 34b11fcd90258a70c02a04a13598b4a4af2c2974 +Author: David Ge +Date: Thu Aug 19 00:33:57 2010 -0500 + + xkb: Fix RedirectKey didn't send any event. + + Xorg.log shows error: Valuators reported for non-valuator device. + This is caused by uninitialized valuators.mask in _XkbFilterRedirectKey(), + which trigger the error in UpdateDeviceState(). + + Signed-off-by: David Ge + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + (cherry picked from commit a90052ba8697e217b0dc68057d7b9202ae8797db) + +commit 0062d94cafcea5a2fea6224904188d1435c1983f +Author: Pauli Nieminen +Date: Mon Jul 26 15:31:03 2010 +0300 + + xkb: Check if AddResource failed + + Signed-off-by: Pauli Nieminen + Reviewed-by: Peter Hutterer + (cherry picked from commit b5c9953bbf4ffd11f1a70d058c6d3feb2bd1bca8) + +commit eecf91150d4c17fe73913fd6c24064c0394fb40e +Author: Pauli Nieminen +Date: Thu Jul 22 15:11:27 2010 +0300 + + xkb: Fix memory leak in error path + + map is allocated but not freed if reply length and data don't match. + + Signed-off-by: Pauli Nieminen + Reviewed-by: Peter Hutterer + (cherry picked from commit adc0697cfcfba295a15d7a307125093cbccd637f) + +commit b912c08ffa09ec9d7c55db7df1df622dd4b6ab64 +Author: Pauli Nieminen +Date: Thu Jul 22 11:33:33 2010 +0300 + + xkb: Fix memory leak if opening file fails + + If fopen fails pointer in buf would be overwriten with a new pointer. + + Signed-off-by: Pauli Nieminen + Reviewed-by: Peter Hutterer + (cherry picked from commit 1223340644744c0b38aa85f5956eb5ab7c696517) + +commit d4ef63f602325a9920dc1cbf64e3969dfa394d5f +Author: Peter Hutterer +Date: Tue Aug 17 12:08:52 2010 +1000 + + dix: don't create core motion events for non-x/y valuators. + + Devices that send motion events with valuators other than x/y get core + motion events with unchanged x/y coordinates. This confuses some + applications. + + If the DeviceEvent does not have the x/y valuators set, return BadMatch on + core conversion, thus skipping the event altogether. + + Reported-by: Bartosz Brachaczek + Signed-off-by: Peter Hutterer + Tested-by: Bartosz Brachaczek + (cherry picked from commit de8be07cc0a8163b6ef04455706fd5ca2cebe587) + +commit d0ca4826d6dca7c43965e4606a31e90091207412 +Author: Jeremy Huddleston +Date: Sat Sep 11 14:25:21 2010 -0700 + + XQuartz: Localization updates + + Signed-off-by: Jeremy Huddleston + (cherry picked from commit 0a3e6b0345a96aae278dd776c00b5a7c7ccf65af) + +commit c89f0521044083a11d538ebfeaabee6fc7fb9a03 +Author: Jeremy Huddleston +Date: Sun Aug 15 20:07:28 2010 -0700 + + rootless: Remove ROOTLESS_WORKAROUND + + This was already removed for XWin (20701522be803fe47e921fcf059dadf64c7f287d) + with no reported side effects. XQuartz seems to be behaving ok without it as + well. While this possibly brings back bug #1168, we don't have any reproduction + steps for that issue, and if it crops up again, we should fix it a real way + rather than this hokey workaround which doesn't even work for COMPOSITE. + + This effectively reverts the following two changes: + b2135e589baeb2ea26da50b9167feaea23bcce3c + d7fef52254126aa5897a5c58faeda1f61d5b13d8 + + Signed-off-by: Jeremy Huddleston + Reviewed-by: Jon TURNEY + (cherry picked from commit 4e09a69c5b1f3c8d6f2f92ec24aaab3a1119940c) + +commit e615acf06feabd4de695d1237aa3891957428999 +Author: Eamon Walsh +Date: Mon Aug 30 16:37:05 2010 -0400 + + Add screens to the PRIVATE_XSELINUX set. + + The SELinux extension does store a security label in the screen + devPrivates. Fixes crash caused by overwriting another private. + + Signed-off-by: Eamon Walsh + Reported-by: Justin Mattock + Signed-off-by: Keith Packard + (cherry picked from commit 9a1a4ccbe026f34beca5db3b2243874906961b49) + +commit ad62b2400907bf856ece615197066aad02503716 +Author: Eamon Walsh +Date: Mon Aug 23 16:04:03 2010 -0400 + + Fix property and selection devPrivate allocation. + + Selection objects were not being allocated with privates, and both + objects had a stray statement that zeroed out the devPrivates field. + + Signed-off-by: Eamon Walsh + Reported-by: Justin Mattock + Reviewed-by: Adam Jackson + Signed-off-by: Keith Packard + (cherry picked from commit 9ef6241c2382bfc555284a4985f6d1e37d750d6f) + +commit 79ee78de9de49d0cab03401662baa476a18e53b8 +Author: Keith Packard +Date: Fri Aug 20 17:32:27 2010 -0700 + + xserver 1.9.0 + + Signed-off-by: Keith Packard + +commit 3e56efcfb63677cd8574e1e435e61d96f79ea536 +Author: Keith Packard +Date: Fri Aug 20 10:01:48 2010 -0700 + + fb: make isClipped always reject negative coordinates (bug 11503) + + A window with either dimension > 32767 can be positioned such that + coordinates > 32767 are visible on the screen. Attempts to draw to + those pixels will generate coordinates wrapped around to negative + values. + + The optimized clipping macro, 'isClipped', in fbbits.h, computes + clipping in window space rather than screen space using int16 values, + and so it too has coordinates wrapped around to negative values and + hence ends up accepting the wrapped drawing coordinates. + + Two possible fixes for this problem + + 1) Detect wrapped region coordinates and clip those to 32767. + 2) Detect negative incoming coordinates and reject those + + This patch takes the second approach as it is much shorter, simply + detecting when either X or Y incoming coordinate is negative, which + can never be 'within' any drawable. + + Signed-off-by: Keith Packard + Reviewed-by: Adam Jackson + +commit 951605b4660290044fb238bcf1d6d9e498567e8c +Author: Chris Wilson +Date: Fri Aug 20 13:51:04 2010 +0100 + + edid: Adjust rounding of max_clock + + A simple hack to accommodate various EDID who have detailed modes that + exceed the EDID's max pixel clock. The pixel clock is only defined in + units of 10MHz and often appears as the maximum pixel code of the + detailed modes, rounded to the nearest 10MHz. Adjusting the max_clock to + include an extra 5MHz prevents the parser from rejecting the detailed + modes. + + The kernel uses the same fuzz and by including it in X we can use the + same modes in X as for the console. + + Fixes: + + Bug 23833 - X uses different refresh rate to that set by kernel module + https://bugs.freedesktop.org/show_bug.cgi?id=23833 + + In the future, we will want to try harder to keep the KMS modes but at + the same time we need to apply the restrictions as specified by the + user's configuration, and need to fill in modes for fullscreen games on + fixed-mode panels. + + Reported-and-tested-by: Fabio Pedretti + Signed-off-by: Chris Wilson + Reviewed-by: Alex Deucher + Signed-off-by: Keith Packard + +commit 7e581780603d6b15291d032efdeeca77f969e0ba +Author: Chris Wilson +Date: Thu Jun 24 12:24:58 2010 +0100 + + glx: Prevent NULL context deref in __glXGetDrawable() (bug 29184) + + During a SwapBuffers request, we may end up querying an unknown drawable + outside of an active context, and so need to report this error prior to + attempting to dereference the NULL context. + + Also fixes: + + [Bug 29184] glXSwapBuffers with no GLX context crashes X. + https://bugs.freedesktop.org/show_bug.cgi?id=29184 + + Signed-off-by: Chris Wilson + Cc: Kristian Høgsberg + Reviewed-by: Adam Jackson + Signed-off-by: Keith Packard + +commit 5725849a1b427cd4a72b84e57f211edb35838718 +Author: Adam Jackson +Date: Mon Jun 28 18:08:50 2010 -0400 + + render: Bounds check for nglyphs in ProcRenderAddGlyphs (#28801) + + Signed-off-by: Adam Jackson + Reviewed-by: Julien Cristau + Signed-off-by: Keith Packard + +commit fc091936e2bddbbab9c9a501edc5a5f08388617e +Author: Peter Hutterer +Date: Mon Aug 16 14:18:45 2010 +1000 + + dix: copy the valuators passed into GPE/GKVE/GProxE. + + GPE and friends modify the valuators array passed in. Which means any driver + using e.g. xf86PostButtonEventP(..., valuators) twice to emulate a button + click will provide garbage data on the second run. + + This is currently affecting the wacom driver, xf86PostButtonEventP() with + valuators is required to have input events with device-specific axis values. + Passing the same valuators in twice, once with press, once with release, + will see the valuators modified in the first call and garbage submitted in + the next one. + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit 6e3e559e9fa63069a10eb834a6dab9a4cfc140ee +Author: Keith Packard +Date: Sun Aug 15 20:53:20 2010 -0700 + + dix: reset pScreen->root to NULL when root window is deleted. + + From: Dave Airlie + + We were seeing a crash in the FreeAllResources codepath, + running valgrind revealed this, + + ==12536== Invalid read of size 4 + ==12536== at 0x810BCAB: DeliverPropertyEvent (rrproperty.c:33) + ==12536== by 0x80958A4: TraverseTree (window.c:227) + ==12536== by 0x809593E: WalkTree (window.c:255) + ==12536== by 0x810BC66: RRDeliverPropertyEvent (rrproperty.c:53) + ==12536== by 0x810BD5D: RRDeleteProperty.clone.0 (rrproperty.c:76) + ==12536== by 0x810BD98: RRDeleteAllOutputProperties (rrproperty.c:88) + ==12536== by 0x810A36E: RROutputDestroyResource (rroutput.c:407) + ==12536== by 0x808DF4E: FreeClientResources (resource.c:859) + ==12536== by 0x808E005: FreeAllResources (resource.c:876) + ==12536== by 0x8062300: main (main.c:305) + ==12536== Address 0x46ba8ac is 4 bytes inside a block of size 164 free'd + ==12536== at 0x40057F6: free (vg_replace_malloc.c:325) + ==12536== by 0x8087F1F: _dixFreeObjectWithPrivates (privates.c:357) + ==12536== by 0x809832A: DeleteWindow (window.c:926) + ==12536== by 0x808DF4E: FreeClientResources (resource.c:859) + ==12536== by 0x808E005: FreeAllResources (resource.c:876) + ==12536== by 0x8062300: main (main.c:305) + + Its a use after free on the root window, since we have already deleted it + at this point. This patch checks if the window we are destroying is the root + window and resets the pointer to NULL if it is. + + Signed-off-by: Keith Packard + Reviewed-by: Dave Airlie + Tested-by: Dave Airlie + +commit 5d1d9d9ae39fab2ee2ac085f9776f82768828dc8 +Author: Jeremy Huddleston +Date: Sun Aug 1 11:41:58 2010 -0700 + + XQuartz: xpr: Bail on errors during unlock and destroy + + Signed-off-by: Jeremy Huddleston + +commit ee7fd8fc58d9fadfbb92302ddea224537f068538 +Author: Jeremy Huddleston +Date: Sun Aug 1 11:39:14 2010 -0700 + + XQuartz: UpdateScreen at the end of SetRootless + + This will ensure that pRoot is unlocked after the miPaintWindow + + Signed-off-by: Jeremy Huddleston + +commit 4fc4cab98d454afbfd0d2f48548b5b481e8e7c82 +Author: Jeremy Huddleston +Date: Thu Jul 29 14:49:10 2010 -0700 + + XQuartz: Make application switching work better for the no-spaces case + + We still have the issue with not raising the frontmost window for the case + when spaces is enabled, and the AppleSpacesSwitchOnActivate preference is + disabled. + + Signed-off-by: Jeremy Huddleston + +commit e5bc62a03289f956c54c4699edf47f7ff237b5be +Author: Jeremy Huddleston +Date: Sun Jul 25 22:29:11 2010 -0700 + + XQuartz: Ignore kXquartzToggleFullscreen when rootless + + Signed-off-by: Jeremy Huddleston + +commit 71af1f71c0492c365707c6b3810f94642ff39352 +Author: Keith Packard +Date: Thu Aug 12 23:01:59 2010 -0700 + + Bump to version 1.8.99.906 (1.9 RC6) + + Signed-off-by: Keith Packard + +commit 0af322858e86665ee43f065741318e69c2755510 +Author: Keith Packard +Date: Thu Aug 12 22:56:36 2010 -0700 + + Silence GCC warning about uninitialized lastSlave variable + + Not an actual bug, but gcc can't tell that this variable cannot be + used without being initialized + + Signed-off-by: Keith Packard + +commit b5cf9c5090d15a50b105470900823f2d398d4bd2 +Author: Alan Coopersmith +Date: Thu Aug 12 00:09:01 2010 -0700 + + Stop checking or calling PtrCtrlProcs + + None of them do anything useful now that pointer acceleration is + entirely handled in the server. (Does not completely nuke yet, + since that would be an API/ABI break.) + + Signed-off-by: Alan Coopersmith + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit bce12f2956f23c0ee53f7f6485dba631293a0931 +Author: Jesse Adkins +Date: Wed Aug 4 23:39:14 2010 -0700 + + xfree86: parser: Never use constant strings for driver names (fixes #17438) + + When the parser sees the "keyboard" driver, it automatically (and + silently) replaces it with the constant string "kbd". + Everybody else uses malloc'd memory for the driver name, so input + device closure assumes it can use free. + Free val.str, so this crash doesn't turn into a memory leak. Whew. + + Signed-off-by: Jesse Adkins + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 619ca32202cd22f2a408586cbc906b8bbaeb9358 +Author: Peter Hutterer +Date: Wed Jul 28 15:08:27 2010 +1000 + + Xi: reset the unused classes pointer after copying + + After copying the unused_classes into the device, reset the original + pointer. Otherwise we have two pointers pointing to the same field and both + get freed on device removal. + + Some classes already have this behaviour since 51c8fd69. + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit 1a172f3297369a72865232c382abfc14281102a4 +Author: Peter Hutterer +Date: Fri Jul 23 13:24:34 2010 +1000 + + xkb: if the button isn't down, don't fake an event. + + If the button we're about to fake isn't down (or up), don't fake a release + (or press) event for it. Behaviour is the same as before, this just saves + a few cycles. + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit 651c36e95ec0ac60d3fb98966df4218712ae78c2 +Author: Peter Hutterer +Date: Fri Jul 23 11:46:30 2010 +1000 + + xkb: post-fix PointerKeys button events with a DeviceChangedEvent. + + commit 14327858391ebe929b806efb53ad79e789361883 + xkb: release XTEST pointer buttons on physical releases. (#28808) + revealed a bug with the XTEST/PointerKeys interaction. + + Events resulting from PointerKeys are injected into the event processing + stream, not appended to the event queue. The events generated for the fake + button press include a DeviceChangedEvent (DCE), a raw button event and the + button event itself. The DCE causes the master to switch classes to the + attached XTEST pointer device. + + Once the fake button is processed, normal event processing continues with + events in the EQ. The master still contains the XTEST classes, causing some + events to be dropped if e.g. the number of valuators of the event in the + queue exceeds the XTEST device's number of valuators. + + Example: the EQ contains the following events, processed one-by-one, left to + right. + + [DCE (dev)][Btn down][Btn up][Motion][Motion][...] + ^ XkbFakeDeviceButton injects [DCE (XTEST)][Btn up] + + Thus the event sequence processed looks like this: + + [DCE (dev)][Btn down][Btn up][DCE (XTEST)][Btn up][Motion][Motion][...] + + The first DCE causes the master to switch to the device. The button up event + injects a DCE to the XTEST device, causing the following Motion events to be + processed with the master still being on XTEST classes. + + This patch post-fixes the injected event sequence with a DCE to restore the + classes of the original slave device, resulting in an event sequence like + this: + [DCE (dev)][Btn down][Btn up][DCE (XTEST)][Btn up][DCE (dev)][Motion][Motion] + + Note that this is a simplified description. The event sequence injected by + the PointerKeys code is injected for the master device only and the matching + slave device that caused the injection has already finished processing on + the slave. Furthermore, the injection happens as part of the the XKB layer, + before the unwrapping of the processInputProc takes us into the DIX where + the DCE is actually handled. + + Bug reproducible with a device that reports more than 2 valuators. Simply + cause button releases on the device and wait for a "too many valuators" + warning message. + + Signed-off-by: Peter Hutterer + Acked-by: Daniel Stone + Reviewed-by: Keith Packard + +commit 6dae7f3792611aace1df0cca63bf50c50d93de43 +Author: Chris Wilson +Date: Tue Aug 10 19:30:20 2010 +0100 + + xace: Invalid reference to out-of-scope data. + + The callback data passed by reference to the hook was allocated on stack + within the scope of the case statement. The compiler is free to reuse + any of that stack space whilst making the function call so we may end up + passing garbage into the callback. + + References: + + Bug 18451 - Xorg server 1.5.2 SEGV during XFixesGetCursorImage() + https://bugs.freedesktop.org/show_bug.cgi?id=18451 + + v2: Drop the unrelated hunk that snuck in when ammending the commit + message. + + Signed-off-by: Chris Wilson + Reviewed-by: Alan Coopersmith + Signed-off-by: Keith Packard + +commit fbd02046797185715e1a120d52e410ec78fc365f +Author: Jon TURNEY +Date: Thu Aug 5 15:19:20 2010 +0100 + + Cygwin/X: Fix glxWinCreateDrawable() for API change + + Commit 9de0e31746d5f0d9d39d11c94ec3cbc04a9935fc changed the signature + of __GLXScreen's createDrawable method. + + Update the glxWinCreateDrawable() function in XWin's GLX provider + appropriately. + + Signed-off-by: Jon TURNEY + Tested-by: Colin Harrison + Signed-off-by: Keith Packard + +commit ff70848e623920779d20f35d47e9e1f34157de47 +Author: Keith Packard +Date: Fri May 21 09:01:43 2010 -0700 + + Don't let alpha maps recurse in fb. Bug 23581. + + Recursive alpha maps (where one picture's alpha map is set to a + picture with an external alpha map) would be all fine and dandy, + except for the case where the client constructs a loop. Detecting this + case when setting the alpha map values would be difficult as any time + an alpha map is set, the server would have to check for the looping + case. + + Instead, a far simpler fix is to simply disallow recursive alpha maps + in the rendering code, the Render spec is ambiguous in this area and + allows us to to ignore the recursive case. + + Signed-off-by: Keith Packard + Reviewed-by: Adam Jackson + +commit 70a94c5b7a42adc0995bf774c44587a0778be0d0 +Author: Jon TURNEY +Date: Tue Aug 3 19:49:10 2010 +0100 + + rootless: fix uninitialized private key assert in non-rootless modes in Cygwin/X + + IsFramedWindow() is called from miPaintWindow() if the server has + been built with ROOTLESS defined, irrespective of if RootlessInit() + has ever been called, or not. + + Add a check to IsFramedWindow() to check if rootlessWindowPrivateKey + has been registered (as a proxy for checking if the rootless extension + has been initialized) so we don't go on to try to use that key, + triggering an assert. + + This bug exposes what appears to be a difference in opinion about + the rootless extension between XQuartz and XWin. XQuartz always + initializes the rootless extension, whereas XWin offers several modes + of operation, and the rootless extension is only used for one of them + + That probably means that the all code under compile time guard for + ROOTLESS should be carefully checked that it doesn't also need to be + under a run-time guard + + (I've reviewed the other ROOTLESS blocks in dix/events.c and + dix/window.c and they look ok -- keithp) + + Signed-off-by: Jon TURNEY + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit 3ab6cd31cbdf8095b2948034fce5fb645422d8da +Author: Adam Jackson +Date: Mon Aug 9 15:20:20 2010 -0400 + + fonts: Fix refcounting for asynchronous font operations (#3040) + + When doing Xinerama, we'll dispatch font ops across all backend screens. + If using a font server (such that some operations can sleep), we'll put + the client to sleep once for each screen, but only wake up once, because + we're trying to keep track of the sleep count in _each_ screen's + closure. + + Instead, just ask the core whether the client is already asleep. + + Signed-off-by: Adam Jackson + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit 35c0dbe4b0a6ab790f4271325b8a0b16894daa8b +Author: Gaetan Nadon +Date: Sun Aug 8 10:03:08 2010 -0400 + + doc: add missing .gitignore for Xserver-DTrace + + The dtrace doc was recently added in commit + 9c171d4aee695ab66e6db1ab92539557bd368cfa + + Reviewed-by: Alan Coopersmith + Signed-off-by: Gaetan Nadon + +commit 05c4fe83fdc20b838fd59658478278dc31a55eb9 +Author: Alan Coopersmith +Date: Fri Jul 30 17:43:24 2010 -0700 + + Check HAVE_XMLTO_TEXT before trying to use xmlto to make text files + + Reported-by: Matt Turner + Tested-by: Gaetan Nadon + Signed-off-by: Alan Coopersmith + +commit a6fb7829ed9bf26c4c2a02c6ed075fb1b17f7b2a +Author: Alan Coopersmith +Date: Mon Jul 26 19:55:27 2010 -0700 + + Xserver-spec: Update ChangeGC prototype, add ChangeGCXIDs + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jamey Sharp + +commit a817271d461e2f95dd7dc62cd1c7d123ce92f555 +Author: Alan Coopersmith +Date: Thu Jul 22 23:57:57 2010 -0700 + + Update Xserver-spec for new devPrivates API + + Signed-off-by: Alan Coopersmith + Reviewed-by: Patrick E. Kane + +commit 40d598a4f84091db743ceef4d60752bb910c3e56 +Author: Alan Coopersmith +Date: Thu Jul 22 23:57:02 2010 -0700 + + Correct function name in dixRegisterPrivateKey comments + + Signed-off-by: Alan Coopersmith + Reviewed-by: Patrick E. Kane + +commit 8d7b7a0d71e0b89321b3341b781bc8845386def6 +Author: Kristian Høgsberg +Date: Thu Jul 29 20:36:25 2010 -0400 + + Set DamageSetReportAfterOp to true for the damage extension + + Change the damage extension reporter to queue up events after we chain + to the wrapped functions. Damage events are typically sent out after + the rendering happens anyway, since we submit batch buffers from the + flush callback chain and then flush client io buffers. Compositing + managers relie on this order, and there is no way we could reliably + provide damage events to clients before the rendering happens anyway. + + By queueing up the damage events before the rendering happens, there's + a risk that the client io buffer may overflow and send the damage + events to the client before the driver has even seen the rendering + request. Reporting damage events after the rendering fixes this + corner case and better corresponds with how we expect this to work. + + Signed-off-by: Kristian Høgsberg + Reviewed-by: Keith Packard + +commit c65f610e12f9df168d5639534ed3c2bd40afffc8 +Author: Kristian Høgsberg +Date: Thu Jul 29 18:52:35 2010 -0400 + + Always call the flush callback chain when we flush client buffers + + We were missing the callback in a couple of places. Drivers may use + the flush callback to submit batched up rendering before events (for + example, damage events) are sent out, to ensure that the rendering + has been queued when the client receives the event. + + Signed-off-by: Kristian Høgsberg + Reviewed-by: Keith Packard + +commit 7e0575baf14ec4a89492fd2780f9ab5b9244afbd +Author: Matt Turner +Date: Tue Jul 27 23:32:36 2010 -0400 + + ddc: Fix memory leak in GetEDID_DDC1 + + Mark argument to DDC_checksum as const too. + + Signed-off-by: Matt Turner + Reviewed-by: Adam Jackson + Signed-off-by: Keith Packard + +commit 750d4e82a0c1161292d24216bcff200cd6647611 +Author: Jeremy Huddleston +Date: Thu Jul 29 11:39:40 2010 -0700 + + XQuartz: xpbproxy: Don't take down the whole server on an IO error + + Calls pthread_exit to prevent _XIOError from calling exit() + + This fixes http://xquartz.macosforge.org/trac/ticket/421 + + Signed-off-by: Jeremy Huddleston + +commit 98f90145d786695ecbc02a667c6ffe7c619dc67e +Author: Jeremy Huddleston +Date: Wed Jul 28 18:08:02 2010 -0700 + + XQuartz: GLX: Don't mangle __GLXDrawable's pDraw + + We were incorrectly NULLing out pDraw in __GLXDrawable instead of ours in + __GLXAquaDrawable. (we should refactor to eliminate this redundancy later) + + This was causing http://xquartz.macosforge.org/trac/ticket/426 + This was benign until commit f0006aa58f6cf7552a239e169ff6e7e4fda532f4 + The root cause of this change was fed7ccc481ad1caaa518cafe944c2327a5d0b6c65 + + Signed-off-by: Jeremy Huddleston + +commit 9c171d4aee695ab66e6db1ab92539557bd368cfa +Author: Alan Coopersmith +Date: Fri Jun 25 16:52:42 2010 -0700 + + Add documentation of the Xserver DTrace probes + + Mostly pulled together from posts to my blog and the docs posted + at http://people.freedesktop.org/~alanc/dtrace/ and converted to + DocBook. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Patrick E. Kane + +commit 6b912b08ce65072b2401167fbf2150b99c0ca6b0 +Author: Alan Coopersmith +Date: Sat Jun 19 23:56:20 2010 -0700 + + Add name argument to CreateNewResourceType documentation + + Reflects API change made in commit 895f40792a during Xorg 1.8 development + + Signed-off-by: Alan Coopersmith + Reviewed-by: Patrick E. Kane + +commit 44c9350d72b3eda982c642feb45d6648afc626cf +Author: Alan Coopersmith +Date: Sat Jun 19 23:40:37 2010 -0700 + + Use DocBook stylesheets from xorg-sgml-doctools if they're available + + Bumps minimum xorg-macros requirement from 1.6 to 1.10 + + Signed-off-by: Alan Coopersmith + Reviewed-by: Patrick E. Kane + +commit 9fbbff3c0456f1969d45cc957d3260723caf62d7 +Merge: 95756f4 9ac8e20 +Author: Keith Packard +Date: Wed Jul 21 11:56:39 2010 -0700 + + Merge remote branch 'whot/for-keith' + +commit 9ac8e206ffe1016a8bc203261ade6c763a8a4f86 +Author: Peter Hutterer +Date: Thu Jul 15 15:46:15 2010 +1000 + + xkb: use GetMaster instead of dev->u.master. + + Devices that are both pointers and keyboards are not affected by keyboard + changes as their master device is a master pointer, not a master keyboard. + Use GetMaster() instead to ensure devices that are attached to the paired + master pointer device will still be update. + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + Reviewed-by: Daniel Stone + +commit c54f81ba7a58faf37a612bd9a45276bb2922b5d8 +Author: Peter Hutterer +Date: Thu Jul 15 13:24:14 2010 +1000 + + dix: hack around enter/leave event issues for grabbed devices (#27804) + + The current core enter/leave does not cater for device grabs during + enter/leave events. If a window W contains a pointer P1 and a client grabs a + pointer P2, this pointer will not generate enter/leave events inside this + window. + + Hack around this by forcing grabbed devices to always send enter/leave + events. + + X.Org Bug 27804 + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit 95756f410c65a6510a797e94a792b959d45cdb9e +Author: Jan Hauffa +Date: Sat Jul 17 12:18:39 2010 -0700 + + rootless: Adjust the frame size of the native root window in RootlessResizeWindow + + If the native root window isn't resized as well, we will likely crash the + next time we draw to the root. On OS X, this can be seen by: + + 1) Put the display preferences in the menu bar and set X11's preferences so you + can access the menu bar in fullscreen mode + 2) Set the resolution of your screen lower than normal. + 3) Start X11 in fullscreen mode. The root window will cover the screen as + expected. + 4) Use the menu bar to increase the resolution of the display. The root + window will now cover the old area and not the full screen, but + 'xwininfo -root' will report the full width. + 5) Run 'xsetroot -solid red', and we have the crash you mention above. + + Leaving/entering fullscreen after #4 will fix the problem. This is because the + WINREC is erased when we leave fullscreen mode and it is recreated upon + re-entry: + + RootlessUpdateRooted(FALSE) + RootlessDisableRoot(screenInfo.screens[0]) + RootlessDestroyFrame (pRoot, winRec); + RootlessUpdateRooted(TRUE) + RootlessEnableRoot(screenInfo.screens[0]) + RootlessEnsureFrame(screenInfo.screens[0]->pRoot) + creates a new WINREC... + + Signed-off-by: Jan Hauffa + Reviewed-by: Jeremy Huddleston + Acked-By: Jon TURNEY + Tested-by: Jeremy Huddleston + +commit a2c13f0d6548310e3cd115cf486d3e43edf23dcc +Author: Keith Packard +Date: Wed Jul 14 12:57:29 2010 -0700 + + Bump to version 1.8.99.905 (1.9 RC5) + + Signed-off-by: Keith Packard + +commit 0fc02c0bf92f694889589e3648acc08d4684de37 +Merge: 0540c46 9d8ec71 +Author: Keith Packard +Date: Tue Jul 13 15:05:36 2010 -0700 + + Merge remote branch 'jeremyhu/master' + +commit 0540c46066f938ad5611c56081cfcd8457a9b718 +Author: Michel Dänzer +Date: Tue Jul 13 14:56:53 2010 +0200 + + EXA: Finish access to pixmap if it's prepared at destruction time. + + Previously we assumed every pixmap destroyed during a software fallback was + also created during a software fallback and had access prepared, but that's + not always true. + + Fixes a server abort + Reported-by: 邓逸昕 + + Signed-off-by: Michel Dänzer + Acked-by: Maarten Maathuis + Signed-off-by: Keith Packard + +commit d75e8146c414bfd512ba5dbd4a83acb334bbe19b +Author: Keith Packard +Date: Mon Jul 12 16:01:34 2010 -0700 + + Unwrap/rewrap EnterVT/LeaveVT completely, Fixes 28998 + + Because some EnterVT code needs to remove it self from the + call chain, we need to fix all of the wrappers to correctly + unwrap/rewrap during the call chain. This is a follow-on to the fix + for bug 27114 in commit 68a9ee8370e6f9b38218376ac92d5130a5b0ef1e. + + Signed-off-by: Keith Packard + Tested-by: Jesse Barnes + Reviewed-by: Daniel Stone + Reviewed-by: Tiago Vignatti + +commit 9d8ec712a67ce71ea7408f0626cda7e0fa7c3bac +Author: Jeremy Huddleston +Date: Tue Jul 13 08:56:36 2010 -0700 + + XQuartz: Bump bundle version to 2.6.0 for xorg-server-1.9.0 and X11R7.6 + + Signed-off-by: Jeremy Huddleston + +commit b2b9c458a46e9a41c3c76ffe83a2b580a41d0e90 +Author: Jan Hauffa +Date: Wed Jun 16 09:25:41 2010 -0700 + + XQuartz: Remove some dead code. + + Signed-off-by: Jan Hauffa + Reviewed-by: Jeremy Huddleston + Signed-off-by: Jeremy Huddleston + +commit 648d189548530fa23d97d1e8737f89d297f1c443 +Author: Jeremy Huddleston +Date: Tue Jul 13 08:25:27 2010 -0700 + + XQuartz: Avoid a crash when mistakenly free()ing in QuartzSetCursor on some configs + + Signed-off-by: Jeremy Huddleston + +commit 3209b094a3b1466b579e8020e12a4f3fa78a5f3f +Author: Jesse Barnes +Date: Fri Jul 9 10:36:56 2010 -0700 + + DRI2: re-allocate DRI2 drawable if pixmap serial changes + + If a pixmap header is modified or the drawable serial changes, some + aspects of the drawable are likely to have changed so we should + re-allocate the corresponding DRI2 drawable in that case. This is one + way of catching when the root window pixmap changes through xrandr. + + Fixes bug https://bugs.freedesktop.org/show_bug.cgi?id=28365. + + Reviewed-by: Keith Packard + Reviewed-by: Kristian Høgsberg + Signed-off-by: Jesse Barnes + Signed-off-by: Keith Packard + +commit 02b11509b25686ff7bd567ecb78a435701edc4c2 +Author: Jesse Barnes +Date: Fri Jul 9 10:36:12 2010 -0700 + + miModifyPixmapHeader: always update serialNumber + + We should update the serial number even if we just change a single field. + + Reviewed-by: Keith Packard + Reviewed-by: Kristian Høgsberg + Signed-off-by: Jesse Barnes + Signed-off-by: Keith Packard + +commit 2307ab5bc9365ebbe04568edb7c7620a23689b70 +Merge: c65280c fd4f505 +Author: Keith Packard +Date: Tue Jul 6 23:54:54 2010 -0400 + + Merge remote branch 'whot/for-keith' + +commit fd4f5059f08165a726071dc9f1ca877038292f6f +Author: Peter Hutterer +Date: Tue Jul 6 09:19:09 2010 +1000 + + dix: purge leftover manual key down bit setting. + + Signed-off-by: Peter Hutterer + Reviewed-by: Daniel Stone + +commit a1afe172559aff010e886cfc2a7a922d4a06c697 +Author: Peter Hutterer +Date: Tue Jul 6 09:16:42 2010 +1000 + + dix: add aux. functions for button_is_down, set_button_down, set_button_up. + + Same as the matching key functions. Buttons, like keys, can have two states + for down/up - one posted, one processed. Posted is set during event + generation (usually in the signal handler). Processed is set during event + processing when the event queue is emptied and events are being delivered to + the client. + + Signed-off-by: Peter Hutterer + Reviewed-by: Daniel Stone + +commit 32473d6bf38c95b2d6d5ddbf583a1e801c6605e4 +Author: Peter Hutterer +Date: Tue Jul 6 08:56:12 2010 +1000 + + dix: use BitIsOn/SetBit/ClearBit macros for set_key_down helpers. + + Signed-off-by: Peter Hutterer + Reviewed-by: Daniel Stone + +commit c18442908080c9833dfd6bb2ff367945d1892421 +Author: Peter Hutterer +Date: Mon Jul 5 16:47:57 2010 +1000 + + Xi: use set_key_up/down instead of manual bit handling. + + We have the wrappers, use them. Signed-off-by: Peter Hutterer -commit 2ae159bad4178bd0d0b4664b895e085835396ffc +commit 10442ce02b5be7f82b373bee1939e2b523e291d9 Author: Peter Hutterer -Date: Mon Jun 21 11:41:22 2010 +1000 +Date: Mon Jul 5 16:54:48 2010 +1000 - xserver 1.8.1.902 + dix: treat flags as flags, not as value in key_is_down. + + Signed-off-by: Peter Hutterer + Reviewed-by: Daniel Stone + +commit b46ffd25d3f211e91c67bc618ecbd58257939388 +Author: Peter Hutterer +Date: Fri Jul 2 15:25:14 2010 +1000 + + mi: rename miPointerMoved to miPointerMoveNoEvent. + + Having miPointerMove and miPointerMoved is confusing, especially since both + do the same thing bar the event delivery. Also, miPointerMove calls + miPointerMoved which indicates some confusion in the temporal alignment of + cause and effect. + + Signed-off-by: Peter Hutterer + Acked-by: Tiago Vignatti + Reviewed-by: Keith Packard + +commit dbd621705a5211540b353af81c4af83c297b74dc +Author: Peter Hutterer +Date: Fri Jul 2 14:22:03 2010 +1000 + + mi: De-duplicate some code in mipointer.c + + miPointerMoved already has the same code. + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit c65280ce8df4836bd7424a90482e8aa00ab6f447 +Author: Robert Hooker +Date: Sat Jun 12 20:23:09 2010 -0400 + + Increase advertised RENDER protocol minor version to 11 + + Support for the blend mode operators was added in + 0ce42adbf4cff9e7f049d9fc79d588ece5936177 + and the requirement was bumped but when things were split off into + include/protocol-versions.h it defined it to 10. render uses + the lower of the client and server advertised versions so it's not + using the new blend mode operators. + + Signed-off-by: Robert Hooker + Reviewed-by: Peter Hutterer + Signed-off-by: Keith Packard + +commit 9f0b193acdc29e491b6245390cf9f53b5222e6d3 +Author: Keith Packard +Date: Thu Jul 1 09:13:43 2010 -0400 + + miDbe window priv priv is pre-allocated, don't use dixSetPrivate (bug 28639) + + miDbeInit pre-allocates space in each DBE window private private for a + MiDbeWindowPrivPrivRec. miDbeAllocBackBufferName used the + pre-allocated space correctly (simply fetching it instead of + allocating a new piece of memory). However, it then called + dixSetPrivate anyways, which isn't necessary, and (in the new + dixPrivate world) causes an assert failure. + + Signed-off-by: Keith Packard + Tested-by: Magnus Kessler + Reviewed-by: Magnus Kessler + +commit a94cb400d15b8c78dc04148cbd8db8e5ec8364b5 +Author: Keith Packard +Date: Thu Jul 1 09:11:36 2010 -0400 + + Delete unused miDbe screen private private datatype + + MiDbeScreenPrivPrivRec is not used in the server. Remove it, along + with the MI_DBE_SCREEN_PRIV_PRIV macro that tried to use it. + + Signed-off-by: Keith Packard + Reviewed-by: Magnus.Kessler + +commit f0fcffe55f280add5e4db2f5e9198a48c6f1b015 +Author: Alan Coopersmith +Date: Thu Jun 3 19:00:54 2010 -0700 + + Update the sprite immediately when moving it with MouseKeys + + Fix for OpenSolaris bug 6949755: Mouse Keys are ununusable + and possibly https://bugs.freedesktop.org/show_bug.cgi?id=24856 + + Ensures waitForUpdate is False before calling SetCursorPosition. + Normally waitForUpdate is False when SilkenMouse is active, True + when it's not. When it's True, the mouse cursor position on + screen is not updated immediately. + + This is more critical on Solaris, since we disabled SigIO, thus in turn + disable SilkenMouse, due to the SSE2 vs. signal handler issues described in + Sun bugs 6849925, 6859428, and 6879897. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 3d9079b898c432a87f9b95c1f39a85f660bf0858 +Author: Alan Coopersmith +Date: Thu Jun 3 19:00:53 2010 -0700 + + Add API to update setting of waitForUpdate screen private in miPointer + + Signed-off-by: Alan Coopersmith + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 69b2b5c85ec079ef49f84722daa5f148cedc2e1b +Merge: b90faa7 1432785 +Author: Keith Packard +Date: Thu Jul 1 23:46:53 2010 -0400 + + Merge remote branch 'whot/for-keith' + +commit b90faa71567c4461b28515756ba5c1e6286dda16 +Author: Keith Packard +Date: Thu Jul 1 23:46:27 2010 -0400 + + Revert "xkb: merge lockedPtrButtons state from all attached SDs." + + Preparing to merge Peter's branch. + + This reverts commit 6052710670953b43b4fff5d101b727163fcb1187. + +commit 9fb0785449b287ba1998e08613b3c2102ec24842 +Author: Keith Packard +Date: Thu Jul 1 23:45:50 2010 -0400 + + Revert "Revert "dix: use the event mask of the grab for TryClientEvents."" + + Preparing to merge Peter's branch. + + This reverts commit 018c878e9495b21146c8f38617fdd1bf6d8cc73b. + +commit 48cac27870992f6bde2c48429ff03c0a7606d5c1 +Author: James Jones +Date: Fri Jun 18 17:28:15 2010 -0700 + + Cast void* to pointer* to appease some compilers. + + When this privates.h is included in C++ builds, the compiler + complains about implicitly casting void* to void**. This small + patch fixes that up. + + Signed-off-by: James Jones + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit 14327858391ebe929b806efb53ad79e789361883 +Author: Peter Hutterer +Date: Thu Jul 1 12:44:57 2010 +1000 + + xkb: release XTEST pointer buttons on physical releases. (#28808) + + If a button release event is posted for the MD pointer, post a release event + through the matching XTEST device. This way, a client who posts a button + press through the XTEST extension cannot inadvertedly lock the button. + + This behaviour is required for historical reasons, until server 1.7 the core + pointer would release a button press on physical events, regardless of the + XTEST state. Clients seem to rely on this behaviour, causing seemingly stuck + grabs. + + The merged behaviour is kept for multiple keyboard PointerKey events, if two + physical keyboards hold the button down as a result of PointerKey actions, + the button is not released until the last keyboard releases the button. + + X.Org Bug 28808 Signed-off-by: Peter Hutterer -commit 600bdf0350f538e7baa6b48f37f77c905e6fd17d -Merge: cc9f680 5986030 +commit a71dbc03e65cf7b0654a6eca93ce0bf6a1711ffa +Author: Keith Packard +Date: Thu Jul 1 08:27:05 2010 -0400 + + Bump to version 1.8.99.904 (1.9 RC4) + + Signed-off-by: Keith Packard + +commit 5ea497fc32202ff19c2b7d8ef4eba08889108a87 +Author: Tiago Vignatti +Date: Tue Jun 29 16:08:02 2010 +0300 + + xfree86: configure: remove vendor and card name matching rules + + Although vendor and board naming are used to create the configure file, the + server doesn't actually use it when fetching such file and probing devices. + + Reported-by: Richard Barnette + Signed-off-by: Tiago Vignatti + Reviewed-by: Mikhail Gusarov + Reviewed-by: Alex Deucher + Tested-by: Richard Barnette + Signed-off-by: Keith Packard + +commit 90fd9e40b59e69333d250a795998f44dc3a5dc0c +Author: Tiago Vignatti +Date: Tue Jun 29 16:08:01 2010 +0300 + + xfree86: pci: remove superfluous vendor and card name logging + + X server suffers in startup time when relying on the pciaccess's linear search + to fetch vendor and video device name from PCI ID file (when existent). Such + names are only used to write the log, which may be superfluous. This + information often is provided by the drivers or likewise users can get the it + using external tools like lspci or scanpci. + + This patch remove the references of those functions from X start up. + + Reported-by: Richard Barnette + Signed-off-by: Tiago Vignatti + Tested-by: Richard Barnette + Reviewed-by: James Cloos + Reviewed-by: Mikhail Gusarov + Reviewed-by: Alex Deucher + Signed-off-by: Keith Packard + +commit 339f62b1bfadb0ee77d67e351f4e30f5d5e9625f Author: Peter Hutterer -Date: Mon Jun 21 11:34:35 2010 +1000 +Date: Tue Jun 29 15:24:51 2010 +1000 - Merge branch 'dri2-backports' into server-1.8-branch + xkb: emulate PointerKeys events only on the master device. + + This patch replicates the behaviour for button events. Only generate a + PointerKeys motion event on the master device, not on the slave device. + Fixes the current issue of PointerKey motion events generating key events as + well. + + Signed-off-by: Peter Hutterer -commit cc9f6806ac0d45e122c24c0e99c1db70a6d5ca12 +commit 69ac909878ef80bb74c4a9ca4150eda66debd754 +Author: Peter Hutterer +Date: Tue Jun 29 12:12:53 2010 +1000 + + xkb: merge lockedPtrButtons state from all attached SDs. + + Problem: + lockedPtrButtons keeps the state of the buttons locked by a PointerKeys button + press. Unconditionally clearing the bits may cause stuck buttons in this + sequence of events: + + 1. type Shift + NumLock to enable PointerKeys + 2. type 0/Ins on keypad to emulate Button 1 press + → button1 press event to client + 3. press and release button 1 on physical mouse + → button1 release event to client + + Button 1 on the MD is now stuck and cannot be released. + + Cause: + XKB PointerKeys button events are posted through the XTEST pointer device. + Once a press is generated, the XTEST device's button is down. The DIX merges + the button state of all attached SDs, hence the MD will have a button down + while the XTEST device has a button down. + + PointerKey button events are only generated on the master device to avoid + duplicate events (see XkbFakeDeviceButton()). If the MD has the + lockedPtrButtons bit cleared by a release event on a physical device, no + such event is generated when a keyboard device triggers the PointerKey + ButtonRelease trigger. Since the event - if generated - is posted through + the XTEST pointer device, lack of a generated ButtonRelease event on the + XTEST pointer device means the button is never released, resulting in the + stuck button observed above. + + Solution: + This patch merges the MD's lockedPtrButtons with the one of all attached + slave devices on release events. Thus, as long as one attached keyboard has + a lockedPtrButtons bit set, this bit is kept in the MD. Once a PointerKey + button is released on all keyboards, the matching release event is emulated + from the MD through the XTEST pointer device, thus also releasing the button + in the DIX. + + Signed-off-by: Peter Hutterer + +commit 09645864f5a52882eee51c801b3e610d683e7147 +Author: Peter Hutterer +Date: Tue Jun 29 13:49:27 2010 +1000 + + xkb: Mark switch case fallthrough with comment. + + Signed-off-by: Peter Hutterer + +commit c7330ecb5d28d7a92d24feb289f7f1812ce055a4 +Author: Peter Hutterer +Date: Wed Jun 30 13:23:14 2010 +1000 + + dix: fix up erroneous error message. + + (WW) Device 'device name' has 36 axes, only using first 36. + does seem a bit silly. + + Signed-off-by: Peter Hutterer + +commit dbf249ec6638f0a8dfa4c2286099845aafc8ac88 +Author: Peter Hutterer +Date: Tue Jun 29 10:43:51 2010 +1000 + + xkb: remove now obsolete comment. + + Looks like nothing broke from removing the hardcoded CoreProcessPointerEvent + call. Whoop. Di. Doo. + + Signed-off-by: Peter Hutterer + +commit f028e70ca714f6956e41754f132cb9b8a1e8db63 +Author: Keith Packard +Date: Wed Jun 30 08:33:55 2010 -0700 + + Initialize dev privates before using any + + Initializing the dev privates code after allocating the server client + dev privates would cause the memory leak check to fire at server + startup or reset. + + Signed-off-by: Keith Packard + Acked-by: Daniel Stone + +commit 433d0851cd3e61d841ff374ee0a0f052d5907029 +Author: Julien Cristau +Date: Fri Jun 25 11:34:44 2010 +0100 + + Xephyr: fix Xv adaptor capability tests + + Signed-off-by: Julien Cristau + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit 9626eedebf620559652ffb1fefa82b5d659e57be +Author: Julien Cristau +Date: Thu Jun 24 18:45:11 2010 +0100 + + configure: bail if Xephyr was requested but its dependencies are missing + + Signed-off-by: Julien Cristau + Reviewed-by: Jamey Sharp + Signed-off-by: Keith Packard + +commit e6531ae9d5bdd37775e921268366fb76056e22d5 +Author: Julien Cristau +Date: Thu Jun 24 18:45:10 2010 +0100 + + Xephyr: fix memory leak in XF86DRIOpenConnection + + The allocated bus id string was not being freed. + + Signed-off-by: Julien Cristau + Reviewed-by: Jamey Sharp + Signed-off-by: Keith Packard + +commit 390a8466dd1914f4786b811ff8454f6e0c4b6b04 +Author: Ville Syrjälä +Date: Mon Jun 28 23:26:48 2010 +0300 + + xfree86/modes: Allow the driver to specify initial rotation + + When the "Rotate" option isn't specified allow the driver to specify + the initial rotation mode. This way the driver can choose to retain + the same settings that were used by software that was used prior to + starting X. + + Signed-off-by: Ville Syrjälä + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit 6052710670953b43b4fff5d101b727163fcb1187 +Author: Keith Packard +Date: Wed Jun 30 08:21:04 2010 -0700 + + xkb: merge lockedPtrButtons state from all attached SDs. + + Problem: + lockedPtrButtons keeps the state of the buttons locked by a PointerKeys button + press. Unconditionally clearing the bits may cause stuck buttons in this + sequence of events: + + 1. type Shift + NumLock to enable PointerKeys + 2. type 0/Ins on keypad to emulate Button 1 press + → button1 press event to client + 3. press and release button 1 on physical mouse + → button1 release event to client + + Button 1 on the MD is now stuck and cannot be released. + + Cause: + XKB PointerKeys button events are posted through the XTEST pointer device. + Once a press is generated, the XTEST device's button is down. The DIX merges + the button state of all attached SDs, hence the MD will have a button down + while the XTEST device has a button down. + + PointerKey button events are only generated on the master device to avoid + duplicate events (see XkbFakeDeviceButton()). If the MD has the + lockedPtrButtons bit cleared by a release event on a physical device, no + such event is generated when a keyboard device triggers the PointerKey + ButtonRelease trigger. Since the event - if generated - is posted through + the XTEST pointer device, lack of a generated ButtonRelease event on the + XTEST pointer device means the button is never released, resulting in the + stuck button observed above. + + Solution: + This patch merges the MD's lockedPtrButtons with the one of all attached + slave devices on release events. Thus, as long as one attached keyboard has + a lockedPtrButtons bit set, this bit is kept in the MD. Once a PointerKey + button is released on all keyboards, the matching release event is emulated + from the MD through the XTEST pointer device, thus also releasing the button + in the DIX. + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit 28e33ae6f69f716ece5d68e63fc52557236c5f6e +Author: Jesse Barnes +Date: Wed Jun 30 07:59:04 2010 -0700 + + OS support: fix writeable client vs IgnoreClient behavior + + When ResetCurrentRequest is called, or IgnoreClient is called when a + client has input pending, IgnoredClientsWithInput will be set. However, + a subsequent IgnoreClient request will clear the client fd from that fd + set, potentially causing the client to hang. + + So add an Ignore/Attend count, and only apply the ignore logic on the + first ignore and the attend logic on the last attend. This is + consistent with the comments for these functions; callers must pair + them. + + Fixes https://bugs.freedesktop.org/show_bug.cgi?id=27035. + + Reviewed-by: Keith Packard + Reviewed-by: Daniel Stone + Signed-off-by: Jesse Barnes + Signed-off-by: Keith Packard + +commit 018c878e9495b21146c8f38617fdd1bf6d8cc73b +Author: Peter Hutterer +Date: Fri Jun 25 09:48:10 2010 +1000 + + Revert "dix: use the event mask of the grab for TryClientEvents." + + Behaviour of earlier X servers was to deliver the ButtonPress event + unconditionally, regardless of the actual event mask being set. Thus, a + GrabButton event will always deliver the button press event, a GrabKey + always the key press event, etc. Same goes for XI and XI2. + + Reproducible with a simple client requesting a button grab in the form of: + XGrabButton(dpy, AnyButton, AnyModifier, win, True, ButtonReleaseMask, + GrabModeAsync, GrabModeAsync, None, None); + + On servers before MPX/XI2, the client will receive a button press and + release event. On current servers, the client receives only the release. + Clients that expect the press event to be delivered unconditionally may + leave the user with a stuck grab. + + XTS test results for XGrabButton are identical with and without this patch. + + This reverts commit 48585bd1e3e98db0f3df1ecc68022510216e00cc. + + Conflicts: + + dix/events.c + + Signed-off-by: Peter Hutterer + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit 1884db430a5680e37e94726dff46686e2218d525 +Author: Peter Hutterer +Date: Thu Jun 24 12:52:53 2010 +1000 + + Revert "dix: use the event mask of the grab for TryClientEvents." + + Behaviour of earlier X servers was to deliver the ButtonPress event + unconditionally, regardless of the actual event mask being set. This is + documented in the protocol: + "This request establishes a passive grab. In the future, the pointer is + actively grabbed as described in GrabPointer, the last-pointer-grab time is + set to the time at which the button was pressed (as transmitted in the + ButtonPress event), and the ButtonPress event is reported if all of the + following conditions are true: + " + + Thus, a GrabButton event will always deliver the button press event, a + GrabKey always the key press event, etc. Same goes for XI and XI2. + + Reproducible with a simple client requesting a button grab in the form of: + XGrabButton(dpy, AnyButton, AnyModifier, win, True, ButtonReleaseMask, + GrabModeAsync, GrabModeAsync, None, None); + + On servers before MPX/XI2, the client will receive a button press and + release event. On current servers, the client receives only the release. + Clients that expect the press event to be delivered unconditionally. + + XTS Xlib13 XGrabButton 5/39 now passes. + + This reverts commit 48585bd1e3e98db0f3df1ecc68022510216e00cc. + Effectively reverts commit 1c612acca8568fcdf9761d23f112adaf4d496f1b as well, + the code introduced with 1c612 is not needed anymore. + + Conflicts: + + dix/events.c + + Signed-off-by: Peter Hutterer + Acked-by: Daniel Stone + Reviewed-by: Keith Packard + +commit 3b3c77b87070ddcdbb2acb114a81628485e7a129 +Author: Tiago Vignatti +Date: Wed Jun 23 15:18:04 2010 +0300 + + configure: don't check xfont always for each server + + It's already defined inside REQUIRED_LIBS and all DDX are getting it already. + No semantical changes. + + Signed-off-by: Tiago Vignatti + Reviewed-by: Mikhail Gusarov + Reviewed-by: Alex Deucher + Signed-off-by: Keith Packard + +commit 75536ee80595c79bba95a1fb6844126ee08486d4 +Author: Tiago Vignatti +Date: Wed Jun 23 15:18:03 2010 +0300 + + dix: use one single function to register fpe fonts + + X server doesn't need to understand fpe internals, so use + register_fpe_functions from libXfont. + + It's required to get new version of libXfont, therefore adjust it to be passed + to autoconf. + + Signed-off-by: Tiago Vignatti + Reviewed-by: Mikhail Gusarov + Reviewed-by: Alex Deucher + Signed-off-by: Keith Packard + +commit a68a101a730df7f73421555e381a50b074607c5e +Author: Keith Packard +Date: Tue Jun 22 12:13:26 2010 -0700 + + Bump to 1.8.99.903 -- 1.9 RC3 + + Signed-off-by: Keith Packard + +commit 2c0159d21788b16607e6ebe4571b57fe78545c2a +Author: Kristian Høgsberg +Date: Mon Jun 14 09:25:22 2010 -0400 + + list.h: Fix list_for_each_entry_safe() + + Can't use next as a macro argument since we're accessing the .next field + of struct list. + + Signed-off-by: Kristian Høgsberg + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit e2918b67395a48397bf7db545584cc2d4f4e7ccf +Author: Keith Packard +Date: Tue Jun 22 12:11:20 2010 -0700 + + Revert "mi: Remove unused overlay support" + + This reverts commit 9120e58556014e514eef9dfe43cdea4b74dc66ae. + + Whoops, please revert this patch -- overlay is in use in nvidia drivers, + and it's too late in release cycle to remove it. + + I feel really sorry that I kept this patch in my tree. I will submit + another one, removing only XAA overlay hooks which are not used at all. + +commit 7673451ade46ebacfdfc02a5190149210198fdd8 +Author: Keith Packard +Date: Tue Jun 22 11:49:30 2010 -0700 + + Bump to 1.8.99.902 -- 1.9 RC2 + + Signed-off-by: Keith Packard + +commit 8b65f2edb407521e0ac0e207e5d5358986bd46da +Author: Rami Ylimäki +Date: Tue Jun 22 14:57:20 2010 +0300 + + record: Prevent a crash on recording client disconnect. + + Execute the following steps to reproduce the issue. + + 1. Run at least two recording clients simultaneously. + $ cnee --record --request-range 1-127 & + $ cnee --record --request-range 1-127 & + 2. Kill the recording clients. + $ killall cnee + 3. Give X server something to do so that the clients are closed. + $ xinput list + $ xinput list + + As a result RecordUninstallHooks accesses NullClient, because + RecordAClientStateChange doesn't clean the recording clients up + properly. + + Fix RecordUninstallHooks to fail locally on an assertion instead of + much later in privates code, if NullClient is still accessed because + of some other bug. Fix RecordAClientStateChange to iterate through all + contexts so that modifications of the iterated array during iteration + don't cause contexts to be skipped. + + Signed-off-by: Rami Ylimäki + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit 660f6ab5494a728c3ca7ba00c305e9ff06c8ecb2 +Author: Simon Farnsworth +Date: Tue Jun 22 10:13:30 2010 +0100 + + Don't crash when asked if a client that has disconnected was local + + ProcDRI2Dispatch uses LocalClient to determine if it's safe to respond + to a client that has made DRI2 requests which aren't sensible for + remote clients (anything but version). When the client has disappeared + mid-request stream (e.g. as a result of a kill -9, or a client-side + bug), LocalClient causes the X server to follow suit, as + ((OsCommPtr)client->osPrivate)->trans_conn is NULL at this point. + + The simple and obvious fix is to just return "not local" when + trans_conn is NULL, which fixes the crash I was seeing; however Keith + Packard pointed out that just checking trans_conn isn't enough; + quoting Keith: + + "This looks almost right to me -- I reviewed the os code to see when + _XSERVTransClose is called (which is what frees the trans_conn data) and + found that every place which called that immediately set trans_conn to + NULL, except for the call in CloseDownFileDescriptor which is only + called from CloseDownConnection and which is immediately followed by + freeing the OsCommRec and setting client->osPrivate to NULL. So, I'd + suggest checking client->osPrivate in addition to the above check." + + Signed-off-by: Simon Farnsworth + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit 82d41ada993d8cbdcdfea878d1a5b031afe4e593 +Author: Dave Airlie +Date: Mon Jun 21 16:33:55 2010 +1000 + + composite: fix freeing of old pixmap until after move/resize/cbw (bug 28345) + + The fixes for the composite reallocation failure, were freeing the oldpixmap + straight after reallocating the new one, however this led to some wierd + effects in e16 compositing, and I think in a few other places. This patch + moves the freeing of the pixmap into the post wrapped stage. I'm not sure if + we are actually better off breaking ABI and adding another callback from the + ConfigureWindow to composite to make sure the old pixmap is always freed, + but this should be satisfactory as we should always hit one of the freeing + paths or else its a bug in the DIX. + + bug: https://bugs.freedesktop.org/show_bug.cgi?id=28435 + + Reported-by: Andrew Randrianasulu + Signed-off-by: Dave Airlie + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit c6bc52cb6663138d1273447cb7661fa6e958f539 +Author: Dave Airlie +Date: Mon Jun 21 14:08:50 2010 +1000 + + dri2: avoid crash with old dri drivers. + + I built latest server and copied over a mesa 7.8 dri2 driver to use with it, + and it crashed in here starting compiz. Looks like we need to validate the + flush extension is registered before calling invalidate. + + Signed-off-by: Dave Airlie + Reviewed-by: Michel Dänzer + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit 80d1a548d6ce73c2ff097536c1bc7044bf74965d +Author: Dave Airlie +Date: Mon Jun 21 10:05:08 2010 +1000 + + rotation: fix cursor and overlap of one pixel. + + Commit 77c7a64e8885696665556c9fbcb3cffb552e367a was introduced to fix + a cursor off by one on Intel hw, however it also move the whole crtc + into an off by one position and you could see gnom-eshell overlapping. + + This commit reverts that and instead fixes the cursor hotspot + translation to work like pixman does. We add 0.5 to the cursor vector + before translating, and floor the value afterwards. + + Thanks to Soeren (ssp) for pointing out where the real problem was + after explaning how pixman translates points. + + Signed-off-by: Dave Airlie + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit 32c706c4ffd7433dbfc79dba8785b1510d2f053f +Author: Gaetan Nadon +Date: Sun Jun 20 20:37:26 2010 -0400 + + config: declare xserver private dependencies in xorg-server.pc + + Any module (drivers) depending on xserver also depends on some of the + server private dependencies. Any driver including xf86.h depends on + xext, kbproto, inputproto and randr. + + These dependencies are in separate packages, so anything can happen, + removal, wrong version, etc... and the driver fails during compilation. + Having the private dependencies declared will ensure all packages the + server depends on are present and at the correct version. + + Currently each module attempts to check for server dependencies with + various degrees of accuracy. With this patch, the driver will only need + to check for its own explicit dependencies. + + Now that xproto is included in Requires.private it is removed from Requires. + All the cflags from both Requires and Requires.private are returned + to caller to pkg-config. + + Reviewed-by: Dan Nicholson + Signed-off-by: Gaetan Nadon + Signed-off-by: Keith Packard + +commit 37734ba79ca3a9bad1c1e29d89710c8f9c299210 +Author: Colin Harrison +Date: Wed Jun 16 18:07:04 2010 +0100 + + XWin: Fixes for devPrivates API change + + Fix some typos in devPrivates API changes in XWin code. + Move allocation of private keys as it's no longer valid to do them during OsVendorInit() + + Signed-off-by: Jon TURNEY + Reviewed-by: Jamey Sharp + Signed-off-by: Keith Packard + +commit f7dae972aac28c5792566e997c40254e787d246a +Author: Ville Syrjälä +Date: Tue Jun 15 23:25:34 2010 +0300 + + xv: Don't send port notify when SetPortAttribute fails + + Currently a port notify event is sent even if SetPortAttribute + fails. Furthermore the value field in the event will contain the + value that was specified in the failed request. So any client + interested in the actual value of the attribute will have to + double check the current value with GetPortAttribute after + receiving a port notify event. + + Fix the problem by sending port notifications only when + SetPortAttribute succeeds. + + Signed-off-by: Ville Syrjälä + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit c20166739603f86888f28ca2c65f5cf474d0d8c9 +Author: Mikhail Gusarov +Date: Sat Jun 12 01:05:07 2010 +0700 + + os: Remove unused dev_tty_from_init variable + + Signed-off-by: Mikhail Gusarov + Reviewed-by: Jamey Sharp + +commit 2e15f1903dac8473285ad2937c079a08cf7c5d31 +Author: Mikhail Gusarov +Date: Sat Jun 12 00:53:38 2010 +0700 + + os: Remove unused pread/pwrite/lockit functions + + Signed-off-by: Mikhail Gusarov + Reviewed-by: Jamey Sharp + +commit 9120e58556014e514eef9dfe43cdea4b74dc66ae +Author: Mikhail Gusarov +Date: Sat Jun 12 00:30:27 2010 +0700 + + mi: Remove unused overlay support + + The only reference to it in server and drivers is in XAA overlay code which + would segfault as no miInitOverlay is called ever. No segfaults were observed + "in wild", so XAA overlay is probably also unused. + + XAA code is modified to act as if miOverlayCopyUnderlay always returned false, + because XAACopyWindow8_32 could only set doUnderlay to true if it's called from + miOverlayMoveWindow or miOverlayResizeWindow, which can only be called if + miInitOverlay has hooked those functions, and no driver (on fd.o) or server code + calls that. + + Signed-off-by: Mikhail Gusarov + Reviewed-by: Jamey Sharp + +commit 91b5aadbdfd9d05ca1ffdeb443e602ecdba1e04d +Author: Mikhail Gusarov +Date: Fri Jun 11 20:20:00 2010 +0700 + + mi: do not use X11/extensions/shape.h header from libXext + + Signed-off-by: Mikhail Gusarov + Tested-by: Dan Nicholson + +commit b8615d592700b7be319c04cc0563fdeb5a266534 +Author: Alan Coopersmith +Date: Sat Jun 12 08:19:16 2010 -0700 + + Don't coredump on "X -showopts" (bug 25874) + + Don't try walking the xf86ConfigLayout.screens table if it's empty + https://bugs.freedesktop.org/show_bug.cgi?id=25874 + + Signed-off-by: Alan Coopersmith + Reviewed-by: Tiago Vignatti + Signed-off-by: Keith Packard + +commit 32fd57509c3e06f63ac6b0ad607767fd2b688e5a +Author: Rami Ylimäki +Date: Fri Jun 18 12:40:58 2010 +0300 + + record: Register client private to prevent crash. + + Running the following command causes an assertion to fail: + cnee --record --request-range 1-127 + + 3 in dixGetPrivateAddr at ../../include/privates.h:122 + 4 in dixGetPrivate at ../../include/privates.h:137 + 5 in dixLookupPrivate at ../../include/privates.h:167 + 6 in RecordInstallHooks at ../../record/record.c:911 + 7 in ProcRecordEnableContext at ../../record/record.c:2377 + 8 in ProcRecordDispatch at ../../record/record.c:2571 + 9 in Dispatch at ../../dix/dispatch.c:432 + 10 in main at ../../dix/main.c:289 + + Signed-off-by: Rami Ylimäki + Reviewed-by: Oliver McFadden + Reviewed-by: Tiago Vignatti + Signed-off-by: Keith Packard + +commit 75beadd766fed7b12a76e59e57c244e297c2d2cb Author: Mario Kleiner Date: Sun Jun 13 18:05:26 2010 +0200 @@ -42,9 +2317,8 @@ Date: Sun Jun 13 18:05:26 2010 +0200 Signed-off-by: Mario Kleiner Reviewed-by: Jesse Barnes Signed-off-by: Keith Packard - (cherry picked from commit 75beadd766fed7b12a76e59e57c244e297c2d2cb) -commit 557301d5c7631e84ad769e6f40a3172a3fdd2369 +commit 868bf3de478fac0080d525137fc728c551c78ea6 Author: Peter Hutterer Date: Tue Jun 15 13:22:20 2010 +1000 @@ -53,8 +2327,66 @@ Date: Tue Jun 15 13:22:20 2010 +1000 Yay for readability. Signed-off-by: Peter Hutterer + Reviewed-by: Fernando Carrijo -commit e50f84d69811baea04ef559d846e4588c4bc4c8e +commit db0d3d4e573c93a8af43499682ed788c7bd0d70d +Author: Xiaoyang Yu (Max) +Date: Fri Jun 4 17:17:53 2010 +0800 + + Re-enabled Xnest fix for focus in + modifier bug. + + * See https://bugs.freedesktop.org/show_bug.cgi?id=3030 + + Signed-off-by: Xiaoyang Yu (Max) + Reviewed-by: Mikhail Gusarov + + This takes the xnest way of working around this (see + 5904ef2ccd6056b187ca76f104c21e2d686bfc1d "xnest: restore + xnestUpdateModifierState") and copies it to Xephyr. + + Signed-off-by: Peter Hutterer + +commit 505724c5f3e4fc1475fa54f20d08c0c06fb32443 +Author: Keith Packard +Date: Mon Jun 7 16:28:34 2010 -0700 + + In DRI2Connect, check to see if DRI2 has been initialized (bug 28424) + + This prevents DRI2GetScreen from being invoked with an uninitialized + private key which would cause an assert failure. + + Signed-off-by: Keith Packard + Tested-by: David Ronis + +commit 68a9ee8370e6f9b38218376ac92d5130a5b0ef1e +Author: Keith Packard +Date: Fri May 7 22:56:04 2010 -0700 + + Clean up RandR12 bits on screen close (bug 27114) + + When resetting the server, pScrn->EnterVT must be unwrapped or the + next server generation will end up wrapping the wrapper and causing an + infinite recursion on EnterVT. + + Signed-off-by: Keith Packard + Tested-by: Michael Stapelberg + +commit d5ab717768524c8552b81607aaeffb447ab268ee +Author: Keith Packard +Date: Thu Jun 10 19:21:18 2010 -0700 + + Bump to 1.8.99.901 -- 1.9 RC1 + + Signed-off-by: Keith Packard + +commit a41d6e9bffbe56cfa1c3b84388a3d9f5a982f1a9 +Merge: 7e8f100 f4190fe +Author: Keith Packard +Date: Fri Jun 11 10:08:13 2010 -0700 + + Merge remote branch 'dottedmag/for-keithp' + +commit 7e8f1001217326cc451974bacf25275420c4bb4e Author: Éric Piel Date: Fri Jun 11 09:16:32 2010 -0700 @@ -85,9 +2417,201 @@ Date: Fri Jun 11 09:16:32 2010 -0700 Signed-off-by: Éric Piel Reviewed-by: Michel Dänzer Signed-off-by: Keith Packard - (cherry picked from commit 7e8f1001217326cc451974bacf25275420c4bb4e) -commit 75c1ba8b4fd0cbf5a6eb41fefc4ec728790589df +commit f4190feb25ecc3d8278decc8bf28a5ef0e568942 +Author: Matt Turner +Date: Thu Jun 10 04:08:54 2010 +0700 + + Remove more superfluous if(p) checks around free(p) + + Reviewed-by: Alan Coopersmith + Signed-off-by: Matt Turner + Signed-off-by: Mikhail Gusarov + +commit 89bd05106e5823fc5cfca9abf082729f2444363b +Author: Matt Turner +Date: Fri Jun 4 21:09:35 2010 -0400 + + record: move free() to after last use of pContext + + No functional change, since free doesn't change the value of the pointer + passed to it, but it makes this code less confusing. + + Reviewed-by: Jamey Sharp + Signed-off-by: Matt Turner + +commit a54a766dfb39fb3df671045878ac706215d83cef +Author: Mikhail Gusarov +Date: Mon Jun 7 03:19:03 2010 +0700 + + xkb: replace xstrdup with strdup in Win32System + + The only caller of Win32System is XkbDDXCompileKeymapByNames. Add allocation + check there to avoid passing NULL pointers to various functions down the code. + + Signed-off-by: Mikhail Gusarov + Reviewed-by: Peter Hutterer + +commit 6e7417c342b0624e3f3c5686bb43026786423692 +Author: Mikhail Gusarov +Date: Fri Jun 4 17:05:35 2010 +0700 + + config: Replace xstrdup with strdup in add_option() + + All callers of add_option pass string literal as "key" argument + except one, where non-NULL condition is guarded by if(). + + Signed-off-by: Mikhail Gusarov + Reviewed-by: Alan Coopersmith + +commit e4570f5db5157f4233454c938733a2a0d6a1cb8f +Author: Mikhail Gusarov +Date: Fri Jun 4 17:01:42 2010 +0700 + + xfree86: Get rid of xstrdup when argument is definitely non-NULL + + ditto for XFree86 + + Signed-off-by: Mikhail Gusarov + Reviewed-by: Alan Coopersmith + +commit 416d228481d71204cf9bfad3ab4773abc4757f79 +Author: Mikhail Gusarov +Date: Fri Jun 4 17:01:25 2010 +0700 + + xquartz: Get rid of xstrdup when argument is definitely non-NULL + + ditto for XQuartz + + Signed-off-by: Mikhail Gusarov + Reviewed-by: Alan Coopersmith + +commit eea286f2b9e4b1acf2b1c9800f5a4bc7c3fa968d +Author: Mikhail Gusarov +Date: Fri Jun 4 17:01:05 2010 +0700 + + xwin: Get rid of xstrdup when argument is definitely non-NULL + + ditto for XWin + + Signed-off-by: Mikhail Gusarov + Reviewed-by: Alan Coopersmith + +commit dd45b7d74696cd4fe9545852640a3c2e66a808fd +Author: Mikhail Gusarov +Date: Fri Jun 4 17:00:46 2010 +0700 + + kdrive: Get rid of xstrdup when argument is definitely non-NULL + + ditto for Kdrive + + Signed-off-by: Mikhail Gusarov + Reviewed-by: Alan Coopersmith + +commit 16158366954d945db6263f6de505fc02ee03c6cd +Author: Mikhail Gusarov +Date: Fri Jun 4 17:00:15 2010 +0700 + + dmx: Get rid of xstrdup when argument is definitely non-NULL + + ditto for DMX + + Signed-off-by: Mikhail Gusarov + Reviewed-by: Alan Coopersmith + +commit 6592db6bb526f0c43b4c7b55859c629709e039b4 +Author: Mikhail Gusarov +Date: Fri Jun 4 16:58:58 2010 +0700 + + Get rid of xstrdup when argument is definitely non-NULL + + Replace xstrdup with strdup when either constant string is + being duplicated or argument is guarded by conditionals and + obviously can't be NULL + + Signed-off-by: Mikhail Gusarov + Reviewed-by: Alan Coopersmith + +commit 620ca54aaa0b363fcf68cec1bd6c37e68c988352 +Merge: fd69234 8ff9b50 +Author: Keith Packard +Date: Thu Jun 10 19:18:53 2010 -0700 + + Merge remote branch 'alanc/master' + +commit fd69234db004e98c663f5c6c4360d2cecaa8a4df +Author: Keith Packard +Date: Sun Jun 6 15:21:28 2010 -0700 + + Ignore RandR timestamps harder + + Checking timestamps in post 1.1 randr requests was never a good idea, + let's ignore them and just make the configuration changes. + + Signed-off-by: Keith Packard + Acked-by: Chase Douglas + +commit a8ec9eca850f2a7ad4c5cf31c1c011c120688496 +Author: Keith Packard +Date: Mon Jun 7 13:39:11 2010 -0700 + + Fix a couple more possible errors with input-only windows + + Using type == DRAWABLE_WINDOW to differentiate between pixmaps and + windows isn't sufficient as input-only windows will end up in the + pixmap case. This patch changes a few more code paths to use + WindowDrawable instead. + + Signed-off-by: Keith Packard + Reviewed-by: Jamey Sharp + +commit 8ff9b502cfce3828f7855ffba7949d6ebee34031 +Author: Alan Coopersmith +Date: Fri Jun 4 08:44:02 2010 -0700 + + Solaris: avoid memory leak if AGPIOC_INFO ioctl fails + + Move malloc after ioctl, so we don't have to worry about free'ing the + memory if the ioctl fails. + + [ This bug was found by the Parfait bug checking tool. + For more information see http://research.sun.com/projects/parfait ] + + Signed-off-by: Alan Coopersmith + Reviewed-by: Mikhail Gusarov + +commit c5eb5d69e5183860185a05cfcce16af635cab9aa +Author: Alan Coopersmith +Date: Thu Jun 3 19:28:43 2010 -0700 + + Record some additional library dependencies in xf86 modules + + Helps with symbol resolution when building with -z defs + + Signed-off-by: Alan Coopersmith + Reviewed-by: Dan Nicholson + +commit 1c08a37e0eb4746e8974eb7a70ca4b7b84712963 +Author: Sam Lau +Date: Thu Jun 3 19:17:14 2010 -0700 + + SecurityResource should not segfault when client owning resource has exited + + Fixes OpenSolaris bug 6949754: + Xorg crashes when the magnifier is enabled at gdm login greeter window. + http://bugs.opensolaris.org/bugdatabase/view_bug.do?bug_id=6949754 + + Signed-off-by: Alan Coopersmith + Reviewed-by: Eamon Walsh + +commit 07a093add0b7e40c4d9b9b59273e3ff9e14a88a7 +Merge: 84190d2 dc61448 +Author: Keith Packard +Date: Thu Jun 10 18:39:10 2010 -0700 + + Merge remote branch 'whot/for-keith' + +commit dc614484f93b67e8b62dbb1bb2fd247fe5a4c850 Author: Peter Hutterer Date: Thu Jun 10 12:21:36 2010 +1000 @@ -118,11 +2642,167 @@ Date: Thu Jun 10 12:21:36 2010 +1000 Signed-off-by: Peter Hutterer Acked-by: Daniel Stone - (cherry picked from commit dc614484f93b67e8b62dbb1bb2fd247fe5a4c850) -commit 421f5dfdd8b566dc07b4606f0edec487b3ead3d9 +commit 7805e45284264b4cd286eece02e85426896e9f7b Author: Peter Hutterer -Date: Fri Jun 11 11:08:31 2010 +1000 +Date: Thu Jun 10 14:31:48 2010 +1000 + + config: remove redundant DBUS API define, require dbus-1 >= 1.0 + + It's still being pulled in by the HAL CFLAGS but the requirement to define + this was dropped from DBus pre 1.0 (November 2006). + This means we require dbus 1.0 now. + + Signed-off-by: Peter Hutterer + Reviewed-by: Daniel Stone + Reviewed-by: Dan Nicholson + +commit 66b21b2f455a1dfbc92f7caa571dcff3f3765808 +Author: Dan Nicholson +Date: Mon Jun 7 20:39:58 2010 -0700 + + xfree86: Match devices based on current driver setting + + Often we want to apply a driver specific option to a set of devices and + don't care how the driver was selected for that device. The MatchDriver + entry can be used to match the current driver string: + + MatchDriver "evdev|mouse" + Option "Emulate3Buttons" "yes" + + The driver string is a case sensitive match. + + Signed-off-by: Dan Nicholson + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit a71bdff47d4cc80da6ceeb548db1dcc8e8b59702 +Author: Dan Nicholson +Date: Mon Jun 7 20:39:57 2010 -0700 + + xfree86: Allow multiple InputClass Match* entries for && matching + + Currently when there multiple InputClass entries of the same type, only + the last entry is used and the previous ones are ignored. Instead, + multiple entries are used to create multiple matching conditions. + + For instance, an InputClass with + + MatchProduct "foo" + MatchProduct "bar" + + will require that the device's product name contain both foo and bar. + This provides a complement to the || style matching when an entry is + split using the "|" token. + + The xorg.conf man page has added an example to hopefully clarify the two + types of compound matches. + + Signed-off-by: Dan Nicholson + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 842625928632ae767b0689fcdb5103c1779a4c91 +Author: Dan Nicholson +Date: Mon Jun 7 20:39:56 2010 -0700 + + config: Script to convert HAL fdi settings to InputClass sections + + In the new world of udev and InputClass, x11_* settings from HAL fdi + files will not be honored. This script converts those settings into + valid InputClass sections that can be dropped into xorg.conf.d. + + Signed-off-by: Dan Nicholson + Signed-off-by: Peter Hutterer + +commit 87a1507da7e7788232d74285ef377b67b70e0fa4 +Author: Dan Nicholson +Date: Thu Jun 10 06:15:41 2010 -0700 + + xfree86: Match devices based on USB ID + + Sometimes the vendor and product names aren't specific enough to target + a USB device, so expose the numeric codes in the ID. A MatchUSBID entry + has been added that supports shell pattern matching when fnmatch(3) is + available. For example: + + MatchUSBID "046d:*" + + The IDs are stored in lowercase hex separated by a ':' like "lsusb" or + "lspci -n". + + Signed-off-by: Dan Nicholson + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 645679c1523eee7028f3244cee57936b93326a2a +Author: Dan Nicholson +Date: Thu Jun 10 06:11:10 2010 -0700 + + xfree86: Match devices based on PnP ID + + Serial input devices lack properties such as product or vendor name. This + makes matching InputClass sections difficult. Add a MatchPnPID entry to + test against the PnP ID of the device. The entry supports a shell pattern + match on platforms that support fnmatch(3). For example: + + MatchPnPID "WACf*" + + A match type for non-path pattern matching, match_pattern, has been added. + The difference between this and match_path_pattern is the FNM_PATHNAME + flag in fnmatch(3). + + Signed-off-by: Dan Nicholson + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 84190d20954ef7888e4d96832c2a4b3225b4dfa2 +Merge: 4172aa1 5e1ef1f +Author: Keith Packard +Date: Thu Jun 10 13:36:35 2010 -0700 + + Merge remote branch 'jeremyhu/master' + +commit 4172aa137c1b9b6f2a25c320d847af1f5ac56fba +Author: Keith Packard +Date: Thu Jun 10 07:15:49 2010 -0700 + + dri2: Only deal with output windows and pixmaps. + + This reverts commit fdb081b430ddffb495aa5b05bcc4cf10882ff4b2 + "dri2: Deal with input-only windows by using WindowDrawable()" + and replaces it as follows: + + Reject the creation of a DRI2 drawable for UNDRAWABLE_WINDOW (input-only + windows) and DRAWABLE_BUFFER (whatever those are) drawables and only look up + privates for the supported drawable types. + + The rest of the the code can continue pretending there's only output windows + and pixmaps, which are the only kinds of drawables relevant for DRI2. + + Fixes server crash with GLX compositing managers such as compiz or kwin, due + to looking up a window private for a pixmap and getting a bogus pointer. + + Signed-off-by: Michel Dänzer + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit 353e32d3712f3a883a796ba562ec9fb5a8354837 +Author: Jamey Sharp +Date: Sun Jun 6 06:42:11 2010 -0700 + + glxdriswrast bugfix: configure swapgc, not gc. + + I got this wrong in e2929db7b737413cf93fbebdf4d15abdfebff05c. + + Signed-off-by: Jamey Sharp + Cc: Kristian Høgsberg + Reviewed-by: Dan Nicholson + Signed-off-by: Keith Packard + +commit b3548612c7943011f79a910f9a59bb975984d8a6 +Author: Mario Kleiner +Date: Sat Jun 5 13:09:28 2010 +0200 DRI2: Don't return junk reply instead of blocking in glXWaitForSbcOML() @@ -140,15 +2820,615 @@ Date: Fri Jun 11 11:08:31 2010 +1000 Signed-off-by: Mario Kleiner Reviewed-by: Jesse Barnes Signed-off-by: Keith Packard - (cherry picked from commit b3548612c7943011f79a910f9a59bb975984d8a6) - - Conflicts: - - hw/xfree86/dri2/dri2ext.c -commit f85552aa452d5f575fee9f6031a33ca79bdc3cc8 +commit 7287ef9e6cf953066e4a092cca9d0e4a279172bf +Author: Mikhail Gusarov +Date: Sun Jun 6 21:18:40 2010 +0700 + + Remove unnecessary parentheses around return values in functions + + This patch was generated by the following Perl code: + + perl -i -pe 's/([^_])return\s*\(\s*([^(]+?)\s*\)s*;(\s+(\n))?/$1return $2;$4/g;' + + Signed-off-by: Mikhail Gusarov + Reviewed-by: Jamey Sharp + Reviewed-by: Daniel Stone + Signed-off-by: Keith Packard + +commit d1b4beecbc16448282dcc825dd5c354e96e48eca +Author: Dan Nicholson +Date: Mon Jun 7 20:39:53 2010 -0700 + + xfree86: Add MatchOS InputClass entry for operating system matching + + Allow InputClass sections to match against the running operating system + to narrow the application of rules. An example where this could be used + is to specify that the default input driver on Linux is evdev while it's + mouse/kbd everywhere else. + + The operating system name is the same as `uname -s`, and matching is + case-insensitive. + + Signed-off-by: Dan Nicholson + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 9b30fa9f8fedb7ddb5672f93ed1a154d13578c47 +Author: Dan Nicholson +Date: Mon Jun 7 20:39:52 2010 -0700 + + xfree86: Refactor InputClass matching code + + InputClassMatches was starting to get a little hairy with all the loops + over the tokenized match strings. This adds code, but makes it easier to + read and add new matches. + + Signed-off-by: Dan Nicholson + Reviewed-by: Jamey Sharp + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit d09bc8f8e5bb92899f7c90eab6b0907920c7d643 +Author: Dan Nicholson +Date: Mon Jun 7 20:39:51 2010 -0700 + + xfree86: Constify InputClass functions + + Signed-off-by: Dan Nicholson + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 61c35d8ac4b6423caf2dcecb4ff25baaaaa14b1c +Author: Dan Nicholson +Date: Mon Jun 7 20:39:50 2010 -0700 + + config/hal: Missing newline in log message + + Signed-off-by: Dan Nicholson + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 697c5b010d7f6df0ec9cae6352b125c4cbdbaad3 +Author: Dan Nicholson +Date: Mon Jun 7 20:39:49 2010 -0700 + + config/udev: Add verbose info when fetching udev properties + + Give the user a chance to see why their input devices are being ignored, + even if they have to start the server with -logverbose. + + Signed-off-by: Dan Nicholson + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 94547b2d1448232ae316c228d65482cc0b646ac2 +Author: Dan Nicholson +Date: Mon Jun 7 20:39:48 2010 -0700 + + config/hal: don't leak the input.tags property + + Signed-off-by: Julien Cristau + Reviewed-by: Dan Nicholson + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + +commit 5e1ef1f4dde4615498c1c5e7a4e422c3b3432fe8 +Author: Jeremy Huddleston +Date: Tue Jun 8 13:01:10 2010 -0700 + + XQuartz: Add more sanity checking around string manipulation for xmodmap + + Signed-off-by: Jeremy Huddleston + +commit 0be81f9a163f2838448caee41b2dda274d73391a +Author: Jeremy Huddleston +Date: Sun Jun 6 16:31:19 2010 -0700 + + XQuartz: Fix build regression from faeebead7bfcc78535757ca7acc1faf7554c03b7 + + Signed-off-by: Jeremy Huddleston + +commit b3a7b229e1e1f212bdd185af5443311091824005 +Author: Keith Packard +Date: Mon Jun 7 21:49:43 2010 -0700 + + Make DRI_SCREEN_PRIV just return NULL when DRI isn't initialized + + The code relied upon the previous devPrivate implementation which + offered this convenience. + + Signed-off-by: Keith Packard + +commit f7af00e9f0e0e1d854b0e882378c032518ab71ca +Author: Ben Skeggs +Date: Mon Jun 7 10:21:18 2010 +1000 + + randr: prevent an unnecessary screen resize with multiple displays + + crtc->{x,y} is always 0 when xf86DefaultScreenLimits() is called, so we + calculate too small an area for the initial framebuffer and force a resize + to happen. + + This commit fixes the code to use desired{X,Y} instead, which contains the + initial output positions. + + Signed-off-by: Ben Skeggs + Reviewed-by: Dave Airlie + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit 8e97e5f9425639ad0a084150d0b232cad417595d +Author: Keith Packard +Date: Mon Jun 7 14:23:47 2010 -0700 + + If XTest is always required, then eliminate the XTest devPrivate + + The internals of XTest are used by Xi and Xkb, and both Xi and Xkb are + always required, so it makes little sense to have XTest place data in + a devPrivate, especially a devPrivate which is only available when the + XTest extension is enabled. + + Signed-off-by: Keith Packard + Reviewed-by: Peter Hutterer + +commit fdb081b430ddffb495aa5b05bcc4cf10882ff4b2 +Author: Keith Packard +Date: Mon Jun 7 00:54:18 2010 -0700 + + dri2: Deal with input-only windows by using WindowDrawable() + + Input only windows aren't DRAWABLE_WINDOW, but casting them to a + PixmapPtr is a bit harsh, and unlikely to get the appropriate privates + structure. use WindowDrawable instead which checks for both + input-output and input-only windows. + + Signed-off-by: Keith Packard + Tested-by: Eric Anholt + +commit bc26665661565918af484ccd17caad951010df60 +Author: Keith Packard +Date: Sun Jun 6 20:45:53 2010 -0700 + + Initialize private keys in test suite + + Make sure all of the private keys used by the test code are + initialized before being used. + + Signed-off-by: Keith Packard + Tested-by: Robert Hooker + +commit f03be727d647183a2176355ad0ac9a6735067be9 +Author: Keith Packard +Date: Sun Jun 6 16:04:42 2010 -0700 + + Place glyph privates at correct location within the allocate storage + + A glyph allocation consists of : + + GlyphRec + numScreens * PicturePtr + glyph privates + + Tell the dix private bits to start past the picture pointers. + + Signed-off-by: Keith Packard + Reviewed-by: Chris Wilson + +commit 67b824a81bb8254827023de351a4a094031f0e94 +Author: Mikhail Gusarov +Date: Sun Jun 6 20:37:07 2010 +0700 + + randr: Make deletion of output properties more robust + + Previously there was two branches of code with small discrepancies between them + (especially prop->valid_values field was not free(3)ed). Extract the common + routine and fix double-free prop->valid_values in RRDestroyOutputProperty by + the way. + + Signed-off-by: Mikhail Gusarov + Reviewed-by: Jamey Sharp + +commit 0a4d8cbdcd7b25313fb29ccdb498044af95f7de6 +Author: Mikhail Gusarov +Date: Sun Jun 6 15:28:30 2010 +0700 + + Remove more superfluous if(p) checks around free(p) + + This patch has been generated by the following Coccinelle semantic patch: + + @@ + expression E; + @@ + + -if(E) { free(E); } + +free(E); + + Signed-off-by: Mikhail Gusarov + Reviewed-by: Julien Cristau + Reviewed-by: Fernando Carrijo + Reviewed-by: Matt Turner + +commit 5a0fc0ad21d562612676ef88ef2d533b2391810a +Author: Mikhail Gusarov +Date: Fri Jun 4 15:35:31 2010 +0700 + + Replace deprecated bzero with memset + + Signed-off-by: Mikhail Gusarov + Reviewed-by: Marcin Baczyński + Reviewed-by: Daniel Stone + Reviewed-by: Alan Coopersmith + Reviewed-by: Matt Turner + +commit f9810ba914877b379cb36f1b9755f7923ceca14c +Author: Mikhail Gusarov +Date: Fri Jun 4 14:26:31 2010 +0700 + + xkb: Remove superfluous if(x) x = realloc(x, sz); else x = malloc(sz); logic + + Signed-off-by: Mikhail Gusarov + Reviewed-by: Marcin Baczyński + Reviewed-by: Alan Coopersmith + Reviewed-by: Matt Turner + Reviewed-by: Daniel Stone + +commit 77ea20895ca1d163e14c6b767d8c287c94ba3114 +Author: Mikhail Gusarov +Date: Fri Jun 4 14:22:06 2010 +0700 + + xkb: Remove superfluous if(p) checks around free(p) + + Signed-off-by: Mikhail Gusarov + Reviewed-by: Julien Cristau + Reviewed-by: Alan Coopersmith + Reviewed-by: Daniel Stone + +commit 5d4e2c594059ffb536c8e506c2623320d3c6a787 +Merge: eacc421 793dd39 +Author: Keith Packard +Date: Sat Jun 5 22:20:28 2010 -0700 + + Merge remote branch 'jamey/for-keith' + +commit 793dd399468ff3ba22ffa9c62fa54fc87261fbe7 +Author: Jamey Sharp +Date: Tue May 25 15:08:38 2010 -0700 + + dmx: Split glx scalar swap variables from array swap variables. + + This makes hw/dmx/glxProxy/unpack.h more closely resemble glx/unpack.h, + and fixes the "unused variable 'swapEnd'" and "unused variable 'swapPC'" + warnings. + + Signed-off-by: Jamey Sharp + Reviewed-by: Keith Packard + +commit eacc42132ed0f1e8f4a4d65a4b6637ab06f7e2aa +Author: Kim Woelders +Date: Fri Jun 4 20:20:47 2010 +0200 + + dix: Remove test for obsolete NO_XINERAMA_PORT macro. + + Signed-off-by: Kim Woelders + Reviewed-by: Jamey Sharp + Signed-off-by: Keith Packard + +commit a0fe6987b55b5326157b50e169b8d6b9ae26a1ae +Author: Jamey Sharp +Date: Sat Jun 5 20:55:29 2010 -0700 + + Clean up after removal of screen parameters from region macros. + + Signed-off-by: Jamey Sharp + Reviewed-by: Keith Packard + +commit 424b593c7872a703d3d0c942b7e8acc0770eb023 +Author: Keith Packard +Date: Sat Jun 5 21:34:51 2010 -0700 + + Damage pixmap private key was being mis-registered as a picture key + + This would cause all kinds of fun, in particular Xnest would crash at startup. + + Reviewed-by: Jamey Sharp + Signed-off-by: Keith Packard + +commit 9c121ae45ae1d2ebd892c45e1631716ef5e7d649 +Author: Keith Packard +Date: Sat Jun 5 21:34:27 2010 -0700 + + Register Xnest colormap screen private key + + This key is used to store the currently installed colormap and must be + registered before we can use it. + + Reviewed-by: Jamey Sharp + Signed-off-by: Keith Packard + +commit df534d05208436e9ca8c9b42acff3fbe240e3ec4 +Author: Keith Packard +Date: Sat Jun 5 21:24:54 2010 -0700 + + Make GetPictureScreenIfSet check if Render is running + + This macro originally checked to see if the Render screen private + index had been allocated. When the privates were changed the first + time, there wasn't any need to check as dixLookupPrivate would simply + return NULL in that case. Now that we care, check to see if the key + has been initialized before asking for the value. + + Reviewed-by: Jamey Sharp + Signed-off-by: Keith Packard + +commit e7fc8b32e41e10c057d2787fcc377296be67f2e9 +Author: Keith Packard +Date: Sat Jun 5 21:08:01 2010 -0700 + + Move the shadow screen private key initialization to shadowSetup + + Some users of the shadow code don't call shadowInit, just shadowSetup + and so make sure the key is initialized there. + + Reviewed-by: Jamey Sharp + Signed-off-by: Keith Packard + +commit 6bd5f0d75bca727c4686b20eee166c8cae472ba2 +Author: Keith Packard +Date: Sat Jun 5 21:07:15 2010 -0700 + + Fix exa_priv.h declarations of privates + + exa_priv.h exposes the privates to the rest of the exa code, and yet + the declarations of the privates wasn't fixed when the exa.c versions were. + + Reviewed-by: Jamey Sharp + Signed-off-by: Keith Packard + +commit 6b306f43384e5c2143197e746a5a39c4ebb2583c +Author: Keith Packard +Date: Sat Jun 5 20:58:04 2010 -0700 + + kdrive: Xv code uses shared screen private instead of kdrive-specific private + + When doing the devPrivate API conversion, I missed this as there was + also a local private key which wasn't ever used. + + Reviewed-by: Jamey Sharp + Signed-off-by: Keith Packard + +commit ab07e2b8ededaa2193fc199a8c09623d84032280 +Author: Keith Packard +Date: Fri Apr 30 19:38:48 2010 -0700 + + Allocate per-screen device/cursor-bits private keys in midispcur + + midispcur was abusing the CursorScreenKey to index the cursor_bits + privates, it also had a MAXSCREENS array of keys to index device + privates. Switch both of these to the new dixCreatePrivateKey API and + store a pointer to that in the screen private. + + Signed-off-by: Keith Packard + Reviewed-by: Jamey Sharp + +commit 34db537907c6cb2635dbefdce7dcfcae90f7c902 +Author: Keith Packard +Date: Fri Apr 30 19:36:33 2010 -0700 + + Add dixCreatePrivateKey API + + Keys need to persist through server reset so that the private system + can be cleaned up in dixResetPrivates. In particular, this means that + keys cannot live in objects freed at reset time. This API provides + suitable object lifetime by having the privates code free the key in + the reset path. + + Signed-off-by: Keith Packard + Reviewed-by: Jamey Sharp + +commit 495fc3eb2d6c98bde82ae1278f89fcf131fd9bf8 +Author: Keith Packard +Date: Fri Apr 30 19:38:38 2010 -0700 + + Change devPrivates implementation. + + Each key now declares which object type it belongs to, this permits + keys for different types to share the same offset within the allocated + privates. As a special case for XSELinux, a key may be allocated as + PRIVATE_XSELINUX which will allow it to continue to be used across the + relevant object types. + + Signed-off-by: Keith Packard + Reviewed-by: Jamey Sharp + +commit faeebead7bfcc78535757ca7acc1faf7554c03b7 +Author: Keith Packard +Date: Mon Apr 26 17:22:21 2010 -0700 + + Change the devPrivates API to require dixRegisterPrivateKey + + This patch only changes the API, not the implementation of the + devPrivates infrastructure. This will permit a new devPrivates + implementation to be layed into the server without requiring + simultaneous changes in every devPrivates user. + + Signed-off-by: Keith Packard + Tested-by: Tiago Vignatti + +commit c865a24401f06bcf1347d8b41f736a066ab25693 +Author: Keith Packard +Date: Fri Apr 30 22:05:27 2010 -0700 + + Create separate private key for midispcur cursor bits + + The CursorScreenKey array is supposed to be used by the DDX for cursor + private data, but midispcur was abusing it to hold cursor bits private + information. Create a separate set of privates for the dispcur cursor + bits information. + + This also renames the device private index and macros to better + reflect their usage: + + miDCSpriteKey -> miDCDeviceKey + MIDCBUFFER -> miGetDCDevice + + Signed-off-by: Keith Packard + Reviewed-by: Jamey Sharp + +commit 431781a921251d54782f0a4f194bbef1fabd1380 +Author: Keith Packard +Date: Sat May 15 14:52:39 2010 -0700 + + Remove dixRegisterPrivateOffset; hard-code devPrivates offsets instead + + For predefined resource types, the offset of the devPrivates field was + already kept in a constant table. The only non-predefined type needing + this treatment was dbeDrawableResType, which is just a magic alias for + RT_PIXMAP. + + This patch special-cases looking up RC_DRAWABLE offsets and uses the + table directly for everything else. + + Signed-off-by: Keith Packard + Reviewed-by: Jamey Sharp + +commit 7ef612de784daaed09ba13f4615c10714614033f +Author: Keith Packard +Date: Fri May 21 12:35:29 2010 -0700 + + Add REGION_ macros for source compatibility with existing drivers. + + This makes the region code changes source compatible with existing + code, although none of them are used within the server source itself. + + Reviewed-by: Jamey Sharp + Signed-off-by: Keith Packard + +commit 965cade6ee7c226f850e806cb2e910793d1536f9 +Author: Keith Packard +Date: Fri May 21 12:18:22 2010 -0700 + + Change region implementation from macros to inline functions. + + This makes all of the previous macros into inline functions and also + turns all of the direct calls to pixman region code into inline + functions as well. + + Reviewed-by: Jamey Sharp + Signed-off-by: Keith Packard + +commit 2dc138922b7588515d5f2447e4b9dcdc0bef15e0 +Author: Keith Packard +Date: Fri May 21 15:05:48 2010 -0700 + + Rename region macros to eliminate screen argument + + This is a combination of a huge mechanical patch and a few small + fixups required to finish the job. They were reviewed separately, but + because the server does not build without both pieces, I've merged + them together at this time. + + The mechanical changes were performed by running the included + 'fix-region' script over the whole tree: + + $ git ls-files | grep -v '^fix-' | xargs ./fix-region + + And then, the white space errors in the resulting patch were fixed + using the provided fix-patch-whitespace script. + + $ sh ./fix-patch-whitespace + + Thanks to Jamey Sharp for the mighty fine sed-generating sed script. + + The hand-done changes involve removing functions from dix/region.c + that duplicate inline functions in include/regionstr.h, along with + their declarations in regionstr.h, mi.h and mispans.h. + + Reviewed-by: Jamey Sharp + Signed-off-by: Keith Packard + +commit d17e726e89ef644310de77b960b715c2d11088da +Author: Keith Packard +Date: Sat May 22 00:09:47 2010 -0700 + + Move mi/miregion.c to dix/region.c + + Reviewed-by: Jamey Sharp + Signed-off-by: Keith Packard + +commit 9b6f5f549dfe4c20e3cb3c2ef7095ab47abaca3b +Author: Keith Packard +Date: Fri May 21 11:14:59 2010 -0700 + + Change region implementation names to eliminate the 'mi' prefix + + This prepares the file to be moved from mi to dix. This patch + was done mechanically with the included scripts 'fix-miregion' run over + the entire X server and 'fix-miregion-private' run over + include/regionstr.h and mi/miregion.c. + + Reviewed-by: Jamey Sharp + Signed-off-by: Keith Packard + +commit 1768e51976ae8949d999309bd2384ccad72deecd +Author: Jeremy Huddleston +Date: Sat Jun 5 15:58:21 2010 -0700 + + rootless: Fix SetShape regression + + This fixes a regression in miext/rootless from 643cb6e87c10ab554c03ada81930001a8ebcc909 + + Found-by: tinderbox + Signed-off-by: Jeremy Huddleston + Reviewed-by: Pierre-Loup A. Griffais + Signed-off-by: Keith Packard + +commit 6b4af3b7925978cd79f717761f1b6f33bd8dfbaf +Author: Pauli Nieminen +Date: Fri Jun 4 16:27:28 2010 +0300 + + configure: Check for libsha1.pc + + xserver fails to detect libsha1. Problem is that configure checks for + sha1.pc when libsha1 provides libsha1.pc. + + Signed-off-by: Pauli Nieminen + Reviewed-by: Mikhail Gusarov + Signed-off-by: Keith Packard + +commit d163266692235261e1e0cfa6b900f54e6ec63de5 +Author: Alan Coopersmith +Date: Thu Jun 3 18:59:04 2010 -0700 + + Stop searching for XF86Config files + + xorg.conf has been used since the X11R6.7 release in April 2004. + 6 years has been a generous transition period for users to + "mv XF86Config xorg.conf" and for distros to update their + configuration tools and packages. + + Signed-off-by: Alan Coopersmith + Reviewed-by: James Cloos + Signed-off-by: Keith Packard + +commit 01c75522b6ed15e979347acd38e234e2cb9006c3 +Author: Alan Coopersmith +Date: Thu Jun 3 18:59:03 2010 -0700 + + Stop searching for XF86Config files + + xorg.conf has been used since the X11R6.7 release in April 2004. + 6 years has been a generous transition period for users to + "mv XF86Config xorg.conf" and for distros to update their + configuration tools and packages. + + Signed-off-by: Alan Coopersmith + Reviewed-by: James Cloos + Signed-off-by: Keith Packard + +commit 7f19a7a6e90a4fd7b7ec0256974f62e575218541 Author: Peter Hutterer -Date: Fri Jun 11 10:12:52 2010 +1000 +Date: Fri Jun 4 14:15:04 2010 +1000 xkb: fix invalid memory writes in _XkbCopyGeom. @@ -181,13 +3461,323 @@ Date: Fri Jun 11 10:12:52 2010 +1000 Signed-off-by: Peter Hutterer Reviewed-by-and-apologised-for: Daniel Stone Signed-off-by: Keith Packard - (cherry picked from commit 7f19a7a6e90a4fd7b7ec0256974f62e575218541) - - Conflicts: - - xkb/xkbUtils.c -commit 83460a94985faafcf7cd09456e833f381f0e13bc +commit 959a1eaf1c15a691141f1b0dc53757fe9b6e9b13 +Author: Dave Airlie +Date: Fri Jun 4 11:09:46 2010 +1000 + + composite: use config notify hook to do pixmap resize. + + Since reallocating the backing pixmap can fail, we need to try and do + it before any other side effects of reconfiguring the window happen. + + This changes the ConfigNotify hook to return status, and moves the + composite window reconfiguration wrappers to ConfigNotify. They all + basically did the same thing, so we can drop the MoveWindow, + ResizeWindow, ChangeBorderWidth wrappers, and allow ConfigNotify to do + all the work. If reallocation fails we fail before we send any + confiureNotify events, or enter the area we can't recover from. + + The only place we now enforce 32k limits are in EXA/UXA/fb, so drivers + that don't use this should probably deal with it in their pixmap + allocate if they don't already. + + This also breaks ABI, so we need an alternate fix for older servers, + working on the X server makes me realise why I'm a kernel hacker. + + Signed-off-by: Dave Airlie + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit 0f12e86e600522768f5f64eafc1230526e700ab7 +Merge: aa7c09f f114f54 +Author: Keith Packard +Date: Thu Jun 3 15:09:32 2010 -0700 + + Merge remote branch 'jamey/for-keith' + +commit f114f54986aca1add4c8808a05d9692e289547e7 +Author: Jamey Sharp +Date: Fri Apr 23 19:33:49 2010 -0700 + + Accumulate graphics exposures incrementally in PanoramiXCopyArea/Plane. + + This fuses two loops in each function, eliminating an intermediate + MAXSCREENS-sized array from each. + + Aside from being more efficient, I believe this is equivalent to the + previous implementation, since + - each per-screen GC has the graphicsExposures flag set the same way, + and + - the REGION_* macros ignore their screen argument. + + Signed-off-by: Jamey Sharp + Reviewed-by: Keith Packard + Reviewed-by: Tiago Vignatti + Tested-by: Tiago Vignatti (i686 GNU/Linux) + +commit a7c7ebe4b3a0df1a4d1ffe3c690cfb21470f103d +Author: Jamey Sharp +Date: Sat May 22 21:13:48 2010 -0700 + + Delete XineramaScreenRegions cache. + + Every screen region consists of a single rectangle, so initializing a + stack-allocated region for each screen on-demand does no heap allocation + and is fast. + + This eliminates a MAXSCREENS-sized array. + + The REGION_UNINIT calls are no-ops since no boxes are actually allocated + for a single-rectangle region, but it seemed wiser to include them. + + Signed-off-by: Jamey Sharp + Reviewed-by: Tiago Vignatti + Tested-by: Tiago Vignatti (i686 GNU/Linux) + +commit a0456da339fa9b3c3e6fead060338ee7348d6460 +Author: Jamey Sharp +Date: Sun May 23 12:57:52 2010 -0700 + + XineramaSetCursorPosition: use screen bounds directly, not POINT_IN_REGION. + + This hides a MAXSCREENS-sized array as an implementation detail of + panoramiX.c rather than an exported global. + + Signed-off-by: Jamey Sharp + Reviewed-by: Tiago Vignatti + Tested-by: Tiago Vignatti (i686 GNU/Linux) + +commit a83cff9f4d622b069c96a68b4e87a669bf1f6446 +Author: Jamey Sharp +Date: Sun May 23 10:11:47 2010 -0700 + + Move each screen's x/y origin into ScreenRec. + + Many references to the dixScreenOrigins array already had the + corresponding screen pointer handy, which meant they usually looked like + "dixScreenOrigins[pScreen->myNum]". Adding a field to ScreenRec instead + of keeping this information in a parallel array simplifies those + expressions, and eliminates a MAXSCREENS-sized array. + + Since dix declared the dixScreenOrigins array, I figure allocating a + screen private for these values is overkill. + + Signed-off-by: Jamey Sharp + Reviewed-by: Tiago Vignatti + Tested-by: Tiago Vignatti (i686 GNU/Linux) + +commit 217ccaa5a341018457f468a774c035c0df47d918 +Author: Jamey Sharp +Date: Sun May 23 11:05:01 2010 -0700 + + Delete panoramiXdataPtr: it's redundant. + + This eliminates a dynamically-allocated MAXSCREENS-sized array. + + Signed-off-by: Jamey Sharp + Reviewed-by: Tiago Vignatti + Tested-by: Tiago Vignatti (i686 GNU/Linux) + +commit e7fae9ecc42ab5e73b89117722dbf4117d928f9a +Author: Jamey Sharp +Date: Sat May 22 00:26:28 2010 -0700 + + Move each screen's root-window pointer into ScreenRec. + + Many references to the WindowTable array already had the corresponding + screen pointer handy, which meant they usually looked like + "WindowTable[pScreen->myNum]". Adding a field to ScreenRec instead of + keeping this information in a parallel array simplifies those + expressions, and eliminates a MAXSCREENS-sized array. + + Since dix uses this data, a screen private entry isn't appropriate. + + xf86-video-dummy currently uses WindowTable, so it needs to be updated + to reflect this change. + + Signed-off-by: Jamey Sharp + Reviewed-by: Tiago Vignatti + Tested-by: Tiago Vignatti (i686 GNU/Linux) + +commit 80b5d3a3264d2c5167e5ac85a3b04af0f89cece1 +Author: Jamey Sharp +Date: Fri May 21 23:13:51 2010 -0700 + + Move each screen's screensaver data into ScreenRec. + + Most references to the savedScreenInfo array already had the + corresponding screen pointer handy, which meant they usually looked like + "savedScreenInfo[pScreen->myNum]". Adding a field to ScreenRec instead + of keeping this information in a parallel array simplifies those + expressions, and eliminates a MAXSCREENS-sized array. + + Since dix uses this data, a screen private entry isn't appropriate. + + Signed-off-by: Jamey Sharp + Reviewed-by: Tiago Vignatti + Tested-by: Tiago Vignatti (i686 GNU/Linux) + +commit 5030540d6cd2aa9bbd4ecb7f4487616f9ef0140a +Author: Jamey Sharp +Date: Thu May 27 11:50:52 2010 -0700 + + midispcur: Add comment explaining why pRootPicture must not be freed. + + Signed-off-by: Jamey Sharp + Cc: Peter Hutterer + Acked-by: Peter Hutterer + +commit f308cbea8c9fa5c5c6705bc301178b167de450d5 +Author: Jamey Sharp +Date: Mon May 24 18:41:54 2010 -0700 + + mi: Delete unused flicker-free MoveCursor code. + + It's been commented-out for three and a half years and nobody seems to + be missing it enough to resurrect it. + + Besides deleting code that is untested and therefore buggy, this saves a + little memory for each pointer device on each screen. + + Signed-off-by: Jamey Sharp + Reviewed-by: Peter Hutterer + +commit d1bad1b59f24ab4dcf2d1ce1c5d4f42b5fa40bc1 +Author: Jamey Sharp +Date: Tue May 25 14:25:07 2010 -0700 + + dmx: Fix XSetExtensionErrorHandler calls to agree on constness. + + Signed-off-by: Jamey Sharp + Reviewed-by: Alan Coopersmith + +commit aa7c09f7d04d59852b850b2b6993f4cbdc7ec940 +Author: Alan Coopersmith +Date: Wed Jun 2 14:31:56 2010 -0700 + + Install fbdevhw module in normal module directory instead of linux/ + + Since we no longer support OS-independent custom elfloader modules, + we don't need to put the OS-dependent modules into os-specific subdirs + any more. + + We do however still need to install the stubs version of this module + on non-Linux platforms, since a number of drivers link to functions + in it, even when built on non-Linux platforms. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Michel Dänzer + Signed-off-by: Tiago Vignatti + Signed-off-by: Keith Packard + +commit b13d7a8e09c8e3eb5003420c3c0484431e5a052b +Merge: f0ab726 dcceb90 +Author: Keith Packard +Date: Thu Jun 3 07:01:26 2010 -0700 + + Merge remote branch 'vignatti/for-keith' + +commit dcceb90b1dccbbf5793f6ba1ed857013b71dafbc +Author: Tiago Vignatti +Date: Wed May 19 11:45:46 2010 +0200 + + xext: delete wrong source reference from fontcache + + This should go away in 0b45ba48. + + Signed-off-by: Tiago Vignatti + Reviewed-by: Mikhail Gusarov + +commit c043de3261b6e14f2446b2cd9d62dde5860d4720 +Author: Tiago Vignatti +Date: Mon May 3 12:37:25 2010 +0200 + + configure: sha1: check libsha1 using pkg-config instead + + Previously the code was using AC_CHECK_LIB, guaranteeing whether the library + is correct by tracking sha1_begin function. This paranoic checking is not + necessary given there's only one libsha1 in the market, which surely contains + such function. + + Moreover, this patch now improves a bit the sha1 implementation checking + behavior using pkg-config to find the right flags that needs to link against. + + Signed-off-by: Tiago Vignatti + Reviewed-by: Mikhail Gusarov + +commit f0ab726d8966cab4e50154c216d577db79328d77 +Author: Pauli Nieminen +Date: Wed Apr 21 11:07:47 2010 +0300 + + DRI2: Use single error path in initialization + + Signed-off-by: Pauli Nieminen + Reviewed-by: Kristian Høgsberg + +commit 6eef70dc56bcc1e3047e4e488bcd6ae62c8ffac6 +Author: Tiago Vignatti +Date: Fri Jan 22 18:34:36 2010 +0200 + + DRI2: Allow building without libdrm + + Some drivers use DRI protocol but implement their own kernel rendering + manager. For these drivers, libdrm becomes useless. --disable-libdrm + configure parameter can be used to disable libdrm support in dri2. + + To provide ABI/API compatibility for libdrm based drivers, libdrm call + is wrapped in ifdef. + + Signed-off-by: Tiago Vignatti + Signed-off-by: Pauli Nieminen + Reviewed-by: Kristian Høgsberg + +commit cdcb575664d3d60b662c542e782de83a047165c9 +Author: Tiago Vignatti +Date: Fri Jan 22 17:58:17 2010 +0200 + + DRI2: add AuthMagic hook for driver side support + + With this new hook, drmAuthMagic becomes useless and should be deprecated. + You might want to implement AuthMagic on driver side instead. + + Signed-off-by: Tiago Vignatti + Signed-off-by: Pauli Nieminen + Reviewed-by: Kristian Høgsberg + +commit 643cb6e87c10ab554c03ada81930001a8ebcc909 +Author: Pierre-Loup A. Griffais +Date: Thu May 27 09:11:50 2010 -0700 + + Only deal with input code when changing the input shape. + + Propagate the shape kind all the way to SetShape to avoid performing non-input + operations such as revalidating the tree and generating exposures when only + changing a window's input shape. + + Signed-off-by: Pierre-Loup A. Griffais + Acked-by: Aaron Plattner + Reviewed-by: Daniel Stone + Signed-off-by: Keith Packard + +commit d90f2cd98a97e6534792d3867b3fba70d850b706 +Author: Chris Wilson +Date: Thu May 27 13:26:23 2010 +0100 + + xfree86: Unbreak autoconfig following 0abf065e38c4 + + The move of the PCI device id probing into a separate file neglected to + return the number of found devices, and so the PCI devices were being + overwritten by the default entries for vesa and fbdev. + + Signed-off-by: Chris Wilson + Cc: Tiago Vignatti + Cc: Alex Deucher + Reviewed-by: Julien Cristau + Reviewed-by: Tiago Vignatti + Signed-off-by: Keith Packard + +commit 1304b8b27cb12c803c4f51f04cb6f9d508b82c69 Author: Aaron Plattner Date: Fri May 28 09:35:54 2010 -0700 @@ -208,9 +3798,8 @@ Date: Fri May 28 09:35:54 2010 -0700 Signed-off-by: Aaron Plattner Reviewed-by: Jamey Sharp Signed-off-by: Keith Packard - (cherry picked from commit 1304b8b27cb12c803c4f51f04cb6f9d508b82c69) -commit 14dc68c2655ea033d102ebfc2cb6a368fc0c330f +commit 91a6359caf24d94343ff76f43ea7b7fc3223203d Author: Dave Airlie Date: Thu Jun 3 12:16:40 2010 +1000 @@ -221,9 +3810,8 @@ Date: Thu Jun 3 12:16:40 2010 +1000 Signed-off-by: Dave Airlie Reviewed-by: Keith Packard Signed-off-by: Keith Packard - (cherry picked from commit 91a6359caf24d94343ff76f43ea7b7fc3223203d) -commit 1f6de991d0b44bf1412dc58067fae551f6aac5d1 +commit 968a79dcf5e17ac3963953ef56b8f94dbd75323b Author: Nicolas George Date: Wed Jun 2 13:40:51 2010 +0200 @@ -235,9 +3823,292 @@ Date: Wed Jun 2 13:40:51 2010 +0200 Signed-off-by: Nicolas George Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer - (cherry picked from commit 968a79dcf5e17ac3963953ef56b8f94dbd75323b) -commit b1e338df929bc7ef68524e66d5ff8d85af84b0e6 +commit 108b766c31b57fb1955d34d85673a235c7f743aa +Author: Peter Hutterer +Date: Thu May 20 11:04:53 2010 +1000 + + xfree86: initialize InputAttributes to NULL in the autoconfig code. + + Reported-by: Jamey Sharp + Signed-off-by: Peter Hutterer + Reviewed-by: Jamey Sharp + +commit 151659f9636088fd70bc5586de97bf43ee706180 +Author: Peter Hutterer +Date: Mon May 24 16:24:03 2010 +1000 + + test: fix up InputAttributes helper function test. + + Just some extra clarification as pointed out by Dan Nicholson, + and that memcpy should have been a memcmp. + + Signed-off-by: Peter Hutterer + Signed-off-by: Dan Nicholson + +commit 6cccf0131c8464d8838cae2200730873d7dd9e45 +Author: Peter Korsgaard +Date: Tue May 25 11:03:28 2010 +0200 + + dix: add 3x3 transformation matrix xinput property for multi-head handling + + For absolute input devices (E.G. touchscreens) in multi-head setups, + we need a way to bind the device to an randr output. This adds the + infrastructure to the server to allow us to do so. + + positionSprite() scales input coordinates to the dimensions of the shared + (total) screen frame buffer, so to restrict motion to an output we need to + scale/rotate/translate device coordinates to a subset of the frame buffer + before passing them on to positionSprite. + + This is done here using a 3x3 transformation matrix, which is applied to + the device coordinates using homogeneous coordinates, E.G.: + + [ c0 c1 c2 ] [ x ] + [ c3 c4 c5 ] * [ y ] + [ c6 c7 c8 ] [ 1 ] + + Notice: As input devices have varying input ranges, the coordinates are + first scaled to the [0..1] range for generality, and afterwards scaled + back up. + + E.G. for a dual head setup (using same resolution) next to each other, you + would want to scale the X coordinates of the touchscreen connected to the + both heads by 50%, and translate (offset) the coordinates of the rightmost + head by 50%, or in matrix form: + + left: right: + [ 0.5 0 0 ] [ 0.5 0 0.5 ] + [ 0 1 0 ] [ 0 1 0 ] + [ 0 0 1 ] [ 0 0 0 ] + + Which can be done using xinput: + + xinput set-prop --type=float "Coordinate Transformation Matrix" \ + 0.5 0 0 0 1 0 0 0 1 + + xinput set-prop --type=float "Coordinate Transformation Matrix" \ + 0.5 0 0.5 0 1 0 0 0 1 + + Likewise more complication setups involving more heads, rotation or + different resolution can be handled. + + Signed-off-by: Peter Korsgaard + Signed-off-by: Peter Hutterer + +commit e4582d9e5c8649347742a13eae68cf27005296fc +Author: Peter Hutterer +Date: Thu May 27 10:42:54 2010 -0400 + + xfree86: bump ABI_XINPUT_VERSION to 11. + + commit c2d0b3b437b7ce6ce975f2ead4d8bb8295ef0ddc + "xfree86: store the InputAttributes in the input device." + introduced the new API. Bump the input version so drivers can handle this + appropriately. + + Signed-off-by: Peter Hutterer + Signed-off-by: Keith Packard + +commit cd0ef0b6a2f9c6bfeda98684569da922792d3feb +Author: Jamey Sharp +Date: Tue May 25 14:30:22 2010 -0700 + + dmx: Delete unused ChangeKeyboardDevice/ChangePointerDevice. + + Daniel Stone deleted the API for these in 2006, in commit + 96e32805d12fc36f0fa0926dbfb0dd8a5cadb739. + + Signed-off-by: Jamey Sharp + Reviewed-by: Peter Hutterer + +commit 70454864917f534483fa049e067b5646df61c88a +Author: Jamey Sharp +Date: Fri May 14 12:31:44 2010 -0700 + + Ignore build products in the server's test suite. + + Signed-off-by: Jamey Sharp + Cc: Peter Hutterer + Reviewed-by: Peter Hutterer + +commit 8bb88379d95356384e233225bfda6abfd71389b4 +Author: Jamey Sharp +Date: Tue May 25 15:52:18 2010 -0700 + + dmx: Remove dead __glXDispSwap_DrawArraysEXT definition. + + Eric Anholt made the corresponding fix in glx/render2swap.c in commit + 49d38ab2328c409b2a98465b52677af057121513. + + Signed-off-by: Jamey Sharp + Reviewed-by: Alex Deucher + +commit c97a3ade5a8718b063292c73a31aac2196fe2452 +Author: Jamey Sharp +Date: Tue May 25 15:17:30 2010 -0700 + + dmx: Delete unused local variables. + + Signed-off-by: Jamey Sharp + Reviewed-by: Peter Hutterer + +commit 3c3d099fc10c63d746f90c08043d45180d6a7226 +Author: Jamey Sharp +Date: Tue May 25 13:44:32 2010 -0700 + + dmx: Xfree -> free + + Mikhail fixed the corresponding Xallocs, but missed these uses of Xfree + in commit 3f3ff971ecff9936cebafc813af9193b97bba89c. + + Signed-off-by: Jamey Sharp + Reviewed-by: Peter Hutterer + +commit 01ca6400d949a873c0bb5de7e0dbf138e8a7949b +Author: Jamey Sharp +Date: Tue May 25 14:02:34 2010 -0700 + + Xephyr: Fix Xcalloc deprecation warnings. + + Signed-off-by: Jamey Sharp + Reviewed-by: Peter Hutterer + +commit 34df659687ad3936ab03d19ce8fdb21f385c2e8a +Author: Jamey Sharp +Date: Tue May 25 11:51:32 2010 -0700 + + xfree86/int10/helper_mem: Fix log message. + + Three years ago in commit f62beb6f3609e8b6e61325ac89017590811bbd07 ajax + deleted the code that could have set this format string to anything + else, so just use the format string literal. This makes GCC happy since + it can check the argument types, which, by the way, weren't correct + since this format string doesn't need any arguments. + + Signed-off-by: Jamey Sharp + Reviewed-by: Alex Deucher + Reviewed-by: Tiago Vignatti + +commit 0a98d9e6cec7c611a3c56f97d4ddc0c546975c55 +Author: Jamey Sharp +Date: Tue May 25 10:30:58 2010 -0700 + + xf86bigfont: Silence compiler warning by initializing pDesc. + + Access to pDesc was always guarded by (nCharInfos > 0), so the code + wasn't actually buggy, but this makes it clear that it's correct. + + Signed-off-by: Jamey Sharp + Reviewed-by: Alex Deucher + +commit 4e9d3e413245e7c01c2ff3c0f130b8967754131b +Author: Keith Packard +Date: Wed May 26 07:54:35 2010 -0700 + + Revert "Add a "flags" field to DeleteInputDeviceRequest." + + Peter wants to get a larger patch sequence put together and I didn't + read past the commit message to see the 'don't take this patch + please'. + + This reverts commit 531ff40301975519af7b20109c17d296312d3f2b. + +commit 531ff40301975519af7b20109c17d296312d3f2b +Author: Peter Hutterer +Date: Thu May 20 18:07:12 2010 +1000 + + Add a "flags" field to DeleteInputDeviceRequest. + + Some input drivers need to implement an internal hotplugging scheme for + dependent devices to provide multiple X devices off one kernel device file. + Such dependent devices can be added with NewInputDeviceRequest() but they are + not removed when the config backend calls DeleteInputDeviceRequest(), + leaving the original device to clean up. + + Example of the wacom driver: + + config/udev calls NewInputDeviceRequest("stylus") + + wacom PreInit calls + NewInputDeviceRequest("eraser") + NewInputDeviceRequest("pad") + NewInputDeviceRequest("cursor") + PreInit finishes. + + When the device is removed, the config backend only calls + DeleteInputDeviceRequest for "stylus". The driver needs to call + DeleteInputDeviceRequest for the dependent devices eraser, pad and cursor to + clean up properly. + However, when the server terminates, DeleteInputDeviceRequest is called for + all devices - the driver must not remove the dependent devices to avoid + double-frees. There is no method for the driver to detect why a device is + being removed, leading to elaborate guesswork and some amount of wishful + thinking. + + Though the input driver's UnInit already supports flags, they are unused. + This patch uses the flags to supply information where the + DeleteInputDeviceRequest request originates from, allowing a driver to + selectively call DeleteInputDeviceRequest when necessary. + + Also bumps XINPUT ABI. + + Signed-off-by: Peter Hutterer + Reviewed-by: Dan Nicholson + Signed-off-by: Keith Packard + +commit c2d0b3b437b7ce6ce975f2ead4d8bb8295ef0ddc +Author: Peter Hutterer +Date: Tue May 25 17:15:32 2010 +1000 + + xfree86: store the InputAttributes in the input device. + + InputAttributes largely decide which configuration values get merged from + the xorg.conf.d snippets. While they are available in the config backend, + they are not available for any other callers of NewInputDeviceRequest(). + + Drivers implementing driver-side hotplugging do not have access to these + attributes and cannot have xorg.conf.d snippets specific to dependent + devices. For example, the following case cannot work right now: + + Section "InputClass" + MatchProduct "Wacom" + Option "PressCurve" "0 0 100 100" + ... + EndSection + + Section "InputClass" + MatchProduct "Wacom" + MatchProduct "eraser" + Option "PressCurve" "10 10 50 50" + ... + EndSection + + The second section is not triggered, as the wacom driver cannot supply the + InputAttributes to NewInputDeviceRequest(). + + Add the attributes to the IDevRec and merge them into the InputInfoRec to + make them accessible in the driver. This changes the ABI for input drivers. + + Signed-off-by: Peter Hutterer + Reviewed-by: Dan Nicholson + Signed-off-by: Keith Packard + +commit 86303a338ad563d0b986a3c052104301c310c4ac +Author: Peter Hutterer +Date: Tue May 25 17:12:34 2010 +1000 + + dix: add helper functions to duplicate and free InputAttributes. + + No special memory handling is used to give drivers the maximum flexibility + with the data. Drivers should be able to call realloc on the product string + if needed and perform similar operations. + + Signed-off-by: Peter Hutterer + Reviewed-by: Dan Nicholson + Signed-off-by: Keith Packard + +commit bf78e11839f8278020b604672ff7c3d194232be9 Author: Jamey Sharp Date: Mon May 24 09:15:32 2010 -0700 @@ -255,9 +4126,8 @@ Date: Mon May 24 09:15:32 2010 -0700 Signed-off-by: Jamey Sharp Reviewed-by: Pierre-Loup A. Griffais - (cherry picked from commit bf78e11839f8278020b604672ff7c3d194232be9) -commit 3ad3592820a8beeb724575fb7ae7f3e2f3560030 +commit bf9b64eefbadbf299d3b841c1890bfcaef5aab1b Author: Jamey Sharp Date: Mon May 24 09:14:27 2010 -0700 @@ -265,11 +4135,1592 @@ Date: Mon May 24 09:14:27 2010 -0700 Signed-off-by: Jamey Sharp Reviewed-by: Dan Nicholson - (cherry picked from commit bf9b64eefbadbf299d3b841c1890bfcaef5aab1b) -commit 598603021f6c4fa64161366177e93de67511bc2e +commit b11465a6ecdc2b8373e6fc8af427edc4602bcaa1 +Merge: 7c085ae 0abf065 +Author: Keith Packard +Date: Mon May 24 22:18:31 2010 -0700 + + Merge remote branch 'vignatti/bus-cleanup-take2' + +commit 7c085aebfedeb621a6fbeb3f09f4fcc640452044 +Author: Jamey Sharp +Date: Mon May 24 11:45:42 2010 -0700 + + xfixes: Remove the invisible cursor sprite, using NullCursor instead. + + Oliver McFadden reports that the invisible cursor sprite caused damage + events and thus unnecessary redrawing, so removing it improves + performance when using software cursor sprites, especially on those + devices where you do not want a visible cursor: touchscreen tablets, + embedded devices, etc. + + For the xfree86 DDX, if hardware cursors are used, the driver is + required to provide a HideCursor function, which will be called instead + of trying to set a null cursor. I think software cursors are already + safe. The other DDXes also look safe. + + As far as I can tell, there's no reason to realize a null cursor. I + think everything that handles null cursors doesn't rely on any setup in + RealizeCursor, and treats them as empty cursors. + + Xnest assumes that if a cursor is created, it will be realized before it + is freed, which didn't happen if the invisible cursor was never used in + a server generation. So this fixes a segfault in Xnest as well. + + Signed-off-by: Jamey Sharp + Cc: Oliver McFadden + Signed-off-by: Oliver McFadden + Tested-by: Oliver McFadden + Signed-off-by: Keith Packard + +commit 0abf065e38c4c48917054eb3e39e12bd20e6e8ec +Author: Tiago Vignatti +Date: Thu May 20 19:24:47 2010 +0300 + + xfree86: move all pci code from auto configurator into a meaningful location + + This patch creates the private xf86PciMatchDriver hook, which goes inside pci + code to match the drivers found in the system. + + Now there's no direct references to PCI inside xf86AutoConfig.c anymore. + + Signed-off-by: Tiago Vignatti + Reviewed-by: Alex Deucher + +commit 0ceac6f64f5ad9bc2ac4b19be2dd245ffba78b05 +Author: Tiago Vignatti +Date: Thu May 20 18:23:24 2010 +0300 + + xfree86: no need to check for the configuration case when matching devices + + xf86MatchDevice will never be called in configuration time. + + Signed-off-by: Tiago Vignatti + Reviewed-by: Alex Deucher + +commit b0eef1101815b08da2d375af7bec2be3136cf713 +Author: Tiago Vignatti +Date: Thu May 20 18:19:14 2010 +0300 + + xfree86: organize and group all pci related stuff inside xf86.h + + Signed-off-by: Tiago Vignatti + Reviewed-by: Alex Deucher + +commit 47df5a489ea69a68e753367423bfbe8830521f4e +Author: Tiago Vignatti +Date: Thu May 20 17:39:59 2010 +0300 + + xfree86: remove BUS_ISA type given we don't support anymore + + Should go together within commit df14682a. + + Signed-off-by: Tiago Vignatti + Reviewed-by: Alex Deucher + +commit 9d000a5509e0a356ee33ad08e4dc967a2ef8cbe0 +Author: Tiago Vignatti +Date: Thu May 20 16:52:37 2010 +0300 + + xfree86: remove all kind of bus and PCI dependency from the common helper file + + Move all PCI procedures from xf86Helper.c to a more meaningful place (namely + xf86pciBus.c). xf86Helper.c is free of PCI code now. + + Signed-off-by: Tiago Vignatti + Reviewed-by: Alex Deucher + +commit 610009cf39984f2f5e818a221b626f7af10bd90e +Author: Tiago Vignatti +Date: Tue May 18 20:54:28 2010 +0300 + + xfree86: bus: remove useless field from EntityRec + + RAC is the champion of remaining trash for sure! + + Signed-off-by: Tiago Vignatti + Reviewed-by: Alex Deucher + Reviewed-by: Keith Packard + +commit 95889a569feabd3f803afb92950d067bd76e7397 +Author: Tiago Vignatti +Date: Tue May 18 20:48:35 2010 +0300 + + xfree86: bus: delete useless xf86FindPrimaryDevice + + This function had a wrong name and was just logging the primary device. No one + cares about it honestly. + + Signed-off-by: Tiago Vignatti + Reviewed-by: Alex Deucher + +commit f6865909485d7d282c8131a2ae306143ad51ba2b +Author: Tiago Vignatti +Date: Tue May 18 19:39:31 2010 +0300 + + xfree86: bus: remove unused headers + + Signed-off-by: Tiago Vignatti + Reviewed-by: Alex Deucher + +commit 111b1fff1ca69724a8350c4375089c312329c378 +Author: Tiago Vignatti +Date: Tue May 18 19:35:10 2010 +0300 + + xfree86: bus: remove unused pci macros + + Should be gone in commits 3c03d9f1 and a9d7d659a respectively. + + Signed-off-by: Tiago Vignatti + Reviewed-by: Alex Deucher + +commit 2ffffb4daf6161e6a22d81442ecf6209acc9e975 +Merge: b5e0f6d d530608 +Author: Keith Packard +Date: Sun May 23 23:22:08 2010 -0700 + + Merge remote branch 'alanc/docs' + +commit b5e0f6d8f45c5b24eb50b305c66fa80c783ef488 Author: Peter Hutterer -Date: Wed Jun 2 11:13:17 2010 +1000 +Date: Mon May 24 12:25:15 2010 +1000 + + xfree86: fix multiple InputAttributes tag matching. + + attr->tags is an array of strings (null-terminated). When matching, match + against each string instead of each [i,end] substring in the first tag. + + Signed-off-by: Peter Hutterer + Reviewed-by: Jamey Sharp + Signed-off-by: Keith Packard + +commit d5306084b57583c670c56ce9e7d3c78cca7aa07b +Author: Brice Goglin +Date: Sat May 22 20:29:02 2010 +0200 + + Remove obsolete reference to README.DRI in xorg.conf.man + + Signed-off-by: Brice Goglin + Reviewed-by: Alan Coopersmith + +commit 89dd7d2b6fe18f32c2f9336c3d8cd9f35490e5ae +Author: Alan Coopersmith +Date: Sat May 22 10:33:04 2010 -0700 + + Remove ancient documentation of IBM RapidAccess keyboard hack + + Keyboard setup belongs in drivers, not in a document no one sees + because we don't even install it. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Julien Cristau + Reviewed-by: Alex Deucher + +commit 480fcdf0335abae0ee544b022c7985211eee462f +Author: Alan Coopersmith +Date: Sat May 22 10:29:47 2010 -0700 + + Remove completely out-of-date README.DRI + + The license only allows distribution of verbatim copies, so we can't + update it, even to correct the incorrect address to send updates to. + + The Mesa & DRI web pages are much better sources of current information + anyway. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Julien Cristau + +commit 1805c74d9b0ed46802481bcd6beea5feeb60212c +Author: Alan Coopersmith +Date: Sat May 22 10:29:00 2010 -0700 + + Add RandR 1.2 README.modes doc to EXTRA_DIST + + Signed-off-by: Alan Coopersmith + Reviewed-by: Julien Cristau + +commit 5939e39a641773a36c22104e1184143678dca7a2 +Author: Dave Airlie +Date: Mon May 24 09:31:51 2010 +1000 + + xf86: allow for no outputs connected at startup operation. + + When nothing is connected at startup and we canGrow, allow the server to start with a 1024x768 framebuffer, and when the drivers send hotplug events this will expand to the correct size dynamically. + + Reviewed-by: Keith Packard + Signed-off-by: Dave Airlie + Signed-off-by: Keith Packard + +commit b9f48d60bc0c839bd323c582231e8e7e2b810af6 +Author: Jamey Sharp +Date: Wed May 19 10:44:33 2010 -0700 + + Device init: Don't crash when CreateGC fails. + + ActivateDevice was ignoring errors from DeviceCursorInitialize, so + cursor-related calls failed later. Jeremy Huddleston saw that crash in + miPointerConstrainCursor, while with Xvfb I saw it in + miSpriteRealizeCursor. + + miDCDeviceCleanup frees any non-NULL GCs. miDCDeviceInitialize calls + Cleanup on any failure, but if it failed early then some of the pointers + in the miDCBufferPtr were garbage. Switch from malloc to calloc to + ensure everything's initialized safely first. + + With these two fixes, if CreateGC fails then the server gracefully fails + in FatalError instead of segfaulting. + + Signed-off-by: Jamey Sharp + Cc: Peter Hutterer + Reviewed-by: Peter Hutterer + Signed-off-by: Keith Packard + +commit c51534961e1bb4c68ff881758862d2f85f572ce7 +Author: Alan Coopersmith +Date: Sat May 22 11:11:48 2010 -0700 + + xorg-server.pc Requires: xproto >= 7.0.17 + + Since the headers we export in the SDK use the _X_NORETURN #define + introduced in xproto 7.0.17, drivers built with the SDK will also + need to have at least that version of xproto installed. + + I considered exporting the version from configure.ac, but decided not + to since the minimum required to build the X server may not always + be the same as the minimum required to build drivers (for instance, + if the X server used a new #define in its .c files or internal headers, + but didn't export it in any of the SDK headers). + + Signed-off-by: Alan Coopersmith + Reviewed-by: Julien Cristau + Signed-off-by: Keith Packard + +commit e90f20eed394de2200aba42bd61fd31c1067ac33 +Author: Jamey Sharp +Date: Fri May 21 22:16:50 2010 -0700 + + Declare functions that unconditionally call FatalError as _X_NORETURN. + + For AtomError, this should fix a clang warning; in the other cases it's + just good documentation. + + Signed-off-by: Jamey Sharp + Cc: Jeremy Huddleston + Reviewed-by: Jeremy Huddleston + Signed-off-by: Keith Packard + +commit 9d31d5b639c2a6ab8b1a80a0e2f0ee2c4f8cddd3 +Author: Adam Jackson +Date: Mon May 10 11:48:31 2010 -0400 + + vfb: Remove dead variable and header file + + Signed-off-by: Adam Jackson + Reviewed-by: Jamey Sharp + Signed-off-by: Keith Packard + +commit d8cbcbc01d1355d55c1c0af64f7f7f61629f6c61 +Author: Jamey Sharp +Date: Fri May 21 11:12:26 2010 -0700 + + doPolyText: forget about FontChange's XID after looking up pFont. + + As of e2929db7b737413cf93fbebdf4d15abdfebff05c, doPolyText uses pFont + consistently rather than looking it up again from the saved XID. + + clang noticed that "oldfid = fid" could run when fid hadn't been + initialized yet. + + Signed-off-by: Jamey Sharp + Reviewed-by: Jeremy Huddleston + Tested-by: Jeremy Huddleston + Signed-off-by: Keith Packard + +commit 989db930d739483759087b13b8d9a043299feafb +Author: Aaron Zang +Date: Thu May 20 17:56:28 2010 -0700 + + Solaris: Use VT_SET_CONSUSER ioctl to set Console User rights profile + + When Xorg is started on display :0, this ioctl is called to grant the + user the rights traditionally associated with /dev/console (before VT + support was added), such as access to local peripheral devices. + + Also adds a Solaris-specific -C flag to force starting on /dev/console + instead of /dev/vt*, allowing programs like xterm -C to access the + console device. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Adam Jackson + Signed-off-by: Keith Packard + +commit 98553e52a14b97a03aef8dc4fc0300b3f4c2c4b5 +Author: Alan Coopersmith +Date: Thu May 20 17:56:27 2010 -0700 + + vbe.h: Use __attribute__((packed)) on Sun cc 5.9 & later as well as gcc + + Signed-off-by: Alan Coopersmith + Reviewed-by: Adam Jackson + Signed-off-by: Keith Packard + +commit 7b09335a46f9428141811230c69eef7968531359 +Author: Alan Coopersmith +Date: Thu May 20 17:56:26 2010 -0700 + + Xserver(1) man page updates + + - Note that -br is now default. + - Move -bs after -br for alphabetical ordering. + - Remove -config option that's been hidden in "ignore" section, + since ajax removed the -config code a couple years back. + - Add -nocursor option. + - Add xinput & xrandr to list of runtime server control programs + - Replace XDarwin with Xquartz in list of Xservers + + Signed-off-by: Alan Coopersmith + Reviewed-by: Adam Jackson + Signed-off-by: Keith Packard + +commit cf4f3d051858aadedd6e333bb317a1daa3987ad7 +Author: Peter Hutterer +Date: Fri May 21 13:30:25 2010 +1000 + + dix: remove obsolete comment.from EnableDevice. + + The code this comment was referring to was removed in + 8b5086250aa5dae8de8b763408ff480d7beac819 "Eliminate bogus event resizing." + + Signed-off-by: Peter Hutterer + Reviewed-by: Daniel Stone + Signed-off-by: Keith Packard + +commit 5754e66044571d549c295b7c9e02ce3348dbe3c7 +Author: Jamey Sharp +Date: Thu May 20 10:46:43 2010 -0700 + + Replace screen->rgf scratch GC flags with a bit in each GC. + + This eliminates a poorly-named, poorly-documented field from the + ScreenRec, using a previously-unused flag bit in each GC instead. + + Signed-off-by: Jamey Sharp + Cc: Keith Packard + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit 5a7275d78a2f1c20ed5bb7b228cf370c4ada22c9 +Author: Keith Packard +Date: Thu May 20 13:57:02 2010 -0700 + + Find windows GL wrapper files in $(srcdir) instead of . + + This fixes 'make distcheck' for me. + + Signed-off-by: Keith Packard + Reviewed-by: Julien Cristau + +commit 1197a87b5638037cc48084fba4eec9d3b599e900 +Author: Keith Packard +Date: Thu May 20 13:40:24 2010 -0700 + + winpriv.h was moved from hw/xwin to hw/xwin/glx in November + + hw/xwin/Makefile.am was referencing this instead of hw/xwin/glx/Makefile.am + + Signed-off-by: Keith Packard + Reviewed-by: Julien Cristau + +commit 1cad520f3f1d9d520422e3e4d5d8f4ea85a212a4 +Author: Alan Coopersmith +Date: Mon May 17 20:35:10 2010 -0700 + + XFree86 Design doc: Convert LinuxDoc ``quotes'' to DocBook tags + + Signed-off-by: Alan Coopersmith + Tested-by: Gaetan Nadon + +commit 8367913be3305be4f03d095615d3885107094427 +Author: Alan Coopersmith +Date: Fri May 14 22:05:50 2010 -0700 + + XFree86 Design doc: Explain this version covers the current Xorg release + + Update the title & preface to explain that while this was originally + the XFree86 4.0 design, we've changed a lot since forking. + + Signed-off-by: Alan Coopersmith + Tested-by: Gaetan Nadon + +commit 78fe4be4c43db1f07a30e8a6c9a17f81c1082d76 +Author: Alan Coopersmith +Date: Mon May 17 20:27:10 2010 -0700 + + Show Xserver release/version date in DIX & DDX docs + + Uses a fake absolute path to the entity definition files so that + the xmlto --searchpath will work for finding the actual path + + Signed-off-by: Alan Coopersmith + Reviewed-by: Dan Nicholson + Tested-by: Gaetan Nadon + +commit 2bdc73bcf41ff0c10e70ecc15fc8b8333af6db65 +Author: Alan Coopersmith +Date: Fri May 14 15:33:46 2010 -0700 + + Move Xserver-spec.xml from xorg-docs to doc/xml + + Allows keeping it in sync with the sources it documents, and to be + released with them + + Requires the previous patch to convert the Xserver tree from + LinuxDoc to DocBook for SGML/XML documents. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Rémi Cardona + Tested-by: Gaetan Nadon + +commit fc6ebe1e1d3057378f61f992549a98e67a04dc6c +Author: Alan Coopersmith +Date: Fri May 14 14:56:09 2010 -0700 + + Convert LinuxDoc documents to DocBook/XML + + Only the markup/formatting is changed - the contents should still + be wildly out of date for now. + + Signed-off-by: Alan Coopersmith + Reviewed-by: Rémi Cardona + Tested-by: Gaetan Nadon + +commit ebd745ced89b2a2d9f6b4dcbd9f5f7e7f3b35451 +Author: Simon Farnsworth +Date: Thu May 20 09:58:38 2010 +0100 + + Add documentation for the new DefaultModes option + + This patch adds documentation for the DefaultModes monitor option + added in the previous patch. + + Signed-off-by: Simon Farnsworth + Reviewed-by: Adam Jackson + Signed-off-by: Keith Packard + +commit cfc629148891be317ba60f2495abcda485780191 +Author: Simon Farnsworth +Date: Thu May 20 09:58:37 2010 +0100 + + Add configuration option to disable default modes on an output + + Setting 'Option "DefaultModes" "No"' in an output will guarantee that + X will omit the default modes, just picking up modes from the + configuration file and modes provided by the output. + + Signed-off-by: Simon Farnsworth + Reviewed-by: Adam Jackson + Signed-off-by: Keith Packard + +commit a1c2bdb6ab7a4f374844f80e83620b155991e817 +Author: Michel Dänzer +Date: Thu May 20 10:13:06 2010 +0200 + + EXA: Wrap Glyphs even without Composite acceleration. + + In order to avoid migration ping-pong when accumulating glyphs in a mask + picture. + + Signed-off-by: Michel Dänzer + Reviewed-by: Adam Jackson + Signed-off-by: Keith Packard + +commit 00581d4a42e2a0e7652834973645a4a9ed59cf93 +Author: Tiago Vignatti +Date: Fri May 14 19:31:56 2010 +0300 + + configure: force new xproto version dependency + + commit bca85e2e127a8a23e3a2debcfeb3ae07cd3c66ac introduced it. + + Use the version that includes _X_NORETURN + + Signed-off-by: Tiago Vignatti + Reviewed-by: Julien Cristau + Signed-off-by: Keith Packard + +commit 103507af0c0ce7d7482a67163249864af36a2374 +Merge: 8bd8d81 99fcf65 +Author: Keith Packard +Date: Wed May 19 22:27:53 2010 -0700 + + Merge remote branch 'vignatti/bus-cleanup' + +commit 8bd8d81dc473bf72ea108b1896a55e32defa02e2 +Merge: c620a1c 66d5ecc +Author: Keith Packard +Date: Wed May 19 22:27:20 2010 -0700 + + Merge remote branch 'vignatti/animcursor-state-fix' + +commit c620a1c0a4ca564e778cce019dd30046c6969956 +Author: Peter Hutterer +Date: Thu May 20 10:26:56 2010 +1000 + + xfree86: fix typo in optionTypeToSting. + + Because we don't want anyone to get hurt. + + Signed-off-by: Peter Hutterer + Reviewed-by: Dan Nicholson + Reviewed-by: Matt Turner + Signed-off-by: Keith Packard + +commit 8b6c1809c09f832051327d86e1a25dc0ec5cc878 +Merge: d88ba77 c38552d +Author: Keith Packard +Date: Wed May 19 12:58:02 2010 -0700 + + Merge remote branch 'jamey/for-keith' + +commit c38552d115e3bc71ad6179a8ad0d68778e943793 +Author: Jamey Sharp +Date: Sat Apr 24 23:56:36 2010 -0700 + + Add typed resource-lookup errors for non-core resource types. + + Signed-off-by: Jamey Sharp + Reviewed-by: Adam Jackson + +commit e291c561821ae86b7dd74269d5cd29bc31703962 +Author: Jamey Sharp +Date: Sat Apr 24 23:26:40 2010 -0700 + + Return an appropriately-typed error from dixLookupResourceByType. + + Rather than always returning BadValue, associate an error status like + BadWindow with a resource type like RT_WINDOW, and return the + appropriate one for the requested type. + + This patch only touches the core protocol resource types. Others still + return BadValue and need to be mapped appropriately. + + dixLookupResourceByType can now return BadImplementation, if the caller + asked for a resource type that has not been allocated in the server. + + Signed-off-by: Jamey Sharp + Reviewed-by: Adam Jackson + +commit 90e612dcbe370da095d317fac62c80ac2447fa0b +Author: Jamey Sharp +Date: Sat May 15 15:51:32 2010 -0700 + + Use WriteEventsToClient rather than TryClientEvents where possible. + + If filter is NoEventMask (aka CantBeFiltered), grab is null, and the + first event is not in the set of "critical events", then TryClientEvents + simply calls WriteEventsToClient. In that case, it returns 0 for fake or + dead clients, and 1 otherwise. Inline for this special case. + + Signed-off-by: Jamey Sharp + Reviewed-by: Julien Cristau + Reviewed-by: Adam Jackson + +commit 8033fb6c9792820a82fbdff6a14ff8a7a141ba74 +Author: Jamey Sharp +Date: Sat May 15 13:12:44 2010 -0700 + + Set event sequence number in WriteEventsToClient instead of at callers. + + TryClientEvents already did this; this commit just moves the assignment + one level down so that no event source has to worry about sequence + numbers. + + ...No event source, that is, except XKB, which inexplicably calls + WriteToClient directly for several events. + + Signed-off-by: Jamey Sharp + Reviewed-by: Julien Cristau + Reviewed-by: Adam Jackson + +commit 4b9600a4167427a8fe88bca9b738c9a99cac9469 +Author: Jamey Sharp +Date: Sat May 15 12:31:34 2010 -0700 + + Make WriteEventsToClient/WriteToClient no-op on fake or dead clients. + + This matches the test in TryClientEvents, and is a superset of tests + done by the callers of these functions. The consequence of forgetting + these tests is a server crash, so they're always desirable. In my + opinion, it's better to not require the callers to remember to do these + checks. + + For callers that don't do very much work before calling WriteToClient or + WriteEventsToClient, I've removed the redundant checks. + + hw/xquartz/xpr/appledri.c has an interesting case: While its check for + "client == NULL" appears redundant with the test in WriteEventsToClient, + it dereferences client to get the sequence number. + + Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=27497 + Signed-off-by: Jamey Sharp + Cc: Chris Wilson + Reviewed-by: Julien Cristau + Reviewed-by: Adam Jackson + +commit ee9cd2df4a5af66c6b7073563785b8aef61fcdb8 +Author: Jamey Sharp +Date: Sat May 15 13:37:34 2010 -0700 + + xv: TryClientEvents already checks client and sets sequenceNumber. + + So don't bother doing those steps again. + + Signed-off-by: Jamey Sharp + Reviewed-by: Julien Cristau + Reviewed-by: Adam Jackson + +commit e1e7deefb59cfdd82c9de46a7ca241d42436b2f8 +Author: Jamey Sharp +Date: Tue May 18 16:49:21 2010 -0700 + + mi/misprite.c: Delete unused private lookups. + + Signed-off-by: Jamey Sharp + Reviewed-by: Peter Hutterer + +commit 936b09f2a3e31afe41050c00736bbb6b812c7003 +Author: Jamey Sharp +Date: Tue May 18 16:48:08 2010 -0700 + + Replace miSpriteCursorFuncRec with direct calls to midispcur.c. + + Nobody wraps the mi software-cursor sprite rendering implementations. + + Signed-off-by: Jamey Sharp + Reviewed-by: Peter Hutterer + +commit 66d5ecc5fd36e21715531a39ac83dc2b6b988a7e +Author: Tiago Vignatti +Date: Tue May 18 13:53:29 2010 +0300 + + render: set anim cursor state for pointer enabled devices only + + The structure containing the state of animated cursor was amended within + SpriteInfoRec, removing all previously privates logic to keep such state. + + API change: It was removed MAXDEVICES dependency \o/ + + Signed-off-by: Tiago Vignatti + Reviewed-by: Peter Hutterer + Reviewed-by: Keith Packard + +commit 99fcf655bdc96f7e5b2249b05da51ba4fc9190c7 +Author: Tiago Vignatti +Date: Sun May 2 22:34:44 2010 +0300 + + xfree86: remove PCI dependency from InitOutput + + All functions that touch PCI and BUS were moved to their own files, organizing + the mess inside the InitOutput. Now, inside InitOutput, mostly accesses to + buses are coordinated by the new xf86BusConfig. + + Two PCI probe functions just changed the name and a procedure to receive the + isolate devices parameters was created also, named xf86PciIsolateDevice. + + Signed-off-by: Tiago Vignatti + Reviewed-by: Adam Jackson + +commit 0dd299864a133d478e4635bd1cd305b67fc3964d +Author: Tiago Vignatti +Date: Sun May 2 21:33:26 2010 +0300 + + xfree86: remove xf86EnableAccess + + It's RAC remnant. This was substituted by xf86VGAarbiter{Lock, Unlock} + mechanism. + + It's an API break, but the few drivers using it were covered already with + macros to avoid problems. + + Signed-off-by: Tiago Vignatti + Reviewed-by: Adam Jackson + +commit f28515b5f774b83e0481acbcdda2f682738079b9 +Author: Tiago Vignatti +Date: Sun May 2 21:24:46 2010 +0300 + + xfree86: bus: remove SetSIGIOForState and simplify the code + + Also removed some dumb debug messages. + + Signed-off-by: Tiago Vignatti + Reviewed-by: Adam Jackson + +commit 211ca67e4d8d00b20a74a78304a61d4dbea62706 +Author: Tiago Vignatti +Date: Sun May 2 21:16:23 2010 +0300 + + xfree86: bus: fb drivers might want to use vga arbitration either + + Signed-off-by: Tiago Vignatti + Reviewed-by: Adam Jackson + +commit 2464eb7d56407422e033ab3b94634ba802a119d5 +Author: Tiago Vignatti +Date: Sun May 2 21:14:53 2010 +0300 + + xfree86: bus: simplify entity related hooks + + Remove some out dated commentaries either. + + Signed-off-by: Tiago Vignatti + Reviewed-by: Adam Jackson + +commit 971768e6884f20981652da09a1617c51a760fb86 +Author: Tiago Vignatti +Date: Fri May 7 15:25:48 2010 +0300 + + xfree86: bus: enable declaration of sparc function as its code usage + + The code in xf86sbusBus.c seems too OS-specific to be usable on OpenBSD. + + Signed-off-by: Tiago Vignatti + Reviewed-by: Adam Jackson + +commit a70ec0d136bbb9efb6f4e683d7ebcea00375083b +Author: Tiago Vignatti +Date: Sun May 2 20:48:01 2010 +0300 + + xfree86: bus: rework xf86PostProbe logic and remove useless log info + + Signed-off-by: Tiago Vignatti + Reviewed-by: Adam Jackson + +commit 2f7d630a1ee446711288af69711d57ea3054b594 +Author: Tiago Vignatti +Date: Sun May 2 20:29:11 2010 +0300 + + xfree86: bus: reuse already assigned variable when fb driver claimed + + Signed-off-by: Tiago Vignatti + Reviewed-by: Adam Jackson + +commit 964f29bb80c1bb05508a27969c3ac34cbf072ee9 +Author: Tiago Vignatti +Date: Sun May 2 20:14:40 2010 +0300 + + xfree86: bus: fix Enter/Leave accesses behaviour + + Okay, seems we're not using extensively such hooks in fact. But fix the + expected behaviour at least. + + Signed-off-by: Tiago Vignatti + Reviewed-by: Adam Jackson + +commit b37462b4da7c389ec7bbcfd800e5f88bded79330 +Author: Tiago Vignatti +Date: Sun May 2 19:53:37 2010 +0300 + + xfree86: remove unused xf86AccessInit() + + The function was only initializing the boolean xf86ResAccessEnter, which + couldn't get any other value in the life of the server. + + The only possible, though suspicious, code was in xf86AccessLeave(), which + could be triggered if AbortDDX is called before xf86AccessInit(). Even so, + such change is safety because no driver would have configured any entity leave + procedure at this point. + + Signed-off-by: Tiago Vignatti + Reviewed-by: Adam Jackson + +commit d88ba7721d2d3b58cdc664fd4c23a3c5e2a5f909 +Author: Peter Hutterer +Date: Tue May 18 11:12:49 2010 +1000 + + xfree86: Add option parsing for percent options. + + In some cases, an option of "50%" would be preferable over fixed value + configuration - especially if the actual values are autoprobed. + Add a new set of functions to parse percent values from configurations. + + The percent value parsing differs slightly - if the option is not to marked + as used (e.g. xf86CheckPercentOption()), no warning is emitted to the log + file if the value is not a percent value. This allows double-options (either + as % or as absolute number) without warnings. + + Signed-off-by: Peter Hutterer + Reviewed-by: Dan Nicholson + Signed-off-by: Keith Packard + +commit 673eb707ce6737284c4886265ba149c5587a74e2 +Author: Jamey Sharp +Date: Sat May 15 12:06:25 2010 -0700 + + SyncSendAlarmNotifyEvents: check the correct client's clientGone flag. + + Signed-off-by: Jamey Sharp + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit c3ba199aa643e59abd30170c53fbb4e03077c377 +Author: Tiago Vignatti +Date: Tue Apr 27 16:27:55 2010 +0300 + + render: remove unused animcursor fields from private rec + + Signed-off-by: Tiago Vignatti + Reviewed-by: Peter Hutterer + +commit 9db63e4766bde07ebc375c4390bcc5c854b46ac3 +Author: Tiago Vignatti +Date: Tue Apr 27 16:18:50 2010 +0300 + + render: removed unused macro from animcursor + + Signed-off-by: Tiago Vignatti + Reviewed-by: Peter Hutterer + +commit cba9942f7716b12c329616a9994c5bce857617fa +Author: Kristian Høgsberg +Date: Mon May 17 17:40:30 2010 -0400 + + dri2: Fix NULL check in allocation error handling + + 1461b31e40a3e44f6327199d23cf2ab70d8f5176 tests to see if the allocation + of buffer[i] failed after i has been incremented, causing it to look + at the wrong pointer. + + Signed-off-by: Kristian Høgsberg + Tested-by: Eric Anholt + Signed-off-by: Keith Packard + +commit 27cec0a0501369a68031c048e691bda4c7095f72 +Author: Julien Cristau +Date: Mon May 17 19:23:44 2010 +0200 + + Fix build without XACE + + dix/colormap.c and dix/gc.c now dereference a ClientPtr, so they need to + include dixstruct.h. Regression introduced by commit + 11c69880c7c48ef9e755c4e09fadef7a629d7bc7. + + Reported-by: Robert Hooker + Signed-off-by: Julien Cristau + Reviewed-by: Jamey Sharp + Signed-off-by: Keith Packard + +commit 5a387cf6d248e3cb3337a938200ed5a09fc1d8cb +Author: Julien Cristau +Date: Sun May 16 21:29:02 2010 +0200 + + Only link Xorg with libconfig.la + + Other DDXs don't use input hotplugging since config_init was moved to + the DDX in commit d33adcdf03c69407d151e732fa0cf9947151eb19, so there's + no need to link this in. + + Signed-off-by: Julien Cristau + Reviewed-by: Peter Hutterer + Signed-off-by: Keith Packard + +commit 37f0b45dbe4ea52bc127720207c7157b2b803ac0 +Author: Jeremy Huddleston +Date: Sun May 16 10:14:02 2010 -0700 + + XQuartz: Fix a build failure on Tiger + + Signed-off-by: Jeremy Huddleston + +commit ecfeabec8d0dcfe286fb893047f1fe1a7ea9f8f5 +Author: Jeremy Huddleston +Date: Sun May 16 10:03:13 2010 -0700 + + XQuartz: Don't use deltaXY for determining pointer location on scroll events + + + + Signed-off-by: Jeremy Huddleston + Reviewed-by: Edward Moy + +commit a911292c85f7069d2caabcb677ed716a04227526 +Author: Jeremy Huddleston +Date: Sat May 15 10:53:09 2010 -0700 + + XQuartz: Don't trust deltaXY for middle mouse clicks. + + The middle mouse clicks return erroneous values after returning from + Fast User Switching. + + + http://xquartz.macosforge.org/trac/ticket/389 + + Signed-off-by: Martin Otte + Reviewed-by: Jeremy Huddleston + Reviewed-by: Edward Moy + Signed-off-by: Jeremy Huddleston + +commit 345eb171264325d73ea2c50ba8c692cf589c2a9b +Author: Keith Packard +Date: Sat May 1 01:41:19 2010 -0700 + + Remove dbe screen private privates. + + Each DBE Screen private structure could have nested privates. Oddly, + no code ever used them. + + Signed-off-by: Keith Packard + Reviewed-by: Jamey Sharp + +commit 87ea5760f86eb60840e6e2c10012915952df5377 +Author: Keith Packard +Date: Mon May 10 11:46:25 2010 -0700 + + Check pixmap allocation return value when creating glyphs + + The driver may decide that the pixmap is too large or something and + fail to allocate a pixmap; not checking would lead to a segfault. + + Signed-off-by: Keith Packard + Reviewed-by: Jamey Sharp + +commit 03f7e92a6cbfe58db08ce840283f9809695c70e7 +Author: Alan Coopersmith +Date: Mon May 10 13:44:30 2010 -0700 + + Update list of supported platforms in configure.ac error message + + Adds DragonFly BSD, OpenSolaris, & GNU Hurd. + Drops MacOS X, since this is in the section specific to the Xorg/XFree86 DDX. + (Matches the OS patterns the configure script checks for.) + + Also uses m4 macros to fix the spacing/formatting of the resulting message. + + Signed-off-by: Alan Coopersmith + Acked-by: Gaetan Nadon + +commit e42a29d269fadc11e065c63ee369e3165196f2d7 +Author: Alan Coopersmith +Date: Thu Apr 29 18:45:34 2010 -0700 + + Fix compiler issues with getifaddrs() call on OpenSolaris + + OpenSolaris recently added support for the getifaddrs() API. + + Building with that uncovered two compiler issues (one warning, one error) + in the code that was now being built for the first time in our builds: + + "access.c", line 768: warning: argument #1 is incompatible with prototype: + prototype: pointer to struct sockaddr {unsigned short sa_family, array[14] of char sa_data} : "access.c", line 213 + argument : pointer to struct sockaddr_storage {unsigned short ss_family, array[6] of char _ss_pad1, double _ss_align, array[240] of char _ss_pad2} + + "access.c", line 838: assignment type mismatch: + struct sockaddr {unsigned short sa_family, array[14] of char sa_data} "=" struct sockaddr_storage {unsigned short ss_family, array[6] of char _ss_pad1, double _ss_align, array[240] of char _ss_pad2} + + Signed-off-by: Alan Coopersmith + Reviewed-by: Jamey Sharp + +commit c6613cfc26e76b296e620640bf33e756eb4ae178 +Author: Jamey Sharp +Date: Fri May 14 10:36:13 2010 -0700 + + test/xi2: Initialize predefined atoms before XInputExtensionInit. + + XInputExtensionInit calls MakeAtom, which doesn't work without the atoms + table initialized. + + Signed-off-by: Jamey Sharp + Cc: Peter Hutterer + Tested-by: Keith Packard + Signed-off-by: Keith Packard + +commit 1461b31e40a3e44f6327199d23cf2ab70d8f5176 +Author: Pauli Nieminen +Date: Fri May 14 16:25:43 2010 +0300 + + dri2: Fix xserver crash if dri2 buffer allocation fails. + + If driver fails to allocate memory for dri2 buffer server would crash + in send_buffers_reply. + + Solution is to handle the allocation failure and return BadAlloc to + client. + + Signed-off-by: Pauli Nieminen + Reviewed-by: Michel Dänzer + Reviewed-by: Kristian Høgsberg + Signed-off-by: Keith Packard + +commit f87002cb7d8729b1da4cbefe7653f4cfd3a2d956 +Merge: a4fbc0f 890f536 +Author: Keith Packard +Date: Fri May 14 11:46:29 2010 -0700 + + Merge remote branch 'jamey/for-keith' + +commit 890f536f8d66f08e7d6a5685659eef4001a8757d +Author: Jamey Sharp +Date: Fri May 14 00:18:14 2010 -0700 + + Bugfix for "Pre-validate ChangeGC XIDs": off-by-one in loop index. + + Signed-off-by: Jamey Sharp + Tested-by: Colin Harrison + +commit a4fbc0fedafda6df98f647173a2deccb86ef0479 +Author: Oliver McFadden +Date: Fri May 14 07:49:31 2010 +0300 + + scrnintstr.h: removed unused PaintWindow function pointers. + + Please note this patch breaks the ABI. + + Signed-off-by: Oliver McFadden + Reviewed-by: Keith Packard + +commit 71296885b0bb946e7ab986169f5b872952c221a0 +Author: Oliver McFadden +Date: Thu May 13 07:12:43 2010 +0300 + + mi: removed unused PointerNonInterestBox functions. + + Please note this patch breaks the ABI. + + Signed-off-by: Oliver McFadden + Reviewed-by: Keith Packard + +commit 795432d4a92ed5b9fa4d9163e73c8e4fe4c74534 +Merge: f2a0c32 92ed75a +Author: Keith Packard +Date: Thu May 13 18:22:49 2010 -0700 + + Merge remote branch 'jamey/cleanups' + +commit 92ed75ac59e2d3af149cddb962efd05fc8487750 +Author: Jamey Sharp +Date: Mon May 10 20:22:05 2010 -0700 + + Eliminate boilerplate around client->noClientException. + + Just let Dispatch() check for a noClientException, rather than making + every single dispatch procedure take care of it. + + Signed-off-by: Jamey Sharp + Reviewed-by: Daniel Stone + +commit 11c69880c7c48ef9e755c4e09fadef7a629d7bc7 +Author: Jamey Sharp +Date: Sat May 8 22:16:32 2010 -0700 + + Quit using clientErrorValue in dix/colormap.c. + + And that's it! No more clientErrorValue kludge. + + Signed-off-by: Jamey Sharp + Reviewed-by: Keith Packard + +commit a3d948ddbb54b9e831e67f22d5031922a3c44107 +Author: Jamey Sharp +Date: Thu May 6 12:35:52 2010 -0700 + + clientErrorValue is never used outside dix. Stop importing it. + + Signed-off-by: Jamey Sharp + Reviewed-by: Keith Packard + +commit 653e4878c4cc03613172a93ad4800e1eacc98f17 +Author: Jamey Sharp +Date: Sat May 8 19:18:11 2010 -0700 + + Quit using clientErrorValue in dix/gc.c. + + Signed-off-by: Jamey Sharp + Reviewed-by: Keith Packard + +commit 5193f25ea33eed31d6a75cdc1a86427c23d8033c +Author: Jamey Sharp +Date: Sat May 8 19:08:47 2010 -0700 + + Define GCAllBits as the union of all valid CreateGC masks. + + Signed-off-by: Jamey Sharp + Reviewed-by: Keith Packard + +commit 6a84cd943430cfc9df55c83aef6a7f8dea6dbb94 +Author: Jamey Sharp +Date: Fri May 7 19:38:05 2010 -0700 + + Replace dixChangeGC with calls directly to the right variant. + + Signed-off-by: Jamey Sharp + Reviewed-by: Keith Packard + +commit 2d7eb4a19b773d0406c0c2e018a7da97f3565fd5 +Author: Jamey Sharp +Date: Fri May 7 18:11:36 2010 -0700 + + Pre-validate ChangeGC XIDs. + + In order to execute a wire-level ChangeGC request, we need to look up + the resources named by any XIDs in the value-list. Various places in the + server already have pointers to the resources they want to set into the + GC, though, so over time the interface has evolved to accept either XIDs + or pointers, with several different function call signatures used in + different eras. + + This patch makes the existing code require pointers to resources rather + than XIDs, and adds a simple wrapper that looks up any XIDs. The old + dixChangeGC API is preserved by delegating to whichever implementation + is appropriate. + + This affects error-handling: If any of the XIDs are invalid, then the GC + is unchanged, and its ChangeGC callback is not invoked. This change is + allowed by the protocol spec, which says, "The order in which components + are verified and altered is server-dependent. If an error is generated, + a subset of the components may have been altered." + + Signed-off-by: Jamey Sharp + Reviewed-by: Keith Packard + +commit e2929db7b737413cf93fbebdf4d15abdfebff05c +Author: Jamey Sharp +Date: Sat May 8 14:10:51 2010 -0700 + + dixChangeGC callers: Use ChangeGCVal instead of XID almost everywhere. + + The exceptions are ProcChangeGC and CreateGC. + + Signed-off-by: Jamey Sharp + Reviewed-by: Keith Packard + +commit 95728ca09d45afc84c8d1828c09c6b6725f1a58d +Author: Jamey Sharp +Date: Sat May 8 09:25:34 2010 -0700 + + Don't statically allocate the ChangeGC parameter array. + + Because that's insane. + + Signed-off-by: Jamey Sharp + Reviewed-by: Keith Packard + +commit bff8525f8483304d5f93e83e36b47209381da721 +Author: Jamey Sharp +Date: Sat May 8 12:06:50 2010 -0700 + + Simplify miFillPolyHelper and miLineArc. + + Both functions compute a set of spans and either fill them immediately + or accumulate them into a caller-provided buffer. + + Computing the spans used only the miTranslate and lineWidth fields of + pGC, and neither could have been changed by the initial + ChangeGC/ValidateGC pair, so it's safe to compute the spans first. + + Then both functions consume the spans the same way, so factor that into + a new fillSpans function. + + Signed-off-by: Jamey Sharp + Reviewed-by: Keith Packard + +commit 83f7ec97279405958aed86c6a57704a460c3bfba +Author: Jamey Sharp +Date: Sat May 8 13:38:00 2010 -0700 + + miwideline: Factor out span buffer allocation. + + Signed-off-by: Jamey Sharp + Reviewed-by: Keith Packard + Reviewed-by: Adam Jackson + +commit f2a0c324e37c9fa3eb9087adbf963addb7f21d88 +Author: Keith Packard +Date: Thu May 13 10:33:39 2010 -0700 + + Remove devPrivates init and delete callback lists. + + XSELinux was the only consumer of these interfaces and it no longer + needs them. + + Signed-off-by: Keith Packard + Reviewed-by: Jamey Sharp + +commit c9e7ca4404803fe44d4684e0bb2ca2ee10fd4bb3 +Author: Eamon Walsh +Date: Wed May 12 20:25:30 2010 -0400 + + xselinux: Remove use of devPrivates init/free callbacks. + + Commit eb9210097efea81065c301e5b6b4da7a566deb4a removed the + sidget/sidput calls which were the major reason for using the + callbacks. The remaining operations can be skipped or worked + around. + + Signed-off-by: Eamon Walsh + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit bca85e2e127a8a23e3a2debcfeb3ae07cd3c66ac +Author: Jeremy Huddleston +Date: Thu May 13 08:32:00 2010 -0700 + + Use _X_ATTRIBUTE_PRINTF _X_DEPRECATED _X_NORETURN + + Use the values from xproto rather than duplicating the effort + + Signed-off-by: Jeremy Huddleston + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit 421606a8ef447d10c2ee0986f20e752056a47675 +Author: Kristian Høgsberg +Date: Tue May 11 10:52:18 2010 -0400 + + dri2: Send out event when auxillary buffers are invalidated + + This lets the DRI2 clients rely on the server to notify them when they + need to get new buffers. Without this, OpenGL clients poll the server + in glViewport() which can be a performance problems and also isn't + completely correct behaviour. + + We bump the DRI2 protocol minor to indicate the availability of the + event, which the DRI2 clients can use to avoid polling. This speeds up + various piglit and oglc test cases as well as real applications. + + Signed-off-by: Kristian Høgsberg + Reviewed-by: Adam Jackson + Signed-off-by: Keith Packard + +commit f281db9a5e400c822e03a19937247baa20ecc213 +Author: Alan Coopersmith +Date: Wed May 12 23:57:58 2010 -0700 + + Remove ResNoAvoid definition, missed in the RAC removal + + ResNoAvoid is #defined to ResBios, but ResBios was removed + from xf86str.h in 4b42448a2388d40f257774fbffdccaea87bd0347 + + Signed-off-by: Alan Coopersmith + Reviewed-by: Julien Cristau + Signed-off-by: Keith Packard + +commit 315041762313598aad90df84226e2d2def4a0fc9 +Author: Jamey Sharp +Date: Sat May 8 18:55:55 2010 -0700 + + CreateGC: Pass current client on to ChangeGC. + + Otherwise we can't check that the XIDs this GC is being initialized with + are accessible to this client. + + Signed-off-by: Jamey Sharp + Cc: Eamon Walsh + Reviewed-by: Eamon Walsh + +commit 04bad1b8a118a83064316d6e4327234aee19361e +Author: Jamey Sharp +Date: Thu May 6 21:56:10 2010 -0700 + + Kill ChangeGC in favor of dixChangeGC. + + This doesn't change any behavior, but it isn't clear whether NullClient + is correct in all cases. As ajax says, + + > For most of these changes, I think it's correct to use NullClient, + > since they are server-initiated changes and should not fail for (eg) + > xace reasons. ... At any rate, you're certainly not changing any + > semantics by leaving them all as NullClient, so this patch can't be + > more wrong than before. + + The call in CreateGC is particularly questionable. + + Signed-off-by: Jamey Sharp + Reviewed-by: Adam Jackson + +commit 65cedf39054cf3a1e695e84ac228cce9e8d48097 +Author: Jamey Sharp +Date: Thu May 6 21:39:43 2010 -0700 + + Kill DoChangeGC in favor of dixChangeGC. + + This doesn't change any behavior, but it isn't clear whether NullClient + is correct in all cases. As ajax says, + + > For most of these changes, I think it's correct to use NullClient, + > since they are server-initiated changes and should not fail for (eg) + > xace reasons. ... At any rate, you're certainly not changing any + > semantics by leaving them all as NullClient, so this patch can't be + > more wrong than before. + + Signed-off-by: Jamey Sharp + Reviewed-by: Keith Packard + +commit afcbbd6dfea51c5b0adca0d720edc02ba0c2dc16 +Author: Jamey Sharp +Date: Sat May 8 15:19:03 2010 -0700 + + doPolyText needs UseAccess to each font, not ReadAccess. + + In commit 42d6112ec21949a336ee8b34469f2695273ee2d6, Eamon changed + dixChangeGC to require DixUseAccess on any GCFont XID. I think + doPolyText needs to require the same level of access. Otherwise + dixChangeGC could fail when it does the same lookup, which doPolyText + doesn't check for. + + Signed-off-by: Jamey Sharp + Cc: Eamon Walsh + Reviewed-by: Eamon Walsh + +commit 59857ee5da5f1f3f4900292581b9586477513211 +Merge: 21ceae9 432cbbe +Author: Keith Packard +Date: Wed May 12 16:48:08 2010 -0700 + + Merge remote branch 'dottedmag/for-keithp' + +commit 432cbbec194e47bf2a117c9302146e786c8a4ee1 +Author: Mikhail Gusarov +Date: Thu May 13 03:51:00 2010 +0700 + + Misc coding style cleanup + + Use a[b] instead of *(a+b), fix whitespace. + + Signed-off-by: Mikhail Gusarov + Reviewed-by: Keith Packard + +commit 816b79dd061e9839cec94a4986a7820b70ca8a7f +Author: Mikhail Gusarov +Date: Thu May 13 03:45:21 2010 +0700 + + Remove useless casts + + Signed-off-by: Mikhail Gusarov + Reviewed-by: Keith Packard + +commit 63a647abd51f44226cbd16aa04ebc57d07463c6d +Author: Mikhail Gusarov +Date: Thu May 13 03:44:12 2010 +0700 + + Fix code style: extra whitespace before () + + Signed-off-by: Mikhail Gusarov + Reviewed-by: Keith Packard + +commit 28211c443c693a1ca3db5740d0128274a3eef723 +Author: Mikhail Gusarov +Date: Thu May 13 03:43:04 2010 +0700 + + Fix warning: it's safe to pass atom strings > XA_LAST_PREDEFINED to free(3) + + Signed-off-by: Mikhail Gusarov + Reviewed-by: Keith Packard + +commit 8b5326aa98eba201dd78aea3dd7114e1a084489b +Author: Mikhail Gusarov +Date: Wed May 12 20:27:02 2010 +0000 + + Mark OsAbort as noreturn function to make gcc happier. + + Signed-off-by: Mikhail Gusarov + Reviewed-by: Matt Turner + +commit 868e372a73b377705217e0379bc6e00f36c4d8e5 +Author: Mikhail Gusarov +Date: Thu May 13 01:59:06 2010 +0700 + + Introduce X_NORETURN macro defined as __attribute__((noreturn)) for gcc + + Signed-off-by: Mikhail Gusarov + Reviewed-by: Matt Turner + +commit 5a8e2f2745ae1f74501cd3f42614a1ed2cf974f2 +Author: Mikhail Gusarov +Date: Wed May 12 18:54:51 2010 +0000 + + Do not jump through the hoops to deallocate xkbbasedirflag variable + + Fixes gcc warning as well. + + Signed-off-by: Mikhail Gusarov + Reviewed-by: Jamey Sharp + Reviewed-by: Matt Turner + +commit ff2b4cf8329b1678adafcda02e5d47a072550d47 +Author: Mikhail Gusarov +Date: Thu May 13 01:51:37 2010 +0700 + + Turn sprintf argument into literaral string, shutting up gcc warning + + Signed-off-by: Mikhail Gusarov + Reviewed-by: Matt Turner + +commit f62ba192c285b1e49bf299f03fc0b763680afaaf +Author: Mikhail Gusarov +Date: Thu May 13 01:47:26 2010 +0700 + + Do not use deprecated Xalloc function + + Signed-off-by: Mikhail Gusarov + Reviewed-by: Matt Turner + +commit 21ceae9002c6364deb3d074cf2da7d3864cf6879 +Author: Jamey Sharp +Date: Tue May 11 10:24:00 2010 -0700 + + SetFontPath: set client->errorValue on failure. + + Previously the callers were only setting errorValue on Success, when + it's ignored, and leaving it alone on failure, when it's sent to the + client. + + Since SetFontPath takes the ClientPtr, let it set client->errorValue + instead of letting the callers continue to get it wrong. + + Signed-off-by: Jamey Sharp + Reviewed-by: Julien Cristau + Signed-off-by: Keith Packard + +commit 801162919d1c625d950a5d105ae4b3487ebc30a7 +Author: Mikhail Gusarov +Date: Thu May 6 01:55:36 2010 +0700 + + Removed outdated comments obsoleted by documentation in headers + + Signed-off-by: Mikhail Gusarov + Reviewed-by: Peter Hutterer + +commit 4d55c8c4ffcb5d6c6500b462a41ace8e2359151d +Author: Mikhail Gusarov +Date: Thu May 6 01:54:13 2010 +0700 + + Use lowercase variant of XNFalloc and Xstrdup + + Using one variant of function/macro makes it easier to fix the code + later. + + Signed-off-by: Mikhail Gusarov + Reviewed-by: Peter Hutterer + +commit 3f3ff971ecff9936cebafc813af9193b97bba89c +Author: Mikhail Gusarov +Date: Thu May 6 01:44:06 2010 +0700 + + Replace X-allocation functions with their C89 counterparts + + The only remaining X-functions used in server are XNF*, the rest is converted to + plain alloc/calloc/realloc/free/strdup. + + X* functions are still exported from server and x* macros are still defined in + header file, so both ABI and API are not affected by this change. + + Signed-off-by: Mikhail Gusarov + Reviewed-by: Peter Hutterer + +commit 96c7ab27c383ec767f62a7a11e5fd76f86363fbc +Author: Mikhail Gusarov +Date: Thu May 6 00:28:25 2010 +0700 + + Deprecate allocation functions which are plain wrappers for C stdlib + + Signed-off-by: Mikhail Gusarov + Reviewed-by: Peter Hutterer + +commit a5dba0f5caefce236ebd5f71948e5a659bea58e4 +Author: Mikhail Gusarov +Date: Thu May 6 00:27:47 2010 +0700 + + Document allocation functions, noting deviations from C library + + Signed-off-by: Mikhail Gusarov + Reviewed-by: Peter Hutterer + +commit e983848ab44b0769f97f6207f1aa8b4f127be6a9 +Author: Mikhail Gusarov +Date: Thu May 6 00:16:24 2010 +0700 + + Clean {X,XNF}{alloc,calloc,realloc,free,strdup} from pre-C89 baggage + + C89 guarantees alignment of pointers returned from malloc/calloc/realloc, so + stop fiddling with alignment manually and just pass the arguments to library + functions. + + Also convert silent error when negative size is passed into function into + warning in log file. + + Signed-off-by: Mikhail Gusarov + Reviewed-by: Peter Hutterer + +commit 4f0006c2203abe0b7660c5068d6afe236f9bd2a4 +Author: Kristian Høgsberg +Date: Mon May 10 08:36:02 2010 -0400 + + dri2: Copy front to fake front in swapbuffer + + If we don't have a fake front, nothing will happen. The fix was extracted + from a bigger patch from Francisco Jerez. + + https://bugs.freedesktop.org/show_bug.cgi?id=27305 + Signed-off-by: Kristian Høgsberg + Reviewed-by: Pauli Nieminen + Signed-off-by: Keith Packard + +commit ba1f1f9d9e48226f1ef6b3222a8d92fc969d6560 +Author: Jeremy Huddleston +Date: Tue May 11 09:49:34 2010 -0700 + + XQuartz GL: Fix __glXAquaScreenCreateDrawable prototype + + Fixes regression introduced in 9de0e31746d5f0d9d39d11c94ec3cbc04a9935fc + + Signed-off-by: Jeremy Huddleston + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit 286935c6f4965a6b09de1fb9e579a00afa14082a +Author: Keith Packard +Date: Tue May 11 09:08:40 2010 -0700 + + Remember drawable ID used to find damage target for use in events. Bug 5730. + + Using Composite, window pixmaps are given names in the client resource + namespace and yet may not have any XID recorded in the drawable + structure. As such, we need to remember the XID used to lookup the + pixmap in the resource database so that we can report the correct XID + back to the client in damage events. + + Signed-off-by: Keith Packard + Reviewed-by: Adam Jackson + +commit 3df22b293c1f1d27e7ce16662744c578d35b5aba +Merge: fa6c701 9de0e31 +Author: Keith Packard +Date: Tue May 11 08:38:44 2010 -0700 + + Merge remote branch 'krh/dri2-resource-fixes' + +commit fa6c7012572093a82c9389682977efff85590719 +Author: Cyril Brulebois +Date: Mon Mar 1 02:11:36 2010 +0100 + + Fix null pointer dereference in xf86_reload_cursors(). + + Upon resume, X may try to dereference a null pointer, which has been + reported in Debian bug #507916 (http://bugs.debian.org/507916). + + Jim Paris came up with a patch which solves the problem for him. Here's + a (hopefully) fixed version of his patch (without the typo). + + Cc: Jim Paris + Signed-off-by: Cyril Brulebois + Reviewed-By: Matthias Hopf + Signed-off-by: Keith Packard + +commit 9de0e31746d5f0d9d39d11c94ec3cbc04a9935fc +Author: Kristian Høgsberg +Date: Thu Apr 29 16:36:10 2010 -0400 dri2: Take an XID for tracking the DRI2 drawable @@ -284,26 +5735,8 @@ Date: Wed Jun 2 11:13:17 2010 +1000 Tested-by: Owen W. Taylor Signed-off-by: Kristian Høgsberg - (cherry picked from commit 9de0e31746d5f0d9d39d11c94ec3cbc04a9935fc) - - Conflicts: - - hw/xfree86/dri2/dri2.c -commit 7faff42deb4b5a71504377375eba95c3cac2e013 -Author: Peter Hutterer -Date: Wed Jun 2 11:11:21 2010 +1000 - - Revert "Revert "DRI2: Track DRI2 drawables as resources, not privates"" - - This reverts commit c394b17266301d363a9e234f58f8015f74e01307. Follow-up - patch should fix the reason this was reverted in the first place. - - Conflicts: - - hw/xfree86/dri2/dri2.c - -commit 95f56176255d5b689b06793d9cbeed36c6a46227 +commit 32381363cd8f43aeb741bad70bcf96a287dac0c9 Author: Kristian Høgsberg Date: Sat May 1 13:15:00 2010 -0400 @@ -311,9 +5744,8 @@ Date: Sat May 1 13:15:00 2010 -0400 Signed-off-by: Kristian Høgsberg Reviewed-by: Adam Jackson - (cherry picked from commit 32381363cd8f43aeb741bad70bcf96a287dac0c9) -commit 44521bb9d03a0b7af10f89c98e51bd4109fec327 +commit 4a8a615d01b9ed18c272414bd11dc2fc661727e5 Author: Kristian Høgsberg Date: Sat May 1 13:13:54 2010 -0400 @@ -330,9 +5762,8 @@ Date: Sat May 1 13:13:54 2010 -0400 Signed-off-by: Kristian Høgsberg Reviewed-by: Ian Romanick Reviewed-by: Adam Jackson - (cherry picked from commit 4a8a615d01b9ed18c272414bd11dc2fc661727e5) -commit a847cc9bce744cab72637d62bc6bd45237bd3de5 +commit 6d7ba5e0fcb5d1bce6bb213dec009f3a0f802d26 Author: Kristian Høgsberg Date: Sat May 1 13:07:46 2010 -0400 @@ -359,408 +5790,8 @@ Date: Sat May 1 13:07:46 2010 -0400 Signed-off-by: Kristian Høgsberg Reviewed-by: Keith Packard - (cherry picked from commit 6d7ba5e0fcb5d1bce6bb213dec009f3a0f802d26) -commit b65c5be170835db2282192381ef411997e61a6f1 -Author: Peter Hutterer -Date: Wed Jun 2 09:27:33 2010 +1000 - - xserver 1.8.1.901 - - Signed-off-by: Peter Hutterer - -commit 1b71e0a8b9e915c806f6c3596b6ee5913d62fdc3 -Author: Peter Hutterer -Date: Mon May 24 12:25:15 2010 +1000 - - xfree86: fix multiple InputAttributes tag matching. - - attr->tags is an array of strings (null-terminated). When matching, match - against each string instead of each [i,end] substring in the first tag. - - Signed-off-by: Peter Hutterer - Reviewed-by: Jamey Sharp - Signed-off-by: Keith Packard - (cherry picked from commit b5e0f6d8f45c5b24eb50b305c66fa80c783ef488) - -commit f7a2da6df80044bf2d92b0bee94a13f7d76960ad -Merge: 2ab11e0 354e4ce -Author: Peter Hutterer -Date: Tue May 25 15:52:53 2010 +1000 - - Merge branch 'server-1.8-branch' of git://people.freedesktop.org/~alanc/xserver into server-1.8-branch - -commit 354e4ce3774d6b7f0c571f426bd2db1c8ab272ea -Author: Alan Coopersmith -Date: Sat May 22 10:29:00 2010 -0700 - - Add RandR 1.2 README.modes doc to EXTRA_DIST - - Signed-off-by: Alan Coopersmith - Reviewed-by: Julien Cristau - (cherry picked from commit 1805c74d9b0ed46802481bcd6beea5feeb60212c) - -commit 9a71d21cc27c7b0d35bae9d6dc4eed591dea99a4 -Author: Aaron Zang -Date: Thu May 20 17:56:28 2010 -0700 - - Solaris: Use VT_SET_CONSUSER ioctl to set Console User rights profile - - When Xorg is started on display :0, this ioctl is called to grant the - user the rights traditionally associated with /dev/console (before VT - support was added), such as access to local peripheral devices. - - Also adds a Solaris-specific -C flag to force starting on /dev/console - instead of /dev/vt*, allowing programs like xterm -C to access the - console device. - - Signed-off-by: Alan Coopersmith - Reviewed-by: Adam Jackson - Signed-off-by: Keith Packard - (cherry picked from commit 989db930d739483759087b13b8d9a043299feafb) - -commit a8d40f61bf42a55fbd4fcd6468c94cb595e490cc -Author: Alan Coopersmith -Date: Thu May 20 17:56:26 2010 -0700 - - Xserver(1) man page updates - - - Note that -br is now default. - - Move -bs after -br for alphabetical ordering. - - Remove -config option that's been hidden in "ignore" section, - since ajax removed the -config code a couple years back. - - Add -nocursor option. - - Add xinput & xrandr to list of runtime server control programs - - Replace XDarwin with Xquartz in list of Xservers - - Signed-off-by: Alan Coopersmith - Reviewed-by: Adam Jackson - Signed-off-by: Keith Packard - (cherry picked from commit 7b09335a46f9428141811230c69eef7968531359) - -commit 2ab11e09734dec4f119166fa6512eb25b4572e48 -Author: Peter Hutterer -Date: Fri May 21 13:30:25 2010 +1000 - - dix: remove obsolete comment.from EnableDevice. - - The code this comment was referring to was removed in - 8b5086250aa5dae8de8b763408ff480d7beac819 "Eliminate bogus event resizing." - - Signed-off-by: Peter Hutterer - Reviewed-by: Daniel Stone - Signed-off-by: Keith Packard - (cherry picked from commit cf4f3d051858aadedd6e333bb317a1daa3987ad7) - -commit 869d37721425d219c50962b694c3326407d1d2e6 -Author: Jamey Sharp -Date: Wed May 19 10:44:33 2010 -0700 - - Device init: Don't crash when CreateGC fails. - - ActivateDevice was ignoring errors from DeviceCursorInitialize, so - cursor-related calls failed later. Jeremy Huddleston saw that crash in - miPointerConstrainCursor, while with Xvfb I saw it in - miSpriteRealizeCursor. - - miDCDeviceCleanup frees any non-NULL GCs. miDCDeviceInitialize calls - Cleanup on any failure, but if it failed early then some of the pointers - in the miDCBufferPtr were garbage. Switch from malloc to calloc to - ensure everything's initialized safely first. - - With these two fixes, if CreateGC fails then the server gracefully fails - in FatalError instead of segfaulting. - - Signed-off-by: Jamey Sharp - Cc: Peter Hutterer - Reviewed-by: Peter Hutterer - Signed-off-by: Keith Packard - - (cherry-picked from commit b9f48d60bc0c839bd323c582231e8e7e2b810af6) - -commit a8de0866130df62c2b1e4653e028a0fe365e0e3a -Author: Jesse Barnes -Date: Tue Mar 23 09:47:08 2010 -0700 - - GLX/DRI2: expose swap control extensions if DDX support is present - - Export DDX swap control status from the DRI2 module and check for it in - GLX when initializing extensions. - - Reviewed-by: Mario Kleiner - Signed-off-by: Jesse Barnes - (cherry picked from commit 165a4a9c7de0fcc6ef6a6421736b412ccb35965e) - -commit b24856626e1836657ebf35ad4c61984e0a407c5b -Author: Jesse Barnes -Date: Mon Mar 8 15:10:47 2010 -0800 - - DRI2: prevent swap wakes from waking MSC waiters - - If a few swaps were queued leading to a throttle related block on the - client, and then the client submitted an MSC wait, one of the previous - swap wakeups could have caused the MSC wait to complete early. Add a - flag for this to prevent a swap wake from prematurely waking an MSC - waiter. - - Reported-by: Mario Kleiner - Reviewed-by: Mario Kleiner - Signed-off-by: Jesse Barnes - (cherry picked from commit 5933b0abc6a76aaea84aa534df89900cd795c888) - -commit 5c54e7fa004532d595160a815177dda467b3cc9c -Author: Jesse Barnes -Date: Mon Mar 8 12:41:25 2010 -0800 - - DRI2: handle swapsPending better - - Avoid a potential swapsPending underflow by incrementing it before - ScheduleSwap, which may complete it immediately. And be sure to - decrement it again in case the schedule failed. - - Reported-by: Mario Kleiner - Reviewed-by: Mario Kleiner - Signed-off-by: Jesse Barnes - (cherry picked from commit b00d435ddf2e9817e33bfd5f7e9b905442dc23c7) - -commit fcd76ddfc59de6a1d37ca2aa6e6e91cb8d814744 -Author: Jesse Barnes -Date: Mon Mar 8 12:39:54 2010 -0800 - - DRI2: throttle swaps at submission time too - - We need to throttle swaps here in addition to when the context is made - current to avoid causing problems with clients that just swap. - Throttling here also ensures our swaps get ordered as long as we block - the client occasionally. - - Reported-by: Mario Kleiner - Reviewed-by: Mario Kleiner - Signed-off-by: Jesse Barnes - (cherry picked from commit 0294ff2a5cadddc8fcc77ba9a851f979f0b91fc3) - -commit c7e9e36fd3cdb889704d3b0e1333653d06ef9069 -Author: Jesse Barnes -Date: Mon Mar 8 12:38:37 2010 -0800 - - DRI2: advertise lowest supported DRI2 protocol version - - Update our supported DRI2 protocol version as each driver does - DRI2ScreenInit, since depending on available kernel features, each DDX - may support different callbacks and therefore protocol. - - Reviewed-by: Mario Kleiner - Signed-off-by: Jesse Barnes - (cherry picked from commit db1c7cb604167baf49e61be4c09ccf7b592c4af3) - -commit 20708781d43501f116b4161c1cc96b0eb39e96b1 -Author: Jesse Barnes -Date: Fri Mar 5 09:49:03 2010 -0800 - - DRI2: handle swap_interval of 0 correctly - - A 0 swap interval means that swaps shouldn't be sync'd to vblank, so - just complete the swap immediately in that case. - - Reviewed-by: Mario Kleiner - Signed-off-by: Jesse Barnes - (cherry picked from commit 87ca6320f26eb3129e3c19056e1d8fa5c1784723) - -commit 73fe4a0952b5c8aea90bce6f758546c13d0754b5 -Author: Jesse Barnes -Date: Fri Mar 5 09:15:24 2010 -0800 - - DRI2: drawable lifetime fixes - - Handle drawable destruction and lifetime correctly. - - Check whether the drawable priv is valid in DRI2SwapInterval(), - DRI2WaitSBC() and DRI2WaitMSC(); it may have gone away, so be sure to - check it before using it. - - If more than 1 outstanding swap is queued, we may complete several after - an app has exited. If we free it after the first one completes and the - refcount reaches 0, we'll crash the server on subsequent completions. - So delay freeing until all swaps complete and remove the error message - as this is a normal occurence. To do this properly, we must also avoid - destroying drawables in DRI2DestroyDrawable() if a swap or wait event is - pending. - - And finally, make sure we free drawables in DRI2WaitMSCComplete() if - necessary (i.e. if the refcount has reached 0 and this MSC was the last - pending event on the object). - - Reported-by: Mario Kleiner - Reviewed-by: Mario Kleiner - Signed-off-by: Jesse Barnes - (cherry picked from commit 8476d99231cb725c090305d60f1c1c889d25c8dc) - -commit 23d78005b06b15f7b68fc4eed7e325ad29d0880a -Author: Jesse Barnes -Date: Thu Mar 4 10:31:59 2010 -0800 - - DRI2: fix swapbuffers handling of SBC and target MSC - - Returns expected SBC after completion of swap to caller, as required by - OML_sync_control spec, instead of the last_swap_target value. - - Passes target_msc, divisor, remainder, correctly for - glXSwapBuffersMscOML() call, while retaining old behaviour for simple - glXSwapBuffers() call. - - An OML swap can have a 0 target_msc, which just means it needs to - satisfy the divisor/remainder equation. Pass this down to the driver as - needed so we can support it. - - Signed-off-by: Jesse Barnes - Signed-off-by: Mario Kleiner - (cherry picked from commit b180e43977710b56ccfd6780f204ddcc952987a1) - -commit a56178402ede82ed3ffd81439b2efc4a39f2779e -Author: Mario Kleiner -Date: Sun Feb 21 05:26:00 2010 +0100 - - DRI2WaitSbc(): Fixes for correct semantic of glXWaitForSbcOML() - - Added implementation for case target_sbc == 0. In that case, the - function shall schedule a wait until all pending swaps for the drawable - have completed. - - Fix for non-blocking case. Old implementation returned random, - uninitialized values for (ust,msc,sbc) if it returned immediately - without scheduling a wait due to sbc >= target_sbc. - - Now if function doesn't schedule a wait, but returns immediately, - it returns the (ust,msc,sbc) of the most recently completed swap, - i.e., the UST and MSC corresponding to the time when the returned - current SBC was reached. - - Signed-off-by: Mario Kleiner - (cherry picked from commit 751e8c09d34df4b41e8d8384a3ec1bf5cb8ca028) - -commit a9b70da1afe7361955a19d34bb5e9b94dc156889 -Author: Mario Kleiner -Date: Sun Feb 21 05:25:59 2010 +0100 - - DRI2: Fix glitches in DRI2SwapComplete() and DRI2WakeupClient() - - DRI2SwapComplete(): Increment pPriv->swap_count++; before calling - into callback for INTEL_swap_events extension, so the swap event - contains the current SBC after swap completion instead of the - previous one. - - DRI2WakeupClient: Check for pPriv->target_sbc <= pPriv->swap_count, - had wrong comparison pPriv->target_sbc >= pPriv->swap_count for - unblocking of clients of DRI2WaitSBC(). - - Signed-off-by: Mario Kleiner - (cherry picked from commit 0de4974b90b10fa6a447cdf980b4a114c6c9e5a8) - -commit 96a12314ae41a2edec67d388c1c4770bd099d9ec -Author: Jesse Barnes -Date: Thu Mar 4 09:54:15 2010 -0800 - - DRI2: make target_sbc signed - - We need to track invalid targets as well as 0 targets, so just make it - signed so our comparisons work like they should. - - Reviewed-by: Mario Kleiner - Reported-by: Kristian Høgsberg - Signed-off-by: Jesse Barnes - (cherry picked from commit 4c8ec49826a46eb3b36c69d2ad3f82320c179c38) - -commit 18dc5d1f15fe0df7e836b057d34c4ca596e31e8f -Author: Jesse Barnes -Date: Thu Mar 4 09:19:13 2010 -0800 - - DRI2: fixup handling of last_swap_target - - We need to initialize the swap target, which is passed to the driver to - schedule events. Rather than using -1 to indicate that the field is - uninitialized, just make sure we initialize it at drawable creation - time. - - Reviewed-by: Mario Kleiner - Signed-off-by: Jesse Barnes - (cherry picked from commit c4d54816f2ee4883d8f9bcf4595474fb58c95146) - -commit 0d9d1e114322878fb50503f69b308b25a812dfb1 -Merge: 4b7ff07 7be5527 -Author: Peter Hutterer -Date: Tue May 18 14:46:42 2010 +1000 - - Merge branch 'server-1.8-branch' of git://people.freedesktop.org/~jeremyhu/xserver into server-1.8-branch - -commit 4b7ff07db28ea5302a1965496d1fd71a9d99780e -Author: Keith Packard -Date: Mon May 10 11:46:25 2010 -0700 - - Check pixmap allocation return value when creating glyphs - - The driver may decide that the pixmap is too large or something and - fail to allocate a pixmap; not checking would lead to a segfault. - - Signed-off-by: Keith Packard - Reviewed-by: Jamey Sharp - (cherry picked from commit 87ea5760f86eb60840e6e2c10012915952df5377) - -commit e789c860a682454fc86032e88b618f255409c33a -Author: Alan Coopersmith -Date: Thu Apr 29 18:45:34 2010 -0700 - - Fix compiler issues with getifaddrs() call on OpenSolaris - - OpenSolaris recently added support for the getifaddrs() API. - - Building with that uncovered two compiler issues (one warning, one error) - in the code that was now being built for the first time in our builds: - - "access.c", line 768: warning: argument #1 is incompatible with prototype: - prototype: pointer to struct sockaddr {unsigned short sa_family, array[14] of char sa_data} : "access.c", line 213 - argument : pointer to struct sockaddr_storage {unsigned short ss_family, array[6] of char _ss_pad1, double _ss_align, array[240] of char _ss_pad2} - - "access.c", line 838: assignment type mismatch: - struct sockaddr {unsigned short sa_family, array[14] of char sa_data} "=" struct sockaddr_storage {unsigned short ss_family, array[6] of char _ss_pad1, double _ss_align, array[240] of char _ss_pad2} - - Signed-off-by: Alan Coopersmith - Reviewed-by: Jamey Sharp - (cherry picked from commit e42a29d269fadc11e065c63ee369e3165196f2d7) - -commit 3b6d2b0026f5c37eaeb50441eb2392b9cde962e8 -Author: Jamey Sharp -Date: Fri May 14 10:36:13 2010 -0700 - - test/xi2: Initialize predefined atoms before XInputExtensionInit. - - XInputExtensionInit calls MakeAtom, which doesn't work without the atoms - table initialized. - - Signed-off-by: Jamey Sharp - Cc: Peter Hutterer - Tested-by: Keith Packard - Signed-off-by: Keith Packard - (cherry picked from commit c6613cfc26e76b296e620640bf33e756eb4ae178) - -commit 3a3edb2c3d63a3849a95c7911612b57c9af6a341 -Author: Cyril Brulebois -Date: Mon Mar 1 02:11:36 2010 +0100 - - Fix null pointer dereference in xf86_reload_cursors(). - - Upon resume, X may try to dereference a null pointer, which has been - reported in Debian bug #507916 (http://bugs.debian.org/507916). - - Jim Paris came up with a patch which solves the problem for him. Here's - a (hopefully) fixed version of his patch (without the typo). - - Cc: Jim Paris - Signed-off-by: Cyril Brulebois - Reviewed-By: Matthias Hopf - Signed-off-by: Keith Packard - (cherry picked from commit fa6c7012572093a82c9389682977efff85590719) - -commit 6bb86db2eb6e27e06bd2270429a76008af2dcd94 +commit 10de9e8ee37265a35ceeceb2007d711da70d4f2d Author: Peter Hutterer Date: Fri Apr 16 16:35:22 2010 +1000 @@ -775,9 +5806,8 @@ Date: Fri Apr 16 16:35:22 2010 +1000 Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone Tested-by: Ben Hutchings - (cherry picked from commit 10de9e8ee37265a35ceeceb2007d711da70d4f2d) -commit fd562d11d6cbde2b227e524ae2a9ce4e347b944b +commit 758b8614477b53dc3de2b884fec5ccaf8a736432 Author: David James Date: Mon May 10 14:00:49 2010 -0700 @@ -793,9 +5823,24 @@ Date: Mon May 10 14:00:49 2010 -0700 Signed-off-by: David James Reviewed-by: Adam Jackson Signed-off-by: Keith Packard - (cherry picked from commit 758b8614477b53dc3de2b884fec5ccaf8a736432) -commit 4bcc0448b42b06ec133886ccb4f029b57b6f2b3e +commit 95074538cce93abc1739a4d9dd78b0500fb8fec9 +Merge: c079977 2160ff5 +Author: Keith Packard +Date: Mon May 10 13:49:33 2010 -0700 + + Merge remote branch 'jamey/for-keith' + +commit 2160ff5240d7e11bdc6cec8859fd1f10395c8edd +Author: Jamey Sharp +Date: Fri May 7 20:00:40 2010 -0700 + + Simplify error-handling in dixChangeGC. + + Signed-off-by: Jamey Sharp + Reviewed-by: Keith Packard + +commit 4080cd42fde8b4c693eab7557581af2622479109 Author: Jamey Sharp Date: Sat May 8 09:41:46 2010 -0700 @@ -810,9 +5855,28 @@ Date: Sat May 8 09:41:46 2010 -0700 Signed-off-by: Jamey Sharp Reviewed-by: Adam Jackson - (cherry picked from commit 4080cd42fde8b4c693eab7557581af2622479109) -commit c1e6e7ea968f86f61fd1bfdf4764c57be2a93605 +commit ccdaecc5471cc2d56b1702eeed4280bb4d58c515 +Author: Jamey Sharp +Date: Sat May 8 12:26:47 2010 -0700 + + Move AppendSpanGroup from miwideline.h to miwideline.c. + + Also make it stop being a macro. + + Signed-off-by: Jamey Sharp + Reviewed-by: Keith Packard + +commit 4272d6722c0f65bdfafc95e91cc2fdb8f6bd072e +Author: Jamey Sharp +Date: Sat May 8 12:18:37 2010 -0700 + + Expand macros that are used only in miFillPolyHelper. + + Signed-off-by: Jamey Sharp + Reviewed-by: Keith Packard + +commit c0799779dffeef8cef228bdc57aa6c8b323e7485 Author: Keith Packard Date: Mon Apr 26 17:22:12 2010 -0700 @@ -821,9 +5885,78 @@ Date: Mon Apr 26 17:22:12 2010 -0700 Signed-off-by: Keith Packard Reviewed-by: Jamey Sharp Reviewed-by: Matt Turner - (cherry picked from commit c0799779dffeef8cef228bdc57aa6c8b323e7485) -commit de3275537db09065510ca2a697cbbe184da9f207 +commit 946f664b6ab421f69df3dc3213b14b085424c9e4 +Author: Adam Jackson +Date: Thu May 6 17:58:29 2010 -0400 + + mi: Delete wide ellipse arc cache + + This does make wide ellipses slower, by a factor of twoish: + + 946000.0 521000.0 ( 0.55) 10-pixel wide ellipse + 98300.0 49900.0 ( 0.51) 100-pixel wide ellipse + 17700.0 9310.0 ( 0.53) 500-pixel wide ellipse + 16900.0 7980.0 ( 0.47) 100-pixel wide dashed ellipse + 16100.0 5370.0 ( 0.33) 100-pixel wide double-dashed ellipse + + But no one cares, and it's a modest size win: + + text data bss dec hex filename + 1773824 69552 59288 1902664 1d0848 hw/vfb/Xvfb.before + 1773112 69552 58648 1901312 1d0300 hw/vfb/Xvfb + + Signed-off-by: Adam Jackson + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit 580b99bb8af4ea093953c2b885bd4272aaf02baf +Author: Jamey Sharp +Date: Thu May 6 11:00:39 2010 -0700 + + Return BadPicture, not BadPixmap, if alpha-map is invalid. + + I believe this is what was intended. + + Signed-off-by: Jamey Sharp + Reviewed-by: Adam Jackson + Signed-off-by: Keith Packard + +commit c677fc611b124c44adfcfb95718798105f26357b +Author: Jamey Sharp +Date: Thu May 6 11:00:38 2010 -0700 + + VERIFY_PICTURE always returns BadPicture. Don't bother specifying. + + Same goes for VERIFY_ALPHA, VERIFY_XIN_PICTURE, and VERIFY_XIN_ALPHA. + + Signed-off-by: Jamey Sharp + Reviewed-by: Julien Cristau + Reviewed-by: Adam Jackson + Signed-off-by: Keith Packard + +commit 35761d5f811406bc0b6a68c1b02bdb699142745c +Author: Jamey Sharp +Date: Thu May 6 11:00:37 2010 -0700 + + Introduce dixLookupFontable for "FONT or GC" parameters. + + Signed-off-by: Jamey Sharp + Reviewed-by: Julien Cristau + Reviewed-by: Adam Jackson + Signed-off-by: Keith Packard + +commit 2eab697adba4b1858a530750e9a35fba79a7bf26 +Author: Alan Coopersmith +Date: Fri May 7 09:32:34 2010 -0700 + + Constify function prototypes in auth & xdmcp code + + Signed-off-by: Alan Coopersmith + Tested-by: Gaetan Nadon + Signed-off-by: Keith Packard + +commit e2e2747f40c4b9e23dba38ea656d4c082e83a794 Author: Matthias Hopf Date: Fri May 7 18:46:30 2010 +0200 @@ -834,9 +5967,18 @@ Date: Fri May 7 18:46:30 2010 +0200 Signed-off-by: Matthias Hopf Reviewed-by: Matt Turner Signed-off-by: Keith Packard - (cherry picked from commit e2e2747f40c4b9e23dba38ea656d4c082e83a794) -commit 80547b14a85e4c44631e8b2dc3cd67ccfda7fb43 +commit 626f97688a89dbc5da80390d822d21b1a737de0e +Author: Adam Tkac +Date: Fri May 7 17:02:03 2010 +1000 + + Export XkbCopyDeviceKeymap from Xorg, it is needed by VNC. + + Signed-off-by: Adam Tkac + Reviewed-by: Peter Hutterer + Signed-off-by: Keith Packard + +commit 21ed660f30a3f96c787ab00a16499e0fb034b2ad Author: Chris Humbert Date: Fri May 7 17:02:43 2010 +1000 @@ -851,9 +5993,8 @@ Date: Fri May 7 17:02:43 2010 +1000 Signed-off-by: Chris Humbert Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard - (cherry picked from commit 21ed660f30a3f96c787ab00a16499e0fb034b2ad) -commit 331e9720b5c05e43b8343d5c71d821dee0463c3e +commit 9802839d35aaf788790f1d0e8300db4693a70096 Author: Peter Hutterer Date: Fri May 7 16:22:12 2010 +1000 @@ -871,9 +6012,20 @@ Date: Fri May 7 16:22:12 2010 +1000 Signed-off-by: Peter Hutterer Reviewed-by: Julien Cristau Signed-off-by: Keith Packard - (cherry picked from commit 9802839d35aaf788790f1d0e8300db4693a70096) -commit dee99e6925c8e51263398bd2c8fb70289dae748c +commit 72758287f79a4f1aa8fa388f20947042e3e14693 +Author: Julien Cristau +Date: Tue May 4 15:15:02 2010 +0200 + + XQuartz: add new localization files to EXTRA_DIST + + commit 206531f75cd41c034e89fdfbc75ab0910682eef8 added localization files + for ar, add them to the Makefile. + + Signed-off-by: Julien Cristau + Reviewed-by: Jeremy Huddleston + +commit a3f5d30ba61e70b3de8b48754dea32715ba93c40 Author: Keith Packard Date: Fri Apr 30 16:10:32 2010 -0700 @@ -887,11 +6039,8 @@ Date: Fri Apr 30 16:10:32 2010 -0700 Reviewed-by: Adam Jackson Signed-off-by: Keith Packard - (cherry picked from commit a3f5d30ba61e70b3de8b48754dea32715ba93c40) - - Signed-off-by: Peter Hutterer -commit ede10681c4f9d835fa8af115e349e2fd9feeb697 +commit cdeb2c23f80ced961fe205125547e16905885534 Author: Keith Packard Date: Fri Apr 30 12:18:09 2010 -0700 @@ -902,134 +6051,23 @@ Date: Fri Apr 30 12:18:09 2010 -0700 Reviewed-by: Adam Jackson Signed-off-by: Keith Packard - (cherry picked from commit cdeb2c23f80ced961fe205125547e16905885534) -commit 7be55271d090d9c837ee7e1c43c09c76961a7173 -Author: Jeremy Huddleston -Date: Sun May 16 10:14:02 2010 -0700 +commit a80b1f888f2f7674a715d512ab950eeadee20448 +Merge: 4971099 0efd7b8 +Author: Keith Packard +Date: Sun May 2 16:35:17 2010 -0700 - XQuartz: Fix a build failure on Tiger - - Signed-off-by: Jeremy Huddleston - (cherry picked from commit 37f0b45dbe4ea52bc127720207c7157b2b803ac0) + Merge remote branch 'jeremyhu/master' -commit d415f36b8e40d7df94da8910f370fb28004046cf -Author: Jeremy Huddleston -Date: Sun May 16 10:03:13 2010 -0700 - - XQuartz: Don't use deltaXY for determining pointer location on scroll events - - - - Signed-off-by: Jeremy Huddleston - Reviewed-by: Edward Moy - (cherry picked from commit ecfeabec8d0dcfe286fb893047f1fe1a7ea9f8f5) - -commit aad87519b8bd6983a28d537eec4fb15570da73b5 -Author: Jeremy Huddleston -Date: Sat May 15 10:53:09 2010 -0700 - - XQuartz: Don't trust deltaXY for middle mouse clicks. - - The middle mouse clicks return erroneous values after returning from - Fast User Switching. - - - http://xquartz.macosforge.org/trac/ticket/389 - - Signed-off-by: Martin Otte - Reviewed-by: Jeremy Huddleston - Reviewed-by: Edward Moy - Signed-off-by: Jeremy Huddleston - (cherry picked from commit a911292c85f7069d2caabcb677ed716a04227526) - -commit afd730f57fa1cd3e10ac47666bd6739016d60d55 -Author: Peter Hutterer -Date: Tue May 11 13:55:55 2010 +1000 - - xserver 1.8.1 - - Signed-off-by: Peter Hutterer - -commit 3ffde1e403666b8c84ce34d46caef6e19b87cf51 -Author: Adam Tkac -Date: Fri May 7 17:02:03 2010 +1000 - - Export XkbCopyDeviceKeymap from Xorg, it is needed by VNC. - - Signed-off-by: Adam Tkac - Reviewed-by: Peter Hutterer - Signed-off-by: Keith Packard - (cherry picked from commit 626f97688a89dbc5da80390d822d21b1a737de0e) - -commit 7e1f1ed5e99917f65b998eae0202c6c0a51e6819 -Author: Julien Cristau -Date: Tue May 4 15:15:02 2010 +0200 - - XQuartz: add new localization files to EXTRA_DIST - - commit 206531f75cd41c034e89fdfbc75ab0910682eef8 added localization files - for ar, add them to the Makefile. - - Signed-off-by: Julien Cristau - Reviewed-by: Jeremy Huddleston - (cherry picked from commit 72758287f79a4f1aa8fa388f20947042e3e14693) - -commit 7af94a816cd89eaf2777b6c38ba8b1d2a8965d65 -Author: Peter Hutterer -Date: Tue May 4 08:16:21 2010 +1000 - - xserver 1.8.0.902 - - Signed-off-by: Peter Hutterer - -commit d57d14d039ecbdbe1c960e0b0b5d029f6dfa4000 -Author: Peter Hutterer -Date: Tue May 4 08:14:39 2010 +1000 - - mi: don't thrash resources when displaying the software cursor across screens - - This changes the DC layer to maintain a persistent set of GCs/pixmaps/pictures - for each pScreen instead of failing to thrash between them when changing - screens. - - Signed-off-by: Pierre-Loup A. Griffais - Reviewed-by: Peter Hutterer - Signed-off-by: Peter Hutterer - Tested-by: Peter Hutterer - (cherry picked from commit 518f3b189b6c8aa28b62837d14309fd06163ccbb) - - Conflicts: - - mi/midispcur.c - - Signed-off-by: Peter Hutterer - -commit 2f5b5bc8f4c70dab99dd616064219de5c7fbf244 -Author: Pierre-Loup A. Griffais -Date: Wed Apr 21 18:11:05 2010 -0700 - - xf86: Don't crash when switching modes through RandR without owning the VT. - - While VT-switched, FB access is disabled and should remain so. Trying to switch - modes in that state would re-enable it, potentially causing crashes if trying - to access it before the driver has recovered from the mode switch. - - Signed-off-by: Pierre-Loup A. Griffais - Reviewed-by: Adam Jackson - Signed-off-by: Keith Packard - (cherry picked from commit 41bdb6c003cca3ef0ff88d9c7de318115bab1ba2) - -commit 7317dc45bcf2cac0b8313a2703ae7b0bff2f1cd8 +commit 0efd7b8d82a48793341e27d4c224986e0971687c Author: Jeremy Huddleston Date: Tue Apr 27 13:14:47 2010 -0700 XQuartz GLX: Change around includes for better compatability with different OS versions Signed-off-by: Jeremy Huddleston - (cherry picked from commit 0efd7b8d82a48793341e27d4c224986e0971687c) -commit c0d92b4268094acde2cda548e96c7299dfd393dc +commit 7b506fdc840aebed6b5acb91437a2cb620b5bddc Author: Jeremy Huddleston Date: Wed Apr 21 08:38:53 2010 -0700 @@ -1038,18 +6076,16 @@ Date: Wed Apr 21 08:38:53 2010 -0700 This avoids painting the root window when it isn't actually drawable. Signed-off-by: Jeremy Huddleston - (cherry picked from commit 7b506fdc840aebed6b5acb91437a2cb620b5bddc) -commit 11698f7b86a67c1c79a0abbf162b47bc0917f2fb +commit 4d3789c9b3fbe6aad32fcacd964353b612640f27 Author: Jeremy Huddleston Date: Sun Apr 18 01:22:27 2010 -0700 rootless: Remove an unneeded comment Signed-off-by: Jeremy Huddleston - (cherry picked from commit 4d3789c9b3fbe6aad32fcacd964353b612640f27) -commit 523a036bfc8d801b2827633baa92fb588500a6e4 +commit 048d15192af39ba5111882d18a957b6ff4e34cad Author: Oliver McFadden Date: Thu Apr 22 10:29:44 2010 +0300 @@ -1057,39 +6093,106 @@ Date: Thu Apr 22 10:29:44 2010 +0300 Signed-off-by: Oliver McFadden Reviewed-by: Jeremy Huddleston - (cherry picked from commit 048d15192af39ba5111882d18a957b6ff4e34cad) -commit adcff144cfd21a6381e7ff970711e6524fc4479e -Author: Peter Hutterer -Date: Wed Apr 21 15:51:20 2010 +1000 +commit 4971099860e8e6d7817ada92e2636cb435fd002d +Author: Tiago Vignatti +Date: Sun May 2 19:14:39 2010 +0300 - Xext: only update the sprite on pointer events. + dix: wrap variables with #ifdef when panoramix is not used - A call to miPointerUpdateSprite for the XTEST keyboard may result in a - NULL pointer dereference in miDCPutUpCursor() when the save buffer is NULL. + this shut up some warnings. - XTS test case: Xlib 11 KeymapNotify - - Signed-off-by: Peter Hutterer - (cherry picked from commit af170a4ab76d33254dd4e54a33bb410fa1624739) + Signed-off-by: Tiago Vignatti + Reviewed-by: Jamey Sharp + Signed-off-by: Keith Packard -commit 5958ded6f839e61a3e27d38a912468f38b41ba33 -Author: Dirk Wallenstein -Date: Sat Apr 17 21:36:23 2010 +0200 +commit 40858960c02a7694b0e1b72e2a986805580ff6f1 +Author: Keith Packard +Date: Thu Apr 29 12:24:51 2010 -0700 - xkb: Fix omissions in geometry initialization #27679 + Delete loop with no effect from GlyphUninit - _XkbCopyGeom did not copy all of the data from the source geometry. This - resulted in failures when trying to obtain the keymap from a server - where the default geometry has not been replaced by a custom - configuration. - - Signed-off-by: Dirk Wallenstein - Reviewed-by: Daniel Stone - Signed-off-by: Peter Hutterer - (cherry picked from commit bac1c5f1be4588b2b1eb646ee98a5442e1b767d5) + Signed-off-by: Keith Packard + Reviewed-by: Jamey Sharp -commit c61bceee7a507f84770a4d7a0eced8faa2d48393 +commit 65e961fcc1da0f1e6c1c477701b2eeb36955ed24 +Author: Keith Packard +Date: Thu Apr 29 12:24:49 2010 -0700 + + Replace some input devPrivates with regular struct fields + + In the process, fixes a memory leak in CloseDevice, and an unchecked + memory allocation in InitializePredictableAccelerationProperties. + + Signed-off-by: Keith Packard + Reviewed-by: Jamey Sharp + +commit 998e982b775073da59412dce8ce609ea2ad7967c +Author: Keith Packard +Date: Thu Apr 29 12:24:48 2010 -0700 + + Move callback definitions to their own file + + Needed as the privates stuff uses the callbacks before they would have + been defined in dix.h + + Signed-off-by: Keith Packard + Reviewed-by: Jamey Sharp + +commit 7dde50c649089b03650d6497079a690feea65e22 +Author: Keith Packard +Date: Thu Apr 29 12:24:47 2010 -0700 + + Move X_DEPRECATED to misc.h so it can be used outside resource.h + + Signed-off-by: Keith Packard + Reviewed-by: Jamey Sharp + +commit 5623908aeef70e5083f3b49986c7547ed044fedd +Author: Aaron Plattner +Date: Wed Apr 28 12:37:08 2010 -0700 + + dix: Improve documentation of the DIX private data functions. + + The functions exported by the devPrivates code were poorly documented. I tried + to spruce it up a little. + + Signed-off-by: Aaron Plattner + Reviewed-by: Tiago Vignatti + Signed-off-by: Keith Packard + +commit 986d46144b183a36b4e98aed95eca0c55a8b4251 +Merge: a974c8e b5b8f91 +Author: Keith Packard +Date: Fri Apr 30 12:40:53 2010 -0700 + + Merge remote branch 'jamey/for-keith' + + Conflicts: + hw/xfree86/common/xf86xv.c + +commit a974c8e7cba40c8d7d1b91e07de8c414627b71a2 +Merge: 6581bc4 02e8622 +Author: Keith Packard +Date: Fri Apr 30 12:33:00 2010 -0700 + + Merge remote branch 'whot/for-keith' + +commit 6581bc4591746c906d97f8b868f946c47bc6d756 +Merge: 0e91e19 d073e51 +Author: Keith Packard +Date: Fri Apr 30 12:29:52 2010 -0700 + + Merge remote branch 'yselkowitz/master' + +commit 0e91e19f783d21198fc2e210203e0f10040a9cd0 +Merge: 81a081c edbc56c +Author: Keith Packard +Date: Fri Apr 30 12:27:51 2010 -0700 + + Merge remote branch 'vignatti/for-keith' + +commit 02e86221b851e5423a95782aa7e297ea051022ca Author: Peter Hutterer Date: Thu Apr 29 09:48:37 2010 +1000 @@ -1105,9 +6208,19 @@ Date: Thu Apr 29 09:48:37 2010 +1000 Signed-off-by: Peter Hutterer Acked-by: Julien Cristau Reviewed-by: Dan Nicholson - (cherry picked from commit 02e86221b851e5423a95782aa7e297ea051022ca) -commit 799dbb8bbab0db5c4ecb5ad8b68d1669d74abf74 +commit 81a081c1f0cb55df94cb10495aa7ad71cd5a9afb +Author: Jon TURNEY +Date: Sat Nov 7 19:28:18 2009 +0000 + + Cygwin/X: AIGLX using native WGL + + A rewrite of the XWin DDX AIGLX code to actually make it do something useful again + + Signed-off-by: Jon TURNEY + Reviewed-by: Colin Harrison + +commit 262c2c9031ea60cbe738ed80ddb7faa1b888d137 Author: Rami Ylimäki Date: Tue Apr 27 14:04:47 2010 +0300 @@ -1122,9 +6235,255 @@ Date: Tue Apr 27 14:04:47 2010 +0300 Signed-off-by: Rami Ylimäki Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer - (cherry picked from commit 262c2c9031ea60cbe738ed80ddb7faa1b888d137) -commit 6fbb51466ca2345e185f68e5eb990e087f4c8239 +commit ffaae7c0c69a51a53a76146c79f3630ae197a443 +Author: Adam Jackson +Date: Mon Apr 26 20:11:31 2010 -0700 + + Remove mibank support + + Banked framebuffers are so 1990. As of 7.4 the only drivers remaining + that used this were chips, neomagic, trident, and vesa. vesa only used + it when not using shadowfb, which is broadly undesirable anyway, and no + longer uses it at all as of 2.3.0. neomagic never used it by default, + and support for it is gone in git master. The other two effectively + only ever used it for ISA chips; since ISA support is now gone from + the server, they have been modified to only compile mibank support when + ISA support is available. + + Signed-off-by: Adam Jackson + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit b5b8f91b82d7b150c926dd3fecee6c3aafff6e39 +Author: Jamey Sharp +Date: Thu Apr 22 21:35:17 2010 -0700 + + xfree86: use screen privates for Xv offscreen images. + + This replaces a globally-allocated array that depended on MAXSCREENS. + + Signed-off-by: Jamey Sharp + Acked-by: Tiago Vignatti + Reviewed-by: Aaron Plattner + +commit a1c2acfe798c57e5be7e5f6c111a6ce91400487a +Author: Jamey Sharp +Date: Wed Apr 21 18:05:45 2010 -0700 + + xfree86: use screen privates for exclusive DGA clients. + + Most DGA requests allow at most one client to be using DGA on each + screen. Instead of keeping track of the current client in a + MAXSCREEN-sized array, track it in a per-screen private. + + Signed-off-by: Jamey Sharp + Acked-by: Tiago Vignatti + Reviewed-by: Aaron Plattner + +commit f9e3a2955d2ca73604c68fc9d51405581b832edb +Author: Jamey Sharp +Date: Mon Apr 26 18:23:27 2010 -0700 + + Make Xvfb independent of MAXSCREENS. + + If a -screen option specifies a screen number higher than any previously + specified, reallocate the vfb-private array of screen-info structs. + + If built with a DIX that still has a MAXSCREENS limit, asking for too + many screens won't be detected until InitOutput calls AddScreen. + + Signed-off-by: Jamey Sharp + Reviewed-by: Tiago Vignatti + +commit 20e84b0b44e8b3b40a3ecab5b2e64a27de247b16 +Author: Jamey Sharp +Date: Mon Apr 26 18:09:23 2010 -0700 + + Xvfb: Simplify screen option processing. + + Inspired by Jon Turney's "Xwin: Simplify screen option processing" + patch, which does something similar for the Xwin server. + + Besides making the code more readable, this eliminates most of Xvfb's + references to MAXSCREENS. + + Signed-off-by: Jamey Sharp + Reviewed-by: Tiago Vignatti + +commit eeb84547556b943af2acff207e034823205c7dfe +Author: Jamey Sharp +Date: Mon Apr 26 18:04:25 2010 -0700 + + Delete redundant scrnum field from Xvfb private screen-info struct. + + The screen number can be inferred from the position in the vfbScreens + array, and it was only used in two places, so it was hardly important. + + Signed-off-by: Jamey Sharp + Reviewed-by: Tiago Vignatti + +commit da0217891904bc48d5f0b7ea5c62c8ea0e9b95f9 +Author: Jamey Sharp +Date: Wed Apr 21 22:26:28 2010 -0700 + + Track screens' installed colormaps as screen privates. + + Several DDXes allow each screen to have at most one (or in some cases, + exactly one) installed colormap. These all use the same pattern: Declare + a global-lifetime array of MAXSCREENS ColormapPtrs, and index it by + screen number. This patch converts most of those to use screen privates + instead. + + Signed-off-by: Jamey Sharp + Acked-by: Tiago Vignatti + +commit 22c4300ee25a20e1f815e46225bf0de9cfd6748f +Author: Jamey Sharp +Date: Wed Oct 7 09:00:02 2009 -0700 + + Simplify XineramifyXv. + + The structure of the adaptor-matching algorithm was obscured by trying + to use "continue" and "break" as the only control-flow primitives. It's + a lot more clear if you add "return" to that set. + + Signed-off-by: Jamey Sharp + Reviewed-by: Adam Jackson + +commit af170a4ab76d33254dd4e54a33bb410fa1624739 +Author: Peter Hutterer +Date: Wed Apr 21 15:51:20 2010 +1000 + + Xext: only update the sprite on pointer events. + + A call to miPointerUpdateSprite for the XTEST keyboard may result in a + NULL pointer dereference in miDCPutUpCursor() when the save buffer is NULL. + + XTS test case: Xlib 11 KeymapNotify + + Signed-off-by: Peter Hutterer + +commit bac1c5f1be4588b2b1eb646ee98a5442e1b767d5 +Author: Dirk Wallenstein +Date: Sat Apr 17 21:36:23 2010 +0200 + + xkb: Fix omissions in geometry initialization #27679 + + _XkbCopyGeom did not copy all of the data from the source geometry. This + resulted in failures when trying to obtain the keymap from a server + where the default geometry has not been replaced by a custom + configuration. + + Signed-off-by: Dirk Wallenstein + Reviewed-by: Daniel Stone + Signed-off-by: Peter Hutterer + +commit 3f63db89191701139d45332ca80b9d6eb327c773 +Merge: 41bdb6c 54e51de +Author: Keith Packard +Date: Mon Apr 26 20:18:13 2010 -0700 + + Merge remote branch 'jamey/for-keith' + +commit 41bdb6c003cca3ef0ff88d9c7de318115bab1ba2 +Author: Pierre-Loup A. Griffais +Date: Wed Apr 21 18:11:05 2010 -0700 + + xf86: Don't crash when switching modes through RandR without owning the VT. + + While VT-switched, FB access is disabled and should remain so. Trying to switch + modes in that state would re-enable it, potentially causing crashes if trying + to access it before the driver has recovered from the mode switch. + + Signed-off-by: Pierre-Loup A. Griffais + Reviewed-by: Adam Jackson + Signed-off-by: Keith Packard + +commit 2a763c9023b8bc978b32eaa56d2c625b6f2badee +Author: Adam Jackson +Date: Mon Feb 15 16:54:35 2010 -0500 + + dix: Default DPMS timeout values to match screensaver values + + These have the same default, but if you specify something different with + -s on the command line, only the screensaver time is changed. As DPMS + is usually what's desired, change it to match. + + Signed-off-by: Adam Jackson + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit 518f3b189b6c8aa28b62837d14309fd06163ccbb +Author: Pierre-Loup A. Griffais +Date: Wed Apr 21 16:46:17 2010 -0700 + + mi: don't thrash resources when displaying the software cursor across screens + + This changes the DC layer to maintain a persistent set of GCs/pixmaps/pictures + for each pScreen instead of failing to thrash between them when changing + screens. + + Signed-off-by: Pierre-Loup A. Griffais + Reviewed-by: Peter Hutterer + Signed-off-by: Peter Hutterer + Tested-by: Peter Hutterer + +commit 54e51de8cd950b3f5b30e72cf1d604f54f619f0e +Author: Jamey Sharp +Date: Sat Apr 24 23:07:47 2010 -0700 + + ProcGrabButton: remove redundant error check. + + If dixLookupResourceByType did not return Success, it will have set the + pointer to NULL, so the second if will always be true. + + Signed-off-by: Jamey Sharp + Reviewed-by: Alan Coopersmith + +commit 7e573b5ccd2c759f74ebb84d3a5a23da6b88ec6d +Author: Jamey Sharp +Date: Mon Apr 26 15:05:06 2010 -0700 + + Kill unused/useless macros in panoramiX.h: BREAK_IF, IF_RETURN, FORCE_ROOT + + This header doesn't seem to be used outside the server tree, so I don't + think anything was depending on these except what I've fixed in this + patch. + + FORCE_ROOT is not used anywhere, and never has been in all the history + that's in git. ajax removed its FORCE_WIN and FORCE_CMAP companions + three years ago, in 04b87d6dfae02e4ecdb5216d12c6cdafd1e8c2b4. + + BREAK_IF and IF_RETURN expanded to exactly the keywords in their names, + which is silly. They were rarely used and served only to make callers + inconsistent with the idioms used elsewhere in the server. + + Signed-off-by: Jamey Sharp + Reviewed-by: Matt Turner + +commit e372cc58e02391c3e8e82ac03f73fbe8b1f7d49c +Author: Jamey Sharp +Date: Wed Oct 7 11:06:34 2009 -0700 + + Boolean-or short-circuits, so (a || (!a && ...)) is redundant. Simplify. + + Signed-off-by: Jamey Sharp + Reviewed-by: Dan Nicholson + Reviewed-by: Matt Turner + +commit 25d1c6cd37cc4079adf7c4bad8d10678fb08b409 +Author: Keith Packard +Date: Mon Apr 26 11:04:38 2010 -0700 + + Exa screen private has SavedSourceValidate, not SourceValidate + + Need to check the right field to see if there is a wrapped + SourceValidate function. + + Signed-off-by: Keith Packard + +commit d073e51beeed2e702fa5c7534b1345360bc302f2 Author: Yaakov Selkowitz Date: Mon Apr 26 11:39:19 2010 -0500 @@ -1137,9 +6496,8 @@ Date: Mon Apr 26 11:39:19 2010 -0500 Reviewed-by: Mikhail Gusarov Reviewed-by: Dan Nicholson Reviewed-by: Gaetan Nadon - (cherry picked from commit d073e51beeed2e702fa5c7534b1345360bc302f2) -commit ecab2625860463c53dd15cb2f1b3beaf31d2e2ea +commit 57409af1267f48457f93134922f2450518182e09 Author: Yaakov Selkowitz Date: Wed Apr 14 13:18:28 2010 -0500 @@ -1150,9 +6508,8 @@ Date: Wed Apr 14 13:18:28 2010 -0500 Signed-off-by: Yaakov Selkowitz Reviewed-by: Julien Cristau - (cherry picked from commit 57409af1267f48457f93134922f2450518182e09) -commit 4c7a032eddebf7366549dd889004cb2e13f2fe3f +commit 0d8fe2fe5c37659147cbecac793183c62fc6818a Author: Yaakov Selkowitz Date: Tue Apr 13 13:32:51 2010 -0500 @@ -1166,9 +6523,8 @@ Date: Tue Apr 13 13:32:51 2010 -0500 Signed-off-by: Yaakov Selkowitz Reviewed-by: Mikhail Gusarov Acked-by: Julien Cristau - (cherry picked from commit 0d8fe2fe5c37659147cbecac793183c62fc6818a) -commit 5fd534f5b3f557541e9580731e5ec0826f50720f +commit 65a2c09549d2372c23b155addff428177708c910 Author: Yaakov Selkowitz Date: Thu Apr 8 21:55:45 2010 -0500 @@ -1185,9 +6541,8 @@ Date: Thu Apr 8 21:55:45 2010 -0500 Signed-off-by: Yaakov Selkowitz Reviewed-by: Peter Hutterer - (cherry picked from commit 65a2c09549d2372c23b155addff428177708c910) -commit 308d103110b49cd4f078bafda0e61d7e916ccbec +commit 6e0d847c273ab89323883a05f806f449180e3669 Author: Yaakov Selkowitz Date: Thu Mar 25 03:37:09 2010 -0500 @@ -1198,9 +6553,8 @@ Date: Thu Mar 25 03:37:09 2010 -0500 Signed-off-by: Yaakov Selkowitz Acked-by: Dan Nicholson Tested-by: Gaetan Nadon - (cherry picked from commit 6e0d847c273ab89323883a05f806f449180e3669) -commit d4956adef6e4ed7f019835e2638becfafecbafdd +commit 04b7d529c09af2c842cf020d5b26080e1ffd88d6 Author: Yaakov Selkowitz Date: Thu Mar 25 03:36:25 2010 -0500 @@ -1208,9 +6562,8 @@ Date: Thu Mar 25 03:36:25 2010 -0500 Signed-off-by: Yaakov Selkowitz Acked-by: Gaetan Nadon - (cherry picked from commit 04b7d529c09af2c842cf020d5b26080e1ffd88d6) -commit 593aacfa0d7dd7fa656cc787fa06ffb6bbf07042 +commit 39e5108c78e0802833a8e9ea7f29d042738625ba Author: Yaakov Selkowitz Date: Thu Mar 25 03:35:36 2010 -0500 @@ -1218,9 +6571,8 @@ Date: Thu Mar 25 03:35:36 2010 -0500 Signed-off-by: Yaakov Selkowitz Acked-by: Gaetan Nadon - (cherry picked from commit 39e5108c78e0802833a8e9ea7f29d042738625ba) -commit d86e8abc4324b3b98c54c5d42ff69635f59edeb8 +commit 3ba2ce5d1054c99354686aeb373247f1b9debf79 Author: Yaakov Selkowitz Date: Thu Mar 25 03:33:55 2010 -0500 @@ -1232,9 +6584,8 @@ Date: Thu Mar 25 03:33:55 2010 -0500 Signed-off-by: Yaakov Selkowitz Acked-by: Peter Hutterer Acked-by: Dan Nicholson - (cherry picked from commit 3ba2ce5d1054c99354686aeb373247f1b9debf79) -commit 35e5406d15fe94bf222030c4a859ae607c8697ae +commit 40972576b606237d5d42abc13d846163e264a4ac Author: Yaakov Selkowitz Date: Tue Mar 23 04:47:27 2010 -0500 @@ -1248,21 +6599,8 @@ Date: Tue Mar 23 04:47:27 2010 -0500 Signed-off-by: Yaakov Selkowitz Reviewed-by: Rémi Cardona - (cherry picked from commit 40972576b606237d5d42abc13d846163e264a4ac) -commit 88ba993aaf3f810c6dfc1fb113d5d075eeb390b4 -Author: Keith Packard -Date: Mon Apr 26 11:04:38 2010 -0700 - - Exa screen private has SavedSourceValidate, not SourceValidate - - Need to check the right field to see if there is a wrapped - SourceValidate function. - - Signed-off-by: Keith Packard - (cherry picked from commit 25d1c6cd37cc4079adf7c4bad8d10678fb08b409) - -commit 02e07e7e234f8e74b41148ba05e05b3446c7732a +commit b557571dbff3d9a615e03cad904d46b8af9153a0 Author: Jerome Glisse Date: Mon Apr 26 16:01:48 2010 +0200 @@ -1275,45 +6613,203 @@ Date: Mon Apr 26 16:01:48 2010 +0200 Signed-off-by: Jerome Glisse Acked-by: Michel Dänzer Signed-off-by: Keith Packard - (cherry picked from commit b557571dbff3d9a615e03cad904d46b8af9153a0) -commit c394b17266301d363a9e234f58f8015f74e01307 -Author: Peter Hutterer -Date: Tue Apr 27 17:53:22 2010 +1000 +commit 0e6e75b04eaca311962390533acc03d0ac5ece83 +Author: Keith Packard +Date: Mon Apr 26 09:14:22 2010 -0700 - Revert "DRI2: Track DRI2 drawables as resources, not privates" + Revert "exa: avoid calling non existent SourceValidate callback" - This change breaks GLX compositing managers. - See Bug 27767 + This reverts commit daa6f9308fa57e41210f78d92dbdb3f1c8eae6ad. - This reverts commit 0c499f2ee4ae2b7dc424009abb336fc81a8a2853. + This one checked pScreen->SourceValidate instead of + pExaScr->SourceValidate which would cause a segfault when + pExaScr->SourceValidate was NULL. + +commit daa6f9308fa57e41210f78d92dbdb3f1c8eae6ad +Author: Jerome Glisse +Date: Mon Apr 26 15:55:26 2010 +0200 + + exa: avoid calling non existent SourceValidate callback - Signed-off-by: Peter Hutterer - -commit 65e84507b48546443fd0f67bc3263903d116bf62 -Author: Peter Hutterer -Date: Tue Apr 27 14:08:58 2010 +1000 - - xserver 1.8.0.901 + In unaccel path we were unconditionaly calling the SourceValidate + callback but in some case it could be NULL. Check if we have a + valid callback before calling it. - Signed-off-by: Peter Hutterer + Signed-off-by: Jerome Glisse + Acked-by: Michel Dänzer + Signed-off-by: Keith Packard -commit 5d757096fc72233a9ff520149ec7cfd1ced457d8 -Author: Peter Hutterer -Date: Fri Apr 23 13:42:34 2010 +1000 +commit edbc56c088462844f6445f5e6d7cbcfc58a207dc +Author: Tiago Vignatti +Date: Mon Apr 26 14:49:25 2010 +0300 + + include: remove couple of unused structures fields and bump ABI + + Signed-off-by: Tiago Vignatti + +commit 4f8dc1109dcdfa973466a038c16c07da5f6c16b4 +Author: Tiago Vignatti +Date: Thu Apr 22 15:43:11 2010 +0300 + + dix and others: remove unused arraySize field from ScreenInfo + + Bizarre. This seems to never be used before. I left the field in ScreenInfo, + with another name. So, stop looking at it. + + Signed-off-by: Tiago Vignatti + Reviewed-by: Aaron Plattner + +commit 64fd39f2f0ffbbdc2d5929047d260263d0962141 +Author: Tiago Vignatti +Date: Thu Apr 22 15:48:48 2010 +0300 + + xfree86: no need to assign numScreens again + + numScreens is always being assigned to 0 in dix for any server generation. + + Signed-off-by: Tiago Vignatti + Reviewed-by: Peter Hutterer + +commit a7d398e545a4be5491248d5ccb303aa03ee1594f +Author: Jon TURNEY +Date: Fri Apr 16 18:13:50 2010 +0100 + + Xwin: make screens structures run-time adjustable + + Change g_ScreenInfo, an array of winScreenInfo elements, from a + static array of MAXSCREENS elements, to a dynamically allocated one + + Fix up the validation that -screen option screen numbers are + contiguous from zero (which possibly didn't work correctly before + anyhow) + + Signed-off-by: Jon TURNEY + Reviewed-by: Jamey Sharp + Reviewed-by: Tiago Vignatti + +commit d8454ae488cfc073cd6010c9a08d53855a0c2612 +Author: Jon TURNEY +Date: Mon Apr 12 20:18:13 2010 +0100 + + Xwin: Simplify screen option processing + + Use an instance of the XWin DDX-specific screen info structure to hold + the current default values, to simplify greatly the code for applying + options to all screens and remove all those loops over MAXSCREENS screens + in the command line option processing + + Use g_iNumScreens for tracking the current initialized screen count + + Signed-off-by: Jon TURNEY + Reviewed-by: Jamey Sharp + Reviewed-by: Tiago Vignatti + +commit b61870595ba4df06006d24ed8c07cfe781bce1b7 +Author: Tiago Vignatti +Date: Thu Apr 22 20:20:48 2010 +0300 + + xfree86: track screens' installed colormaps as screen privates + + Signed-off-by: Tiago Vignatti + Reviewed-by: Jamey Sharp + +commit a94f5455c71363d5047668ee093901b9e1645cf1 +Author: Tiago Vignatti +Date: Thu Apr 22 20:20:43 2010 +0300 + + mi: track screens' installed colormaps as screen privates + + Signed-off-by: Tiago Vignatti + Reviewed-by: Jamey Sharp + +commit a2c716eaf6b3a4ce75382394636a0a890b5dcfe0 +Author: Jamey Sharp +Date: Thu Apr 22 07:34:04 2010 +0200 + + fb: track screens' installed colormaps as screen privates. + + Several DDXes allow each screen to have at most one (or in some cases, + exactly one) installed colormap. These all use the same pattern: Declare + a global-lifetime array of MAXSCREENS ColormapPtrs, and index it by + screen number. This patch converts most of those to use screen privates + instead. + + Signed-off-by: Jamey Sharp + Acked-by: Tiago Vignatti + +commit e055bef055b6c726e9f3ef91a83585d13c80651d +Author: Jamey Sharp +Date: Thu Apr 22 06:08:29 2010 +0200 + + xfree86: use screen privates for exclusive DGA clients + + Most DGA requests allow at most one client to be using DGA on each screen. + Instead of keeping track of the current client in a MAXSCREEN-sized array, + track it in a per-screen private. + + Signed-off-by: Jamey Sharp + Acked-by: Tiago Vignatti + +commit 7c9733d063acee04735a0e75d62e508fe4ea1163 +Author: Jamey Sharp +Date: Fri Apr 23 06:41:00 2010 +0200 + + xfree86: use screen privates for Xv offscreen images. + + This replaces a globally-allocated array that depended on MAXSCREENS. + + Signed-off-by: Jamey Sharp + Acked-by: Tiago Vignatti + +commit 35d208125fa0ec78e8d694adc52886b977e789cf +Author: Tiago Vignatti +Date: Wed Apr 21 18:28:13 2010 +0300 + + xfree86: fix not reached code in fi1236 driver from i2c + + This issue was introduced in the first dump of the code in 2004. I haven't + check what's the correct fix for it so I simply kept the behaviour of someone + calling this and removed the unreachable code. + + Signed-off-by: Tiago Vignatti + Reviewed-by: Keith Packard + Signed-off-by: Keith Packard + +commit 7ac6a6b7d0dfc5e021270b2898accd3425aa008a +Merge: 0782894 f7ef6fd +Author: Keith Packard +Date: Wed Apr 21 16:07:38 2010 -0700 + + Merge remote branch 'vignatti/for-keith' + + Conflicts: + exa/exa.c + + Signed-off-by: Keith Packard + +commit 0782894b5702adcf6f4a90861793b717f3856fa5 +Author: Keith Packard +Date: Wed Apr 21 16:00:28 2010 -0700 Xvfb: Usage message typo fix. Signed-off-by: Keith Packard - (cherry picked from commit 0782894b5702adcf6f4a90861793b717f3856fa5) - - Conflicts: - - hw/vfb/InitOutput.c - - Signed-off-by: Peter Hutterer -commit feb39870e0d2c5917c8da1951c721f6f72cb4d39 +commit ee3412b8702072c3a0b006bd20dd3bc7071d721c +Author: Keith Packard +Date: Wed Apr 21 15:58:23 2010 -0700 + + Restore some unused win32 debug code accidentally removed with unifdef + + unifdef found some code covered by + + which it decided to remove. This patch simply restores that in case + someone wants it back. + + Signed-off-by: Keith Packard + +commit e3d2a7a613366c26e5316cf582d9a8c6c6692b0a Author: Peter Hutterer Date: Wed Apr 21 11:47:24 2010 +1000 @@ -1386,8 +6882,182 @@ Date: Wed Apr 21 11:47:24 2010 +1000 This reverts commit 00b8b7ad61b6f818271fb4d1e383113170309d72. Signed-off-by: Peter Hutterer + Signed-off-by: Keith Packard -commit 5455df65207aa367531f5a3c35d39cb6c390e5de +commit f7ef6fd9a1a1f48603df2796fe7c904c25a81077 +Author: Tiago Vignatti +Date: Tue Apr 20 15:56:58 2010 +0300 + + xfree86: fix not reached code in tty code + + CLEARRTS_SUPPORT cannot be triggered at all. Notice that mouse driver manual + page states the support for it though. + + Signed-off-by: Tiago Vignatti + Reviewed-by: Peter Hutterer + +commit b36eeb713a349961a6be8a6dd183ded6d27f9974 +Author: Tiago Vignatti +Date: Tue Apr 20 16:26:02 2010 +0300 + + xkb: check for NULL pointer before dereferences it in XkbWriteXKBSymbols + + move srv assignment to before it's being used. Also, check for xkb being nil. + + Signed-off-by: Tiago Vignatti + Reviewed-by: Peter Hutterer + +commit 471f350c99b2e7c5a9045eef5ebff65cd2ddb7c5 +Author: Tiago Vignatti +Date: Mon Apr 19 20:34:30 2010 +0300 + + exa: don't need to check for NULL pointer if we already assumed it has a value + + the alternative would be to check ps in the beginning of the function. + + Signed-off-by: Tiago Vignatti + Acked-by: Michel Dänzer + +commit 96784f4fcb6c2fb82f6d1abbd28ea1e189e4e6f5 +Author: Tiago Vignatti +Date: Mon Apr 19 20:46:12 2010 +0300 + + xkb: check for NULL pointer before dereferences it in XkbAddClientResource + + Signed-off-by: Tiago Vignatti + Reviewed-by: Peter Hutterer + Reviewed-by: Dan Nicholson + +commit 057c147541bde6f0cbe22ca069b43a97ddc95baf +Author: Tiago Vignatti +Date: Fri Apr 16 18:01:41 2010 +0300 + + Xi: check for NULL pointer before dereferences it in ListButtonInfo + + Both dev and dev->button are already used before their checking were being + performed. So check on the beginning. + + Signed-off-by: Tiago Vignatti + Reviewed-by: Peter Hutterer + Reviewed-by: Dan Nicholson + +commit 7f457351d2a09013cd57fcb2f95c0d6f56bfaccb +Author: Tiago Vignatti +Date: Mon Apr 19 20:18:51 2010 +0300 + + xfree86: check for NULL pointer before dereferences it in parser code + + Seems to be harmless. Meh. + + Signed-off-by: Tiago Vignatti + Reviewed-by: Peter Hutterer + Reviewed-by: Dan Nicholson + +commit d948dcd9555c81ccb378054383ef8da464202bdf +Author: Tiago Vignatti +Date: Fri Apr 16 17:08:09 2010 +0300 + + Xi: fix not reached code in XSendExtensionEvent + + Error was introduced in 31a7994a. I.e., broken since 2007. I guess nobody uses + XSendExtensionEvent. + + Signed-off-by: Tiago Vignatti + Reviewed-by: Dan Nicholson + +commit f491b0aa5b86a5242fc4e04218202bbb52d0af39 +Author: Tiago Vignatti +Date: Fri Apr 16 16:47:33 2010 +0300 + + xfree86: fix not reached code in parser + + ...because Error is a macro that returns NULL. + + Signed-off-by: Tiago Vignatti + Reviewed-by: Dan Nicholson + +commit 099946a3ac94ff5e575e9edcecd26cf9f346b241 +Author: Tiago Vignatti +Date: Fri Apr 16 18:35:55 2010 +0300 + + mi: check for NULL pointer before dereferences it in miPointerSetPosition + + Signed-off-by: Tiago Vignatti + Reviewed-by: Dan Nicholson + Reviewed-by: Peter Hutterer + +commit 49835eec0c996ad95a01f0fe340336b6b60e51aa +Author: Tiago Vignatti +Date: Fri Apr 16 17:50:43 2010 +0300 + + exa: check for NULL pointer before dereferences it + + Signed-off-by: Tiago Vignatti + Acked-by: Michel Dänzer + Reviewed-by: Dan Nicholson + +commit 996c115deb558e8e9490ea773528b8e96650df53 +Author: Tiago Vignatti +Date: Thu Mar 25 18:17:54 2010 +0200 + + configure: remove unused builtin font macro from autoconf file + + This should be removed together with 49b93df8. + + Signed-off-by: Tiago Vignatti + Reviewed-by: Dan Nicholson + +commit 0ba82562eeba8bf3bcd00b6e3ff28ce5b2c8df3c +Author: Tiago Vignatti +Date: Tue Mar 30 19:10:36 2010 +0300 + + Death to Multibuffer extension + + The rationale behind is because no sane application will use this when we have + modern APIs such DRI2. Besides, as a fact, xfree86 server has already + deprecated this extension in 1998: + + http://www.xfree86.org/3.3.6/isc7.html + + Signed-off-by: Tiago Vignatti + Reviewed-by: Keith Packard + +commit 28b7b2b8d02d975480080865f0dddebcaa2f7968 +Author: Keith Packard +Date: Mon Apr 19 09:26:10 2010 -0700 + + unifdef -B -DRENDER to always include RENDER code + + This patch was created with: + + git ls-files '*.[ch]' | while read f; do unifdef -B -DRENDER -o $f $f; done + + Signed-off-by: Keith Packard + +commit b3ab978df861c08298f57529e3db980489055c35 +Merge: a92b2c2 0ad022a +Author: Keith Packard +Date: Sun Apr 18 22:01:40 2010 -0700 + + Merge remote branch 'whot/for-keith' + +commit 0ad022a729bafa56cc7b5d241f567444a34514ad +Author: Peter Hutterer +Date: Wed Apr 14 10:54:29 2010 +1000 + + xkb: rename XkbFakeDeviceButton and XkbFakeDeviceMotion, move into xkbActions.c + + The name XkbDDXFakeDeviceButton and XkbDDXFakeDeviceMotion is somewhat + misleading, there's no DDX involved in the game at all anymore. + + This removes XkbFakeDeviceMotion and XkbFakeDeviceButton from the API where + it arguably shouldn't have been in the first place. + + Signed-off-by: Peter Hutterer + Reviewed-by: Daniel Stone + Reviewed-by: Dan Nicholson + +commit da4e2e382828d7ba460766709368ec6214b286dd Author: Peter Hutterer Date: Wed Apr 14 09:48:53 2010 +1000 @@ -1396,9 +7066,72 @@ Date: Wed Apr 14 09:48:53 2010 +1000 Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone Reviewed-by: Dan Nicholson - (cherry picked from commit da4e2e382828d7ba460766709368ec6214b286dd) -commit 72664a84e0f700fc51737b76bfd89b1d3b9cbdce +commit a92b2c2c8dd1e86ee852168146f01bdf72bfe2d0 +Author: Kristian Høgsberg +Date: Fri Apr 16 05:55:35 2010 -0400 + + glx: Drop DestroyWindow hook + + Now that glx doesn't call DRI2DestroyDrawable anymore, we don't need to + force a specific resource destruction order in the DestroyWindow hook. + + Signed-off-by: Kristian Høgsberg + Reviewed-by: Michel Dänzer + + https://bugs.freedesktop.org/show_bug.cgi?id=26394 + Signed-off-by: Keith Packard + +commit 1da1f33f2dd5b437dd56cd9f5d6782de4ad5a1bc +Author: Kristian Høgsberg +Date: Fri Apr 16 05:55:34 2010 -0400 + + DRI2: Track DRI2 drawables as resources, not privates + + The main motivation here is to have the resource system clean up the + DRI2 drawable automatically so glx doesn't have to. Right now, the + glx drawable resource must be destroyed before the X drawable, so that + calling DRI2DestroyDrawable doesn't crash. By making the DRI2 + drawable a resource, GLX doesn't have to worry about that and the + resource destruction order becomes irrelevant. + + https://bugs.freedesktop.org/show_bug.cgi?id=26394 + + Signed-off-by: Kristian Høgsberg + Signed-off-by: Keith Packard + +commit 22da7aa9d743deee198aaf6df5d370a446db9763 +Author: Kristian Høgsberg +Date: Fri Apr 16 05:55:33 2010 -0400 + + glx: Let the resource system destroy pixmaps + + GLX pbuffers are implemented using a pixmap allocated by the server. + With the change to DRI2 to track DRI2 drawables as resources, we need to make + sure that every drawable we create a DRI2 drawable for has an XID. By + using the XID of the pbuffer, the resource system will automatically + reclaim the hidden pixmap and the DRI2 drawable when the pbuffer is + destroyed or the client exits. + + Signed-off-by: Kristian Høgsberg + Signed-off-by: Keith Packard + +commit f0006aa58f6cf7552a239e169ff6e7e4fda532f4 +Author: Kristian Høgsberg +Date: Fri Apr 16 05:55:32 2010 -0400 + + glx: Track GLX 1.3 style GLX drawables under their X drawable ID as well + + This ensures that the DrawableGone callback gets called as necessary + when the X drawable goes away. Otherwise, using a GLX drawable + (say, glXSwapBuffers) in indirect mode after the X drawable has been + destroyed will crash the server. + + Signed-off-by: Kristian Høgsberg + Reviewed-by: Michel Dänzer + Signed-off-by: Keith Packard + +commit f4106c02318fcc4b534224df5b95a58aff555fb4 Author: Peter Hutterer Date: Tue Apr 13 14:44:59 2010 +1000 @@ -1415,9 +7148,8 @@ Date: Tue Apr 13 14:44:59 2010 +1000 Signed-off-by: Peter Hutterer Reviewed-by: Simon Thum Reviewed-by: Daniel Stone - (cherry picked from commit f4106c02318fcc4b534224df5b95a58aff555fb4) -commit 3e76abe1c16ff45f25de8f20c3aaf3268dff10c8 +commit 6c42c8c356be305dc7f3f92ad8d58675da8c2f07 Author: Peter Hutterer Date: Wed Apr 14 10:51:41 2010 +1000 @@ -1429,9 +7161,8 @@ Date: Wed Apr 14 10:51:41 2010 +1000 Signed-off-by: Peter Hutterer Reviewed-by: Simon Thum Reviewed-by: Daniel Stone - (cherry picked from commit 6c42c8c356be305dc7f3f92ad8d58675da8c2f07) -commit 37c3d2aef089a8bb45adecb4f0372c47b62e0bb7 +commit 108457dff816569453a2d88cd72595fa7eb02479 Author: Peter Hutterer Date: Tue Apr 13 14:41:07 2010 +1000 @@ -1446,9 +7177,8 @@ Date: Tue Apr 13 14:41:07 2010 +1000 Signed-off-by: Peter Hutterer Reviewed-by: Daniel Stone - (cherry picked from commit 108457dff816569453a2d88cd72595fa7eb02479) -commit a9c978bb9723ec7c291074ff75423623c8bf7209 +commit a780e5b3638a0ff81301fc68aca15b47ba0befb7 Author: Benjamin Tissoires Date: Wed Apr 14 17:27:51 2010 +0200 @@ -1465,77 +7195,15 @@ Date: Wed Apr 14 17:27:51 2010 +0200 Signed-off-by: Benjamin Tissoires Reviewed-by: Keith Packard Signed-off-by: Peter Hutterer - (cherry picked from commit a780e5b3638a0ff81301fc68aca15b47ba0befb7) -commit 6ab87eb04cf24619c17c1fa05daaeebb481a6a50 -Author: Kristian Høgsberg -Date: Fri Apr 16 05:55:35 2010 -0400 +commit e424d5812300e82de375d83dc0b490a76d865016 +Merge: 5b0faf3 0e7703f +Author: Keith Packard +Date: Thu Apr 15 15:01:34 2010 -0700 - glx: Drop DestroyWindow hook - - Now that glx doesn't call DRI2DestroyDrawable anymore, we don't need to - force a specific resource destruction order in the DestroyWindow hook. - - Signed-off-by: Kristian Høgsberg - Reviewed-by: Michel Dänzer - - https://bugs.freedesktop.org/show_bug.cgi?id=26394 - Signed-off-by: Keith Packard + Merge remote branch 'whot/for-keith' -commit 0c499f2ee4ae2b7dc424009abb336fc81a8a2853 -Author: Kristian Høgsberg -Date: Fri Apr 16 05:55:34 2010 -0400 - - DRI2: Track DRI2 drawables as resources, not privates - - The main motivation here is to have the resource system clean up the - DRI2 drawable automatically so glx doesn't have to. Right now, the - glx drawable resource must be destroyed before the X drawable, so that - calling DRI2DestroyDrawable doesn't crash. By making the DRI2 - drawable a resource, GLX doesn't have to worry about that and the - resource destruction order becomes irrelevant. - - https://bugs.freedesktop.org/show_bug.cgi?id=26394 - - [Ported to 1.8 branch by ajax@redhat.com] - - Signed-off-by: Kristian Høgsberg - Signed-off-by: Keith Packard - -commit 0460a76b9ae25fe26f683f0cbff1e4157287cf56 -Author: Kristian Høgsberg -Date: Fri Apr 16 05:55:33 2010 -0400 - - glx: Let the resource system destroy pixmaps - - GLX pbuffers are implemented using a pixmap allocated by the server. - With the change to DRI2 to track DRI2 drawables as resources, we need to make - sure that every drawable we create a DRI2 drawable for has an XID. By - using the XID of the pbuffer, the resource system will automatically - reclaim the hidden pixmap and the DRI2 drawable when the pbuffer is - destroyed or the client exits. - - Signed-off-by: Kristian Høgsberg - Signed-off-by: Keith Packard - (cherry picked from commit 22da7aa9d743deee198aaf6df5d370a446db9763) - -commit 86ca6baee221fc691c7828b078008314ac989864 -Author: Kristian Høgsberg -Date: Fri Apr 16 05:55:32 2010 -0400 - - glx: Track GLX 1.3 style GLX drawables under their X drawable ID as well - - This ensures that the DrawableGone callback gets called as necessary - when the X drawable goes away. Otherwise, using a GLX drawable - (say, glXSwapBuffers) in indirect mode after the X drawable has been - destroyed will crash the server. - - Signed-off-by: Kristian Høgsberg - Reviewed-by: Michel Dänzer - Signed-off-by: Keith Packard - (cherry picked from commit f0006aa58f6cf7552a239e169ff6e7e4fda532f4) - -commit 7d5e6012df237c0d9d4741ca275751bc49f731ed +commit 0e7703f9b1927328954a2fc87aac6be244819329 Author: Julien Cristau Date: Tue Apr 13 22:28:36 2010 +0200 @@ -1555,9 +7223,8 @@ Date: Tue Apr 13 22:28:36 2010 +0200 Signed-off-by: Julien Cristau Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer - (cherry picked from commit 0e7703f9b1927328954a2fc87aac6be244819329) -commit 0e6c08655cdb240b5de42a7559cfd3ef60a85118 +commit 2f29b163bbdebe384c24f781bb97b446959e8f4c Author: Adam Tkac Date: Mon Mar 22 14:52:29 2010 +0100 @@ -1570,9 +7237,8 @@ Date: Mon Mar 22 14:52:29 2010 +0100 Signed-off-by: Adam Tkac Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer - (cherry picked from commit 2f29b163bbdebe384c24f781bb97b446959e8f4c) -commit 8ab76efb14ba7010c2762120fc7784e3f8bd7d11 +commit 241b53b77750b5eea6759e79b23be4ff270a3d1f Author: Peter Hutterer Date: Tue Mar 23 14:35:56 2010 +1000 @@ -1585,9 +7251,8 @@ Date: Tue Mar 23 14:35:56 2010 +1000 X.Org Bug 26843 Signed-off-by: Peter Hutterer - (cherry picked from commit 241b53b77750b5eea6759e79b23be4ff270a3d1f) -commit 049a36cd402da9219e60221f5671f94a8f8f687f +commit 00b8b7ad61b6f818271fb4d1e383113170309d72 Author: Pierre-Loup A. Griffais Date: Wed Apr 7 13:52:47 2010 -0700 @@ -1600,9 +7265,8 @@ Date: Wed Apr 7 13:52:47 2010 -0700 Signed-off-by: Pierre-Loup A. Griffais Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer - (cherry picked from commit 00b8b7ad61b6f818271fb4d1e383113170309d72) -commit 59ee696aa1232698ab0fc22ffffe4e6f438bf764 +commit 5f31e2196179f8db3170d65a17d8ad40da1acb0d Author: Tim Yamin Date: Mon Mar 8 12:45:15 2010 +1000 @@ -1615,9 +7279,37 @@ Date: Mon Mar 8 12:45:15 2010 +1000 Signed-off-by: Tim Yamin Reviewed-by: Peter Hutterer Signed-off-by: Peter Hutterer - (cherry picked from commit 5f31e2196179f8db3170d65a17d8ad40da1acb0d) -commit 19b1fa1b5ff615f8711ad95f28663895707a3970 +commit 5b0faf355465c9f21ad96e0ed266fbdbc29efb5b +Author: Jeremy Huddleston +Date: Thu Apr 15 10:55:53 2010 -0700 + + XQuartz GLX: Don't let garbage enter our pixel request + + https://bugs.freedesktop.org/show_bug.cgi?id=27654 + + Signed-off-by: Jeremy Huddleston + +commit fe7778e58e099d353689755ed2f5aa440569ebe3 +Author: Jeremy Huddleston +Date: Wed Apr 14 09:06:04 2010 -0700 + + XQuartz: Fix possible NULL dereference in ListenOnOpenFD + + + + Signed-off-by: Jeremy Huddleston + Reviewed-by: Marc Majka + +commit 206531f75cd41c034e89fdfbc75ab0910682eef8 +Author: Jeremy Huddleston +Date: Tue Apr 13 14:33:49 2010 -0700 + + XQuartz: Localization update + + Signed-off-by: Jeremy Huddleston + +commit 9ddbb03fa56aa73c3f417d8ee6433e45b94445b3 Author: Peter Hutterer Date: Wed Apr 14 17:43:22 2010 +1000 @@ -1640,9 +7332,8 @@ Date: Wed Apr 14 17:43:22 2010 +1000 Signed-off-by: Peter Hutterer Reviewed-by: Keith Packard Signed-off-by: Keith Packard - (cherry picked from commit 9ddbb03fa56aa73c3f417d8ee6433e45b94445b3) -commit 1ae61e0c406bbb454ca24aebd0f61148fe04e60c +commit 7b6517526631a65891b806bca30be8f49955d0a8 Author: Michel Dänzer Date: Wed Apr 14 19:28:37 2010 +0200 @@ -1653,57 +7344,8 @@ Date: Wed Apr 14 19:28:37 2010 +0200 Signed-off-by: Michel Dänzer Reviewed-by: Alex Deucher Signed-off-by: Keith Packard - (cherry picked from commit 7b6517526631a65891b806bca30be8f49955d0a8) -commit dbc093ec10a3b734f99e13d4c43f273e6d9b6a39 -Author: Jeremy Huddleston -Date: Thu Apr 15 10:55:53 2010 -0700 - - XQuartz GLX: Don't let garbage enter our pixel request - - https://bugs.freedesktop.org/show_bug.cgi?id=27654 - - Signed-off-by: Jeremy Huddleston - (cherry picked from commit 5b0faf355465c9f21ad96e0ed266fbdbc29efb5b) - -commit 19ff17fce901afcc6c9be29509e28e53a5d71530 -Author: Jeremy Huddleston -Date: Wed Apr 14 09:06:04 2010 -0700 - - XQuartz: Fix possible NULL dereference in ListenOnOpenFD - - - - Signed-off-by: Jeremy Huddleston - Reviewed-by: Marc Majka - (cherry picked from commit fe7778e58e099d353689755ed2f5aa440569ebe3) - -commit 84f49c8570a1e4db81a81864b92226fa93435b16 -Author: Jeremy Huddleston -Date: Tue Apr 13 14:33:49 2010 -0700 - - XQuartz: Localization update - - Signed-off-by: Jeremy Huddleston - (cherry picked from commit 206531f75cd41c034e89fdfbc75ab0910682eef8) - -commit d0e9583fa803a219bb993dc81c6f2abc83e65e81 -Author: Dan Nicholson -Date: Tue Feb 16 08:11:41 2010 -0800 - - xfree86: Fix priority ordering for ignoring input classes - - Commit 8736d112afb0dd61dfdaadd6378eafd200b2ef5f changed the priority - ordering of the InputClass option merging to be "last match wins". This - fixes the handling of Option "Ignore" to follow that logic. - - Signed-off-by: Dan Nicholson - Reviewed-by: Keith Packard - (cherry picked from commit adbbc661080ba4efdb764c154d40c4d2fe718e16) - - Signed-off-by: Peter Hutterer - -commit 9157b0ad4d016ebc7dd22dc4b50d20fd0c609044 +commit fc5d76740851725e3788c68e14474a012a205892 Author: Julien Cristau Date: Tue Apr 6 11:51:53 2010 +0200 @@ -1715,11 +7357,39 @@ Date: Tue Apr 6 11:51:53 2010 +0200 Signed-off-by: Julien Cristau Reviewed-by: Peter Hutterer Signed-off-by: Keith Packard - (cherry picked from commit fc5d76740851725e3788c68e14474a012a205892) - - Signed-off-by: Peter Hutterer -commit 88f275a748766422a9a56dcdb692970afc56c59c +commit 0b676acd47e0d6a675df374b42ddb200deab5d06 +Author: Julien Cristau +Date: Tue Apr 13 11:45:41 2010 +0200 + + Bump version in configure.ac + + Signed-off-by: Keith Packard + +commit 1760d2bef9f5b248cb2332f6ebf0220eb02bab42 +Author: Kristian Høgsberg +Date: Fri Apr 9 10:58:48 2010 -0400 + + glx: Set the pbuffer bit for dri2 fbconfigs + + They've been implemented for a while, but we never advertised them. All we + need to do is set the GLX_PBUFFER_BIT in the drawable type fbconfig + field when we're using DRI2. + + https://bugs.freedesktop.org/show_bug.cgi?id=26581 + + Signed-off-by: Kristian Høgsberg + Reviewed-by: Ian Romanick + Signed-off-by: Keith Packard + +commit ab60975fe28cb135b4183c57b7f50d3615921c1f +Merge: adbbc66 59edde7 +Author: Keith Packard +Date: Mon Apr 12 21:40:41 2010 -0700 + + Merge remote branch 'jeremyhu/master' + +commit 59edde7c28db2d3174a5813a0af334e4ead2082f Author: Jeremy Huddleston Date: Fri Apr 9 16:19:43 2010 -0700 @@ -1727,9 +7397,8 @@ Date: Fri Apr 9 16:19:43 2010 -0700 Signed-off-by: Jeremy Huddleston Reviewed-by: Kevin Van Vechten - (cherry picked from commit 59edde7c28db2d3174a5813a0af334e4ead2082f) -commit f20f1d57a514fe4b767b383c5369f1f79f2b1262 +commit 5600f7f001529b3afdee95546aec212a70d6a5b2 Author: Jeremy Huddleston Date: Fri Apr 9 13:33:06 2010 -0700 @@ -1737,9 +7406,8 @@ Date: Fri Apr 9 13:33:06 2010 -0700 Signed-off-by: Jeremy Huddleston Reviewed-by: Kevin Van Vechten - (cherry picked from commit 5600f7f001529b3afdee95546aec212a70d6a5b2) -commit de13a627f34ca5c882b6f2f84ba0d17b9044daeb +commit 840d12c7a6ac6a974da185045215ce944a61fab6 Author: Jeremy Huddleston Date: Fri Apr 9 13:29:34 2010 -0700 @@ -1749,9 +7417,8 @@ Date: Fri Apr 9 13:29:34 2010 -0700 Signed-off-by: Jeremy Huddleston Reviewed-by: Kevin Van Vechten - (cherry picked from commit 840d12c7a6ac6a974da185045215ce944a61fab6) -commit 0e97ac0b3036aa500bee16aa1de22ee7c6cbd522 +commit d6f160510a50d4c4eaa48c9c69a5ddda0d50052c Author: Jeremy Huddleston Date: Mon Apr 5 16:54:22 2010 -0700 @@ -1760,65 +7427,29 @@ Date: Mon Apr 5 16:54:22 2010 -0700 http://xquartz.macosforge.org/trac/ticket/295 Signed-off-by: Jeremy Huddleston - (cherry picked from commit 1ac34213137cbcbdfcf4a07708e9af6ce0dbfb4a) + Reviewed-by: Kevin Van Vechten -commit 11afa5e56e9561d214b0a4c13ed60bc2d106fbbb -Author: Yaakov Selkowitz -Date: Wed Feb 24 15:17:42 2010 -0600 +commit adbbc661080ba4efdb764c154d40c4d2fe718e16 +Author: Dan Nicholson +Date: Tue Feb 16 08:11:41 2010 -0800 - Cygwin/X: Add configure option for WindowsWM + xfree86: Fix priority ordering for ignoring input classes - WindowsWM support is still experimental, and uses the Rootless extension - which currently breaks the simultaneous build of the other DDXs (see - commit b3415187e92960cbff784108b5a3a8d130dc34c5). So we disable it by - default for now; once the latter issue is fixed we can make this 'auto'. + Commit 8736d112afb0dd61dfdaadd6378eafd200b2ef5f changed the priority + ordering of the InputClass option merging to be "last match wins". This + fixes the handling of Option "Ignore" to follow that logic. - Signed-off-by: Yaakov Selkowitz - (cherry picked from commit c983f40fe4f30311f31a9df699cdc888709251d0) + Signed-off-by: Dan Nicholson + Reviewed-by: Keith Packard -commit 76e548d09195de750a532ee568171b931c1216fe -Author: Jon TURNEY -Date: Thu Feb 18 14:19:21 2010 -0600 +commit d7c98c1c81ae272f66edb05fde20f4c616604add +Merge: 82cf3a4 03ccbd2 +Author: Keith Packard +Date: Wed Apr 7 22:25:51 2010 -0700 - Don't enable ROOTLESS_WORKAROUND, it breaks composite - - This possibly brings back whatever the bug is in - http://bugs.freedesktop.org/show_bug.cgi?id=1168 for - -rootless mode, but since we don't have reproduction - steps for that, I can't test that... - - Signed-off-by: Jon TURNEY - Tested-by: Yaakov Selkowitz - Signed-off-by: Yaakov Selkowitz - (cherry picked from commit 20701522be803fe47e921fcf059dadf64c7f287d) + Merge remote branch 'whot/for-keith' -commit 4f2489bdf36ac4d6a340e2a327798a1da394573a -Author: Yaakov Selkowitz -Date: Wed Mar 24 00:08:23 2010 -0500 - - Cygwin/X: Disable unsupported extensions in configure - - Several extensions are not supported by XWin, some of which are enabled - by default in configure. We forcefully disable these early on so that - configure will succeed without arguments and without the corresponding - proto installed. - - Signed-off-by: Yaakov Selkowitz - (cherry picked from commit 95c9947f6244d37592958b70760bd1ac885b625a) - -commit f121ce4d22ff23f16cc374c9a125d3815765bb0c -Author: Yaakov Selkowitz -Date: Mon Mar 22 12:47:52 2010 -0500 - - Disable setuid configure test on Cygwin - - Only Xorg is installed setuid, so there is no need to run this configure - test on Cygwin. - - Signed-off-by: Yaakov Selkowitz - (cherry picked from commit 24c9d48cd6999f1e90f9f0e2bbfebd8e95d314d8) - -commit b12f6142f356a72af64665e753c5a4e61b2a6ec1 +commit 03ccbd2579948d11e5f16f88cdf68a55f57c9d26 Author: Peter Hutterer Date: Thu Apr 8 13:47:26 2010 +1000 @@ -1828,11 +7459,8 @@ Date: Thu Apr 8 13:47:26 2010 +1000 potential users to them. Signed-off-by: Peter Hutterer - (cherry picked from commit 03ccbd2579948d11e5f16f88cdf68a55f57c9d26) - - Signed-off-by: Peter Hutterer -commit 3e2ab9139b12b1239eebcbb6c6a23e7284dd7b44 +commit d4dd3d0085f8eaca8c989aaeace1a1a24c5ebf49 Author: Dan Nicholson Date: Sat Apr 3 09:33:51 2010 -0700 @@ -1843,11 +7471,8 @@ Date: Sat Apr 3 09:33:51 2010 -0700 Signed-off-by: Dan Nicholson Signed-off-by: Peter Hutterer - (cherry picked from commit d4dd3d0085f8eaca8c989aaeace1a1a24c5ebf49) - - Signed-off-by: Peter Hutterer -commit 59f96734633fce3c2bee62bce860aed33033ce3e +commit 95f01bdfee8241371675f0089170fa6b2908d815 Author: Dan Nicholson Date: Sat Apr 3 10:08:25 2010 -0700 @@ -1869,11 +7494,8 @@ Date: Sat Apr 3 10:08:25 2010 -0700 Signed-off-by: Dan Nicholson Signed-off-by: Peter Hutterer - (cherry picked from commit 95f01bdfee8241371675f0089170fa6b2908d815) - - Signed-off-by: Peter Hutterer -commit 0c4a358eae0e77f389380bbbf39d4419f2dd6dcd +commit a1bae63dc634a5a79861eab128c63506081f7ed9 Author: Dan Nicholson Date: Sat Apr 3 09:33:49 2010 -0700 @@ -1890,11 +7512,8 @@ Date: Sat Apr 3 09:33:49 2010 -0700 Signed-off-by: Dan Nicholson Signed-off-by: Peter Hutterer - (cherry picked from commit a1bae63dc634a5a79861eab128c63506081f7ed9) - - Signed-off-by: Peter Hutterer -commit a4516965de447332794ee0afb9503c351fff6fe8 +commit 2ac33888a9a5766aaf88bc92a8bd1d489873524c Author: Dan Nicholson Date: Sat Apr 3 09:33:48 2010 -0700 @@ -1904,11 +7523,8 @@ Date: Sat Apr 3 09:33:48 2010 -0700 Signed-off-by: Dan Nicholson Signed-off-by: Peter Hutterer - (cherry picked from commit 2ac33888a9a5766aaf88bc92a8bd1d489873524c) - - Signed-off-by: Peter Hutterer -commit eb07b8606f9a1349baf8114bb36dc2712e5d3419 +commit 2460e921d18fd264e6f6374be0908f4100442650 Author: Dan Nicholson Date: Sat Apr 3 09:33:47 2010 -0700 @@ -1919,11 +7535,8 @@ Date: Sat Apr 3 09:33:47 2010 -0700 Signed-off-by: Dan Nicholson Signed-off-by: Peter Hutterer - (cherry picked from commit 2460e921d18fd264e6f6374be0908f4100442650) - - Signed-off-by: Peter Hutterer -commit ad6c5e450cacee3777e7c541d4841ee580339a5d +commit c8a608cb6ce8f9c86258c1ab49084f691fa9cc51 Author: Peter Hutterer Date: Wed Apr 7 10:04:38 2010 +1000 @@ -1937,11 +7550,8 @@ Date: Wed Apr 7 10:04:38 2010 +1000 Acked-by: Julien Cristau Acked-by: Dan Nicholson Acked-by: James Cloos - (cherry picked from commit c8a608cb6ce8f9c86258c1ab49084f691fa9cc51) - - Signed-off-by: Peter Hutterer -commit c01250576ffadcd6c4591978b78da878d91ec11c +commit 6b09f66d8c6ebcee70382b5cca1ba82b68f20afa Author: Pierre-Loup A. Griffais Date: Fri Apr 2 12:48:21 2010 -0700 @@ -1949,48 +7559,10 @@ Date: Fri Apr 2 12:48:21 2010 -0700 Signed-off-by: Pierre-Loup A. Griffais Signed-off-by: Peter Hutterer - (cherry picked from commit 6b09f66d8c6ebcee70382b5cca1ba82b68f20afa) - - Signed-off-by: Peter Hutterer -commit 50ddc4af59f41a1c96088c1e22a4917b21aaf098 -Author: Gaetan Nadon -Date: Mon Apr 5 19:12:22 2010 -0400 - - doc: specify 1.6.1 as the minimum version for doxygen. - - Older versions generate filenames that are different from - the ones listed in the Makefile. - - Reviewed-by: Jeremy Huddleston - Signed-off-by: Gaetan Nadon - Signed-off-by: Keith Packard - (cherry picked from commit 6150595bdbacde13bb4f9aba81b15435089bee94) - - Signed-off-by: Peter Hutterer - -commit a68b0e27b6c60921c97f61daa2d9d723e0a5d98f -Author: Paulo Ricardo Zanoni -Date: Thu Mar 11 14:28:18 2010 -0300 - - dix: be more verbose when we run out of opcodes - - If we run out of opcodes, nothing is print on the log, making the - problem hard to debug. In the current Xserver, if you enable some - extensions like multibuffer (+2 events) and use nvidia binary driver (+5 - events) you can run out of opcode numbers. - - Signed-off-by: Paulo Ricardo Zanoni - Reviewed-by: Peter Hutterer - Reviewed-by: Julien Cristau - Signed-off-by: Keith Packard - (cherry picked from commit a9fe7cfa77ccee64d68732dc3f37d35cbfc27a65) - - Signed-off-by: Peter Hutterer - -commit 5201d3c230e52c9d1ba90ab1712307541e024a6b +commit 82cf3a4ae01811917f7903d6f62ba9b7132adf7e Author: Alan Coopersmith -Date: Thu Apr 8 14:01:21 2010 -0700 +Date: Tue Apr 6 15:52:18 2010 -0700 Convert x86emu fixed size int typedefs to use stdint types @@ -2008,8 +7580,101 @@ Date: Thu Apr 8 14:01:21 2010 -0700 Acked-by: Matt Turner Acked-by: Tiago Vignatti Signed-off-by: Keith Packard - (cherry picked from commit 82cf3a4ae01811917f7903d6f62ba9b7132adf7e) - Signed-off-by: Peter Hutterer + +commit a9fe7cfa77ccee64d68732dc3f37d35cbfc27a65 +Author: Paulo Ricardo Zanoni +Date: Thu Mar 11 14:28:18 2010 -0300 + + dix: be more verbose when we run out of opcodes + + If we run out of opcodes, nothing is print on the log, making the + problem hard to debug. In the current Xserver, if you enable some + extensions like multibuffer (+2 events) and use nvidia binary driver (+5 + events) you can run out of opcode numbers. + + Signed-off-by: Paulo Ricardo Zanoni + Reviewed-by: Peter Hutterer + Reviewed-by: Julien Cristau + Signed-off-by: Keith Packard + +commit 6150595bdbacde13bb4f9aba81b15435089bee94 +Author: Gaetan Nadon +Date: Mon Apr 5 19:12:22 2010 -0400 + + doc: specify 1.6.1 as the minimum version for doxygen. + + Older versions generate filenames that are different from + the ones listed in the Makefile. + + Reviewed-by: Jeremy Huddleston + Signed-off-by: Gaetan Nadon + Signed-off-by: Keith Packard + +commit cbda58c963af5bb9c4643e9017dd4eec589ceff3 +Merge: a7698a6 c983f40 +Author: Keith Packard +Date: Wed Apr 7 15:51:38 2010 -0700 + + Merge remote branch 'yselkowitz/master' + +commit a7698a677682a32960b885c22fdba2add70f4658 +Merge: 495cec7 165a4a9 +Author: Keith Packard +Date: Tue Apr 6 12:36:15 2010 -0700 + + Merge remote branch 'jbarnes/master' + +commit c983f40fe4f30311f31a9df699cdc888709251d0 +Author: Yaakov Selkowitz +Date: Wed Feb 24 15:17:42 2010 -0600 + + Cygwin/X: Add configure option for WindowsWM + + WindowsWM support is still experimental, and uses the Rootless extension + which currently breaks the simultaneous build of the other DDXs (see + commit b3415187e92960cbff784108b5a3a8d130dc34c5). So we disable it by + default for now; once the latter issue is fixed we can make this 'auto'. + + Signed-off-by: Yaakov Selkowitz + +commit 20701522be803fe47e921fcf059dadf64c7f287d +Author: Jon TURNEY +Date: Thu Feb 18 14:19:21 2010 -0600 + + Don't enable ROOTLESS_WORKAROUND, it breaks composite + + This possibly brings back whatever the bug is in + http://bugs.freedesktop.org/show_bug.cgi?id=1168 for + -rootless mode, but since we don't have reproduction + steps for that, I can't test that... + + Signed-off-by: Jon TURNEY + Tested-by: Yaakov Selkowitz + Signed-off-by: Yaakov Selkowitz + +commit 95c9947f6244d37592958b70760bd1ac885b625a +Author: Yaakov Selkowitz +Date: Wed Mar 24 00:08:23 2010 -0500 + + Cygwin/X: Disable unsupported extensions in configure + + Several extensions are not supported by XWin, some of which are enabled + by default in configure. We forcefully disable these early on so that + configure will succeed without arguments and without the corresponding + proto installed. + + Signed-off-by: Yaakov Selkowitz + +commit 24c9d48cd6999f1e90f9f0e2bbfebd8e95d314d8 +Author: Yaakov Selkowitz +Date: Mon Mar 22 12:47:52 2010 -0500 + + Disable setuid configure test on Cygwin + + Only Xorg is installed setuid, so there is no need to run this configure + test on Cygwin. + + Signed-off-by: Yaakov Selkowitz commit 495cec794dad95ed0c79048f3c410ad23e7d5ea4 Author: Keith Packard @@ -2113,6 +7778,201 @@ Date: Mon Mar 29 11:44:07 2010 -0700 Merge remote branch 'whot/for-keith' +commit 165a4a9c7de0fcc6ef6a6421736b412ccb35965e +Author: Jesse Barnes +Date: Tue Mar 23 09:47:08 2010 -0700 + + GLX/DRI2: expose swap control extensions if DDX support is present + + Export DDX swap control status from the DRI2 module and check for it in + GLX when initializing extensions. + + Reviewed-by: Mario Kleiner + Signed-off-by: Jesse Barnes + +commit 5933b0abc6a76aaea84aa534df89900cd795c888 +Author: Jesse Barnes +Date: Mon Mar 8 15:10:47 2010 -0800 + + DRI2: prevent swap wakes from waking MSC waiters + + If a few swaps were queued leading to a throttle related block on the + client, and then the client submitted an MSC wait, one of the previous + swap wakeups could have caused the MSC wait to complete early. Add a + flag for this to prevent a swap wake from prematurely waking an MSC + waiter. + + Reported-by: Mario Kleiner + Reviewed-by: Mario Kleiner + Signed-off-by: Jesse Barnes + +commit b00d435ddf2e9817e33bfd5f7e9b905442dc23c7 +Author: Jesse Barnes +Date: Mon Mar 8 12:41:25 2010 -0800 + + DRI2: handle swapsPending better + + Avoid a potential swapsPending underflow by incrementing it before + ScheduleSwap, which may complete it immediately. And be sure to + decrement it again in case the schedule failed. + + Reported-by: Mario Kleiner + Reviewed-by: Mario Kleiner + Signed-off-by: Jesse Barnes + +commit 0294ff2a5cadddc8fcc77ba9a851f979f0b91fc3 +Author: Jesse Barnes +Date: Mon Mar 8 12:39:54 2010 -0800 + + DRI2: throttle swaps at submission time too + + We need to throttle swaps here in addition to when the context is made + current to avoid causing problems with clients that just swap. + Throttling here also ensures our swaps get ordered as long as we block + the client occasionally. + + Reported-by: Mario Kleiner + Reviewed-by: Mario Kleiner + Signed-off-by: Jesse Barnes + +commit db1c7cb604167baf49e61be4c09ccf7b592c4af3 +Author: Jesse Barnes +Date: Mon Mar 8 12:38:37 2010 -0800 + + DRI2: advertise lowest supported DRI2 protocol version + + Update our supported DRI2 protocol version as each driver does + DRI2ScreenInit, since depending on available kernel features, each DDX + may support different callbacks and therefore protocol. + + Reviewed-by: Mario Kleiner + Signed-off-by: Jesse Barnes + +commit 87ca6320f26eb3129e3c19056e1d8fa5c1784723 +Author: Jesse Barnes +Date: Fri Mar 5 09:49:03 2010 -0800 + + DRI2: handle swap_interval of 0 correctly + + A 0 swap interval means that swaps shouldn't be sync'd to vblank, so + just complete the swap immediately in that case. + + Reviewed-by: Mario Kleiner + Signed-off-by: Jesse Barnes + +commit 8476d99231cb725c090305d60f1c1c889d25c8dc +Author: Jesse Barnes +Date: Fri Mar 5 09:15:24 2010 -0800 + + DRI2: drawable lifetime fixes + + Handle drawable destruction and lifetime correctly. + + Check whether the drawable priv is valid in DRI2SwapInterval(), + DRI2WaitSBC() and DRI2WaitMSC(); it may have gone away, so be sure to + check it before using it. + + If more than 1 outstanding swap is queued, we may complete several after + an app has exited. If we free it after the first one completes and the + refcount reaches 0, we'll crash the server on subsequent completions. + So delay freeing until all swaps complete and remove the error message + as this is a normal occurence. To do this properly, we must also avoid + destroying drawables in DRI2DestroyDrawable() if a swap or wait event is + pending. + + And finally, make sure we free drawables in DRI2WaitMSCComplete() if + necessary (i.e. if the refcount has reached 0 and this MSC was the last + pending event on the object). + + Reported-by: Mario Kleiner + Reviewed-by: Mario Kleiner + Signed-off-by: Jesse Barnes + +commit b180e43977710b56ccfd6780f204ddcc952987a1 +Author: Jesse Barnes +Date: Thu Mar 4 10:31:59 2010 -0800 + + DRI2: fix swapbuffers handling of SBC and target MSC + + Returns expected SBC after completion of swap to caller, as required by + OML_sync_control spec, instead of the last_swap_target value. + + Passes target_msc, divisor, remainder, correctly for + glXSwapBuffersMscOML() call, while retaining old behaviour for simple + glXSwapBuffers() call. + + An OML swap can have a 0 target_msc, which just means it needs to + satisfy the divisor/remainder equation. Pass this down to the driver as + needed so we can support it. + + Signed-off-by: Jesse Barnes + Signed-off-by: Mario Kleiner + +commit 751e8c09d34df4b41e8d8384a3ec1bf5cb8ca028 +Author: Mario Kleiner +Date: Sun Feb 21 05:26:00 2010 +0100 + + DRI2WaitSbc(): Fixes for correct semantic of glXWaitForSbcOML() + + Added implementation for case target_sbc == 0. In that case, the + function shall schedule a wait until all pending swaps for the drawable + have completed. + + Fix for non-blocking case. Old implementation returned random, + uninitialized values for (ust,msc,sbc) if it returned immediately + without scheduling a wait due to sbc >= target_sbc. + + Now if function doesn't schedule a wait, but returns immediately, + it returns the (ust,msc,sbc) of the most recently completed swap, + i.e., the UST and MSC corresponding to the time when the returned + current SBC was reached. + + Signed-off-by: Mario Kleiner + +commit 0de4974b90b10fa6a447cdf980b4a114c6c9e5a8 +Author: Mario Kleiner +Date: Sun Feb 21 05:25:59 2010 +0100 + + DRI2: Fix glitches in DRI2SwapComplete() and DRI2WakeupClient() + + DRI2SwapComplete(): Increment pPriv->swap_count++; before calling + into callback for INTEL_swap_events extension, so the swap event + contains the current SBC after swap completion instead of the + previous one. + + DRI2WakeupClient: Check for pPriv->target_sbc <= pPriv->swap_count, + had wrong comparison pPriv->target_sbc >= pPriv->swap_count for + unblocking of clients of DRI2WaitSBC(). + + Signed-off-by: Mario Kleiner + +commit 4c8ec49826a46eb3b36c69d2ad3f82320c179c38 +Author: Jesse Barnes +Date: Thu Mar 4 09:54:15 2010 -0800 + + DRI2: make target_sbc signed + + We need to track invalid targets as well as 0 targets, so just make it + signed so our comparisons work like they should. + + Reviewed-by: Mario Kleiner + Reported-by: Kristian Høgsberg + Signed-off-by: Jesse Barnes + +commit c4d54816f2ee4883d8f9bcf4595474fb58c95146 +Author: Jesse Barnes +Date: Thu Mar 4 09:19:13 2010 -0800 + + DRI2: fixup handling of last_swap_target + + We need to initialize the swap target, which is passed to the driver to + schedule events. Rather than using -1 to indicate that the field is + uninitialized, just make sure we initialize it at drawable creation + time. + + Reviewed-by: Mario Kleiner + Signed-off-by: Jesse Barnes + commit 28a5f14b4089dccb8045cc4fdc923542a73dd22d Author: Jeremy Huddleston Date: Sun Mar 28 13:46:23 2010 -0700 diff --git a/xserver/Makefile.bsd-wrapper b/xserver/Makefile.bsd-wrapper index d50766355..2b42a245c 100644 --- a/xserver/Makefile.bsd-wrapper +++ b/xserver/Makefile.bsd-wrapper @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile.bsd-wrapper,v 1.29 2010/07/27 19:02:24 matthieu Exp $ +# $OpenBSD: Makefile.bsd-wrapper,v 1.30 2010/12/05 15:36:03 matthieu Exp $ .include @@ -32,7 +32,6 @@ DRI_OPTION= --disable-dri --disable-dri2 .endif CONFIGURE_ARGS= --localstatedir=/var --sysconfdir=/etc/X11 \ - --with-fontrootdir=${LIBDIR}/X11/fonts \ --with-xkb-path=/etc/X11/xkb \ --with-xkb-output=/var/db/xkb \ --with-module-dir=${LIBDIR}/modules ${GLX_OPTION} \ diff --git a/xserver/Makefile.in b/xserver/Makefile.in index a69871897..c932b97d7 100644 --- a/xserver/Makefile.in +++ b/xserver/Makefile.in @@ -127,10 +127,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -218,6 +214,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -232,6 +230,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -249,10 +248,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -308,10 +311,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -329,17 +333,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -366,20 +364,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -471,6 +472,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ @@ -899,7 +901,7 @@ distclean-tags: distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) - $(mkdir_p) $(distdir)/. $(distdir)/hw/xfree86/common $(distdir)/m4 + $(mkdir_p) $(distdir)/. $(distdir)/doc/xml $(distdir)/hw/xfree86/common $(distdir)/m4 @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ diff --git a/xserver/Xext/Makefile.am b/xserver/Xext/Makefile.am index 53cbc1fbd..e444fd08f 100644 --- a/xserver/Xext/Makefile.am +++ b/xserver/Xext/Makefile.am @@ -99,13 +99,6 @@ BUILTIN_SRCS += $(XCALIBRATE_SRCS) # XCalibrate needs tslib endif -# Multi-buffering extension -MULTIBUFFER_SRCS = mbuf.c -EXTRA_MULTIBUFFER_SRCS = mbufbf.c mbufpx.c -if MULTIBUFFER -MODULE_SRCS += $(MULTIBUFFER_SRCS) -endif - # XF86 Big Font extension BIGFONT_SRCS = xf86bigfont.c xf86bigfontsrv.h if XF86BIGFONT @@ -140,9 +133,6 @@ EXTRA_DIST = \ $(XSELINUX_SRCS) \ $(XCALIBRATE_SRCS) \ $(XINERAMA_SRCS) \ - $(MULTIBUFFER_SRCS) \ - $(EXTRA_MULTIBUFFER_SRCS) \ - $(FONTCACHE_SRCS) \ $(BIGFONT_SRCS) \ $(DPMS_SRCS) \ $(GE_SRCS) diff --git a/xserver/Xext/Makefile.in b/xserver/Xext/Makefile.in index 93da731b1..5e562e330 100644 --- a/xserver/Xext/Makefile.in +++ b/xserver/Xext/Makefile.in @@ -49,9 +49,8 @@ host_triplet = @host@ @XSELINUX_TRUE@am__append_10 = $(SELINUX_LIBS) @XCSECURITY_TRUE@am__append_11 = $(XCSECURITY_SRCS) @XCALIBRATE_TRUE@am__append_12 = $(XCALIBRATE_SRCS) -@MULTIBUFFER_TRUE@am__append_13 = $(MULTIBUFFER_SRCS) -@XF86BIGFONT_TRUE@am__append_14 = $(BIGFONT_SRCS) -@DPMSExtension_TRUE@am__append_15 = $(DPMS_SRCS) +@XF86BIGFONT_TRUE@am__append_13 = $(BIGFONT_SRCS) +@DPMSExtension_TRUE@am__append_14 = $(DPMS_SRCS) subdir = Xext DIST_COMMON = $(am__sdk_HEADERS_DIST) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in @@ -82,8 +81,7 @@ am__libXext_la_SOURCES_DIST = bigreq.c geext.c shape.c sleepuntil.c \ security.c securitysrv.h xcalibrate.c xf86bigfont.c \ xf86bigfontsrv.h xvmain.c xvdisp.c xvmc.c xvdix.h xvmcext.h \ xvdisp.h xres.c saver.c xselinux_ext.c xselinux_hooks.c \ - xselinux_label.c xselinux.h xselinuxint.h mbuf.c dpms.c \ - dpmsproc.h + xselinux_label.c xselinux.h xselinuxint.h dpms.c dpmsproc.h am__objects_1 = shm.lo @MITSHM_TRUE@am__objects_2 = $(am__objects_1) am__objects_3 = panoramiX.lo panoramiXprocs.lo panoramiXSwap.lo @@ -108,13 +106,11 @@ am__objects_18 = saver.lo @SCREENSAVER_TRUE@am__objects_19 = $(am__objects_18) am__objects_20 = xselinux_ext.lo xselinux_hooks.lo xselinux_label.lo @XSELINUX_TRUE@am__objects_21 = $(am__objects_20) -am__objects_22 = mbuf.lo -@MULTIBUFFER_TRUE@am__objects_23 = $(am__objects_22) -am__objects_24 = dpms.lo -@DPMSExtension_TRUE@am__objects_25 = $(am__objects_24) -am__objects_26 = $(am__objects_15) $(am__objects_17) $(am__objects_19) \ - $(am__objects_21) $(am__objects_23) $(am__objects_25) -am_libXext_la_OBJECTS = $(am__objects_13) $(am__objects_26) +am__objects_22 = dpms.lo +@DPMSExtension_TRUE@am__objects_23 = $(am__objects_22) +am__objects_24 = $(am__objects_15) $(am__objects_17) $(am__objects_19) \ + $(am__objects_21) $(am__objects_23) +am_libXext_la_OBJECTS = $(am__objects_13) $(am__objects_24) libXext_la_OBJECTS = $(am_libXext_la_OBJECTS) @XORG_FALSE@am_libXext_la_rpath = @XORG_TRUE@am_libXext_la_rpath = @@ -132,8 +128,8 @@ libXextbuiltin_la_OBJECTS = $(am_libXextbuiltin_la_OBJECTS) am__libXextmodule_la_SOURCES_DIST = xvmain.c xvdisp.c xvmc.c xvdix.h \ xvmcext.h xvdisp.h xres.c saver.c xselinux_ext.c \ xselinux_hooks.c xselinux_label.c xselinux.h xselinuxint.h \ - mbuf.c dpms.c dpmsproc.h -@XORG_TRUE@am_libXextmodule_la_OBJECTS = $(am__objects_26) + dpms.c dpmsproc.h +@XORG_TRUE@am_libXextmodule_la_OBJECTS = $(am__objects_24) libXextmodule_la_OBJECTS = $(am_libXextmodule_la_OBJECTS) @XORG_TRUE@am_libXextmodule_la_rpath = DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include @@ -200,10 +196,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -291,6 +283,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -305,6 +299,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -322,10 +317,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -381,10 +380,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -402,17 +402,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -439,20 +433,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -544,6 +541,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ @@ -707,11 +705,11 @@ AM_CFLAGS = $(DIX_CFLAGS) BUILTIN_SRCS = bigreq.c geext.c shape.c sleepuntil.c sleepuntil.h \ sync.c syncsrv.h xcmisc.c xtest.c $(am__append_1) \ $(am__append_5) $(am__append_7) $(am__append_11) \ - $(am__append_12) $(am__append_14) + $(am__append_12) $(am__append_13) # Sources always included in libXextmodule.la & libXext.la. That's right, zero. MODULE_SRCS = $(am__append_2) $(am__append_3) $(am__append_4) \ - $(am__append_9) $(am__append_13) $(am__append_15) + $(am__append_9) $(am__append_14) MODULE_LIBS = $(am__append_10) # Optional sources included if extension enabled by configure.ac rules @@ -744,10 +742,6 @@ XCSECURITY_SRCS = security.c securitysrv.h XCALIBRATE_SRCS = xcalibrate.c # XCalibrate needs tslib -# Multi-buffering extension -MULTIBUFFER_SRCS = mbuf.c -EXTRA_MULTIBUFFER_SRCS = mbufbf.c mbufpx.c - # XF86 Big Font extension BIGFONT_SRCS = xf86bigfont.c xf86bigfontsrv.h @@ -770,9 +764,6 @@ EXTRA_DIST = \ $(XSELINUX_SRCS) \ $(XCALIBRATE_SRCS) \ $(XINERAMA_SRCS) \ - $(MULTIBUFFER_SRCS) \ - $(EXTRA_MULTIBUFFER_SRCS) \ - $(FONTCACHE_SRCS) \ $(BIGFONT_SRCS) \ $(DPMS_SRCS) \ $(GE_SRCS) @@ -835,7 +826,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bigreq.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dpms.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/geext.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbuf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/panoramiX.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/panoramiXSwap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/panoramiXprocs.Plo@am__quote@ diff --git a/xserver/Xext/bigreq.c b/xserver/Xext/bigreq.c index f9f15edc5..ce3734e8d 100644 --- a/xserver/Xext/bigreq.c +++ b/xserver/Xext/bigreq.c @@ -76,5 +76,5 @@ ProcBigReqDispatch (ClientPtr client) swapl(&rep.max_request_size, n); } WriteToClient(client, sizeof(xBigReqEnableReply), (char *)&rep); - return(client->noClientException); + return Success; } diff --git a/xserver/Xext/dpms.c b/xserver/Xext/dpms.c index df63a8bf1..33a6e267c 100644 --- a/xserver/Xext/dpms.c +++ b/xserver/Xext/dpms.c @@ -61,7 +61,7 @@ ProcDPMSGetVersion(ClientPtr client) swaps(&rep.minorVersion, n); } WriteToClient(client, sizeof(xDPMSGetVersionReply), (char *)&rep); - return(client->noClientException); + return Success; } static int @@ -82,7 +82,7 @@ ProcDPMSCapable(ClientPtr client) swaps(&rep.sequenceNumber, n); } WriteToClient(client, sizeof(xDPMSCapableReply), (char *)&rep); - return(client->noClientException); + return Success; } static int @@ -108,7 +108,7 @@ ProcDPMSGetTimeouts(ClientPtr client) swaps(&rep.off, n); } WriteToClient(client, sizeof(xDPMSGetTimeoutsReply), (char *)&rep); - return(client->noClientException); + return Success; } static int @@ -134,7 +134,7 @@ ProcDPMSSetTimeouts(ClientPtr client) DPMSOffTime = stuff->off * MILLI_PER_SECOND; SetScreenSaverTimer(); - return(client->noClientException); + return Success; } static int @@ -150,7 +150,7 @@ ProcDPMSEnable(ClientPtr client) SetScreenSaverTimer(); } - return(client->noClientException); + return Success; } static int @@ -164,7 +164,7 @@ ProcDPMSDisable(ClientPtr client) DPMSEnabled = FALSE; - return(client->noClientException); + return Success; } static int @@ -187,7 +187,7 @@ ProcDPMSForceLevel(ClientPtr client) DPMSSet(client, stuff->level); - return(client->noClientException); + return Success; } static int @@ -210,7 +210,7 @@ ProcDPMSInfo(ClientPtr client) swaps(&rep.power_level, n); } WriteToClient(client, sizeof(xDPMSInfoReply), (char *)&rep); - return(client->noClientException); + return Success; } static int diff --git a/xserver/Xext/geext.c b/xserver/Xext/geext.c index f0a3d8778..e61989caa 100644 --- a/xserver/Xext/geext.c +++ b/xserver/Xext/geext.c @@ -36,12 +36,10 @@ #define rClient(obj) (clients[CLIENT_ID((obj)->resource)]) -static int GEClientPrivateKeyIndex; -DevPrivateKey GEClientPrivateKey = &GEClientPrivateKeyIndex; +DevPrivateKeyRec GEClientPrivateKeyRec; int RT_GECLIENT = 0; - GEExtension GEExtensions[MAXEXTENSIONS]; /* Major available requests */ @@ -91,7 +89,7 @@ ProcGEQueryVersion(ClientPtr client) } WriteToClient(client, sizeof(xGEQueryVersionReply), (char*)&rep); - return(client->noClientException); + return Success; } int (*ProcGEVector[GENumberRequests])(ClientPtr) = { @@ -209,7 +207,7 @@ GEExtensionInit(void) { ExtensionEntry *extEntry; - if (!dixRequestPrivate(GEClientPrivateKey, sizeof(GEClientInfoRec))) + if (!dixRegisterPrivateKey(&GEClientPrivateKeyRec, PRIVATE_CLIENT, sizeof(GEClientInfoRec))) FatalError("GEExtensionInit: GE private request failed.\n"); if(!AddCallback(&ClientStateCallback, GEClientCallback, 0)) diff --git a/xserver/Xext/geint.h b/xserver/Xext/geint.h index 10a33cea3..3e2b8e187 100644 --- a/xserver/Xext/geint.h +++ b/xserver/Xext/geint.h @@ -37,7 +37,8 @@ #include "extnsionst.h" #include -extern _X_EXPORT DevPrivateKey GEClientPrivateKey; +extern _X_EXPORT DevPrivateKeyRec GEClientPrivateKeyRec; +#define GEClientPrivateKey (&GEClientPrivateKeyRec) typedef struct _GEClientInfo { CARD32 major_version; diff --git a/xserver/Xext/mbuf.c b/xserver/Xext/mbuf.c deleted file mode 100644 index aacb9cfde..000000000 --- a/xserver/Xext/mbuf.c +++ /dev/null @@ -1,2014 +0,0 @@ -/************************************************************ - -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -********************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include "window.h" -#include "os.h" -#include "windowstr.h" -#include "scrnintstr.h" -#include "pixmapstr.h" -#include "gcstruct.h" -#include "extnsionst.h" -#include "dixstruct.h" -#include "resource.h" -#include "opaque.h" -#include "sleepuntil.h" -#include "inputstr.h" -#include -#include - -#include -#if !defined(WIN32) -#include -#endif - -/* given an OtherClientPtr obj, get the ClientPtr */ -#define rClient(obj) (clients[CLIENT_ID((obj)->resource)]) - -/* given a MultibufferPtr b, get the ClientPtr */ -#define bClient(b) (clients[CLIENT_ID(b->pPixmap->drawable.id)]) - -#define ValidEventMasks (ExposureMask|MultibufferClobberNotifyMask|MultibufferUpdateNotifyMask) - -/* The _Multibuffer and _Multibuffers structures below refer to each other, - * so we need this forward declaration - */ -typedef struct _Multibuffers *MultibuffersPtr; - -/* - * per-Multibuffer data - */ -typedef struct _Multibuffer { - MultibuffersPtr pMultibuffers; /* associated window data */ - Mask eventMask; /* MultibufferClobberNotifyMask|ExposureMask|MultibufferUpdateNotifyMask */ - Mask otherEventMask; /* mask of all other clients event masks */ - OtherClients *otherClients; /* other clients that want events */ - int number; /* index of this buffer into array */ - int side; /* always Mono */ - int clobber; /* Unclobbered, PartiallyClobbered, FullClobbered */ - PixmapPtr pPixmap; /* associated pixmap */ -} MultibufferRec, *MultibufferPtr; - -/* - * per-window data - */ - -typedef struct _Multibuffers { - WindowPtr pWindow; /* associated window */ - int numMultibuffer; /* count of buffers */ - int refcnt; /* ref count for delete */ - int displayedMultibuffer; /* currently active buffer */ - int updateAction; /* Undefined, Background, Untouched, Copied */ - int updateHint; /* Frequent, Intermittent, Static */ - int windowMode; /* always Mono */ - - TimeStamp lastUpdate; /* time of last update */ - - unsigned short width, height; /* last known window size */ - short x, y; /* for static gravity */ - - MultibufferPtr buffers; /* array of numMultibuffer buffers */ -} MultibuffersRec; - -/* - * per-screen data - */ -typedef struct _MultibufferScreen { - PositionWindowProcPtr PositionWindow; /* pWin, x,y */ -} MultibufferScreenRec, *MultibufferScreenPtr; - -/* - * per display-image-buffers request data. - */ - -typedef struct _DisplayRequest { - struct _DisplayRequest *next; - TimeStamp activateTime; - ClientPtr pClient; - XID id; -} DisplayRequestRec, *DisplayRequestPtr; - -#define DestroyWindowMask (1L<<0) -#define PositionWindowMask (1L<<1) -#define PostValidateTreeMask (1L<<2) -#define ClipNotifyMask (1L<<3) -#define WindowExposuresMask (1L<<4) -#define CopyWindowMask (1L<<5) -#define ClearToBackgroundMask (1L<<6) -#define ChangeWindowAttributesMask (1L<<7) - -extern int MultibufferScreenIndex; -extern int MultibufferWindowIndex; - -extern RESTYPE MultibufferDrawableResType; - -extern void MultibufferUpdate( /* pMbuffer, time */ - MultibufferPtr /* pMultibuffer */, - CARD32 /* time */ - ); -extern void MultibufferExpose( /* pMbuffer, pRegion */ - MultibufferPtr /* pMultibuffer */, - RegionPtr /* pRegion */ - ); -extern void MultibufferClobber( /* pMbuffer */ - MultibufferPtr /* pMultibuffer */ - ); - -typedef struct _mbufWindow *mbufWindowPtr; - -void DestroyImageBuffers (WindowPtr pWin); - -/* - * per-buffer data - */ - -#define MB_DISPLAYED_BUFFER(pMBWindow) \ - ((pMBWindow)->buffers + (pMBWindow)->displayedMultibuffer) - -typedef struct _mbufBuffer { - mbufWindowPtr pMBWindow; /* associated window data */ - Mask eventMask; /* client event mask */ - Mask otherEventMask; /* union of other clients' event masks */ - OtherClientsPtr otherClients; /* other clients that want events */ - int number; /* index of this buffer into array */ - int side; /* stero side: always Mono */ - int clobber; /* clober state */ - DrawablePtr pDrawable; /* associated drawable */ -} mbufBufferRec, *mbufBufferPtr; - - -/* - * per-window data - */ - -#define MB_WINDOW_PRIV(pWin) \ - ((mbufWindowPtr)((pWin)->devPrivates[MultibufferWindowIndex].ptr)) - -typedef struct _mbufWindow { - WindowPtr pWindow; /* associated window */ - int numMultibuffer; /* count of buffers */ - mbufBufferPtr buffers; /* array of (numMultibuffer) buffers */ - int displayedMultibuffer; /* currently active buffer */ - int updateAction; /* Undefined, Background, - Untouched, Copied */ - int updateHint; /* Frequent, Intermittent, Static */ - int windowMode; /* always Mono */ - TimeStamp lastUpdate; /* time of last update */ - short x, y; /* for static gravity */ - unsigned short width, height; /* last known window size */ - DevUnion devPrivate; -} mbufWindowRec; - - -/* - * per-screen data - */ - -#define MB_SCREEN_PRIV(pScreen) \ - ((mbufScreenPtr)((pScreen)->devPrivates[MultibufferScreenIndex].ptr)) - -typedef struct _mbufScreen { - long mbufWindowCount; /* count of multibuffered windows */ - - /* Wrap pScreen->DestroyWindow */ - DestroyWindowProcPtr DestroyWindow; - long funcsWrapped; /* flags which functions are wrapped */ - - /* Initialized by device-dependent section */ - int nInfo; /* number of buffer info rec's */ - xMbufBufferInfo *pInfo; /* buffer info (for Normal buffers) */ - - int (* CreateImageBuffers)( - WindowPtr /* pWin */, - int /* nbuf */, - XID * /* ids */, - int /* action */, - int /* hint */ - ); - void (* DestroyImageBuffers)( - WindowPtr /* pWin */ - ); - void (* DisplayImageBuffers)( - ScreenPtr /* pScreen */, - mbufBufferPtr * /* ppMBBuffer */, - mbufWindowPtr * /* ppMBWindow */, - int /* nbuf */ - ); - void (* ClearImageBufferArea)( - mbufBufferPtr /* pMBBuffer */, - short /* x */, - short /* y */, - unsigned short /* width */, - unsigned short /* height */, - Bool /* exposures */ - ); - Bool (* ChangeMBufferAttributes)( /* pMBWindow, vmask */ - /* FIXME */ - ); - Bool (* ChangeBufferAttributes)( /* pMBBuffer, vmask */ - /* FIXME */ - ); - void (* DeleteBufferDrawable)( - DrawablePtr /* pDrawable */ - ); - void (* WrapScreenFuncs)( - ScreenPtr /* pScreen */ - ); - void (* ResetProc)( - ScreenPtr /* pScreen */ - ); - DevUnion devPrivate; -} mbufScreenRec, *mbufScreenPtr; - - -/* Privates to mbufScreenRec */ - -#ifdef _MULTIBUF_PIXMAP_ -#define MB_SCREEN_PRIV_PIXMAP(pScreen) \ - ((mbufPixmapPrivPtr) MB_SCREEN_PRIV((pScreen))->devPrivate.ptr) - -typedef struct _mbufPixmapPriv -{ - /* Pointers to wrapped functions */ - PositionWindowProcPtr PositionWindow; /* pWin, x,y */ - long funcsWrapped; /* flags which functions are wrapped */ -} mbufPixmapPrivRec, *mbufPixmapPrivPtr; -#endif /* _MULTIBUF_PIXMAP_ */ - - -#ifdef _MULTIBUF_BUFFER_ - -extern int frameWindowPrivateIndex; - -#define MB_SCREEN_PRIV_BUFFER(pScreen) \ - ((mbufBufferPrivPtr) MB_SCREEN_PRIV((pScreen))->devPrivate.ptr) - -typedef struct _mbufBufferPriv -{ - DevUnion *frameBuffer; /* Array of screen framebuffers */ - DevUnion selectPlane; /* Plane(s) that select displayed buffer */ - - /* - * Note: subtractRgn and unionRgn may overlap. subtractRgn is a union - * of all the old clipLists of the windows that are displaying - * the backbuffer. unionRgn is the union of all the new clipLists - * of the same windows. - */ - - RegionRec backBuffer; /* Area of screen displaying back buffer */ - RegionRec subtractRgn; /* Regions lost to backBuffer */ - RegionRec unionRgn; /* Regions gained by backBuffer */ - Bool rgnChanged; /* TRUE if "backBuffer" needs to be updated */ - - void (* CopyBufferBits)(); /* pMBWindow, srcBufferNum, dstBufferNum */ - void (* DrawSelectPlane)(); /* pScreen, selectPlane, pRegion, bufferNum */ - - /* Pointers to wrapped functions */ - PostValidateTreeProcPtr PostValidateTree; /* pParent, pChild, kind */ - ClipNotifyProcPtr ClipNotify; /* pWin, dx, dy */ - WindowExposuresProcPtr WindowExposures; /* pWin, pRegion */ - CopyWindowProcPtr CopyWindow; /* pWin, oldPt, pOldRegion */ - ClearToBackgroundProcPtr ClearToBackground; /* pWin, x,y,w,h, sendExpose */ - ChangeWindowAttributesProcPtr ChangeWindowAttributes; /* pWin, vmask */ - long funcsWrapped; /* flags which functions are wrapped */ - unsigned inClearToBackground:1; /* used by WindowExposure */ -} mbufBufferPrivRec, *mbufBufferPrivPtr; -#endif /* _MULTIBUF_BUFFER_ */ - -static int MultibufferEventBase; -static int MultibufferErrorBase; -static int MultibufferScreenPrivKeyIndex; -static DevPrivateKey MultibufferScreenPrivKey = &MultibufferScreenPrivKeyIndex; -static int MultibufferWindowPrivKeyIndex; -static DevPrivateKey MultibufferWindowPrivKey = &MultibufferWindowPrivKeyIndex; - -static void PerformDisplayRequest ( - MultibuffersPtr * /* ppMultibuffers */, - MultibufferPtr * /* pMultibuffer */, - int /* nbuf */ - ); -static Bool QueueDisplayRequest ( - ClientPtr /* client */, - TimeStamp /* activateTime */ - ); - -static void BumpTimeStamp ( - TimeStamp * /* ts */, - CARD32 /* inc */ - ); - -static void AliasMultibuffer ( - MultibuffersPtr /* pMultibuffers */, - int /* i */ - ); -static void RecalculateMultibufferOtherEvents ( - MultibufferPtr /* pMultibuffer */ - ); -static int EventSelectForMultibuffer( - MultibufferPtr /* pMultibuffer */, - ClientPtr /* client */, - Mask /* mask */ - ); - -/* - * The Pixmap associated with a buffer can be found as a resource - * with this type - */ -RESTYPE MultibufferDrawableResType; -static int MultibufferDrawableDelete ( - pointer /* value */, - XID /* id */ - ); -/* - * The per-buffer data can be found as a resource with this type. - * the resource id of the per-buffer data is the same as the resource - * id of the pixmap - */ -static RESTYPE MultibufferResType; -static int MultibufferDelete ( - pointer /* value */, - XID /* id */ - ); - -/* - * The per-window data can be found as a resource with this type, - * using the window resource id - */ -static RESTYPE MultibuffersResType; -static int MultibuffersDelete ( - pointer /* value */, - XID /* id */ - ); - -/* - * Clients other than the buffer creator attach event masks in - * OtherClient structures; each has a resource of this type. - */ -static RESTYPE OtherClientResType; -static int OtherClientDelete ( - pointer /* value */, - XID /* id */ - ); - -/**************** - * MultibufferExtensionInit - * - * Called from InitExtensions in main() - * - ****************/ - -extern DISPATCH_PROC(ProcGetBufferAttributes); - -static DISPATCH_PROC(ProcClearImageBufferArea); -static DISPATCH_PROC(ProcCreateImageBuffers); -static DISPATCH_PROC(ProcDestroyImageBuffers); -static DISPATCH_PROC(ProcDisplayImageBuffers); -static DISPATCH_PROC(ProcGetBufferInfo); -static DISPATCH_PROC(ProcGetBufferVersion); -static DISPATCH_PROC(ProcGetMBufferAttributes); -static DISPATCH_PROC(ProcMultibufferDispatch); -static DISPATCH_PROC(ProcSetBufferAttributes); -static DISPATCH_PROC(ProcSetMBufferAttributes); -static DISPATCH_PROC(SProcClearImageBufferArea); -static DISPATCH_PROC(SProcCreateImageBuffers); -static DISPATCH_PROC(SProcDestroyImageBuffers); -static DISPATCH_PROC(SProcDisplayImageBuffers); -static DISPATCH_PROC(SProcGetBufferAttributes); -static DISPATCH_PROC(SProcGetBufferInfo); -static DISPATCH_PROC(SProcGetBufferVersion); -static DISPATCH_PROC(SProcGetMBufferAttributes); -static DISPATCH_PROC(SProcMultibufferDispatch); -static DISPATCH_PROC(SProcSetBufferAttributes); -static DISPATCH_PROC(SProcSetMBufferAttributes); - -static void MultibufferResetProc( - ExtensionEntry * /* extEntry */ - ); -static void SClobberNotifyEvent( - xMbufClobberNotifyEvent * /* from */, - xMbufClobberNotifyEvent * /* to */ - ); -static void SUpdateNotifyEvent( - xMbufUpdateNotifyEvent * /* from */, - xMbufUpdateNotifyEvent * /* to */ - ); -static Bool MultibufferPositionWindow( - WindowPtr /* pWin */, - int /* x */, - int /* y */ - ); - -static void SetupBackgroundPainter ( - WindowPtr /* pWin */, - GCPtr /* pGC */ - ); - -static int DeliverEventsToMultibuffer ( - MultibufferPtr /* pMultibuffer */, - xEvent * /* pEvents */, - int /* count */, - Mask /* filter */ - ); - -void -MultibufferExtensionInit() -{ - ExtensionEntry *extEntry; - int i, j; - ScreenPtr pScreen; - MultibufferScreenPtr pMultibufferScreen; - - for (i = 0; i < screenInfo.numScreens; i++) - { - pScreen = screenInfo.screens[i]; - if (!(pMultibufferScreen = xalloc (sizeof (MultibufferScreenRec)))) - { - for (j = 0; j < i; j++) - xfree (dixLookupPrivate(&screenInfo.screens[j]->devPrivates, MultibufferScreenPrivKey)); - return; - } - dixSetPrivate(&pScreen->devPrivates, MultibufferScreenPrivKey, pMultibufferScreen); - /* - * wrap PositionWindow to resize the pixmap when the window - * changes size - */ - pMultibufferScreen->PositionWindow = pScreen->PositionWindow; - pScreen->PositionWindow = MultibufferPositionWindow; - } - /* - * create the resource types - */ - MultibufferDrawableResType = - CreateNewResourceType(MultibufferDrawableDelete, "MultibufferDrawable"); - if (MultiBufferDrawableResType) - MultibufferDrawableResType |= RC_DRAWABLE; - MultibufferResType = CreateNewResourceType(MultibufferDelete, - "MultibufferBuffer"); - MultibuffersResType = CreateNewResourceType(MultibuffersDelete, - "MultibufferWindow"); - OtherClientResType = CreateNewResourceType(OtherClientDelete, - "MultibufferOtherClient"); - if (MultibufferDrawableResType && MultibufferResType && - MultibuffersResType && OtherClientResType && - (extEntry = AddExtension(MULTIBUFFER_PROTOCOL_NAME, - MultibufferNumberEvents, - MultibufferNumberErrors, - ProcMultibufferDispatch, SProcMultibufferDispatch, - MultibufferResetProc, StandardMinorOpcode))) - { - MultibufferEventBase = extEntry->eventBase; - MultibufferErrorBase = extEntry->errorBase; - EventSwapVector[MultibufferEventBase + MultibufferClobberNotify] = (EventSwapPtr) SClobberNotifyEvent; - EventSwapVector[MultibufferEventBase + MultibufferUpdateNotify] = (EventSwapPtr) SUpdateNotifyEvent; - } -} - -/*ARGSUSED*/ -static void -MultibufferResetProc (extEntry) -ExtensionEntry *extEntry; -{ - int i; - ScreenPtr pScreen; - MultibufferScreenPtr pMultibufferScreen; - - for (i = 0; i < screenInfo.numScreens; i++) - { - pScreen = screenInfo.screens[i]; - if ((pMultibufferScreen = (MultibufferScreenPtr)dixLookupPrivate(&pScreen->devPrivates, MultibufferScreenPrivKey))) - { - pScreen->PositionWindow = pMultibufferScreen->PositionWindow; - xfree (pMultibufferScreen); - } - } -} - -static int -ProcGetBufferVersion (client) - ClientPtr client; -{ - xMbufGetBufferVersionReply rep; - int n; - - REQUEST_SIZE_MATCH (xMbufGetBufferVersionReq); - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.majorVersion = MULTIBUFFER_MAJOR_VERSION; - rep.minorVersion = MULTIBUFFER_MINOR_VERSION; - if (client->swapped) { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - } - WriteToClient(client, sizeof (xMbufGetBufferVersionReply), (char *)&rep); - return (client->noClientException); -} - -static void -SetupBackgroundPainter (pWin, pGC) - WindowPtr pWin; - GCPtr pGC; -{ - pointer gcvalues[4]; - int ts_x_origin, ts_y_origin; - PixUnion background; - int backgroundState; - Mask gcmask; - - /* - * First take care of any ParentRelative stuff by altering the - * tile/stipple origin to match the coordinates of the upper-left - * corner of the first ancestor without a ParentRelative background. - * This coordinate is, of course, negative. - */ - - ts_x_origin = ts_y_origin = 0; - while (pWin->backgroundState == ParentRelative) { - ts_x_origin -= pWin->origin.x; - ts_y_origin -= pWin->origin.y; - pWin = pWin->parent; - } - backgroundState = pWin->backgroundState; - background = pWin->background; - - switch (backgroundState) - { - case BackgroundPixel: - gcvalues[0] = (pointer) background.pixel; - gcvalues[1] = (pointer) FillSolid; - gcmask = GCForeground|GCFillStyle; - break; - - case BackgroundPixmap: - gcvalues[0] = (pointer) FillTiled; - gcvalues[1] = (pointer) background.pixmap; - gcvalues[2] = (pointer)(long) ts_x_origin; - gcvalues[3] = (pointer)(long) ts_y_origin; - gcmask = GCFillStyle|GCTile|GCTileStipXOrigin|GCTileStipYOrigin; - break; - - default: - gcvalues[0] = (pointer) GXnoop; - gcmask = GCFunction; - } - DoChangeGC(pGC, gcmask, (XID *)gcvalues, TRUE); -} - -int -CreateImageBuffers (pWin, nbuf, ids, action, hint) - WindowPtr pWin; - int nbuf; - XID *ids; - int action; - int hint; -{ - MultibuffersPtr pMultibuffers; - MultibufferPtr pMultibuffer; - ScreenPtr pScreen; - int width, height, depth; - int i; - GCPtr pClearGC = NULL; - xRectangle clearRect; - - DestroyImageBuffers(pWin); - pMultibuffers = xalloc (sizeof (MultibuffersRec) + nbuf * sizeof (MultibufferRec)); - if (!pMultibuffers) - return BadAlloc; - pMultibuffers->pWindow = pWin; - pMultibuffers->buffers = (MultibufferPtr) (pMultibuffers + 1); - pMultibuffers->refcnt = pMultibuffers->numMultibuffer = 0; - if (!AddResource (pWin->drawable.id, MultibuffersResType, (pointer) pMultibuffers)) - return BadAlloc; - width = pWin->drawable.width; - height = pWin->drawable.height; - depth = pWin->drawable.depth; - pScreen = pWin->drawable.pScreen; - - if (pWin->backgroundState != None) - { - pClearGC = GetScratchGC (pWin->drawable.depth, pScreen); - SetupBackgroundPainter (pWin, pClearGC); - clearRect.x = clearRect.y = 0; - clearRect.width = width; - clearRect.height = height; - } - - for (i = 0; i < nbuf; i++) - { - pMultibuffer = &pMultibuffers->buffers[i]; - pMultibuffer->eventMask = 0L; - pMultibuffer->otherEventMask = 0L; - pMultibuffer->otherClients = (OtherClientsPtr) NULL; - pMultibuffer->number = i; - pMultibuffer->side = MultibufferSideMono; - pMultibuffer->clobber = MultibufferUnclobbered; - pMultibuffer->pMultibuffers = pMultibuffers; - if (!AddResource (ids[i], MultibufferResType, (pointer) pMultibuffer)) - break; - pMultibuffer->pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, depth, 0); - if (!pMultibuffer->pPixmap) - break; - if (!AddResource (ids[i], MultibufferDrawableResType, (pointer) pMultibuffer->pPixmap)) - { - FreeResource (ids[i], MultibufferResType); - (*pScreen->DestroyPixmap) (pMultibuffer->pPixmap); - break; - } - pMultibuffer->pPixmap->drawable.id = ids[i]; - - if (i > 0 && pClearGC) - { - ValidateGC((DrawablePtr)pMultibuffer->pPixmap, pClearGC); - (*pClearGC->ops->PolyFillRect)((DrawablePtr)pMultibuffer->pPixmap, - pClearGC, 1, &clearRect); - } - } - pMultibuffers->numMultibuffer = i; - pMultibuffers->refcnt = i; - pMultibuffers->displayedMultibuffer = -1; - if (i > 0) - AliasMultibuffer (pMultibuffers, 0); - pMultibuffers->updateAction = action; - pMultibuffers->updateHint = hint; - pMultibuffers->windowMode = MultibufferModeMono; - pMultibuffers->lastUpdate.months = 0; - pMultibuffers->lastUpdate.milliseconds = 0; - pMultibuffers->width = width; - pMultibuffers->height = height; - dixSetPrivate(&pWin->devPrivates, MultibufferWindowPrivKey, pMultibuffers); - if (pClearGC) FreeScratchGC(pClearGC); - return Success; -} - - -static int -ProcCreateImageBuffers (client) - ClientPtr client; -{ - REQUEST(xMbufCreateImageBuffersReq); - xMbufCreateImageBuffersReply rep; - int n; - WindowPtr pWin; - XID *ids; - int len, nbuf, i, err, rc; - - REQUEST_AT_LEAST_SIZE (xMbufCreateImageBuffersReq); - len = stuff->length - bytes_to_int32(sizeof(xMbufCreateImageBuffersReq)); - if (len == 0) - return BadLength; - rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); - if (rc != Success) - return rc; - if (pWin->drawable.class == InputOnly) - return BadMatch; - switch (stuff->updateAction) - { - case MultibufferUpdateActionUndefined: - case MultibufferUpdateActionBackground: - case MultibufferUpdateActionUntouched: - case MultibufferUpdateActionCopied: - break; - default: - client->errorValue = stuff->updateAction; - return BadValue; - } - switch (stuff->updateHint) - { - case MultibufferUpdateHintFrequent: - case MultibufferUpdateHintIntermittent: - case MultibufferUpdateHintStatic: - break; - default: - client->errorValue = stuff->updateHint; - return BadValue; - } - nbuf = len; - ids = (XID *) &stuff[1]; - for (i = 0; i < nbuf; i++) - { - LEGAL_NEW_RESOURCE(ids[i], client); - } - err = CreateImageBuffers (pWin, nbuf, ids, - stuff->updateAction, stuff->updateHint); - if (err != Success) - return err; - rep.type = X_Reply; - rep.length = 0; - rep.sequenceNumber = client->sequence; - rep.numberBuffer = ((MultibuffersPtr) (dixLookupPrivate(&pWin->devPrivates, MultibufferWindowPrivKey)))->numMultibuffer; - if (client->swapped) - { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swaps(&rep.numberBuffer, n); - } - WriteToClient(client, sizeof (xMbufCreateImageBuffersReply), (char*)&rep); - return (client->noClientException); -} - -static int -ProcDisplayImageBuffers (client) - ClientPtr client; -{ - REQUEST(xMbufDisplayImageBuffersReq); - MultibufferPtr *pMultibuffer; - MultibuffersPtr *ppMultibuffers; - int nbuf; - XID *ids; - int i, j; - CARD32 minDelay; - TimeStamp activateTime, bufferTime; - int rc; - - - REQUEST_AT_LEAST_SIZE (xMbufDisplayImageBuffersReq); - nbuf = stuff->length - bytes_to_int32(sizeof (xMbufDisplayImageBuffersReq)); - if (!nbuf) - return Success; - minDelay = stuff->minDelay; - ids = (XID *) &stuff[1]; - ppMultibuffers = xalloc(nbuf * sizeof (MultibuffersPtr)); - pMultibuffer = xalloc(nbuf * sizeof (MultibufferPtr)); - if (!ppMultibuffers || !pMultibuffer) - { - if (ppMultibuffers) xfree(ppMultibuffers); - if (pMultibuffer) xfree(pMultibuffer); - client->errorValue = 0; - return BadAlloc; - } - activateTime.months = 0; - activateTime.milliseconds = 0; - for (i = 0; i < nbuf; i++) - { - rc = dixLookupResourceByType(&pMultibuffer[i], ids[i], - MultibufferResType, client, DixUseAccess); - if (rc != Success) - { - xfree(ppMultibuffers); - xfree(pMultibuffer); - client->errorValue = ids[i]; - return MultibufferErrorBase + MultibufferBadBuffer; - } - ppMultibuffers[i] = pMultibuffer[i]->pMultibuffers; - for (j = 0; j < i; j++) - { - if (ppMultibuffers[i] == ppMultibuffers[j]) - { - xfree(ppMultibuffers); - xfree(pMultibuffer); - client->errorValue = ids[i]; - return BadMatch; - } - } - bufferTime = ppMultibuffers[i]->lastUpdate; - BumpTimeStamp (&bufferTime, minDelay); - if (CompareTimeStamps (bufferTime, activateTime) == LATER) - activateTime = bufferTime; - } - UpdateCurrentTime (); - if (CompareTimeStamps (activateTime, currentTime) == LATER && - QueueDisplayRequest (client, activateTime)) - { - ; - } - else - PerformDisplayRequest (ppMultibuffers, pMultibuffer, nbuf); - - xfree(ppMultibuffers); - xfree(pMultibuffer); - return Success; -} - - -static int -ProcDestroyImageBuffers (client) - ClientPtr client; -{ - REQUEST (xMbufDestroyImageBuffersReq); - WindowPtr pWin; - int rc; - - REQUEST_SIZE_MATCH (xMbufDestroyImageBuffersReq); - rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); - if (rc != Success) - return rc; - DestroyImageBuffers (pWin); - return Success; -} - -static int -ProcSetMBufferAttributes (client) - ClientPtr client; -{ - REQUEST (xMbufSetMBufferAttributesReq); - WindowPtr pWin; - MultibuffersPtr pMultibuffers; - int len, rc; - Mask vmask; - Mask index2; - CARD32 updateHint; - XID *vlist; - - REQUEST_AT_LEAST_SIZE (xMbufSetMBufferAttributesReq); - rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); - if (rc != Success) - return rc; - rc = dixLookupResourceByType(&pMultibuffers, pWin->drawable.id, - MultibufferResType, client, DixSetAttrAccess); - if (rc != Success) - return BadMatch; - len = stuff->length - bytes_to_int32(sizeof (xMbufSetMBufferAttributesReq)); - vmask = stuff->valueMask; - if (len != Ones (vmask)) - return BadLength; - vlist = (XID *) &stuff[1]; - while (vmask) - { - index2 = (Mask) lowbit (vmask); - vmask &= ~index2; - switch (index2) - { - case MultibufferWindowUpdateHint: - updateHint = (CARD32) *vlist; - switch (updateHint) - { - case MultibufferUpdateHintFrequent: - case MultibufferUpdateHintIntermittent: - case MultibufferUpdateHintStatic: - pMultibuffers->updateHint = updateHint; - break; - default: - client->errorValue = updateHint; - return BadValue; - } - vlist++; - break; - default: - client->errorValue = stuff->valueMask; - return BadValue; - } - } - return Success; -} - -static int -ProcGetMBufferAttributes (client) - ClientPtr client; -{ - REQUEST (xMbufGetMBufferAttributesReq); - WindowPtr pWin; - MultibuffersPtr pMultibuffers; - XID *ids; - xMbufGetMBufferAttributesReply rep; - int i, n, rc; - - REQUEST_SIZE_MATCH (xMbufGetMBufferAttributesReq); - rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess); - if (rc != Success) - return rc; - rc = dixLookupResourceByType(&pMultibuffers, pWin->drawable.id, - MultibufferResType, client, DixGetAttrAccess); - if (rc != Success) - return BadAccess; - ids = xalloc (pMultibuffers->numMultibuffer * sizeof (XID)); - if (!ids) - return BadAlloc; - for (i = 0; i < pMultibuffers->numMultibuffer; i++) - ids[i] = pMultibuffers->buffers[i].pPixmap->drawable.id; - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - rep.length = pMultibuffers->numMultibuffer; - rep.displayedBuffer = pMultibuffers->displayedMultibuffer; - rep.updateAction = pMultibuffers->updateAction; - rep.updateHint = pMultibuffers->updateHint; - rep.windowMode = pMultibuffers->windowMode; - if (client->swapped) - { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swaps(&rep.displayedBuffer, n); - SwapLongs (ids, pMultibuffers->numMultibuffer); - } - WriteToClient (client, sizeof(xMbufGetMBufferAttributesReply), - (char *)&rep); - WriteToClient (client, (int)(pMultibuffers->numMultibuffer * sizeof (XID)), - (char *)ids); - xfree((pointer) ids); - return client->noClientException; -} - -static int -ProcSetBufferAttributes (client) - ClientPtr client; -{ - REQUEST(xMbufSetBufferAttributesReq); - MultibufferPtr pMultibuffer; - int len; - Mask vmask, index2; - XID *vlist; - Mask eventMask; - int result; - int rc; - - REQUEST_AT_LEAST_SIZE (xMbufSetBufferAttributesReq); - - rc = dixLookupResourceByType(&pMultibuffer, stuff->buffer, - MultibufferResType, client, DixSetAttrAccess); - if (rc != Success) - return MultibufferErrorBase + MultibufferBadBuffer; - len = stuff->length - bytes_to_int32(sizeof (xMbufSetBufferAttributesReq)); - vmask = stuff->valueMask; - if (len != Ones (vmask)) - return BadLength; - vlist = (XID *) &stuff[1]; - while (vmask) - { - index2 = (Mask) lowbit (vmask); - vmask &= ~index2; - switch (index2) - { - case MultibufferBufferEventMask: - eventMask = (Mask) *vlist; - vlist++; - result = EventSelectForMultibuffer (pMultibuffer, client, eventMask); - if (result != Success) - return result; - break; - default: - client->errorValue = stuff->valueMask; - return BadValue; - } - } - return Success; -} - -int -ProcGetBufferAttributes (client) - ClientPtr client; -{ - REQUEST(xMbufGetBufferAttributesReq); - MultibufferPtr pMultibuffer; - xMbufGetBufferAttributesReply rep; - OtherClientsPtr other; - int n; - int rc; - - REQUEST_SIZE_MATCH (xMbufGetBufferAttributesReq); - rc = dixLookupResourceByType(&pMultibuffer, stuff->buffer, - MultibufferResType, client, DixGetAttrAccess); - if (rc != Success) - return MultibufferErrorBase + MultibufferBadBuffer; - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - rep.length = 0; - rep.window = pMultibuffer->pMultibuffers->pWindow->drawable.id; - if (bClient (pMultibuffer) == client) - rep.eventMask = pMultibuffer->eventMask; - else - { - rep.eventMask = (Mask) 0L; - for (other = pMultibuffer->otherClients; other; other = other->next) - if (SameClient (other, client)) - { - rep.eventMask = other->mask; - break; - } - } - rep.bufferIndex = pMultibuffer->number; - rep.side = pMultibuffer->side; - if (client->swapped) - { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swapl(&rep.window, n); - swapl(&rep.eventMask, n); - swaps(&rep.bufferIndex, n); - } - WriteToClient(client, sizeof (xMbufGetBufferAttributesReply), (char *)&rep); - return (client->noClientException); -} - -static int -ProcGetBufferInfo (client) - ClientPtr client; -{ - REQUEST (xMbufGetBufferInfoReq); - DrawablePtr pDrawable; - xMbufGetBufferInfoReply rep; - ScreenPtr pScreen; - int i, j, k, n, rc; - xMbufBufferInfo *pInfo; - int nInfo; - DepthPtr pDepth; - - rc = dixLookupDrawable(&pDrawable, stuff->drawable, client, 0, - DixUnknownAccess); - if (rc != Success) - return rc; - pScreen = pDrawable->pScreen; - nInfo = 0; - for (i = 0; i < pScreen->numDepths; i++) - { - pDepth = &pScreen->allowedDepths[i]; - nInfo += pDepth->numVids; - } - pInfo = xalloc (nInfo * sizeof (xMbufBufferInfo)); - if (!pInfo) - return BadAlloc; - - rep.type = X_Reply; - rep.sequenceNumber = client->sequence; - rep.length = nInfo * bytes_to_int32(sizeof (xMbufBufferInfo)); - rep.normalInfo = nInfo; - rep.stereoInfo = 0; - if (client->swapped) - { - swaps(&rep.sequenceNumber, n); - swapl(&rep.length, n); - swaps(&rep.normalInfo, n); - swaps(&rep.stereoInfo, n); - } - - k = 0; - for (i = 0; i < pScreen->numDepths; i++) - { - pDepth = &pScreen->allowedDepths[i]; - for (j = 0; j < pDepth->numVids; j++) - { - pInfo[k].visualID = pDepth->vids[j]; - pInfo[k].maxBuffers = 0; - pInfo[k].depth = pDepth->depth; - if (client->swapped) - { - swapl (&pInfo[k].visualID, n); - swaps (&pInfo[k].maxBuffers, n); - } - k++; - } - } - WriteToClient (client, sizeof (xMbufGetBufferInfoReply), (pointer) &rep); - WriteToClient (client, (int) nInfo * sizeof (xMbufBufferInfo), (pointer) pInfo); - xfree ((pointer) pInfo); - return client->noClientException; -} - -static int -ProcClearImageBufferArea (client) - ClientPtr client; -{ - REQUEST (xMbufClearImageBufferAreaReq); - MultibufferPtr pMultibuffer; - WindowPtr pWin; - xRectangle clearRect; - int width, height; - DrawablePtr pDrawable; - ScreenPtr pScreen; - int rc; - - REQUEST_SIZE_MATCH (xMbufClearImageBufferAreaReq); - rc = dixLookupResourceByType(&pMultibuffer, stuff->buffer, - MultibufferResType, client, DixWriteAccess); - if (rc != Success) - return MultibufferErrorBase + MultibufferBadBuffer; - if ((stuff->exposures != xTrue) && (stuff->exposures != xFalse)) - { - client->errorValue = stuff->exposures; - return(BadValue); - } - pWin = pMultibuffer->pMultibuffers->pWindow; - width = pWin->drawable.width; - height = pWin->drawable.height; - pScreen = pWin->drawable.pScreen; - - clearRect.x = stuff->x; - clearRect.y = stuff->y; - clearRect.width = stuff->width ? stuff->width : width; - clearRect.height = stuff->height ? stuff->height : height; - - if (pWin->backgroundState != None) - { - GCPtr pClearGC; - pClearGC = GetScratchGC (pWin->drawable.depth, pScreen); - SetupBackgroundPainter (pWin, pClearGC); - - if (pMultibuffer->number == pMultibuffer->pMultibuffers->displayedMultibuffer) - pDrawable = (DrawablePtr)pWin; - else - pDrawable = (DrawablePtr)pMultibuffer->pPixmap; - - ValidateGC(pDrawable, pClearGC); - (*pClearGC->ops->PolyFillRect) (pDrawable, pClearGC, 1, &clearRect); - FreeScratchGC(pClearGC); - } - - if (stuff->exposures) - { - RegionRec region; - BoxRec box; - box.x1 = clearRect.x; - box.y1 = clearRect.y; - box.x2 = clearRect.x + clearRect.width; - box.y2 = clearRect.y + clearRect.height; - REGION_INIT(pScreen, ®ion, &box, 1); - MultibufferExpose(pMultibuffer, ®ion); - REGION_UNINIT(pScreen, ®ion); - } - return Success; -} - -static int -ProcMultibufferDispatch (client) - ClientPtr client; -{ - REQUEST(xReq); - switch (stuff->data) { - case X_MbufGetBufferVersion: - return ProcGetBufferVersion (client); - case X_MbufCreateImageBuffers: - return ProcCreateImageBuffers (client); - case X_MbufDisplayImageBuffers: - return ProcDisplayImageBuffers (client); - case X_MbufDestroyImageBuffers: - return ProcDestroyImageBuffers (client); - case X_MbufSetMBufferAttributes: - return ProcSetMBufferAttributes (client); - case X_MbufGetMBufferAttributes: - return ProcGetMBufferAttributes (client); - case X_MbufSetBufferAttributes: - return ProcSetBufferAttributes (client); - case X_MbufGetBufferAttributes: - return ProcGetBufferAttributes (client); - case X_MbufGetBufferInfo: - return ProcGetBufferInfo (client); - case X_MbufClearImageBufferArea: - return ProcClearImageBufferArea (client); - default: - return BadRequest; - } -} - -static int -SProcGetBufferVersion (client) - ClientPtr client; -{ - int n; - REQUEST (xMbufGetBufferVersionReq); - - swaps (&stuff->length, n); - return ProcGetBufferVersion (client); -} - -static int -SProcCreateImageBuffers (client) - ClientPtr client; -{ - int n; - REQUEST (xMbufCreateImageBuffersReq); - - swaps (&stuff->length, n); - REQUEST_AT_LEAST_SIZE (xMbufCreateImageBuffersReq); - swapl (&stuff->window, n); - SwapRestL(stuff); - return ProcCreateImageBuffers (client); -} - -static int -SProcDisplayImageBuffers (client) - ClientPtr client; -{ - int n; - REQUEST (xMbufDisplayImageBuffersReq); - - swaps (&stuff->length, n); - REQUEST_AT_LEAST_SIZE (xMbufDisplayImageBuffersReq); - swaps (&stuff->minDelay, n); - swaps (&stuff->maxDelay, n); - SwapRestL(stuff); - return ProcDisplayImageBuffers (client); -} - -static int -SProcDestroyImageBuffers (client) - ClientPtr client; -{ - int n; - REQUEST (xMbufDestroyImageBuffersReq); - - swaps (&stuff->length, n); - REQUEST_SIZE_MATCH (xMbufDestroyImageBuffersReq); - swapl (&stuff->window, n); - return ProcDestroyImageBuffers (client); -} - -static int -SProcSetMBufferAttributes (client) - ClientPtr client; -{ - int n; - REQUEST (xMbufSetMBufferAttributesReq); - - swaps (&stuff->length, n); - REQUEST_AT_LEAST_SIZE(xMbufSetMBufferAttributesReq); - swapl (&stuff->window, n); - swapl (&stuff->valueMask, n); - SwapRestL(stuff); - return ProcSetMBufferAttributes (client); -} - -static int -SProcGetMBufferAttributes (client) - ClientPtr client; -{ - int n; - REQUEST (xMbufGetMBufferAttributesReq); - - swaps (&stuff->length, n); - REQUEST_AT_LEAST_SIZE(xMbufGetMBufferAttributesReq); - swapl (&stuff->window, n); - return ProcGetMBufferAttributes (client); -} - -static int -SProcSetBufferAttributes (client) - ClientPtr client; -{ - int n; - REQUEST (xMbufSetBufferAttributesReq); - - swaps (&stuff->length, n); - REQUEST_AT_LEAST_SIZE(xMbufSetBufferAttributesReq); - swapl (&stuff->buffer, n); - swapl (&stuff->valueMask, n); - SwapRestL(stuff); - return ProcSetBufferAttributes (client); -} - -static int -SProcGetBufferAttributes (client) - ClientPtr client; -{ - int n; - REQUEST (xMbufGetBufferAttributesReq); - - swaps (&stuff->length, n); - REQUEST_AT_LEAST_SIZE(xMbufGetBufferAttributesReq); - swapl (&stuff->buffer, n); - return ProcGetBufferAttributes (client); -} - -static int -SProcGetBufferInfo (client) - ClientPtr client; -{ - int n; - REQUEST (xMbufGetBufferInfoReq); - - swaps (&stuff->length, n); - REQUEST_SIZE_MATCH (xMbufGetBufferInfoReq); - swapl (&stuff->drawable, n); - return ProcGetBufferInfo (client); -} - -static int -SProcClearImageBufferArea(client) - ClientPtr client; -{ - char n; - REQUEST(xMbufClearImageBufferAreaReq); - - swaps(&stuff->length, n); - REQUEST_SIZE_MATCH (xMbufClearImageBufferAreaReq); - swapl(&stuff->buffer, n); - swaps(&stuff->x, n); - swaps(&stuff->y, n); - swaps(&stuff->width, n); - swaps(&stuff->height, n); - return ProcClearImageBufferArea(client); -} - -static int -SProcMultibufferDispatch (client) - ClientPtr client; -{ - REQUEST(xReq); - switch (stuff->data) { - case X_MbufGetBufferVersion: - return SProcGetBufferVersion (client); - case X_MbufCreateImageBuffers: - return SProcCreateImageBuffers (client); - case X_MbufDisplayImageBuffers: - return SProcDisplayImageBuffers (client); - case X_MbufDestroyImageBuffers: - return SProcDestroyImageBuffers (client); - case X_MbufSetMBufferAttributes: - return SProcSetMBufferAttributes (client); - case X_MbufGetMBufferAttributes: - return SProcGetMBufferAttributes (client); - case X_MbufSetBufferAttributes: - return SProcSetBufferAttributes (client); - case X_MbufGetBufferAttributes: - return SProcGetBufferAttributes (client); - case X_MbufGetBufferInfo: - return SProcGetBufferInfo (client); - case X_MbufClearImageBufferArea: - return SProcClearImageBufferArea (client); - default: - return BadRequest; - } -} - -static void -SUpdateNotifyEvent (from, to) - xMbufUpdateNotifyEvent *from, *to; -{ - to->type = from->type; - cpswaps (from->sequenceNumber, to->sequenceNumber); - cpswapl (from->buffer, to->buffer); - cpswapl (from->timeStamp, to->timeStamp); -} - -static void -SClobberNotifyEvent (from, to) - xMbufClobberNotifyEvent *from, *to; -{ - to->type = from->type; - cpswaps (from->sequenceNumber, to->sequenceNumber); - cpswapl (from->buffer, to->buffer); - to->state = from->state; -} - -RegionPtr CreateUnclippedWinSize(WindowPtr pWin); - -RegionPtr -CreateUnclippedWinSize (WindowPtr pWin) -{ - RegionPtr pRgn; - BoxRec box; - - box.x1 = pWin->drawable.x; - box.y1 = pWin->drawable.y; - box.x2 = pWin->drawable.x + (int) pWin->drawable.width; - box.y2 = pWin->drawable.y + (int) pWin->drawable.height; - pRgn = REGION_CREATE(pWin->drawable.pScreen, &box, 1); - if (wBoundingShape (pWin) || wClipShape (pWin)) { - ScreenPtr pScreen; - pScreen = pWin->drawable.pScreen; - - REGION_TRANSLATE(pScreen, pRgn, - pWin->drawable.x, - - pWin->drawable.y); - if (wBoundingShape (pWin)) - REGION_INTERSECT(pScreen, pRgn, pRgn, wBoundingShape (pWin)); - if (wClipShape (pWin)) - REGION_INTERSECT(pScreen, pRgn, pRgn, wClipShape (pWin)); - REGION_TRANSLATE(pScreen, pRgn, pWin->drawable.x, pWin->drawable.y); - } - return pRgn; -} - -static void -PerformDisplayRequest (ppMultibuffers, pMultibuffer, nbuf) - MultibufferPtr *pMultibuffer; - MultibuffersPtr *ppMultibuffers; - int nbuf; -{ - GCPtr pGC; - PixmapPtr pPrevPixmap, pNewPixmap; - xRectangle clearRect; - WindowPtr pWin; - RegionPtr pExposed; - int i; - MultibufferPtr pPrevMultibuffer; - XID graphicsExpose; - - UpdateCurrentTime (); - for (i = 0; i < nbuf; i++) - { - pWin = ppMultibuffers[i]->pWindow; - pGC = GetScratchGC (pWin->drawable.depth, pWin->drawable.pScreen); - pPrevMultibuffer = - &ppMultibuffers[i]->buffers[ppMultibuffers[i]->displayedMultibuffer]; - pPrevPixmap = pPrevMultibuffer->pPixmap; - pNewPixmap = pMultibuffer[i]->pPixmap; - switch (ppMultibuffers[i]->updateAction) - { - case MultibufferUpdateActionUndefined: - break; - case MultibufferUpdateActionBackground: - SetupBackgroundPainter (pWin, pGC); - ValidateGC ((DrawablePtr)pPrevPixmap, pGC); - clearRect.x = 0; - clearRect.y = 0; - clearRect.width = pPrevPixmap->drawable.width; - clearRect.height = pPrevPixmap->drawable.height; - (*pGC->ops->PolyFillRect) ((DrawablePtr)pPrevPixmap, pGC, - 1, &clearRect); - break; - case MultibufferUpdateActionUntouched: - /* copy the window to the pixmap that represents the - * currently displayed buffer - */ - if (pPrevMultibuffer->eventMask & ExposureMask) - { - graphicsExpose = TRUE; - DoChangeGC (pGC, GCGraphicsExposures, &graphicsExpose, FALSE); - } - ValidateGC ((DrawablePtr)pPrevPixmap, pGC); - pExposed = (*pGC->ops->CopyArea) - ((DrawablePtr) pWin, - (DrawablePtr) pPrevPixmap, - pGC, - 0, 0, - pWin->drawable.width, pWin->drawable.height, - 0, 0); - - /* if we couldn't copy the whole window to the buffer, - * send expose events (if any client wants them) - */ - if (pPrevMultibuffer->eventMask & ExposureMask) - { /* some client wants expose events */ - if (pExposed) - { - RegionPtr pWinSize; - - pWinSize = CreateUnclippedWinSize (pWin); - /* pExposed is window-relative, but at this point - * pWinSize is screen-relative. Make pWinSize be - * window-relative so that region ops involving - * pExposed and pWinSize behave sensibly. - */ - REGION_TRANSLATE(pWin->drawable.pScreen, pWinSize, - -pWin->drawable.x, -pWin->drawable.y); - REGION_INTERSECT(pWin->drawable.pScreen, pExposed, - pExposed, pWinSize); - REGION_DESTROY(pWin->drawable.pScreen, pWinSize); - MultibufferExpose (pPrevMultibuffer, pExposed); - REGION_DESTROY(pWin->drawable.pScreen, pExposed); - } - graphicsExpose = FALSE; - DoChangeGC (pGC, GCGraphicsExposures, &graphicsExpose, FALSE); - } - break; /* end case MultibufferUpdateActionUntouched */ - - case MultibufferUpdateActionCopied: - ValidateGC ((DrawablePtr)pPrevPixmap, pGC); - (*pGC->ops->CopyArea) ((DrawablePtr)pNewPixmap, - (DrawablePtr)pPrevPixmap, pGC, - 0, 0, - pWin->drawable.width, pWin->drawable.height, - 0, 0); - break; - } /* end switch on update action */ - - /* display the new buffer */ - ValidateGC ((DrawablePtr)pWin, pGC); - (*pGC->ops->CopyArea) ((DrawablePtr)pNewPixmap, (DrawablePtr)pWin, pGC, - 0, 0, - pWin->drawable.width, pWin->drawable.height, - 0, 0); - ppMultibuffers[i]->lastUpdate = currentTime; - MultibufferUpdate (pMultibuffer[i], - ppMultibuffers[i]->lastUpdate.milliseconds); - AliasMultibuffer (ppMultibuffers[i], - pMultibuffer[i] - ppMultibuffers[i]->buffers); - FreeScratchGC (pGC); - } -} - -DrawablePtr -GetBufferPointer (pWin, i) - WindowPtr pWin; - int i; -{ - MultibuffersPtr pMultibuffers; - - if (!(pMultibuffers = (MultibuffersPtr) dixLookupPrivate(&pWin->devPrivates, MultibufferWindowPrivKey))) - return NULL; - return (DrawablePtr) pMultibuffers->buffers[i].pPixmap; -} - -static Bool -QueueDisplayRequest (client, activateTime) - ClientPtr client; - TimeStamp activateTime; -{ - /* see xtest.c:ProcXTestFakeInput for code similar to this */ - - if (!ClientSleepUntil(client, &activateTime, NULL, NULL)) - { - return FALSE; - } - /* swap the request back so we can simply re-execute it */ - if (client->swapped) - { - int n; - REQUEST (xMbufDisplayImageBuffersReq); - - SwapRestL(stuff); - swaps (&stuff->length, n); - swaps (&stuff->minDelay, n); - swaps (&stuff->maxDelay, n); - } - ResetCurrentRequest (client); - client->sequence--; - return TRUE; -} - - -/* - * Deliver events to a buffer - */ - -static int -DeliverEventsToMultibuffer (pMultibuffer, pEvents, count, filter) - MultibufferPtr pMultibuffer; - xEvent *pEvents; - int count; - Mask filter; -{ - int deliveries = 0, nondeliveries = 0; - int attempt; - OtherClients *other; - - /* if nobody wants the event, we're done */ - if (!((pMultibuffer->otherEventMask|pMultibuffer->eventMask) & filter)) - return 0; - - /* maybe send event to owner */ - if ((attempt = TryClientEvents( - bClient(pMultibuffer), NULL, pEvents, count, pMultibuffer->eventMask, filter, (GrabPtr) 0)) != 0) - { - if (attempt > 0) - deliveries++; - else - nondeliveries--; - } - - /* maybe send event to other clients */ - for (other = pMultibuffer->otherClients; other; other=other->next) - { - if ((attempt = TryClientEvents( - rClient(other), NULL, pEvents, count, other->mask, filter, (GrabPtr) 0)) != 0) - { - if (attempt > 0) - deliveries++; - else - nondeliveries--; - } - } - if (deliveries) - return deliveries; - return nondeliveries; -} - -/* - * Send Expose events to interested clients - */ - -void -MultibufferExpose (pMultibuffer, pRegion) - MultibufferPtr pMultibuffer; - RegionPtr pRegion; -{ - if (pRegion && !REGION_NIL(pRegion)) - { - xEvent *pEvent; - PixmapPtr pPixmap; - xEvent *pe; - BoxPtr pBox; - int i; - int numRects; - - pPixmap = pMultibuffer->pPixmap; - REGION_TRANSLATE(pPixmap->drawable.pScreen, pRegion, - -pPixmap->drawable.x, -pPixmap->drawable.y); - /* XXX MultibufferExpose "knows" the region representation */ - numRects = REGION_NUM_RECTS(pRegion); - pBox = REGION_RECTS(pRegion); - - pEvent = xalloc(numRects * sizeof(xEvent)); - if (pEvent) { - pe = pEvent; - - for (i=1; i<=numRects; i++, pe++, pBox++) - { - pe->u.u.type = Expose; - pe->u.expose.window = pPixmap->drawable.id; - pe->u.expose.x = pBox->x1; - pe->u.expose.y = pBox->y1; - pe->u.expose.width = pBox->x2 - pBox->x1; - pe->u.expose.height = pBox->y2 - pBox->y1; - pe->u.expose.count = (numRects - i); - } - (void) DeliverEventsToMultibuffer (pMultibuffer, pEvent, numRects, - ExposureMask); - xfree(pEvent); - } - } -} - -/* send UpdateNotify event */ -void -MultibufferUpdate (pMultibuffer, time2) - MultibufferPtr pMultibuffer; - CARD32 time2; -{ - xMbufUpdateNotifyEvent event; - - event.type = MultibufferEventBase + MultibufferUpdateNotify; - event.buffer = pMultibuffer->pPixmap->drawable.id; - event.timeStamp = time2; - (void) DeliverEventsToMultibuffer (pMultibuffer, (xEvent *)&event, - 1, (Mask)MultibufferUpdateNotifyMask); -} - -/* - * The sample implementation will never generate MultibufferClobberNotify - * events - */ - -void -MultibufferClobber (pMultibuffer) - MultibufferPtr pMultibuffer; -{ - xMbufClobberNotifyEvent event; - - event.type = MultibufferEventBase + MultibufferClobberNotify; - event.buffer = pMultibuffer->pPixmap->drawable.id; - event.state = pMultibuffer->clobber; - (void) DeliverEventsToMultibuffer (pMultibuffer, (xEvent *)&event, - 1, (Mask)MultibufferClobberNotifyMask); -} - -/* - * make the resource id for buffer i refer to the window - * drawable instead of the pixmap; - */ - -static void -AliasMultibuffer (pMultibuffers, i) - MultibuffersPtr pMultibuffers; - int i; -{ - MultibufferPtr pMultibuffer; - - if (i == pMultibuffers->displayedMultibuffer) - return; - /* - * remove the old association - */ - if (pMultibuffers->displayedMultibuffer >= 0) - { - pMultibuffer = &pMultibuffers->buffers[pMultibuffers->displayedMultibuffer]; - ChangeResourceValue (pMultibuffer->pPixmap->drawable.id, - MultibufferDrawableResType, - (pointer) pMultibuffer->pPixmap); - } - /* - * make the new association - */ - pMultibuffer = &pMultibuffers->buffers[i]; - ChangeResourceValue (pMultibuffer->pPixmap->drawable.id, - MultibufferDrawableResType, - (pointer) pMultibuffers->pWindow); - pMultibuffers->displayedMultibuffer = i; -} - -/* - * free everything associated with multibuffering for this - * window - */ - -void -DestroyImageBuffers (pWin) - WindowPtr pWin; -{ - FreeResourceByType (pWin->drawable.id, MultibuffersResType, FALSE); - /* Zero out the window's pointer to the buffers so they won't be reused */ - dixSetPrivate(&pWin->devPrivates, MultibufferWindowPrivKey, NULL); -} - -/* - * resize the buffers when the window is resized - */ - -static Bool -MultibufferPositionWindow (pWin, x, y) - WindowPtr pWin; - int x, y; -{ - ScreenPtr pScreen; - MultibufferScreenPtr pMultibufferScreen; - MultibuffersPtr pMultibuffers; - MultibufferPtr pMultibuffer; - int width, height; - int i; - int dx, dy, dw, dh; - int sourcex, sourcey; - int destx, desty; - PixmapPtr pPixmap; - GCPtr pGC; - int savewidth, saveheight; - xRectangle clearRect; - Bool clear; - - pScreen = pWin->drawable.pScreen; - pMultibufferScreen = (MultibufferScreenPtr) dixLookupPrivate(&pScreen->devPrivates, MultibufferScreenPrivKey); - (*pMultibufferScreen->PositionWindow) (pWin, x, y); - - /* if this window is not multibuffered, we're done */ - if (!(pMultibuffers = (MultibuffersPtr) dixLookupPrivate(&pWin->devPrivates, MultibufferWindowPrivKey))) - return TRUE; - - /* if new size is same as old, we're done */ - if (pMultibuffers->width == pWin->drawable.width && - pMultibuffers->height == pWin->drawable.height) - return TRUE; - - width = pWin->drawable.width; - height = pWin->drawable.height; - dx = pWin->drawable.x - pMultibuffers->x; - dy = pWin->drawable.x - pMultibuffers->y; - dw = width - pMultibuffers->width; - dh = height - pMultibuffers->height; - GravityTranslate (0, 0, -dx, -dy, dw, dh, - pWin->bitGravity, &destx, &desty); - - /* if the window grew, remember to paint the window background, - * and maybe send expose events, for the new areas of the buffers - */ - clear = pMultibuffers->width < width || pMultibuffers->height < height || - pWin->bitGravity == ForgetGravity; - - sourcex = 0; - sourcey = 0; - savewidth = pMultibuffers->width; - saveheight = pMultibuffers->height; - /* clip rectangle to source and destination */ - if (destx < 0) - { - savewidth += destx; - sourcex -= destx; - destx = 0; - } - if (destx + savewidth > width) - savewidth = width - destx; - if (desty < 0) - { - saveheight += desty; - sourcey -= desty; - desty = 0; - } - if (desty + saveheight > height) - saveheight = height - desty; - - pMultibuffers->width = width; - pMultibuffers->height = height; - pMultibuffers->x = pWin->drawable.x; - pMultibuffers->y = pWin->drawable.y; - - pGC = GetScratchGC (pWin->drawable.depth, pScreen); - if (clear) - { - SetupBackgroundPainter (pWin, pGC); - clearRect.x = 0; - clearRect.y = 0; - clearRect.width = width; - clearRect.height = height; - } - for (i = 0; i < pMultibuffers->numMultibuffer; i++) - { - pMultibuffer = &pMultibuffers->buffers[i]; - pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, - pWin->drawable.depth, - CREATE_PIXMAP_USAGE_SCRATCH); - if (!pPixmap) - { - DestroyImageBuffers (pWin); - break; - } - ValidateGC ((DrawablePtr)pPixmap, pGC); - /* - * I suppose this could avoid quite a bit of work if - * it computed the minimal area required. - */ - if (clear) - (*pGC->ops->PolyFillRect) ((DrawablePtr)pPixmap, pGC, 1, &clearRect); - if (pWin->bitGravity != ForgetGravity) - { - (*pGC->ops->CopyArea) ((DrawablePtr)pMultibuffer->pPixmap, - (DrawablePtr)pPixmap, pGC, - sourcex, sourcey, savewidth, saveheight, - destx, desty); - } - pPixmap->drawable.id = pMultibuffer->pPixmap->drawable.id; - (*pScreen->DestroyPixmap) (pMultibuffer->pPixmap); - pMultibuffer->pPixmap = pPixmap; - if (i != pMultibuffers->displayedMultibuffer) - { - ChangeResourceValue (pPixmap->drawable.id, - MultibufferDrawableResType, - (pointer) pPixmap); - } - } - FreeScratchGC (pGC); - return TRUE; -} - -/* Resource delete func for MultibufferDrawableResType */ -/*ARGSUSED*/ -static int -MultibufferDrawableDelete (value, id) - pointer value; - XID id; -{ - DrawablePtr pDrawable = (DrawablePtr)value; - WindowPtr pWin; - MultibuffersPtr pMultibuffers; - PixmapPtr pPixmap; - - if (pDrawable->type == DRAWABLE_WINDOW) - { - pWin = (WindowPtr) pDrawable; - pMultibuffers = (MultibuffersPtr) dixLookupPrivate(&pWin->devPrivates, MultibufferWindowPrivKey); - pPixmap = pMultibuffers->buffers[pMultibuffers->displayedMultibuffer].pPixmap; - } - else - { - pPixmap = (PixmapPtr) pDrawable; - } - (*pPixmap->drawable.pScreen->DestroyPixmap) (pPixmap); - return Success; -} - -/* Resource delete func for MultibufferResType */ -/*ARGSUSED*/ -static int -MultibufferDelete (value, id) - pointer value; - XID id; -{ - MultibufferPtr pMultibuffer = (MultibufferPtr)value; - MultibuffersPtr pMultibuffers; - - pMultibuffers = pMultibuffer->pMultibuffers; - if (--pMultibuffers->refcnt == 0) - { - FreeResourceByType (pMultibuffers->pWindow->drawable.id, - MultibuffersResType, TRUE); - xfree (pMultibuffers); - } - return Success; -} - -/* Resource delete func for MultibuffersResType */ -/*ARGSUSED*/ -static int -MultibuffersDelete (value, id) - pointer value; - XID id; -{ - MultibuffersPtr pMultibuffers = (MultibuffersPtr)value; - int i; - - if (pMultibuffers->refcnt == pMultibuffers->numMultibuffer) - { - for (i = pMultibuffers->numMultibuffer; --i >= 0; ) - FreeResource (pMultibuffers->buffers[i].pPixmap->drawable.id, 0); - } - return Success; -} - -/* Resource delete func for OtherClientResType */ -static int -OtherClientDelete (value, id) - pointer value; - XID id; -{ - MultibufferPtr pMultibuffer = (MultibufferPtr)value; - OtherClientsPtr other, prev; - - prev = 0; - for (other = pMultibuffer->otherClients; other; other = other->next) - { - if (other->resource == id) - { - if (prev) - prev->next = other->next; - else - pMultibuffer->otherClients = other->next; - xfree (other); - RecalculateMultibufferOtherEvents (pMultibuffer); - break; - } - prev = other; - } - return Success; -} - -static int -EventSelectForMultibuffer (pMultibuffer, client, mask) - MultibufferPtr pMultibuffer; - ClientPtr client; - Mask mask; -{ - OtherClientsPtr other; - - if (mask & ~ValidEventMasks) - { - client->errorValue = mask; - return BadValue; - } - if (bClient (pMultibuffer) == client) - { - pMultibuffer->eventMask = mask; - } - else /* some other client besides the creator wants events */ - { - for (other = pMultibuffer->otherClients; other; other = other->next) - { - if (SameClient (other, client)) - { - if (mask == 0) - { - FreeResource (other->resource, RT_NONE); - break; - } - other->mask = mask; - break; - } - } - if (!other) - { /* new client that never selected events on this buffer before */ - other = xalloc (sizeof (OtherClients)); - if (!other) - return BadAlloc; - other->mask = mask; - other->resource = FakeClientID (client->index); - if (!AddResource (other->resource, OtherClientResType, (pointer) pMultibuffer)) - { - xfree (other); - return BadAlloc; - } - other->next = pMultibuffer->otherClients; - pMultibuffer->otherClients = other; - } - RecalculateMultibufferOtherEvents (pMultibuffer); - } - return (client->noClientException); -} - -/* or together all the otherClients event masks */ -static void -RecalculateMultibufferOtherEvents (pMultibuffer) - MultibufferPtr pMultibuffer; -{ - Mask otherEventMask; - OtherClients *other; - - otherEventMask = 0L; - for (other = pMultibuffer->otherClients; other; other = other->next) - otherEventMask |= other->mask; - pMultibuffer->otherEventMask = otherEventMask; -} - -/* add milliseconds to a timestamp, handling overflow */ -static void -BumpTimeStamp (ts, inc) -TimeStamp *ts; -CARD32 inc; -{ - CARD32 newms; - - newms = ts->milliseconds + inc; - if (newms < ts->milliseconds) - ts->months++; - ts->milliseconds = newms; -} diff --git a/xserver/Xext/mbufbf.c b/xserver/Xext/mbufbf.c deleted file mode 100644 index 7d9d60a4f..000000000 --- a/xserver/Xext/mbufbf.c +++ /dev/null @@ -1,1007 +0,0 @@ -/* - -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -*/ - - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include -#include "misc.h" -#include "os.h" -#include "windowstr.h" -#include "scrnintstr.h" -#include "pixmapstr.h" -#include "extnsionst.h" -#include "dixstruct.h" -#include "resource.h" -#include "opaque.h" -#include "regionstr.h" -#include "gcstruct.h" -#include "inputstr.h" -#include "validate.h" -#include "globals.h" -#include - -#define _MULTIBUF_SERVER_ /* don't want Xlib structures */ -#define _MULTIBUF_BUFFER_ -#include - -/* -Support for doublebuffer hardare - -This code is designed to support doublebuffer hardware where the -displayed buffer is selected on a per-pixel basis by an additional bit -plane, called the select plane. It could probably be easily modified -to work with systems that use window-id planes. - -This is done by creating a new drawable type, DRAWABLE_BUFFER. The -type has the same exact layout as a window drawable. Your code should -treat a DRAWABLE_BUFFER the same as it would tread a DRAWABLE_WINDOW -when handling the gc drawing functions. In addition, PaintWindowBackground, -CopyWindow, and all of the gc drawing functions to be able to draw into both -framebuffers. Which framebuffer to draw into is selected by the contents of - pWin->devPrivates[frameWindowPrivateIndex]. -The content of the devPrivate is either from frameBuffer[0] or -frameBuffer[1], depending on which buffer is being drawn into. When - pWin->devPrivates[frameWindowPrivateIndex] == frameBuffer[0], -the functions should draw into the front framebuffer. When - pWin->devPrivates[frameWindowPrivateIndex] == frameBuffer[1], -the functions should draw into the back framebuffer. - -In addition, you need to provide a function that allows you to copy -bits between the buffers (optional since CopyArea can be used) and a -function that draws into the select plane. Then, you need to register -your functions and other information, by calling: - -void -RegisterDoubleBufferHardware(pScreen, nInfo, pInfo, frameBuffer, selectPlane, - CopyBufferBitsFunc, DrawSelectPlaneFunc) - int nInfo; - xMbufBufferInfo *pInfo; - DevUnion *frameBuffer; - DevUnion selectPlane; - -"pInfo" is an array indicating which visuals and depths that double -buffering is supported on. "nInfo" is the length of the array. - -"frameBuffer" is array of length 2. The contents of the array element -is ddx-specific. The content of frameBuffer[0] should, when placed in -the window private, indicate that framebuffer 0 should be drawn into. -The contents of frameBuffer[1], when placed into the window private, -should indicate that framebuffer 1 should be drawn into. - -"selectPlane" is ddx-specific. It should contain information -neccessary for your displayProc to access the select plane. -It is passed to DrawSelectPlaneFunc. - -"CopyBufferBitsFunc" is a ddx-specific function that copies from one -buffer of a multibuffered window to another buffer. If the CopyBufferBitsFunc -is NULL, a default function will be used that calls pScreen->CopyArea. - - void CopyBufferBitsFunc(pMBWindow, srcBufferNum, dstBufferNum) - mbufWindowPtr pMBWindow; - int srcBufferNum, dstBufferNum; - -"DrawSelectPlaneFunc" is a ddx-specific function that fills the -regions "prgn" of select plane with the value "bufferNum". If -selectPlane is a DrawablePtr (such as a PixmapPtr), you can pass -NULL for DrawSelectPlaneFunc, a default function will be used that -calls FillRectangle on the selectPlane. - - void DrawSelectPlaneFunc(pScreen, selectPlane, prgn, bufferNum) - ScreenPtr pScreen; - DevUnion selectPlane; - RegionPtr prgn; - long bufferNum; - -... -... -... - -*/ - -#define MAX_BUFFERS 2 /* Only supports 2 buffers */ -#define FRONT_BUFFER 0 -#define BACK_BUFFER 1 - - -/* Buffer drawables have the same structure as window drawables */ -typedef WindowRec BufferRec; -typedef WindowPtr BufferPtr; - - -/* - * Call RegisterHdwrBuffer for every screen that has doublebuffer hardware. - */ - -static int bufNumInfo[MAXSCREENS]; -static xMbufBufferInfo *bufInfo[MAXSCREENS]; -static DevUnion *bufFrameBuffer[MAXSCREENS]; -static DevUnion bufselectPlane[MAXSCREENS]; -static void (* bufCopyBufferBitsFunc[MAXSCREENS])(); -static void (* bufDrawSelectPlaneFunc[MAXSCREENS])(); - -static Bool bufMultibufferInit(); - - -void -RegisterDoubleBufferHardware(pScreen, nInfo, pInfo, frameBuffer, selectPlane, - CopyBufferBitsFunc, DrawSelectPlaneFunc) - ScreenPtr pScreen; - int nInfo; - xMbufBufferInfo *pInfo; - DevUnion *frameBuffer; - DevUnion selectPlane; - void (* CopyBufferBitsFunc)(); - void (* DrawSelectPlaneFunc)(); -{ - bufNumInfo[pScreen->myNum] = nInfo; - bufInfo[pScreen->myNum] = pInfo; - bufFrameBuffer[pScreen->myNum] = frameBuffer; - bufselectPlane[pScreen->myNum] = selectPlane; - - bufCopyBufferBitsFunc[pScreen->myNum] = CopyBufferBitsFunc; - bufDrawSelectPlaneFunc[pScreen->myNum] = DrawSelectPlaneFunc; - - /* Register ourselves with device-independent multibuffers code */ - RegisterMultibufferInit(pScreen, bufMultibufferInit); -} - - -/* - * Called by Multibuffer extension initialization. - * Initializes mbufScreenRec and its devPrivate. - */ - -static Bool NoopDDA_True() { return TRUE; } -static Bool bufPositionWindow(); -static int bufCreateImageBuffers(); -static void bufDestroyImageBuffers(); -static void bufDisplayImageBuffers(); -static void bufClearImageBufferArea(); -static void bufDestroyBuffer(); -static void bufCopyBufferBits(); -static void bufDrawSelectPlane(); -static void bufWrapScreenFuncs(); -static void bufResetProc(); - -static void bufPostValidateTree(); -static void bufClipNotify(); -static void bufWindowExposures(); -static Bool bufChangeWindowAttributes(); -static void bufClearToBackground(); -static void bufCopyWindow(); - -static Bool -bufMultibufferInit(pScreen, pMBScreen) - ScreenPtr pScreen; - mbufScreenPtr pMBScreen; -{ - mbufBufferPrivPtr pMBPriv; - BoxRec box; - - /* Multibuffer info */ - pMBScreen->nInfo = bufNumInfo[pScreen->myNum]; - pMBScreen->pInfo = bufInfo[pScreen->myNum]; - - /* Hooks */ - pMBScreen->CreateImageBuffers = bufCreateImageBuffers; - pMBScreen->DestroyImageBuffers = bufDestroyImageBuffers; - pMBScreen->DisplayImageBuffers = bufDisplayImageBuffers; - pMBScreen->ClearImageBufferArea = bufClearImageBufferArea; - pMBScreen->ChangeMBufferAttributes = NoopDDA_True; - pMBScreen->ChangeBufferAttributes = NoopDDA_True; - pMBScreen->DeleteBufferDrawable = bufDestroyBuffer; - pMBScreen->WrapScreenFuncs = bufWrapScreenFuncs; - pMBScreen->ResetProc = bufResetProc; - /* Create devPrivate part */ - pMBPriv = xalloc(sizeof *pMBPriv); - if (!pMBPriv) - return (FALSE); - - pMBScreen->devPrivate.ptr = (pointer) pMBPriv; - pMBPriv->frameBuffer = bufFrameBuffer[pScreen->myNum]; - pMBPriv->selectPlane = bufselectPlane[pScreen->myNum]; - - /* - * Initializing the subtractRgn to the screen area will ensure that - * the selectPlane will get cleared on the first PostValidateTree. - */ - - box.x1 = 0; - box.y1 = 0; - box.x2 = pScreen->width; - box.y2 = pScreen->height; - - pMBPriv->rgnChanged = TRUE; - REGION_INIT(pScreen, &pMBPriv->backBuffer, &box, 1); - REGION_INIT(pScreen, &pMBPriv->subtractRgn, &box, 1); - REGION_NULL(pScreen, &pMBPriv->unionRgn); - - /* Misc functions */ - pMBPriv->CopyBufferBits = bufCopyBufferBitsFunc[pScreen->myNum]; - pMBPriv->DrawSelectPlane = bufDrawSelectPlaneFunc[pScreen->myNum]; - - if (!pMBPriv->CopyBufferBits) - pMBPriv->CopyBufferBits = bufCopyBufferBits; - - if (!pMBPriv->DrawSelectPlane) - pMBPriv->DrawSelectPlane = bufDrawSelectPlane; - - /* screen functions */ - pMBPriv->funcsWrapped = 0; - pMBPriv->inClearToBackground = FALSE; - pMBPriv->WindowExposures = NULL; - pMBPriv->CopyWindow = NULL; - pMBPriv->ClearToBackground = NULL; - pMBPriv->ClipNotify = NULL; - pMBPriv->ChangeWindowAttributes = NULL; - - /* Start out wrapped to clear select plane */ - WRAP_SCREEN_FUNC(pScreen,pMBPriv,PostValidateTree, bufPostValidateTree); - return TRUE; -} - -static void -UpdateBufferFromWindow(pBuffer, pWin) - BufferPtr pBuffer; - WindowPtr pWin; -{ - pBuffer->drawable.x = pWin->drawable.x; - pBuffer->drawable.y = pWin->drawable.y; - pBuffer->drawable.width = pWin->drawable.width; - pBuffer->drawable.height = pWin->drawable.height; - - pBuffer->drawable.serialNumber = NEXT_SERIAL_NUMBER; - - /* Update for PaintWindowBackground */ - pBuffer->parent = pWin->parent; - - /* - * Make the borderClip the same as the clipList so - * NotClippedByChildren comes out with just clipList. - */ - - pBuffer->clipList = pWin->clipList; - pBuffer->borderClip = pWin->clipList; - pBuffer->winSize = pWin->winSize; - pBuffer->borderSize = pWin->borderSize; - - pBuffer->origin = pWin->origin; -} - -static BufferPtr -bufCreateBuffer(pScreen, pWin, bufferNum) - ScreenPtr pScreen; - WindowPtr pWin; - int bufferNum; -{ - mbufBufferPrivPtr pMBPriv; - DevUnion *devPrivates; - BufferPtr pBuffer; - int i; - - pMBPriv = MB_SCREEN_PRIV_BUFFER(pScreen); - - pBuffer = AllocateWindow(pWin->drawable.pScreen); - if (!pBuffer) - return (NULL); - - /* XXX- Until we know what is needed, copy everything. */ - devPrivates = pBuffer->devPrivates; - *pBuffer = *pWin; - pBuffer->devPrivates = devPrivates; - - pBuffer->drawable.type = DRAWABLE_BUFFER; - pBuffer->drawable.serialNumber = NEXT_SERIAL_NUMBER; - - pBuffer->nextSib = NULL; - pBuffer->prevSib = NULL; - pBuffer->firstChild = NULL; - pBuffer->lastChild = NULL; - - /* XXX - Need to call pScreen->CreateWindow for tile/stipples - * or should I just copy the devPrivates? - */ - - for (i=0; i < pScreen->WindowPrivateLen; i++) - pBuffer->devPrivates[i] = pWin->devPrivates[i]; - - pBuffer->devPrivates[frameWindowPrivateIndex] = - pMBPriv->frameBuffer[bufferNum]; - - return pBuffer; -} - -static void -bufDestroyBuffer(pDrawable) - DrawablePtr pDrawable; -{ - xfree(pDrawable); -} - -/*ARGSUSED*/ -static int -bufCreateImageBuffers (pWin, nbuf, ids, action, hint) - WindowPtr pWin; - int nbuf; - XID *ids; - int action; - int hint; -{ - ScreenPtr pScreen; - mbufScreenPtr pMBScreen; - mbufWindowPtr pMBWindow; - mbufBufferPtr pMBBuffer; - int i; - - pScreen = pWin->drawable.pScreen; - pMBScreen = MB_SCREEN_PRIV(pScreen); - pMBWindow = MB_WINDOW_PRIV(pWin); - - pMBWindow->devPrivate.ptr = (pointer) REGION_CREATE(pScreen, 0,0); - if (!pMBWindow->devPrivate.ptr) - return(0); - REGION_COPY(pScreen, (RegionPtr) pMBWindow->devPrivate.ptr, - &pWin->clipList); - - for (i = 0; i < nbuf; i++) - { - pMBBuffer = pMBWindow->buffers + i; - pMBBuffer->pDrawable = (DrawablePtr) bufCreateBuffer(pScreen,pWin,i); - - if (!pMBBuffer->pDrawable) - break; - - if (!AddResource (ids[i], MultibufferDrawableResType, - (pointer) pMBBuffer->pDrawable)) - { - bufDestroyBuffer((BufferPtr) pMBBuffer->pDrawable); - break; - } - pMBBuffer->pDrawable->id = ids[i]; - - /* - * If window is already mapped, generate exposures and - * clear the area of the newly buffers. - */ - - if ((pWin->realized) && (i != pMBWindow->displayedMultibuffer)) - (* pMBScreen->ClearImageBufferArea)(pMBBuffer, 0,0, 0,0, TRUE); - } - - return i; -} - -static void -bufDestroyImageBuffers(pWin) - WindowPtr pWin; -{ - ScreenPtr pScreen; - mbufWindowPtr pMBWindow; - - pScreen = pWin->drawable.pScreen; - - if (pMBWindow = MB_WINDOW_PRIV(pWin)) - { - mbufBufferPrivPtr pMBPriv = MB_SCREEN_PRIV_BUFFER(pScreen); - - /* - * if the backbuffer is currently being displayed, move the bits - * to the frontbuffer and display it instead. - */ - - if (pWin->realized && (pMBWindow->displayedMultibuffer == BACK_BUFFER)) - { - (* pMBPriv->CopyBufferBits)(pMBWindow, BACK_BUFFER, FRONT_BUFFER); - REGION_SUBTRACT(pScreen, &pMBPriv->backBuffer, - &pMBPriv->backBuffer, &pWin->clipList); - (* pMBPriv->DrawSelectPlane)(pScreen, pMBPriv->selectPlane, - &pWin->clipList, FRONT_BUFFER); - } - - /* Switch window rendering to front buffer */ - pWin->devPrivates[frameWindowPrivateIndex] = - pMBPriv->frameBuffer[FRONT_BUFFER]; - - REGION_DESTROY(pScreen, (RegionPtr) pMBWindow->devPrivate.ptr); - pMBWindow->devPrivate.ptr = NULL; - } -} - -/* - * Can be replaced by pScreen->ClearToBackground if pBuffer->eventMask - * and wOtherEventsMasks(pBuffer) were setup. - */ - -static void -bufClearImageBufferArea(pMBBuffer, x,y, w,h, generateExposures) - mbufBufferPtr pMBBuffer; - short x,y; - unsigned short w,h; - Bool generateExposures; -{ - BoxRec box; - RegionRec reg; - RegionPtr pBSReg = NullRegion; - ScreenPtr pScreen; - BoxPtr extents; - int x1, y1, x2, y2; - BufferPtr pBuffer; - - pBuffer = (BufferPtr) pMBBuffer->pDrawable; - /* compute everything using ints to avoid overflow */ - - x1 = pBuffer->drawable.x + x; - y1 = pBuffer->drawable.y + y; - if (w) - x2 = x1 + (int) w; - else - x2 = x1 + (int) pBuffer->drawable.width - (int) x; - if (h) - y2 = y1 + h; - else - y2 = y1 + (int) pBuffer->drawable.height - (int) y; - - extents = &pBuffer->clipList.extents; - - /* clip the resulting rectangle to the window clipList extents. This - * makes sure that the result will fit in a box, given that the - * screen is < 32768 on a side. - */ - - if (x1 < extents->x1) - x1 = extents->x1; - if (x2 > extents->x2) - x2 = extents->x2; - if (y1 < extents->y1) - y1 = extents->y1; - if (y2 > extents->y2) - y2 = extents->y2; - - if (x2 <= x1 || y2 <= y1) - { - x2 = x1 = 0; - y2 = y1 = 0; - } - - box.x1 = x1; - box.x2 = x2; - box.y1 = y1; - box.y2 = y2; - - pScreen = pBuffer->drawable.pScreen; - REGION_INIT(pScreen, ®, &box, 1); - - REGION_INTERSECT(pScreen, ®, ®, &pBuffer->clipList); - if (pBuffer->backgroundState != None) - miPaintWindow(pBuffer, ®, PW_BACKGROUND); - if (generateExposures) - MultibufferExpose(pMBBuffer, ®); -#ifdef _notdef - /* XXBS - This is the original miClearToBackground code. - * WindowExposures needs to be called (or the functionality emulated) - * in order for backingStore to work, but first, pBuffer->eventMask - * and wOtherEventsMasks(pBuffer) need to be setup correctly. - */ - - if (generateExposures) - (*pScreen->WindowExposures)(pBuffer, ®, pBSReg); - else if (pBuffer->backgroundState != None) - miPaintWindow(pBuffer, ®, PW_BACKGROUND); -#endif - REGION_UNINIT(pScreen, ®); - if (pBSReg) - REGION_DESTROY(pScreen, pBSReg); -} - -static void -bufWrapScreenFuncs(pScreen) - ScreenPtr pScreen; -{ - mbufBufferPrivPtr pMBPriv = MB_SCREEN_PRIV_BUFFER(pScreen); - - WRAP_SCREEN_FUNC(pScreen,pMBPriv,PostValidateTree, bufPostValidateTree); - WRAP_SCREEN_FUNC(pScreen,pMBPriv,ClipNotify, bufClipNotify); - WRAP_SCREEN_FUNC(pScreen,pMBPriv,WindowExposures,bufWindowExposures); - WRAP_SCREEN_FUNC(pScreen,pMBPriv,ChangeWindowAttributes, bufChangeWindowAttributes); - WRAP_SCREEN_FUNC(pScreen,pMBPriv,ClearToBackground,bufClearToBackground); - WRAP_SCREEN_FUNC(pScreen,pMBPriv,CopyWindow,bufCopyWindow); -} - -static void -bufResetProc(pScreen) - ScreenPtr pScreen; -{ - mbufBufferPrivPtr pMBPriv = MB_SCREEN_PRIV_BUFFER(pScreen); - - /* - * frameBuffer, selectPlane, and pInfo should be freed by - * whoever called RegisterDoubleBufferHardware - */ - - REGION_UNINIT(pScreen, &pMBPriv->backBuffer); - REGION_UNINIT(pScreen, &pMBPriv->subtractRgn); - REGION_UNINIT(pScreen, &pMBPriv->unionRgn); - xfree(pMBPriv); -} - -/*---------------------------------------------------------------------------*/ - -/* - * Used if CopyBufferBitsFunc is not provided when registering. - * This should work for everybody since CopyArea needs to support - * copying between buffers anyway. - */ - -static void -bufCopyBufferBits(pMBWindow, srcBufferNum, dstBufferNum) - mbufWindowPtr pMBWindow; - int srcBufferNum, dstBufferNum; -{ - DrawablePtr pSrcBuffer, pDstBuffer; - GCPtr pGC; - - pSrcBuffer = pMBWindow->buffers[srcBufferNum].pDrawable; - pDstBuffer = pMBWindow->buffers[dstBufferNum].pDrawable; - - pGC = GetScratchGC (pDstBuffer->depth, pDstBuffer->pScreen); - if (!pGC) - return; - - ValidateGC (pDstBuffer, pGC); - (* pGC->ops->CopyArea) (pSrcBuffer, pDstBuffer, pGC, - 0,0, pDstBuffer->width, pDstBuffer->height, 0,0); - FreeScratchGC (pGC); -} - -/* - * Used if DrawSelectPlanFunc is not provided for when registering. - * However, it only works if selectPlane.ptr is a drawable. Also - * assumes that painting with color 0 selects the front buffer, - * while color 1 selects the back buffer. - */ - -static void -bufDrawSelectPlane(pScreen, selectPlane, prgn, bufferNum) - ScreenPtr pScreen; - DevUnion selectPlane; - RegionPtr prgn; - long bufferNum; -{ - DrawablePtr pDrawable; - GCPtr pGC; - int i; - BoxPtr pbox; - xRectangle *prect; - int numRects; - XID value; - - if (REGION_NUM_RECTS(prgn) == 0) - return; - - pDrawable = (DrawablePtr) selectPlane.ptr; - pGC = GetScratchGC (pDrawable->depth, pScreen); - if (!pGC) - return; - - prect = xalloc(REGION_NUM_RECTS(prgn) * sizeof(xRectangle)); - if (!prect) - { - FreeScratchGC(pGC); - return; - } - - value = (XID) bufferNum; - DoChangeGC(pGC, GCForeground, &value, 0); - ValidateGC(pDrawable, pGC); - - numRects = REGION_NUM_RECTS(prgn); - pbox = REGION_RECTS(prgn); - for (i= numRects; --i >= 0; pbox++, prect++) - { - prect->x = pbox->x1; - prect->y = pbox->y1; - prect->width = pbox->x2 - pbox->x1; - prect->height = pbox->y2 - pbox->y1; - } - prect -= numRects; - (* pGC->ops->PolyFillRect)(pDrawable, pGC, numRects, prect); - - xfree(prect); - FreeScratchGC (pGC); -} - - -static void -bufDisplayImageBuffers(pScreen, ppMBWindow, ppMBBuffer, nbuf) - ScreenPtr pScreen; - mbufBufferPtr *ppMBBuffer; - mbufWindowPtr *ppMBWindow; - int nbuf; -{ - WindowPtr pWin; - BufferPtr pPrevBuffer, pNewBuffer; - int i, number; - mbufBufferPrivPtr pMBPriv; - mbufBufferPtr pPrevMBBuffer; - - pMBPriv = MB_SCREEN_PRIV_BUFFER(pScreen); - - for (i = 0; i < nbuf; i++) - { - number = ppMBBuffer[i]->number; /* 0=frontbuffer, 1=backbuffer */ - pWin = ppMBWindow[i]->pWindow; - pPrevMBBuffer = MB_DISPLAYED_BUFFER(ppMBWindow[i]); - - pPrevBuffer = (BufferPtr) pPrevMBBuffer->pDrawable; - pNewBuffer = (BufferPtr) ppMBBuffer[i]->pDrawable; - - if (pPrevBuffer != pNewBuffer) - { - RegionPtr backBuffer = &pMBPriv->backBuffer; - - /* - * Update the select plane and the backBuffer region. - */ - - (* pMBPriv->DrawSelectPlane)(pScreen, pMBPriv->selectPlane, - &pWin->clipList, number); - - if (number == BACK_BUFFER) - REGION_UNION(pScreen, backBuffer, backBuffer, - &pWin->clipList); - else - REGION_SUBTRACT(pScreen, backBuffer, backBuffer, - &pWin->clipList); - - /* Switch which framebuffer the window draws into */ - pWin->devPrivates[frameWindowPrivateIndex] = - pMBPriv->frameBuffer[number]; - } - - switch (ppMBWindow[i]->updateAction) - { - case MultibufferUpdateActionUndefined: - break; - case MultibufferUpdateActionBackground: - (* MB_SCREEN_PRIV(pScreen)->ClearImageBufferArea) - (pPrevMBBuffer, 0,0, 0,0, FALSE); - break; - case MultibufferUpdateActionUntouched: - break; - case MultibufferUpdateActionCopied: - if (pPrevBuffer != pNewBuffer) - { - (* pMBPriv->CopyBufferBits) (ppMBWindow[i], - ppMBBuffer[i]->number, pPrevMBBuffer->number); - } - break; - } - } -} - -/* Updates the backBuffer region and paints the selectPlane. */ - -static void -bufPostValidateTree(pParent, pChild, kind) - WindowPtr pParent, pChild; - VTKind kind; -{ - ScreenPtr pScreen; - mbufBufferPrivPtr pMBPriv; - - if (pParent) - pScreen = pParent->drawable.pScreen; - else if (pChild) - pScreen = pChild->drawable.pScreen; - else - return; /* Hopeless */ - - pMBPriv = MB_SCREEN_PRIV_BUFFER(pScreen); - - UNWRAP_SCREEN_FUNC(pScreen, pMBPriv, void, PostValidateTree); - if (pScreen->PostValidateTree) - (* pScreen->PostValidateTree)(pParent, pChild, kind); - REWRAP_SCREEN_FUNC(pScreen, pMBPriv, void, PostValidateTree); - - /* Does backBuffer need to change? */ - if (pMBPriv->rgnChanged) - { - RegionRec exposed; - RegionPtr pSubtractRgn, pUnionRgn; - Bool overlap; - - pMBPriv->rgnChanged = FALSE; - - pSubtractRgn = &pMBPriv->subtractRgn; - pUnionRgn = &pMBPriv->unionRgn; - REGION_VALIDATE(pScreen, pSubtractRgn, &overlap); -#ifdef DEBUG - if (overlap) - FatalError("bufPostValidateTree: subtractRgn overlaps"); -#endif - REGION_VALIDATE(pScreen, pUnionRgn, &overlap); -#ifdef DEBUG - if (overlap) - FatalError("bufPostValidateTree: unionRgn overlaps"); -#endif - - /* Update backBuffer: subtract must come before union */ - REGION_SUBTRACT(pScreen, &pMBPriv->backBuffer, &pMBPriv->backBuffer, - pSubtractRgn); - REGION_UNION(pScreen, &pMBPriv->backBuffer, &pMBPriv->backBuffer, - pUnionRgn); - - /* Paint gained and lost backbuffer areas in select plane */ - REGION_NULL(pScreen, &exposed); - REGION_SUBTRACT(pScreen, &exposed, pSubtractRgn, pUnionRgn); - (* pMBPriv->DrawSelectPlane)(pScreen, pMBPriv->selectPlane, - &exposed, FRONT_BUFFER); - - REGION_SUBTRACT(pScreen, &exposed, pUnionRgn, pSubtractRgn); - (* pMBPriv->DrawSelectPlane)(pScreen, pMBPriv->selectPlane, - &exposed, BACK_BUFFER); - - REGION_UNINIT(pScreen, &exposed); - REGION_EMPTY(pScreen, pSubtractRgn); - REGION_EMPTY(pScreen, pUnionRgn); - } -} - -/* - * If the window is multibuffered and displaying the backbuffer, - * add the old clipList to the subtractRgn and add the new clipList - * to the unionRgn. PostValidateTree will use subtractRgn and unionRgn - * to update the backBuffer region and the selectPlane. - * - * Copy changes to the window structure into the buffers. - * Send ClobberNotify events. - */ - -static void -bufClipNotify(pWin, dx,dy) - WindowPtr pWin; - int dx,dy; -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - mbufBufferPrivPtr pMBPriv = MB_SCREEN_PRIV_BUFFER(pScreen); - mbufWindowPtr pMBWindow; - int i; - - UNWRAP_SCREEN_FUNC(pScreen, pMBPriv, void, ClipNotify); - if (pScreen->ClipNotify) - (* pScreen->ClipNotify)(pWin, dx,dy); - REWRAP_SCREEN_FUNC(pScreen, pMBPriv, void, ClipNotify); - - if (pMBWindow = MB_WINDOW_PRIV(pWin)) - { - RegionPtr pOldClipList = (RegionPtr) pMBWindow->devPrivate.ptr; - - if (! REGION_EQUAL(pScreen, pOldClipList, &pWin->clipList)) - { - if (pMBWindow->displayedMultibuffer == BACK_BUFFER) - { - pMBPriv->rgnChanged = TRUE; - REGION_APPEND(pScreen, &pMBPriv->subtractRgn, pOldClipList); - REGION_APPEND(pScreen, &pMBPriv->unionRgn, &pWin->clipList); - } - - REGION_COPY(pScreen, pOldClipList,&pWin->clipList); - } - - /* Update buffer x,y,w,h, and clipList */ - for (i=0; inumMultibuffer; i++) - { - mbufBufferPtr pMBBuffer = pMBWindow->buffers + i; - if (pMBBuffer->clobber != pWin->visibility) - { - pMBBuffer->clobber = pWin->visibility; - MultibufferClobber(pMBBuffer); - } - UpdateBufferFromWindow(pMBBuffer->pDrawable, pWin); - } - } -} - -/* - * Updates buffer's background fields when the window's changes. - * This is necessary because miPaintWindow is used to paint the buffer. - * - * XXBS - Backingstore state will have be tracked too if it is supported. - */ - -static Bool -bufChangeWindowAttributes(pWin, mask) - WindowPtr pWin; - unsigned long mask; -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - mbufBufferPrivPtr pMBPriv = MB_SCREEN_PRIV_BUFFER(pScreen); - mbufWindowPtr pMBWindow; - Bool ret; - - UNWRAP_SCREEN_FUNC(pScreen, pMBPriv, Bool, ChangeWindowAttributes); - ret = (* pScreen->ChangeWindowAttributes)(pWin, mask); - REWRAP_SCREEN_FUNC(pScreen, pMBPriv, Bool, ChangeWindowAttributes); - - if (pMBWindow = MB_WINDOW_PRIV(pWin)) - { - if (mask & (CWBackPixmap | CWBackPixel)) - { - BufferPtr pBuffer; - int i; - - for (i=0; idisplayedMultibuffer; i++) - { - pBuffer = (BufferPtr) pMBWindow->buffers[i].pDrawable; - pBuffer->backgroundState = pWin->backgroundState; - pBuffer->background = pWin->background; - } - } - } - return ret; -} - -/* - * Send exposures and clear the background for a buffer whenever - * its corresponding window is exposed, except when called by - * ClearToBackground. - */ - -static void -bufWindowExposures(pWin, prgn, other_exposed) - WindowPtr pWin; - RegionPtr prgn, other_exposed; -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - mbufWindowPtr pMBWindow = MB_WINDOW_PRIV(pWin); - mbufBufferPrivPtr pMBPriv = MB_SCREEN_PRIV_BUFFER(pScreen); - RegionRec tmp_rgn; - int i; - Bool handleBuffers; - - handleBuffers = (!pMBPriv->inClearToBackground) && - (pWin->drawable.type == DRAWABLE_WINDOW) && - pMBWindow && (prgn && !REGION_NIL(prgn)); - - /* miWindowExposures munges prgn and other_exposed. */ - if (handleBuffers) - { - REGION_NULL(pScreen, &tmp_rgn); - REGION_COPY(pScreen, &tmp_rgn, prgn); - } - - UNWRAP_SCREEN_FUNC(pScreen, pMBPriv, void, WindowExposures); - (* pScreen->WindowExposures) (pWin, prgn, other_exposed); - REWRAP_SCREEN_FUNC(pScreen, pMBPriv, void, WindowExposures); - - if (!handleBuffers) - return; - - /* - * Send expose events to all clients. Paint the exposed region for all - * buffers except the displayed buffer since it is handled when the - * window is painted. - * - * XXBS - Will have to be re-written to handle BackingStore on buffers. - */ - - for (i=0; inumMultibuffer; i++) - { - mbufBufferPtr pMBBuffer; - BufferPtr pBuffer; - - pMBBuffer = pMBWindow->buffers + i; - pBuffer = (BufferPtr) pMBBuffer->pDrawable; - - if (i != pMBWindow->displayedMultibuffer) - miPaintWindow(pBuffer, &tmp_rgn, PW_BACKGROUND); - if ((pMBBuffer->otherEventMask | pMBBuffer->eventMask) & ExposureMask) - MultibufferExpose(pMBBuffer, &tmp_rgn); - } - - REGION_UNINIT(pScreen, &tmp_rgn); -} - -/* - * Set ``inClearToBackground'' so that WindowExposures does not attempt - * to send expose events or clear the background on the buffers. - */ - -static void -bufClearToBackground(pWin, x,y,w,h, sendExpose) - WindowPtr pWin; - int x,y, w,h; - Bool sendExpose; -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - mbufBufferPrivPtr pMBPriv = MB_SCREEN_PRIV_BUFFER(pScreen); - - pMBPriv->inClearToBackground = TRUE; - - UNWRAP_SCREEN_FUNC(pScreen, pMBPriv, void, ClearToBackground); - (* pScreen->ClearToBackground)(pWin, x,y,w,h, sendExpose); - REWRAP_SCREEN_FUNC(pScreen, pMBPriv, void, ClearToBackground); - - pMBPriv->inClearToBackground = FALSE; -} - -/* - * Move bits in both buffers. It does this by calling pScreen->CopyWindow - * twice, once with the root window's devPrivate[frameWindowPrivateIndex] - * pointing to the frontbuffer pixmap and once with it pointed to the - * backbuffer pixmap. It does this if there are *any* existing multibuffered - * window... a possible optimization is to copy the backbuffer only if this - * window or its inferiors are multibuffered. May be faster, maybe not. - * - * XXX - Only works if your CopyWindow checks the root window's devPrivate - * to see which buffer to draw into. Works for cfbPaintWindow. - */ - -/*ARGSUSED*/ -static void -bufCopyWindow(pWin, ptOldOrg, prgnSrc) - WindowPtr pWin; - DDXPointRec ptOldOrg; - RegionPtr prgnSrc; -{ - ScreenPtr pScreen = pWin->drawable.pScreen; - mbufBufferPrivPtr pMBPriv = MB_SCREEN_PRIV_BUFFER(pScreen); - WindowPtr pwinroot; - DevUnion save; - - UNWRAP_SCREEN_FUNC(pScreen, pMBPriv, void, CopyWindow); - - pwinroot = WindowTable[pScreen->myNum]; - save = pwinroot->devPrivates[frameWindowPrivateIndex]; - - /* - * Copy front buffer - */ - - pwinroot->devPrivates[frameWindowPrivateIndex] = - pMBPriv->frameBuffer[FRONT_BUFFER]; - (* pScreen->CopyWindow)(pWin, ptOldOrg, prgnSrc); - - /* - * Copy back buffer - */ - - /* CopyWindow translates prgnSrc... translate it back for 2nd call. */ - REGION_TRANSLATE(pScreen, prgnSrc, - ptOldOrg.x - pWin->drawable.x, - ptOldOrg.y - pWin->drawable.y); - pwinroot->devPrivates[frameWindowPrivateIndex] = - pMBPriv->frameBuffer[BACK_BUFFER]; - (* pScreen->CopyWindow)(pWin, ptOldOrg, prgnSrc); - - pwinroot->devPrivates[frameWindowPrivateIndex] = save; - REWRAP_SCREEN_FUNC(pScreen, pMBPriv, void, CopyWindow); -} diff --git a/xserver/Xext/mbufpx.c b/xserver/Xext/mbufpx.c deleted file mode 100644 index 8421ba9eb..000000000 --- a/xserver/Xext/mbufpx.c +++ /dev/null @@ -1,648 +0,0 @@ -/************************************************************ - -Copyright 1989, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - -********************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include -#include -#include -#include "misc.h" -#include "os.h" -#include "windowstr.h" -#include "scrnintstr.h" -#include "pixmapstr.h" -#include "extnsionst.h" -#include "dixstruct.h" -#include "resource.h" -#include "opaque.h" -#include "regionstr.h" -#include "gcstruct.h" -#include "inputstr.h" -#include - -#define _MULTIBUF_SERVER_ /* don't want Xlib structures */ -#define _MULTIBUF_PIXMAP_ -#include - - -static Bool NoopDDA_True() { return TRUE; } - -static Bool pixPositionWindow(); -static int pixCreateImageBuffers(); -static void pixDisplayImageBuffers(); -static void pixClearImageBufferArea(); -static void pixDeleteBufferDrawable(); -static void pixWrapScreenFuncs(); -static void pixResetProc(); - -Bool -pixMultibufferInit(pScreen, pMBScreen) - ScreenPtr pScreen; - mbufScreenPtr pMBScreen; -{ - int i, j, k; - xMbufBufferInfo *pInfo; - int nInfo; - DepthPtr pDepth; - mbufPixmapPrivPtr pMBPriv; - - pMBScreen->CreateImageBuffers = pixCreateImageBuffers; - pMBScreen->DestroyImageBuffers = (void (*)())NoopDDA; - pMBScreen->DisplayImageBuffers = pixDisplayImageBuffers; - pMBScreen->ClearImageBufferArea = pixClearImageBufferArea; - pMBScreen->ChangeMBufferAttributes = NoopDDA_True; - pMBScreen->ChangeBufferAttributes = NoopDDA_True; - pMBScreen->DeleteBufferDrawable = pixDeleteBufferDrawable; - pMBScreen->WrapScreenFuncs = pixWrapScreenFuncs; - pMBScreen->ResetProc = pixResetProc; - - /* Support every depth and visual combination that the screen does */ - - nInfo = 0; - for (i = 0; i < pScreen->numDepths; i++) - { - pDepth = &pScreen->allowedDepths[i]; - nInfo += pDepth->numVids; - } - - pInfo = xalloc (nInfo * sizeof (xMbufBufferInfo)); - if (!pInfo) - return FALSE; - - k = 0; - for (i = 0; i < pScreen->numDepths; i++) - { - pDepth = &pScreen->allowedDepths[i]; - for (j = 0; j < pDepth->numVids; j++) - { - pInfo[k].visualID = pDepth->vids[j]; - pInfo[k].maxBuffers = 0; - pInfo[k].depth = pDepth->depth; - k++; - } - } - - pMBScreen->nInfo = nInfo; - pMBScreen->pInfo = pInfo; - - /* - * Setup the devPrivate to mbufScreenRec - */ - - pMBPriv = xalloc(sizeof(* pMBPriv)); - if (!pMBPriv) - { - xfree(pInfo); - return (FALSE); - } - pMBScreen->devPrivate.ptr = (pointer) pMBPriv; - pMBPriv->PositionWindow = NULL; - pMBPriv->funcsWrapped = 0; - - return TRUE; -} - -/*ARGSUSED*/ -static int -pixCreateImageBuffers (pWin, nbuf, ids, action, hint) - WindowPtr pWin; - int nbuf; - XID *ids; - int action; - int hint; -{ - mbufWindowPtr pMBWindow; - mbufBufferPtr pMBBuffer; - ScreenPtr pScreen; - int width, height, depth; - int i; - - pMBWindow = MB_WINDOW_PRIV(pWin); - - width = pWin->drawable.width; - height = pWin->drawable.height; - depth = pWin->drawable.depth; - pScreen = pWin->drawable.pScreen; - - for (i = 0; i < nbuf; i++) - { - pMBBuffer = &pMBWindow->buffers[i]; - pMBBuffer->pDrawable = (DrawablePtr) - (*pScreen->CreatePixmap) (pScreen, width, height, depth, 0); - if (!pMBBuffer->pDrawable) - break; - - if (!AddResource (ids[i], MultibufferDrawableResType, - (pointer) pMBBuffer->pDrawable)) - { - (*pScreen->DestroyPixmap) ((PixmapPtr) pMBBuffer->pDrawable); - break; - } - pMBBuffer->pDrawable->id = ids[i]; - - /* - * In the description of the CreateImageBuffers request: - * "If the window is mapped, or if these image buffers have - * backing store, their contents will be tiled with the window - * background, and zero or more expose events will be generated - * for each of these buffers." - */ - - (* MB_SCREEN_PRIV(pScreen)->ClearImageBufferArea) - (pMBBuffer, 0,0, 0,0, TRUE); - } - - return i; -} - -/* - * set up the gc to clear the pixmaps; - */ -static Bool -SetupBackgroundPainter (pWin, pGC) - WindowPtr pWin; - GCPtr pGC; -{ - XID gcvalues[4]; - int ts_x_origin, ts_y_origin; - PixUnion background; - int backgroundState; - Mask gcmask; - - /* - * First take care of any ParentRelative stuff by altering the - * tile/stipple origin to match the coordinates of the upper-left - * corner of the first ancestor without a ParentRelative background. - * This coordinate is, of course, negative. - */ - - ts_x_origin = ts_y_origin = 0; - while (pWin->backgroundState == ParentRelative) { - ts_x_origin -= pWin->origin.x; - ts_y_origin -= pWin->origin.y; - pWin = pWin->parent; - } - backgroundState = pWin->backgroundState; - background = pWin->background; - - switch (backgroundState) - { - case BackgroundPixel: - gcvalues[0] = (XID) background.pixel; - gcvalues[1] = FillSolid; - gcmask = GCForeground|GCFillStyle; - break; - - case BackgroundPixmap: - gcvalues[0] = FillTiled; - gcvalues[1] = (XID) background.pixmap; - gcvalues[2] = ts_x_origin; - gcvalues[3] = ts_y_origin; - gcmask = GCFillStyle|GCTile|GCTileStipXOrigin|GCTileStipYOrigin; - break; - - default: - return FALSE; - } - DoChangeGC(pGC, gcmask, gcvalues, TRUE); - return TRUE; -} - -static void -MultibufferPaintBackgroundRectangles(pWin, pDrawable, nrects, pRects) - WindowPtr pWin; - DrawablePtr pDrawable; - int nrects; - xRectangle *pRects; -{ - GCPtr pGC; - - pGC = GetScratchGC (pWin->drawable.depth, pWin->drawable.pScreen); - if (SetupBackgroundPainter(pWin, pGC)) - { - ValidateGC(pDrawable, pGC); - (*pGC->ops->PolyFillRect) (pDrawable, pGC, nrects, pRects); - } - FreeScratchGC(pGC); -} - -static void -MultibufferPaintBackgroundRegion(pWin, pDrawable, pRegion) - WindowPtr pWin; - DrawablePtr pDrawable; - RegionPtr pRegion; -{ - xRectangle *pRects; - int nrects = REGION_NUM_RECTS(pRegion); - BoxPtr pbox = REGION_RECTS(pRegion); - - pRects = xalloc(nrects * sizeof(xRectangle)); - if (pRects) - { - int i; - for (i = 0; i < nrects; i++) - { - pRects[i].x = pbox->x1; - pRects[i].y = pbox->y1; - pRects[i].width = pbox->x2 - pbox->x1; - pRects[i].height = pbox->y2 - pbox->y1; - } - MultibufferPaintBackgroundRectangles(pWin, pDrawable, nrects, pRects); - xfree(pRects); - } -} - -static void -pixDisplayImageBuffers(pScreen, ppMBWindow, ppMBBuffer, nbuf) - mbufBufferPtr *ppMBBuffer; - mbufWindowPtr *ppMBWindow; - int nbuf; -{ - GCPtr pGC = NULL; - PixmapPtr pPrevPixmap, pNewPixmap; - WindowPtr pWin; - RegionPtr pExposed; - int i; - mbufBufferPtr pPrevMBBuffer; - XID bool; - xRectangle r; - - UpdateCurrentTime (); - for (i = 0; i < nbuf; i++) - { - pWin = ppMBWindow[i]->pWindow; - - /* Time to get a different scratch GC? */ - - if (!pGC - || pGC->depth != pWin->drawable.depth - || pGC->pScreen != pWin->drawable.pScreen) - { - if (pGC) FreeScratchGC(pGC); - pGC = GetScratchGC (pWin->drawable.depth, pWin->drawable.pScreen); - } - pPrevMBBuffer = MB_DISPLAYED_BUFFER(ppMBWindow[i]); - pPrevPixmap = (PixmapPtr) pPrevMBBuffer->pDrawable; - pNewPixmap = (PixmapPtr) ppMBBuffer[i]->pDrawable; - - if (pPrevPixmap == pNewPixmap) - { - /* "If a specified buffer is already displayed, any delays and - * update action will still be performed for that buffer." - * - * We special-case this because applications do occasionally - * request a redundant DisplayImageBuffers, and we can save - * strokes by recognizing that the only update action that will - * change the buffer contents in this case is Background. - */ - if (ppMBWindow[i]->updateAction == MultibufferUpdateActionBackground) - { - r.x = r.y = 0; - r.width = pWin->drawable.width; - r.height = pWin->drawable.height; - MultibufferPaintBackgroundRectangles(pWin, (DrawablePtr)pWin, - 1, &r); - } - } - else /* different buffer is being displayed */ - { - /* perform update action */ - - switch (ppMBWindow[i]->updateAction) - { - case MultibufferUpdateActionUndefined: - break; - - case MultibufferUpdateActionBackground: - - r.x = r.y = 0; - r.width = pPrevPixmap->drawable.width; - r.height = pPrevPixmap->drawable.height; - MultibufferPaintBackgroundRectangles(pWin, - (DrawablePtr)pPrevPixmap, - 1, &r); - break; - - case MultibufferUpdateActionUntouched: - - /* copy the window to the pixmap that represents the - * currently displayed buffer - */ - - if (pPrevMBBuffer->eventMask & ExposureMask) - { - bool = TRUE; - DoChangeGC (pGC, GCGraphicsExposures, &bool, FALSE); - } - ValidateGC ((DrawablePtr)pPrevPixmap, pGC); - pExposed = (*pGC->ops->CopyArea)((DrawablePtr) pWin, - (DrawablePtr) pPrevPixmap, - pGC, - 0, 0, - pWin->drawable.width, - pWin->drawable.height, - 0, 0); - - /* if we couldn't copy the whole window to the buffer, - * send expose events (if any client wants them) - */ - - if (pPrevMBBuffer->eventMask & ExposureMask) - { /* some client wants expose events */ - if (pExposed) - { - RegionPtr pWinSize; - extern RegionPtr CreateUnclippedWinSize(); - ScreenPtr pScreen = pWin->drawable.pScreen; - pWinSize = CreateUnclippedWinSize (pWin); - /* - * pExposed is window-relative, but at this point - * pWinSize is screen-relative. Make pWinSize be - * window-relative so that region ops involving - * pExposed and pWinSize behave sensibly. - */ - REGION_TRANSLATE(pScreen, pWinSize, - -pWin->drawable.x, - -pWin->drawable.y); - REGION_INTERSECT(pScreen, pExposed, pExposed, pWinSize); - REGION_DESTROY(pScreen, pWinSize); - MultibufferExpose (pPrevMBBuffer, pExposed); - REGION_DESTROY(pScreen, pExposed); - } - bool = FALSE; - DoChangeGC (pGC, GCGraphicsExposures, &bool, FALSE); - } /* end some client wants expose events */ - - break; /* end case MultibufferUpdateActionUntouched */ - - case MultibufferUpdateActionCopied: - - ValidateGC ((DrawablePtr)pPrevPixmap, pGC); - (*pGC->ops->CopyArea) ((DrawablePtr)pNewPixmap, - (DrawablePtr)pPrevPixmap, pGC, - 0, 0, pWin->drawable.width, - pWin->drawable.height, 0, 0); - break; - - } /* end switch on update action */ - - /* display the new buffer */ - - ValidateGC ((DrawablePtr)pWin, pGC); - (*pGC->ops->CopyArea) ((DrawablePtr)pNewPixmap, (DrawablePtr)pWin, - pGC, 0, 0, - pWin->drawable.width, pWin->drawable.height, - 0, 0); - } - - ppMBWindow[i]->lastUpdate = currentTime; - } - - if (pGC) FreeScratchGC (pGC); - return; -} - -/* - * resize the buffers when the window is resized - */ - -static Bool -pixPositionWindow (pWin, x, y) - WindowPtr pWin; - int x, y; -{ - ScreenPtr pScreen; - mbufPixmapPrivPtr pMBPriv; - mbufWindowPtr pMBWindow; - mbufBufferPtr pMBBuffer; - int width, height; - int i; - int dx, dy, dw, dh; - int sourcex, sourcey; - int destx, desty; - PixmapPtr pPixmap; - GCPtr pGC; - int savewidth, saveheight; - Bool clear; - RegionRec exposedRegion; - Bool ret; - - pScreen = pWin->drawable.pScreen; - pMBPriv = MB_SCREEN_PRIV_PIXMAP(pScreen); - - UNWRAP_SCREEN_FUNC(pScreen, pMBPriv, Bool, PositionWindow); - ret = (* pScreen->PositionWindow) (pWin, x, y); - REWRAP_SCREEN_FUNC(pScreen, pMBPriv, Bool, PositionWindow); - - if (!(pMBWindow = MB_WINDOW_PRIV(pWin))) - return ret; - - /* if new size is same as old, we're done */ - - if (pMBWindow->width == pWin->drawable.width && - pMBWindow->height == pWin->drawable.height) - return ret; - - width = pWin->drawable.width; - height = pWin->drawable.height; - dx = pWin->drawable.x - pMBWindow->x; - dy = pWin->drawable.x - pMBWindow->y; - dw = width - pMBWindow->width; - dh = height - pMBWindow->height; - GravityTranslate (0, 0, -dx, -dy, dw, dh, - pWin->bitGravity, &destx, &desty); - - /* if the window grew, remember to paint the window background, - * and maybe send expose events, for the new areas of the buffers - */ - - clear = pMBWindow->width < width || pMBWindow->height < height || - pWin->bitGravity == ForgetGravity; - - sourcex = 0; - sourcey = 0; - savewidth = pMBWindow->width; - saveheight = pMBWindow->height; - /* clip rectangle to source and destination */ - if (destx < 0) - { - savewidth += destx; - sourcex -= destx; - destx = 0; - } - if (destx + savewidth > width) - savewidth = width - destx; - if (desty < 0) - { - saveheight += desty; - sourcey -= desty; - desty = 0; - } - if (desty + saveheight > height) - saveheight = height - desty; - - pMBWindow->width = width; - pMBWindow->height = height; - pMBWindow->x = pWin->drawable.x; - pMBWindow->y = pWin->drawable.y; - - if (clear) - { - BoxRec box; - - box.x1 = box.y1 = 0; - box.x2 = width; - box.y2 = height; - REGION_INIT(pScreen, &exposedRegion, &box, 1); - if (pWin->bitGravity != ForgetGravity) - { - RegionRec preservedRegion; - box.x1 = destx; - box.y1 = desty; - box.x2 = destx + savewidth; - box.y2 = desty + saveheight; - REGION_INIT(pScreen, &preservedRegion, &box, 1); - REGION_SUBTRACT(pScreen, &exposedRegion, &exposedRegion, &preservedRegion); - REGION_UNINIT(pScreen, &preservedRegion); - } - - } /* end if (clear) */ - - pGC = GetScratchGC (pWin->drawable.depth, pScreen); - - /* create buffers with new window size */ - - for (i = 0; i < pMBWindow->numMultibuffer; i++) - { - pMBBuffer = &pMBWindow->buffers[i]; - pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, pWin->drawable.depth, - CREATE_PIXMAP_USAGE_SCRATCH); - if (!pPixmap) - { - (* MB_SCREEN_PRIV(pScreen)->DestroyImageBuffers)(pWin); - break; - } - if (clear) - { - MultibufferPaintBackgroundRegion(pWin, (DrawablePtr)pPixmap, &exposedRegion); - MultibufferExpose(pMBBuffer, &exposedRegion); - } - if (pWin->bitGravity != ForgetGravity) - { - ValidateGC ((DrawablePtr)pPixmap, pGC); - (*pGC->ops->CopyArea) (pMBBuffer->pDrawable, (DrawablePtr)pPixmap, - pGC, - sourcex, sourcey, savewidth, saveheight, - destx, desty); - } - pPixmap->drawable.id = pMBBuffer->pDrawable->id; - (*pScreen->DestroyPixmap) ((PixmapPtr) pMBBuffer->pDrawable); - pMBBuffer->pDrawable = (DrawablePtr) pPixmap; - if (i != pMBWindow->displayedMultibuffer) - { - ChangeResourceValue (pPixmap->drawable.id, - MultibufferDrawableResType, - (pointer) pPixmap); - } - } - FreeScratchGC (pGC); - if (clear) - REGION_UNINIT(pScreen, &exposedRegion); - return TRUE; -} - -static void -pixWrapScreenFuncs(pScreen) - ScreenPtr pScreen; -{ - mbufPixmapPrivPtr pMBPriv = MB_SCREEN_PRIV_PIXMAP(pScreen); - WRAP_SCREEN_FUNC(pScreen, pMBPriv, PositionWindow, pixPositionWindow); -} - -static void -pixResetProc(pScreen) - ScreenPtr pScreen; -{ - mbufScreenPtr pMBScreen = MB_SCREEN_PRIV(pScreen); - mbufPixmapPrivPtr pMBPriv = MB_SCREEN_PRIV_PIXMAP(pScreen); - - xfree(pMBScreen->pInfo); - xfree(pMBPriv); -} - -static void -pixClearImageBufferArea(pMBBuffer, x,y, width,height, exposures) - mbufBufferPtr pMBBuffer; - short x, y; - unsigned short width, height; - Bool exposures; -{ - WindowPtr pWin; - ScreenPtr pScreen; - BoxRec box; - RegionRec region; - int w_width, w_height; - DrawablePtr pDrawable; - - pWin = pMBBuffer->pMBWindow->pWindow; - pScreen = pWin->drawable.pScreen; - - w_width = pWin->drawable.width; - w_height = pWin->drawable.height; - - box.x1 = x; - box.y1 = y; - box.x2 = width ? (box.x1 + width) : w_width; - box.y2 = height ? (box.y1 + height) : w_height; - - if (box.x1 < 0) box.x1 = 0; - if (box.y1 < 0) box.y1 = 0; - if (box.x2 > w_width) box.x2 = w_width; - if (box.y2 > w_height) box.y2 = w_height; - - REGION_INIT(pScreen, ®ion, &box, 1); - - if (pMBBuffer->number == pMBBuffer->pMBWindow->displayedMultibuffer) - pDrawable = (DrawablePtr) pWin; - else - pDrawable = pMBBuffer->pDrawable; - - MultibufferPaintBackgroundRegion(pWin, pDrawable, ®ion); - - if (exposures) - MultibufferExpose(pMBBuffer, ®ion); - - REGION_UNINIT(pScreen, ®ion); -} - -static void -pixDeleteBufferDrawable(pDrawable) - DrawablePtr pDrawable; -{ - (* pDrawable->pScreen->DestroyPixmap)((PixmapPtr) pDrawable); -} diff --git a/xserver/Xext/panoramiX.c b/xserver/Xext/panoramiX.c index cfeba017f..b73c53f19 100644 --- a/xserver/Xext/panoramiX.c +++ b/xserver/Xext/panoramiX.c @@ -52,9 +52,7 @@ Equipment Corporation. #include "globals.h" #include "servermd.h" #include "resource.h" -#ifdef RENDER #include "picturestr.h" -#endif #include "modinit.h" #include "protocol-versions.h" @@ -72,7 +70,6 @@ int PanoramiXPixWidth = 0; int PanoramiXPixHeight = 0; int PanoramiXNumScreens = 0; -PanoramiXData *panoramiXdataPtr = NULL; static RegionRec PanoramiXScreenRegion = {{0, 0, 0, 0}, NULL}; static int PanoramiXNumDepths; @@ -106,10 +103,10 @@ static void PanoramiXResetProc(ExtensionEntry*); int (* SavedProcVector[256]) (ClientPtr client) = { NULL, }; -static int PanoramiXGCKeyIndex; -static DevPrivateKey PanoramiXGCKey = &PanoramiXGCKeyIndex; -static int PanoramiXScreenKeyIndex; -static DevPrivateKey PanoramiXScreenKey = &PanoramiXScreenKeyIndex; +static DevPrivateKeyRec PanoramiXGCKeyRec; +#define PanoramiXGCKey (&PanoramiXGCKeyRec) +static DevPrivateKeyRec PanoramiXScreenKeyRec; +#define PanoramiXScreenKey (&PanoramiXScreenKeyRec) typedef struct { DDXPointRec clipOrg; @@ -122,8 +119,6 @@ typedef struct { CloseScreenProcPtr CloseScreen; } PanoramiXScreenRec, *PanoramiXScreenPtr; -RegionRec XineramaScreenRegions[MAXSCREENS]; - static void XineramaValidateGC(GCPtr, unsigned long, DrawablePtr); static void XineramaChangeGC(GCPtr, unsigned long); static void XineramaCopyGC(GCPtr, unsigned long, GCPtr); @@ -156,11 +151,10 @@ XineramaCloseScreen (int i, ScreenPtr pScreen) pScreen->CloseScreen = pScreenPriv->CloseScreen; pScreen->CreateGC = pScreenPriv->CreateGC; - REGION_UNINIT(pScreen, &XineramaScreenRegions[pScreen->myNum]); if (pScreen->myNum == 0) - REGION_UNINIT(pScreen, &PanoramiXScreenRegion); + RegionUninit(&PanoramiXScreenRegion); - xfree ((pointer) pScreenPriv); + free((pointer) pScreenPriv); return (*pScreen->CloseScreen) (i, pScreen); } @@ -201,8 +195,8 @@ XineramaValidateGC( if((pDraw->type == DRAWABLE_WINDOW) && !(((WindowPtr)pDraw)->parent)) { /* the root window */ - int x_off = panoramiXdataPtr[pGC->pScreen->myNum].x; - int y_off = panoramiXdataPtr[pGC->pScreen->myNum].y; + int x_off = pGC->pScreen->x; + int y_off = pGC->pScreen->y; int new_val; new_val = pGCPriv->clipOrg.x - x_off; @@ -330,7 +324,7 @@ XineramaDestroyClip(GCPtr pGC) int XineramaDeleteResource(pointer data, XID id) { - xfree(data); + free(data); return 1; } @@ -345,7 +339,7 @@ XineramaFindIDByScrnum(pointer resource, XID id, pointer privdata) PanoramiXRes *res = (PanoramiXRes*)resource; PanoramiXSearchData *data = (PanoramiXSearchData*)privdata; - return (res->info[data->screen].id == data->id); + return res->info[data->screen].id == data->id; } PanoramiXRes * @@ -378,7 +372,7 @@ XineramaRegisterConnectionBlockCallback(void (*func)(void)) { XineramaConnectionCallbackList *newlist; - if(!(newlist = xalloc(sizeof(XineramaConnectionCallbackList)))) + if(!(newlist = malloc(sizeof(XineramaConnectionCallbackList)))) return FALSE; newlist->next = ConnectionCallbackList; @@ -392,33 +386,31 @@ static void XineramaInitData(ScreenPtr pScreen) { int i, w, h; - REGION_NULL(pScreen, &PanoramiXScreenRegion) + RegionNull(&PanoramiXScreenRegion); for (i = 0; i < PanoramiXNumScreens; i++) { BoxRec TheBox; + RegionRec ScreenRegion; pScreen = screenInfo.screens[i]; - panoramiXdataPtr[i].x = dixScreenOrigins[i].x; - panoramiXdataPtr[i].y = dixScreenOrigins[i].y; - panoramiXdataPtr[i].width = pScreen->width; - panoramiXdataPtr[i].height = pScreen->height; + TheBox.x1 = pScreen->x; + TheBox.x2 = TheBox.x1 + pScreen->width; + TheBox.y1 = pScreen->y; + TheBox.y2 = TheBox.y1 + pScreen->height; - TheBox.x1 = panoramiXdataPtr[i].x; - TheBox.x2 = TheBox.x1 + panoramiXdataPtr[i].width; - TheBox.y1 = panoramiXdataPtr[i].y; - TheBox.y2 = TheBox.y1 + panoramiXdataPtr[i].height; - - REGION_INIT(pScreen, &XineramaScreenRegions[i], &TheBox, 1); - REGION_UNION(pScreen, &PanoramiXScreenRegion, &PanoramiXScreenRegion, - &XineramaScreenRegions[i]); + RegionInit(&ScreenRegion, &TheBox, 1); + RegionUnion(&PanoramiXScreenRegion, &PanoramiXScreenRegion, + &ScreenRegion); + RegionUninit(&ScreenRegion); } - PanoramiXPixWidth = panoramiXdataPtr[0].x + panoramiXdataPtr[0].width; - PanoramiXPixHeight = panoramiXdataPtr[0].y + panoramiXdataPtr[0].height; + PanoramiXPixWidth = screenInfo.screens[0]->x + screenInfo.screens[0]->width; + PanoramiXPixHeight = screenInfo.screens[0]->y + screenInfo.screens[0]->height; for (i = 1; i < PanoramiXNumScreens; i++) { - w = panoramiXdataPtr[i].x + panoramiXdataPtr[i].width; - h = panoramiXdataPtr[i].y + panoramiXdataPtr[i].height; + pScreen = screenInfo.screens[i]; + w = pScreen->x + pScreen->width; + h = pScreen->y + pScreen->height; if (PanoramiXPixWidth < w) PanoramiXPixWidth = w; @@ -429,12 +421,7 @@ static void XineramaInitData(ScreenPtr pScreen) void XineramaReinitData(ScreenPtr pScreen) { - int i; - - REGION_UNINIT(pScreen, &PanoramiXScreenRegion); - for (i = 0; i < PanoramiXNumScreens; i++) - REGION_UNINIT(pScreen, &XineramaScreenRegions[i]); - + RegionUninit(&PanoramiXScreenRegion); XineramaInitData(pScreen); } @@ -456,6 +443,16 @@ void PanoramiXExtensionInit(int argc, char *argv[]) if (noPanoramiXExtension) return; + if (!dixRegisterPrivateKey(&PanoramiXScreenKeyRec, PRIVATE_SCREEN, 0)) { + noPanoramiXExtension = TRUE; + return; + } + + if (!dixRegisterPrivateKey(&PanoramiXGCKeyRec, PRIVATE_GC, sizeof(PanoramiXGCRec))) { + noPanoramiXExtension = TRUE; + return; + } + PanoramiXNumScreens = screenInfo.numScreens; if (PanoramiXNumScreens == 1) { /* Only 1 screen */ noPanoramiXExtension = TRUE; @@ -475,19 +472,9 @@ void PanoramiXExtensionInit(int argc, char *argv[]) * run in non-PanoramiXeen mode. */ - panoramiXdataPtr = (PanoramiXData *) - xcalloc(PanoramiXNumScreens, sizeof(PanoramiXData)); - - BREAK_IF(!panoramiXdataPtr); - - if (!dixRequestPrivate(PanoramiXGCKey, sizeof(PanoramiXGCRec))) { - noPanoramiXExtension = TRUE; - return; - } - for (i = 0; i < PanoramiXNumScreens; i++) { pScreen = screenInfo.screens[i]; - pScreenPriv = xalloc(sizeof(PanoramiXScreenRec)); + pScreenPriv = malloc(sizeof(PanoramiXScreenRec)); dixSetPrivate(&pScreen->devPrivates, PanoramiXScreenKey, pScreenPriv); if(!pScreenPriv) { @@ -520,6 +507,10 @@ void PanoramiXExtensionInit(int argc, char *argv[]) panoramiXGeneration = serverGeneration; success = TRUE; } + SetResourceTypeErrorValue(XRT_WINDOW, BadWindow); + SetResourceTypeErrorValue(XRT_PIXMAP, BadPixmap); + SetResourceTypeErrorValue(XRT_GC, BadGC); + SetResourceTypeErrorValue(XRT_COLORMAP, BadColor); } if (!success) { @@ -589,9 +580,7 @@ void PanoramiXExtensionInit(int argc, char *argv[]) ProcVector[X_StoreColors] = PanoramiXStoreColors; ProcVector[X_StoreNamedColor] = PanoramiXStoreNamedColor; -#ifdef RENDER PanoramiXRenderInit (); -#endif } extern Bool CreateConnectionBlock(void); @@ -678,8 +667,8 @@ Bool PanoramiXCreateConnectionBlock(void) connSetupPrefix.length = bytes_to_int32(length); for (i = 0; i < PanoramiXNumDepths; i++) - xfree(PanoramiXDepths[i].vids); - xfree(PanoramiXDepths); + free(PanoramiXDepths[i].vids); + free(PanoramiXDepths); PanoramiXDepths = NULL; /* @@ -702,7 +691,7 @@ Bool PanoramiXCreateConnectionBlock(void) tmp = (pointer)ConnectionCallbackList; (*ConnectionCallbackList->func)(); ConnectionCallbackList = ConnectionCallbackList->next; - xfree(tmp); + free(tmp); } return TRUE; @@ -753,13 +742,13 @@ PanoramiXMaybeAddDepth(DepthPtr pDepth) j = PanoramiXNumDepths; PanoramiXNumDepths++; - PanoramiXDepths = xrealloc(PanoramiXDepths, + PanoramiXDepths = realloc(PanoramiXDepths, PanoramiXNumDepths * sizeof(DepthRec)); PanoramiXDepths[j].depth = pDepth->depth; PanoramiXDepths[j].numVids = 0; /* XXX suboptimal, should grow these dynamically */ if(pDepth->numVids) - PanoramiXDepths[j].vids = xalloc(sizeof(VisualID) * pDepth->numVids); + PanoramiXDepths[j].vids = malloc(sizeof(VisualID) * pDepth->numVids); else PanoramiXDepths[j].vids = NULL; } @@ -795,7 +784,7 @@ PanoramiXMaybeAddVisual(VisualPtr pVisual) /* found a matching visual on all screens, add it to the subset list */ j = PanoramiXNumVisuals; PanoramiXNumVisuals++; - PanoramiXVisuals = xrealloc(PanoramiXVisuals, + PanoramiXVisuals = realloc(PanoramiXVisuals, PanoramiXNumVisuals * sizeof(VisualRec)); memcpy(&PanoramiXVisuals[j], pVisual, sizeof(VisualRec)); @@ -827,21 +816,22 @@ PanoramiXConsolidate(void) for (i = 0; i < pScreen->numVisuals; i++) PanoramiXMaybeAddVisual(pVisual++); - root = xalloc(sizeof(PanoramiXRes)); + root = malloc(sizeof(PanoramiXRes)); root->type = XRT_WINDOW; - defmap = xalloc(sizeof(PanoramiXRes)); + defmap = malloc(sizeof(PanoramiXRes)); defmap->type = XRT_COLORMAP; - saver = xalloc(sizeof(PanoramiXRes)); + saver = malloc(sizeof(PanoramiXRes)); saver->type = XRT_WINDOW; for (i = 0; i < PanoramiXNumScreens; i++) { - root->info[i].id = WindowTable[i]->drawable.id; + ScreenPtr pScreen = screenInfo.screens[i]; + root->info[i].id = pScreen->root->drawable.id; root->u.win.class = InputOutput; root->u.win.root = TRUE; - saver->info[i].id = savedScreenInfo[i].wid; + saver->info[i].id = pScreen->screensaver.wid; saver->u.win.class = InputOutput; saver->u.win.root = TRUE; - defmap->info[i].id = (screenInfo.screens[i])->defColormap; + defmap->info[i].id = pScreen->defColormap; } AddResource(root->info[0].id, XRT_WINDOW, root); @@ -891,14 +881,10 @@ static void PanoramiXResetProc(ExtensionEntry* extEntry) { int i; -#ifdef RENDER PanoramiXRenderReset (); -#endif screenInfo.numScreens = PanoramiXNumScreens; for (i = 256; i--; ) ProcVector[i] = SavedProcVector[i]; - - Xfree(panoramiXdataPtr); } @@ -922,7 +908,7 @@ ProcPanoramiXQueryVersion (ClientPtr client) swaps(&rep.minorVersion, n); } WriteToClient(client, sizeof (xPanoramiXQueryVersionReply), (char *)&rep); - return (client->noClientException); + return Success; } int @@ -949,7 +935,7 @@ ProcPanoramiXGetState(ClientPtr client) swapl (&rep.window, n); } WriteToClient (client, sizeof (xPanoramiXGetStateReply), (char *) &rep); - return client->noClientException; + return Success; } @@ -977,7 +963,7 @@ ProcPanoramiXGetScreenCount(ClientPtr client) swapl (&rep.window, n); } WriteToClient (client, sizeof (xPanoramiXGetScreenCountReply), (char *) &rep); - return client->noClientException; + return Success; } int @@ -1000,8 +986,8 @@ ProcPanoramiXGetScreenSize(ClientPtr client) rep.length = 0; rep.sequenceNumber = client->sequence; /* screen dimensions */ - rep.width = panoramiXdataPtr[stuff->screen].width; - rep.height = panoramiXdataPtr[stuff->screen].height; + rep.width = screenInfo.screens[stuff->screen]->width; + rep.height = screenInfo.screens[stuff->screen]->height; rep.window = stuff->window; rep.screen = stuff->screen; if (client->swapped) { @@ -1013,7 +999,7 @@ ProcPanoramiXGetScreenSize(ClientPtr client) swapl (&rep.screen, n); } WriteToClient (client, sizeof (xPanoramiXGetScreenSizeReply), (char *) &rep); - return client->noClientException; + return Success; } @@ -1044,7 +1030,7 @@ ProcXineramaIsActive(ClientPtr client) swapl (&rep.state, n); } WriteToClient (client, sizeof (xXineramaIsActiveReply), (char *) &rep); - return client->noClientException; + return Success; } @@ -1073,10 +1059,10 @@ ProcXineramaQueryScreens(ClientPtr client) int i; for(i = 0; i < PanoramiXNumScreens; i++) { - scratch.x_org = panoramiXdataPtr[i].x; - scratch.y_org = panoramiXdataPtr[i].y; - scratch.width = panoramiXdataPtr[i].width; - scratch.height = panoramiXdataPtr[i].height; + scratch.x_org = screenInfo.screens[i]->x; + scratch.y_org = screenInfo.screens[i]->y; + scratch.width = screenInfo.screens[i]->width; + scratch.height = screenInfo.screens[i]->height; if(client->swapped) { int n; @@ -1089,7 +1075,7 @@ ProcXineramaQueryScreens(ClientPtr client) } } - return client->noClientException; + return Success; } @@ -1154,7 +1140,7 @@ XineramaGetImageData( int pitch, Bool isRoot ){ - RegionRec SrcRegion, GrabRegion; + RegionRec SrcRegion, ScreenRegion, GrabRegion; BoxRec SrcBox, *pbox; int x, y, w, h, i, j, nbox, size, sizeNeeded, ScratchPitch, inOut, depth; DrawablePtr pDraw = pDrawables[0]; @@ -1166,38 +1152,47 @@ XineramaGetImageData( SrcBox.x1 = left; SrcBox.y1 = top; if(!isRoot) { - SrcBox.x1 += pDraw->x + panoramiXdataPtr[0].x; - SrcBox.y1 += pDraw->y + panoramiXdataPtr[0].y; + SrcBox.x1 += pDraw->x + screenInfo.screens[0]->x; + SrcBox.y1 += pDraw->y + screenInfo.screens[0]->y; } SrcBox.x2 = SrcBox.x1 + width; SrcBox.y2 = SrcBox.y1 + height; - REGION_INIT(pScreen, &SrcRegion, &SrcBox, 1); - REGION_NULL(pScreen, &GrabRegion); + RegionInit(&SrcRegion, &SrcBox, 1); + RegionNull(&GrabRegion); depth = (format == XYPixmap) ? 1 : pDraw->depth; for(i = 0; i < PanoramiXNumScreens; i++) { + BoxRec TheBox; + ScreenPtr pScreen; pDraw = pDrawables[i]; + pScreen = pDraw->pScreen; - inOut = RECT_IN_REGION(pScreen,&XineramaScreenRegions[i],&SrcBox); + TheBox.x1 = pScreen->x; + TheBox.x2 = TheBox.x1 + pScreen->width; + TheBox.y1 = pScreen->y; + TheBox.y2 = TheBox.y1 + pScreen->height; + + RegionInit(&ScreenRegion, &TheBox, 1); + inOut = RegionContainsRect(&ScreenRegion, &SrcBox); + if(inOut == rgnPART) + RegionIntersect(&GrabRegion, &SrcRegion, &ScreenRegion); + RegionUninit(&ScreenRegion); if(inOut == rgnIN) { - (*pDraw->pScreen->GetImage)(pDraw, - SrcBox.x1 - pDraw->x - panoramiXdataPtr[i].x, - SrcBox.y1 - pDraw->y - panoramiXdataPtr[i].y, + (*pScreen->GetImage)(pDraw, + SrcBox.x1 - pDraw->x - screenInfo.screens[i]->x, + SrcBox.y1 - pDraw->y - screenInfo.screens[i]->y, width, height, format, planemask, data); break; } else if (inOut == rgnOUT) continue; - REGION_INTERSECT(pScreen, &GrabRegion, &SrcRegion, - &XineramaScreenRegions[i]); - - nbox = REGION_NUM_RECTS(&GrabRegion); + nbox = RegionNumRects(&GrabRegion); if(nbox) { - pbox = REGION_RECTS(&GrabRegion); + pbox = RegionRects(&GrabRegion); while(nbox--) { w = pbox->x2 - pbox->x1; @@ -1207,7 +1202,7 @@ XineramaGetImageData( if(sizeNeeded > size) { char *tmpdata = ScratchMem; - ScratchMem = xrealloc(ScratchMem, sizeNeeded); + ScratchMem = realloc(ScratchMem, sizeNeeded); if(ScratchMem) size = sizeNeeded; else { @@ -1216,10 +1211,10 @@ XineramaGetImageData( } } - x = pbox->x1 - pDraw->x - panoramiXdataPtr[i].x; - y = pbox->y1 - pDraw->y - panoramiXdataPtr[i].y; + x = pbox->x1 - pDraw->x - screenInfo.screens[i]->x; + y = pbox->y1 - pDraw->y - screenInfo.screens[i]->y; - (*pDraw->pScreen->GetImage)(pDraw, x, y, w, h, + (*pScreen->GetImage)(pDraw, x, y, w, h, format, planemask, ScratchMem); /* copy the memory over */ @@ -1274,16 +1269,15 @@ XineramaGetImageData( pbox++; } - REGION_SUBTRACT(pScreen, &SrcRegion, &SrcRegion, &GrabRegion); - if(!REGION_NOTEMPTY(pScreen, &SrcRegion)) + RegionSubtract(&SrcRegion, &SrcRegion, &GrabRegion); + if(!RegionNotEmpty(&SrcRegion)) break; } } - if(ScratchMem) - xfree(ScratchMem); + free(ScratchMem); - REGION_UNINIT(pScreen, &SrcRegion); - REGION_UNINIT(pScreen, &GrabRegion); + RegionUninit(&SrcRegion); + RegionUninit(&GrabRegion); } diff --git a/xserver/Xext/panoramiX.h b/xserver/Xext/panoramiX.h index cca4c5249..a8684f0d2 100644 --- a/xserver/Xext/panoramiX.h +++ b/xserver/Xext/panoramiX.h @@ -46,13 +46,6 @@ Equipment Corporation. #include "gcstruct.h" -typedef struct _PanoramiXData { - int x; - int y; - int width; - int height; -} PanoramiXData; - typedef struct _PanoramiXInfo { XID id ; } PanoramiXInfo; @@ -69,11 +62,9 @@ typedef struct { struct { Bool shared; } pix; -#ifdef RENDER struct { Bool root; } pict; -#endif char raw_data[4]; } u; } PanoramiXRes; @@ -82,19 +73,6 @@ typedef struct { #define FOR_NSCREENS_BACKWARD(j) for(j = PanoramiXNumScreens - 1; j >= 0; j--) #define FOR_NSCREENS(j) FOR_NSCREENS_FORWARD(j) -#define BREAK_IF(a) if ((a)) break -#define IF_RETURN(a,b) if ((a)) return (b) - -#define FORCE_ROOT(a) { \ - int _j; \ - for (_j = PanoramiXNumScreens - 1; _j; _j--) \ - if ((a).root == WindowTable[_j]->drawable.id) \ - break; \ - (a).rootX += panoramiXdataPtr[_j].x; \ - (a).rootY += panoramiXdataPtr[_j].y; \ - (a).root = WindowTable[0]->drawable.id; \ -} - #define IS_SHARED_PIXMAP(r) (((r)->type == XRT_PIXMAP) && (r)->u.pix.shared) #endif /* _PANORAMIX_H_ */ diff --git a/xserver/Xext/panoramiXprocs.c b/xserver/Xext/panoramiXprocs.c index 6834efb71..67b40304d 100644 --- a/xserver/Xext/panoramiXprocs.c +++ b/xserver/Xext/panoramiXprocs.c @@ -52,13 +52,6 @@ Equipment Corporation. #define INPUTONLY_LEGAL_MASK (CWWinGravity | CWEventMask | \ CWDontPropagate | CWOverrideRedirect | CWCursor ) -/* Various of the DIX function interfaces were not designed to allow - * the client->errorValue to be set on BadValue and other errors. - * Rather than changing interfaces and breaking untold code we introduce - * a new global that dispatch can use. - */ -extern XID clientErrorValue; /* XXX this is a kludge */ - int PanoramiXCreateWindow(ClientPtr client) { PanoramiXRes *parent, *newWin; @@ -81,7 +74,7 @@ int PanoramiXCreateWindow(ClientPtr client) result = dixLookupResourceByType((pointer *)&parent, stuff->parent, XRT_WINDOW, client, DixWriteAccess); if (result != Success) - return (result == BadValue) ? BadWindow : result; + return result; if(stuff->class == CopyFromParent) stuff->class = parent->u.win.class; @@ -96,7 +89,7 @@ int PanoramiXCreateWindow(ClientPtr client) result = dixLookupResourceByType((pointer *)&backPix, tmp, XRT_PIXMAP, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? BadPixmap : result; + return result; } } if ((Mask)stuff->mask & CWBorderPixmap) { @@ -106,7 +99,7 @@ int PanoramiXCreateWindow(ClientPtr client) result = dixLookupResourceByType((pointer *)&bordPix, tmp, XRT_PIXMAP, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? BadPixmap : result; + return result; } } if ((Mask)stuff->mask & CWColormap) { @@ -116,11 +109,11 @@ int PanoramiXCreateWindow(ClientPtr client) result = dixLookupResourceByType((pointer *)&cmap, tmp, XRT_COLORMAP, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? BadColor : result; + return result; } } - if(!(newWin = xalloc(sizeof(PanoramiXRes)))) + if(!(newWin = malloc(sizeof(PanoramiXRes)))) return BadAlloc; newWin->type = XRT_WINDOW; @@ -136,14 +129,14 @@ int PanoramiXCreateWindow(ClientPtr client) orig_visual = stuff->visual; orig_x = stuff->x; orig_y = stuff->y; - parentIsRoot = (stuff->parent == WindowTable[0]->drawable.id) || - (stuff->parent == savedScreenInfo[0].wid); + parentIsRoot = (stuff->parent == screenInfo.screens[0]->root->drawable.id) || + (stuff->parent == screenInfo.screens[0]->screensaver.wid); FOR_NSCREENS_BACKWARD(j) { stuff->wid = newWin->info[j].id; stuff->parent = parent->info[j].id; if (parentIsRoot) { - stuff->x = orig_x - panoramiXdataPtr[j].x; - stuff->y = orig_y - panoramiXdataPtr[j].y; + stuff->x = orig_x - screenInfo.screens[j]->x; + stuff->y = orig_y - screenInfo.screens[j]->y; } if (backPix) *((CARD32 *) &stuff[1] + pback_offset) = backPix->info[j].id; @@ -160,9 +153,9 @@ int PanoramiXCreateWindow(ClientPtr client) if (result == Success) AddResource(newWin->info[0].id, XRT_WINDOW, newWin); else - xfree(newWin); + free(newWin); - return (result); + return result; } @@ -186,7 +179,7 @@ int PanoramiXChangeWindowAttributes(ClientPtr client) result = dixLookupResourceByType((pointer *)&win, stuff->window, XRT_WINDOW, client, DixWriteAccess); if (result != Success) - return (result == BadValue) ? BadWindow : result; + return result; if((win->u.win.class == InputOnly) && (stuff->valueMask & (~INPUTONLY_LEGAL_MASK))) @@ -199,7 +192,7 @@ int PanoramiXChangeWindowAttributes(ClientPtr client) result = dixLookupResourceByType((pointer *)&backPix, tmp, XRT_PIXMAP, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? BadPixmap : result; + return result; } } if ((Mask)stuff->valueMask & CWBorderPixmap) { @@ -209,7 +202,7 @@ int PanoramiXChangeWindowAttributes(ClientPtr client) result = dixLookupResourceByType((pointer *)&bordPix, tmp, XRT_PIXMAP, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? BadPixmap : result; + return result; } } if ((Mask)stuff->valueMask & CWColormap) { @@ -219,7 +212,7 @@ int PanoramiXChangeWindowAttributes(ClientPtr client) result = dixLookupResourceByType((pointer *)&cmap, tmp, XRT_COLORMAP, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? BadColor : result; + return result; } } @@ -234,7 +227,7 @@ int PanoramiXChangeWindowAttributes(ClientPtr client) result = (*SavedProcVector[X_ChangeWindowAttributes])(client); } - return (result); + return result; } @@ -249,7 +242,7 @@ int PanoramiXDestroyWindow(ClientPtr client) result = dixLookupResourceByType((pointer *)&win, stuff->id, XRT_WINDOW, client, DixDestroyAccess); if (result != Success) - return (result == BadValue) ? BadWindow : result; + return result; FOR_NSCREENS_BACKWARD(j) { stuff->id = win->info[j].id; @@ -260,7 +253,7 @@ int PanoramiXDestroyWindow(ClientPtr client) /* Since ProcDestroyWindow is using FreeResource, it will free our resource for us on the last pass through the loop above */ - return (result); + return result; } @@ -275,7 +268,7 @@ int PanoramiXDestroySubwindows(ClientPtr client) result = dixLookupResourceByType((pointer *)&win, stuff->id, XRT_WINDOW, client, DixDestroyAccess); if (result != Success) - return (result == BadValue) ? BadWindow : result; + return result; FOR_NSCREENS_BACKWARD(j) { stuff->id = win->info[j].id; @@ -286,7 +279,7 @@ int PanoramiXDestroySubwindows(ClientPtr client) /* DestroySubwindows is using FreeResource which will free our resources for us on the last pass through the loop above */ - return (result); + return result; } @@ -301,7 +294,7 @@ int PanoramiXChangeSaveSet(ClientPtr client) result = dixLookupResourceByType((pointer *)&win, stuff->window, XRT_WINDOW, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? BadWindow : result; + return result; FOR_NSCREENS_BACKWARD(j) { stuff->window = win->info[j].id; @@ -309,7 +302,7 @@ int PanoramiXChangeSaveSet(ClientPtr client) if(result != Success) break; } - return (result); + return result; } @@ -326,29 +319,29 @@ int PanoramiXReparentWindow(ClientPtr client) result = dixLookupResourceByType((pointer *)&win, stuff->window, XRT_WINDOW, client, DixWriteAccess); if (result != Success) - return (result == BadValue) ? BadWindow : result; + return result; result = dixLookupResourceByType((pointer *)&parent, stuff->parent, XRT_WINDOW, client, DixWriteAccess); if (result != Success) - return (result == BadValue) ? BadWindow : result; + return result; x = stuff->x; y = stuff->y; - parentIsRoot = (stuff->parent == WindowTable[0]->drawable.id) || - (stuff->parent == savedScreenInfo[0].wid); + parentIsRoot = (stuff->parent == screenInfo.screens[0]->root->drawable.id) || + (stuff->parent == screenInfo.screens[0]->screensaver.wid); FOR_NSCREENS_BACKWARD(j) { stuff->window = win->info[j].id; stuff->parent = parent->info[j].id; if(parentIsRoot) { - stuff->x = x - panoramiXdataPtr[j].x; - stuff->y = y - panoramiXdataPtr[j].y; + stuff->x = x - screenInfo.screens[j]->x; + stuff->y = y - screenInfo.screens[j]->y; } result = (*SavedProcVector[X_ReparentWindow])(client); if(result != Success) break; } - return (result); + return result; } @@ -363,7 +356,7 @@ int PanoramiXMapWindow(ClientPtr client) result = dixLookupResourceByType((pointer *)&win, stuff->id, XRT_WINDOW, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? BadWindow : result; + return result; FOR_NSCREENS_FORWARD(j) { stuff->id = win->info[j].id; @@ -371,7 +364,7 @@ int PanoramiXMapWindow(ClientPtr client) if(result != Success) break; } - return (result); + return result; } @@ -386,7 +379,7 @@ int PanoramiXMapSubwindows(ClientPtr client) result = dixLookupResourceByType((pointer *)&win, stuff->id, XRT_WINDOW, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? BadWindow : result; + return result; FOR_NSCREENS_FORWARD(j) { stuff->id = win->info[j].id; @@ -394,7 +387,7 @@ int PanoramiXMapSubwindows(ClientPtr client) if(result != Success) break; } - return (result); + return result; } @@ -409,7 +402,7 @@ int PanoramiXUnmapWindow(ClientPtr client) result = dixLookupResourceByType((pointer *)&win, stuff->id, XRT_WINDOW, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? BadWindow : result; + return result; FOR_NSCREENS_FORWARD(j) { stuff->id = win->info[j].id; @@ -417,7 +410,7 @@ int PanoramiXUnmapWindow(ClientPtr client) if(result != Success) break; } - return (result); + return result; } @@ -432,7 +425,7 @@ int PanoramiXUnmapSubwindows(ClientPtr client) result = dixLookupResourceByType((pointer *)&win, stuff->id, XRT_WINDOW, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? BadWindow : result; + return result; FOR_NSCREENS_FORWARD(j) { stuff->id = win->info[j].id; @@ -440,7 +433,7 @@ int PanoramiXUnmapSubwindows(ClientPtr client) if(result != Success) break; } - return (result); + return result; } @@ -464,12 +457,12 @@ int PanoramiXConfigureWindow(ClientPtr client) result = dixLookupResourceByType((pointer *)&pWin, stuff->window, RT_WINDOW, client, DixWriteAccess); if (result != Success) - return (result == BadValue) ? BadWindow : result; + return result; result = dixLookupResourceByType((pointer *)&win, stuff->window, XRT_WINDOW, client, DixWriteAccess); if (result != Success) - return (result == BadValue) ? BadWindow : result; + return result; if ((Mask)stuff->mask & CWSibling) { XID tmp; @@ -478,12 +471,12 @@ int PanoramiXConfigureWindow(ClientPtr client) result = dixLookupResourceByType((pointer *)&sib, tmp, XRT_WINDOW, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? BadWindow : result; + return result; } } - if(pWin->parent && ((pWin->parent == WindowTable[0]) || - (pWin->parent->drawable.id == savedScreenInfo[0].wid))) + if(pWin->parent && ((pWin->parent == screenInfo.screens[0]->root) || + (pWin->parent->drawable.id == screenInfo.screens[0]->screensaver.wid))) { if ((Mask)stuff->mask & CWX) { x_offset = 0; @@ -502,14 +495,14 @@ int PanoramiXConfigureWindow(ClientPtr client) if(sib) *((CARD32 *) &stuff[1] + sib_offset) = sib->info[j].id; if(x_offset >= 0) - *((CARD32 *) &stuff[1] + x_offset) = x - panoramiXdataPtr[j].x; + *((CARD32 *) &stuff[1] + x_offset) = x - screenInfo.screens[j]->x; if(y_offset >= 0) - *((CARD32 *) &stuff[1] + y_offset) = y - panoramiXdataPtr[j].y; + *((CARD32 *) &stuff[1] + y_offset) = y - screenInfo.screens[j]->y; result = (*SavedProcVector[X_ConfigureWindow])(client); if(result != Success) break; } - return (result); + return result; } @@ -524,7 +517,7 @@ int PanoramiXCirculateWindow(ClientPtr client) result = dixLookupResourceByType((pointer *)&win, stuff->window, XRT_WINDOW, client, DixWriteAccess); if (result != Success) - return (result == BadValue) ? BadWindow : result; + return result; FOR_NSCREENS_FORWARD(j) { stuff->window = win->info[j].id; @@ -532,7 +525,7 @@ int PanoramiXCirculateWindow(ClientPtr client) if(result != Success) break; } - return (result); + return result; } @@ -551,7 +544,7 @@ int PanoramiXGetGeometry(ClientPtr client) rep.type = X_Reply; rep.length = 0; rep.sequenceNumber = client->sequence; - rep.root = WindowTable[0]->drawable.id; + rep.root = screenInfo.screens[0]->root->drawable.id; rep.depth = pDraw->depth; rep.width = pDraw->width; rep.height = pDraw->height; @@ -564,22 +557,22 @@ int PanoramiXGetGeometry(ClientPtr client) rep.width = root->pixWidth; rep.height = root->pixHeight; } else - if ((pDraw->type == UNDRAWABLE_WINDOW) || (pDraw->type == DRAWABLE_WINDOW)) + if (WindowDrawable(pDraw->type)) { WindowPtr pWin = (WindowPtr)pDraw; rep.x = pWin->origin.x - wBorderWidth (pWin); rep.y = pWin->origin.y - wBorderWidth (pWin); - if((pWin->parent == WindowTable[0]) || - (pWin->parent->drawable.id == savedScreenInfo[0].wid)) + if((pWin->parent == screenInfo.screens[0]->root) || + (pWin->parent->drawable.id == screenInfo.screens[0]->screensaver.wid)) { - rep.x += panoramiXdataPtr[0].x; - rep.y += panoramiXdataPtr[0].y; + rep.x += screenInfo.screens[0]->x; + rep.y += screenInfo.screens[0]->y; } rep.borderWidth = pWin->borderWidth; } WriteReplyToClient(client, sizeof(xGetGeometryReply), &rep); - return (client->noClientException); + return Success; } int PanoramiXTranslateCoords(ClientPtr client) @@ -603,11 +596,11 @@ int PanoramiXTranslateCoords(ClientPtr client) rep.sameScreen = xTrue; rep.child = None; - if((pWin == WindowTable[0]) || - (pWin->drawable.id == savedScreenInfo[0].wid)) + if((pWin == screenInfo.screens[0]->root) || + (pWin->drawable.id == screenInfo.screens[0]->screensaver.wid)) { - x = stuff->srcX - panoramiXdataPtr[0].x; - y = stuff->srcY - panoramiXdataPtr[0].y; + x = stuff->srcX - screenInfo.screens[0]->x; + y = stuff->srcY - screenInfo.screens[0]->y; } else { x = pWin->drawable.x + stuff->srcX; y = pWin->drawable.y + stuff->srcY; @@ -627,8 +620,7 @@ int PanoramiXTranslateCoords(ClientPtr client) * borderSize */ && (!wBoundingShape(pWin) || - POINT_IN_REGION(pWin->drawable.pScreen, - wBoundingShape(pWin), + RegionContainsPoint(wBoundingShape(pWin), x - pWin->drawable.x, y - pWin->drawable.y, &box)) ) @@ -641,15 +633,15 @@ int PanoramiXTranslateCoords(ClientPtr client) } rep.dstX = x - pDst->drawable.x; rep.dstY = y - pDst->drawable.y; - if((pDst == WindowTable[0]) || - (pDst->drawable.id == savedScreenInfo[0].wid)) + if((pDst == screenInfo.screens[0]->root) || + (pWin->drawable.id == screenInfo.screens[0]->screensaver.wid)) { - rep.dstX += panoramiXdataPtr[0].x; - rep.dstY += panoramiXdataPtr[0].y; + rep.dstX += screenInfo.screens[0]->x; + rep.dstY += screenInfo.screens[0]->y; } WriteReplyToClient(client, sizeof(xTranslateCoordsReply), &rep); - return(client->noClientException); + return Success; } int PanoramiXCreatePixmap(ClientPtr client) @@ -666,7 +658,7 @@ int PanoramiXCreatePixmap(ClientPtr client) if (result != Success) return (result == BadValue) ? BadDrawable : result; - if(!(newPix = xalloc(sizeof(PanoramiXRes)))) + if(!(newPix = malloc(sizeof(PanoramiXRes)))) return BadAlloc; newPix->type = XRT_PIXMAP; @@ -685,9 +677,9 @@ int PanoramiXCreatePixmap(ClientPtr client) if (result == Success) AddResource(newPix->info[0].id, XRT_PIXMAP, newPix); else - xfree(newPix); + free(newPix); - return (result); + return result; } @@ -704,7 +696,7 @@ int PanoramiXFreePixmap(ClientPtr client) result = dixLookupResourceByType((pointer *)&pix, stuff->id, XRT_PIXMAP, client, DixDestroyAccess); if (result != Success) - return (result == BadValue) ? BadPixmap : result; + return result; FOR_NSCREENS_BACKWARD(j) { stuff->id = pix->info[j].id; @@ -715,7 +707,7 @@ int PanoramiXFreePixmap(ClientPtr client) /* Since ProcFreePixmap is using FreeResource, it will free our resource for us on the last pass through the loop above */ - return (result); + return result; } @@ -749,7 +741,7 @@ int PanoramiXCreateGC(ClientPtr client) result = dixLookupResourceByType((pointer *)&tile, tmp, XRT_PIXMAP, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? BadPixmap : result; + return result; } } if ((Mask)stuff->mask & GCStipple) { @@ -758,7 +750,7 @@ int PanoramiXCreateGC(ClientPtr client) result = dixLookupResourceByType((pointer *)&stip, tmp, XRT_PIXMAP, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? BadPixmap : result; + return result; } } if ((Mask)stuff->mask & GCClipMask) { @@ -767,11 +759,11 @@ int PanoramiXCreateGC(ClientPtr client) result = dixLookupResourceByType((pointer *)&clip, tmp, XRT_PIXMAP, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? BadPixmap : result; + return result; } } - if(!(newGC = xalloc(sizeof(PanoramiXRes)))) + if(!(newGC = malloc(sizeof(PanoramiXRes)))) return BadAlloc; newGC->type = XRT_GC; @@ -795,9 +787,9 @@ int PanoramiXCreateGC(ClientPtr client) if (result == Success) AddResource(newGC->info[0].id, XRT_GC, newGC); else - xfree(newGC); + free(newGC); - return (result); + return result; } int PanoramiXChangeGC(ClientPtr client) @@ -820,7 +812,7 @@ int PanoramiXChangeGC(ClientPtr client) result = dixLookupResourceByType((pointer *)&gc, stuff->gc, XRT_GC, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? BadGC : result; + return result; if ((Mask)stuff->mask & GCTile) { tile_offset = Ones((Mask)stuff->mask & (GCTile - 1)); @@ -828,7 +820,7 @@ int PanoramiXChangeGC(ClientPtr client) result = dixLookupResourceByType((pointer *)&tile, tmp, XRT_PIXMAP, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? BadPixmap : result; + return result; } } if ((Mask)stuff->mask & GCStipple) { @@ -837,7 +829,7 @@ int PanoramiXChangeGC(ClientPtr client) result = dixLookupResourceByType((pointer *)&stip, tmp, XRT_PIXMAP, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? BadPixmap : result; + return result; } } if ((Mask)stuff->mask & GCClipMask) { @@ -846,7 +838,7 @@ int PanoramiXChangeGC(ClientPtr client) result = dixLookupResourceByType((pointer *)&clip, tmp, XRT_PIXMAP, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? BadPixmap : result; + return result; } } @@ -863,7 +855,7 @@ int PanoramiXChangeGC(ClientPtr client) if(result != Success) break; } - return (result); + return result; } @@ -878,12 +870,12 @@ int PanoramiXCopyGC(ClientPtr client) result = dixLookupResourceByType((pointer *)&srcGC, stuff->srcGC, XRT_GC, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? BadGC : result; + return result; result = dixLookupResourceByType((pointer *)&dstGC, stuff->dstGC, XRT_GC, client, DixWriteAccess); if (result != Success) - return (result == BadValue) ? BadGC : result; + return result; FOR_NSCREENS(j) { stuff->srcGC = srcGC->info[j].id; @@ -892,7 +884,7 @@ int PanoramiXCopyGC(ClientPtr client) if(result != Success) break; } - return (result); + return result; } @@ -907,7 +899,7 @@ int PanoramiXSetDashes(ClientPtr client) result = dixLookupResourceByType((pointer *)&gc, stuff->gc, XRT_GC, client, DixWriteAccess); if (result != Success) - return (result == BadValue) ? BadGC : result; + return result; FOR_NSCREENS_BACKWARD(j) { stuff->gc = gc->info[j].id; @@ -915,7 +907,7 @@ int PanoramiXSetDashes(ClientPtr client) if(result != Success) break; } - return (result); + return result; } @@ -930,7 +922,7 @@ int PanoramiXSetClipRectangles(ClientPtr client) result = dixLookupResourceByType((pointer *)&gc, stuff->gc, XRT_GC, client, DixWriteAccess); if (result != Success) - return (result == BadValue) ? BadGC : result; + return result; FOR_NSCREENS_BACKWARD(j) { stuff->gc = gc->info[j].id; @@ -938,7 +930,7 @@ int PanoramiXSetClipRectangles(ClientPtr client) if(result != Success) break; } - return (result); + return result; } @@ -953,7 +945,7 @@ int PanoramiXFreeGC(ClientPtr client) result = dixLookupResourceByType((pointer *)&gc, stuff->id, XRT_GC, client, DixDestroyAccess); if (result != Success) - return (result == BadValue) ? BadGC : result; + return result; FOR_NSCREENS_BACKWARD(j) { stuff->id = gc->info[j].id; @@ -964,7 +956,7 @@ int PanoramiXFreeGC(ClientPtr client) /* Since ProcFreeGC is using FreeResource, it will free our resource for us on the last pass through the loop above */ - return (result); + return result; } @@ -980,7 +972,7 @@ int PanoramiXClearToBackground(ClientPtr client) result = dixLookupResourceByType((pointer *)&win, stuff->window, XRT_WINDOW, client, DixWriteAccess); if (result != Success) - return (result == BadValue) ? BadWindow : result; + return result; x = stuff->x; y = stuff->y; @@ -988,14 +980,14 @@ int PanoramiXClearToBackground(ClientPtr client) FOR_NSCREENS_BACKWARD(j) { stuff->window = win->info[j].id; if(isRoot) { - stuff->x = x - panoramiXdataPtr[j].x; - stuff->y = y - panoramiXdataPtr[j].y; + stuff->x = x - screenInfo.screens[j]->x; + stuff->y = y - screenInfo.screens[j]->y; } result = (*SavedProcVector[X_ClearArea])(client); if(result != Success) break; } - return (result); + return result; } @@ -1040,7 +1032,7 @@ int PanoramiXCopyArea(ClientPtr client) result = dixLookupResourceByType((pointer *)&gc, stuff->gc, XRT_GC, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? BadGC : result; + return result; if((dst->type == XRT_WINDOW) && dst->u.win.root) dstIsRoot = TRUE; @@ -1064,7 +1056,7 @@ int PanoramiXCopyArea(ClientPtr client) } pitch = PixmapBytePad(stuff->width, drawables[0]->depth); - if(!(data = xcalloc(1, stuff->height * pitch))) + if(!(data = calloc(1, stuff->height * pitch))) return BadAlloc; XineramaGetImageData(drawables, srcx, srcy, @@ -1076,8 +1068,8 @@ int PanoramiXCopyArea(ClientPtr client) VALIDATE_DRAWABLE_AND_GC(dst->info[j].id, pDst, DixWriteAccess); if(drawables[0]->depth != pDst->depth) { client->errorValue = stuff->dstDrawable; - xfree(data); - return (BadMatch); + free(data); + return BadMatch; } (*pGC->ops->PutImage) (pDst, pGC, pDst->depth, dstx, dsty, @@ -1087,26 +1079,26 @@ int PanoramiXCopyArea(ClientPtr client) if(dstShared) break; } - xfree(data); - - result = Success; + free(data); } else { DrawablePtr pDst = NULL, pSrc = NULL; GCPtr pGC = NULL; - RegionPtr pRgn[MAXSCREENS]; + RegionRec totalReg; int rc; + RegionNull(&totalReg); FOR_NSCREENS_BACKWARD(j) { + RegionPtr pRgn; stuff->dstDrawable = dst->info[j].id; stuff->srcDrawable = src->info[j].id; stuff->gc = gc->info[j].id; if (srcIsRoot) { - stuff->srcX = srcx - panoramiXdataPtr[j].x; - stuff->srcY = srcy - panoramiXdataPtr[j].y; + stuff->srcX = srcx - screenInfo.screens[j]->x; + stuff->srcY = srcy - screenInfo.screens[j]->y; } if (dstIsRoot) { - stuff->dstX = dstx - panoramiXdataPtr[j].x; - stuff->dstY = dsty - panoramiXdataPtr[j].y; + stuff->dstX = dstx - screenInfo.screens[j]->x; + stuff->dstY = dsty - screenInfo.screens[j]->y; } VALIDATE_DRAWABLE_AND_GC(stuff->dstDrawable, pDst, DixWriteAccess); @@ -1120,48 +1112,38 @@ int PanoramiXCopyArea(ClientPtr client) if ((pDst->pScreen != pSrc->pScreen) || (pDst->depth != pSrc->depth)) { client->errorValue = stuff->dstDrawable; - return (BadMatch); + return BadMatch; } } else pSrc = pDst; - pRgn[j] = (*pGC->ops->CopyArea)(pSrc, pDst, pGC, + pRgn = (*pGC->ops->CopyArea)(pSrc, pDst, pGC, stuff->srcX, stuff->srcY, stuff->width, stuff->height, stuff->dstX, stuff->dstY); - - if(dstShared) { - while(j--) pRgn[j] = NULL; - break; + if(pGC->graphicsExposures && pRgn) { + if(srcIsRoot) { + RegionTranslate(pRgn, + screenInfo.screens[j]->x, screenInfo.screens[j]->y); + } + RegionAppend(&totalReg, pRgn); + RegionDestroy(pRgn); } + + if(dstShared) + break; } if(pGC->graphicsExposures) { - ScreenPtr pScreen = pDst->pScreen; - RegionRec totalReg; Bool overlap; - - REGION_NULL(pScreen, &totalReg); - FOR_NSCREENS_BACKWARD(j) { - if(pRgn[j]) { - if(srcIsRoot) { - REGION_TRANSLATE(pScreen, pRgn[j], - panoramiXdataPtr[j].x, panoramiXdataPtr[j].y); - } - REGION_APPEND(pScreen, &totalReg, pRgn[j]); - REGION_DESTROY(pScreen, pRgn[j]); - } - } - REGION_VALIDATE(pScreen, &totalReg, &overlap); - (*pScreen->SendGraphicsExpose)( + RegionValidate(&totalReg, &overlap); + (*pDst->pScreen->SendGraphicsExpose)( client, &totalReg, stuff->dstDrawable, X_CopyArea, 0); - REGION_UNINIT(pScreen, &totalReg); + RegionUninit(&totalReg); } - - result = client->noClientException; } - return (result); + return Success; } @@ -1174,7 +1156,7 @@ int PanoramiXCopyPlane(ClientPtr client) Bool srcShared, dstShared; DrawablePtr psrcDraw, pdstDraw = NULL; GCPtr pGC = NULL; - RegionPtr pRgn[MAXSCREENS]; + RegionRec totalReg; REQUEST(xCopyPlaneReq); REQUEST_SIZE_MATCH(xCopyPlaneReq); @@ -1199,7 +1181,7 @@ int PanoramiXCopyPlane(ClientPtr client) rc = dixLookupResourceByType((pointer *)&gc, stuff->gc, XRT_GC, client, DixReadAccess); if (rc != Success) - return (rc == BadValue) ? BadGC : rc; + return rc; if((dst->type == XRT_WINDOW) && dst->u.win.root) dstIsRoot = TRUE; @@ -1209,17 +1191,19 @@ int PanoramiXCopyPlane(ClientPtr client) srcx = stuff->srcX; srcy = stuff->srcY; dstx = stuff->dstX; dsty = stuff->dstY; + RegionNull(&totalReg); FOR_NSCREENS_BACKWARD(j) { + RegionPtr pRgn; stuff->dstDrawable = dst->info[j].id; stuff->srcDrawable = src->info[j].id; stuff->gc = gc->info[j].id; if (srcIsRoot) { - stuff->srcX = srcx - panoramiXdataPtr[j].x; - stuff->srcY = srcy - panoramiXdataPtr[j].y; + stuff->srcX = srcx - screenInfo.screens[j]->x; + stuff->srcY = srcy - screenInfo.screens[j]->y; } if (dstIsRoot) { - stuff->dstX = dstx - panoramiXdataPtr[j].x; - stuff->dstY = dsty - panoramiXdataPtr[j].y; + stuff->dstX = dstx - screenInfo.screens[j]->x; + stuff->dstY = dsty - screenInfo.screens[j]->y; } VALIDATE_DRAWABLE_AND_GC(stuff->dstDrawable, pdstDraw, DixWriteAccess); @@ -1231,7 +1215,7 @@ int PanoramiXCopyPlane(ClientPtr client) if (pdstDraw->pScreen != psrcDraw->pScreen) { client->errorValue = stuff->dstDrawable; - return (BadMatch); + return BadMatch; } } else psrcDraw = pdstDraw; @@ -1239,39 +1223,31 @@ int PanoramiXCopyPlane(ClientPtr client) if(stuff->bitPlane == 0 || (stuff->bitPlane & (stuff->bitPlane - 1)) || (stuff->bitPlane > (1L << (psrcDraw->depth - 1)))) { client->errorValue = stuff->bitPlane; - return(BadValue); + return BadValue; } - pRgn[j] = (*pGC->ops->CopyPlane)(psrcDraw, pdstDraw, pGC, + pRgn = (*pGC->ops->CopyPlane)(psrcDraw, pdstDraw, pGC, stuff->srcX, stuff->srcY, stuff->width, stuff->height, stuff->dstX, stuff->dstY, stuff->bitPlane); - - if(dstShared) { - while(j--) pRgn[j] = NULL; - break; + if(pGC->graphicsExposures && pRgn) { + RegionAppend(&totalReg, pRgn); + RegionDestroy(pRgn); } + + if(dstShared) + break; } if(pGC->graphicsExposures) { - ScreenPtr pScreen = pdstDraw->pScreen; - RegionRec totalReg; Bool overlap; - - REGION_NULL(pScreen, &totalReg); - FOR_NSCREENS_BACKWARD(j) { - if(pRgn[j]) { - REGION_APPEND(pScreen, &totalReg, pRgn[j]); - REGION_DESTROY(pScreen, pRgn[j]); - } - } - REGION_VALIDATE(pScreen, &totalReg, &overlap); - (*pScreen->SendGraphicsExpose)( + RegionValidate(&totalReg, &overlap); + (*pdstDraw->pScreen->SendGraphicsExpose)( client, &totalReg, stuff->dstDrawable, X_CopyPlane, 0); - REGION_UNINIT(pScreen, &totalReg); + RegionUninit(&totalReg); } - return (client->noClientException); + return Success; } @@ -1296,20 +1272,20 @@ int PanoramiXPolyPoint(ClientPtr client) result = dixLookupResourceByType((pointer *)&gc, stuff->gc, XRT_GC, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? BadGC : result; + return result; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; npoint = bytes_to_int32((client->req_len << 2) - sizeof(xPolyPointReq)); if (npoint > 0) { - origPts = xalloc(npoint * sizeof(xPoint)); + origPts = malloc(npoint * sizeof(xPoint)); memcpy((char *) origPts, (char *) &stuff[1], npoint * sizeof(xPoint)); FOR_NSCREENS_FORWARD(j){ if(j) memcpy(&stuff[1], origPts, npoint * sizeof(xPoint)); if (isRoot) { - int x_off = panoramiXdataPtr[j].x; - int y_off = panoramiXdataPtr[j].y; + int x_off = screenInfo.screens[j]->x; + int y_off = screenInfo.screens[j]->y; if(x_off || y_off) { xPoint *pnts = (xPoint*)&stuff[1]; @@ -1328,10 +1304,10 @@ int PanoramiXPolyPoint(ClientPtr client) result = (* SavedProcVector[X_PolyPoint])(client); if(result != Success) break; } - xfree(origPts); - return (result); + free(origPts); + return result; } else - return (client->noClientException); + return Success; } @@ -1356,20 +1332,20 @@ int PanoramiXPolyLine(ClientPtr client) result = dixLookupResourceByType((pointer *)&gc, stuff->gc, XRT_GC, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? BadGC : result; + return result; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; npoint = bytes_to_int32((client->req_len << 2) - sizeof(xPolyLineReq)); if (npoint > 0){ - origPts = xalloc(npoint * sizeof(xPoint)); + origPts = malloc(npoint * sizeof(xPoint)); memcpy((char *) origPts, (char *) &stuff[1], npoint * sizeof(xPoint)); FOR_NSCREENS_FORWARD(j){ if(j) memcpy(&stuff[1], origPts, npoint * sizeof(xPoint)); if (isRoot) { - int x_off = panoramiXdataPtr[j].x; - int y_off = panoramiXdataPtr[j].y; + int x_off = screenInfo.screens[j]->x; + int y_off = screenInfo.screens[j]->y; if(x_off || y_off) { xPoint *pnts = (xPoint*)&stuff[1]; @@ -1388,10 +1364,10 @@ int PanoramiXPolyLine(ClientPtr client) result = (* SavedProcVector[X_PolyLine])(client); if(result != Success) break; } - xfree(origPts); - return (result); + free(origPts); + return result; } else - return (client->noClientException); + return Success; } @@ -1416,7 +1392,7 @@ int PanoramiXPolySegment(ClientPtr client) result = dixLookupResourceByType((pointer *)&gc, stuff->gc, XRT_GC, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? BadGC : result; + return result; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; @@ -1424,15 +1400,15 @@ int PanoramiXPolySegment(ClientPtr client) if(nsegs & 4) return BadLength; nsegs >>= 3; if (nsegs > 0) { - origSegs = xalloc(nsegs * sizeof(xSegment)); + origSegs = malloc(nsegs * sizeof(xSegment)); memcpy((char *) origSegs, (char *) &stuff[1], nsegs * sizeof(xSegment)); FOR_NSCREENS_FORWARD(j){ if(j) memcpy(&stuff[1], origSegs, nsegs * sizeof(xSegment)); if (isRoot) { - int x_off = panoramiXdataPtr[j].x; - int y_off = panoramiXdataPtr[j].y; + int x_off = screenInfo.screens[j]->x; + int y_off = screenInfo.screens[j]->y; if(x_off || y_off) { xSegment *segs = (xSegment*)&stuff[1]; @@ -1451,10 +1427,10 @@ int PanoramiXPolySegment(ClientPtr client) result = (* SavedProcVector[X_PolySegment])(client); if(result != Success) break; } - xfree(origSegs); - return (result); + free(origSegs); + return result; } else - return (client->noClientException); + return Success; } @@ -1479,7 +1455,7 @@ int PanoramiXPolyRectangle(ClientPtr client) result = dixLookupResourceByType((pointer *)&gc, stuff->gc, XRT_GC, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? BadGC : result; + return result; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; @@ -1487,15 +1463,15 @@ int PanoramiXPolyRectangle(ClientPtr client) if(nrects & 4) return BadLength; nrects >>= 3; if (nrects > 0){ - origRecs = xalloc(nrects * sizeof(xRectangle)); + origRecs = malloc(nrects * sizeof(xRectangle)); memcpy((char *)origRecs,(char *)&stuff[1],nrects * sizeof(xRectangle)); FOR_NSCREENS_FORWARD(j){ if(j) memcpy(&stuff[1], origRecs, nrects * sizeof(xRectangle)); if (isRoot) { - int x_off = panoramiXdataPtr[j].x; - int y_off = panoramiXdataPtr[j].y; + int x_off = screenInfo.screens[j]->x; + int y_off = screenInfo.screens[j]->y; if(x_off || y_off) { @@ -1513,10 +1489,10 @@ int PanoramiXPolyRectangle(ClientPtr client) result = (* SavedProcVector[X_PolyRectangle])(client); if(result != Success) break; } - xfree(origRecs); - return (result); + free(origRecs); + return result; } else - return (client->noClientException); + return Success; } @@ -1541,7 +1517,7 @@ int PanoramiXPolyArc(ClientPtr client) result = dixLookupResourceByType((pointer *)&gc, stuff->gc, XRT_GC, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? BadGC : result; + return result; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; @@ -1549,15 +1525,15 @@ int PanoramiXPolyArc(ClientPtr client) if(narcs % sizeof(xArc)) return BadLength; narcs /= sizeof(xArc); if (narcs > 0){ - origArcs = xalloc(narcs * sizeof(xArc)); + origArcs = malloc(narcs * sizeof(xArc)); memcpy((char *) origArcs, (char *) &stuff[1], narcs * sizeof(xArc)); FOR_NSCREENS_FORWARD(j){ if(j) memcpy(&stuff[1], origArcs, narcs * sizeof(xArc)); if (isRoot) { - int x_off = panoramiXdataPtr[j].x; - int y_off = panoramiXdataPtr[j].y; + int x_off = screenInfo.screens[j]->x; + int y_off = screenInfo.screens[j]->y; if(x_off || y_off) { xArc *arcs = (xArc *) &stuff[1]; @@ -1573,10 +1549,10 @@ int PanoramiXPolyArc(ClientPtr client) result = (* SavedProcVector[X_PolyArc])(client); if(result != Success) break; } - xfree(origArcs); - return (result); + free(origArcs); + return result; } else - return (client->noClientException); + return Success; } @@ -1601,21 +1577,21 @@ int PanoramiXFillPoly(ClientPtr client) result = dixLookupResourceByType((pointer *)&gc, stuff->gc, XRT_GC, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? BadGC : result; + return result; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; count = bytes_to_int32((client->req_len << 2) - sizeof(xFillPolyReq)); if (count > 0){ - locPts = xalloc(count * sizeof(DDXPointRec)); + locPts = malloc(count * sizeof(DDXPointRec)); memcpy((char *)locPts, (char *)&stuff[1], count * sizeof(DDXPointRec)); FOR_NSCREENS_FORWARD(j){ if(j) memcpy(&stuff[1], locPts, count * sizeof(DDXPointRec)); if (isRoot) { - int x_off = panoramiXdataPtr[j].x; - int y_off = panoramiXdataPtr[j].y; + int x_off = screenInfo.screens[j]->x; + int y_off = screenInfo.screens[j]->y; if(x_off || y_off) { DDXPointPtr pnts = (DDXPointPtr)&stuff[1]; @@ -1634,10 +1610,10 @@ int PanoramiXFillPoly(ClientPtr client) result = (* SavedProcVector[X_FillPoly])(client); if(result != Success) break; } - xfree(locPts); - return (result); + free(locPts); + return result; } else - return (client->noClientException); + return Success; } @@ -1662,7 +1638,7 @@ int PanoramiXPolyFillRectangle(ClientPtr client) result = dixLookupResourceByType((pointer *)&gc, stuff->gc, XRT_GC, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? BadGC : result; + return result; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; @@ -1670,15 +1646,15 @@ int PanoramiXPolyFillRectangle(ClientPtr client) if(things & 4) return BadLength; things >>= 3; if (things > 0){ - origRects = xalloc(things * sizeof(xRectangle)); + origRects = malloc(things * sizeof(xRectangle)); memcpy((char*)origRects,(char*)&stuff[1], things * sizeof(xRectangle)); FOR_NSCREENS_FORWARD(j){ if(j) memcpy(&stuff[1], origRects, things * sizeof(xRectangle)); if (isRoot) { - int x_off = panoramiXdataPtr[j].x; - int y_off = panoramiXdataPtr[j].y; + int x_off = screenInfo.screens[j]->x; + int y_off = screenInfo.screens[j]->y; if(x_off || y_off) { xRectangle *rects = (xRectangle *) &stuff[1]; @@ -1695,10 +1671,10 @@ int PanoramiXPolyFillRectangle(ClientPtr client) result = (* SavedProcVector[X_PolyFillRectangle])(client); if(result != Success) break; } - xfree(origRects); - return (result); + free(origRects); + return result; } else - return (client->noClientException); + return Success; } @@ -1723,23 +1699,23 @@ int PanoramiXPolyFillArc(ClientPtr client) result = dixLookupResourceByType((pointer *)&gc, stuff->gc, XRT_GC, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? BadGC : result; + return result; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; narcs = (client->req_len << 2) - sizeof(xPolyFillArcReq); - IF_RETURN((narcs % sizeof(xArc)), BadLength); + if (narcs % sizeof(xArc)) return BadLength; narcs /= sizeof(xArc); if (narcs > 0) { - origArcs = xalloc(narcs * sizeof(xArc)); + origArcs = malloc(narcs * sizeof(xArc)); memcpy((char *) origArcs, (char *)&stuff[1], narcs * sizeof(xArc)); FOR_NSCREENS_FORWARD(j){ if(j) memcpy(&stuff[1], origArcs, narcs * sizeof(xArc)); if (isRoot) { - int x_off = panoramiXdataPtr[j].x; - int y_off = panoramiXdataPtr[j].y; + int x_off = screenInfo.screens[j]->x; + int y_off = screenInfo.screens[j]->y; if(x_off || y_off) { xArc *arcs = (xArc *) &stuff[1]; @@ -1756,10 +1732,10 @@ int PanoramiXPolyFillArc(ClientPtr client) result = (* SavedProcVector[X_PolyFillArc])(client); if(result != Success) break; } - xfree(origArcs); - return (result); + free(origArcs); + return result; } else - return (client->noClientException); + return Success; } @@ -1783,7 +1759,7 @@ int PanoramiXPutImage(ClientPtr client) result = dixLookupResourceByType((pointer *)&gc, stuff->gc, XRT_GC, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? BadGC : result; + return result; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; @@ -1791,15 +1767,15 @@ int PanoramiXPutImage(ClientPtr client) orig_y = stuff->dstY; FOR_NSCREENS_BACKWARD(j){ if (isRoot) { - stuff->dstX = orig_x - panoramiXdataPtr[j].x; - stuff->dstY = orig_y - panoramiXdataPtr[j].y; + stuff->dstX = orig_x - screenInfo.screens[j]->x; + stuff->dstY = orig_y - screenInfo.screens[j]->y; } stuff->drawable = draw->info[j].id; stuff->gc = gc->info[j].id; result = (* SavedProcVector[X_PutImage])(client); if(result != Success) break; } - return (result); + return result; } @@ -1822,7 +1798,7 @@ int PanoramiXGetImage(ClientPtr client) if ((stuff->format != XYPixmap) && (stuff->format != ZPixmap)) { client->errorValue = stuff->format; - return(BadValue); + return BadValue; } rc = dixLookupResourceByClass((pointer *)&draw, stuff->drawable, @@ -1839,7 +1815,7 @@ int PanoramiXGetImage(ClientPtr client) return rc; if(!((WindowPtr)pDraw)->realized) - return(BadMatch); + return BadMatch; x = stuff->x; y = stuff->y; @@ -1854,19 +1830,19 @@ int PanoramiXGetImage(ClientPtr client) if( /* check for being onscreen */ x < 0 || x + w > PanoramiXPixWidth || y < 0 || y + h > PanoramiXPixHeight ) - return(BadMatch); + return BadMatch; } else { if( /* check for being onscreen */ - panoramiXdataPtr[0].x + pDraw->x + x < 0 || - panoramiXdataPtr[0].x + pDraw->x + x + w > PanoramiXPixWidth || - panoramiXdataPtr[0].y + pDraw->y + y < 0 || - panoramiXdataPtr[0].y + pDraw->y + y + h > PanoramiXPixHeight || + screenInfo.screens[0]->x + pDraw->x + x < 0 || + screenInfo.screens[0]->x + pDraw->x + x + w > PanoramiXPixWidth || + screenInfo.screens[0]->y + pDraw->y + y < 0 || + screenInfo.screens[0]->y + pDraw->y + y + h > PanoramiXPixHeight || /* check for being inside of border */ x < - wBorderWidth((WindowPtr)pDraw) || x + w > wBorderWidth((WindowPtr)pDraw) + (int)pDraw->width || y < -wBorderWidth((WindowPtr)pDraw) || y + h > wBorderWidth ((WindowPtr)pDraw) + (int)pDraw->height) - return(BadMatch); + return BadMatch; } drawables[0] = pDraw; @@ -1907,8 +1883,8 @@ int PanoramiXGetImage(ClientPtr client) linesPerBuf = h; } length = linesPerBuf * widthBytesLine; - if(!(pBuf = xalloc(length))) - return (BadAlloc); + if(!(pBuf = malloc(length))) + return BadAlloc; WriteReplyToClient(client, sizeof (xGetImageReply), &xgi); @@ -1921,7 +1897,7 @@ int PanoramiXGetImage(ClientPtr client) nlines = min(linesPerBuf, h - linesDone); if(pDraw->depth == 1) - bzero(pBuf, nlines * widthBytesLine); + memset(pBuf, 0, nlines * widthBytesLine); XineramaGetImageData(drawables, x, y + linesDone, w, nlines, format, planemask, pBuf, widthBytesLine, isRoot); @@ -1938,7 +1914,7 @@ int PanoramiXGetImage(ClientPtr client) while (h - linesDone > 0) { nlines = min(linesPerBuf, h - linesDone); - bzero(pBuf, nlines * widthBytesLine); + memset(pBuf, 0, nlines * widthBytesLine); XineramaGetImageData(drawables, x, y + linesDone, w, nlines, format, plane, pBuf, @@ -1953,8 +1929,8 @@ int PanoramiXGetImage(ClientPtr client) } } } - xfree(pBuf); - return (client->noClientException); + free(pBuf); + return Success; } @@ -1984,7 +1960,7 @@ PanoramiXPolyText8(ClientPtr client) result = dixLookupResourceByType((pointer *)&gc, stuff->gc, XRT_GC, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? BadGC : result; + return result; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; @@ -1994,13 +1970,13 @@ PanoramiXPolyText8(ClientPtr client) stuff->drawable = draw->info[j].id; stuff->gc = gc->info[j].id; if (isRoot) { - stuff->x = orig_x - panoramiXdataPtr[j].x; - stuff->y = orig_y - panoramiXdataPtr[j].y; + stuff->x = orig_x - screenInfo.screens[j]->x; + stuff->y = orig_y - screenInfo.screens[j]->y; } result = (*SavedProcVector[X_PolyText8])(client); if(result != Success) break; } - return (result); + return result; } int @@ -2025,7 +2001,7 @@ PanoramiXPolyText16(ClientPtr client) result = dixLookupResourceByType((pointer *)&gc, stuff->gc, XRT_GC, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? BadGC : result; + return result; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; @@ -2035,13 +2011,13 @@ PanoramiXPolyText16(ClientPtr client) stuff->drawable = draw->info[j].id; stuff->gc = gc->info[j].id; if (isRoot) { - stuff->x = orig_x - panoramiXdataPtr[j].x; - stuff->y = orig_y - panoramiXdataPtr[j].y; + stuff->x = orig_x - screenInfo.screens[j]->x; + stuff->y = orig_y - screenInfo.screens[j]->y; } result = (*SavedProcVector[X_PolyText16])(client); if(result != Success) break; } - return (result); + return result; } @@ -2066,7 +2042,7 @@ int PanoramiXImageText8(ClientPtr client) result = dixLookupResourceByType((pointer *)&gc, stuff->gc, XRT_GC, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? BadGC : result; + return result; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; @@ -2076,13 +2052,13 @@ int PanoramiXImageText8(ClientPtr client) stuff->drawable = draw->info[j].id; stuff->gc = gc->info[j].id; if (isRoot) { - stuff->x = orig_x - panoramiXdataPtr[j].x; - stuff->y = orig_y - panoramiXdataPtr[j].y; + stuff->x = orig_x - screenInfo.screens[j]->x; + stuff->y = orig_y - screenInfo.screens[j]->y; } result = (*SavedProcVector[X_ImageText8])(client); if(result != Success) break; } - return (result); + return result; } @@ -2107,7 +2083,7 @@ int PanoramiXImageText16(ClientPtr client) result = dixLookupResourceByType((pointer *)&gc, stuff->gc, XRT_GC, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? BadGC : result; + return result; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; @@ -2117,13 +2093,13 @@ int PanoramiXImageText16(ClientPtr client) stuff->drawable = draw->info[j].id; stuff->gc = gc->info[j].id; if (isRoot) { - stuff->x = orig_x - panoramiXdataPtr[j].x; - stuff->y = orig_y - panoramiXdataPtr[j].y; + stuff->x = orig_x - screenInfo.screens[j]->x; + stuff->y = orig_y - screenInfo.screens[j]->y; } result = (*SavedProcVector[X_ImageText16])(client); if(result != Success) break; } - return (result); + return result; } @@ -2139,9 +2115,9 @@ int PanoramiXCreateColormap(ClientPtr client) result = dixLookupResourceByType((pointer *)&win, stuff->window, XRT_WINDOW, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? BadWindow : result; + return result; - if(!(newCmap = xalloc(sizeof(PanoramiXRes)))) + if(!(newCmap = malloc(sizeof(PanoramiXRes)))) return BadAlloc; newCmap->type = XRT_COLORMAP; @@ -2161,9 +2137,9 @@ int PanoramiXCreateColormap(ClientPtr client) if (result == Success) AddResource(newCmap->info[0].id, XRT_COLORMAP, newCmap); else - xfree(newCmap); + free(newCmap); - return (result); + return result; } @@ -2180,7 +2156,7 @@ int PanoramiXFreeColormap(ClientPtr client) result = dixLookupResourceByType((pointer *)&cmap, stuff->id, XRT_COLORMAP, client, DixDestroyAccess); if (result != Success) - return (result == BadValue) ? BadColor : result; + return result; FOR_NSCREENS_BACKWARD(j) { stuff->id = cmap->info[j].id; @@ -2191,7 +2167,7 @@ int PanoramiXFreeColormap(ClientPtr client) /* Since ProcFreeColormap is using FreeResource, it will free our resource for us on the last pass through the loop above */ - return (result); + return result; } @@ -2210,9 +2186,9 @@ PanoramiXCopyColormapAndFree(ClientPtr client) XRT_COLORMAP, client, DixReadAccess | DixWriteAccess); if (result != Success) - return (result == BadValue) ? BadColor : result; + return result; - if(!(newCmap = xalloc(sizeof(PanoramiXRes)))) + if(!(newCmap = malloc(sizeof(PanoramiXRes)))) return BadAlloc; newCmap->type = XRT_COLORMAP; @@ -2230,9 +2206,9 @@ PanoramiXCopyColormapAndFree(ClientPtr client) if (result == Success) AddResource(newCmap->info[0].id, XRT_COLORMAP, newCmap); else - xfree(newCmap); + free(newCmap); - return (result); + return result; } @@ -2249,14 +2225,14 @@ int PanoramiXInstallColormap(ClientPtr client) result = dixLookupResourceByType((pointer *)&cmap, stuff->id, XRT_COLORMAP, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? BadColor : result; + return result; FOR_NSCREENS_BACKWARD(j){ stuff->id = cmap->info[j].id; result = (* SavedProcVector[X_InstallColormap])(client); if(result != Success) break; } - return (result); + return result; } @@ -2273,14 +2249,14 @@ int PanoramiXUninstallColormap(ClientPtr client) result = dixLookupResourceByType((pointer *)&cmap, stuff->id, XRT_COLORMAP, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? BadColor : result; + return result; FOR_NSCREENS_BACKWARD(j) { stuff->id = cmap->info[j].id; result = (* SavedProcVector[X_UninstallColormap])(client); if(result != Success) break; } - return (result); + return result; } @@ -2297,14 +2273,14 @@ int PanoramiXAllocColor(ClientPtr client) result = dixLookupResourceByType((pointer *)&cmap, stuff->cmap, XRT_COLORMAP, client, DixWriteAccess); if (result != Success) - return (result == BadValue) ? BadColor : result; + return result; FOR_NSCREENS_BACKWARD(j){ stuff->cmap = cmap->info[j].id; result = (* SavedProcVector[X_AllocColor])(client); if(result != Success) break; } - return (result); + return result; } @@ -2321,14 +2297,14 @@ int PanoramiXAllocNamedColor(ClientPtr client) result = dixLookupResourceByType((pointer *)&cmap, stuff->cmap, XRT_COLORMAP, client, DixWriteAccess); if (result != Success) - return (result == BadValue) ? BadColor : result; + return result; FOR_NSCREENS_BACKWARD(j){ stuff->cmap = cmap->info[j].id; result = (* SavedProcVector[X_AllocNamedColor])(client); if(result != Success) break; } - return (result); + return result; } @@ -2345,14 +2321,14 @@ int PanoramiXAllocColorCells(ClientPtr client) result = dixLookupResourceByType((pointer *)&cmap, stuff->cmap, XRT_COLORMAP, client, DixWriteAccess); if (result != Success) - return (result == BadValue) ? BadColor : result; + return result; FOR_NSCREENS_BACKWARD(j){ stuff->cmap = cmap->info[j].id; result = (* SavedProcVector[X_AllocColorCells])(client); if(result != Success) break; } - return (result); + return result; } @@ -2369,14 +2345,14 @@ int PanoramiXAllocColorPlanes(ClientPtr client) result = dixLookupResourceByType((pointer *)&cmap, stuff->cmap, XRT_COLORMAP, client, DixWriteAccess); if (result != Success) - return (result == BadValue) ? BadColor : result; + return result; FOR_NSCREENS_BACKWARD(j){ stuff->cmap = cmap->info[j].id; result = (* SavedProcVector[X_AllocColorPlanes])(client); if(result != Success) break; } - return (result); + return result; } @@ -2394,13 +2370,13 @@ int PanoramiXFreeColors(ClientPtr client) result = dixLookupResourceByType((pointer *)&cmap, stuff->cmap, XRT_COLORMAP, client, DixWriteAccess); if (result != Success) - return (result == BadValue) ? BadColor : result; + return result; FOR_NSCREENS_BACKWARD(j) { stuff->cmap = cmap->info[j].id; result = (* SavedProcVector[X_FreeColors])(client); } - return (result); + return result; } @@ -2417,14 +2393,14 @@ int PanoramiXStoreColors(ClientPtr client) result = dixLookupResourceByType((pointer *)&cmap, stuff->cmap, XRT_COLORMAP, client, DixWriteAccess); if (result != Success) - return (result == BadValue) ? BadColor : result; + return result; FOR_NSCREENS_BACKWARD(j){ stuff->cmap = cmap->info[j].id; result = (* SavedProcVector[X_StoreColors])(client); if(result != Success) break; } - return (result); + return result; } @@ -2441,12 +2417,12 @@ int PanoramiXStoreNamedColor(ClientPtr client) result = dixLookupResourceByType((pointer *)&cmap, stuff->cmap, XRT_COLORMAP, client, DixWriteAccess); if (result != Success) - return (result == BadValue) ? BadColor : result; + return result; FOR_NSCREENS_BACKWARD(j){ stuff->cmap = cmap->info[j].id; result = (* SavedProcVector[X_StoreNamedColor])(client); if(result != Success) break; } - return (result); + return result; } diff --git a/xserver/Xext/panoramiXsrv.h b/xserver/Xext/panoramiXsrv.h index c77b11927..5b1a3a990 100644 --- a/xserver/Xext/panoramiXsrv.h +++ b/xserver/Xext/panoramiXsrv.h @@ -9,7 +9,6 @@ #include "panoramiX.h" extern _X_EXPORT int PanoramiXNumScreens; -extern _X_EXPORT PanoramiXData *panoramiXdataPtr; extern _X_EXPORT int PanoramiXPixWidth; extern _X_EXPORT int PanoramiXPixHeight; @@ -22,8 +21,6 @@ extern _X_EXPORT int XineramaDeleteResource(pointer, XID); extern _X_EXPORT void XineramaReinitData(ScreenPtr); -extern _X_EXPORT RegionRec XineramaScreenRegions[MAXSCREENS]; - extern _X_EXPORT unsigned long XRC_DRAWABLE; extern _X_EXPORT unsigned long XRT_WINDOW; extern _X_EXPORT unsigned long XRT_PIXMAP; diff --git a/xserver/Xext/saver.c b/xserver/Xext/saver.c index aa2e61428..6d91ddf5e 100644 --- a/xserver/Xext/saver.c +++ b/xserver/Xext/saver.c @@ -226,8 +226,8 @@ MakeScreenPrivate ( ScreenPtr /* pScreen */ ); -static int ScreenPrivateKeyIndex; -static DevPrivateKey ScreenPrivateKey = &ScreenPrivateKeyIndex; +static DevPrivateKeyRec ScreenPrivateKeyRec; +#define ScreenPrivateKey (&ScreenPrivateKeyRec) #define GetScreenPrivate(s) ((ScreenSaverScreenPrivatePtr) \ dixLookupPrivate(&(s)->devPrivates, ScreenPrivateKey)) @@ -235,7 +235,7 @@ static DevPrivateKey ScreenPrivateKey = &ScreenPrivateKeyIndex; dixSetPrivate(&(s)->devPrivates, ScreenPrivateKey, v); #define SetupScreen(s) ScreenSaverScreenPrivatePtr pPriv = (s ? GetScreenPrivate(s) : NULL) -#define New(t) (xalloc (sizeof (t))) +#define New(t) (malloc(sizeof (t))) /**************** * ScreenSaverExtensionInit @@ -252,6 +252,9 @@ ScreenSaverExtensionInit(INITARGS) int i; ScreenPtr pScreen; + if (!dixRegisterPrivateKey(&ScreenPrivateKeyRec, PRIVATE_SCREEN, 0)) + return; + AttrType = CreateNewResourceType(ScreenSaverFreeAttr, "SaverAttr"); SaverEventType = CreateNewResourceType(ScreenSaverFreeEvents, "SaverEvent"); @@ -283,9 +286,9 @@ CheckScreenPrivate (ScreenPtr pScreen) if (!pPriv->attr && !pPriv->events && !pPriv->hasWindow && pPriv->installedMap == None) { - xfree (pPriv); + free(pPriv); SetScreenPrivate (pScreen, NULL); - savedScreenInfo[pScreen->myNum].ExternalScreenSaver = NULL; + pScreen->screensaver.ExternalScreenSaver = NULL; } } @@ -304,7 +307,7 @@ MakeScreenPrivate (ScreenPtr pScreen) pPriv->hasWindow = FALSE; pPriv->installedMap = None; SetScreenPrivate (pScreen, pPriv); - savedScreenInfo[pScreen->myNum].ExternalScreenSaver = ScreenSaverHandle; + pScreen->screensaver.ExternalScreenSaver = ScreenSaverHandle; return pPriv; } @@ -343,7 +346,7 @@ setEventMask (ScreenPtr pScreen, ClientPtr client, unsigned long mask) { FreeResource (pEv->resource, SaverEventType); *pPrev = pEv->next; - xfree (pEv); + free(pEv); CheckScreenPrivate (pScreen); } else @@ -387,8 +390,8 @@ static void FreeScreenAttr (ScreenSaverAttrPtr pAttr) { FreeAttrs (pAttr); - xfree (pAttr->values); - xfree (pAttr); + free(pAttr->values); + free(pAttr); } static int @@ -407,7 +410,7 @@ ScreenSaverFreeEvents (pointer value, XID id) if (!pEv) return TRUE; *pPrev = pEv->next; - xfree (pEv); + free(pEv); CheckScreenPrivate (pScreen); return TRUE; } @@ -446,7 +449,7 @@ ScreenSaverFreeSuspend (pointer value, XID id) if (this == data) { *prev = this->next; - xfree (this); + free(this); break; } } @@ -480,7 +483,6 @@ SendScreenSaverNotify (ScreenPtr pScreen, int state, Bool forced) ScreenSaverEventPtr pEv; unsigned long mask; xScreenSaverNotifyEvent ev; - ClientPtr client; int kind; UpdateCurrentTimeIf (); @@ -499,20 +501,16 @@ SendScreenSaverNotify (ScreenPtr pScreen, int state, Bool forced) kind = ScreenSaverInternal; for (pEv = pPriv->events; pEv; pEv = pEv->next) { - client = pEv->client; - if (client->clientGone) - continue; if (!(pEv->mask & mask)) continue; ev.type = ScreenSaverNotify + ScreenSaverEventBase; ev.state = state; - ev.sequenceNumber = client->sequence; ev.timestamp = currentTime.milliseconds; - ev.root = WindowTable[pScreen->myNum]->drawable.id; - ev.window = savedScreenInfo[pScreen->myNum].wid; + ev.root = pScreen->root->drawable.id; + ev.window = pScreen->screensaver.wid; ev.kind = kind; ev.forced = forced; - WriteEventsToClient (client, 1, (xEvent *) &ev); + WriteEventsToClient (pEv->client, 1, (xEvent *) &ev); } } @@ -564,7 +562,7 @@ CreateSaverWindow (ScreenPtr pScreen) Colormap wantMap; ColormapPtr pCmap; - pSaver = &savedScreenInfo[pScreen->myNum]; + pSaver = &pScreen->screensaver; if (pSaver->pWindow) { pSaver->pWindow = NullWindow; @@ -585,7 +583,7 @@ CreateSaverWindow (ScreenPtr pScreen) if (GrabInProgress && GrabInProgress != pAttr->client->index) return FALSE; - pWin = CreateWindow (pSaver->wid, WindowTable[pScreen->myNum], + pWin = CreateWindow (pSaver->wid, pScreen->root, pAttr->x, pAttr->y, pAttr->width, pAttr->height, pAttr->borderWidth, pAttr->class, pAttr->mask, (XID *)pAttr->values, @@ -644,14 +642,14 @@ CreateSaverWindow (ScreenPtr pScreen) wantMap = wColormap (pWin); if (wantMap == None) return TRUE; - installedMaps = xalloc (pScreen->maxInstalledCmaps * sizeof (Colormap)); + installedMaps = malloc(pScreen->maxInstalledCmaps * sizeof (Colormap)); numInstalled = (*pWin->drawable.pScreen->ListInstalledColormaps) (pScreen, installedMaps); for (i = 0; i < numInstalled; i++) if (installedMaps[i] == wantMap) break; - xfree ((char *) installedMaps); + free((char *) installedMaps); if (i < numInstalled) return TRUE; @@ -677,7 +675,7 @@ DestroySaverWindow (ScreenPtr pScreen) if (!pPriv || !pPriv->hasWindow) return FALSE; - pSaver = &savedScreenInfo[pScreen->myNum]; + pSaver = &pScreen->screensaver; if (pSaver->pWindow) { pSaver->pWindow = NullWindow; @@ -737,7 +735,7 @@ ProcScreenSaverQueryVersion (ClientPtr client) swapl(&rep.length, n); } WriteToClient(client, sizeof (xScreenSaverQueryVersionReply), (char *)&rep); - return (client->noClientException); + return Success; } static int @@ -761,7 +759,7 @@ ProcScreenSaverQueryInfo (ClientPtr client) if (rc != Success) return rc; - pSaver = &savedScreenInfo[pDraw->pScreen->myNum]; + pSaver = &pDraw->pScreen->screensaver; pPriv = GetScreenPrivate (pDraw->pScreen); UpdateCurrentTime (); @@ -813,7 +811,7 @@ ProcScreenSaverQueryInfo (ClientPtr client) swapl (&rep.eventMask, n); } WriteToClient(client, sizeof (xScreenSaverQueryInfoReply), (char *)&rep); - return (client->noClientException); + return Success; } static int @@ -871,7 +869,7 @@ ScreenSaverSetAttributes (ClientPtr client) if (ret != Success) return ret; pScreen = pDraw->pScreen; - pParent = WindowTable[pScreen->myNum]; + pParent = pScreen->root; ret = XaceHook(XACE_SCREENSAVER_ACCESS, client, pScreen, DixSetAttrAccess); if (ret != Success) @@ -982,7 +980,7 @@ ScreenSaverSetAttributes (ClientPtr client) goto bail; } /* over allocate for override redirect */ - values = xalloc ((len + 1) * sizeof (unsigned long)); + values = malloc((len + 1) * sizeof (unsigned long)); if (!values) { ret = BadAlloc; @@ -1048,7 +1046,6 @@ ScreenSaverSetAttributes (ClientPtr client) } else { - ret = (ret == BadValue) ? BadPixmap : ret; client->errorValue = pixID; goto PatchUp; } @@ -1086,7 +1083,6 @@ ScreenSaverSetAttributes (ClientPtr client) } else { - ret = (ret == BadValue) ? BadPixmap : ret; client->errorValue = pixID; goto PatchUp; } @@ -1168,7 +1164,6 @@ ScreenSaverSetAttributes (ClientPtr client) client, DixUseAccess); if (ret != Success) { - ret = (ret == BadValue) ? BadColor : ret; client->errorValue = cmap; goto PatchUp; } @@ -1192,7 +1187,6 @@ ScreenSaverSetAttributes (ClientPtr client) RT_CURSOR, client, DixUseAccess); if (ret != Success) { - ret = (ret == BadValue) ? BadCursor : ret; client->errorValue = cursorID; goto PatchUp; } @@ -1219,8 +1213,8 @@ PatchUp: FreeAttrs (pAttr); bail: CheckScreenPrivate (pScreen); - if (pAttr) xfree (pAttr->values); - xfree (pAttr); + if (pAttr) free(pAttr->values); + free(pAttr); return ret; } @@ -1281,7 +1275,7 @@ ProcScreenSaverSetAttributes (ClientPtr client) XRT_PIXMAP, client, DixReadAccess); if (status != Success) - return (status == BadValue) ? BadPixmap : status; + return status; } } @@ -1293,7 +1287,7 @@ ProcScreenSaverSetAttributes (ClientPtr client) XRT_PIXMAP, client, DixReadAccess); if (status != Success) - return (status == BadValue) ? BadPixmap : status; + return status; } } @@ -1305,7 +1299,7 @@ ProcScreenSaverSetAttributes (ClientPtr client) XRT_COLORMAP, client, DixReadAccess); if (status != Success) - return (status == BadValue) ? BadColor : status; + return status; } } @@ -1392,7 +1386,7 @@ ProcScreenSaverSuspend (ClientPtr client) * to the record, so the screensaver will be reenabled and the record freed * if the client disconnects without reenabling it first. */ - this = xalloc (sizeof (ScreenSaverSuspensionRec)); + this = malloc(sizeof (ScreenSaverSuspensionRec)); if (!this) return BadAlloc; @@ -1404,7 +1398,7 @@ ProcScreenSaverSuspend (ClientPtr client) if (!AddResource (this->clientResource, SuspendType, (pointer) this)) { - xfree (this); + free(this); return BadAlloc; } @@ -1415,7 +1409,7 @@ ProcScreenSaverSuspend (ClientPtr client) FreeScreenSaverTimer(); } - return (client->noClientException); + return Success; } static DISPATCH_PROC((*NormalVector[])) = { diff --git a/xserver/Xext/security.c b/xserver/Xext/security.c index af8d2052f..7eb95de74 100644 --- a/xserver/Xext/security.c +++ b/xserver/Xext/security.c @@ -51,8 +51,8 @@ static RESTYPE RTEventClient; static CallbackListPtr SecurityValidateGroupCallback = NULL; /* Private state record */ -static int stateKeyIndex; -static DevPrivateKey stateKey = &stateKeyIndex; +static DevPrivateKeyRec stateKeyRec; +#define stateKey (&stateKeyRec) /* This is what we store as client security state */ typedef struct { @@ -198,16 +198,10 @@ SecurityDeleteAuthorization( while ((pEventClient = pAuth->eventClients)) { /* send revocation event event */ - ClientPtr client = rClient(pEventClient); - - if (!client->clientGone) - { - xSecurityAuthorizationRevokedEvent are; - are.type = SecurityEventBase + XSecurityAuthorizationRevoked; - are.sequenceNumber = client->sequence; - are.authId = pAuth->id; - WriteEventsToClient(client, 1, (xEvent *)&are); - } + xSecurityAuthorizationRevokedEvent are; + are.type = SecurityEventBase + XSecurityAuthorizationRevoked; + are.authId = pAuth->id; + WriteEventsToClient(rClient(pEventClient), 1, (xEvent *)&are); FreeResource(pEventClient->resource, RT_NONE); } @@ -222,7 +216,7 @@ SecurityDeleteAuthorization( } SecurityAudit("revoked authorization ID %d\n", pAuth->id); - xfree(pAuth); + free(pAuth); return Success; } /* SecurityDeleteAuthorization */ @@ -247,8 +241,8 @@ SecurityDeleteAuthorizationEventClient( prev->next = pEventClient->next; else pAuth->eventClients = pEventClient->next; - xfree(pEventClient); - return(Success); + free(pEventClient); + return Success; } prev = pEventClient; } @@ -383,7 +377,7 @@ ProcSecurityQueryVersion( } (void)WriteToClient(client, SIZEOF(xSecurityQueryVersionReply), (char *)&rep); - return (client->noClientException); + return Success; } /* ProcSecurityQueryVersion */ @@ -409,7 +403,7 @@ SecurityEventSelectForAuthorization( } } - pEventClient = xalloc(sizeof(OtherClients)); + pEventClient = malloc(sizeof(OtherClients)); if (!pEventClient) return BadAlloc; pEventClient->mask = mask; @@ -418,7 +412,7 @@ SecurityEventSelectForAuthorization( if (!AddResource(pEventClient->resource, RTEventClient, (pointer)pAuth)) { - xfree(pEventClient); + free(pEventClient); return BadAlloc; } pAuth->eventClients = pEventClient; @@ -541,7 +535,7 @@ ProcSecurityGenerateAuthorization( /* associate additional information with this auth ID */ - pAuth = xalloc(sizeof(SecurityAuthorizationRec)); + pAuth = malloc(sizeof(SecurityAuthorizationRec)); if (!pAuth) { err = BadAlloc; @@ -604,16 +598,13 @@ ProcSecurityGenerateAuthorization( pAuth->group, eventMask); /* the request succeeded; don't call RemoveAuthorization or free pAuth */ - - removeAuth = FALSE; - pAuth = NULL; - err = client->noClientException; + return Success; bailout: if (removeAuth) RemoveAuthorization(stuff->nbytesAuthProto, protoname, authdata_len, pAuthdata); - if (pAuth) xfree(pAuth); + free(pAuth); return err; } /* ProcSecurityGenerateAuthorization */ @@ -632,8 +623,7 @@ ProcSecurityRevokeAuthorization( SecurityAuthorizationResType, client, DixDestroyAccess); if (rc != Success) - return (rc == BadValue) ? - SecurityErrorBase + XSecurityBadAuthorization : rc; + return rc; FreeResource(stuff->authId, RT_NONE); return Success; @@ -815,7 +805,6 @@ SecurityResource(CallbackListPtr *pcbl, pointer unused, pointer calldata) Mask allowed = SecurityResourceMask; subj = dixLookupPrivate(&rec->client->devPrivates, stateKey); - obj = dixLookupPrivate(&clients[cid]->devPrivates, stateKey); /* disable background None for untrusted windows */ if ((requested & DixCreateAccess) && (rec->rtype == RT_WINDOW)) @@ -841,8 +830,11 @@ SecurityResource(CallbackListPtr *pcbl, pointer unused, pointer calldata) allowed |= DixReadAccess; } - if (SecurityDoCheck(subj, obj, requested, allowed) == Success) - return; + if (clients[cid] != NULL) { + obj = dixLookupPrivate(&clients[cid]->devPrivates, stateKey); + if (SecurityDoCheck(subj, obj, requested, allowed) == Success) + return; + } SecurityAudit("Security: denied client %d access %x to resource 0x%x " "of client %d on request %s\n", rec->client->index, @@ -1118,7 +1110,7 @@ SecurityExtensionInit(INITARGS) RTEventClient |= RC_NEVERRETAIN; /* Allocate the private storage */ - if (!dixRequestPrivate(stateKey, sizeof(SecurityStateRec))) + if (!dixRegisterPrivateKey(stateKey, PRIVATE_CLIENT, sizeof(SecurityStateRec))) FatalError("SecurityExtensionSetup: Can't allocate client private.\n"); /* Register callbacks */ @@ -1149,6 +1141,8 @@ SecurityExtensionInit(INITARGS) EventSwapVector[SecurityEventBase + XSecurityAuthorizationRevoked] = (EventSwapPtr)SwapSecurityAuthorizationRevokedEvent; + SetResourceTypeErrorValue(SecurityAuthorizationResType, SecurityErrorBase + XSecurityBadAuthorization); + /* Label objects that were created before we could register ourself */ SecurityLabelInitial(); } diff --git a/xserver/Xext/shape.c b/xserver/Xext/shape.c index cb4126b44..ac95328b8 100644 --- a/xserver/Xext/shape.c +++ b/xserver/Xext/shape.c @@ -150,14 +150,12 @@ RegionOperate ( int xoff, int yoff, CreateDftPtr create) { - ScreenPtr pScreen = pWin->drawable.pScreen; - if (srcRgn && (xoff || yoff)) - REGION_TRANSLATE(pScreen, srcRgn, xoff, yoff); + RegionTranslate(srcRgn, xoff, yoff); if (!pWin->parent) { if (srcRgn) - REGION_DESTROY(pScreen, srcRgn); + RegionDestroy(srcRgn); return Success; } @@ -168,7 +166,7 @@ RegionOperate ( */ if (srcRgn == NULL) { if (*destRgnp != NULL) { - REGION_DESTROY (pScreen, *destRgnp); + RegionDestroy(*destRgnp); *destRgnp = 0; /* go on to remove shape and generate ShapeNotify */ } @@ -187,17 +185,17 @@ RegionOperate ( else switch (op) { case ShapeSet: if (*destRgnp) - REGION_DESTROY(pScreen, *destRgnp); + RegionDestroy(*destRgnp); *destRgnp = srcRgn; srcRgn = 0; break; case ShapeUnion: if (*destRgnp) - REGION_UNION(pScreen, *destRgnp, *destRgnp, srcRgn); + RegionUnion(*destRgnp, *destRgnp, srcRgn); break; case ShapeIntersect: if (*destRgnp) - REGION_INTERSECT(pScreen, *destRgnp, *destRgnp, srcRgn); + RegionIntersect(*destRgnp, *destRgnp, srcRgn); else { *destRgnp = srcRgn; srcRgn = 0; @@ -206,21 +204,21 @@ RegionOperate ( case ShapeSubtract: if (!*destRgnp) *destRgnp = (*create)(pWin); - REGION_SUBTRACT(pScreen, *destRgnp, *destRgnp, srcRgn); + RegionSubtract(*destRgnp, *destRgnp, srcRgn); break; case ShapeInvert: if (!*destRgnp) - *destRgnp = REGION_CREATE(pScreen, (BoxPtr) 0, 0); + *destRgnp = RegionCreate((BoxPtr) 0, 0); else - REGION_SUBTRACT(pScreen, *destRgnp, srcRgn, *destRgnp); + RegionSubtract(*destRgnp, srcRgn, *destRgnp); break; default: client->errorValue = op; return BadValue; } if (srcRgn) - REGION_DESTROY(pScreen, srcRgn); - (*pScreen->SetShape) (pWin); + RegionDestroy(srcRgn); + (*pWin->drawable.pScreen->SetShape) (pWin, kind); SendShapeNotify (pWin, kind); return Success; } @@ -234,7 +232,7 @@ CreateBoundingShape (WindowPtr pWin) extents.y1 = -wBorderWidth (pWin); extents.x2 = pWin->drawable.width + wBorderWidth (pWin); extents.y2 = pWin->drawable.height + wBorderWidth (pWin); - return REGION_CREATE(pWin->drawable.pScreen, &extents, 1); + return RegionCreate(&extents, 1); } RegionPtr @@ -246,7 +244,7 @@ CreateClipShape (WindowPtr pWin) extents.y1 = 0; extents.x2 = pWin->drawable.width; extents.y2 = pWin->drawable.height; - return REGION_CREATE(pWin->drawable.pScreen, &extents, 1); + return RegionCreate(&extents, 1); } static int @@ -269,7 +267,7 @@ ProcShapeQueryVersion (ClientPtr client) swaps(&rep.minorVersion, n); } WriteToClient(client, sizeof (xShapeQueryVersionReply), (char *)&rep); - return (client->noClientException); + return Success; } /***************** @@ -281,7 +279,6 @@ static int ProcShapeRectangles (ClientPtr client) { WindowPtr pWin; - ScreenPtr pScreen; REQUEST(xShapeRectanglesReq); xRectangle *prects; int nrects, ctype, rc; @@ -314,7 +311,6 @@ ProcShapeRectangles (ClientPtr client) client->errorValue = stuff->ordering; return BadValue; } - pScreen = pWin->drawable.pScreen; nrects = ((stuff->length << 2) - sizeof(xShapeRectanglesReq)); if (nrects & 4) return BadLength; @@ -323,7 +319,7 @@ ProcShapeRectangles (ClientPtr client) ctype = VerifyRectOrder(nrects, prects, (int)stuff->ordering); if (ctype < 0) return BadMatch; - srcRgn = RECTS_TO_REGION(pScreen, nrects, prects, ctype); + srcRgn = RegionFromRects(nrects, prects, ctype); if (!pWin->optional) MakeWindowOptional (pWin); @@ -360,14 +356,14 @@ ProcPanoramiXShapeRectangles( result = dixLookupResourceByType((pointer *)&win, stuff->dest, XRT_WINDOW, client, DixWriteAccess); if (result != Success) - return (result == BadValue) ? BadWindow : result; + return result; FOR_NSCREENS(j) { stuff->dest = win->info[j].id; result = ProcShapeRectangles (client); - BREAK_IF(result != Success); + if (result != Success) break; } - return (result); + return result; } #endif @@ -415,11 +411,11 @@ ProcShapeMask (ClientPtr client) rc = dixLookupResourceByType((pointer *)&pPixmap, stuff->src, RT_PIXMAP, client, DixReadAccess); if (rc != Success) - return (rc == BadValue) ? BadPixmap : rc; + return rc; if (pPixmap->drawable.pScreen != pScreen || pPixmap->drawable.depth != 1) return BadMatch; - srcRgn = BITMAP_TO_REGION(pScreen, pPixmap); + srcRgn = BitmapToRegion(pScreen, pPixmap); if (!srcRgn) return BadAlloc; } @@ -459,13 +455,13 @@ ProcPanoramiXShapeMask( result = dixLookupResourceByType((pointer *)&win, stuff->dest, XRT_WINDOW, client, DixWriteAccess); if (result != Success) - return (result == BadValue) ? BadWindow : result; + return result; if(stuff->src != None) { result = dixLookupResourceByType((pointer *)&pmap, stuff->src, XRT_PIXMAP, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? BadPixmap : result; + return result; } else pmap = NULL; @@ -474,9 +470,9 @@ ProcPanoramiXShapeMask( if(pmap) stuff->src = pmap->info[j].id; result = ProcShapeMask (client); - BREAK_IF(result != Success); + if (result != Success) break; } - return (result); + return result; } #endif @@ -489,7 +485,6 @@ static int ProcShapeCombine (ClientPtr client) { WindowPtr pSrcWin, pDestWin; - ScreenPtr pScreen; REQUEST(xShapeCombineReq); RegionPtr srcRgn; RegionPtr *destRgn; @@ -519,7 +514,6 @@ ProcShapeCombine (ClientPtr client) client->errorValue = stuff->destKind; return BadValue; } - pScreen = pDestWin->drawable.pScreen; rc = dixLookupWindow(&pSrcWin, stuff->src, client, DixGetAttrAccess); if (rc != Success) @@ -541,14 +535,14 @@ ProcShapeCombine (ClientPtr client) client->errorValue = stuff->srcKind; return BadValue; } - if (pSrcWin->drawable.pScreen != pScreen) + if (pSrcWin->drawable.pScreen != pDestWin->drawable.pScreen) { return BadMatch; } if (srcRgn) { - tmp = REGION_CREATE(pScreen, (BoxPtr) 0, 0); - REGION_COPY(pScreen, tmp, srcRgn); + tmp = RegionCreate((BoxPtr) 0, 0); + RegionCopy(tmp, srcRgn); srcRgn = tmp; } else srcRgn = (*createSrc) (pSrcWin); @@ -589,20 +583,20 @@ ProcPanoramiXShapeCombine( result = dixLookupResourceByType((pointer *)&win, stuff->dest, XRT_WINDOW, client, DixWriteAccess); if (result != Success) - return (result == BadValue) ? BadWindow : result; + return result; result = dixLookupResourceByType((pointer *)&win2, stuff->src, XRT_WINDOW, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? BadWindow : result; + return result; FOR_NSCREENS(j) { stuff->dest = win->info[j].id; stuff->src = win2->info[j].id; result = ProcShapeCombine (client); - BREAK_IF(result != Success); + if (result != Success) break; } - return (result); + return result; } #endif @@ -614,7 +608,6 @@ static int ProcShapeOffset (ClientPtr client) { WindowPtr pWin; - ScreenPtr pScreen; REQUEST(xShapeOffsetReq); RegionPtr srcRgn; int rc; @@ -638,11 +631,10 @@ ProcShapeOffset (ClientPtr client) client->errorValue = stuff->destKind; return BadValue; } - pScreen = pWin->drawable.pScreen; if (srcRgn) { - REGION_TRANSLATE(pScreen, srcRgn, stuff->xOff, stuff->yOff); - (*pScreen->SetShape) (pWin); + RegionTranslate(srcRgn, stuff->xOff, stuff->yOff); + (*pWin->drawable.pScreen->SetShape) (pWin, stuff->destKind); } SendShapeNotify (pWin, (int)stuff->destKind); return Success; @@ -663,14 +655,14 @@ ProcPanoramiXShapeOffset( result = dixLookupResourceByType((pointer *)&win, stuff->dest, XRT_WINDOW, client, DixWriteAccess); if (result != Success) - return (result == BadValue) ? BadWindow : result; + return result; FOR_NSCREENS(j) { stuff->dest = win->info[j].id; result = ProcShapeOffset (client); if(result != Success) break; } - return (result); + return result; } #endif @@ -697,7 +689,7 @@ ProcShapeQueryExtents (ClientPtr client) rep.clipShaped = (wClipShape(pWin) != 0); if ((region = wBoundingShape(pWin))) { /* this is done in two steps because of a compiler bug on SunOS 4.1.3 */ - pExtents = REGION_EXTENTS(pWin->drawable.pScreen, region); + pExtents = RegionExtents(region); extents = *pExtents; } else { extents.x1 = -wBorderWidth (pWin); @@ -711,7 +703,7 @@ ProcShapeQueryExtents (ClientPtr client) rep.heightBoundingShape = extents.y2 - extents.y1; if ((region = wClipShape(pWin))) { /* this is done in two steps because of a compiler bug on SunOS 4.1.3 */ - pExtents = REGION_EXTENTS(pWin->drawable.pScreen, region); + pExtents = RegionExtents(region); extents = *pExtents; } else { extents.x1 = 0; @@ -736,7 +728,7 @@ ProcShapeQueryExtents (ClientPtr client) swaps(&rep.heightClipShape, n); } WriteToClient(client, sizeof (xShapeQueryExtentsReply), (char *)&rep); - return (client->noClientException); + return Success; } /*ARGSUSED*/ @@ -764,7 +756,7 @@ ShapeFreeClient (pointer data, XID id) *pHead = pShapeEvent->next; } } - xfree ((pointer) pShapeEvent); + free((pointer) pShapeEvent); return 1; } @@ -778,9 +770,9 @@ ShapeFreeEvents (pointer data, XID id) for (pCur = *pHead; pCur; pCur = pNext) { pNext = pCur->next; FreeResource (pCur->clientResource, ClientType); - xfree ((pointer) pCur); + free((pointer) pCur); } - xfree ((pointer) pHead); + free((pointer) pHead); return 1; } @@ -817,7 +809,7 @@ ProcShapeSelectInput (ClientPtr client) } /* build the entry */ - pNewShapeEvent = xalloc (sizeof (ShapeEventRec)); + pNewShapeEvent = malloc(sizeof (ShapeEventRec)); if (!pNewShapeEvent) return BadAlloc; pNewShapeEvent->next = 0; @@ -839,7 +831,7 @@ ProcShapeSelectInput (ClientPtr client) */ if (!pHead) { - pHead = xalloc (sizeof (ShapeEventPtr)); + pHead = malloc(sizeof (ShapeEventPtr)); if (!pHead || !AddResource (pWin->drawable.id, ShapeEventType, (pointer)pHead)) { @@ -866,7 +858,7 @@ ProcShapeSelectInput (ClientPtr client) pNewShapeEvent->next = pShapeEvent->next; else *pHead = pShapeEvent->next; - xfree (pShapeEvent); + free(pShapeEvent); } } break; @@ -885,7 +877,6 @@ void SendShapeNotify (WindowPtr pWin, int which) { ShapeEventPtr *pHead, pShapeEvent; - ClientPtr client; xShapeNotifyEvent se; BoxRec extents; RegionPtr region; @@ -900,7 +891,7 @@ SendShapeNotify (WindowPtr pWin, int which) case ShapeBounding: region = wBoundingShape(pWin); if (region) { - extents = *REGION_EXTENTS(pWin->drawable.pScreen, region); + extents = *RegionExtents(region); shaped = xTrue; } else { extents.x1 = -wBorderWidth (pWin); @@ -913,7 +904,7 @@ SendShapeNotify (WindowPtr pWin, int which) case ShapeClip: region = wClipShape(pWin); if (region) { - extents = *REGION_EXTENTS(pWin->drawable.pScreen, region); + extents = *RegionExtents(region); shaped = xTrue; } else { extents.x1 = 0; @@ -926,7 +917,7 @@ SendShapeNotify (WindowPtr pWin, int which) case ShapeInput: region = wInputShape(pWin); if (region) { - extents = *REGION_EXTENTS(pWin->drawable.pScreen, region); + extents = *RegionExtents(region); shaped = xTrue; } else { extents.x1 = -wBorderWidth (pWin); @@ -940,20 +931,16 @@ SendShapeNotify (WindowPtr pWin, int which) return; } for (pShapeEvent = *pHead; pShapeEvent; pShapeEvent = pShapeEvent->next) { - client = pShapeEvent->client; - if (client == serverClient || client->clientGone) - continue; se.type = ShapeNotify + ShapeEventBase; se.kind = which; se.window = pWin->drawable.id; - se.sequenceNumber = client->sequence; se.x = extents.x1; se.y = extents.y1; se.width = extents.x2 - extents.x1; se.height = extents.y2 - extents.y1; se.time = currentTime.milliseconds; se.shaped = shaped; - WriteEventsToClient (client, 1, (xEvent *) &se); + WriteEventsToClient (pShapeEvent->client, 1, (xEvent *) &se); } } @@ -996,7 +983,7 @@ ProcShapeInputSelected (ClientPtr client) swapl (&rep.length, n); } WriteToClient (client, sizeof (xShapeInputSelectedReply), (char *) &rep); - return (client->noClientException); + return Success; } static int @@ -1030,7 +1017,7 @@ ProcShapeGetRectangles (ClientPtr client) } if (!region) { nrects = 1; - rects = xalloc (sizeof (xRectangle)); + rects = malloc(sizeof (xRectangle)); if (!rects) return BadAlloc; switch (stuff->kind) { @@ -1055,9 +1042,9 @@ ProcShapeGetRectangles (ClientPtr client) } } else { BoxPtr box; - nrects = REGION_NUM_RECTS(region); - box = REGION_RECTS(region); - rects = xalloc (nrects * sizeof (xRectangle)); + nrects = RegionNumRects(region); + box = RegionRects(region); + rects = malloc(nrects * sizeof (xRectangle)); if (!rects && nrects) return BadAlloc; for (i = 0; i < nrects; i++, box++) { @@ -1080,8 +1067,8 @@ ProcShapeGetRectangles (ClientPtr client) } WriteToClient (client, sizeof (rep), (char *) &rep); WriteToClient (client, nrects * sizeof (xRectangle), (char *) rects); - xfree (rects); - return client->noClientException; + free(rects); + return Success; } static int diff --git a/xserver/Xext/shm.c b/xserver/Xext/shm.c index ab58c2750..3230d83c6 100644 --- a/xserver/Xext/shm.c +++ b/xserver/Xext/shm.c @@ -141,10 +141,10 @@ int BadShmSegCode; RESTYPE ShmSegType; static ShmDescPtr Shmsegs; static Bool sharedPixmaps; -static int shmScrPrivateKeyIndex; -static DevPrivateKey shmScrPrivateKey = &shmScrPrivateKeyIndex; -static int shmPixmapPrivateIndex; -static DevPrivateKey shmPixmapPrivate = &shmPixmapPrivateIndex; +static DevPrivateKeyRec shmScrPrivateKeyRec; +#define shmScrPrivateKey (&shmScrPrivateKeyRec) +static DevPrivateKeyRec shmPixmapPrivateKeyRec; +#define shmPixmapPrivateKey (&shmPixmapPrivateKeyRec) static ShmFuncs miFuncs = {NULL, NULL}; static ShmFuncs fbFuncs = {fbShmCreatePixmap, NULL}; @@ -156,7 +156,7 @@ static ShmFuncs fbFuncs = {fbShmCreatePixmap, NULL}; rc = dixLookupResourceByType((pointer *)&(shmdesc), shmseg, ShmSegType, \ client, DixReadAccess); \ if (rc != Success) \ - return (rc == BadValue) ? BadShmSegCode : rc; \ + return rc; \ } #define VERIFY_SHMPTR(shmseg,offset,needwrite,shmdesc,client) \ @@ -213,7 +213,7 @@ static Bool CheckForShmSyscall(void) badSysCall = TRUE; } signal(SIGSYS, oldHandler); - return(!badSysCall); + return !badSysCall; } #define MUST_CHECK_FOR_SHM_SYSCALL @@ -226,7 +226,7 @@ ShmCloseScreen(int i, ScreenPtr pScreen) ShmScrPrivateRec *screen_priv = ShmGetScreenPriv(pScreen); pScreen->CloseScreen = screen_priv->CloseScreen; dixSetPrivate(&pScreen->devPrivates, shmScrPrivateKey, NULL); - xfree (screen_priv); + free(screen_priv); return (*pScreen->CloseScreen) (i, pScreen); } @@ -236,7 +236,7 @@ ShmInitScreenPriv(ScreenPtr pScreen) ShmScrPrivateRec *screen_priv = ShmGetScreenPriv(pScreen); if (!screen_priv) { - screen_priv = xcalloc (1, sizeof (ShmScrPrivateRec)); + screen_priv = calloc(1, sizeof (ShmScrPrivateRec)); screen_priv->CloseScreen = pScreen->CloseScreen; dixSetPrivate(&pScreen->devPrivates, shmScrPrivateKey, screen_priv); pScreen->CloseScreen = ShmCloseScreen; @@ -244,6 +244,16 @@ ShmInitScreenPriv(ScreenPtr pScreen) return screen_priv; } +static Bool +ShmRegisterPrivates(void) +{ + if (!dixRegisterPrivateKey(&shmScrPrivateKeyRec, PRIVATE_SCREEN, 0)) + return FALSE; + if (!dixRegisterPrivateKey(&shmPixmapPrivateKeyRec, PRIVATE_PIXMAP, 0)) + return FALSE; + return TRUE; +} + void ShmExtensionInit(INITARGS) { @@ -258,6 +268,9 @@ ShmExtensionInit(INITARGS) } #endif + if (!ShmRegisterPrivates()) + return; + sharedPixmaps = xFalse; { sharedPixmaps = xTrue; @@ -286,6 +299,7 @@ ShmExtensionInit(INITARGS) ShmReqCode = (unsigned char)extEntry->base; ShmCompletionCode = extEntry->eventBase; BadShmSegCode = extEntry->errorBase; + SetResourceTypeErrorValue(ShmSegType, BadShmSegCode); EventSwapVector[ShmCompletionCode] = (EventSwapPtr) SShmCompletionEvent; } } @@ -302,6 +316,8 @@ ShmResetProc(ExtensionEntry *extEntry) void ShmRegisterFuncs(ScreenPtr pScreen, ShmFuncsPtr funcs) { + if (!ShmRegisterPrivates()) + return; ShmInitScreenPriv(pScreen)->shmFuncs = funcs; } @@ -315,7 +331,7 @@ ShmDestroyPixmap (PixmapPtr pPixmap) { ShmDescPtr shmdesc; shmdesc = (ShmDescPtr)dixLookupPrivate(&pPixmap->devPrivates, - shmPixmapPrivate); + shmPixmapPrivateKey); if (shmdesc) ShmDetachSegment ((pointer) shmdesc, pPixmap->drawable.id); } @@ -359,7 +375,7 @@ ProcShmQueryVersion(ClientPtr client) swaps(&rep.gid, n); } WriteToClient(client, sizeof(xShmQueryVersionReply), (char *)&rep); - return (client->noClientException); + return Success; } /* @@ -440,7 +456,7 @@ ProcShmAttach(ClientPtr client) if ((stuff->readOnly != xTrue) && (stuff->readOnly != xFalse)) { client->errorValue = stuff->readOnly; - return(BadValue); + return BadValue; } for (shmdesc = Shmsegs; shmdesc && (shmdesc->shmid != stuff->shmid); @@ -454,7 +470,7 @@ ProcShmAttach(ClientPtr client) } else { - shmdesc = xalloc(sizeof(ShmDescRec)); + shmdesc = malloc(sizeof(ShmDescRec)); if (!shmdesc) return BadAlloc; shmdesc->addr = shmat(stuff->shmid, 0, @@ -462,7 +478,7 @@ ProcShmAttach(ClientPtr client) if ((shmdesc->addr == ((char *)-1)) || SHMSTAT(stuff->shmid, &buf)) { - xfree(shmdesc); + free(shmdesc); return BadAccess; } @@ -472,7 +488,7 @@ ProcShmAttach(ClientPtr client) if (shm_access(client, &(SHM_PERM(buf)), stuff->readOnly) == -1) { shmdt(shmdesc->addr); - xfree(shmdesc); + free(shmdesc); return BadAccess; } @@ -485,7 +501,7 @@ ProcShmAttach(ClientPtr client) } if (!AddResource(stuff->shmseg, ShmSegType, (pointer)shmdesc)) return BadAlloc; - return(client->noClientException); + return Success; } /*ARGSUSED*/ @@ -502,7 +518,7 @@ ShmDetachSegment(pointer value, /* must conform to DeleteType */ for (prev = &Shmsegs; *prev != shmdesc; prev = &(*prev)->next) ; *prev = shmdesc->next; - xfree(shmdesc); + free(shmdesc); return Success; } @@ -515,7 +531,7 @@ ProcShmDetach(ClientPtr client) REQUEST_SIZE_MATCH(xShmDetachReq); VERIFY_SHMSEG(stuff->shmseg, shmdesc, client); FreeResource(stuff->shmseg, RT_NONE); - return(client->noClientException); + return Success; } /* @@ -584,7 +600,7 @@ ProcPanoramiXShmPutImage(ClientPtr client) result = dixLookupResourceByType((pointer *)&gc, stuff->gc, XRT_GC, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? BadGC : result; + return result; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; @@ -597,13 +613,13 @@ ProcPanoramiXShmPutImage(ClientPtr client) stuff->drawable = draw->info[j].id; stuff->gc = gc->info[j].id; if (isRoot) { - stuff->dstX = orig_x - panoramiXdataPtr[j].x; - stuff->dstY = orig_y - panoramiXdataPtr[j].y; + stuff->dstX = orig_x - screenInfo.screens[j]->x; + stuff->dstY = orig_y - screenInfo.screens[j]->y; } result = ProcShmPutImage(client); - if(result != client->noClientException) break; + if(result != Success) break; } - return(result); + return result; } static int @@ -625,7 +641,7 @@ ProcPanoramiXShmGetImage(ClientPtr client) if ((stuff->format != XYPixmap) && (stuff->format != ZPixmap)) { client->errorValue = stuff->format; - return(BadValue); + return BadValue; } rc = dixLookupResourceByClass((pointer *)&draw, stuff->drawable, @@ -656,24 +672,24 @@ ProcPanoramiXShmGetImage(ClientPtr client) if( /* check for being onscreen */ x < 0 || x + w > PanoramiXPixWidth || y < 0 || y + h > PanoramiXPixHeight ) - return(BadMatch); + return BadMatch; } else { if( /* check for being onscreen */ - panoramiXdataPtr[0].x + pDraw->x + x < 0 || - panoramiXdataPtr[0].x + pDraw->x + x + w > PanoramiXPixWidth || - panoramiXdataPtr[0].y + pDraw->y + y < 0 || - panoramiXdataPtr[0].y + pDraw->y + y + h > PanoramiXPixHeight || + screenInfo.screens[0]->x + pDraw->x + x < 0 || + screenInfo.screens[0]->x + pDraw->x + x + w > PanoramiXPixWidth || + screenInfo.screens[0]->y + pDraw->y + y < 0 || + screenInfo.screens[0]->y + pDraw->y + y + h > PanoramiXPixHeight || /* check for being inside of border */ x < - wBorderWidth((WindowPtr)pDraw) || x + w > wBorderWidth((WindowPtr)pDraw) + (int)pDraw->width || y < -wBorderWidth((WindowPtr)pDraw) || y + h > wBorderWidth ((WindowPtr)pDraw) + (int)pDraw->height) - return(BadMatch); + return BadMatch; } - drawables = xcalloc(PanoramiXNumScreens, sizeof(DrawablePtr)); + drawables = calloc(PanoramiXNumScreens, sizeof(DrawablePtr)); if(!drawables) - return(BadAlloc); + return BadAlloc; drawables[0] = pDraw; for(i = 1; i < PanoramiXNumScreens; i++) { @@ -681,7 +697,7 @@ ProcPanoramiXShmGetImage(ClientPtr client) DixReadAccess); if (rc != Success) { - xfree(drawables); + free(drawables); return rc; } } @@ -722,7 +738,7 @@ ProcPanoramiXShmGetImage(ClientPtr client) } } } - xfree(drawables); + free(drawables); if (client->swapped) { int n; @@ -733,7 +749,7 @@ ProcPanoramiXShmGetImage(ClientPtr client) } WriteToClient(client, sizeof(xShmGetImageReply), (char *)&xgi); - return(client->noClientException); + return Success; } static int @@ -795,7 +811,7 @@ CreatePmap: VERIFY_SHMSIZE(shmdesc, stuff->offset, size, client); - if(!(newPix = xalloc(sizeof(PanoramiXRes)))) + if(!(newPix = malloc(sizeof(PanoramiXRes)))) return BadAlloc; newPix->type = XRT_PIXMAP; @@ -804,7 +820,7 @@ CreatePmap: for(j = 1; j < PanoramiXNumScreens; j++) newPix->info[j].id = FakeClientID(client->index); - result = (client->noClientException); + result = Success; FOR_NSCREENS(j) { ShmScrPrivateRec *screen_priv; @@ -816,7 +832,7 @@ CreatePmap: shmdesc->addr + stuff->offset); if (pMap) { - dixSetPrivate(&pMap->devPrivates, shmPixmapPrivate, shmdesc); + dixSetPrivate(&pMap->devPrivates, shmPixmapPrivateKey, shmdesc); shmdesc->refcnt++; pMap->drawable.serialNumber = NEXT_SERIAL_NUMBER; pMap->drawable.id = newPix->info[j].id; @@ -836,7 +852,7 @@ CreatePmap: (*pScreen->DestroyPixmap)(pMap); FreeResource(newPix->info[j].id, RT_NONE); } - xfree(newPix); + free(newPix); } else AddResource(stuff->pid, XRT_PIXMAP, newPix); @@ -943,7 +959,6 @@ ProcShmPutImage(ClientPtr client) ev.type = ShmCompletionCode; ev.drawable = stuff->drawable; - ev.sequenceNumber = client->sequence; ev.minorEvent = X_ShmPutImage; ev.majorEvent = ShmReqCode; ev.shmseg = stuff->shmseg; @@ -951,7 +966,7 @@ ProcShmPutImage(ClientPtr client) WriteEventsToClient(client, 1, (xEvent *) &ev); } - return (client->noClientException); + return Success; } @@ -972,7 +987,7 @@ ProcShmGetImage(ClientPtr client) if ((stuff->format != XYPixmap) && (stuff->format != ZPixmap)) { client->errorValue = stuff->format; - return(BadValue); + return BadValue; } rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixReadAccess); @@ -996,7 +1011,7 @@ ProcShmGetImage(ClientPtr client) stuff->y + (int)stuff->height > wBorderWidth((WindowPtr)pDraw) + (int)pDraw->height ) - return(BadMatch); + return BadMatch; xgi.visual = wVisual(((WindowPtr)pDraw)); } else @@ -1006,7 +1021,7 @@ ProcShmGetImage(ClientPtr client) stuff->y < 0 || stuff->y+(int)stuff->height > pDraw->height ) - return(BadMatch); + return BadMatch; xgi.visual = None; } xgi.type = X_Reply; @@ -1065,7 +1080,7 @@ ProcShmGetImage(ClientPtr client) } WriteToClient(client, sizeof(xShmGetImageReply), (char *)&xgi); - return(client->noClientException); + return Success; } static PixmapPtr @@ -1156,17 +1171,17 @@ CreatePmap: pDraw->pScreen->DestroyPixmap(pMap); return rc; } - dixSetPrivate(&pMap->devPrivates, shmPixmapPrivate, shmdesc); + dixSetPrivate(&pMap->devPrivates, shmPixmapPrivateKey, shmdesc); shmdesc->refcnt++; pMap->drawable.serialNumber = NEXT_SERIAL_NUMBER; pMap->drawable.id = stuff->pid; if (AddResource(stuff->pid, RT_PIXMAP, (pointer)pMap)) { - return(client->noClientException); + return Success; } pDraw->pScreen->DestroyPixmap(pMap); } - return (BadAlloc); + return BadAlloc; } static int diff --git a/xserver/Xext/sleepuntil.c b/xserver/Xext/sleepuntil.c index 075f428d4..3fd06acd7 100644 --- a/xserver/Xext/sleepuntil.c +++ b/xserver/Xext/sleepuntil.c @@ -94,7 +94,7 @@ ClientSleepUntil (ClientPtr client, SertafiedGeneration = serverGeneration; BlockHandlerRegistered = FALSE; } - pRequest = xalloc (sizeof (SertafiedRec)); + pRequest = malloc(sizeof (SertafiedRec)); if (!pRequest) return FALSE; pRequest->pClient = client; @@ -107,7 +107,7 @@ ClientSleepUntil (ClientPtr client, SertafiedWakeupHandler, (pointer) 0)) { - xfree (pRequest); + free(pRequest); return FALSE; } BlockHandlerRegistered = TRUE; @@ -161,7 +161,7 @@ SertafiedDelete (pointer value, XID id) } if (pRequest->notifyFunc) (*pRequest->notifyFunc) (pRequest->pClient, pRequest->closure); - xfree (pRequest); + free(pRequest); return TRUE; } diff --git a/xserver/Xext/sync.c b/xserver/Xext/sync.c index 2015fc136..a51262a99 100644 --- a/xserver/Xext/sync.c +++ b/xserver/Xext/sync.c @@ -158,7 +158,7 @@ SyncDeleteTriggerFromCounter(SyncTrigger *pTrigger) else pTrigger->pCounter->pTriglist = pCur->next; - xfree(pCur); + free(pCur); break; } @@ -186,7 +186,7 @@ SyncAddTriggerToCounter(SyncTrigger *pTrigger) return Success; } - if (!(pCur = xalloc(sizeof(SyncTriggerList)))) + if (!(pCur = malloc(sizeof(SyncTriggerList)))) return BadAlloc; pCur->pTrigger = pTrigger; @@ -264,7 +264,7 @@ SyncInitTrigger(ClientPtr client, SyncTrigger *pTrigger, XSyncCounter counter, counter, RTCounter, client, DixReadAccess))) { client->errorValue = counter; - return (rc == BadValue) ? SyncErrorBase + XSyncBadCounter : rc; + return rc; } if (pCounter != pTrigger->pCounter) { /* new counter for trigger */ @@ -372,7 +372,6 @@ SyncSendAlarmNotifyEvents(SyncAlarm *pAlarm) ane.type = SyncEventBase + XSyncAlarmNotify; ane.kind = XSyncAlarmNotify; - ane.sequenceNumber = pAlarm->client->sequence; ane.alarm = pAlarm->alarm_id; if (pTrigger->pCounter) { @@ -390,18 +389,12 @@ SyncSendAlarmNotifyEvents(SyncAlarm *pAlarm) ane.state = pAlarm->state; /* send to owner */ - if (pAlarm->events && !pAlarm->client->clientGone) + if (pAlarm->events) WriteEventsToClient(pAlarm->client, 1, (xEvent *) &ane); /* send to other interested clients */ for (pcl = pAlarm->pEventClients; pcl; pcl = pcl->next) - { - if (!pAlarm->client->clientGone) - { - ane.sequenceNumber = pcl->client->sequence; - WriteEventsToClient(pcl->client, 1, (xEvent *) &ane); - } - } + WriteEventsToClient(pcl->client, 1, (xEvent *) &ane); } @@ -417,7 +410,7 @@ SyncSendCounterNotifyEvents(ClientPtr client, SyncAwait **ppAwait, if (client->clientGone) return; - pev = pEvents = xalloc(num_events * sizeof(xSyncCounterNotifyEvent)); + pev = pEvents = malloc(num_events * sizeof(xSyncCounterNotifyEvent)); if (!pEvents) return; UpdateCurrentTime(); @@ -426,7 +419,6 @@ SyncSendCounterNotifyEvents(ClientPtr client, SyncAwait **ppAwait, SyncTrigger *pTrigger = &(*ppAwait)->trigger; pev->type = SyncEventBase + XSyncCounterNotify; pev->kind = XSyncCounterNotify; - pev->sequenceNumber = client->sequence; pev->counter = pTrigger->pCounter->id; pev->wait_value_lo = XSyncValueLow32(pTrigger->test_value); pev->wait_value_hi = XSyncValueHigh32(pTrigger->test_value); @@ -438,7 +430,7 @@ SyncSendCounterNotifyEvents(ClientPtr client, SyncAwait **ppAwait, } /* swapping will be taken care of by this */ WriteEventsToClient(client, num_events, (xEvent *)pEvents); - xfree(pEvents); + free(pEvents); } @@ -545,7 +537,7 @@ SyncAwaitTriggerFired(SyncTrigger *pTrigger) pAwaitUnion = (SyncAwaitUnion *)pAwait->pHeader; numwaits = pAwaitUnion->header.num_waitconditions; - ppAwait = xalloc(numwaits * sizeof(SyncAwait *)); + ppAwait = malloc(numwaits * sizeof(SyncAwait *)); if (!ppAwait) goto bail; @@ -614,7 +606,7 @@ SyncAwaitTriggerFired(SyncTrigger *pTrigger) if (num_events) SyncSendCounterNotifyEvents(pAwaitUnion->header.client, ppAwait, num_events); - xfree(ppAwait); + free(ppAwait); bail: /* unblock the client */ @@ -695,7 +687,7 @@ SyncEventSelectForAlarm(SyncAlarm *pAlarm, ClientPtr client, Bool wantevents) /* add new client to pAlarm->pEventClients */ - pClients = xalloc(sizeof(SyncAlarmClientList)); + pClients = malloc(sizeof(SyncAlarmClientList)); if (!pClients) return BadAlloc; @@ -706,7 +698,7 @@ SyncEventSelectForAlarm(SyncAlarm *pAlarm, ClientPtr client, Bool wantevents) pClients->delete_id = FakeClientID(client->index); if (!AddResource(pClients->delete_id, RTAlarmClient, pAlarm)) { - xfree(pClients); + free(pClients); return BadAlloc; } @@ -824,12 +816,12 @@ SyncCreateCounter(ClientPtr client, XSyncCounter id, CARD64 initialvalue) { SyncCounter *pCounter; - if (!(pCounter = xalloc(sizeof(SyncCounter)))) + if (!(pCounter = malloc(sizeof(SyncCounter)))) return NULL; if (!AddResource(id, RTCounter, (pointer) pCounter)) { - xfree(pCounter); + free(pCounter); return NULL; } @@ -863,7 +855,7 @@ SyncCreateSystemCounter( { SyncCounter *pCounter; - SysCounterList = xrealloc(SysCounterList, + SysCounterList = realloc(SysCounterList, (SyncNumSystemCounters+1)*sizeof(SyncCounter *)); if (!SysCounterList) return NULL; @@ -886,7 +878,7 @@ SyncCreateSystemCounter( { SysCounterInfo *psci; - psci = xalloc(sizeof(SysCounterInfo)); + psci = malloc(sizeof(SysCounterInfo)); if (!psci) { FreeResource(pCounter->id, RT_NONE); @@ -1008,7 +1000,7 @@ FreeAlarm(void *addr, XID id) SyncDeleteTriggerFromCounter(&pAlarm->trigger); - xfree(pAlarm); + free(pAlarm); return Success; } @@ -1029,13 +1021,13 @@ FreeCounter(void *env, XID id) { (*ptl->pTrigger->CounterDestroyed)(ptl->pTrigger); pnext = ptl->next; - xfree(ptl); /* destroy the trigger list as we go */ + free(ptl); /* destroy the trigger list as we go */ } if (IsSystemCounter(pCounter)) { int i, found = 0; - xfree(pCounter->pSysCounterInfo); + free(pCounter->pSysCounterInfo); /* find the counter in the list of system counters and remove it */ @@ -1059,7 +1051,7 @@ FreeCounter(void *env, XID id) } SyncNumSystemCounters--; } - xfree(pCounter); + free(pCounter); return Success; } @@ -1088,7 +1080,7 @@ FreeAwait(void *addr, XID id) if (pCounter && !pCounter->beingDestroyed) SyncDeleteTriggerFromCounter(&pAwait->trigger); } - xfree(pAwaitUnion); + free(pAwaitUnion); return Success; } @@ -1109,7 +1101,7 @@ FreeAlarmClient(void *value, XID id) pPrev->next = pCur->next; else pAlarm->pEventClients = pCur->next; - xfree(pCur); + free(pCur); return Success; } } @@ -1146,7 +1138,7 @@ ProcSyncInitialize(ClientPtr client) swaps(&rep.sequenceNumber, n); } WriteToClient(client, sizeof(rep), (char *) &rep); - return client->noClientException; + return Success; } /* @@ -1174,7 +1166,7 @@ ProcSyncListSystemCounters(ClientPtr client) if (len) { - walklist = list = xalloc(len); + walklist = list = malloc(len); if (!list) return BadAlloc; } @@ -1220,10 +1212,10 @@ ProcSyncListSystemCounters(ClientPtr client) if (len) { WriteToClient(client, len, (char *) list); - xfree(list); + free(list); } - return client->noClientException; + return Success; } /* @@ -1297,7 +1289,7 @@ ProcSyncGetPriority(ClientPtr client) WriteToClient(client, sizeof(xSyncGetPriorityReply), (char *) &rep); - return client->noClientException; + return Success; } /* @@ -1317,7 +1309,7 @@ ProcSyncCreateCounter(ClientPtr client) if (!SyncCreateCounter(client, stuff->cid, initial)) return BadAlloc; - return client->noClientException; + return Success; } /* @@ -1336,7 +1328,7 @@ ProcSyncSetCounter(ClientPtr client) rc = dixLookupResourceByType((pointer *)&pCounter, stuff->cid, RTCounter, client, DixWriteAccess); if (rc != Success) - return (rc == BadValue) ? SyncErrorBase + XSyncBadCounter : rc; + return rc; if (IsSystemCounter(pCounter)) { @@ -1366,7 +1358,7 @@ ProcSyncChangeCounter(ClientPtr client) rc = dixLookupResourceByType((pointer *)&pCounter, stuff->cid, RTCounter, client, DixWriteAccess); if (rc != Success) - return (rc == BadValue) ? SyncErrorBase + XSyncBadCounter : rc; + return rc; if (IsSystemCounter(pCounter)) { @@ -1401,7 +1393,7 @@ ProcSyncDestroyCounter(ClientPtr client) rc = dixLookupResourceByType((pointer *)&pCounter, stuff->counter, RTCounter, client, DixDestroyAccess); if (rc != Success) - return (rc == BadValue) ? SyncErrorBase + XSyncBadCounter : rc; + return rc; if (IsSystemCounter(pCounter)) { @@ -1448,7 +1440,7 @@ ProcSyncAwait(ClientPtr client) /* all the memory for the entire await list is allocated * here in one chunk */ - pAwaitUnion = xalloc((items+1) * sizeof(SyncAwaitUnion)); + pAwaitUnion = malloc((items+1) * sizeof(SyncAwaitUnion)); if (!pAwaitUnion) return BadAlloc; @@ -1457,7 +1449,7 @@ ProcSyncAwait(ClientPtr client) pAwaitUnion->header.delete_id = FakeClientID(client->index); if (!AddResource(pAwaitUnion->header.delete_id, RTAwait, pAwaitUnion)) { - xfree(pAwaitUnion); + free(pAwaitUnion); return BadAlloc; } @@ -1544,7 +1536,7 @@ ProcSyncQueryCounter(ClientPtr client) rc = dixLookupResourceByType((pointer *)&pCounter, stuff->counter, RTCounter, client, DixReadAccess); if (rc != Success) - return (rc == BadValue) ? SyncErrorBase + XSyncBadCounter : rc; + return rc; rep.type = X_Reply; rep.length = 0; @@ -1569,7 +1561,7 @@ ProcSyncQueryCounter(ClientPtr client) swapl(&rep.value_lo, n); } WriteToClient(client, sizeof(xSyncQueryCounterReply), (char *) &rep); - return client->noClientException; + return Success; } @@ -1595,7 +1587,7 @@ ProcSyncCreateAlarm(ClientPtr client) if (len != (Ones(vmask) + Ones(vmask & (XSyncCAValue|XSyncCADelta)))) return BadLength; - if (!(pAlarm = xalloc(sizeof(SyncAlarm)))) + if (!(pAlarm = malloc(sizeof(SyncAlarm)))) { return BadAlloc; } @@ -1612,7 +1604,7 @@ ProcSyncCreateAlarm(ClientPtr client) status = SyncInitTrigger(client, pTrigger, None, XSyncCAAllTrigger); if (status != Success) { - xfree(pAlarm); + free(pAlarm); return status; } @@ -1626,13 +1618,13 @@ ProcSyncCreateAlarm(ClientPtr client) (CARD32 *)&stuff[1]); if (status != Success) { - xfree(pAlarm); + free(pAlarm); return status; } if (!AddResource(stuff->id, RTAlarm, pAlarm)) { - xfree(pAlarm); + free(pAlarm); return BadAlloc; } @@ -1668,7 +1660,7 @@ ProcSyncChangeAlarm(ClientPtr client) status = dixLookupResourceByType((pointer *)&pAlarm, stuff->alarm, RTAlarm, client, DixWriteAccess); if (status != Success) - return (status == BadValue) ? SyncErrorBase + XSyncBadAlarm : status; + return status; vmask = stuff->valueMask; len = client->req_len - bytes_to_int32(sizeof(xSyncChangeAlarmReq)); @@ -1707,7 +1699,7 @@ ProcSyncQueryAlarm(ClientPtr client) rc = dixLookupResourceByType((pointer *)&pAlarm, stuff->alarm, RTAlarm, client, DixReadAccess); if (rc != Success) - return (rc == BadValue) ? SyncErrorBase + XSyncBadAlarm : rc; + return rc; rep.type = X_Reply; rep.length = bytes_to_int32(sizeof(xSyncQueryAlarmReply) - sizeof(xGenericReply)); @@ -1749,7 +1741,7 @@ ProcSyncQueryAlarm(ClientPtr client) } WriteToClient(client, sizeof(xSyncQueryAlarmReply), (char *) &rep); - return client->noClientException; + return Success; } static int @@ -1764,10 +1756,10 @@ ProcSyncDestroyAlarm(ClientPtr client) rc = dixLookupResourceByType((pointer *)&pAlarm, stuff->alarm, RTAlarm, client, DixDestroyAccess); if (rc != Success) - return (rc == BadValue) ? SyncErrorBase + XSyncBadAlarm : rc; + return rc; FreeResource(stuff->alarm, RT_NONE); - return client->noClientException; + return Success; } /* @@ -2091,7 +2083,7 @@ SAlarmNotifyEvent(xSyncAlarmNotifyEvent *from, xSyncAlarmNotifyEvent *to) static void SyncResetProc(ExtensionEntry *extEntry) { - xfree(SysCounterList); + free(SysCounterList); SysCounterList = NULL; RTCounter = 0; } @@ -2135,6 +2127,9 @@ SyncExtensionInit(void) EventSwapVector[SyncEventBase + XSyncCounterNotify] = (EventSwapPtr) SCounterNotifyEvent; EventSwapVector[SyncEventBase + XSyncAlarmNotify] = (EventSwapPtr) SAlarmNotifyEvent; + SetResourceTypeErrorValue(RTCounter, SyncErrorBase + XSyncBadCounter); + SetResourceTypeErrorValue(RTAlarm, SyncErrorBase + XSyncBadAlarm); + /* * Although SERVERTIME is implemented by the OS layer, we initialise it * here because doing it in OsInit() is too early. The resource database @@ -2171,7 +2166,7 @@ static XSyncValue *pnext_time; /* *** Server Block Handler -*** code inspired by multibuffer extension +*** code inspired by multibuffer extension (now deprecated) */ /*ARGSUSED*/ static void diff --git a/xserver/Xext/xace.c b/xserver/Xext/xace.c index bf0e98fb0..c757cad05 100644 --- a/xserver/Xext/xace.c +++ b/xserver/Xext/xace.c @@ -87,7 +87,18 @@ void XaceHookAuditEnd(ClientPtr ptr, int result) */ int XaceHook(int hook, ...) { - pointer calldata; /* data passed to callback */ + union { + XaceResourceAccessRec res; + XaceDeviceAccessRec dev; + XaceSendAccessRec send; + XaceReceiveAccessRec recv; + XaceClientAccessRec client; + XaceExtAccessRec ext; + XaceServerAccessRec server; + XaceScreenAccessRec screen; + XaceAuthAvailRec auth; + XaceKeyAvailRec key; + } u; int *prv = NULL; /* points to return value from callback */ va_list ap; /* argument list */ va_start(ap, hook); @@ -99,117 +110,86 @@ int XaceHook(int hook, ...) */ switch (hook) { - case XACE_RESOURCE_ACCESS: { - XaceResourceAccessRec rec; - rec.client = va_arg(ap, ClientPtr); - rec.id = va_arg(ap, XID); - rec.rtype = va_arg(ap, RESTYPE); - rec.res = va_arg(ap, pointer); - rec.ptype = va_arg(ap, RESTYPE); - rec.parent = va_arg(ap, pointer); - rec.access_mode = va_arg(ap, Mask); - rec.status = Success; /* default allow */ - calldata = &rec; - prv = &rec.status; + case XACE_RESOURCE_ACCESS: + u.res.client = va_arg(ap, ClientPtr); + u.res.id = va_arg(ap, XID); + u.res.rtype = va_arg(ap, RESTYPE); + u.res.res = va_arg(ap, pointer); + u.res.ptype = va_arg(ap, RESTYPE); + u.res.parent = va_arg(ap, pointer); + u.res.access_mode = va_arg(ap, Mask); + u.res.status = Success; /* default allow */ + prv = &u.res.status; break; - } - case XACE_DEVICE_ACCESS: { - XaceDeviceAccessRec rec; - rec.client = va_arg(ap, ClientPtr); - rec.dev = va_arg(ap, DeviceIntPtr); - rec.access_mode = va_arg(ap, Mask); - rec.status = Success; /* default allow */ - calldata = &rec; - prv = &rec.status; + case XACE_DEVICE_ACCESS: + u.dev.client = va_arg(ap, ClientPtr); + u.dev.dev = va_arg(ap, DeviceIntPtr); + u.dev.access_mode = va_arg(ap, Mask); + u.dev.status = Success; /* default allow */ + prv = &u.dev.status; break; - } - case XACE_SEND_ACCESS: { - XaceSendAccessRec rec; - rec.client = va_arg(ap, ClientPtr); - rec.dev = va_arg(ap, DeviceIntPtr); - rec.pWin = va_arg(ap, WindowPtr); - rec.events = va_arg(ap, xEventPtr); - rec.count = va_arg(ap, int); - rec.status = Success; /* default allow */ - calldata = &rec; - prv = &rec.status; + case XACE_SEND_ACCESS: + u.send.client = va_arg(ap, ClientPtr); + u.send.dev = va_arg(ap, DeviceIntPtr); + u.send.pWin = va_arg(ap, WindowPtr); + u.send.events = va_arg(ap, xEventPtr); + u.send.count = va_arg(ap, int); + u.send.status = Success; /* default allow */ + prv = &u.send.status; break; - } - case XACE_RECEIVE_ACCESS: { - XaceReceiveAccessRec rec; - rec.client = va_arg(ap, ClientPtr); - rec.pWin = va_arg(ap, WindowPtr); - rec.events = va_arg(ap, xEventPtr); - rec.count = va_arg(ap, int); - rec.status = Success; /* default allow */ - calldata = &rec; - prv = &rec.status; + case XACE_RECEIVE_ACCESS: + u.recv.client = va_arg(ap, ClientPtr); + u.recv.pWin = va_arg(ap, WindowPtr); + u.recv.events = va_arg(ap, xEventPtr); + u.recv.count = va_arg(ap, int); + u.recv.status = Success; /* default allow */ + prv = &u.recv.status; break; - } - case XACE_CLIENT_ACCESS: { - XaceClientAccessRec rec; - rec.client = va_arg(ap, ClientPtr); - rec.target = va_arg(ap, ClientPtr); - rec.access_mode = va_arg(ap, Mask); - rec.status = Success; /* default allow */ - calldata = &rec; - prv = &rec.status; + case XACE_CLIENT_ACCESS: + u.client.client = va_arg(ap, ClientPtr); + u.client.target = va_arg(ap, ClientPtr); + u.client.access_mode = va_arg(ap, Mask); + u.client.status = Success; /* default allow */ + prv = &u.client.status; break; - } - case XACE_EXT_ACCESS: { - XaceExtAccessRec rec; - rec.client = va_arg(ap, ClientPtr); - rec.ext = va_arg(ap, ExtensionEntry*); - rec.access_mode = DixGetAttrAccess; - rec.status = Success; /* default allow */ - calldata = &rec; - prv = &rec.status; + case XACE_EXT_ACCESS: + u.ext.client = va_arg(ap, ClientPtr); + u.ext.ext = va_arg(ap, ExtensionEntry*); + u.ext.access_mode = DixGetAttrAccess; + u.ext.status = Success; /* default allow */ + prv = &u.ext.status; break; - } - case XACE_SERVER_ACCESS: { - XaceServerAccessRec rec; - rec.client = va_arg(ap, ClientPtr); - rec.access_mode = va_arg(ap, Mask); - rec.status = Success; /* default allow */ - calldata = &rec; - prv = &rec.status; + case XACE_SERVER_ACCESS: + u.server.client = va_arg(ap, ClientPtr); + u.server.access_mode = va_arg(ap, Mask); + u.server.status = Success; /* default allow */ + prv = &u.server.status; break; - } case XACE_SCREEN_ACCESS: - case XACE_SCREENSAVER_ACCESS: { - XaceScreenAccessRec rec; - rec.client = va_arg(ap, ClientPtr); - rec.screen = va_arg(ap, ScreenPtr); - rec.access_mode = va_arg(ap, Mask); - rec.status = Success; /* default allow */ - calldata = &rec; - prv = &rec.status; + case XACE_SCREENSAVER_ACCESS: + u.screen.client = va_arg(ap, ClientPtr); + u.screen.screen = va_arg(ap, ScreenPtr); + u.screen.access_mode = va_arg(ap, Mask); + u.screen.status = Success; /* default allow */ + prv = &u.screen.status; break; - } - case XACE_AUTH_AVAIL: { - XaceAuthAvailRec rec; - rec.client = va_arg(ap, ClientPtr); - rec.authId = va_arg(ap, XID); - calldata = &rec; + case XACE_AUTH_AVAIL: + u.auth.client = va_arg(ap, ClientPtr); + u.auth.authId = va_arg(ap, XID); break; - } - case XACE_KEY_AVAIL: { - XaceKeyAvailRec rec; - rec.event = va_arg(ap, xEventPtr); - rec.keybd = va_arg(ap, DeviceIntPtr); - rec.count = va_arg(ap, int); - calldata = &rec; + case XACE_KEY_AVAIL: + u.key.event = va_arg(ap, xEventPtr); + u.key.keybd = va_arg(ap, DeviceIntPtr); + u.key.count = va_arg(ap, int); break; - } - default: { + default: va_end(ap); return 0; /* unimplemented hook number */ - } } va_end(ap); /* call callbacks and return result, if any. */ - CallCallbacks(&XaceHooks[hook], calldata); + CallCallbacks(&XaceHooks[hook], &u); return prv ? *prv : Success; } @@ -243,24 +223,21 @@ XaceCensorImage( unsigned int format, char *pBuf) { - ScreenPtr pScreen; RegionRec imageRegion; /* region representing x,y,w,h */ RegionRec censorRegion; /* region to obliterate */ BoxRec imageBox; int nRects; - pScreen = pDraw->pScreen; - imageBox.x1 = x; imageBox.y1 = y; imageBox.x2 = x + w; imageBox.y2 = y + h; - REGION_INIT(pScreen, &imageRegion, &imageBox, 1); - REGION_NULL(pScreen, &censorRegion); + RegionInit(&imageRegion, &imageBox, 1); + RegionNull(&censorRegion); /* censorRegion = imageRegion - visibleRegion */ - REGION_SUBTRACT(pScreen, &censorRegion, &imageRegion, pVisibleRegion); - nRects = REGION_NUM_RECTS(&censorRegion); + RegionSubtract(&censorRegion, &imageRegion, pVisibleRegion); + nRects = RegionNumRects(&censorRegion); if (nRects > 0) { /* we have something to censor */ GCPtr pScratchGC = NULL; @@ -274,13 +251,13 @@ XaceCensorImage( /* convert region to list-of-rectangles for PolyFillRect */ - pRects = xalloc(nRects * sizeof(xRectangle)); + pRects = malloc(nRects * sizeof(xRectangle)); if (!pRects) { failed = TRUE; goto failSafe; } - for (pBox = REGION_RECTS(&censorRegion), i = 0; + for (pBox = RegionRects(&censorRegion), i = 0; i < nRects; i++, pBox++) { @@ -324,14 +301,14 @@ XaceCensorImage( /* Censoring was not completed above. To be safe, wipe out * all the image data so that nothing trusted gets out. */ - bzero(pBuf, (int)(widthBytesLine * h)); + memset(pBuf, 0, (int)(widthBytesLine * h)); } - if (pRects) xfree(pRects); + free(pRects); if (pScratchGC) FreeScratchGC(pScratchGC); if (pPix) FreeScratchPixmapHeader(pPix); } - REGION_UNINIT(pScreen, &imageRegion); - REGION_UNINIT(pScreen, &censorRegion); + RegionUninit(&imageRegion); + RegionUninit(&censorRegion); } /* XaceCensorImage */ /* diff --git a/xserver/Xext/xcalibrate.c b/xserver/Xext/xcalibrate.c index 6e6461a5f..bff1c3168 100644 --- a/xserver/Xext/xcalibrate.c +++ b/xserver/Xext/xcalibrate.c @@ -54,13 +54,11 @@ xcalibrate_event_hook (int x, int y, int pressure, void *closure) xXCalibrateRawTouchscreenEvent ev; ev.type = XCalibrateEventBase + X_XCalibrateRawTouchscreen; - ev.sequenceNumber = pClient->sequence; ev.x = x; ev.y = y; ev.pressure = pressure; - if (!pClient->clientGone) - WriteEventsToClient (pClient, 1, (xEvent *) &ev); + WriteEventsToClient (pClient, 1, (xEvent *) &ev); } static int @@ -90,7 +88,7 @@ ProcXCalibrateQueryVersion (ClientPtr client) swaps(&rep.minorVersion, n); } WriteToClient(client, sizeof (xXCalibrateQueryVersionReply), (char *)&rep); - return (client->noClientException); + return Success; } static int @@ -160,7 +158,7 @@ ProcXCalibrateSetRawMode (ClientPtr client) swaps (&rep.status, n); } WriteToClient(client, sizeof (rep), (char *) &rep); - return (client->noClientException); + return Success; } static int @@ -200,7 +198,7 @@ ProcXCalibrateScreenToCoord (ClientPtr client) swaps (&rep.y, n); } WriteToClient(client, sizeof (rep), (char *) &rep); - return (client->noClientException); + return Success; } static int diff --git a/xserver/Xext/xcmisc.c b/xserver/Xext/xcmisc.c index 39079a294..986c870a5 100644 --- a/xserver/Xext/xcmisc.c +++ b/xserver/Xext/xcmisc.c @@ -83,7 +83,7 @@ ProcXCMiscGetVersion(ClientPtr client) swaps(&rep.minorVersion, n); } WriteToClient(client, sizeof(xXCMiscGetVersionReply), (char *)&rep); - return(client->noClientException); + return Success; } static int @@ -106,7 +106,7 @@ ProcXCMiscGetXIDRange(ClientPtr client) swapl(&rep.count, n); } WriteToClient(client, sizeof(xXCMiscGetXIDRangeReply), (char *)&rep); - return(client->noClientException); + return Success; } static int @@ -123,7 +123,7 @@ ProcXCMiscGetXIDList(ClientPtr client) if (stuff->count > UINT32_MAX / sizeof(XID)) return BadAlloc; - pids = (XID *)Xalloc(stuff->count * sizeof(XID)); + pids = (XID *)malloc(stuff->count * sizeof(XID)); if (!pids) { return BadAlloc; @@ -144,8 +144,8 @@ ProcXCMiscGetXIDList(ClientPtr client) client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; WriteSwappedDataToClient(client, count * sizeof(XID), pids); } - Xfree(pids); - return(client->noClientException); + free(pids); + return Success; } static int diff --git a/xserver/Xext/xf86bigfont.c b/xserver/Xext/xf86bigfont.c index a4eb3f659..8f0ddd93d 100644 --- a/xserver/Xext/xf86bigfont.c +++ b/xserver/Xext/xf86bigfont.c @@ -134,7 +134,7 @@ CheckForShmSyscall(void) badSysCall = TRUE; } signal(SIGSYS, oldHandler); - return (!badSysCall); + return !badSysCall; } #define MUST_CHECK_FOR_SHM_SYSCALL @@ -230,7 +230,7 @@ shmalloc( if (size < 3500) return (ShmDescPtr) NULL; - pDesc = xalloc(sizeof(ShmDescRec)); + pDesc = malloc(sizeof(ShmDescRec)); if (!pDesc) return (ShmDescPtr) NULL; @@ -239,7 +239,7 @@ shmalloc( if (shmid == -1) { ErrorF(XF86BIGFONTNAME " extension: shmget() failed, size = %u, %s\n", size, strerror(errno)); - xfree(pDesc); + free(pDesc); return (ShmDescPtr) NULL; } @@ -247,7 +247,7 @@ shmalloc( ErrorF(XF86BIGFONTNAME " extension: shmat() failed, size = %u, %s\n", size, strerror(errno)); shmctl(shmid, IPC_RMID, (void *) 0); - xfree(pDesc); + free(pDesc); return (ShmDescPtr) NULL; } @@ -276,7 +276,7 @@ shmdealloc( if (pDesc->next) pDesc->next->prev = pDesc->prev; *pDesc->prev = pDesc->next; - xfree(pDesc); + free(pDesc); } #endif @@ -368,7 +368,7 @@ ProcXF86BigfontQueryVersion( } WriteToClient(client, sizeof(xXF86BigfontQueryVersionReply), (char *)&reply); - return client->noClientException; + return Success; } static void @@ -404,7 +404,7 @@ ProcXF86BigfontQueryFont( int nCharInfos; int shmid; #ifdef HAS_SHM - ShmDescPtr pDesc; + ShmDescPtr pDesc = NULL; #else #define pDesc 0 #endif @@ -427,18 +427,8 @@ ProcXF86BigfontQueryFont( return BadLength; } #endif - client->errorValue = stuff->id; /* EITHER font or gc */ - dixLookupResourceByType((pointer *)&pFont, stuff->id, RT_FONT, - client, DixGetAttrAccess); - if (!pFont) { - GC *pGC; - dixLookupResourceByType((pointer *)&pGC, stuff->id, RT_GC, - client, DixGetAttrAccess); - if (!pGC) - return BadFont; /* procotol spec says only error is BadFont */ - - pFont = pGC->font; - } + if (dixLookupFontable(&pFont, stuff->id, client, DixGetAttrAccess) != Success) + return BadFont; /* procotol spec says only error is BadFont */ pmax = FONTINKMAX(pFont); pmin = FONTINKMIN(pFont); @@ -459,8 +449,6 @@ ProcXF86BigfontQueryFont( #ifdef HAS_SHM if (!badSysCall) pDesc = (ShmDescPtr) FontGetPrivate(pFont, FontShmdescIndex); - else - pDesc = NULL; if (pDesc) { pCI = (xCharInfo *) pDesc->attach_addr; if (stuff_flags & XF86Bigfont_FLAGS_Shm) @@ -474,7 +462,7 @@ ProcXF86BigfontQueryFont( shmid = pDesc->shmid; } else { #endif - pCI = xalloc(nCharInfos * sizeof(xCharInfo)); + pCI = malloc(nCharInfos * sizeof(xCharInfo)); if (!pCI) return BadAlloc; #ifdef HAS_SHM @@ -536,9 +524,9 @@ ProcXF86BigfontQueryFont( if (hashModulus > nCharInfos+1) hashModulus = nCharInfos+1; - tmp = xalloc((4*nCharInfos+1) * sizeof(CARD16)); + tmp = malloc((4*nCharInfos+1) * sizeof(CARD16)); if (!tmp) { - if (!pDesc) xfree(pCI); + if (!pDesc) free(pCI); return BadAlloc; } pIndex2UniqIndex = tmp; @@ -620,12 +608,12 @@ ProcXF86BigfontQueryFont( ? nUniqCharInfos * sizeof(xCharInfo) + (nCharInfos+1)/2 * 2 * sizeof(CARD16) : 0); - xXF86BigfontQueryFontReply* reply = xalloc(rlength); + xXF86BigfontQueryFontReply* reply = malloc(rlength); char* p; if (!reply) { if (nCharInfos > 0) { - if (shmid == -1) xfree(pIndex2UniqIndex); - if (!pDesc) xfree(pCI); + if (shmid == -1) free(pIndex2UniqIndex); + if (!pDesc) free(pCI); } return BadAlloc; } @@ -703,12 +691,12 @@ ProcXF86BigfontQueryFont( } } WriteToClient(client, rlength, (char *)reply); - xfree(reply); + free(reply); if (nCharInfos > 0) { - if (shmid == -1) xfree(pIndex2UniqIndex); - if (!pDesc) xfree(pCI); + if (shmid == -1) free(pIndex2UniqIndex); + if (!pDesc) free(pCI); } - return (client->noClientException); + return Success; } } diff --git a/xserver/Xext/xres.c b/xserver/Xext/xres.c index 109aa639a..06639a2cf 100644 --- a/xserver/Xext/xres.c +++ b/xserver/Xext/xres.c @@ -50,7 +50,7 @@ ProcXResQueryVersion (ClientPtr client) swaps(&rep.server_minor, n); } WriteToClient(client, sizeof (xXResQueryVersionReply), (char *)&rep); - return (client->noClientException); + return Success; } static int @@ -63,7 +63,7 @@ ProcXResQueryClients (ClientPtr client) REQUEST_SIZE_MATCH(xXResQueryClientsReq); - current_clients = xalloc(currentMaxClients * sizeof(int)); + current_clients = malloc(currentMaxClients * sizeof(int)); num_clients = 0; for(i = 0; i < currentMaxClients; i++) { @@ -101,9 +101,9 @@ ProcXResQueryClients (ClientPtr client) } } - xfree(current_clients); + free(current_clients); - return (client->noClientException); + return Success; } @@ -132,7 +132,7 @@ ProcXResQueryClientResources (ClientPtr client) return BadValue; } - counts = xcalloc(lastResourceType + 1, sizeof(int)); + counts = calloc(lastResourceType + 1, sizeof(int)); FindAllClientResources(clients[clientID], ResFindAllRes, counts); @@ -182,9 +182,9 @@ ProcXResQueryClientResources (ClientPtr client) } } - xfree(counts); + free(counts); - return (client->noClientException); + return Success; } static unsigned long @@ -295,7 +295,7 @@ ProcXResQueryClientPixmapBytes (ClientPtr client) } WriteToClient (client,sizeof(xXResQueryClientPixmapBytesReply),(char*)&rep); - return (client->noClientException); + return Success; } static int diff --git a/xserver/Xext/xselinux_ext.c b/xserver/Xext/xselinux_ext.c index aa5573455..93c1b595f 100644 --- a/xserver/Xext/xselinux_ext.c +++ b/xserver/Xext/xselinux_ext.c @@ -52,7 +52,7 @@ typedef struct { static security_context_t SELinuxCopyContext(char *ptr, unsigned len) { - security_context_t copy = xalloc(len + 1); + security_context_t copy = malloc(len + 1); if (!copy) return NULL; strncpy(copy, ptr, len); @@ -78,7 +78,7 @@ ProcSELinuxQueryVersion(ClientPtr client) swaps(&rep.server_minor, n); } WriteToClient(client, sizeof(rep), (char *)&rep); - return (client->noClientException); + return Success; } static int @@ -109,7 +109,7 @@ SELinuxSendContextReply(ClientPtr client, security_id_t sid) WriteToClient(client, sizeof(SELinuxGetContextReply), (char *)&rep); WriteToClient(client, len, ctx); freecon(ctx); - return client->noClientException; + return Success; } static int @@ -141,7 +141,7 @@ ProcSELinuxSetCreateContext(ClientPtr client, unsigned offset) rc = BadValue; } - xfree(ctx); + free(ctx); return rc; } @@ -198,7 +198,7 @@ ProcSELinuxSetDeviceContext(ClientPtr client) rc = Success; out: - xfree(ctx); + free(ctx); return rc; } @@ -334,7 +334,7 @@ SELinuxFreeItems(SELinuxListItemRec *items, int count) freecon(items[k].octx); freecon(items[k].dctx); } - xfree(items); + free(items); } static int @@ -345,7 +345,7 @@ SELinuxSendItemsToClient(ClientPtr client, SELinuxListItemRec *items, SELinuxListItemsReply rep; CARD32 *buf; - buf = xcalloc(size, sizeof(CARD32)); + buf = calloc(size, sizeof(CARD32)); if (size && !buf) { rc = BadAlloc; goto out; @@ -390,8 +390,8 @@ SELinuxSendItemsToClient(ClientPtr client, SELinuxListItemRec *items, WriteToClient(client, size * 4, (char *)buf); /* Free stuff and return */ - rc = client->noClientException; - xfree(buf); + rc = Success; + free(buf); out: SELinuxFreeItems(items, count); return rc; @@ -417,7 +417,7 @@ ProcSELinuxListProperties(ClientPtr client) count = 0; for (pProp = wUserProps(pWin); pProp; pProp = pProp->next) count++; - items = xcalloc(count, sizeof(SELinuxListItemRec)); + items = calloc(count, sizeof(SELinuxListItemRec)); if (count && !items) return BadAlloc; @@ -451,7 +451,7 @@ ProcSELinuxListSelections(ClientPtr client) count = 0; for (pSel = CurrentSelections; pSel; pSel = pSel->next) count++; - items = xcalloc(count, sizeof(SELinuxListItemRec)); + items = calloc(count, sizeof(SELinuxListItemRec)); if (count && !items) return BadAlloc; diff --git a/xserver/Xext/xselinux_hooks.c b/xserver/Xext/xselinux_hooks.c index 6c8c8cdbe..560e1e9bf 100644 --- a/xserver/Xext/xselinux_hooks.c +++ b/xserver/Xext/xselinux_hooks.c @@ -59,12 +59,9 @@ typedef struct { } SELinuxAuditRec; /* private state keys */ -static int subjectKeyIndex; -DevPrivateKey subjectKey = &subjectKeyIndex; -static int objectKeyIndex; -DevPrivateKey objectKey = &objectKeyIndex; -static int dataKeyIndex; -DevPrivateKey dataKey = &dataKeyIndex; +DevPrivateKeyRec subjectKeyRec; +DevPrivateKeyRec objectKeyRec; +DevPrivateKeyRec dataKeyRec; /* audit file descriptor */ static int audit_fd; @@ -151,12 +148,7 @@ SELinuxLabelClient(ClientPtr client) if (bytes <= 0) goto finish; - subj->command = xalloc(bytes); - if (!subj->command) - goto finish; - - memcpy(subj->command, path, bytes); - subj->command[bytes - 1] = 0; + strncpy(subj->command, path, COMMAND_LEN - 1); } finish: @@ -464,7 +456,7 @@ SELinuxExtension(CallbackListPtr *pcbl, pointer unused, pointer calldata) /* If this is a new object that needs labeling, do it now */ /* XXX there should be a separate callback for this */ - if (obj->sid == unlabeled_sid) { + if (obj->sid == NULL) { security_id_t sid; serv = dixLookupPrivate(&serverClient->devPrivates, subjectKey); @@ -809,39 +801,6 @@ SELinuxResourceState(CallbackListPtr *pcbl, pointer unused, pointer calldata) } -/* - * DevPrivates Callbacks - */ - -static void -SELinuxSubjectInit(CallbackListPtr *pcbl, pointer unused, pointer calldata) -{ - PrivateCallbackRec *rec = calldata; - SELinuxSubjectRec *subj = *rec->value; - - subj->sid = unlabeled_sid; - - avc_entry_ref_init(&subj->aeref); -} - -static void -SELinuxSubjectFree(CallbackListPtr *pcbl, pointer unused, pointer calldata) -{ - PrivateCallbackRec *rec = calldata; - SELinuxSubjectRec *subj = *rec->value; - - xfree(subj->command); -} - -static void -SELinuxObjectInit(CallbackListPtr *pcbl, pointer unused, pointer calldata) -{ - PrivateCallbackRec *rec = calldata; - SELinuxObjectRec *obj = *rec->value; - - obj->sid = unlabeled_sid; -} - static int netlink_fd; static void @@ -934,9 +893,9 @@ SELinuxFlaskInit(void) FatalError("SELinux: Failed to open the system audit log\n"); /* Allocate private storage */ - if (!dixRequestPrivate(subjectKey, sizeof(SELinuxSubjectRec)) || - !dixRequestPrivate(objectKey, sizeof(SELinuxObjectRec)) || - !dixRequestPrivate(dataKey, sizeof(SELinuxObjectRec))) + if (!dixRegisterPrivateKey(subjectKey, PRIVATE_XSELINUX, sizeof(SELinuxSubjectRec)) || + !dixRegisterPrivateKey(objectKey, PRIVATE_XSELINUX, sizeof(SELinuxObjectRec)) || + !dixRegisterPrivateKey(dataKey, PRIVATE_XSELINUX, sizeof(SELinuxObjectRec))) FatalError("SELinux: Failed to allocate private storage.\n"); /* Create atoms for doing window labeling */ @@ -953,11 +912,6 @@ SELinuxFlaskInit(void) NULL); /* Register callbacks */ - ret &= dixRegisterPrivateInitFunc(subjectKey, SELinuxSubjectInit, NULL); - ret &= dixRegisterPrivateDeleteFunc(subjectKey, SELinuxSubjectFree, NULL); - ret &= dixRegisterPrivateInitFunc(objectKey, SELinuxObjectInit, NULL); - ret &= dixRegisterPrivateInitFunc(dataKey, SELinuxObjectInit, NULL); - ret &= AddCallback(&ClientStateCallback, SELinuxClientState, NULL); ret &= AddCallback(&ResourceStateCallback, SELinuxResourceState, NULL); diff --git a/xserver/Xext/xselinux_label.c b/xserver/Xext/xselinux_label.c index 9b5023a53..e5929fa06 100644 --- a/xserver/Xext/xselinux_label.c +++ b/xserver/Xext/xselinux_label.c @@ -62,7 +62,7 @@ SELinuxArraySet(SELinuxArrayRec *rec, unsigned key, void *val) { if (key >= rec->size) { /* Need to increase size of array */ - rec->array = xrealloc(rec->array, (key + 1) * sizeof(val)); + rec->array = realloc(rec->array, (key + 1) * sizeof(val)); if (!rec->array) return FALSE; memset(rec->array + rec->size, 0, (key - rec->size + 1) * sizeof(val)); @@ -79,10 +79,10 @@ SELinuxArrayFree(SELinuxArrayRec *rec, int free_elements) if (free_elements) { unsigned i = rec->size; while (i) - xfree(rec->array[--i]); + free(rec->array[--i]); } - xfree(rec->array); + free(rec->array); rec->size = 0; rec->array = NULL; } @@ -132,7 +132,7 @@ SELinuxAtomToSID(Atom atom, int prop, SELinuxObjectRec **obj_rtn) rec = SELinuxArrayGet(&arr_atoms, atom); if (!rec) { - rec = xcalloc(1, sizeof(SELinuxAtomRec)); + rec = calloc(1, sizeof(SELinuxAtomRec)); if (!rec || !SELinuxArraySet(&arr_atoms, atom, rec)) return BadAlloc; } diff --git a/xserver/Xext/xselinuxint.h b/xserver/Xext/xselinuxint.h index 854a57dd7..011a10370 100644 --- a/xserver/Xext/xselinuxint.h +++ b/xserver/Xext/xselinuxint.h @@ -36,6 +36,8 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * Types */ +#define COMMAND_LEN 64 + /* subject state (clients and devices only) */ typedef struct { security_id_t sid; @@ -46,7 +48,7 @@ typedef struct { security_id_t sel_use_sid; security_id_t prp_use_sid; struct avc_entry_ref aeref; - char *command; + char command[COMMAND_LEN]; int privileged; } SELinuxSubjectRec; @@ -60,9 +62,12 @@ typedef struct { * Globals */ -extern DevPrivateKey subjectKey; -extern DevPrivateKey objectKey; -extern DevPrivateKey dataKey; +extern DevPrivateKeyRec subjectKeyRec; +#define subjectKey (&subjectKeyRec) +extern DevPrivateKeyRec objectKeyRec; +#define objectKey (&objectKeyRec) +extern DevPrivateKeyRec dataKeyRec; +#define dataKey (&dataKeyRec) /* * Label functions diff --git a/xserver/Xext/xtest.c b/xserver/Xext/xtest.c index bb52c1031..7268768b0 100644 --- a/xserver/Xext/xtest.c +++ b/xserver/Xext/xtest.c @@ -62,10 +62,6 @@ extern int DeviceValuator; * other's memory */ static EventListPtr xtest_evlist; -/* Used to store if a device is an XTest Virtual device */ -static int XTestDevicePrivateKeyIndex; -DevPrivateKey XTestDevicePrivateKey = &XTestDevicePrivateKeyIndex; - /** * xtestpointer * is the virtual pointer for XTest. It is the first slave @@ -126,7 +122,7 @@ ProcXTestGetVersion(ClientPtr client) swaps(&rep.minorVersion, n); } WriteToClient(client, sizeof(xXTestGetVersionReply), (char *)&rep); - return(client->noClientException); + return Success; } static int @@ -153,7 +149,7 @@ ProcXTestCompareCursor(ClientPtr client) if (rc != Success) { client->errorValue = stuff->cursor; - return (rc == BadValue) ? BadCursor : rc; + return rc; } } rep.type = X_Reply; @@ -164,7 +160,7 @@ ProcXTestCompareCursor(ClientPtr client) swaps(&rep.sequenceNumber, n); } WriteToClient(client, sizeof(xXTestCompareCursorReply), (char *)&rep); - return(client->noClientException); + return Success; } static int @@ -358,7 +354,8 @@ ProcXTestFakeInput(ClientPtr client) activateTime.milliseconds = ms; ev->u.keyButtonPointer.time = 0; - /* see mbuf.c:QueueDisplayRequest for code similar to this */ + /* see mbuf.c:QueueDisplayRequest (from the deprecated Multibuffer + * extension) for code similar to this */ if (!ClientSleepUntil(client, &activateTime, NULL, NULL)) { @@ -456,7 +453,7 @@ ProcXTestFakeInput(ClientPtr client) if (need_ptr_update) miPointerUpdateSprite(dev); - return client->noClientException; + return Success; } static int @@ -468,13 +465,13 @@ ProcXTestGrabControl(ClientPtr client) if ((stuff->impervious != xTrue) && (stuff->impervious != xFalse)) { client->errorValue = stuff->impervious; - return(BadValue); + return BadValue; } if (stuff->impervious) MakeClientGrabImpervious(client); else MakeClientGrabPervious(client); - return(client->noClientException); + return Success; } static int @@ -636,7 +633,7 @@ int AllocXTestDevice (ClientPtr client, char* name, { int retval; int len = strlen(name); - char *xtestname = xcalloc(len + 7, 1 ); + char *xtestname = calloc(len + 7, 1 ); char dummy = 1; strncpy( xtestname, name, len); @@ -644,8 +641,8 @@ int AllocXTestDevice (ClientPtr client, char* name, retval = AllocDevicePair( client, xtestname, ptr, keybd, CorePointerProc, CoreKeyboardProc, FALSE); if ( retval == Success ){ - dixSetPrivate(&((*ptr)->devPrivates), XTestDevicePrivateKey, (void *)(intptr_t)master_ptr->id); - dixSetPrivate(&((*keybd)->devPrivates), XTestDevicePrivateKey, (void *)(intptr_t)master_keybd->id); + (*ptr)->xtest_master_id = master_ptr->id; + (*keybd)->xtest_master_id = master_keybd->id; XIChangeDeviceProperty(*ptr, XIGetKnownProperty(XI_PROP_XTEST_DEVICE), XA_INTEGER, 8, PropModeReplace, 1, &dummy, @@ -659,7 +656,7 @@ int AllocXTestDevice (ClientPtr client, char* name, XIRegisterPropertyHandler(*keybd, DeviceSetXTestProperty, NULL, NULL); } - xfree( xtestname ); + free( xtestname ); return retval; } @@ -673,23 +670,15 @@ int AllocXTestDevice (ClientPtr client, char* name, BOOL IsXTestDevice(DeviceIntPtr dev, DeviceIntPtr master) { - int is_XTest = FALSE; - int mid; - void *tmp; /* shut up, gcc! */ - if (IsMaster(dev)) - return is_XTest; - - tmp = dixLookupPrivate(&dev->devPrivates, XTestDevicePrivateKey); - mid = (intptr_t)tmp; + return FALSE; /* deviceid 0 is reserved for XIAllDevices, non-zero mid means XTest * device */ - if ((!master && mid) || - (master && mid == master->id)) - is_XTest = TRUE; + if (master) + return dev->xtest_master_id == master->id; - return is_XTest; + return dev->xtest_master_id != 0; } /** diff --git a/xserver/Xext/xvdisp.c b/xserver/Xext/xvdisp.c index b6fc34ff9..deddebd4b 100644 --- a/xserver/Xext/xvdisp.c +++ b/xserver/Xext/xvdisp.c @@ -460,7 +460,7 @@ ProcXvQueryAdaptors(ClientPtr client) } - return (client->noClientException); + return Success; } static int @@ -483,7 +483,7 @@ ProcXvQueryEncodings(ClientPtr client) if ((status = _AllocatePort(stuff->port, pPort)) != Success) { client->errorValue = stuff->port; - return (status); + return status; } rep.type = X_Reply; @@ -520,7 +520,7 @@ ProcXvQueryEncodings(ClientPtr client) pe++; } - return (client->noClientException); + return Success; } static int @@ -540,14 +540,14 @@ ProcXvPutVideo(ClientPtr client) if ((status = _AllocatePort(stuff->port, pPort)) != Success) { client->errorValue = stuff->port; - return (status); + return status; } if (!(pPort->pAdaptor->type & XvInputMask) || !(pPort->pAdaptor->type & XvVideoMask)) { client->errorValue = stuff->port; - return (BadMatch); + return BadMatch; } status = XvdiMatchPort(pPort, pDraw); @@ -578,14 +578,14 @@ ProcXvPutStill(ClientPtr client) if ((status = _AllocatePort(stuff->port, pPort)) != Success) { client->errorValue = stuff->port; - return (status); + return status; } if (!(pPort->pAdaptor->type & XvInputMask) || !(pPort->pAdaptor->type & XvStillMask)) { client->errorValue = stuff->port; - return (BadMatch); + return BadMatch; } status = XvdiMatchPort(pPort, pDraw); @@ -616,14 +616,14 @@ ProcXvGetVideo(ClientPtr client) if ((status = _AllocatePort(stuff->port, pPort)) != Success) { client->errorValue = stuff->port; - return (status); + return status; } if (!(pPort->pAdaptor->type & XvOutputMask) || !(pPort->pAdaptor->type & XvVideoMask)) { client->errorValue = stuff->port; - return (BadMatch); + return BadMatch; } status = XvdiMatchPort(pPort, pDraw); @@ -654,14 +654,14 @@ ProcXvGetStill(ClientPtr client) if ((status = _AllocatePort(stuff->port, pPort)) != Success) { client->errorValue = stuff->port; - return (status); + return status; } if (!(pPort->pAdaptor->type & XvOutputMask) || !(pPort->pAdaptor->type & XvStillMask)) { client->errorValue = stuff->port; - return (BadMatch); + return BadMatch; } status = XvdiMatchPort(pPort, pDraw); @@ -703,7 +703,7 @@ ProcXvSelectPortNotify(ClientPtr client) if ((status = _AllocatePort(stuff->port, pPort)) != Success) { client->errorValue = stuff->port; - return (status); + return status; } return XvdiSelectPortNotify(client, pPort, stuff->onoff); @@ -723,7 +723,7 @@ ProcXvGrabPort(ClientPtr client) if ((status = _AllocatePort(stuff->port, pPort)) != Success) { client->errorValue = stuff->port; - return (status); + return status; } status = XvdiGrabPort(client, pPort, stuff->time, &result); @@ -756,7 +756,7 @@ ProcXvUngrabPort(ClientPtr client) if ((status = _AllocatePort(stuff->port, pPort)) != Success) { client->errorValue = stuff->port; - return (status); + return status; } return XvdiUngrabPort(client, pPort, stuff->time); @@ -776,7 +776,7 @@ ProcXvStopVideo(ClientPtr client) if ((status = _AllocatePort(stuff->port, pPort)) != Success) { client->errorValue = stuff->port; - return (status); + return status; } rc = dixLookupDrawable(&pDraw, stuff->drawable, client, 0, DixWriteAccess); @@ -799,13 +799,13 @@ ProcXvSetPortAttribute(ClientPtr client) if ((status = _AllocatePort(stuff->port, pPort)) != Success) { client->errorValue = stuff->port; - return (status); + return status; } if (!ValidAtom(stuff->attribute)) { client->errorValue = stuff->attribute; - return(BadAtom); + return BadAtom; } status = XvdiSetPortAttribute(client, pPort, stuff->attribute, stuff->value); @@ -833,13 +833,13 @@ ProcXvGetPortAttribute(ClientPtr client) if ((status = _AllocatePort(stuff->port, pPort)) != Success) { client->errorValue = stuff->port; - return (status); + return status; } if (!ValidAtom(stuff->attribute)) { client->errorValue = stuff->attribute; - return(BadAtom); + return BadAtom; } status = XvdiGetPortAttribute(client, pPort, stuff->attribute, &value); @@ -874,7 +874,7 @@ ProcXvQueryBestSize(ClientPtr client) if ((status = _AllocatePort(stuff->port, pPort)) != Success) { client->errorValue = stuff->port; - return (status); + return status; } rep.type = X_Reply; @@ -911,7 +911,7 @@ ProcXvQueryPortAttributes(ClientPtr client) if ((status = _AllocatePort(stuff->port, pPort)) != Success) { client->errorValue = stuff->port; - return (status); + return status; } rep.type = X_Reply; @@ -967,14 +967,14 @@ ProcXvPutImage(ClientPtr client) if ((status = _AllocatePort(stuff->port, pPort)) != Success) { client->errorValue = stuff->port; - return (status); + return status; } if (!(pPort->pAdaptor->type & XvImageMask) || !(pPort->pAdaptor->type & XvInputMask)) { client->errorValue = stuff->port; - return (BadMatch); + return BadMatch; } status = XvdiMatchPort(pPort, pDraw); @@ -1025,7 +1025,6 @@ typedef struct _ShmDesc { } ShmDescRec, *ShmDescPtr; extern RESTYPE ShmSegType; -extern int BadShmSegCode; extern int ShmCompletionCode; static int @@ -1048,14 +1047,14 @@ ProcXvShmPutImage(ClientPtr client) if ((status = _AllocatePort(stuff->port, pPort)) != Success) { client->errorValue = stuff->port; - return (status); + return status; } if (!(pPort->pAdaptor->type & XvImageMask) || !(pPort->pAdaptor->type & XvInputMask)) { client->errorValue = stuff->port; - return (BadMatch); + return BadMatch; } status = XvdiMatchPort(pPort, pDraw); @@ -1077,7 +1076,7 @@ ProcXvShmPutImage(ClientPtr client) status = dixLookupResourceByType((pointer *)&shmdesc, stuff->shmseg, ShmSegType, serverClient, DixReadAccess); if (status != Success) - return (status == BadValue) ? BadShmSegCode : status; + return status; width = stuff->width; height = stuff->height; @@ -1100,7 +1099,6 @@ ProcXvShmPutImage(ClientPtr client) ev.type = ShmCompletionCode; ev.drawable = stuff->drawable; - ev.sequenceNumber = client->sequence; ev.minorEvent = xv_ShmPutImage; ev.majorEvent = XvReqCode; ev.shmseg = stuff->shmseg; @@ -1115,7 +1113,7 @@ static int ProcXvShmPutImage(ClientPtr client) { SendErrorToClient(client, XvReqCode, xv_ShmPutImage, 0, BadImplementation); - return(BadImplementation); + return BadImplementation; } #endif @@ -1157,7 +1155,7 @@ ProcXvQueryImageAttributes(ClientPtr client) num_planes = pImage->num_planes; - if(!(offsets = xalloc(num_planes << 3))) + if(!(offsets = malloc(num_planes << 3))) return BadAlloc; pitches = offsets + num_planes; @@ -1180,7 +1178,7 @@ ProcXvQueryImageAttributes(ClientPtr client) SwapLongs((CARD32*)offsets, planeLength); WriteToClient(client, planeLength << 2, (char*)offsets); - xfree(offsets); + free(offsets); return Success; } @@ -1269,7 +1267,7 @@ ProcXvDispatch(ClientPtr client) if (stuff->data > xvNumRequests) { SendErrorToClient(client, XvReqCode, stuff->data, 0, BadRequest); - return(BadRequest); + return BadRequest; } return XvProcVector[stuff->data](client); @@ -1593,7 +1591,7 @@ SProcXvDispatch(ClientPtr client) if (stuff->data > xvNumRequests) { SendErrorToClient(client, XvReqCode, stuff->data, 0, BadRequest); - return(BadRequest); + return BadRequest; } return SXvProcVector[stuff->data](client); @@ -1616,7 +1614,7 @@ XineramaXvStopVideo(ClientPtr client) result = dixLookupResourceByType((pointer *)&port, stuff->port, XvXRTPort, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? _XvBadPort : result; + return result; FOR_NSCREENS_BACKWARD(i) { if(port->info[i].id) { @@ -1641,7 +1639,7 @@ XineramaXvSetPortAttribute(ClientPtr client) result = dixLookupResourceByType((pointer *)&port, stuff->port, XvXRTPort, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? _XvBadPort : result; + return result; FOR_NSCREENS_BACKWARD(i) { if(port->info[i].id) { @@ -1672,12 +1670,12 @@ XineramaXvShmPutImage(ClientPtr client) result = dixLookupResourceByType((pointer *)&gc, stuff->gc, XRT_GC, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? BadGC : result; + return result; result = dixLookupResourceByType((pointer *)&port, stuff->port, XvXRTPort, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? _XvBadPort : result; + return result; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; @@ -1692,8 +1690,8 @@ XineramaXvShmPutImage(ClientPtr client) stuff->drw_x = x; stuff->drw_y = y; if(isRoot) { - stuff->drw_x -= panoramiXdataPtr[i].x; - stuff->drw_y -= panoramiXdataPtr[i].y; + stuff->drw_x -= screenInfo.screens[i]->x; + stuff->drw_y -= screenInfo.screens[i]->y; } stuff->send_event = (send_event && !i) ? 1 : 0; @@ -1724,12 +1722,12 @@ XineramaXvPutImage(ClientPtr client) result = dixLookupResourceByType((pointer *)&gc, stuff->gc, XRT_GC, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? BadGC : result; + return result; result = dixLookupResourceByType((pointer *)&port, stuff->port, XvXRTPort, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? _XvBadPort : result; + return result; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; @@ -1744,8 +1742,8 @@ XineramaXvPutImage(ClientPtr client) stuff->drw_x = x; stuff->drw_y = y; if(isRoot) { - stuff->drw_x -= panoramiXdataPtr[i].x; - stuff->drw_y -= panoramiXdataPtr[i].y; + stuff->drw_x -= screenInfo.screens[i]->x; + stuff->drw_y -= screenInfo.screens[i]->y; } result = ProcXvPutImage(client); @@ -1772,12 +1770,12 @@ XineramaXvPutVideo(ClientPtr client) result = dixLookupResourceByType((pointer *)&gc, stuff->gc, XRT_GC, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? BadGC : result; + return result; result = dixLookupResourceByType((pointer *)&port, stuff->port, XvXRTPort, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? _XvBadPort : result; + return result; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; @@ -1792,8 +1790,8 @@ XineramaXvPutVideo(ClientPtr client) stuff->drw_x = x; stuff->drw_y = y; if(isRoot) { - stuff->drw_x -= panoramiXdataPtr[i].x; - stuff->drw_y -= panoramiXdataPtr[i].y; + stuff->drw_x -= screenInfo.screens[i]->x; + stuff->drw_y -= screenInfo.screens[i]->y; } result = ProcXvPutVideo(client); @@ -1820,12 +1818,12 @@ XineramaXvPutStill(ClientPtr client) result = dixLookupResourceByType((pointer *)&gc, stuff->gc, XRT_GC, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? BadGC : result; + return result; result = dixLookupResourceByType((pointer *)&port, stuff->port, XvXRTPort, client, DixReadAccess); if (result != Success) - return (result == BadValue) ? _XvBadPort : result; + return result; isRoot = (draw->type == XRT_WINDOW) && draw->u.win.root; @@ -1840,8 +1838,8 @@ XineramaXvPutStill(ClientPtr client) stuff->drw_x = x; stuff->drw_y = y; if(isRoot) { - stuff->drw_x -= panoramiXdataPtr[i].x; - stuff->drw_y -= panoramiXdataPtr[i].y; + stuff->drw_x -= screenInfo.screens[i]->x; + stuff->drw_y -= screenInfo.screens[i]->y; } result = ProcXvPutStill(client); @@ -1850,110 +1848,92 @@ XineramaXvPutStill(ClientPtr client) return result; } +static Bool +isImageAdaptor(XvAdaptorPtr pAdapt) +{ + return (pAdapt->type & XvImageMask) && (pAdapt->nImages > 0); +} + +static Bool +hasOverlay(XvAdaptorPtr pAdapt) +{ + int i; + for(i = 0; i < pAdapt->nAttributes; i++) + if(!strcmp(pAdapt->pAttributes[i].name, "XV_COLORKEY")) + return TRUE; + return FALSE; +} + +static XvAdaptorPtr +matchAdaptor(ScreenPtr pScreen, XvAdaptorPtr refAdapt, Bool isOverlay) +{ + int i; + XvScreenPtr xvsp = dixLookupPrivate(&pScreen->devPrivates, XvGetScreenKey()); + /* Do not try to go on if xv is not supported on this screen */ + if(xvsp == NULL) + return NULL; + + /* if the adaptor has the same name it's a perfect match */ + for(i = 0; i < xvsp->nAdaptors; i++) { + XvAdaptorPtr pAdapt = xvsp->pAdaptors + i; + if(!strcmp(refAdapt->name, pAdapt->name)) + return pAdapt; + } + + /* otherwise we only look for XvImage adaptors */ + if(!isImageAdaptor(refAdapt)) + return NULL; + + /* prefer overlay/overlay non-overlay/non-overlay pairing */ + for(i = 0; i < xvsp->nAdaptors; i++) { + XvAdaptorPtr pAdapt = xvsp->pAdaptors + i; + if(isImageAdaptor(pAdapt) && isOverlay == hasOverlay(pAdapt)) + return pAdapt; + } + + /* but we'll take any XvImage pairing if we can get it */ + for(i = 0; i < xvsp->nAdaptors; i++) { + XvAdaptorPtr pAdapt = xvsp->pAdaptors + i; + if(isImageAdaptor(pAdapt)) + return pAdapt; + } + return NULL; +} + void XineramifyXv(void) { - ScreenPtr pScreen, screen0 = screenInfo.screens[0]; - XvScreenPtr xvsp0 = (XvScreenPtr)dixLookupPrivate(&screen0->devPrivates, - XvGetScreenKey()); - XvAdaptorPtr refAdapt, pAdapt; - XvAttributePtr pAttr; - XvScreenPtr xvsp; - Bool isOverlay, hasOverlay; - PanoramiXRes *port; + XvScreenPtr xvsp0 = dixLookupPrivate(&screenInfo.screens[0]->devPrivates, XvGetScreenKey()); XvAdaptorPtr MatchingAdaptors[MAXSCREENS]; - int i, j, k, l; + int i, j, k; XvXRTPort = CreateNewResourceType(XineramaDeleteResource, "XvXRTPort"); if (!xvsp0 || !XvXRTPort) return; + SetResourceTypeErrorValue(XvXRTPort, _XvBadPort); for(i = 0; i < xvsp0->nAdaptors; i++) { - refAdapt = xvsp0->pAdaptors + i; - - bzero(MatchingAdaptors, sizeof(XvAdaptorPtr) * MAXSCREENS); - - MatchingAdaptors[0] = refAdapt; - + Bool isOverlay; + XvAdaptorPtr refAdapt = xvsp0->pAdaptors + i; if(!(refAdapt->type & XvInputMask)) continue; - - isOverlay = FALSE; - for(j = 0; j < refAdapt->nAttributes; j++) { - pAttr = refAdapt->pAttributes + j; - if(!strcmp(pAttr->name, "XV_COLORKEY")) { - isOverlay = TRUE; - break; - } - } - - for(j = 1; j < PanoramiXNumScreens; j++) { - pScreen = screenInfo.screens[j]; - xvsp = (XvScreenPtr)dixLookupPrivate(&pScreen->devPrivates, - XvGetScreenKey()); - /* Do not try to go on if xv is not supported on this screen */ - if (xvsp==NULL) continue ; - - /* if the adaptor has the same name it's a perfect match */ - for(k = 0; k < xvsp->nAdaptors; k++) { - pAdapt = xvsp->pAdaptors + k; - if(!strcmp(refAdapt->name, pAdapt->name)) { - MatchingAdaptors[j] = pAdapt; - break; - } - } - if(MatchingAdaptors[j]) continue; /* found it */ - - /* otherwise we only look for XvImage adaptors */ - if(!(refAdapt->type & XvImageMask)) continue; - if(refAdapt->nImages <= 0) continue; - - /* prefer overlay/overlay non-overlay/non-overlay pairing */ - for(k = 0; k < xvsp->nAdaptors; k++) { - pAdapt = xvsp->pAdaptors + k; - if((pAdapt->type & XvImageMask) && (pAdapt->nImages > 0)) { - hasOverlay = FALSE; - for(l = 0; l < pAdapt->nAttributes; l++) { - if(!strcmp(pAdapt->pAttributes[l].name, "XV_COLORKEY")) { - hasOverlay = TRUE; - break; - } - } - if(isOverlay && hasOverlay) { - MatchingAdaptors[j] = pAdapt; - break; - } - else if(!isOverlay && !hasOverlay) { - MatchingAdaptors[j] = pAdapt; - break; - } - } - } - - if(MatchingAdaptors[j]) continue; /* found it */ - - /* but we'll take any XvImage pairing if we can get it */ - - for(k = 0; k < xvsp->nAdaptors; k++) { - pAdapt = xvsp->pAdaptors + k; - if((pAdapt->type & XvImageMask) && (pAdapt->nImages > 0)) { - MatchingAdaptors[j] = pAdapt; - break; - } - } - } + + MatchingAdaptors[0] = refAdapt; + isOverlay = hasOverlay(refAdapt); + for(j = 1; j < PanoramiXNumScreens; j++) + MatchingAdaptors[j] = matchAdaptor(screenInfo.screens[j], refAdapt, isOverlay); /* now create a resource for each port */ for(j = 0; j < refAdapt->nPorts; j++) { - if(!(port = xalloc(sizeof(PanoramiXRes)))) + PanoramiXRes *port = malloc(sizeof(PanoramiXRes)); + if(!port) break; - port->info[0].id = MatchingAdaptors[0]->base_id + j; - AddResource(port->info[0].id, XvXRTPort, port); - for(k = 1; k < PanoramiXNumScreens; k++) { + for(k = 0; k < PanoramiXNumScreens; k++) { if(MatchingAdaptors[k] && (MatchingAdaptors[k]->nPorts > j)) port->info[k].id = MatchingAdaptors[k]->base_id + j; else port->info[k].id = 0; } + AddResource(port->info[0].id, XvXRTPort, port); } } diff --git a/xserver/Xext/xvdix.h b/xserver/Xext/xvdix.h index 44f8f6b18..a2106150e 100644 --- a/xserver/Xext/xvdix.h +++ b/xserver/Xext/xvdix.h @@ -206,7 +206,7 @@ typedef struct _XvPortRec { int rc = dixLookupResourceByType((pointer *)&(pPort), portID,\ XvRTPort, client, mode);\ if (rc != Success)\ - return (rc == BadValue) ? _XvBadPort : rc;\ + return rc;\ } typedef struct { diff --git a/xserver/Xext/xvmain.c b/xserver/Xext/xvmain.c index 05a68907a..12b4c5184 100644 --- a/xserver/Xext/xvmain.c +++ b/xserver/Xext/xvmain.c @@ -105,8 +105,8 @@ SOFTWARE. #endif #include "xvdisp.h" -static int XvScreenKeyIndex; -static DevPrivateKey XvScreenKey = &XvScreenKeyIndex; +static DevPrivateKeyRec XvScreenKeyRec; +#define XvScreenKey (&XvScreenKeyRec) unsigned long XvExtensionGeneration = 0; unsigned long XvScreenGeneration = 0; unsigned long XvResourceGeneration = 0; @@ -126,8 +126,6 @@ unsigned long XvRTPortNotify; /* EXTERNAL */ -extern XID clientErrorValue; - static void WriteSwappedVideoNotifyEvent(xvEvent *, xvEvent *); static void WriteSwappedPortNotifyEvent(xvEvent *, xvEvent *); static Bool CreateResourceTypes(void); @@ -158,6 +156,9 @@ XvExtensionInit(void) { ExtensionEntry *extEntry; + if (!dixRegisterPrivateKey(&XvScreenKeyRec, PRIVATE_SCREEN, 0)) + return; + /* LOOK TO SEE IF ANY SCREENS WERE INITIALIZED; IF NOT THEN INIT GLOBAL VARIABLES SO THE EXTENSION CAN FUNCTION */ if (XvScreenGeneration != serverGeneration) @@ -194,6 +195,7 @@ XvExtensionInit(void) EventSwapVector[XvEventBase+XvPortNotify] = (EventSwapPtr)WriteSwappedPortNotifyEvent; + SetResourceTypeErrorValue(XvRTPort, _XvBadPort); (void)MakeAtom(XvName, strlen(XvName), xTrue); } @@ -270,6 +272,9 @@ XvScreenInit(ScreenPtr pScreen) XvScreenGeneration = serverGeneration; } + if (!dixRegisterPrivateKey(&XvScreenKeyRec, PRIVATE_SCREEN, 0)) + return BadAlloc; + if (dixLookupPrivate(&pScreen->devPrivates, XvScreenKey)) { ErrorF("XvScreenInit: screen devPrivates ptr non-NULL before init\n"); @@ -277,7 +282,7 @@ XvScreenInit(ScreenPtr pScreen) /* ALLOCATE SCREEN PRIVATE RECORD */ - pxvs = xalloc (sizeof (XvScreenRec)); + pxvs = malloc(sizeof (XvScreenRec)); if (!pxvs) { ErrorF("XvScreenInit: Unable to allocate screen private structure\n"); @@ -285,7 +290,6 @@ XvScreenInit(ScreenPtr pScreen) } dixSetPrivate(&pScreen->devPrivates, XvScreenKey, pxvs); - pxvs->DestroyPixmap = pScreen->DestroyPixmap; pxvs->DestroyWindow = pScreen->DestroyWindow; @@ -314,7 +318,7 @@ XvCloseScreen( (* pxvs->ddCloseScreen)(ii, pScreen); - xfree(pxvs); + free(pxvs); dixSetPrivate(&pScreen->devPrivates, XvScreenKey, NULL); @@ -509,7 +513,7 @@ XvdiDestroyVideoNotifyList(pointer pn, XID id) { npn = cpn->next; if (cpn->client) FreeResource(cpn->id, XvRTVideoNotify); - xfree(cpn); + free(cpn); cpn = npn; } return Success; @@ -532,17 +536,12 @@ XvdiSendVideoNotify(XvPortPtr pPort, DrawablePtr pDraw, int reason) while (pn) { - if (pn->client) - { - event.u.u.type = XvEventBase + XvVideoNotify; - event.u.u.sequenceNumber = pn->client->sequence; - event.u.videoNotify.time = currentTime.milliseconds; - event.u.videoNotify.drawable = pDraw->id; - event.u.videoNotify.port = pPort->id; - event.u.videoNotify.reason = reason; - TryClientEvents(pn->client, NULL, (xEventPtr)&event, 1, - NoEventMask, NoEventMask, NullGrab); - } + event.u.u.type = XvEventBase + XvVideoNotify; + event.u.videoNotify.time = currentTime.milliseconds; + event.u.videoNotify.drawable = pDraw->id; + event.u.videoNotify.port = pPort->id; + event.u.videoNotify.reason = reason; + WriteEventsToClient(pn->client, 1, (xEventPtr)&event); pn = pn->next; } @@ -564,17 +563,12 @@ XvdiSendPortNotify( while (pn) { - if (pn->client) - { - event.u.u.type = XvEventBase + XvPortNotify; - event.u.u.sequenceNumber = pn->client->sequence; - event.u.portNotify.time = currentTime.milliseconds; - event.u.portNotify.port = pPort->id; - event.u.portNotify.attribute = attribute; - event.u.portNotify.value = value; - TryClientEvents(pn->client, NULL, (xEventPtr)&event, 1, - NoEventMask, NoEventMask, NullGrab); - } + event.u.u.type = XvEventBase + XvPortNotify; + event.u.portNotify.time = currentTime.milliseconds; + event.u.portNotify.port = pPort->id; + event.u.portNotify.attribute = attribute; + event.u.portNotify.value = value; + WriteEventsToClient(pn->client, 1, (xEventPtr)&event); pn = pn->next; } @@ -640,7 +634,7 @@ XvdiPutVideo( pPort->time = currentTime; - return (Success); + return Success; } @@ -770,7 +764,7 @@ XvdiGetVideo( pPort->time = currentTime; - return (Success); + return Success; } @@ -928,12 +922,12 @@ XvdiSelectVideoNotify( if (!pn) { - if (!(tpn = xalloc(sizeof(XvVideoNotifyRec)))) + if (!(tpn = malloc(sizeof(XvVideoNotifyRec)))) return BadAlloc; tpn->next = NULL; if (!AddResource(pDraw->id, XvRTVideoNotifyList, tpn)) { - xfree(tpn); + free(tpn); return BadAlloc; } } @@ -966,7 +960,7 @@ XvdiSelectVideoNotify( } else { - if (!(tpn = xalloc(sizeof(XvVideoNotifyRec)))) + if (!(tpn = malloc(sizeof(XvVideoNotifyRec)))) return BadAlloc; tpn->next = pn->next; pn->next = tpn; @@ -1024,7 +1018,7 @@ XvdiSelectPortNotify( if (!tpn) { - if (!(tpn = xalloc(sizeof(XvPortNotifyRec)))) + if (!(tpn = malloc(sizeof(XvPortNotifyRec)))) return BadAlloc; tpn->next = pPort->pNotify; pPort->pNotify = tpn; @@ -1139,12 +1133,13 @@ XvdiSetPortAttribute( Atom attribute, INT32 value ){ + int status; + status = (* pPort->pAdaptor->ddSetPortAttribute)(client, pPort, attribute, value); + if (status == Success) XvdiSendPortNotify(pPort, attribute, value); - return - (* pPort->pAdaptor->ddSetPortAttribute)(client, pPort, attribute, value); - + return status; } int diff --git a/xserver/Xext/xvmc.c b/xserver/Xext/xvmc.c index c85f85eb4..8fbdfaedd 100644 --- a/xserver/Xext/xvmc.c +++ b/xserver/Xext/xvmc.c @@ -33,14 +33,14 @@ #define DR_CLIENT_DRIVER_NAME_SIZE 48 #define DR_BUSID_SIZE 48 -static int XvMCScreenKeyIndex; -static DevPrivateKey XvMCScreenKey; +static DevPrivateKeyRec XvMCScreenKeyRec; +#define XvMCScreenKey (&XvMCScreenKeyRec) +static Bool XvMCInUse; unsigned long XvMCGeneration = 0; int XvMCReqCode; int XvMCEventBase; -int XvMCErrorBase; unsigned long XvMCRTContext; unsigned long XvMCRTSurface; @@ -71,7 +71,7 @@ XvMCDestroyContextRes(pointer data, XID id) if(!pContext->refcnt) { XvMCScreenPtr pScreenPriv = XVMC_GET_PRIVATE(pContext->pScreen); (*pScreenPriv->adaptors[pContext->adapt_num].DestroyContext)(pContext); - xfree(pContext); + free(pContext); } return Success; @@ -85,7 +85,7 @@ XvMCDestroySurfaceRes(pointer data, XID id) XvMCScreenPtr pScreenPriv = XVMC_GET_PRIVATE(pContext->pScreen); (*pScreenPriv->adaptors[pContext->adapt_num].DestroySurface)(pSurface); - xfree(pSurface); + free(pSurface); XvMCDestroyContextRes((pointer)pContext, pContext->context_id); @@ -101,7 +101,7 @@ XvMCDestroySubpictureRes(pointer data, XID id) XvMCScreenPtr pScreenPriv = XVMC_GET_PRIVATE(pContext->pScreen); (*pScreenPriv->adaptors[pContext->adapt_num].DestroySubpicture)(pSubpict); - xfree(pSubpict); + free(pSubpict); XvMCDestroyContextRes((pointer)pContext, pContext->context_id); @@ -139,7 +139,7 @@ ProcXvMCListSurfaceTypes(ClientPtr client) VALIDATE_XV_PORT(stuff->port, pPort, DixReadAccess); - if(XvMCScreenKey) { /* any adaptors at all */ + if(XvMCInUse) { /* any adaptors at all */ ScreenPtr pScreen = pPort->pAdaptor->pScreen; if((pScreenPriv = XVMC_GET_PRIVATE(pScreen))) { /* any this screen */ for(i = 0; i < pScreenPriv->num_adaptors; i++) { @@ -194,7 +194,7 @@ ProcXvMCCreateContext(ClientPtr client) pScreen = pPort->pAdaptor->pScreen; - if(XvMCScreenKey == NULL) /* no XvMC adaptors */ + if(!XvMCInUse) /* no XvMC adaptors */ return BadMatch; if(!(pScreenPriv = XVMC_GET_PRIVATE(pScreen))) /* none this screen */ @@ -226,7 +226,7 @@ ProcXvMCCreateContext(ClientPtr client) (stuff->height > surface->max_height)) return BadValue; - if(!(pContext = xalloc(sizeof(XvMCContextRec)))) { + if(!(pContext = malloc(sizeof(XvMCContextRec)))) { return BadAlloc; } @@ -243,7 +243,7 @@ ProcXvMCCreateContext(ClientPtr client) result = (*adaptor->CreateContext)(pPort, pContext, &dwords, &data); if(result != Success) { - xfree(pContext); + free(pContext); return result; } @@ -259,8 +259,7 @@ ProcXvMCCreateContext(ClientPtr client) WriteToClient(client, dwords << 2, (char*)data); AddResource(pContext->context_id, XvMCRTContext, pContext); - if(data) - xfree(data); + free(data); return Success; } @@ -276,7 +275,7 @@ ProcXvMCDestroyContext(ClientPtr client) rc = dixLookupResourceByType(&val, stuff->context_id, XvMCRTContext, client, DixDestroyAccess); if (rc != Success) - return (rc == BadValue) ? XvMCBadContext + XvMCErrorBase : rc; + return rc; FreeResource(stuff->context_id, RT_NONE); @@ -299,11 +298,11 @@ ProcXvMCCreateSurface(ClientPtr client) result = dixLookupResourceByType((pointer *)&pContext, stuff->context_id, XvMCRTContext, client, DixUseAccess); if (result != Success) - return (result == BadValue) ? XvMCBadContext + XvMCErrorBase : result; + return result; pScreenPriv = XVMC_GET_PRIVATE(pContext->pScreen); - if(!(pSurface = xalloc(sizeof(XvMCSurfaceRec)))) + if(!(pSurface = malloc(sizeof(XvMCSurfaceRec)))) return BadAlloc; pSurface->surface_id = stuff->surface_id; @@ -314,7 +313,7 @@ ProcXvMCCreateSurface(ClientPtr client) pSurface, &dwords, &data); if(result != Success) { - xfree(pSurface); + free(pSurface); return result; } @@ -327,8 +326,7 @@ ProcXvMCCreateSurface(ClientPtr client) WriteToClient(client, dwords << 2, (char*)data); AddResource(pSurface->surface_id, XvMCRTSurface, pSurface); - if(data) - xfree(data); + free(data); pContext->refcnt++; @@ -346,7 +344,7 @@ ProcXvMCDestroySurface(ClientPtr client) rc = dixLookupResourceByType(&val, stuff->surface_id, XvMCRTSurface, client, DixDestroyAccess); if (rc != Success) - return (rc == BadValue) ? XvMCBadSurface + XvMCErrorBase : rc; + return rc; FreeResource(stuff->surface_id, RT_NONE); @@ -371,7 +369,7 @@ ProcXvMCCreateSubpicture(ClientPtr client) result = dixLookupResourceByType((pointer *)&pContext, stuff->context_id, XvMCRTContext, client, DixUseAccess); if (result != Success) - return (result == BadValue) ? XvMCBadContext + XvMCErrorBase : result; + return result; pScreenPriv = XVMC_GET_PRIVATE(pContext->pScreen); @@ -404,7 +402,7 @@ ProcXvMCCreateSubpicture(ClientPtr client) (stuff->height > surface->subpicture_max_height)) return BadValue; - if(!(pSubpicture = xalloc(sizeof(XvMCSubpictureRec)))) + if(!(pSubpicture = malloc(sizeof(XvMCSubpictureRec)))) return BadAlloc; pSubpicture->subpicture_id = stuff->subpicture_id; @@ -423,7 +421,7 @@ ProcXvMCCreateSubpicture(ClientPtr client) pSubpicture, &dwords, &data); if(result != Success) { - xfree(pSubpicture); + free(pSubpicture); return result; } @@ -444,8 +442,7 @@ ProcXvMCCreateSubpicture(ClientPtr client) WriteToClient(client, dwords << 2, (char*)data); AddResource(pSubpicture->subpicture_id, XvMCRTSubpicture, pSubpicture); - if(data) - xfree(data); + free(data); pContext->refcnt++; @@ -463,7 +460,7 @@ ProcXvMCDestroySubpicture(ClientPtr client) rc = dixLookupResourceByType(&val, stuff->subpicture_id, XvMCRTSubpicture, client, DixDestroyAccess); if (rc != Success) - return (rc == BadValue) ? XvMCBadSubpicture + XvMCErrorBase : rc; + return rc; FreeResource(stuff->subpicture_id, RT_NONE); @@ -694,7 +691,9 @@ XvMCExtensionInit(void) XvMCReqCode = extEntry->base; XvMCEventBase = extEntry->eventBase; - XvMCErrorBase = extEntry->errorBase; + SetResourceTypeErrorValue(XvMCRTContext, extEntry->errorBase + XvMCBadContext); + SetResourceTypeErrorValue(XvMCRTSurface, extEntry->errorBase + XvMCBadSurface); + SetResourceTypeErrorValue(XvMCRTSubpicture, extEntry->errorBase + XvMCBadSubpicture); } static Bool @@ -704,7 +703,7 @@ XvMCCloseScreen (int i, ScreenPtr pScreen) pScreen->CloseScreen = pScreenPriv->CloseScreen; - xfree(pScreenPriv); + free(pScreenPriv); return (*pScreen->CloseScreen)(i, pScreen); } @@ -715,9 +714,10 @@ XvMCScreenInit(ScreenPtr pScreen, int num, XvMCAdaptorPtr pAdapt) { XvMCScreenPtr pScreenPriv; - XvMCScreenKey = &XvMCScreenKeyIndex; + if (!dixRegisterPrivateKey(&XvMCScreenKeyRec, PRIVATE_SCREEN, 0)) + return BadAlloc; - if(!(pScreenPriv = xalloc(sizeof(XvMCScreenRec)))) + if(!(pScreenPriv = malloc(sizeof(XvMCScreenRec)))) return BadAlloc; dixSetPrivate(&pScreen->devPrivates, XvMCScreenKey, pScreenPriv); @@ -733,6 +733,8 @@ XvMCScreenInit(ScreenPtr pScreen, int num, XvMCAdaptorPtr pAdapt) pScreenPriv->minor = 0; pScreenPriv->patchLevel = 0; + XvMCInUse = TRUE; + return Success; } diff --git a/xserver/Xi/Makefile.in b/xserver/Xi/Makefile.in index f451fc17d..bba894359 100644 --- a/xserver/Xi/Makefile.in +++ b/xserver/Xi/Makefile.in @@ -118,10 +118,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -209,6 +205,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -223,6 +221,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -240,10 +239,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -299,10 +302,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -320,17 +324,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -357,20 +355,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -462,6 +463,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/Xi/closedev.c b/xserver/Xi/closedev.c index 159ead55c..e319c737a 100644 --- a/xserver/Xi/closedev.c +++ b/xserver/Xi/closedev.c @@ -156,7 +156,7 @@ ProcXCloseDevice(ClientPtr client) * Delete passive grabs from all windows for this device. */ for (i = 0; i < screenInfo.numScreens; i++) { - pWin = WindowTable[i]; + pWin = screenInfo.screens[i]->root; DeleteDeviceEvents(d, pWin, client); p1 = pWin->firstChild; DeleteEventsFromChildren(d, p1, client); diff --git a/xserver/Xi/exevents.c b/xserver/Xi/exevents.c index 566b0ef60..e19e207fd 100644 --- a/xserver/Xi/exevents.c +++ b/xserver/Xi/exevents.c @@ -94,9 +94,6 @@ Bool ShouldFreeInputMasks(WindowPtr /* pWin */ , static Bool MakeInputMasks(WindowPtr /* pWin */ ); -/* Used to sture classes currently not in use by an MD */ -extern DevPrivateKey UnusedClassesPrivateKey; - /* * Only let the given client know of core events which will affect its * interpretation of input events, if the client's ClientPointer (or the @@ -224,9 +221,9 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to) if (!to->intfeed) { - classes = dixLookupPrivate(&to->devPrivates, - UnusedClassesPrivateKey); + classes = to->unused_classes; to->intfeed = classes->intfeed; + classes->intfeed = NULL; } i = &to->intfeed; @@ -234,7 +231,7 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to) { if (!(*i)) { - *i = xcalloc(1, sizeof(IntegerFeedbackClassRec)); + *i = calloc(1, sizeof(IntegerFeedbackClassRec)); if (!(*i)) { ErrorF("[Xi] Cannot alloc memory for class copy."); @@ -249,7 +246,7 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to) } else if (to->intfeed && !from->intfeed) { ClassesPtr classes; - classes = dixLookupPrivate(&to->devPrivates, UnusedClassesPrivateKey); + classes = to->unused_classes; classes->intfeed = to->intfeed; to->intfeed = NULL; } @@ -260,9 +257,9 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to) if (!to->stringfeed) { - classes = dixLookupPrivate(&to->devPrivates, - UnusedClassesPrivateKey); + classes = to->unused_classes; to->stringfeed = classes->stringfeed; + classes->stringfeed = NULL; } s = &to->stringfeed; @@ -270,7 +267,7 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to) { if (!(*s)) { - *s = xcalloc(1, sizeof(StringFeedbackClassRec)); + *s = calloc(1, sizeof(StringFeedbackClassRec)); if (!(*s)) { ErrorF("[Xi] Cannot alloc memory for class copy."); @@ -285,7 +282,7 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to) } else if (to->stringfeed && !from->stringfeed) { ClassesPtr classes; - classes = dixLookupPrivate(&to->devPrivates, UnusedClassesPrivateKey); + classes = to->unused_classes; classes->stringfeed = to->stringfeed; to->stringfeed = NULL; } @@ -296,9 +293,9 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to) if (!to->bell) { - classes = dixLookupPrivate(&to->devPrivates, - UnusedClassesPrivateKey); + classes = to->unused_classes; to->bell = classes->bell; + classes->bell = NULL; } b = &to->bell; @@ -306,7 +303,7 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to) { if (!(*b)) { - *b = xcalloc(1, sizeof(BellFeedbackClassRec)); + *b = calloc(1, sizeof(BellFeedbackClassRec)); if (!(*b)) { ErrorF("[Xi] Cannot alloc memory for class copy."); @@ -322,7 +319,7 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to) } else if (to->bell && !from->bell) { ClassesPtr classes; - classes = dixLookupPrivate(&to->devPrivates, UnusedClassesPrivateKey); + classes = to->unused_classes; classes->bell = to->bell; to->bell = NULL; } @@ -333,9 +330,9 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to) if (!to->leds) { - classes = dixLookupPrivate(&to->devPrivates, - UnusedClassesPrivateKey); + classes = to->unused_classes; to->leds = classes->leds; + classes->leds = NULL; } l = &to->leds; @@ -343,7 +340,7 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to) { if (!(*l)) { - *l = xcalloc(1, sizeof(LedFeedbackClassRec)); + *l = calloc(1, sizeof(LedFeedbackClassRec)); if (!(*l)) { ErrorF("[Xi] Cannot alloc memory for class copy."); @@ -361,7 +358,7 @@ DeepCopyFeedbackClasses(DeviceIntPtr from, DeviceIntPtr to) } else if (to->leds && !from->leds) { ClassesPtr classes; - classes = dixLookupPrivate(&to->devPrivates, UnusedClassesPrivateKey); + classes = to->unused_classes; classes->leds = to->leds; to->leds = NULL; } @@ -381,12 +378,12 @@ DeepCopyKeyboardClasses(DeviceIntPtr from, DeviceIntPtr to) if (!to->kbdfeed) { - classes = dixLookupPrivate(&to->devPrivates, - UnusedClassesPrivateKey); + classes = to->unused_classes; to->kbdfeed = classes->kbdfeed; if (!to->kbdfeed) InitKeyboardDeviceStruct(to, NULL, NULL, NULL); + classes->kbdfeed = NULL; } k = &to->kbdfeed; @@ -394,7 +391,7 @@ DeepCopyKeyboardClasses(DeviceIntPtr from, DeviceIntPtr to) { if (!(*k)) { - *k = xcalloc(1, sizeof(KbdFeedbackClassRec)); + *k = calloc(1, sizeof(KbdFeedbackClassRec)); if (!*k) { ErrorF("[Xi] Cannot alloc memory for class copy."); @@ -413,7 +410,7 @@ DeepCopyKeyboardClasses(DeviceIntPtr from, DeviceIntPtr to) } else if (to->kbdfeed && !from->kbdfeed) { ClassesPtr classes; - classes = dixLookupPrivate(&to->devPrivates, UnusedClassesPrivateKey); + classes = to->unused_classes; classes->kbdfeed = to->kbdfeed; to->kbdfeed = NULL; } @@ -422,8 +419,7 @@ DeepCopyKeyboardClasses(DeviceIntPtr from, DeviceIntPtr to) { if (!to->key) { - classes = dixLookupPrivate(&to->devPrivates, - UnusedClassesPrivateKey); + classes = to->unused_classes; to->key = classes->key; if (!to->key) InitKeyboardDeviceStruct(to, NULL, NULL, NULL); @@ -435,7 +431,7 @@ DeepCopyKeyboardClasses(DeviceIntPtr from, DeviceIntPtr to) } else if (to->key && !from->key) { ClassesPtr classes; - classes = dixLookupPrivate(&to->devPrivates, UnusedClassesPrivateKey); + classes = to->unused_classes; classes->key = to->key; to->key = NULL; } @@ -472,12 +468,11 @@ DeepCopyKeyboardClasses(DeviceIntPtr from, DeviceIntPtr to) { WindowPtr *oldTrace; - classes = dixLookupPrivate(&to->devPrivates, - UnusedClassesPrivateKey); + classes = to->unused_classes; to->focus = classes->focus; if (!to->focus) { - to->focus = xcalloc(1, sizeof(FocusClassRec)); + to->focus = calloc(1, sizeof(FocusClassRec)); if (!to->focus) FatalError("[Xi] no memory for class shift.\n"); } else @@ -485,7 +480,7 @@ DeepCopyKeyboardClasses(DeviceIntPtr from, DeviceIntPtr to) oldTrace = to->focus->trace; memcpy(to->focus, from->focus, sizeof(FocusClassRec)); - to->focus->trace = xrealloc(oldTrace, + to->focus->trace = realloc(oldTrace, to->focus->traceSize * sizeof(WindowPtr)); if (!to->focus->trace && to->focus->traceSize) FatalError("[Xi] no memory for trace.\n"); @@ -496,7 +491,7 @@ DeepCopyKeyboardClasses(DeviceIntPtr from, DeviceIntPtr to) } else if (to->focus) { ClassesPtr classes; - classes = dixLookupPrivate(&to->devPrivates, UnusedClassesPrivateKey); + classes = to->unused_classes; classes->focus = to->focus; to->focus = NULL; } @@ -514,9 +509,9 @@ DeepCopyPointerClasses(DeviceIntPtr from, DeviceIntPtr to) PtrFeedbackPtr *p, it; if (!to->ptrfeed) { - classes = dixLookupPrivate(&to->devPrivates, - UnusedClassesPrivateKey); + classes = to->unused_classes; to->ptrfeed = classes->ptrfeed; + classes->ptrfeed = NULL; } p = &to->ptrfeed; @@ -524,7 +519,7 @@ DeepCopyPointerClasses(DeviceIntPtr from, DeviceIntPtr to) { if (!(*p)) { - *p = xcalloc(1, sizeof(PtrFeedbackClassRec)); + *p = calloc(1, sizeof(PtrFeedbackClassRec)); if (!*p) { ErrorF("[Xi] Cannot alloc memory for class copy."); @@ -539,7 +534,7 @@ DeepCopyPointerClasses(DeviceIntPtr from, DeviceIntPtr to) } else if (to->ptrfeed && !from->ptrfeed) { ClassesPtr classes; - classes = dixLookupPrivate(&to->devPrivates, UnusedClassesPrivateKey); + classes = to->unused_classes; classes->ptrfeed = to->ptrfeed; to->ptrfeed = NULL; } @@ -549,14 +544,13 @@ DeepCopyPointerClasses(DeviceIntPtr from, DeviceIntPtr to) ValuatorClassPtr v; if (!to->valuator) { - classes = dixLookupPrivate(&to->devPrivates, - UnusedClassesPrivateKey); + classes = to->unused_classes; to->valuator = classes->valuator; if (to->valuator) classes->valuator = NULL; } - to->valuator = xrealloc(to->valuator, sizeof(ValuatorClassRec) + + to->valuator = realloc(to->valuator, sizeof(ValuatorClassRec) + from->valuator->numAxes * sizeof(AxisInfo) + from->valuator->numAxes * sizeof(double)); v = to->valuator; @@ -573,7 +567,7 @@ DeepCopyPointerClasses(DeviceIntPtr from, DeviceIntPtr to) } else if (to->valuator && !from->valuator) { ClassesPtr classes; - classes = dixLookupPrivate(&to->devPrivates, UnusedClassesPrivateKey); + classes = to->unused_classes; classes->valuator = to->valuator; to->valuator = NULL; } @@ -582,12 +576,11 @@ DeepCopyPointerClasses(DeviceIntPtr from, DeviceIntPtr to) { if (!to->button) { - classes = dixLookupPrivate(&to->devPrivates, - UnusedClassesPrivateKey); + classes = to->unused_classes; to->button = classes->button; if (!to->button) { - to->button = xcalloc(1, sizeof(ButtonClassRec)); + to->button = calloc(1, sizeof(ButtonClassRec)); if (!to->button) FatalError("[Xi] no memory for class shift.\n"); } else @@ -598,14 +591,14 @@ DeepCopyPointerClasses(DeviceIntPtr from, DeviceIntPtr to) { if (!to->button->xkb_acts) { - to->button->xkb_acts = xcalloc(1, sizeof(XkbAction)); + to->button->xkb_acts = calloc(1, sizeof(XkbAction)); if (!to->button->xkb_acts) FatalError("[Xi] not enough memory for xkb_acts.\n"); } memcpy(to->button->xkb_acts, from->button->xkb_acts, sizeof(XkbAction)); } else - xfree(to->button->xkb_acts); + free(to->button->xkb_acts); memcpy(to->button->labels, from->button->labels, from->button->numButtons * sizeof(Atom)); @@ -613,7 +606,7 @@ DeepCopyPointerClasses(DeviceIntPtr from, DeviceIntPtr to) } else if (to->button && !from->button) { ClassesPtr classes; - classes = dixLookupPrivate(&to->devPrivates, UnusedClassesPrivateKey); + classes = to->unused_classes; classes->button = to->button; to->button = NULL; } @@ -622,12 +615,11 @@ DeepCopyPointerClasses(DeviceIntPtr from, DeviceIntPtr to) { if (!to->proximity) { - classes = dixLookupPrivate(&to->devPrivates, - UnusedClassesPrivateKey); + classes = to->unused_classes; to->proximity = classes->proximity; if (!to->proximity) { - to->proximity = xcalloc(1, sizeof(ProximityClassRec)); + to->proximity = calloc(1, sizeof(ProximityClassRec)); if (!to->proximity) FatalError("[Xi] no memory for class shift.\n"); } else @@ -638,7 +630,7 @@ DeepCopyPointerClasses(DeviceIntPtr from, DeviceIntPtr to) } else if (to->proximity) { ClassesPtr classes; - classes = dixLookupPrivate(&to->devPrivates, UnusedClassesPrivateKey); + classes = to->unused_classes; classes->proximity = to->proximity; to->proximity = NULL; } @@ -647,12 +639,11 @@ DeepCopyPointerClasses(DeviceIntPtr from, DeviceIntPtr to) { if (!to->absolute) { - classes = dixLookupPrivate(&to->devPrivates, - UnusedClassesPrivateKey); + classes = to->unused_classes; to->absolute = classes->absolute; if (!to->absolute) { - to->absolute = xcalloc(1, sizeof(AbsoluteClassRec)); + to->absolute = calloc(1, sizeof(AbsoluteClassRec)); if (!to->absolute) FatalError("[Xi] no memory for class shift.\n"); } else @@ -663,7 +654,7 @@ DeepCopyPointerClasses(DeviceIntPtr from, DeviceIntPtr to) } else if (to->absolute) { ClassesPtr classes; - classes = dixLookupPrivate(&to->devPrivates, UnusedClassesPrivateKey); + classes = to->unused_classes; classes->absolute = to->absolute; to->absolute = NULL; } @@ -709,7 +700,7 @@ XISendDeviceChangedEvent(DeviceIntPtr device, DeviceIntPtr master, DeviceChanged /* we don't actually swap if there's a NullClient, swapping is done * later when event is delivered. */ SendEventToAllWindows(master, XI_DeviceChangedMask, (xEvent*)dcce, 1); - xfree(dcce); + free(dcce); } static void @@ -762,7 +753,6 @@ UpdateDeviceState(DeviceIntPtr device, DeviceEvent* event) KeyClassPtr k = NULL; ButtonClassPtr b = NULL; ValuatorClassPtr v = NULL; - BYTE *kptr = NULL; /* This event is always the first we get, before the actual events with * the data. However, the way how the DDX is set up, "device" will @@ -829,32 +819,31 @@ UpdateDeviceState(DeviceIntPtr device, DeviceEvent* event) if (!k) return DONT_PROCESS; - kptr = &k->down[key >> 3]; - /* don't allow ddx to generate multiple downs, but repeats are okay */ - if ((*kptr & bit) && !event->key_repeat) + /* don't allow ddx to generate multiple downs, but repeats are okay */ + if (key_is_down(device, key, KEY_PROCESSED) && !event->key_repeat) return DONT_PROCESS; + if (device->valuator) device->valuator->motionHintWindow = NullWindow; - *kptr |= bit; + set_key_down(device, key, KEY_PROCESSED); } else if (event->type == ET_KeyRelease) { if (!k) return DONT_PROCESS; - kptr = &k->down[key >> 3]; - if (!(*kptr & bit)) /* guard against duplicates */ + if (!key_is_down(device, key, KEY_PROCESSED)) /* guard against duplicates */ return DONT_PROCESS; if (device->valuator) device->valuator->motionHintWindow = NullWindow; - *kptr &= ~bit; + set_key_up(device, key, KEY_PROCESSED); } else if (event->type == ET_ButtonPress) { Mask mask; if (!b) return DONT_PROCESS; - kptr = &b->down[key >> 3]; - if ((*kptr & bit) != 0) + if (button_is_down(device, key, BUTTON_PROCESSED)) return DONT_PROCESS; - *kptr |= bit; + + set_button_down(device, key, BUTTON_PROCESSED); if (device->valuator) device->valuator->motionHintWindow = NullWindow; if (!b->map[key]) @@ -874,8 +863,7 @@ UpdateDeviceState(DeviceIntPtr device, DeviceEvent* event) if (!b) return DONT_PROCESS; - kptr = &b->down[key>>3]; - if (!(*kptr & bit)) + if (!button_is_down(device, key, BUTTON_PROCESSED)) return DONT_PROCESS; if (IsMaster(device)) { DeviceIntPtr sd; @@ -890,11 +878,11 @@ UpdateDeviceState(DeviceIntPtr device, DeviceEvent* event) continue; if (!sd->button) continue; - if ((sd->button->down[key>>3] & bit) != 0) + if (button_is_down(sd, key, BUTTON_PROCESSED)) return DONT_PROCESS; } } - *kptr &= ~bit; + set_button_up(device, key, BUTTON_PROCESSED); if (device->valuator) device->valuator->motionHintWindow = NullWindow; if (!b->map[key]) @@ -937,9 +925,9 @@ ProcessRawEvent(RawDeviceEvent *ev, DeviceIntPtr device) } for (i = 0; i < screenInfo.numScreens; i++) - DeliverEventsToWindow(device, WindowTable[i], xi, 1, + DeliverEventsToWindow(device, screenInfo.screens[i]->root, xi, 1, GetEventFilter(device, xi), NULL); - xfree(xi); + free(xi); } } @@ -1053,7 +1041,7 @@ ProcessOtherEvent(InternalEvent *ev, DeviceIntPtr device) /* see comment in EnqueueEvents regarding the next three lines */ if (ev->any.type == ET_Motion) - ev->device_event.root = WindowTable[pSprite->hotPhys.pScreen->myNum]->drawable.id; + ev->device_event.root = pSprite->hotPhys.pScreen->root->drawable.id; eventinfo.device = device; eventinfo.event = ev; @@ -1127,7 +1115,7 @@ InitProximityClassDeviceStruct(DeviceIntPtr dev) { ProximityClassPtr proxc; - proxc = (ProximityClassPtr) xalloc(sizeof(ProximityClassRec)); + proxc = (ProximityClassPtr) malloc(sizeof(ProximityClassRec)); if (!proxc) return FALSE; proxc->sourceid = dev->id; @@ -1243,7 +1231,7 @@ DeviceFocusEvent(DeviceIntPtr dev, int type, int mode, int detail, btlen = bytes_to_int32(btlen); len = sizeof(xXIFocusInEvent) + btlen * 4; - xi2event = xcalloc(1, len); + xi2event = calloc(1, len); xi2event->type = GenericEvent; xi2event->extension = IReqCode; xi2event->evtype = type; @@ -1279,7 +1267,7 @@ DeviceFocusEvent(DeviceIntPtr dev, int type, int mode, int detail, DeliverEventsToWindow(dev, pWin, (xEvent*)xi2event, 1, GetEventFilter(dev, (xEvent*)xi2event), NullGrab); - xfree(xi2event); + free(xi2event); /* XI 1.x event */ event.deviceid = dev->id; @@ -1333,7 +1321,7 @@ DeviceFocusEvent(DeviceIntPtr dev, int type, int mode, int detail, } } - sev = ev = (deviceStateNotify *) xalloc(evcount * sizeof(xEvent)); + sev = ev = (deviceStateNotify *) malloc(evcount * sizeof(xEvent)); FixDeviceStateNotify(dev, ev, NULL, NULL, NULL, first); if (b != NULL) { @@ -1388,7 +1376,7 @@ DeviceFocusEvent(DeviceIntPtr dev, int type, int mode, int detail, DeliverEventsToWindow(dev, pWin, (xEvent *) sev, evcount, DeviceStateNotifyMask, NullGrab); - xfree(sev); + free(sev); } } @@ -1456,7 +1444,7 @@ GrabButton(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr modifier_device, if (rc != Success) { client->errorValue = param->cursor; - return (rc == BadValue) ? BadCursor : rc; + return rc; } access_mode |= DixForceAccess; } @@ -1554,7 +1542,7 @@ GrabWindow(ClientPtr client, DeviceIntPtr dev, int type, if (rc != Success) { client->errorValue = param->cursor; - return (rc == BadValue) ? BadCursor : rc; + return rc; } access_mode |= DixForceAccess; } @@ -1638,7 +1626,7 @@ AddExtensionClient(WindowPtr pWin, ClientPtr client, Mask mask, int mskidx) if (!pWin->optional && !MakeWindowOptional(pWin)) return BadAlloc; - others = xcalloc(1, sizeof(InputClients)); + others = calloc(1, sizeof(InputClients)); if (!others) return BadAlloc; if (!pWin->optional->inputMasks && !MakeInputMasks(pWin)) @@ -1657,7 +1645,7 @@ MakeInputMasks(WindowPtr pWin) { struct _OtherInputMasks *imasks; - imasks = xcalloc(1, sizeof(struct _OtherInputMasks)); + imasks = calloc(1, sizeof(struct _OtherInputMasks)); if (!imasks) return FALSE; pWin->optional->inputMasks = imasks; @@ -1713,21 +1701,21 @@ InputClientGone(WindowPtr pWin, XID id) InputClientsPtr other, prev; if (!wOtherInputMasks(pWin)) - return (Success); + return Success; prev = 0; for (other = wOtherInputMasks(pWin)->inputClients; other; other = other->next) { if (other->resource == id) { if (prev) { prev->next = other->next; - xfree(other); + free(other); } else if (!(other->next)) { if (ShouldFreeInputMasks(pWin, TRUE)) { wOtherInputMasks(pWin)->inputClients = other->next; - xfree(wOtherInputMasks(pWin)); + free(wOtherInputMasks(pWin)); pWin->optional->inputMasks = (OtherInputMasks *) NULL; CheckWindowOptionalNeed(pWin); - xfree(other); + free(other); } else { other->resource = FakeClientID(0); if (!AddResource(other->resource, RT_INPUTCLIENT, @@ -1736,10 +1724,10 @@ InputClientGone(WindowPtr pWin, XID id) } } else { wOtherInputMasks(pWin)->inputClients = other->next; - xfree(other); + free(other); } RecalculateDeviceDeliverableEvents(pWin); - return (Success); + return Success; } prev = other; } @@ -1840,7 +1828,7 @@ ChangeKeyMapping(ClientPtr client, KeyClassPtr k = dev->key; if (k == NULL) - return (BadMatch); + return BadMatch; if (len != (keyCodes * keySymsPerKeyCode)) return BadLength; @@ -1862,7 +1850,7 @@ ChangeKeyMapping(ClientPtr client, XkbApplyMappingChange(dev, &keysyms, firstKeyCode, keyCodes, NULL, serverClient); - return client->noClientException; + return Success; } static void @@ -1983,7 +1971,7 @@ MaybeSendDeviceMotionNotifyHint(deviceKeyButtonPointer * pEvents, Mask mask) pEvents->detail = NotifyNormal; } } - return (0); + return 0; } void @@ -2131,7 +2119,7 @@ SendEventToAllWindows(DeviceIntPtr dev, Mask mask, xEvent * ev, int count) WindowPtr pWin, p1; for (i = 0; i < screenInfo.numScreens; i++) { - pWin = WindowTable[i]; + pWin = screenInfo.screens[i]->root; if (!pWin) continue; DeliverEventsToWindow(dev, pWin, ev, count, mask, NullGrab); diff --git a/xserver/Xi/exglobals.h b/xserver/Xi/exglobals.h index 2d2d25c0b..f7557079e 100644 --- a/xserver/Xi/exglobals.h +++ b/xserver/Xi/exglobals.h @@ -78,5 +78,7 @@ extern int DevicePropertyNotify; extern int RT_INPUTCLIENT; -extern DevPrivateKey XIClientPrivateKey; +extern DevPrivateKeyRec XIClientPrivateKeyRec; +#define XIClientPrivateKey (&XIClientPrivateKeyRec) + #endif /* EXGLOBALS_H */ diff --git a/xserver/Xi/extinit.c b/xserver/Xi/extinit.c index 37f985664..eda4efb50 100644 --- a/xserver/Xi/extinit.c +++ b/xserver/Xi/extinit.c @@ -377,9 +377,7 @@ Mask PropagateMask[MAXDEVICES]; * */ -static int XIClientPrivateKeyIndex; -DevPrivateKey XIClientPrivateKey = &XIClientPrivateKeyIndex; - +DevPrivateKeyRec XIClientPrivateKeyRec; /***************************************************************** * @@ -1156,7 +1154,7 @@ void AssignTypeAndName(DeviceIntPtr dev, Atom type, char *name) { dev->xinput_type = type; - dev->name = (char *)xalloc(strlen(name) + 1); + dev->name = (char *)malloc(strlen(name) + 1); strcpy(dev->name, name); } @@ -1256,7 +1254,7 @@ XInputExtensionInit(void) SERVER_XI_MINOR_VERSION, }; - if (!dixRequestPrivate(XIClientPrivateKey, sizeof(XIClientRec))) + if (!dixRegisterPrivateKey(&XIClientPrivateKeyRec, PRIVATE_CLIENT, sizeof(XIClientRec))) FatalError("Cannot request private for XI.\n"); if (!AddCallback(&ClientStateCallback, XIClientCallback, 0)) diff --git a/xserver/Xi/getdctl.c b/xserver/Xi/getdctl.c index 68181fa61..3e81e9479 100644 --- a/xserver/Xi/getdctl.c +++ b/xserver/Xi/getdctl.c @@ -281,7 +281,7 @@ ProcXGetDeviceControl(ClientPtr client) return BadValue; } - buf = (char *)xalloc(total_length); + buf = (char *)malloc(total_length); if (!buf) return BadAlloc; savbuf = buf; @@ -309,6 +309,6 @@ ProcXGetDeviceControl(ClientPtr client) rep.length = bytes_to_int32(total_length); WriteReplyToClient(client, sizeof(xGetDeviceControlReply), &rep); WriteToClient(client, total_length, savbuf); - xfree(savbuf); + free(savbuf); return Success; } diff --git a/xserver/Xi/getfctl.c b/xserver/Xi/getfctl.c index 607765e98..9563d63d6 100644 --- a/xserver/Xi/getfctl.c +++ b/xserver/Xi/getfctl.c @@ -340,7 +340,7 @@ ProcXGetFeedbackControl(ClientPtr client) if (total_length == 0) return BadMatch; - buf = (char *)xalloc(total_length); + buf = (char *)malloc(total_length); if (!buf) return BadAlloc; savbuf = buf; @@ -361,6 +361,6 @@ ProcXGetFeedbackControl(ClientPtr client) rep.length = bytes_to_int32(total_length); WriteReplyToClient(client, sizeof(xGetFeedbackControlReply), &rep); WriteToClient(client, total_length, savbuf); - xfree(savbuf); + free(savbuf); return Success; } diff --git a/xserver/Xi/getkmap.c b/xserver/Xi/getkmap.c index 78449e212..c38467b96 100644 --- a/xserver/Xi/getkmap.c +++ b/xserver/Xi/getkmap.c @@ -133,8 +133,8 @@ ProcXGetDeviceKeyMapping(ClientPtr client) syms->mapWidth * stuff->count * sizeof(KeySym), &syms->map[syms->mapWidth * (stuff->firstKeyCode - syms->minKeyCode)]); - xfree(syms->map); - xfree(syms); + free(syms->map); + free(syms); return Success; } diff --git a/xserver/Xi/getmmap.c b/xserver/Xi/getmmap.c index ddf27a5f0..bd652e9d4 100644 --- a/xserver/Xi/getmmap.c +++ b/xserver/Xi/getmmap.c @@ -113,7 +113,7 @@ ProcXGetDeviceModifierMapping(ClientPtr client) WriteReplyToClient(client, sizeof(xGetDeviceModifierMappingReply), &rep); WriteToClient(client, max_keys_per_mod * 8, (char *) modkeymap); - xfree(modkeymap); + free(modkeymap); return Success; } diff --git a/xserver/Xi/getprop.c b/xserver/Xi/getprop.c index 1f28a8a40..ba98fc80f 100644 --- a/xserver/Xi/getprop.c +++ b/xserver/Xi/getprop.c @@ -119,7 +119,7 @@ ProcXGetDeviceDontPropagateList(ClientPtr client) &count, COUNT); if (count) { rep.count = count; - buf = (XEventClass *) xalloc(rep.count * sizeof(XEventClass)); + buf = (XEventClass *) malloc(rep.count * sizeof(XEventClass)); rep.length = bytes_to_int32(rep.count * sizeof(XEventClass)); tbuf = buf; @@ -134,7 +134,7 @@ ProcXGetDeviceDontPropagateList(ClientPtr client) if (count) { client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; WriteSwappedDataToClient(client, count * sizeof(XEventClass), buf); - xfree(buf); + free(buf); } return Success; } @@ -164,7 +164,7 @@ XEventClass *buf++ = (id << 8) | EventInfo[j].type; } } - return (buf); + return buf; } /*********************************************************************** diff --git a/xserver/Xi/getselev.c b/xserver/Xi/getselev.c index 90f6284e5..d63b661cd 100644 --- a/xserver/Xi/getselev.c +++ b/xserver/Xi/getselev.c @@ -132,7 +132,7 @@ ProcXGetSelectedExtensionEvents(ClientPtr client) total_length = (rep.all_clients_count + rep.this_client_count) * sizeof(XEventClass); rep.length = bytes_to_int32(total_length); - buf = (XEventClass *) xalloc(total_length); + buf = (XEventClass *) malloc(total_length); tclient = buf; aclient = buf + rep.this_client_count; @@ -152,7 +152,7 @@ ProcXGetSelectedExtensionEvents(ClientPtr client) if (total_length) { client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; WriteSwappedDataToClient(client, total_length, buf); - xfree(buf); + free(buf); } return Success; } diff --git a/xserver/Xi/gtmotion.c b/xserver/Xi/gtmotion.c index 8e91c5a47..9132f4f47 100644 --- a/xserver/Xi/gtmotion.c +++ b/xserver/Xi/gtmotion.c @@ -153,8 +153,7 @@ ProcXGetDeviceMotionEvents(ClientPtr client) } WriteToClient(client, length * 4, (char *)coords); } - if (coords) - xfree(coords); + free(coords); return Success; } diff --git a/xserver/Xi/listdev.c b/xserver/Xi/listdev.c index 98ef7aa43..3b2272bc3 100644 --- a/xserver/Xi/listdev.c +++ b/xserver/Xi/listdev.c @@ -269,7 +269,7 @@ CopySwapValuatorClass(ClientPtr client, ValuatorClassPtr v, char **buf) *buf += sizeof(xAxisInfo); } } - return (i); + return i; } static void @@ -360,7 +360,7 @@ ProcXListInputDevices(ClientPtr client) AddOtherInputDevices(); /* allocate space for saving skip value */ - skip = xcalloc(sizeof(Bool), inputInfo.numDevices); + skip = calloc(sizeof(Bool), inputInfo.numDevices); if (!skip) return BadAlloc; @@ -386,7 +386,7 @@ ProcXListInputDevices(ClientPtr client) /* allocate space for reply */ total_length = numdevs * sizeof(xDeviceInfo) + size + namesize; - devbuf = (char *)xcalloc(1, total_length); + devbuf = (char *)calloc(1, total_length); classbuf = devbuf + (numdevs * sizeof(xDeviceInfo)); namebuf = classbuf + size; savbuf = devbuf; @@ -411,8 +411,8 @@ ProcXListInputDevices(ClientPtr client) rep.length = bytes_to_int32(total_length); WriteReplyToClient(client, sizeof(xListInputDevicesReply), &rep); WriteToClient(client, total_length, savbuf); - xfree(savbuf); - xfree(skip); + free(savbuf); + free(skip); return Success; } diff --git a/xserver/Xi/opendev.c b/xserver/Xi/opendev.c index 3844d25a2..e4c02d32a 100644 --- a/xserver/Xi/opendev.c +++ b/xserver/Xi/opendev.c @@ -154,7 +154,7 @@ ProcXOpenDevice(ClientPtr client) rep.num_classes = j; WriteReplyToClient(client, sizeof(xOpenDeviceReply), &rep); WriteToClient(client, j * sizeof(xInputClassInfo), (char *)evbase); - return (Success); + return Success; } /*********************************************************************** diff --git a/xserver/Xi/queryst.c b/xserver/Xi/queryst.c index 78b97a769..65a43d1d2 100644 --- a/xserver/Xi/queryst.c +++ b/xserver/Xi/queryst.c @@ -119,7 +119,7 @@ ProcXQueryDeviceState(ClientPtr client) total_length += (sizeof(xValuatorState) + (v->numAxes * sizeof(int))); num_classes++; } - buf = (char *)xcalloc(total_length, 1); + buf = (char *)calloc(total_length, 1); if (!buf) return BadAlloc; savbuf = buf; @@ -169,7 +169,7 @@ ProcXQueryDeviceState(ClientPtr client) WriteReplyToClient(client, sizeof(xQueryDeviceStateReply), &rep); if (total_length > 0) WriteToClient(client, total_length, savbuf); - xfree(savbuf); + free(savbuf); return Success; } diff --git a/xserver/Xi/sendexev.c b/xserver/Xi/sendexev.c index 8629dd202..16cbd6f77 100644 --- a/xserver/Xi/sendexev.c +++ b/xserver/Xi/sendexev.c @@ -97,7 +97,7 @@ SProcXSendExtensionEvent(ClientPtr client) for (i = 0; i < stuff->num_events; i++, eventP++) { proc = EventSwapVector[eventP->u.u.type & 0177]; if (proc == NotImplemented) /* no swapping proc; invalid event type? */ - return (BadValue); + return BadValue; (*proc) (eventP, &eventT); *eventP = eventT; } @@ -138,9 +138,10 @@ ProcXSendExtensionEvent(ClientPtr client) first = ((xEvent *) & stuff[1]); if (!((EXTENSION_EVENT_BASE <= first->u.u.type) && - (first->u.u.type < lastEvent))) + (first->u.u.type < lastEvent))) { client->errorValue = first->u.u.type; return BadValue; + } list = (XEventClass *) (first + stuff->num_events); if ((ret = CreateMaskFromList(client, list, stuff->count, tmp, dev, diff --git a/xserver/Xi/stubs.c b/xserver/Xi/stubs.c index 04ba9769e..296a8c4a5 100644 --- a/xserver/Xi/stubs.c +++ b/xserver/Xi/stubs.c @@ -207,14 +207,14 @@ ChangeDeviceControl(ClientPtr client, DeviceIntPtr dev, { switch (control->control) { case DEVICE_RESOLUTION: - return (BadMatch); + return BadMatch; case DEVICE_ABS_CALIB: case DEVICE_ABS_AREA: - return (BadMatch); + return BadMatch; case DEVICE_CORE: - return (BadMatch); + return BadMatch; default: - return (BadMatch); + return BadMatch; } } diff --git a/xserver/Xi/xichangecursor.c b/xserver/Xi/xichangecursor.c index f071e8406..215339331 100644 --- a/xserver/Xi/xichangecursor.c +++ b/xserver/Xi/xichangecursor.c @@ -93,7 +93,7 @@ int ProcXIChangeCursor(ClientPtr client) if (stuff->cursor == None) { - if (pWin == WindowTable[pWin->drawable.pScreen->myNum]) + if (pWin == pWin->drawable.pScreen->root) pCursor = rootCursor; else pCursor = (CursorPtr)None; @@ -103,7 +103,7 @@ int ProcXIChangeCursor(ClientPtr client) rc = dixLookupResourceByType((pointer *)&pCursor, stuff->cursor, RT_CURSOR, client, DixUseAccess); if (rc != Success) - return (rc == BadValue) ? BadCursor : rc; + return rc; } ChangeWindowDeviceCursor(pWin, pDev, pCursor); diff --git a/xserver/Xi/xichangehierarchy.c b/xserver/Xi/xichangehierarchy.c index 1a06e4555..c1899e109 100644 --- a/xserver/Xi/xichangehierarchy.c +++ b/xserver/Xi/xichangehierarchy.c @@ -68,7 +68,7 @@ void XISendDeviceHierarchyEvent(int flags[MAXDEVICES]) if (!flags) return; - ev = xcalloc(1, sizeof(xXIHierarchyEvent) + + ev = calloc(1, sizeof(xXIHierarchyEvent) + MAXDEVICES * sizeof(xXIHierarchyInfo)); ev->type = GenericEvent; ev->extension = IReqCode; @@ -116,7 +116,7 @@ void XISendDeviceHierarchyEvent(int flags[MAXDEVICES]) dummyDev.id = XIAllDevices; SendEventToAllWindows(&dummyDev, (XI_HierarchyChangedMask >> 8), (xEvent*)ev, 1); - xfree(ev); + free(ev); } @@ -172,7 +172,7 @@ ProcXIChangeHierarchy(ClientPtr client) char* name; SWAPIF(swaps(&c->name_len, n)); - name = xcalloc(c->name_len + 1, sizeof(char)); + name = calloc(c->name_len + 1, sizeof(char)); strncpy(name, (char*)&c[1], c->name_len); @@ -181,7 +181,7 @@ ProcXIChangeHierarchy(ClientPtr client) TRUE); if (rc != Success) { - xfree(name); + free(name); goto unwind; } @@ -194,7 +194,7 @@ ProcXIChangeHierarchy(ClientPtr client) if (rc != Success) { - xfree(name); + free(name); goto unwind; } @@ -228,7 +228,7 @@ ProcXIChangeHierarchy(ClientPtr client) flags[XTestptr->id] |= XISlaveAttached; flags[XTestkeybd->id] |= XISlaveAttached; - xfree(name); + free(name); } break; case XIRemoveMaster: diff --git a/xserver/Xi/xipassivegrab.c b/xserver/Xi/xipassivegrab.c index 41a56b14e..296614510 100644 --- a/xserver/Xi/xipassivegrab.c +++ b/xserver/Xi/xipassivegrab.c @@ -147,7 +147,7 @@ ProcXIPassiveGrabDevice(ClientPtr client) if (status != Success) { client->errorValue = stuff->cursor; - return (status == BadValue) ? BadCursor : status; + return status; } } @@ -158,7 +158,7 @@ ProcXIPassiveGrabDevice(ClientPtr client) status = CheckGrabValues(client, ¶m); modifiers = (uint32_t*)&stuff[1] + stuff->mask_len; - modifiers_failed = xcalloc(stuff->num_modifiers, sizeof(xXIGrabModifierInfo)); + modifiers_failed = calloc(stuff->num_modifiers, sizeof(xXIGrabModifierInfo)); if (!modifiers_failed) return BadAlloc; @@ -204,7 +204,7 @@ ProcXIPassiveGrabDevice(ClientPtr client) client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; WriteSwappedDataToClient(client, rep.num_modifiers * 4, (char*)modifiers_failed); } - xfree(modifiers_failed); + free(modifiers_failed); return ret; } diff --git a/xserver/Xi/xiproperty.c b/xserver/Xi/xiproperty.c index 8b8063776..b9f53f7dc 100644 --- a/xserver/Xi/xiproperty.c +++ b/xserver/Xi/xiproperty.c @@ -177,7 +177,9 @@ static struct dev_properties {0, BTN_LABEL_PROP_BTN_TOOL_TRIPLETAP}, {0, BTN_LABEL_PROP_BTN_GEAR_DOWN}, - {0, BTN_LABEL_PROP_BTN_GEAR_UP} + {0, BTN_LABEL_PROP_BTN_GEAR_UP}, + + {0, XI_PROP_TRANSFORM} }; static long XIPropHandlerID = 1; @@ -225,7 +227,7 @@ static int list_atoms(DeviceIntPtr dev, int *natoms, Atom **atoms_return) { Atom *a; - atoms = xalloc(nprops * sizeof(Atom)); + atoms = malloc(nprops * sizeof(Atom)); if(!atoms) return BadAlloc; a = atoms; @@ -252,18 +254,18 @@ get_property(ClientPtr client, DeviceIntPtr dev, Atom property, Atom type, if (!ValidAtom(property)) { client->errorValue = property; - return(BadAtom); + return BadAtom; } if ((delete != xTrue) && (delete != xFalse)) { client->errorValue = delete; - return(BadValue); + return BadValue; } if ((type != AnyPropertyType) && !ValidAtom(type)) { client->errorValue = type; - return(BadAtom); + return BadAtom; } for (prop = dev->properties.properties; prop; prop = prop->next) @@ -348,12 +350,12 @@ check_change_property(ClientPtr client, Atom property, Atom type, int format, if (!ValidAtom(property)) { client->errorValue = property; - return(BadAtom); + return BadAtom; } if (!ValidAtom(type)) { client->errorValue = type; - return(BadAtom); + return BadAtom; } return Success; @@ -457,7 +459,7 @@ XIPropToInt(XIPropertyValuePtr val, int *nelem_return, int **buf_return) if (!buf && !(*nelem_return)) { - buf = xcalloc(val->size, sizeof(int)); + buf = calloc(val->size, sizeof(int)); if (!buf) return BadAlloc; *buf_return = buf; @@ -517,7 +519,7 @@ XIPropToFloat(XIPropertyValuePtr val, int *nelem_return, float **buf_return) if (!buf && !(*nelem_return)) { - buf = xcalloc(val->size, sizeof(float)); + buf = calloc(val->size, sizeof(float)); if (!buf) return BadAlloc; *buf_return = buf; @@ -549,7 +551,7 @@ XIRegisterPropertyHandler(DeviceIntPtr dev, { XIPropertyHandlerPtr new_handler; - new_handler = xcalloc(1, sizeof(XIPropertyHandler)); + new_handler = calloc(1, sizeof(XIPropertyHandler)); if (!new_handler) return 0; @@ -583,7 +585,7 @@ XIUnregisterPropertyHandler(DeviceIntPtr dev, long id) else prev->next = curr->next; - xfree(curr); + free(curr); } static XIPropertyPtr @@ -591,7 +593,7 @@ XICreateDeviceProperty (Atom property) { XIPropertyPtr prop; - prop = (XIPropertyPtr)xalloc(sizeof(XIPropertyRec)); + prop = (XIPropertyPtr)malloc(sizeof(XIPropertyRec)); if (!prop) return NULL; @@ -620,9 +622,8 @@ XIFetchDeviceProperty(DeviceIntPtr dev, Atom property) static void XIDestroyDeviceProperty (XIPropertyPtr prop) { - if (prop->value.data) - xfree(prop->value.data); - xfree(prop); + free(prop->value.data); + free(prop); } /* This function destroys all of the device's property-related stuff, @@ -649,7 +650,7 @@ XIDeleteAllDeviceProperties (DeviceIntPtr device) while(curr_handler) { next_handler = curr_handler->next; - xfree(curr_handler); + free(curr_handler); curr_handler = next_handler; } @@ -682,7 +683,7 @@ XIDeleteDeviceProperty (DeviceIntPtr device, Atom property, Bool fromClient) if (handler->DeleteProperty) rc = handler->DeleteProperty(device, prop->propertyName); if (rc != Success) - return (rc); + return rc; handler = handler->next; } } @@ -719,7 +720,7 @@ XIChangeDeviceProperty (DeviceIntPtr dev, Atom property, Atom type, { prop = XICreateDeviceProperty (property); if (!prop) - return(BadAlloc); + return BadAlloc; add = TRUE; mode = PropModeReplace; } @@ -731,9 +732,9 @@ XIChangeDeviceProperty (DeviceIntPtr dev, Atom property, Atom type, "PropModeReplace" since they will be written over. */ if ((format != prop_value->format) && (mode != PropModeReplace)) - return(BadMatch); + return BadMatch; if ((prop_value->type != type) && (mode != PropModeReplace)) - return(BadMatch); + return BadMatch; new_value = *prop_value; if (mode == PropModeReplace) total_len = len; @@ -745,7 +746,7 @@ XIChangeDeviceProperty (DeviceIntPtr dev, Atom property, Atom type, pointer new_data = NULL, old_data = NULL; total_size = total_len * size_in_bytes; - new_value.data = (pointer)xalloc (total_size); + new_value.data = (pointer)malloc(total_size); if (!new_value.data && total_size) { if (add) @@ -796,9 +797,8 @@ XIChangeDeviceProperty (DeviceIntPtr dev, Atom property, Atom type, &new_value, checkonly); if (checkonly && rc != Success) { - if (new_value.data) - xfree (new_value.data); - return (rc); + free(new_value.data); + return rc; } } handler = handler->next; @@ -806,8 +806,7 @@ XIChangeDeviceProperty (DeviceIntPtr dev, Atom property, Atom type, checkonly = !checkonly; } while (!checkonly); } - if (prop_value->data) - xfree (prop_value->data); + free(prop_value->data); *prop_value = new_value; } else if (len == 0) { @@ -824,7 +823,7 @@ XIChangeDeviceProperty (DeviceIntPtr dev, Atom property, Atom type, send_property_event(dev, prop->propertyName, (add) ? XIPropertyCreated : XIPropertyModified); - return(Success); + return Success; } int @@ -905,7 +904,7 @@ ProcXListDeviceProperties (ClientPtr client) { client->pSwapReplyFunc = (ReplySwapPtr)Swap32Write; WriteSwappedDataToClient(client, natoms * sizeof(Atom), atoms); - xfree(atoms); + free(atoms); } return rc; } @@ -957,7 +956,7 @@ ProcXDeleteDeviceProperty (ClientPtr client) if (!ValidAtom(stuff->property)) { client->errorValue = stuff->property; - return (BadAtom); + return BadAtom; } rc = XIDeleteDeviceProperty(dev, stuff->property, TRUE); @@ -1149,7 +1148,7 @@ ProcXIListProperties(ClientPtr client) { client->pSwapReplyFunc = (ReplySwapPtr)Swap32Write; WriteSwappedDataToClient(client, natoms * sizeof(Atom), atoms); - xfree(atoms); + free(atoms); } return rc; } @@ -1200,7 +1199,7 @@ ProcXIDeleteProperty(ClientPtr client) if (!ValidAtom(stuff->property)) { client->errorValue = stuff->property; - return (BadAtom); + return BadAtom; } rc = XIDeleteDeviceProperty(dev, stuff->property, TRUE); diff --git a/xserver/Xi/xiquerydevice.c b/xserver/Xi/xiquerydevice.c index 435868de2..303c8b27d 100644 --- a/xserver/Xi/xiquerydevice.c +++ b/xserver/Xi/xiquerydevice.c @@ -87,7 +87,7 @@ ProcXIQueryDevice(ClientPtr client) } else { - skip = xcalloc(sizeof(Bool), inputInfo.numDevices); + skip = calloc(sizeof(Bool), inputInfo.numDevices); if (!skip) return BadAlloc; @@ -106,7 +106,7 @@ ProcXIQueryDevice(ClientPtr client) } } - info = xcalloc(1, len); + info = calloc(1, len); if (!info) return BadAlloc; @@ -155,8 +155,8 @@ ProcXIQueryDevice(ClientPtr client) WriteReplyToClient(client, sizeof(xXIQueryDeviceReply), &rep); WriteToClient(client, rep.length * 4, ptr); - xfree(ptr); - xfree(skip); + free(ptr); + free(skip); return rc; } @@ -247,6 +247,9 @@ ListButtonInfo(DeviceIntPtr dev, xXIButtonInfo* info, Bool reportState) int mask_len; int i; + if (!dev || !dev->button) + return 0; + mask_len = bytes_to_int32(bits_to_bytes(dev->button->numButtons)); info->type = ButtonClass; @@ -259,7 +262,7 @@ ListButtonInfo(DeviceIntPtr dev, xXIButtonInfo* info, Bool reportState) memset(bits, 0, mask_len * 4); if (reportState) - for (i = 0; dev && dev->button && i < dev->button->numButtons; i++) + for (i = 0; i < dev->button->numButtons; i++) if (BitIsOn(dev->button->down, i)) SetBit(bits, i); diff --git a/xserver/Xi/xiquerypointer.c b/xserver/Xi/xiquerypointer.c index 93ceba4c3..b521c48ef 100644 --- a/xserver/Xi/xiquerypointer.c +++ b/xserver/Xi/xiquerypointer.c @@ -43,6 +43,7 @@ #include "exevents.h" #include "exglobals.h" #include "eventconvert.h" +#include "scrnintstr.h" #include "xkbsrv.h" #ifdef PANORAMIX @@ -144,7 +145,7 @@ ProcXIQueryPointer(ClientPtr client) rep.buttons_len = bytes_to_int32(bits_to_bytes(pDev->button->numButtons)); rep.length += rep.buttons_len; buttons_size = rep.buttons_len * 4; - buttons = xcalloc(1, buttons_size); + buttons = calloc(1, buttons_size); if (!buttons) return BadAlloc; @@ -181,12 +182,12 @@ ProcXIQueryPointer(ClientPtr client) #ifdef PANORAMIX if(!noPanoramiXExtension) { - rep.root_x += FP1616(panoramiXdataPtr[0].x, 0); - rep.root_y += FP1616(panoramiXdataPtr[0].y, 0); + rep.root_x += FP1616(screenInfo.screens[0]->x, 0); + rep.root_y += FP1616(screenInfo.screens[0]->y, 0); if (stuff->win == rep.root) { - rep.win_x += FP1616(panoramiXdataPtr[0].x, 0); - rep.win_y += FP1616(panoramiXdataPtr[0].y, 0); + rep.win_x += FP1616(screenInfo.screens[0]->x, 0); + rep.win_y += FP1616(screenInfo.screens[0]->y, 0); } } #endif @@ -195,7 +196,7 @@ ProcXIQueryPointer(ClientPtr client) if (buttons) WriteToClient(client, buttons_size, buttons); - xfree(buttons); + free(buttons); return Success; } diff --git a/xserver/Xi/xiselectev.c b/xserver/Xi/xiselectev.c index 672edab3b..7aa3f0ab6 100644 --- a/xserver/Xi/xiselectev.c +++ b/xserver/Xi/xiselectev.c @@ -173,7 +173,7 @@ ProcXISelectEvents(ClientPtr client) RecalculateDeliverableEvents(win); - xfree(types); + free(types); return Success; } @@ -234,7 +234,7 @@ ProcXIGetSelectedEvents(ClientPtr client) return Success; } - buffer = xcalloc(MAXDEVICES, sizeof(xXIEventMask) + pad_to_int32(XI2MASKSIZE)); + buffer = calloc(MAXDEVICES, sizeof(xXIEventMask) + pad_to_int32(XI2MASKSIZE)); if (!buffer) return BadAlloc; @@ -281,7 +281,7 @@ ProcXIGetSelectedEvents(ClientPtr client) if (reply.num_masks) WriteToClient(client, reply.length * 4, buffer); - xfree(buffer); + free(buffer); return Success; } diff --git a/xserver/aclocal.m4 b/xserver/aclocal.m4 index 86f08a38f..fe55da927 100644 --- a/xserver/aclocal.m4 +++ b/xserver/aclocal.m4 @@ -7644,7 +7644,30 @@ m4_include([m4/ac_define_dir.m4]) m4_include([m4/dolt.m4]) dnl fontutil.m4. Generated from fontutil.m4.in by configure. dnl -dnl This file comes from X.Org's font-util 1.1.1 +dnl This file comes from X.Org's font-util 1.2.0 +dnl +dnl Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. +dnl +dnl Permission is hereby granted, free of charge, to any person obtaining a +dnl copy of this software and associated documentation files (the "Software"), +dnl to deal in the Software without restriction, including without limitation +dnl the rights to use, copy, modify, merge, publish, distribute, sublicense, +dnl and/or sell copies of the Software, and to permit persons to whom the +dnl Software is furnished to do so, subject to the following conditions: +dnl +dnl The above copyright notice and this permission notice (including the next +dnl paragraph) shall be included in all copies or substantial portions of the +dnl Software. +dnl +dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +dnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +dnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +dnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +dnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +dnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +dnl DEALINGS IN THE SOFTWARE. +dnl +dnl -------------------------------------------------------------------- dnl dnl Copyright 2005 Red Hat, Inc dnl @@ -7669,35 +7692,6 @@ dnl Except as contained in this notice, the name of the copyright holders shall dnl not be used in advertising or otherwise to promote the sale, use or dnl other dealings in this Software without prior written authorization dnl from the copyright holders. -dnl -dnl -------------------------------------------------------------------- -dnl -dnl Copyright 2009 Sun Microsystems, Inc. All rights reserved. -dnl -dnl Permission is hereby granted, free of charge, to any person obtaining a -dnl copy of this software and associated documentation files (the -dnl "Software"), to deal in the Software without restriction, including -dnl without limitation the rights to use, copy, modify, merge, publish, -dnl distribute, and/or sell copies of the Software, and to permit persons -dnl to whom the Software is furnished to do so, provided that the above -dnl copyright notice(s) and this permission notice appear in all copies of -dnl the Software and that both the above copyright notice(s) and this -dnl permission notice appear in supporting documentation. -dnl -dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT -dnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR -dnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL -dnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING -dnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, -dnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION -dnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -dnl -dnl Except as contained in this notice, the name of a copyright holder -dnl shall not be used in advertising or otherwise to promote the sale, use -dnl or other dealings in this Software without prior written authorization -dnl of the copyright holder. # XORG_FONT_MACROS_VERSION(required-version) # ------------------------------------------ @@ -7715,7 +7709,7 @@ dnl of the copyright holder. # See the "minimum version" comment for each macro you use to see what # version you require. m4_defun([XORG_FONT_MACROS_VERSION],[ -m4_define([vers_have], [1.1.1]) +m4_define([vers_have], [1.2.0]) m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) m4_if(m4_cmp(maj_have, maj_needed), 0,, @@ -7764,7 +7758,7 @@ AC_DEFUN([XORG_FONT_CHECK_ENCODING],[ AC_ARG_ENABLE(m4_tolower($1), AS_HELP_STRING(m4_join([-], [--disable], m4_tolower($1)), [Build $1 fonts (default: yes)]), - [AS_TR_SH($1)=$enableval], [AS_TR_SH($1)=yes]) + [AS_TR_SH($1)=$enableval]) AC_MSG_CHECKING([whether to build $1 fonts]) AC_MSG_RESULT($[AS_TR_SH($1)]) AM_CONDITIONAL(AS_TR_SH($1), [test "x$AS_TR_SH($1)" = xyes]) @@ -7773,9 +7767,19 @@ AC_DEFUN([XORG_FONT_CHECK_ENCODING],[ # XORG_FONT_CHECK_ENCODING_LIST(encoding1 encoding2....) # ----------------------------------------------------- # Minimum version: 1.1.0 -# Call XORG_FONT_CHECK_ENCODING for multiple encodings at once +# Call XORG_FONT_CHECK_ENCODING for multiple encodings at once. +# Add a shorthand --enable/disable-all-encodings option. AC_DEFUN([XORG_FONT_CHECK_ENCODING_LIST],[ + AC_ARG_ENABLE([all-encodings], + AS_HELP_STRING([--disable-all-encodings], + [Disable building of all font encodings]), + [m4_foreach_w([enc], [$1], [ + AS_TR_SH(enc)=$enableval + ])], + [m4_foreach_w([enc], [$1], [ + AS_TR_SH(enc)=yes + ])]) m4_foreach_w([enc], [$1], [XORG_FONT_CHECK_ENCODING(enc)]) ]) # XORG_FONT_CHECK_ENCODING_LIST @@ -7788,7 +7792,7 @@ AC_DEFUN([XORG_FONT_CHECK_ENCODING_LIST],[ AC_DEFUN([XORG_FONT_REQUIRED_PROG],[ AC_PATH_PROG($1, $2) - if test x"$1" = x; then + if test x"$$1" = x; then AC_MSG_ERROR([$2 is required to build $PACKAGE_NAME.]) fi ]) @@ -7906,6 +7910,40 @@ AC_DEFUN([XORG_FONT_UCS2ANY],[ +# XORG_FONT_FC_CONFDIR() +# -------------------- +# Minimum version: 1.2.0 +# +# Sets FC_CONFDIR to the fontconfig config directory +# (which should be --with-confdir=... when building fontconfig) +# found from: +# --with-fc-confdir=... +# pkg-config --variable=confdir fontconfig +# ${sysconfdir}/fonts + +AC_DEFUN([XORG_FONT_FC_CONFDIR],[ + dnl Ensure $PKG_CONFIG is set first + AC_REQUIRE([PKG_PROG_PKG_CONFIG]) + + AC_MSG_CHECKING([for fontconfig's configuration directory]) + AC_ARG_WITH(fc-confdir, + AS_HELP_STRING([--with-fc-confdir=DIR], + [Path to fontconfig's configuration directory]), + [FC_CONFDIR="$withval"]) + # if --with-fc-confdir was not specified + if test "x${FC_CONFDIR}" = "x"; then + FC_CONFDIR=`$PKG_CONFIG --variable=confdir fontconfig` + fi + # ...and if pkg-config didn't find confdir in fontconfig.pc... + if test "x${FC_CONFDIR}" = "x"; then + FC_CONFDIR="${sysconfdir}/fonts" + fi + AC_SUBST(FC_CONFDIR) + AC_MSG_RESULT([${FC_CONFDIR}]) +]) + + + # XORG_FONTROOTDIR() # -------------------- # Minimum version: 1.1.0 @@ -7969,7 +8007,7 @@ AC_DEFUN([XORG_FONTDIR],[XORG_FONTSUBDIR([FONTDIR], [fontdir], [$1])]) dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. dnl -dnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. +dnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. dnl dnl Permission is hereby granted, free of charge, to any person obtaining a dnl copy of this software and associated documentation files (the "Software"), @@ -8006,7 +8044,7 @@ dnl DEALINGS IN THE SOFTWARE. # See the "minimum version" comment for each macro you use to see what # version you require. m4_defun([XORG_MACROS_VERSION],[ -m4_define([vers_have], [1.10.0]) +m4_define([vers_have], [1.11.0]) m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) m4_if(m4_cmp(maj_have, maj_needed), 0,, @@ -8157,6 +8195,7 @@ MAN_SUBSTS="\ -e 's|__xservername__|Xorg|g' \ -e 's|__xconfigfile__|xorg.conf|g' \ -e 's|__projectroot__|\$(prefix)|g' \ + -e 's|__apploaddir__|\$(appdefaultdir)|g' \ -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ @@ -8314,15 +8353,17 @@ AC_SUBST(MAKE_PDF) AC_SUBST(MAKE_HTML) ]) # XORG_CHECK_DOCBOOK -# XORG_WITH_XMLTO([MIN-VERSION]) +# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) # ---------------- # Minimum version: 1.5.0 +# Minimum version for optional DEFAULT argument: 1.11.0 # # Documentation tools are not always available on all platforms and sometimes # not at the appropriate level. This macro enables a module to test for the # presence of the tool and obtain it's path in separate variables. Coupled with # the --with-xmlto option, it allows maximum flexibilty in making decisions -# as whether or not to use the xmlto package. +# as whether or not to use the xmlto package. When DEFAULT is not specified, +# --with-xmlto assumes 'auto'. # # Interface to module: # HAVE_XMLTO: used in makefiles to conditionally generate documentation @@ -8339,10 +8380,12 @@ AC_SUBST(MAKE_HTML) # AC_DEFUN([XORG_WITH_XMLTO],[ AC_ARG_VAR([XMLTO], [Path to xmlto command]) +m4_define([_defopt], m4_default([$2], [auto])) AC_ARG_WITH(xmlto, AS_HELP_STRING([--with-xmlto], - [Use xmlto to regenerate documentation (default: yes, if installed)]), - [use_xmlto=$withval], [use_xmlto=auto]) + [Use xmlto to regenerate documentation (default: ]_defopt[)]), + [use_xmlto=$withval], [use_xmlto=]_defopt) +m4_undefine([_defopt]) if test "x$use_xmlto" = x"auto"; then AC_PATH_PROG([XMLTO], [xmlto]) @@ -8396,15 +8439,17 @@ AM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) ]) # XORG_WITH_XMLTO -# XORG_WITH_ASCIIDOC([MIN-VERSION]) +# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) # ---------------- # Minimum version: 1.5.0 +# Minimum version for optional DEFAULT argument: 1.11.0 # # Documentation tools are not always available on all platforms and sometimes # not at the appropriate level. This macro enables a module to test for the # presence of the tool and obtain it's path in separate variables. Coupled with # the --with-asciidoc option, it allows maximum flexibilty in making decisions -# as whether or not to use the asciidoc package. +# as whether or not to use the asciidoc package. When DEFAULT is not specified, +# --with-asciidoc assumes 'auto'. # # Interface to module: # HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation @@ -8417,10 +8462,12 @@ AM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) # AC_DEFUN([XORG_WITH_ASCIIDOC],[ AC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) +m4_define([_defopt], m4_default([$2], [auto])) AC_ARG_WITH(asciidoc, AS_HELP_STRING([--with-asciidoc], - [Use asciidoc to regenerate documentation (default: yes, if installed)]), - [use_asciidoc=$withval], [use_asciidoc=auto]) + [Use asciidoc to regenerate documentation (default: ]_defopt[)]), + [use_asciidoc=$withval], [use_asciidoc=]_defopt) +m4_undefine([_defopt]) if test "x$use_asciidoc" = x"auto"; then AC_PATH_PROG([ASCIIDOC], [asciidoc]) @@ -8461,15 +8508,17 @@ fi]) AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) ]) # XORG_WITH_ASCIIDOC -# XORG_WITH_DOXYGEN([MIN-VERSION]) +# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) # -------------------------------- # Minimum version: 1.5.0 +# Minimum version for optional DEFAULT argument: 1.11.0 # # Documentation tools are not always available on all platforms and sometimes # not at the appropriate level. This macro enables a module to test for the # presence of the tool and obtain it's path in separate variables. Coupled with # the --with-doxygen option, it allows maximum flexibilty in making decisions -# as whether or not to use the doxygen package. +# as whether or not to use the doxygen package. When DEFAULT is not specified, +# --with-doxygen assumes 'auto'. # # Interface to module: # HAVE_DOXYGEN: used in makefiles to conditionally generate documentation @@ -8482,10 +8531,12 @@ AM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) # AC_DEFUN([XORG_WITH_DOXYGEN],[ AC_ARG_VAR([DOXYGEN], [Path to doxygen command]) +m4_define([_defopt], m4_default([$2], [auto])) AC_ARG_WITH(doxygen, AS_HELP_STRING([--with-doxygen], - [Use doxygen to regenerate documentation (default: yes, if installed)]), - [use_doxygen=$withval], [use_doxygen=auto]) + [Use doxygen to regenerate documentation (default: ]_defopt[)]), + [use_doxygen=$withval], [use_doxygen=]_defopt) +m4_undefine([_defopt]) if test "x$use_doxygen" = x"auto"; then AC_PATH_PROG([DOXYGEN], [doxygen]) @@ -8526,15 +8577,17 @@ fi]) AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) ]) # XORG_WITH_DOXYGEN -# XORG_WITH_GROFF +# XORG_WITH_GROFF([DEFAULT]) # ---------------- # Minimum version: 1.6.0 +# Minimum version for optional DEFAULT argument: 1.11.0 # # Documentation tools are not always available on all platforms and sometimes # not at the appropriate level. This macro enables a module to test for the # presence of the tool and obtain it's path in separate variables. Coupled with # the --with-groff option, it allows maximum flexibilty in making decisions -# as whether or not to use the groff package. +# as whether or not to use the groff package. When DEFAULT is not specified, +# --with-groff assumes 'auto'. # # Interface to module: # HAVE_GROFF: used in makefiles to conditionally generate documentation @@ -8563,10 +8616,12 @@ AM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) # AC_DEFUN([XORG_WITH_GROFF],[ AC_ARG_VAR([GROFF], [Path to groff command]) +m4_define([_defopt], m4_default([$1], [auto])) AC_ARG_WITH(groff, AS_HELP_STRING([--with-groff], - [Use groff to regenerate documentation (default: yes, if installed)]), - [use_groff=$withval], [use_groff=auto]) + [Use groff to regenerate documentation (default: ]_defopt[)]), + [use_groff=$withval], [use_groff=]_defopt) +m4_undefine([_defopt]) if test "x$use_groff" = x"auto"; then AC_PATH_PROG([GROFF], [groff]) @@ -8629,15 +8684,17 @@ AM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) ]) # XORG_WITH_GROFF -# XORG_WITH_FOP +# XORG_WITH_FOP([DEFAULT]) # ---------------- # Minimum version: 1.6.0 +# Minimum version for optional DEFAULT argument: 1.11.0 # # Documentation tools are not always available on all platforms and sometimes # not at the appropriate level. This macro enables a module to test for the # presence of the tool and obtain it's path in separate variables. Coupled with # the --with-fop option, it allows maximum flexibilty in making decisions -# as whether or not to use the fop package. +# as whether or not to use the fop package. When DEFAULT is not specified, +# --with-fop assumes 'auto'. # # Interface to module: # HAVE_FOP: used in makefiles to conditionally generate documentation @@ -8650,10 +8707,12 @@ AM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) # AC_DEFUN([XORG_WITH_FOP],[ AC_ARG_VAR([FOP], [Path to fop command]) +m4_define([_defopt], m4_default([$1], [auto])) AC_ARG_WITH(fop, AS_HELP_STRING([--with-fop], - [Use fop to regenerate documentation (default: yes, if installed)]), - [use_fop=$withval], [use_fop=auto]) + [Use fop to regenerate documentation (default: ]_defopt[)]), + [use_fop=$withval], [use_fop=]_defopt) +m4_undefine([_defopt]) if test "x$use_fop" = x"auto"; then AC_PATH_PROG([FOP], [fop]) @@ -8680,15 +8739,17 @@ fi AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) ]) # XORG_WITH_FOP -# XORG_WITH_PS2PDF +# XORG_WITH_PS2PDF([DEFAULT]) # ---------------- # Minimum version: 1.6.0 +# Minimum version for optional DEFAULT argument: 1.11.0 # # Documentation tools are not always available on all platforms and sometimes # not at the appropriate level. This macro enables a module to test for the # presence of the tool and obtain it's path in separate variables. Coupled with # the --with-ps2pdf option, it allows maximum flexibilty in making decisions -# as whether or not to use the ps2pdf package. +# as whether or not to use the ps2pdf package. When DEFAULT is not specified, +# --with-ps2pdf assumes 'auto'. # # Interface to module: # HAVE_PS2PDF: used in makefiles to conditionally generate documentation @@ -8701,10 +8762,12 @@ AM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) # AC_DEFUN([XORG_WITH_PS2PDF],[ AC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) +m4_define([_defopt], m4_default([$1], [auto])) AC_ARG_WITH(ps2pdf, AS_HELP_STRING([--with-ps2pdf], - [Use ps2pdf to regenerate documentation (default: yes, if installed)]), - [use_ps2pdf=$withval], [use_ps2pdf=auto]) + [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), + [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) +m4_undefine([_defopt]) if test "x$use_ps2pdf" = x"auto"; then AC_PATH_PROG([PS2PDF], [ps2pdf]) @@ -8755,14 +8818,12 @@ AM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) # parm1: specify the default value, yes or no. # AC_DEFUN([XORG_ENABLE_DOCS],[ -default=$1 -if test "x$default" = x ; then - default="yes" -fi +m4_define([default], m4_default([$1], [yes])) AC_ARG_ENABLE(docs, AS_HELP_STRING([--enable-docs], - [Enable building the documentation (default: yes)]), - [build_docs=$enableval], [build_docs=$default]) + [Enable building the documentation (default: ]default[)]), + [build_docs=$enableval], [build_docs=]default) +m4_undefine([default]) AM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) AC_MSG_CHECKING([whether to build documentation]) AC_MSG_RESULT([$build_docs]) @@ -8790,14 +8851,12 @@ AC_MSG_RESULT([$build_docs]) # parm1: specify the default value, yes or no. # AC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ -devel_default=$1 -if test "x$devel_default" = x ; then - devel_default="yes" -fi +m4_define([devel_default], m4_default([$1], [yes])) AC_ARG_ENABLE(devel-docs, AS_HELP_STRING([--enable-devel-docs], - [Enable building the developer documentation (default: yes)]), - [build_devel_docs=$enableval], [build_devel_docs=$devel_default]) + [Enable building the developer documentation (default: ]devel_default[)]), + [build_devel_docs=$enableval], [build_devel_docs=]devel_default) +m4_undefine([devel_default]) AM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) AC_MSG_CHECKING([whether to build developer documentation]) AC_MSG_RESULT([$build_devel_docs]) @@ -8825,14 +8884,12 @@ AC_MSG_RESULT([$build_devel_docs]) # parm1: specify the default value, yes or no. # AC_DEFUN([XORG_ENABLE_SPECS],[ -spec_default=$1 -if test "x$spec_default" = x ; then - spec_default="yes" -fi +m4_define([spec_default], m4_default([$1], [yes])) AC_ARG_ENABLE(specs, AS_HELP_STRING([--enable-specs], - [Enable building the specs (default: yes)]), - [build_specs=$enableval], [build_specs=$spec_default]) + [Enable building the specs (default: ]spec_default[)]), + [build_specs=$enableval], [build_specs=]spec_default) +m4_undefine([spec_default]) AM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) AC_MSG_CHECKING([whether to build functional specifications]) AC_MSG_RESULT([$build_specs]) diff --git a/xserver/composite/Makefile.in b/xserver/composite/Makefile.in index dfd50c4f2..4134adfdc 100644 --- a/xserver/composite/Makefile.in +++ b/xserver/composite/Makefile.in @@ -120,10 +120,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -211,6 +207,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -225,6 +223,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -242,10 +241,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -301,10 +304,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -322,17 +326,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -359,20 +357,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -464,6 +465,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/composite/compalloc.c b/xserver/composite/compalloc.c index 8a6beb903..d8ccc1181 100644 --- a/xserver/composite/compalloc.c +++ b/xserver/composite/compalloc.c @@ -99,7 +99,7 @@ compRedirectWindow (ClientPtr pClient, WindowPtr pWin, int update) * The client *could* allocate multiple, but while supported, * it is not expected to be common */ - ccw = xalloc (sizeof (CompClientWindowRec)); + ccw = malloc(sizeof (CompClientWindowRec)); if (!ccw) return BadAlloc; ccw->id = FakeClientID (pClient->index); @@ -109,10 +109,10 @@ compRedirectWindow (ClientPtr pClient, WindowPtr pWin, int update) */ if (!cw) { - cw = xalloc (sizeof (CompWindowRec)); + cw = malloc(sizeof (CompWindowRec)); if (!cw) { - xfree (ccw); + free(ccw); return BadAlloc; } cw->damage = DamageCreate (compReportDamage, @@ -123,8 +123,8 @@ compRedirectWindow (ClientPtr pClient, WindowPtr pWin, int update) pWin); if (!cw->damage) { - xfree (ccw); - xfree (cw); + free(ccw); + free(cw); return BadAlloc; } if (wasMapped) @@ -134,7 +134,7 @@ compRedirectWindow (ClientPtr pClient, WindowPtr pWin, int update) EnableMapUnmapEvents (pWin); } - REGION_NULL (pScreen, &cw->borderClip); + RegionNull(&cw->borderClip); cw->borderClipX = 0; cw->borderClipY = 0; cw->update = CompositeRedirectAutomatic; @@ -208,7 +208,7 @@ compFreeClientWindow (WindowPtr pWin, XID id) *prev = ccw->next; if (ccw->update == CompositeRedirectManual) cw->update = CompositeRedirectAutomatic; - xfree (ccw); + free(ccw); break; } } @@ -227,10 +227,10 @@ compFreeClientWindow (WindowPtr pWin, XID id) if (cw->damage) DamageDestroy (cw->damage); - REGION_UNINIT (pScreen, &cw->borderClip); + RegionUninit(&cw->borderClip); dixSetPrivate(&pWin->devPrivates, CompWindowPrivateKey, NULL); - xfree (cw); + free(cw); } else if (cw->update == CompositeRedirectAutomatic && !cw->damageRegistered && pWin->redirectDraw != RedirectDrawNone) @@ -296,7 +296,7 @@ compRedirectSubwindows (ClientPtr pClient, WindowPtr pWin, int update) * The client *could* allocate multiple, but while supported, * it is not expected to be common */ - ccw = xalloc (sizeof (CompClientWindowRec)); + ccw = malloc(sizeof (CompClientWindowRec)); if (!ccw) return BadAlloc; ccw->id = FakeClientID (pClient->index); @@ -306,10 +306,10 @@ compRedirectSubwindows (ClientPtr pClient, WindowPtr pWin, int update) */ if (!csw) { - csw = xalloc (sizeof (CompSubwindowsRec)); + csw = malloc(sizeof (CompSubwindowsRec)); if (!csw) { - xfree (ccw); + free(ccw); return BadAlloc; } csw->update = CompositeRedirectAutomatic; @@ -328,10 +328,10 @@ compRedirectSubwindows (ClientPtr pClient, WindowPtr pWin, int update) (void) compUnredirectWindow (pClient, pChild, update); if (!csw->clients) { - xfree (csw); + free(csw); dixSetPrivate(&pWin->devPrivates, CompSubwindowsPrivateKey, 0); } - xfree (ccw); + free(ccw); return ret; } } @@ -392,7 +392,7 @@ compFreeClientSubwindows (WindowPtr pWin, XID id) for (pChild = pWin->lastChild; pChild; pChild = pChild->prevSib) (void) compUnredirectWindow (pClient, pChild, ccw->update); - xfree (ccw); + free(ccw); break; } } @@ -403,7 +403,7 @@ compFreeClientSubwindows (WindowPtr pWin, XID id) if (!csw->clients) { dixSetPrivate(&pWin->devPrivates, CompSubwindowsPrivateKey, NULL); - xfree (csw); + free(csw); } } @@ -498,10 +498,11 @@ compNewPixmap (WindowPtr pWin, int x, int y, int w, int h) */ if (pGC) { - XID val = IncludeInferiors; + ChangeGCVal val; + val.val = IncludeInferiors; ValidateGC(&pPixmap->drawable, pGC); - dixChangeGC (serverClient, pGC, GCSubwindowMode, &val, NULL); + ChangeGC (serverClient, pGC, GCSubwindowMode, &val); (*pGC->ops->CopyArea) (&pParent->drawable, &pPixmap->drawable, pGC, @@ -598,7 +599,7 @@ compFreePixmap (WindowPtr pWin) * case correctly. Unmap adds the window borderClip to the * parent exposed area; regions beyond the parent cause crashes */ - REGION_COPY (pScreen, &pWin->borderClip, &cw->borderClip); + RegionCopy(&pWin->borderClip, &cw->borderClip); pRedirectPixmap = (*pScreen->GetWindowPixmap) (pWin); pParentPixmap = (*pScreen->GetWindowPixmap) (pWin->parent); pWin->redirectDraw = RedirectDrawNone; diff --git a/xserver/composite/compext.c b/xserver/composite/compext.c index 17c4bae1e..30d9dc2b6 100644 --- a/xserver/composite/compext.c +++ b/xserver/composite/compext.c @@ -50,8 +50,8 @@ #include "protocol-versions.h" static CARD8 CompositeReqCode; -static int CompositeClientPrivateKeyIndex; -static DevPrivateKey CompositeClientPrivateKey = &CompositeClientPrivateKeyIndex; +static DevPrivateKeyRec CompositeClientPrivateKeyRec; +#define CompositeClientPrivateKey (&CompositeClientPrivateKeyRec) RESTYPE CompositeClientWindowType; RESTYPE CompositeClientSubwindowsType; RESTYPE CompositeClientOverlayType; @@ -132,7 +132,7 @@ ProcCompositeQueryVersion (ClientPtr client) swapl(&rep.minorVersion, n); } WriteToClient(client, sizeof(xCompositeQueryVersionReply), (char *)&rep); - return(client->noClientException); + return Success; } #define VERIFY_WINDOW(pWindow, wid, client, mode) \ @@ -140,10 +140,7 @@ ProcCompositeQueryVersion (ClientPtr client) int err; \ err = dixLookupResourceByType((pointer *) &pWindow, wid, \ RT_WINDOW, client, mode); \ - if (err == BadValue) { \ - client->errorValue = wid; \ - return BadWindow; \ - } else if (err != Success) { \ + if (err != Success) { \ client->errorValue = wid; \ return err; \ } \ @@ -221,12 +218,12 @@ ProcCompositeCreateRegionFromBorderClip (ClientPtr client) pRegion = XFixesRegionCopy (pBorderClip); if (!pRegion) return BadAlloc; - REGION_TRANSLATE (pScreen, pRegion, -pWin->drawable.x, -pWin->drawable.y); + RegionTranslate(pRegion, -pWin->drawable.x, -pWin->drawable.y); if (!AddResource (stuff->region, RegionResType, (pointer) pRegion)) return BadAlloc; - return(client->noClientException); + return Success; } static int @@ -265,7 +262,7 @@ ProcCompositeNameWindowPixmap (ClientPtr client) if (!AddResource (stuff->pixmap, RT_PIXMAP, (pointer) pPixmap)) return BadAlloc; - return(client->noClientException); + return Success; } @@ -325,7 +322,7 @@ ProcCompositeGetOverlayWindow (ClientPtr client) } (void) WriteToClient(client, sz_xCompositeGetOverlayWindowReply, (char *)&rep); - return client->noClientException; + return Success; } static int @@ -351,7 +348,7 @@ ProcCompositeReleaseOverlayWindow (ClientPtr client) /* The delete function will free the client structure */ FreeResource (pOc->resource, RT_NONE); - return client->noClientException; + return Success; } static int (*ProcCompositeVector[CompositeNumberRequests])(ClientPtr) = { @@ -561,8 +558,8 @@ CompositeExtensionInit (void) if (!CompositeClientOverlayType) return; - if (!dixRequestPrivate(CompositeClientPrivateKey, - sizeof(CompositeClientRec))) + if (!dixRegisterPrivateKey(&CompositeClientPrivateKeyRec, PRIVATE_CLIENT, + sizeof(CompositeClientRec))) return; if (!AddCallback (&ClientStateCallback, CompositeClientCallback, 0)) diff --git a/xserver/composite/compinit.c b/xserver/composite/compinit.c index e8b563de6..5db9f0282 100644 --- a/xserver/composite/compinit.c +++ b/xserver/composite/compinit.c @@ -48,13 +48,9 @@ #include "compint.h" #include "compositeext.h" -static int CompScreenPrivateKeyIndex; -DevPrivateKey CompScreenPrivateKey = &CompScreenPrivateKeyIndex; -static int CompWindowPrivateKeyIndex; -DevPrivateKey CompWindowPrivateKey = &CompWindowPrivateKeyIndex; -static int CompSubwindowsPrivateKeyIndex; -DevPrivateKey CompSubwindowsPrivateKey = &CompSubwindowsPrivateKeyIndex; - +DevPrivateKeyRec CompScreenPrivateKeyRec; +DevPrivateKeyRec CompWindowPrivateKeyRec; +DevPrivateKeyRec CompSubwindowsPrivateKeyRec; static Bool compCloseScreen (int index, ScreenPtr pScreen) @@ -62,13 +58,14 @@ compCloseScreen (int index, ScreenPtr pScreen) CompScreenPtr cs = GetCompScreen (pScreen); Bool ret; - xfree (cs->alternateVisuals); + free(cs->alternateVisuals); pScreen->CloseScreen = cs->CloseScreen; pScreen->BlockHandler = cs->BlockHandler; pScreen->InstallColormap = cs->InstallColormap; pScreen->ChangeWindowAttributes = cs->ChangeWindowAttributes; pScreen->ReparentWindow = cs->ReparentWindow; + pScreen->ConfigNotify = cs->ConfigNotify; pScreen->MoveWindow = cs->MoveWindow; pScreen->ResizeWindow = cs->ResizeWindow; pScreen->ChangeBorderWidth = cs->ChangeBorderWidth; @@ -81,7 +78,7 @@ compCloseScreen (int index, ScreenPtr pScreen) pScreen->CopyWindow = cs->CopyWindow; pScreen->PositionWindow = cs->PositionWindow; - xfree (cs); + free(cs); dixSetPrivate(&pScreen->devPrivates, CompScreenPrivateKey, NULL); ret = (*pScreen->CloseScreen) (index, pScreen); @@ -141,7 +138,7 @@ compScreenUpdate (ScreenPtr pScreen) compCheckTree (pScreen); if (cs->damaged) { - compWindowUpdate (WindowTable[pScreen->myNum]); + compWindowUpdate (pScreen->root); cs->damaged = FALSE; } } @@ -202,7 +199,7 @@ compRegisterAlternateVisuals (CompScreenPtr cs, VisualID *vids, int nVisuals) { VisualID *p; - p = xrealloc(cs->alternateVisuals, + p = realloc(cs->alternateVisuals, sizeof(VisualID) * (cs->numAlternateVisuals + nVisuals)); if(p == NULL) return FALSE; @@ -321,9 +318,16 @@ compScreenInit (ScreenPtr pScreen) { CompScreenPtr cs; + if (!dixRegisterPrivateKey(&CompScreenPrivateKeyRec, PRIVATE_SCREEN, 0)) + return FALSE; + if (!dixRegisterPrivateKey(&CompWindowPrivateKeyRec, PRIVATE_WINDOW, 0)) + return FALSE; + if (!dixRegisterPrivateKey(&CompSubwindowsPrivateKeyRec, PRIVATE_WINDOW, 0)) + return FALSE; + if (GetCompScreen (pScreen)) return TRUE; - cs = (CompScreenPtr) xalloc (sizeof (CompScreenRec)); + cs = (CompScreenPtr) malloc(sizeof (CompScreenRec)); if (!cs) return FALSE; @@ -337,7 +341,7 @@ compScreenInit (ScreenPtr pScreen) if (!compAddAlternateVisuals (pScreen, cs)) { - xfree (cs); + free(cs); return FALSE; } @@ -362,6 +366,9 @@ compScreenInit (ScreenPtr pScreen) cs->ClipNotify = pScreen->ClipNotify; pScreen->ClipNotify = compClipNotify; + cs->ConfigNotify = pScreen->ConfigNotify; + pScreen->ConfigNotify = compConfigNotify; + cs->MoveWindow = pScreen->MoveWindow; pScreen->MoveWindow = compMoveWindow; diff --git a/xserver/composite/compint.h b/xserver/composite/compint.h index 845a196f6..80083b01d 100644 --- a/xserver/composite/compint.h +++ b/xserver/composite/compint.h @@ -131,6 +131,7 @@ typedef struct _CompScreen { * three track changes to the offscreen storage * geometry */ + ConfigNotifyProcPtr ConfigNotify; MoveWindowProcPtr MoveWindow; ResizeWindowProcPtr ResizeWindow; ChangeBorderWidthProcPtr ChangeBorderWidth; @@ -161,9 +162,14 @@ typedef struct _CompScreen { } CompScreenRec, *CompScreenPtr; -extern DevPrivateKey CompScreenPrivateKey; -extern DevPrivateKey CompWindowPrivateKey; -extern DevPrivateKey CompSubwindowsPrivateKey; +extern DevPrivateKeyRec CompScreenPrivateKeyRec; +#define CompScreenPrivateKey (&CompScreenPrivateKeyRec) + +extern DevPrivateKeyRec CompWindowPrivateKeyRec; +#define CompWindowPrivateKey (&CompWindowPrivateKeyRec) + +extern DevPrivateKeyRec CompSubwindowsPrivateKeyRec; +#define CompSubwindowsPrivateKey (&CompSubwindowsPrivateKeyRec) #define GetCompScreen(s) ((CompScreenPtr) \ dixLookupPrivate(&(s)->devPrivates, CompScreenPrivateKey)) @@ -316,4 +322,8 @@ CompositeRealChildHead (WindowPtr pWin); int DeleteWindowNoInputDevices(pointer value, XID wid); +int +compConfigNotify(WindowPtr pWin, int x, int y, int w, int h, + int bw, WindowPtr pSib); + #endif /* _COMPINT_H_ */ diff --git a/xserver/composite/compoverlay.c b/xserver/composite/compoverlay.c index 6d73f003d..67b566c7f 100644 --- a/xserver/composite/compoverlay.c +++ b/xserver/composite/compoverlay.c @@ -62,7 +62,7 @@ compFreeOverlayClient (CompOverlayClientPtr pOcToDel) { if (pOc == pOcToDel) { *pPrev = pOc->pNext; - xfree (pOc); + free(pOc); break; } } @@ -97,7 +97,7 @@ compCreateOverlayClient (ScreenPtr pScreen, ClientPtr pClient) CompScreenPtr cs = GetCompScreen(pScreen); CompOverlayClientPtr pOc; - pOc = (CompOverlayClientPtr) xalloc(sizeof(CompOverlayClientRec)); + pOc = (CompOverlayClientPtr) malloc(sizeof(CompOverlayClientRec)); if (pOc == NULL) return NULL; @@ -124,7 +124,7 @@ Bool compCreateOverlayWindow (ScreenPtr pScreen) { CompScreenPtr cs = GetCompScreen(pScreen); - WindowPtr pRoot = WindowTable[pScreen->myNum]; + WindowPtr pRoot = pScreen->root; WindowPtr pWin; XID attrs[] = { None, TRUE }; /* backPixmap, overrideRedirect */ int result; diff --git a/xserver/composite/compwindow.c b/xserver/composite/compwindow.c index f2f6ea3cd..160b7644f 100644 --- a/xserver/composite/compwindow.c +++ b/xserver/composite/compwindow.c @@ -98,10 +98,10 @@ compRepaintBorder (ClientPtr pClient, pointer closure) if (rc == Success) { RegionRec exposed; - REGION_NULL(pScreen, &exposed); - REGION_SUBTRACT(pScreen, &exposed, &pWindow->borderClip, &pWindow->winSize); + RegionNull(&exposed); + RegionSubtract(&exposed, &pWindow->borderClip, &pWindow->winSize); miPaintWindow(pWindow, &exposed, PW_BORDER); - REGION_UNINIT(pScreen, &exposed); + RegionUninit(&exposed); } return TRUE; } @@ -283,7 +283,7 @@ compClipNotify (WindowPtr pWin, int dx, int dy) if (cw->borderClipX != pWin->drawable.x || cw->borderClipY != pWin->drawable.y) { - REGION_TRANSLATE (pScreen, &cw->borderClip, + RegionTranslate(&cw->borderClip, pWin->drawable.x - cw->borderClipX, pWin->drawable.y - cw->borderClipY); cw->borderClipX = pWin->drawable.x; @@ -334,37 +334,9 @@ compImplicitRedirect (WindowPtr pWin, WindowPtr pParent) return FALSE; } -void -compMoveWindow (WindowPtr pWin, int x, int y, WindowPtr pSib, VTKind kind) +static void compFreeOldPixmap(WindowPtr pWin) { ScreenPtr pScreen = pWin->drawable.pScreen; - CompScreenPtr cs = GetCompScreen (pScreen); - - compCheckTree (pScreen); - if (pWin->redirectDraw != RedirectDrawNone) - { - WindowPtr pParent; - int draw_x, draw_y; - unsigned int w, h, bw; - - /* if this is a root window, can't be moved */ - if (!(pParent = pWin->parent)) - return; - - bw = wBorderWidth (pWin); - draw_x = pParent->drawable.x + x + (int)bw; - draw_y = pParent->drawable.y + y + (int)bw; - w = pWin->drawable.width; - h = pWin->drawable.height; - compReallocPixmap (pWin, draw_x, draw_y, w, h, bw); - } - compCheckTree (pScreen); - - pScreen->MoveWindow = cs->MoveWindow; - (*pScreen->MoveWindow) (pWin, x, y, pSib, kind); - cs->MoveWindow = pScreen->MoveWindow; - pScreen->MoveWindow = compMoveWindow; - if (pWin->redirectDraw != RedirectDrawNone) { CompWindowPtr cw = GetCompWindow (pWin); @@ -374,7 +346,19 @@ compMoveWindow (WindowPtr pWin, int x, int y, WindowPtr pSib, VTKind kind) cw->pOldPixmap = NullPixmap; } } +} +void +compMoveWindow (WindowPtr pWin, int x, int y, WindowPtr pSib, VTKind kind) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + CompScreenPtr cs = GetCompScreen (pScreen); + pScreen->MoveWindow = cs->MoveWindow; + (*pScreen->MoveWindow) (pWin, x, y, pSib, kind); + cs->MoveWindow = pScreen->MoveWindow; + pScreen->MoveWindow = compMoveWindow; + + compFreeOldPixmap(pWin); compCheckTree (pScreen); } @@ -385,37 +369,12 @@ compResizeWindow (WindowPtr pWin, int x, int y, ScreenPtr pScreen = pWin->drawable.pScreen; CompScreenPtr cs = GetCompScreen (pScreen); - compCheckTree (pScreen); - if (pWin->redirectDraw != RedirectDrawNone) - { - WindowPtr pParent; - int draw_x, draw_y; - unsigned int bw; - - /* if this is a root window, can't be moved */ - if (!(pParent = pWin->parent)) - return; - - bw = wBorderWidth (pWin); - draw_x = pParent->drawable.x + x + (int)bw; - draw_y = pParent->drawable.y + y + (int)bw; - compReallocPixmap (pWin, draw_x, draw_y, w, h, bw); - } - compCheckTree (pScreen); - pScreen->ResizeWindow = cs->ResizeWindow; (*pScreen->ResizeWindow) (pWin, x, y, w, h, pSib); cs->ResizeWindow = pScreen->ResizeWindow; pScreen->ResizeWindow = compResizeWindow; - if (pWin->redirectDraw != RedirectDrawNone) - { - CompWindowPtr cw = GetCompWindow (pWin); - if (cw->pOldPixmap) - { - (*pScreen->DestroyPixmap) (cw->pOldPixmap); - cw->pOldPixmap = NullPixmap; - } - } + + compFreeOldPixmap(pWin); compCheckTree (pWin->drawable.pScreen); } @@ -425,38 +384,12 @@ compChangeBorderWidth (WindowPtr pWin, unsigned int bw) ScreenPtr pScreen = pWin->drawable.pScreen; CompScreenPtr cs = GetCompScreen (pScreen); - compCheckTree (pScreen); - if (pWin->redirectDraw != RedirectDrawNone) - { - WindowPtr pParent; - int draw_x, draw_y; - unsigned int w, h; - - /* if this is a root window, can't be moved */ - if (!(pParent = pWin->parent)) - return; - - draw_x = pWin->drawable.x; - draw_y = pWin->drawable.y; - w = pWin->drawable.width; - h = pWin->drawable.height; - compReallocPixmap (pWin, draw_x, draw_y, w, h, bw); - } - compCheckTree (pScreen); - pScreen->ChangeBorderWidth = cs->ChangeBorderWidth; (*pScreen->ChangeBorderWidth) (pWin, bw); cs->ChangeBorderWidth = pScreen->ChangeBorderWidth; pScreen->ChangeBorderWidth = compChangeBorderWidth; - if (pWin->redirectDraw != RedirectDrawNone) - { - CompWindowPtr cw = GetCompWindow (pWin); - if (cw->pOldPixmap) - { - (*pScreen->DestroyPixmap) (cw->pOldPixmap); - cw->pOldPixmap = NullPixmap; - } - } + + compFreeOldPixmap(pWin); compCheckTree (pWin->drawable.pScreen); } @@ -530,14 +463,14 @@ compCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) dx = ptOldOrg.x - pWin->drawable.x; dy = ptOldOrg.y - pWin->drawable.y; - REGION_TRANSLATE(pWin->drawable.pScreen, prgnSrc, -dx, -dy); + RegionTranslate(prgnSrc, -dx, -dy); - REGION_NULL (pWin->drawable.pScreen, &rgnDst); + RegionNull(&rgnDst); - REGION_INTERSECT(pWin->drawable.pScreen, &rgnDst, + RegionIntersect(&rgnDst, &pWin->borderClip, prgnSrc); - REGION_TRANSLATE (pWin->drawable.pScreen, &rgnDst, + RegionTranslate(&rgnDst, -pPixmap->screen_x, -pPixmap->screen_y); dx = dx + pPixmap->screen_x - cw->oldx; @@ -545,8 +478,8 @@ compCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) pGC = GetScratchGC (pPixmap->drawable.depth, pScreen); if (pGC) { - BoxPtr pBox = REGION_RECTS (&rgnDst); - int nBox = REGION_NUM_RECTS (&rgnDst); + BoxPtr pBox = RegionRects (&rgnDst); + int nBox = RegionNumRects (&rgnDst); ValidateGC(&pPixmap->drawable, pGC); while (nBox--) @@ -574,16 +507,16 @@ compCopyWindow (WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) if (ptOldOrg.x != pWin->drawable.x || ptOldOrg.y != pWin->drawable.y) { if (dx || dy) - REGION_TRANSLATE (pScreen, prgnSrc, dx, dy); + RegionTranslate(prgnSrc, dx, dy); (*pScreen->CopyWindow) (pWin, ptOldOrg, prgnSrc); if (dx || dy) - REGION_TRANSLATE (pScreen, prgnSrc, -dx, -dy); + RegionTranslate(prgnSrc, -dx, -dy); } else { ptOldOrg.x -= dx; ptOldOrg.y -= dy; - REGION_TRANSLATE (prgnSrc, prgnSrc, + RegionTranslate(prgnSrc, pWin->drawable.x - ptOldOrg.x, pWin->drawable.y - ptOldOrg.y); DamageRegionAppend(&pWin->drawable, prgnSrc); @@ -651,26 +584,26 @@ compSetRedirectBorderClip (WindowPtr pWin, RegionPtr pRegion) CompWindowPtr cw = GetCompWindow (pWin); RegionRec damage; - REGION_NULL (pScreen, &damage); + RegionNull(&damage); /* * Align old border clip with new border clip */ - REGION_TRANSLATE (pScreen, &cw->borderClip, + RegionTranslate(&cw->borderClip, pWin->drawable.x - cw->borderClipX, pWin->drawable.y - cw->borderClipY); /* * Compute newly visible portion of window for repaint */ - REGION_SUBTRACT (pScreen, &damage, pRegion, &cw->borderClip); + RegionSubtract(&damage, pRegion, &cw->borderClip); /* * Report that as damaged so it will be redrawn */ DamageRegionAppend(&pWin->drawable, &damage); - REGION_UNINIT (pScreen, &damage); + RegionUninit(&damage); /* * Save the new border clip region */ - REGION_COPY (pScreen, &cw->borderClip, pRegion); + RegionCopy(&cw->borderClip, pRegion); cw->borderClipX = pWin->drawable.x; cw->borderClipY = pWin->drawable.y; } @@ -732,18 +665,18 @@ compWindowUpdateAutomatic (WindowPtr pWin) /* * First move the region from window to screen coordinates */ - REGION_TRANSLATE (pScreen, pRegion, + RegionTranslate(pRegion, pWin->drawable.x, pWin->drawable.y); /* * Clip against the "real" border clip */ - REGION_INTERSECT (pScreen, pRegion, pRegion, &cw->borderClip); + RegionIntersect(pRegion, pRegion, &cw->borderClip); /* * Now translate from screen to dest coordinates */ - REGION_TRANSLATE (pScreen, pRegion, + RegionTranslate(pRegion, -pParent->drawable.x, -pParent->drawable.y); /* @@ -800,7 +733,7 @@ CompositeRealChildHead (WindowPtr pWin) if (!pWin->parent && (screenIsSaved == SCREEN_SAVER_ON) && - (HasSaverWindow (pWin->drawable.pScreen->myNum))) { + (HasSaverWindow (pWin->drawable.pScreen))) { /* First child is the screen saver; see if next child is the overlay */ pChildBefore = pWin->firstChild; @@ -822,3 +755,39 @@ CompositeRealChildHead (WindowPtr pWin) return pChildBefore; } } + +int +compConfigNotify(WindowPtr pWin, int x, int y, int w, int h, + int bw, WindowPtr pSib) +{ + ScreenPtr pScreen = pWin->drawable.pScreen; + CompScreenPtr cs = GetCompScreen (pScreen); + Bool ret = 0; + WindowPtr pParent = pWin->parent; + int draw_x, draw_y; + Bool alloc_ret; + + if (cs->ConfigNotify) + { + pScreen->ConfigNotify = cs->ConfigNotify; + ret = (*pScreen->ConfigNotify)(pWin, x, y, w, h, bw, pSib); + cs->ConfigNotify = pScreen->ConfigNotify; + pScreen->ConfigNotify = compConfigNotify; + + if (ret) + return ret; + } + + if (pWin->redirectDraw == RedirectDrawNone) + return Success; + + compCheckTree (pScreen); + + draw_x = pParent->drawable.x + x + bw; + draw_y = pParent->drawable.y + y + bw; + alloc_ret = compReallocPixmap (pWin, draw_x, draw_y, w, h, bw); + + if (alloc_ret == FALSE) + return BadAlloc; + return Success; +} diff --git a/xserver/config/Makefile.am b/xserver/config/Makefile.am index 675a3b260..e1f1c4e16 100644 --- a/xserver/config/Makefile.am +++ b/xserver/config/Makefile.am @@ -36,4 +36,4 @@ endif # CONFIG_NEED_DBUS endif # !CONFIG_UDEV -EXTRA_DIST = xorg-server.conf x11-input.fdi 10-evdev.conf +EXTRA_DIST = xorg-server.conf x11-input.fdi 10-evdev.conf fdi2iclass.py diff --git a/xserver/config/Makefile.in b/xserver/config/Makefile.in index 51c5f49bb..5d8cb8bc3 100644 --- a/xserver/config/Makefile.in +++ b/xserver/config/Makefile.in @@ -140,10 +140,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -231,6 +227,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -245,6 +243,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -262,10 +261,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -321,10 +324,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -342,17 +346,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -379,20 +377,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -484,6 +485,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ @@ -642,7 +644,7 @@ libconfig_la_SOURCES = config.c config-backends.h $(am__append_2) \ @CONFIG_UDEV_TRUE@xorgconfd_DATA = 10-evdev.conf @CONFIG_DBUS_API_TRUE@@CONFIG_NEED_DBUS_TRUE@@CONFIG_UDEV_FALSE@dbusconfigdir = $(sysconfdir)/dbus-1/system.d @CONFIG_DBUS_API_TRUE@@CONFIG_NEED_DBUS_TRUE@@CONFIG_UDEV_FALSE@dbusconfig_DATA = xorg-server.conf -EXTRA_DIST = xorg-server.conf x11-input.fdi 10-evdev.conf +EXTRA_DIST = xorg-server.conf x11-input.fdi 10-evdev.conf fdi2iclass.py all: all-am .SUFFIXES: diff --git a/xserver/config/config.c b/xserver/config/config.c index 7bf5e4179..d86f7c649 100644 --- a/xserver/config/config.c +++ b/xserver/config/config.c @@ -130,10 +130,10 @@ add_option(InputOption **options, const char *key, const char *value) for (; *options; options = &(*options)->next) ; - *options = xcalloc(sizeof(**options), 1); + *options = calloc(sizeof(**options), 1); if (!*options) /* Yeesh. */ return; - (*options)->key = xstrdup(key); - (*options)->value = xstrdup(value); + (*options)->key = strdup(key); + (*options)->value = strdup(value); (*options)->next = NULL; } diff --git a/xserver/config/dbus.c b/xserver/config/dbus.c index 86d9d287f..34e3caade 100644 --- a/xserver/config/dbus.c +++ b/xserver/config/dbus.c @@ -27,7 +27,6 @@ #include #endif -#define DBUS_API_SUBJECT_TO_CHANGE #include #include @@ -81,14 +80,14 @@ add_device(DBusMessage *message, DBusMessage *reply, DBusError *error) MALFORMED_MESSAGE(); } - options = xcalloc(sizeof(*options), 1); + options = calloc(sizeof(*options), 1); if (!options) { ErrorF("[config/dbus] couldn't allocate option\n"); return BadAlloc; } - options->key = xstrdup("_source"); - options->value = xstrdup("client/dbus"); + options->key = strdup("_source"); + options->value = strdup("client/dbus"); if (!options->key || !options->value) { ErrorF("[config/dbus] couldn't allocate first key/value pair\n"); ret = BadAlloc; @@ -97,7 +96,7 @@ add_device(DBusMessage *message, DBusMessage *reply, DBusError *error) /* signature should be [ss][ss]... */ while (dbus_message_iter_get_arg_type(&iter) == DBUS_TYPE_ARRAY) { - tmpo = xcalloc(sizeof(*tmpo), 1); + tmpo = calloc(sizeof(*tmpo), 1); if (!tmpo) { ErrorF("[config/dbus] couldn't allocate option\n"); ret = BadAlloc; @@ -121,7 +120,7 @@ add_device(DBusMessage *message, DBusMessage *reply, DBusError *error) tmp); MALFORMED_MESSAGE(); } - options->key = xstrdup(tmp); + options->key = strdup(tmp); if (!options->key) { ErrorF("[config/dbus] couldn't duplicate key!\n"); ret = BadAlloc; @@ -137,7 +136,7 @@ add_device(DBusMessage *message, DBusMessage *reply, DBusError *error) dbus_message_iter_get_basic(&subiter, &tmp); if (!tmp) MALFORMED_MESSAGE(); - options->value = xstrdup(tmp); + options->value = strdup(tmp); if (!options->value) { ErrorF("[config/dbus] couldn't duplicate option!\n"); ret = BadAlloc; @@ -184,11 +183,9 @@ unwind: while (options) { tmpo = options; options = options->next; - if (tmpo->key) - xfree(tmpo->key); - if (tmpo->value) - xfree(tmpo->value); - xfree(tmpo); + free(tmpo->key); + free(tmpo->value); + free(tmpo); } return ret; diff --git a/xserver/config/fdi2iclass.py b/xserver/config/fdi2iclass.py new file mode 100644 index 000000000..897444068 --- /dev/null +++ b/xserver/config/fdi2iclass.py @@ -0,0 +1,202 @@ +#!/usr/bin/python +# +# Convert xorg keys from hal FDIs files to xorg.conf InputClass sections. +# Modified from Martin Pitt's original fdi2mpi.py script: +# http://cgit.freedesktop.org/media-player-info/tree/tools/fdi2mpi.py +# +# (C) 2010 Dan Nicholson +# (C) 2009 Canonical Ltd. +# Author: Dan Nicholson +# Author: Martin Pitt +# +# Permission is hereby granted, free of charge, to any person obtaining a copy +# of this software and associated documentation files (the "Software"), to +# deal in the Software without restriction, including without limitation the +# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or +# sell copies of the Software, and to permit persons to whom the Software is +# fur- nished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FIT- NESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON- +# NECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +import sys, xml.dom.minidom + +# dict converting tags to Match* entries +match_table = { + 'info.product': 'MatchProduct', + 'input.product': 'MatchProduct', + 'info.vendor': 'MatchVendor', + 'input.vendor': 'MatchVendor', + 'info.device': 'MatchDevicePath', + 'linux.device_file': 'MatchDevicePath', + '/org/freedesktop/Hal/devices/computer:system.kernel.name': 'MatchOS', + '@info.parent:pnp.id': 'MatchPnPID', +} + +# dict converting info.capabilities list to Match* entries +cap_match_table = { + 'input.keys': 'MatchIsKeyboard', + 'input.keyboard': 'MatchIsKeyboard', + 'input.keypad': 'MatchIsKeyboard', + 'input.mouse': 'MatchIsPointer', + 'input.joystick': 'MatchIsJoystick', + 'input.tablet': 'MatchIsTablet', + 'input.touchpad': 'MatchIsTouchpad', + 'input.touchscreen': 'MatchIsTouchscreen', +} + +def device_glob(path): + '''Convert a contains device path to a glob entry''' + if path[0] != '/': + path = '*' + path + return path + '*' + +def parse_match(node): + '''Parse a tag to a tuple with InputClass values''' + match = None + value = None + booltype = False + + # see what type of key we have + if node.attributes.has_key('key'): + key = node.attributes['key'].nodeValue + if key in match_table: + match = match_table[key] + elif key == 'info.capabilities': + booltype = True + + # bail out now if it's unrecognized + if not match and not booltype: + return (match, value) + + if node.attributes.has_key('string'): + value = node.attributes['string'].nodeValue + elif node.attributes.has_key('contains'): + value = node.attributes['contains'].nodeValue + if match == 'MatchDevicePath': + value = device_glob(value) + elif booltype and value in cap_match_table: + match = cap_match_table[value] + value = 'yes' + elif node.attributes.has_key('string_outof'): + value = node.attributes['string_outof'].nodeValue.replace(';','|') + elif node.attributes.has_key('contains_outof'): + all_values = node.attributes['contains_outof'].nodeValue.split(';') + for v in all_values: + if match == 'MatchDevicePath': + v = device_glob(v) + elif match == 'MatchPnPID' and len(v) < 7: + v += '*' + if value: + value += '|' + v + else: + value = v + + return (match, value) + +def parse_options(node): + '''Parse the x11_* options and return InputClass entries''' + driver = '' + ignore = False + options = [] + for n in node.childNodes: + if n.nodeType != xml.dom.minidom.Node.ELEMENT_NODE: + continue + + tag = n.tagName + key = n.attributes['key'].nodeValue + value = '' + + if n.hasChildNodes(): + content_node = n.childNodes[0] + assert content_node.nodeType == xml.dom.Node.TEXT_NODE + value = content_node.nodeValue + + if tag == 'match': + continue + assert tag in ('addset', 'merge', 'append', 'remove') + + if tag == 'remove' and key == 'input.x11_driver': + ignore = True + elif key == 'input.x11_driver': + driver = value + elif key.startswith('input.x11_options.'): + option = key.split('.', 2)[2] + options.append((option, value)) + + return (driver, ignore, options) + +def is_match_node(node): + '''Check if a node is a element''' + return node.nodeType == xml.dom.minidom.Node.ELEMENT_NODE and \ + node.tagName == 'match' + +def parse_all_matches(node): + '''Parse a x11 match tag and any parents that don't supply their + own options''' + matches = [] + + while True: + (key, value) = parse_match(node) + if key and value: + matches.append((key, value)) + + # walk up to a parent match node + node = node.parentNode + if node == None or not is_match_node(node): + break + + # leave if there other options at this level + children = set([n.tagName for n in node.childNodes + if n.nodeType == xml.dom.minidom.Node.ELEMENT_NODE]) + if children & set(['addset', 'merge', 'append']): + break + + return matches + +# stupid counter to give "unique" rule names +num_sections = 1 +def print_section(matches, driver, ignore, options): + '''Print a valid InputClass section to stdout''' + global num_sections + print 'Section "InputClass"' + print '\tIdentifier "Converted Class %d"' % num_sections + num_sections += 1 + for m, v in matches: + print '\t%s "%s"' % (m, v) + if driver: + print '\tDriver "%s"' % driver + if ignore: + print '\tOption "Ignore" "yes"' + for o, v in options: + print '\tOption "%s" "%s"' % (o, v) + print 'EndSection' + +def parse_fdi(fdi): + '''Parse x11 matches from fdi''' + # find all leaf nodes + num = 0 + for match_node in fdi.getElementsByTagName('match'): + children = set([n.tagName for n in match_node.childNodes + if n.nodeType == xml.dom.minidom.Node.ELEMENT_NODE]) + + # see if there are any options at this level + (driver, ignore, options) = parse_options(match_node) + if not driver and not ignore and not options: + continue + + matches = parse_all_matches(match_node) + if num > 0: + print + print_section(matches, driver, ignore, options) + num += 1 + +for f in sys.argv[1:]: + parse_fdi(xml.dom.minidom.parse(f)) diff --git a/xserver/config/hal.c b/xserver/config/hal.c index d3daa84cd..b70488bf3 100644 --- a/xserver/config/hal.c +++ b/xserver/config/hal.c @@ -63,14 +63,14 @@ device_removed(LibHalContext *ctx, const char *udi) { char *value; - value = xalloc(strlen(udi) + 5); /* "hal:" + NULL */ + value = malloc(strlen(udi) + 5); /* "hal:" + NULL */ if (!value) return; sprintf(value, "hal:%s", udi); remove_devices("hal", value); - xfree(value); + free(value); } static char * @@ -81,7 +81,7 @@ get_prop_string(LibHalContext *hal_ctx, const char *udi, const char *name) prop = libhal_device_get_property_string(hal_ctx, udi, name, NULL); LogMessageVerb(X_INFO, 10, "config/hal: getting %s on %s returned %s\n", name, udi, prop ? prop : "(null)"); if (prop) { - ret = xstrdup(prop); + ret = strdup(prop); libhal_free_string(prop); } else { @@ -102,7 +102,7 @@ get_prop_string_array(LibHalContext *hal_ctx, const char *udi, const char *prop) for (i = 0; props[i]; i++) len += strlen(props[i]); - ret = xcalloc(sizeof(char), len + i); /* i - 1 commas, 1 NULL */ + ret = calloc(sizeof(char), len + i); /* i - 1 commas, 1 NULL */ if (!ret) { libhal_free_string_array(props); return NULL; @@ -129,6 +129,7 @@ static void device_added(LibHalContext *hal_ctx, const char *udi) { char *path = NULL, *driver = NULL, *name = NULL, *config_info = NULL; + char *hal_tags, *parent; InputOption *options = NULL, *tmpo = NULL; InputAttributes attrs = {0}; DeviceIntPtr dev = NULL; @@ -155,16 +156,18 @@ device_added(LibHalContext *hal_ctx, const char *udi) LogMessage(X_WARNING,"config/hal: no driver or path specified for %s\n", udi); goto unwind; } - attrs.device = xstrdup(path); + attrs.device = strdup(path); name = get_prop_string(hal_ctx, udi, "info.product"); if (!name) - name = xstrdup("(unnamed)"); + name = strdup("(unnamed)"); else - attrs.product = xstrdup(name); + attrs.product = strdup(name); attrs.vendor = get_prop_string(hal_ctx, udi, "info.vendor"); - attrs.tags = xstrtokenize(get_prop_string(hal_ctx, udi, "input.tags"), ","); + hal_tags = get_prop_string(hal_ctx, udi, "input.tags"); + attrs.tags = xstrtokenize(hal_tags, ","); + free(hal_tags); if (libhal_device_query_capability(hal_ctx, udi, "input.keys", NULL)) attrs.flags |= ATTR_KEYBOARD; @@ -179,14 +182,37 @@ device_added(LibHalContext *hal_ctx, const char *udi) if (libhal_device_query_capability(hal_ctx, udi, "input.touchscreen", NULL)) attrs.flags |= ATTR_TOUCHSCREEN; - options = xcalloc(sizeof(*options), 1); + parent = get_prop_string(hal_ctx, udi, "info.parent"); + if (parent) { + int usb_vendor, usb_product; + + attrs.pnp_id = get_prop_string(hal_ctx, parent, "pnp.id"); + + /* construct USB ID in lowercase - "0000:ffff" */ + usb_vendor = libhal_device_get_property_int(hal_ctx, parent, + "usb.vendor_id", NULL); + LogMessageVerb(X_INFO, 10, + "config/hal: getting usb.vendor_id on %s " + "returned %04x\n", parent, usb_vendor); + usb_product = libhal_device_get_property_int(hal_ctx, parent, + "usb.product_id", NULL); + LogMessageVerb(X_INFO, 10, + "config/hal: getting usb.product_id on %s " + "returned %04x\n", parent, usb_product); + if (usb_vendor && usb_product) + attrs.usb_id = Xprintf("%04x:%04x", usb_vendor, usb_product); + + free(parent); + } + + options = calloc(sizeof(*options), 1); if (!options){ LogMessage(X_ERROR, "config/hal: couldn't allocate space for input options!\n"); goto unwind; } - options->key = xstrdup("_source"); - options->value = xstrdup("server/hal"); + options->key = strdup("_source"); + options->value = strdup("server/hal"); if (!options->key || !options->value) { LogMessage(X_ERROR, "config/hal: couldn't allocate first key/value pair\n"); goto unwind; @@ -200,7 +226,7 @@ device_added(LibHalContext *hal_ctx, const char *udi) add_option(&options, "driver", driver); add_option(&options, "name", name); - config_info = xalloc(strlen(udi) + 5); /* "hal:" and NULL */ + config_info = malloc(strlen(udi) + 5); /* "hal:" and NULL */ if (!config_info) { LogMessage(X_ERROR, "config/hal: couldn't allocate name\n"); goto unwind; @@ -251,35 +277,30 @@ device_added(LibHalContext *hal_ctx, const char *udi) { if (!strcasecmp(&tmp[3], "layout")) { - if (xkb_opts.layout) - xfree(xkb_opts.layout); + free(xkb_opts.layout); xkb_opts.layout = strdup(tmp_val); } else if (!strcasecmp(&tmp[3], "model")) { - if (xkb_opts.model) - xfree(xkb_opts.model); + free(xkb_opts.model); xkb_opts.model = strdup(tmp_val); } else if (!strcasecmp(&tmp[3], "rules")) { - if (xkb_opts.rules) - xfree(xkb_opts.rules); + free(xkb_opts.rules); xkb_opts.rules = strdup(tmp_val); } else if (!strcasecmp(&tmp[3], "variant")) { - if (xkb_opts.variant) - xfree(xkb_opts.variant); + free(xkb_opts.variant); xkb_opts.variant = strdup(tmp_val); } else if (!strcasecmp(&tmp[3], "options")) { - if (xkb_opts.options) - xfree(xkb_opts.options); + free(xkb_opts.options); xkb_opts.options = strdup(tmp_val); } } else { /* all others */ add_option(&options, psi_key + sizeof(LIBHAL_PROP_KEY)-1, tmp_val); - xfree(tmp_val); + free(tmp_val); } } else { @@ -289,8 +310,7 @@ device_added(LibHalContext *hal_ctx, const char *udi) (!strcasecmp(&tmp[3], "options")) && (tmp_val = get_prop_string_array(hal_ctx, udi, psi_key))) { - if (xkb_opts.options) - xfree(xkb_opts.options); + free(xkb_opts.options); xkb_opts.options = strdup(tmp_val); } } @@ -325,7 +345,7 @@ device_added(LibHalContext *hal_ctx, const char *udi) if (!xkb_opts.options) xkb_opts.options = strdup(tmp_val); } - xfree(tmp_val); + free(tmp_val); } else { /* server 1.4 had xkb options as strlist */ @@ -366,51 +386,43 @@ device_added(LibHalContext *hal_ctx, const char *udi) } for (; dev; dev = dev->next){ - if (dev->config_info) - xfree(dev->config_info); - dev->config_info = xstrdup(config_info); + free(dev->config_info); + dev->config_info = strdup(config_info); } unwind: if (set) libhal_free_property_set(set); - if (path) - xfree(path); - if (driver) - xfree(driver); - if (name) - xfree(name); - if (config_info) - xfree(config_info); + free(path); + free(driver); + free(name); + free(config_info); while (!dev && (tmpo = options)) { options = tmpo->next; - xfree(tmpo->key); - xfree(tmpo->value); - xfree(tmpo); + free(tmpo->key); + free(tmpo->value); + free(tmpo); } - xfree(attrs.product); - xfree(attrs.vendor); - xfree(attrs.device); + free(attrs.product); + free(attrs.vendor); + free(attrs.device); + free(attrs.pnp_id); + free(attrs.usb_id); if (attrs.tags) { char **tag = attrs.tags; while (*tag) { - xfree(*tag); + free(*tag); tag++; } - xfree(attrs.tags); + free(attrs.tags); } - if (xkb_opts.layout) - xfree(xkb_opts.layout); - if (xkb_opts.rules) - xfree(xkb_opts.rules); - if (xkb_opts.model) - xfree(xkb_opts.model); - if (xkb_opts.variant) - xfree(xkb_opts.variant); - if (xkb_opts.options) - xfree(xkb_opts.options); + free(xkb_opts.layout); + free(xkb_opts.rules); + free(xkb_opts.model); + free(xkb_opts.variant); + free(xkb_opts.options); dbus_error_free(&error); @@ -635,7 +647,7 @@ config_hal_init(void) } /* verbose message */ - LogMessageVerb(X_INFO,7,"config/hal: initialized"); + LogMessageVerb(X_INFO,7,"config/hal: initialized\n"); return 1; } diff --git a/xserver/config/udev.c b/xserver/config/udev.c index 452fb5a8d..b7717c96d 100644 --- a/xserver/config/udev.c +++ b/xserver/config/udev.c @@ -28,6 +28,7 @@ #endif #include +#include #include "input.h" #include "inputstr.h" @@ -37,6 +38,17 @@ #define UDEV_XKB_PROP_KEY "xkb" +#define LOG_PROPERTY(path, prop, val) \ + LogMessageVerb(X_INFO, 10, \ + "config/udev: getting property %s on %s " \ + "returned \"%s\"\n", \ + (prop), (path), (val) ? (val) : "(null)") +#define LOG_SYSATTR(path, attr, val) \ + LogMessageVerb(X_INFO, 10, \ + "config/udev: getting attribute %s on %s " \ + "returned \"%s\"\n", \ + (attr), (path), (val) ? (val) : "(null)") + static struct udev_monitor *udev_monitor; static void @@ -45,6 +57,7 @@ device_added(struct udev_device *udev_device) const char *path, *name = NULL; char *config_info = NULL; const char *syspath; + const char *tags_prop; const char *key, *value, *tmp; InputOption *options = NULL, *tmpo; InputAttributes attrs = {}; @@ -60,23 +73,45 @@ device_added(struct udev_device *udev_device) if (!path || !syspath) return; - if (!udev_device_get_property_value(udev_device, "ID_INPUT")) + if (!udev_device_get_property_value(udev_device, "ID_INPUT")) { + LogMessageVerb(X_INFO, 10, + "config/udev: ignoring device %s without " + "property ID_INPUT set\n", + path); return; + } - options = xcalloc(sizeof(*options), 1); + options = calloc(sizeof(*options), 1); if (!options) return; - options->key = xstrdup("_source"); - options->value = xstrdup("server/udev"); + options->key = strdup("_source"); + options->value = strdup("server/udev"); if (!options->key || !options->value) goto unwind; parent = udev_device_get_parent(udev_device); if (parent) { + const char *ppath = udev_device_get_devnode(parent); + const char *product = udev_device_get_property_value(parent, "PRODUCT"); + unsigned int usb_vendor, usb_model; + name = udev_device_get_sysattr_value(parent, "name"); - if (!name) + LOG_SYSATTR(ppath, "name", name); + if (!name) { name = udev_device_get_property_value(parent, "NAME"); + LOG_PROPERTY(ppath, "NAME", name); + } + + attrs.pnp_id = udev_device_get_sysattr_value(parent, "id"); + LOG_SYSATTR(ppath, "id", attrs.pnp_id); + + /* construct USB ID in lowercase hex - "0000:ffff" */ + if (product && sscanf(product, "%*x/%4x/%4x/%*x", &usb_vendor, &usb_model) == 2) { + attrs.usb_id = Xprintf("%04x:%04x", usb_vendor, usb_model); + if (attrs.usb_id) + LOG_PROPERTY(path, "PRODUCT", product); + } } if (!name) name = "(unnamed)"; @@ -87,7 +122,10 @@ device_added(struct udev_device *udev_device) add_option(&options, "path", path); add_option(&options, "device", path); attrs.device = path; - attrs.tags = xstrtokenize(udev_device_get_property_value(udev_device, "ID_INPUT.tags"), ","); + + tags_prop = udev_device_get_property_value(udev_device, "ID_INPUT.tags"); + LOG_PROPERTY(path, "ID_INPUT.tags", tags_prop); + attrs.tags = xstrtokenize(tags_prop, ","); config_info = Xprintf("udev:%s", syspath); if (!config_info) @@ -107,6 +145,7 @@ device_added(struct udev_device *udev_device) value = udev_list_entry_get_value(entry); if (!strncasecmp(key, UDEV_XKB_PROP_KEY, sizeof(UDEV_XKB_PROP_KEY) - 1)) { + LOG_PROPERTY(path, key, value); tmp = key + sizeof(UDEV_XKB_PROP_KEY) - 1; if (!strcasecmp(tmp, "rules")) add_option(&options, "xkb_rules", value); @@ -119,21 +158,29 @@ device_added(struct udev_device *udev_device) else if (!strcasecmp(tmp, "options")) add_option(&options, "xkb_options", value); } else if (!strcmp(key, "ID_VENDOR")) { + LOG_PROPERTY(path, key, value); attrs.vendor = value; } else if (!strcmp(key, "ID_INPUT_KEY")) { + LOG_PROPERTY(path, key, value); attrs.flags |= ATTR_KEYBOARD; } else if (!strcmp(key, "ID_INPUT_MOUSE")) { + LOG_PROPERTY(path, key, value); attrs.flags |= ATTR_POINTER; } else if (!strcmp(key, "ID_INPUT_JOYSTICK")) { + LOG_PROPERTY(path, key, value); attrs.flags |= ATTR_JOYSTICK; } else if (!strcmp(key, "ID_INPUT_TABLET")) { + LOG_PROPERTY(path, key, value); attrs.flags |= ATTR_TABLET; } else if (!strcmp(key, "ID_INPUT_TOUCHPAD")) { + LOG_PROPERTY(path, key, value); attrs.flags |= ATTR_TOUCHPAD; } else if (!strcmp(key, "ID_INPUT_TOUCHSCREEN")) { + LOG_PROPERTY(path, key, value); attrs.flags |= ATTR_TOUCHSCREEN; } } + LogMessage(X_INFO, "config/udev: Adding input device %s (%s)\n", name, path); rc = NewInputDeviceRequest(options, &attrs, &dev); @@ -141,26 +188,27 @@ device_added(struct udev_device *udev_device) goto unwind; for (; dev; dev = dev->next) { - xfree(dev->config_info); - dev->config_info = xstrdup(config_info); + free(dev->config_info); + dev->config_info = strdup(config_info); } unwind: - xfree(config_info); + free(config_info); while (!dev && (tmpo = options)) { options = tmpo->next; - xfree(tmpo->key); - xfree(tmpo->value); - xfree(tmpo); + free(tmpo->key); + free(tmpo->value); + free(tmpo); } + free(attrs.usb_id); if (attrs.tags) { char **tag = attrs.tags; while (*tag) { - xfree(*tag); + free(*tag); tag++; } - xfree(attrs.tags); + free(attrs.tags); } return; @@ -178,7 +226,7 @@ device_removed(struct udev_device *device) remove_devices("udev", value); - xfree(value); + free(value); } static void diff --git a/xserver/configure b/xserver/configure index 2a8b1809d..dcb741a03 100644 --- a/xserver/configure +++ b/xserver/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.62 for xorg-server 1.8.2. +# Generated by GNU Autoconf 2.62 for xorg-server 1.9.2. # # Report bugs to . # @@ -810,8 +810,8 @@ SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME='xorg-server' PACKAGE_TARNAME='xorg-server' -PACKAGE_VERSION='1.8.2' -PACKAGE_STRING='xorg-server 1.8.2' +PACKAGE_VERSION='1.9.2' +PACKAGE_STRING='xorg-server 1.9.2' PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg' ac_unique_file="Makefile.am" @@ -962,6 +962,11 @@ AM_DEFAULT_VERBOSITY DOXYGEN HAVE_DOXYGEN_TRUE HAVE_DOXYGEN_FALSE +XORG_SGML_PATH +STYLESHEET_SRCDIR +XSL_STYLESHEET +HAVE_STYLESHEETS_TRUE +HAVE_STYLESHEETS_FALSE CCAS CCASFLAGS LN_S @@ -1060,25 +1065,21 @@ INT10_STUB_TRUE INT10_STUB_FALSE BUILDDOCS_TRUE BUILDDOCS_FALSE -XORG_SGML_PATH -STYLESHEET_SRCDIR -XSL_STYLESHEET -HAVE_STYLESHEETS_TRUE -HAVE_STYLESHEETS_FALSE -PS2PDF -HAVE_PS2PDF_TRUE -HAVE_PS2PDF_FALSE -LINUXDOC -BUILD_LINUXDOC_TRUE -BUILD_LINUXDOC_FALSE -BUILD_PDFDOC_TRUE -BUILD_PDFDOC_FALSE -MAKE_TEXT -MAKE_PS -MAKE_PDF -MAKE_HTML +ENABLE_DEVEL_DOCS_TRUE +ENABLE_DEVEL_DOCS_FALSE +XMLTO +HAVE_XMLTO_TEXT_TRUE +HAVE_XMLTO_TEXT_FALSE +HAVE_XMLTO_TRUE +HAVE_XMLTO_FALSE +FOP +HAVE_FOP_TRUE +HAVE_FOP_FALSE INSTALL_LIBXF86CONFIG_TRUE INSTALL_LIBXF86CONFIG_FALSE +SDK_REQUIRED_MODULES +PIXMAN_CFLAGS +PIXMAN_LIBS UDEV_CFLAGS UDEV_LIBS CONFIG_UDEV_TRUE @@ -1144,8 +1145,6 @@ SELINUX_CFLAGS SELINUX_LIBS XCSECURITY_TRUE XCSECURITY_FALSE -MULTIBUFFER_TRUE -MULTIBUFFER_FALSE DBE_TRUE DBE_FALSE XF86BIGFONT_TRUE @@ -1189,6 +1188,8 @@ UNITTESTS_FALSE DIX_LIB OS_LIB MAIN_LIB +LIBSHA1_CFLAGS +LIBSHA1_LIBS OPENSSL_CFLAGS OPENSSL_LIBS SHA1_LIBS @@ -1373,6 +1374,7 @@ BUILD_KDRIVEFBDEVLIB_FALSE XFAKESERVER_TRUE XFAKESERVER_FALSE PROJECTROOT +RELEASE_DATE BUILD_DATE BUILD_TIME DIX_CFLAGS @@ -1457,7 +1459,6 @@ enable_xselinux enable_xcsecurity enable_xcalibrate enable_tslib -enable_multibuffer enable_dbe enable_xf86bigfont enable_dpms @@ -1470,6 +1471,7 @@ enable_vgahw enable_vbe enable_int10_module enable_windowswm +enable_libdrm enable_xorg enable_dmx enable_xvfb @@ -1490,7 +1492,9 @@ enable_tcp_transport enable_ipv6 enable_local_transport enable_secure_rpc -with_ps2pdf +enable_devel_docs +with_xmlto +with_fop with_xkb_bin_directory with_sha1 ' @@ -1515,7 +1519,10 @@ F77 FFLAGS YACC YFLAGS -PS2PDF +XMLTO +FOP +PIXMAN_CFLAGS +PIXMAN_LIBS UDEV_CFLAGS UDEV_LIBS DBUS_CFLAGS @@ -1540,6 +1547,8 @@ XDMCP_CFLAGS XDMCP_LIBS GLIB_CFLAGS GLIB_LIBS +LIBSHA1_CFLAGS +LIBSHA1_LIBS OPENSSL_CFLAGS OPENSSL_LIBS XSERVERCFLAGS_CFLAGS @@ -2134,7 +2143,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures xorg-server 1.8.2 to adapt to many kinds of systems. +\`configure' configures xorg-server 1.9.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -2204,7 +2213,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of xorg-server 1.8.2:";; + short | recursive ) echo "Configuration of xorg-server 1.9.2:";; esac cat <<\_ACEOF @@ -2264,7 +2273,6 @@ Optional Features: --enable-xcalibrate Build XCalibrate extension (default: disabled) --enable-tslib Build kdrive tslib touchscreen support (default: disabled) - --enable-multibuffer Build Multibuffer extension (default: disabled) --disable-dbe Build DBE extension (default: enabled) --enable-xf86bigfont Build XF86 Big Font extension (default: disabled) --disable-dpms Build DPMS extension (default: enabled) @@ -2277,6 +2285,7 @@ Optional Features: --enable-vbe Build Xorg with VBE module (default: enabled) --enable-int10-module Build Xorg with int10 module (default: enabled) --enable-windowswm Build XWin with WindowsWM extension (default: no) + --enable-libdrm Build Xorg with libdrm support (default: enabled) --enable-xorg Build Xorg server (default: auto) --enable-dmx Build DMX server (default: auto) --enable-xvfb Build Xvfb server (default: yes) @@ -2303,12 +2312,14 @@ Optional Features: --enable-local-transport Enable os-specific local transport --enable-secure-rpc Enable Secure RPC + --enable-devel-docs Enable building the developer documentation + (default: yes) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-doxygen Use doxygen to regenerate documentation (default: - yes, if installed) + auto) --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-pic try to use only PIC/non-PIC objects [default=use both] @@ -2370,8 +2381,9 @@ Optional Packages: org.x) --with-dri-driver-path=PATH Path to DRI drivers (default: ${libdir}/dri) - --with-ps2pdf Use ps2pdf to regenerate documentation (default: - yes, if installed) + --with-xmlto Use xmlto to regenerate documentation (default: + auto) + --with-fop Use fop to regenerate documentation (default: auto) --with-xkb-bin-directory=DIR Directory containing xkbcomp program --with-sha1=libc|libmd|libgcrypt|libcrypto|libsha1|CommonCrypto @@ -2400,7 +2412,11 @@ Some influential environment variables: YFLAGS The list of arguments that will be passed by default to $YACC. This script will default YFLAGS to the empty string to avoid a default value of `-d' given by some make applications. - PS2PDF Path to ps2pdf command + XMLTO Path to xmlto command + FOP Path to fop command + PIXMAN_CFLAGS + C compiler flags for PIXMAN, overriding pkg-config + PIXMAN_LIBS linker flags for PIXMAN, overriding pkg-config UDEV_CFLAGS C compiler flags for UDEV, overriding pkg-config UDEV_LIBS linker flags for UDEV, overriding pkg-config DBUS_CFLAGS C compiler flags for DBUS, overriding pkg-config @@ -2433,6 +2449,10 @@ Some influential environment variables: XDMCP_LIBS linker flags for XDMCP, overriding pkg-config GLIB_CFLAGS C compiler flags for GLIB, overriding pkg-config GLIB_LIBS linker flags for GLIB, overriding pkg-config + LIBSHA1_CFLAGS + C compiler flags for LIBSHA1, overriding pkg-config + LIBSHA1_LIBS + linker flags for LIBSHA1, overriding pkg-config OPENSSL_CFLAGS C compiler flags for OPENSSL, overriding pkg-config OPENSSL_LIBS @@ -2580,7 +2600,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -xorg-server configure 1.8.2 +xorg-server configure 1.9.2 generated by GNU Autoconf 2.62 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -2594,7 +2614,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by xorg-server $as_me 1.8.2, which was +It was created by xorg-server $as_me 1.9.2, which was generated by GNU Autoconf 2.62. Invocation command line was $ $0 $@ @@ -2960,7 +2980,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $ ac_compiler_gnu=$ac_cv_c_compiler_gnu -RELEASE_DATE="2010-07-01" +RELEASE_DATE="2010-10-30" am__api_version="1.9" ac_aux_dir= @@ -3245,7 +3265,7 @@ fi # Define the identity of the package. PACKAGE='xorg-server' - VERSION='1.8.2' + VERSION='1.9.2' cat >>confdefs.h <<_ACEOF @@ -3416,7 +3436,7 @@ fi -# Require xorg-macros: XORG_DEFAULT_OPTIONS +# Require xorg-macros minimum of 1.10 for XORG_CHECK_SGML_DOCTOOLS @@ -5971,6 +5991,7 @@ MAN_SUBSTS="\ -e 's|__xservername__|Xorg|g' \ -e 's|__xconfigfile__|xorg.conf|g' \ -e 's|__projectroot__|\$(prefix)|g' \ + -e 's|__apploaddir__|\$(appdefaultdir)|g' \ -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ @@ -5986,6 +6007,7 @@ AM_DEFAULT_VERBOSITY=1 + # Check whether --with-doxygen was given. if test "${with_doxygen+set}" = set; then withval=$with_doxygen; use_doxygen=$withval @@ -5994,6 +6016,7 @@ else fi + if test "x$use_doxygen" = x"auto"; then # Extract the first word of "doxygen", so it can be a program name with args. set dummy doxygen; ac_word=$2 @@ -6136,6 +6159,48 @@ fi +{ $as_echo "$as_me:$LINENO: checking for X.Org SGML entities >= 1.5" >&5 +$as_echo_n "checking for X.Org SGML entities >= 1.5... " >&6; } +XORG_SGML_PATH= +if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xorg-sgml-doctools >= 1.5\"") >&5 + ($PKG_CONFIG --exists --print-errors "xorg-sgml-doctools >= 1.5") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools` +else + : + +fi + +# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing +# the path and the name of the doc stylesheet +if test "x$XORG_SGML_PATH" != "x" ; then + { $as_echo "$as_me:$LINENO: result: $XORG_SGML_PATH" >&5 +$as_echo "$XORG_SGML_PATH" >&6; } + STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 + XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } +fi + + + + + + +if test "x$XSL_STYLESHEET" != "x"; then + HAVE_STYLESHEETS_TRUE= + HAVE_STYLESHEETS_FALSE='#' +else + HAVE_STYLESHEETS_TRUE='#' + HAVE_STYLESHEETS_FALSE= +fi + + + @@ -7628,7 +7693,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 7631 "configure"' > conftest.$ac_ext + echo '#line 7696 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -10541,11 +10606,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:10544: $lt_compile\"" >&5) + (eval echo "\"\$as_me:10609: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:10548: \$? = $ac_status" >&5 + echo "$as_me:10613: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -10831,11 +10896,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:10834: $lt_compile\"" >&5) + (eval echo "\"\$as_me:10899: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:10838: \$? = $ac_status" >&5 + echo "$as_me:10903: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -10935,11 +11000,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:10938: $lt_compile\"" >&5) + (eval echo "\"\$as_me:11003: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:10942: \$? = $ac_status" >&5 + echo "$as_me:11007: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -13335,7 +13400,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < conftest.$ac_ext <&5) + (eval echo "\"\$as_me:15912: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15851: \$? = $ac_status" >&5 + echo "$as_me:15916: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -15948,11 +16013,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15951: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16016: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:15955: \$? = $ac_status" >&5 + echo "$as_me:16020: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -17531,11 +17596,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17534: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17599: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:17538: \$? = $ac_status" >&5 + echo "$as_me:17603: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -17635,11 +17700,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17638: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17703: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:17642: \$? = $ac_status" >&5 + echo "$as_me:17707: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -19850,11 +19915,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:19853: $lt_compile\"" >&5) + (eval echo "\"\$as_me:19918: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:19857: \$? = $ac_status" >&5 + echo "$as_me:19922: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -20140,11 +20205,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:20143: $lt_compile\"" >&5) + (eval echo "\"\$as_me:20208: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:20147: \$? = $ac_status" >&5 + echo "$as_me:20212: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -20244,11 +20309,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:20247: $lt_compile\"" >&5) + (eval echo "\"\$as_me:20312: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:20251: \$? = $ac_status" >&5 + echo "$as_me:20316: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -24751,7 +24816,8 @@ fi -for ac_header in fcntl.h stdlib.h string.h unistd.h dlfcn.h stropts.h fnmatch.h + +for ac_header in fcntl.h stdlib.h string.h unistd.h dlfcn.h stropts.h fnmatch.h sys/utsname.h do as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then @@ -30741,13 +30807,6 @@ else TSLIB=no fi -# Check whether --enable-multibuffer was given. -if test "${enable_multibuffer+set}" = set; then - enableval=$enable_multibuffer; MULTIBUFFER=$enableval -else - MULTIBUFFER=no -fi - # Check whether --enable-dbe was given. if test "${enable_dbe+set}" = set; then enableval=$enable_dbe; DBE=$enableval @@ -30832,6 +30891,13 @@ else WINDOWSWM=no fi +# Check whether --enable-libdrm was given. +if test "${enable_libdrm+set}" = set; then + enableval=$enable_libdrm; DRM=$enableval +else + DRM=yes +fi + # Check whether --enable-xorg was given. if test "${enable_xorg+set}" = set; then @@ -32116,95 +32182,53 @@ fi -{ $as_echo "$as_me:$LINENO: checking for X.Org SGML entities " >&5 -$as_echo_n "checking for X.Org SGML entities ... " >&6; } -XORG_SGML_PATH= -if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xorg-sgml-doctools \"") >&5 - ($PKG_CONFIG --exists --print-errors "xorg-sgml-doctools ") 2>&5 - ac_status=$? - $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools` +# Check whether --enable-devel-docs was given. +if test "${enable_devel_docs+set}" = set; then + enableval=$enable_devel_docs; build_devel_docs=$enableval else - if test x"$cross_compiling" != x"yes" ; then - as_ac_File=`$as_echo "ac_cv_file_$prefix/share/sgml/X11/defs.ent" | $as_tr_sh` -{ $as_echo "$as_me:$LINENO: checking for $prefix/share/sgml/X11/defs.ent" >&5 -$as_echo_n "checking for $prefix/share/sgml/X11/defs.ent... " >&6; } -if { as_var=$as_ac_File; eval "test \"\${$as_var+set}\" = set"; }; then - $as_echo_n "(cached) " >&6 + build_devel_docs=yes +fi + + + + +if test x$build_devel_docs = xyes; then + ENABLE_DEVEL_DOCS_TRUE= + ENABLE_DEVEL_DOCS_FALSE='#' else - test "$cross_compiling" = yes && - { { $as_echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 -$as_echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} - { (exit 1); exit 1; }; } -if test -r "$prefix/share/sgml/X11/defs.ent"; then - eval "$as_ac_File=yes" + ENABLE_DEVEL_DOCS_TRUE='#' + ENABLE_DEVEL_DOCS_FALSE= +fi + +{ $as_echo "$as_me:$LINENO: checking whether to build developer documentation" >&5 +$as_echo_n "checking whether to build developer documentation... " >&6; } +{ $as_echo "$as_me:$LINENO: result: $build_devel_docs" >&5 +$as_echo "$build_devel_docs" >&6; } + + + + + +# Check whether --with-xmlto was given. +if test "${with_xmlto+set}" = set; then + withval=$with_xmlto; use_xmlto=$withval else - eval "$as_ac_File=no" -fi -fi -ac_res=`eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` - { $as_echo "$as_me:$LINENO: result: $ac_res" >&5 -$as_echo "$ac_res" >&6; } -if test `eval 'as_val=${'$as_ac_File'} - $as_echo "$as_val"'` = yes; then - XORG_SGML_PATH=$prefix/share/sgml -fi - - fi - -fi - -# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing -# the path and the name of the doc stylesheet -if test "x$XORG_SGML_PATH" != "x" ; then - { $as_echo "$as_me:$LINENO: result: $XORG_SGML_PATH" >&5 -$as_echo "$XORG_SGML_PATH" >&6; } - STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 - XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl -else - { $as_echo "$as_me:$LINENO: result: no" >&5 -$as_echo "no" >&6; } + use_xmlto=auto fi - - - -if test "x$XSL_STYLESHEET" != "x"; then - HAVE_STYLESHEETS_TRUE= - HAVE_STYLESHEETS_FALSE='#' -else - HAVE_STYLESHEETS_TRUE='#' - HAVE_STYLESHEETS_FALSE= -fi - - - - - -# Check whether --with-ps2pdf was given. -if test "${with_ps2pdf+set}" = set; then - withval=$with_ps2pdf; use_ps2pdf=$withval -else - use_ps2pdf=auto -fi - - -if test "x$use_ps2pdf" = x"auto"; then - # Extract the first word of "ps2pdf", so it can be a program name with args. -set dummy ps2pdf; ac_word=$2 +if test "x$use_xmlto" = x"auto"; then + # Extract the first word of "xmlto", so it can be a program name with args. +set dummy xmlto; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PS2PDF+set}" = set; then +if test "${ac_cv_path_XMLTO+set}" = set; then $as_echo_n "(cached) " >&6 else - case $PS2PDF in + case $XMLTO in [\\/]* | ?:[\\/]*) - ac_cv_path_PS2PDF="$PS2PDF" # Let the user override the test with a path. + ac_cv_path_XMLTO="$XMLTO" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -32214,7 +32238,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PS2PDF="$as_dir/$ac_word$ac_exec_ext" + ac_cv_path_XMLTO="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -32225,34 +32249,34 @@ IFS=$as_save_IFS ;; esac fi -PS2PDF=$ac_cv_path_PS2PDF -if test -n "$PS2PDF"; then - { $as_echo "$as_me:$LINENO: result: $PS2PDF" >&5 -$as_echo "$PS2PDF" >&6; } +XMLTO=$ac_cv_path_XMLTO +if test -n "$XMLTO"; then + { $as_echo "$as_me:$LINENO: result: $XMLTO" >&5 +$as_echo "$XMLTO" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi - if test "x$PS2PDF" = "x"; then - { $as_echo "$as_me:$LINENO: WARNING: ps2pdf not found - documentation targets will be skipped" >&5 -$as_echo "$as_me: WARNING: ps2pdf not found - documentation targets will be skipped" >&2;} - have_ps2pdf=no + if test "x$XMLTO" = "x"; then + { $as_echo "$as_me:$LINENO: WARNING: xmlto not found - documentation targets will be skipped" >&5 +$as_echo "$as_me: WARNING: xmlto not found - documentation targets will be skipped" >&2;} + have_xmlto=no else - have_ps2pdf=yes + have_xmlto=yes fi -elif test "x$use_ps2pdf" = x"yes" ; then - # Extract the first word of "ps2pdf", so it can be a program name with args. -set dummy ps2pdf; ac_word=$2 +elif test "x$use_xmlto" = x"yes" ; then + # Extract the first word of "xmlto", so it can be a program name with args. +set dummy xmlto; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_PS2PDF+set}" = set; then +if test "${ac_cv_path_XMLTO+set}" = set; then $as_echo_n "(cached) " >&6 else - case $PS2PDF in + case $XMLTO in [\\/]* | ?:[\\/]*) - ac_cv_path_PS2PDF="$PS2PDF" # Let the user override the test with a path. + ac_cv_path_XMLTO="$XMLTO" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -32262,7 +32286,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_PS2PDF="$as_dir/$ac_word$ac_exec_ext" + ac_cv_path_XMLTO="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -32273,41 +32297,93 @@ IFS=$as_save_IFS ;; esac fi -PS2PDF=$ac_cv_path_PS2PDF -if test -n "$PS2PDF"; then - { $as_echo "$as_me:$LINENO: result: $PS2PDF" >&5 -$as_echo "$PS2PDF" >&6; } +XMLTO=$ac_cv_path_XMLTO +if test -n "$XMLTO"; then + { $as_echo "$as_me:$LINENO: result: $XMLTO" >&5 +$as_echo "$XMLTO" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi - if test "x$PS2PDF" = "x"; then - { { $as_echo "$as_me:$LINENO: error: --with-ps2pdf=yes specified but ps2pdf not found in PATH" >&5 -$as_echo "$as_me: error: --with-ps2pdf=yes specified but ps2pdf not found in PATH" >&2;} + if test "x$XMLTO" = "x"; then + { { $as_echo "$as_me:$LINENO: error: --with-xmlto=yes specified but xmlto not found in PATH" >&5 +$as_echo "$as_me: error: --with-xmlto=yes specified but xmlto not found in PATH" >&2;} { (exit 1); exit 1; }; } fi - have_ps2pdf=yes -elif test "x$use_ps2pdf" = x"no" ; then - if test "x$PS2PDF" != "x"; then - { $as_echo "$as_me:$LINENO: WARNING: ignoring PS2PDF environment variable since --with-ps2pdf=no was specified" >&5 -$as_echo "$as_me: WARNING: ignoring PS2PDF environment variable since --with-ps2pdf=no was specified" >&2;} + have_xmlto=yes +elif test "x$use_xmlto" = x"no" ; then + if test "x$XMLTO" != "x"; then + { $as_echo "$as_me:$LINENO: WARNING: ignoring XMLTO environment variable since --with-xmlto=no was specified" >&5 +$as_echo "$as_me: WARNING: ignoring XMLTO environment variable since --with-xmlto=no was specified" >&2;} fi - have_ps2pdf=no + have_xmlto=no else - { { $as_echo "$as_me:$LINENO: error: --with-ps2pdf expects 'yes' or 'no'" >&5 -$as_echo "$as_me: error: --with-ps2pdf expects 'yes' or 'no'" >&2;} + { { $as_echo "$as_me:$LINENO: error: --with-xmlto expects 'yes' or 'no'" >&5 +$as_echo "$as_me: error: --with-xmlto expects 'yes' or 'no'" >&2;} { (exit 1); exit 1; }; } fi +# Test for a minimum version of xmlto, if provided. +if test "$have_xmlto" = yes; then + # scrape the xmlto version + { $as_echo "$as_me:$LINENO: checking the xmlto version" >&5 +$as_echo_n "checking the xmlto version... " >&6; } + xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` + { $as_echo "$as_me:$LINENO: result: $xmlto_version" >&5 +$as_echo "$xmlto_version" >&6; } + as_arg_v1=$xmlto_version +as_arg_v2=0.0.20 +awk "$as_awk_strverscmp" v1="$as_arg_v1" v2="$as_arg_v2" /dev/null +case $? in +1) if test "x$use_xmlto" = xauto; then + { $as_echo "$as_me:$LINENO: WARNING: xmlto version $xmlto_version found, but 0.0.20 needed" >&5 +$as_echo "$as_me: WARNING: xmlto version $xmlto_version found, but 0.0.20 needed" >&2;} + have_xmlto=no + else + { { $as_echo "$as_me:$LINENO: error: xmlto version $xmlto_version found, but 0.0.20 needed" >&5 +$as_echo "$as_me: error: xmlto version $xmlto_version found, but 0.0.20 needed" >&2;} + { (exit 1); exit 1; }; } + fi;; +0) ;; +2) ;; +esac +fi -if test "$have_ps2pdf" = yes; then - HAVE_PS2PDF_TRUE= - HAVE_PS2PDF_FALSE='#' +# Test for the ability of xmlto to generate a text target +have_xmlto_text=no +cat > conftest.xml << "EOF" +EOF +if test "$have_xmlto" = yes; then + if $XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1; then + have_xmlto_text=yes else - HAVE_PS2PDF_TRUE='#' - HAVE_PS2PDF_FALSE= + { $as_echo "$as_me:$LINENO: WARNING: xmlto cannot generate text format, this format skipped" >&5 +$as_echo "$as_me: WARNING: xmlto cannot generate text format, this format skipped" >&2;} +fi + +fi + +rm -f conftest.xml + + +if test $have_xmlto_text = yes; then + HAVE_XMLTO_TEXT_TRUE= + HAVE_XMLTO_TEXT_FALSE='#' +else + HAVE_XMLTO_TEXT_TRUE='#' + HAVE_XMLTO_TEXT_FALSE= +fi + + + +if test "$have_xmlto" = yes; then + HAVE_XMLTO_TRUE= + HAVE_XMLTO_FALSE='#' +else + HAVE_XMLTO_TRUE='#' + HAVE_XMLTO_FALSE= fi @@ -32315,16 +32391,26 @@ fi -# Extract the first word of "linuxdoc", so it can be a program name with args. -set dummy linuxdoc; ac_word=$2 +# Check whether --with-fop was given. +if test "${with_fop+set}" = set; then + withval=$with_fop; use_fop=$withval +else + use_fop=auto +fi + + + +if test "x$use_fop" = x"auto"; then + # Extract the first word of "fop", so it can be a program name with args. +set dummy fop; ac_word=$2 { $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_path_LINUXDOC+set}" = set; then +if test "${ac_cv_path_FOP+set}" = set; then $as_echo_n "(cached) " >&6 else - case $LINUXDOC in + case $FOP in [\\/]* | ?:[\\/]*) - ac_cv_path_LINUXDOC="$LINUXDOC" # Let the user override the test with a path. + ac_cv_path_FOP="$FOP" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -32334,7 +32420,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_path_LINUXDOC="$as_dir/$ac_word$ac_exec_ext" + ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -32345,74 +32431,93 @@ IFS=$as_save_IFS ;; esac fi -LINUXDOC=$ac_cv_path_LINUXDOC -if test -n "$LINUXDOC"; then - { $as_echo "$as_me:$LINENO: result: $LINUXDOC" >&5 -$as_echo "$LINUXDOC" >&6; } +FOP=$ac_cv_path_FOP +if test -n "$FOP"; then + { $as_echo "$as_me:$LINENO: result: $FOP" >&5 +$as_echo "$FOP" >&6; } else { $as_echo "$as_me:$LINENO: result: no" >&5 $as_echo "no" >&6; } fi - -{ $as_echo "$as_me:$LINENO: checking whether to build documentation" >&5 -$as_echo_n "checking whether to build documentation... " >&6; } - -if test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then - BUILDDOC=yes + if test "x$FOP" = "x"; then + { $as_echo "$as_me:$LINENO: WARNING: fop not found - documentation targets will be skipped" >&5 +$as_echo "$as_me: WARNING: fop not found - documentation targets will be skipped" >&2;} + have_fop=no + else + have_fop=yes + fi +elif test "x$use_fop" = x"yes" ; then + # Extract the first word of "fop", so it can be a program name with args. +set dummy fop; ac_word=$2 +{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if test "${ac_cv_path_FOP+set}" = set; then + $as_echo_n "(cached) " >&6 else - BUILDDOC=no + case $FOP in + [\\/]* | ?:[\\/]*) + ac_cv_path_FOP="$FOP" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_path_FOP="$as_dir/$ac_word$ac_exec_ext" + $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done +IFS=$as_save_IFS + + ;; +esac +fi +FOP=$ac_cv_path_FOP +if test -n "$FOP"; then + { $as_echo "$as_me:$LINENO: result: $FOP" >&5 +$as_echo "$FOP" >&6; } +else + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } fi - -if test x$BUILDDOC = xyes; then - BUILD_LINUXDOC_TRUE= - BUILD_LINUXDOC_FALSE='#' + if test "x$FOP" = "x"; then + { { $as_echo "$as_me:$LINENO: error: --with-fop=yes specified but fop not found in PATH" >&5 +$as_echo "$as_me: error: --with-fop=yes specified but fop not found in PATH" >&2;} + { (exit 1); exit 1; }; } + fi + have_fop=yes +elif test "x$use_fop" = x"no" ; then + if test "x$FOP" != "x"; then + { $as_echo "$as_me:$LINENO: WARNING: ignoring FOP environment variable since --with-fop=no was specified" >&5 +$as_echo "$as_me: WARNING: ignoring FOP environment variable since --with-fop=no was specified" >&2;} + fi + have_fop=no else - BUILD_LINUXDOC_TRUE='#' - BUILD_LINUXDOC_FALSE= + { { $as_echo "$as_me:$LINENO: error: --with-fop expects 'yes' or 'no'" >&5 +$as_echo "$as_me: error: --with-fop expects 'yes' or 'no'" >&2;} + { (exit 1); exit 1; }; } fi -{ $as_echo "$as_me:$LINENO: result: $BUILDDOC" >&5 -$as_echo "$BUILDDOC" >&6; } - -{ $as_echo "$as_me:$LINENO: checking whether to build pdf documentation" >&5 -$as_echo_n "checking whether to build pdf documentation... " >&6; } - -if test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then - BUILDPDFDOC=yes +if test "$have_fop" = yes; then + HAVE_FOP_TRUE= + HAVE_FOP_FALSE='#' else - BUILDPDFDOC=no + HAVE_FOP_TRUE='#' + HAVE_FOP_FALSE= fi -if test x$BUILDPDFDOC = xyes; then - BUILD_PDFDOC_TRUE= - BUILD_PDFDOC_FALSE='#' -else - BUILD_PDFDOC_TRUE='#' - BUILD_PDFDOC_FALSE= -fi - - -{ $as_echo "$as_me:$LINENO: result: $BUILDPDFDOC" >&5 -$as_echo "$BUILDPDFDOC" >&6; } - -MAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" -MAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" -MAKE_PDF="$PS2PDF" -MAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" - - - - - - - if test "x$INSTALL_LIBXF86CONFIG" = xyes; then @@ -32515,7 +32620,7 @@ RECORDPROTO="recordproto >= 1.13.99.1" SCRNSAVERPROTO="scrnsaverproto >= 1.1" RESOURCEPROTO="resourceproto" DRIPROTO="xf86driproto >= 2.1.0" -DRI2PROTO="dri2proto >= 2.2" +DRI2PROTO="dri2proto >= 2.3" XINERAMAPROTO="xineramaproto" BIGFONTPROTO="xf86bigfontproto >= 1.2.0" XCALIBRATEPROTO="xcalibrateproto" @@ -32526,8 +32631,9 @@ VIDMODEPROTO="xf86vidmodeproto >= 2.2.99.1" WINDOWSWMPROTO="windowswmproto" APPLEWMPROTO="applewmproto >= 1.4" -REQUIRED_MODULES="randrproto >= 1.2.99.3 renderproto >= 0.11 fixesproto >= 4.1 damageproto >= 1.1 xcmiscproto >= 1.2.0 xextproto >= 7.0.99.3 xproto >= 7.0.13 xtrans >= 1.2.2 bigreqsproto >= 1.1.0 fontsproto inputproto >= 1.9.99.902 kbproto >= 1.0.3" -REQUIRED_LIBS="xfont xau pixman-1 >= 0.15.20" +SDK_REQUIRED_MODULES="xproto >= 7.0.17 randrproto >= 1.2.99.3 renderproto >= 0.11 xextproto >= 7.0.99.3 inputproto >= 1.9.99.902 kbproto >= 1.0.3 fontsproto" +# Make SDK_REQUIRED_MODULES available for inclusion in xorg-server.pc + LIBAPPLEWM="applewm >= 1.4" LIBDMX="dmx >= 1.0.99.1" @@ -32535,12 +32641,130 @@ LIBDRI="dri >= 7.8.0" LIBDRM="libdrm >= 2.3.0" LIBGL="gl >= 7.1.0" LIBXEXT="xext >= 1.0.99.4" +LIBXFONT="xfont >= 1.4.2" LIBXI="xi >= 1.2.99.1" LIBXTST="xtst >= 1.0.99.2" LIBPCIACCESS="pciaccess >= 0.8.0" LIBGLIB="glib-2.0 >= 2.16" LIBUDEV="libudev >= 143" LIBSELINUX="libselinux >= 2.0.86" +LIBDBUS="dbus-1 >= 1.0" +LIBPIXMAN="pixman-1 >= 0.15.20" + + +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for PIXMAN" >&5 +$as_echo_n "checking for PIXMAN... " >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$PIXMAN_CFLAGS"; then + pkg_cv_PIXMAN_CFLAGS="$PIXMAN_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$LIBPIXMAN\"") >&5 + ($PKG_CONFIG --exists --print-errors "$LIBPIXMAN") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_PIXMAN_CFLAGS=`$PKG_CONFIG --cflags "$LIBPIXMAN" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$PIXMAN_LIBS"; then + pkg_cv_PIXMAN_LIBS="$PIXMAN_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$LIBPIXMAN\"") >&5 + ($PKG_CONFIG --exists --print-errors "$LIBPIXMAN") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_PIXMAN_LIBS=`$PKG_CONFIG --libs "$LIBPIXMAN" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + PIXMAN_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$LIBPIXMAN"` + else + PIXMAN_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$LIBPIXMAN"` + fi + # Put the nasty error message in config.log where it belongs + echo "$PIXMAN_PKG_ERRORS" >&5 + + { { $as_echo "$as_me:$LINENO: error: Package requirements ($LIBPIXMAN) were not met: + +$PIXMAN_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables PIXMAN_CFLAGS +and PIXMAN_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&5 +$as_echo "$as_me: error: Package requirements ($LIBPIXMAN) were not met: + +$PIXMAN_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables PIXMAN_CFLAGS +and PIXMAN_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. +" >&2;} + { (exit 1); exit 1; }; } +elif test $pkg_failed = untried; then + { { $as_echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables PIXMAN_CFLAGS +and PIXMAN_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&5 +$as_echo "$as_me: error: The pkg-config script could not be found or is too old. Make sure it +is in your PATH or set the PKG_CONFIG environment variable to the full +path to pkg-config. + +Alternatively, you may set the environment variables PIXMAN_CFLAGS +and PIXMAN_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + PIXMAN_CFLAGS=$pkg_cv_PIXMAN_CFLAGS + PIXMAN_LIBS=$pkg_cv_PIXMAN_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + : +fi +REQUIRED_LIBS="$REQUIRED_LIBS $LIBPIXMAN $LIBXFONT xau" + +REQUIRED_MODULES="fixesproto >= 4.1 damageproto >= 1.1 xcmiscproto >= 1.2.0 xtrans >= 1.2.2 bigreqsproto >= 1.1.0 $SDK_REQUIRED_MODULES" if test "x$CONFIG_UDEV" = xyes && { test "x$CONFIG_DBUS_API" = xyes || test "x$CONFIG_HAL" = xyes; }; then @@ -32658,12 +32882,12 @@ if test -n "$PKG_CONFIG"; then pkg_cv_DBUS_CFLAGS="$DBUS_CFLAGS" else if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dbus-1\"") >&5 - ($PKG_CONFIG --exists --print-errors "dbus-1") 2>&5 + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$LIBDBUS\"") >&5 + ($PKG_CONFIG --exists --print-errors "$LIBDBUS") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - pkg_cv_DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1" 2>/dev/null` + pkg_cv_DBUS_CFLAGS=`$PKG_CONFIG --cflags "$LIBDBUS" 2>/dev/null` else pkg_failed=yes fi @@ -32676,12 +32900,12 @@ if test -n "$PKG_CONFIG"; then pkg_cv_DBUS_LIBS="$DBUS_LIBS" else if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"dbus-1\"") >&5 - ($PKG_CONFIG --exists --print-errors "dbus-1") 2>&5 + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$LIBDBUS\"") >&5 + ($PKG_CONFIG --exists --print-errors "$LIBDBUS") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - pkg_cv_DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1" 2>/dev/null` + pkg_cv_DBUS_LIBS=`$PKG_CONFIG --libs "$LIBDBUS" 2>/dev/null` else pkg_failed=yes fi @@ -32700,9 +32924,9 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - DBUS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "dbus-1"` + DBUS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$LIBDBUS"` else - DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "dbus-1"` + DBUS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$LIBDBUS"` fi # Put the nasty error message in config.log where it belongs echo "$DBUS_PKG_ERRORS" >&5 @@ -32881,7 +33105,6 @@ else CONFIG_NEED_DBUS_FALSE= fi -CONFIG_LIB='$(top_builddir)/config/libconfig.la' if test "x$USE_SIGIO_BY_DEFAULT" = xyes; then USE_SIGIO_BY_DEFAULT_VALUE=TRUE @@ -33218,6 +33441,7 @@ cat >>confdefs.h <<\_ACEOF _ACEOF REQUIRED_MODULES="$REQUIRED_MODULES $VIDEOPROTO" + SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $VIDEOPROTO" else XVMC=no fi @@ -33956,6 +34180,7 @@ cat >>confdefs.h <<\_ACEOF _ACEOF DRI2=yes + SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $DRI2PROTO" ;; esac @@ -33970,6 +34195,12 @@ fi if test "x$DRI" = xyes || test "x$DRI2" = xyes; then + if test "x$DRM" = xyes; then + +cat >>confdefs.h <<\_ACEOF +#define WITH_LIBDRM 1 +_ACEOF + pkg_failed=no { $as_echo "$as_me:$LINENO: checking for LIBDRM" >&5 @@ -34081,8 +34312,7 @@ else $as_echo "yes" >&6; } : fi - - + fi fi if test "x$DRI2" = xyes; then @@ -34175,6 +34405,7 @@ cat >>confdefs.h <<\_ACEOF _ACEOF REQUIRED_MODULES="$REQUIRED_MODULES $XINERAMAPROTO" + SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $XINERAMAPROTO" fi @@ -34588,25 +34819,6 @@ fi -if test "x$MULTIBUFFER" = xyes; then - MULTIBUFFER_TRUE= - MULTIBUFFER_FALSE='#' -else - MULTIBUFFER_TRUE='#' - MULTIBUFFER_FALSE= -fi - -if test "x$MULTIBUFFER" = xyes; then - -cat >>confdefs.h <<\_ACEOF -#define MULTIBUFFER 1 -_ACEOF - - # Requires xextproto which is always required -fi - - - if test "x$DBE" = xyes; then DBE_TRUE= DBE_FALSE='#' @@ -34862,9 +35074,6 @@ if test "x$XKB_DFLT_RULES" = x; then XKB_DFLT_RULES="base" fi ;; - openbsd*) - XKB_DFLT_RULES="xorg" - ;; *) XKB_DFLT_RULES="base" ;; @@ -36090,75 +36299,77 @@ _ACEOF SHA1_LIBS=-lmd fi -{ $as_echo "$as_me:$LINENO: checking for sha1_begin in -lsha1" >&5 -$as_echo_n "checking for sha1_begin in -lsha1... " >&6; } -if test "${ac_cv_lib_sha1_sha1_begin+set}" = set; then - $as_echo_n "(cached) " >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsha1 $LIBS" -cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char sha1_begin (); -int -main () -{ -return sha1_begin (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\"" -$as_echo "$ac_try_echo") >&5 - (eval "$ac_link") 2>conftest.er1 +pkg_failed=no +{ $as_echo "$as_me:$LINENO: checking for LIBSHA1" >&5 +$as_echo_n "checking for LIBSHA1... " >&6; } + +if test -n "$PKG_CONFIG"; then + if test -n "$LIBSHA1_CFLAGS"; then + pkg_cv_LIBSHA1_CFLAGS="$LIBSHA1_CFLAGS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libsha1\"") >&5 + ($PKG_CONFIG --exists --print-errors "libsha1") 2>&5 ac_status=$? - grep -v '^ *+' conftest.er1 >conftest.err - rm -f conftest.er1 - cat conftest.err >&5 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && { - test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext - }; then - ac_cv_lib_sha1_sha1_begin=yes + (exit $ac_status); }; then + pkg_cv_LIBSHA1_CFLAGS=`$PKG_CONFIG --cflags "libsha1" 2>/dev/null` else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_lib_sha1_sha1_begin=no + pkg_failed=yes +fi + fi +else + pkg_failed=untried +fi +if test -n "$PKG_CONFIG"; then + if test -n "$LIBSHA1_LIBS"; then + pkg_cv_LIBSHA1_LIBS="$LIBSHA1_LIBS" + else + if test -n "$PKG_CONFIG" && \ + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"libsha1\"") >&5 + ($PKG_CONFIG --exists --print-errors "libsha1") 2>&5 + ac_status=$? + $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + pkg_cv_LIBSHA1_LIBS=`$PKG_CONFIG --libs "libsha1" 2>/dev/null` +else + pkg_failed=yes +fi + fi +else + pkg_failed=untried fi -rm -rf conftest.dSYM -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -LIBS=$ac_check_lib_save_LIBS -fi -{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sha1_sha1_begin" >&5 -$as_echo "$ac_cv_lib_sha1_sha1_begin" >&6; } -if test $ac_cv_lib_sha1_sha1_begin = yes; then - HAVE_LIBSHA1=yes -fi + +if test $pkg_failed = yes; then + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + LIBSHA1_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "libsha1"` + else + LIBSHA1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "libsha1"` + fi + # Put the nasty error message in config.log where it belongs + echo "$LIBSHA1_PKG_ERRORS" >&5 + + { $as_echo "$as_me:$LINENO: result: no" >&5 +$as_echo "no" >&6; } + HAVE_LIBSHA1=no +elif test $pkg_failed = untried; then + HAVE_LIBSHA1=no +else + LIBSHA1_CFLAGS=$pkg_cv_LIBSHA1_CFLAGS + LIBSHA1_LIBS=$pkg_cv_LIBSHA1_LIBS + { $as_echo "$as_me:$LINENO: result: yes" >&5 +$as_echo "yes" >&6; } + HAVE_LIBSHA1=yes +fi if test "x$with_sha1" = x && test "x$HAVE_LIBSHA1" = xyes; then with_sha1=libsha1 fi @@ -36671,7 +36882,7 @@ fi # require. # XSERVER_CFLAGS="${XSERVER_CFLAGS} ${XSERVERCFLAGS_CFLAGS}" -XSERVER_LIBS="$DIX_LIB $CONFIG_LIB $MI_LIB $OS_LIB" +XSERVER_LIBS="$DIX_LIB $MI_LIB $OS_LIB" XSERVER_SYS_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} ${LIBS}" @@ -36748,7 +36959,7 @@ fi if test "x$XVFB" = xyes; then - XVFB_LIBS="$FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB" + XVFB_LIBS="$FB_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB" XVFB_SYS_LIBS="$XVFBMODULES_LIBS $GLX_SYS_LIBS" @@ -36766,12 +36977,12 @@ if test -n "$PKG_CONFIG"; then pkg_cv_XNESTMODULES_CFLAGS="$XNESTMODULES_CFLAGS" else if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xfont \$LIBXEXT x11 xau \$XDMCP_MODULES\"") >&5 - ($PKG_CONFIG --exists --print-errors "xfont $LIBXEXT x11 xau $XDMCP_MODULES") 2>&5 + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$LIBXEXT x11 xau \$XDMCP_MODULES\"") >&5 + ($PKG_CONFIG --exists --print-errors "$LIBXEXT x11 xau $XDMCP_MODULES") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - pkg_cv_XNESTMODULES_CFLAGS=`$PKG_CONFIG --cflags "xfont $LIBXEXT x11 xau $XDMCP_MODULES" 2>/dev/null` + pkg_cv_XNESTMODULES_CFLAGS=`$PKG_CONFIG --cflags "$LIBXEXT x11 xau $XDMCP_MODULES" 2>/dev/null` else pkg_failed=yes fi @@ -36784,12 +36995,12 @@ if test -n "$PKG_CONFIG"; then pkg_cv_XNESTMODULES_LIBS="$XNESTMODULES_LIBS" else if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xfont \$LIBXEXT x11 xau \$XDMCP_MODULES\"") >&5 - ($PKG_CONFIG --exists --print-errors "xfont $LIBXEXT x11 xau $XDMCP_MODULES") 2>&5 + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"\$LIBXEXT x11 xau \$XDMCP_MODULES\"") >&5 + ($PKG_CONFIG --exists --print-errors "$LIBXEXT x11 xau $XDMCP_MODULES") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - pkg_cv_XNESTMODULES_LIBS=`$PKG_CONFIG --libs "xfont $LIBXEXT x11 xau $XDMCP_MODULES" 2>/dev/null` + pkg_cv_XNESTMODULES_LIBS=`$PKG_CONFIG --libs "$LIBXEXT x11 xau $XDMCP_MODULES" 2>/dev/null` else pkg_failed=yes fi @@ -36808,9 +37019,9 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XNESTMODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xfont $LIBXEXT x11 xau $XDMCP_MODULES"` + XNESTMODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$LIBXEXT x11 xau $XDMCP_MODULES"` else - XNESTMODULES_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xfont $LIBXEXT x11 xau $XDMCP_MODULES"` + XNESTMODULES_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$LIBXEXT x11 xau $XDMCP_MODULES"` fi # Put the nasty error message in config.log where it belongs echo "$XNESTMODULES_PKG_ERRORS" >&5 @@ -36851,7 +37062,7 @@ if test "x$XNEST" = xyes; then $as_echo "$as_me: error: Xnest build explicitly requested, but required modules not found." >&2;} { (exit 1); exit 1; }; } fi - XNEST_LIBS="$FB_LIB $FIXES_LIB $MI_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $DIX_LIB $MAIN_LIB $OS_LIB $CONFIG_LIB" + XNEST_LIBS="$FB_LIB $FIXES_LIB $MI_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $DIX_LIB $MAIN_LIB $OS_LIB" XNEST_SYS_LIBS="$XNESTMODULES_LIBS $GLX_SYS_LIBS" @@ -38068,12 +38279,14 @@ $as_echo "$as_me: error: Unsupported Solaris platform. Only SPARC & x86 \ *) XORG_OS="unknown" XORG_OS_SUBDIR="unknown" - { { $as_echo "$as_me:$LINENO: error: Your OS is unknown. Xorg currently only supports Linux, \ - Free/Open/NetBSD, Solaris, and OS X. If you are interested in porting \ - Xorg to your platform, please email xorg@lists.freedesktop.org." >&5 -$as_echo "$as_me: error: Your OS is unknown. Xorg currently only supports Linux, \ - Free/Open/NetBSD, Solaris, and OS X. If you are interested in porting \ - Xorg to your platform, please email xorg@lists.freedesktop.org." >&2;} + { { $as_echo "$as_me:$LINENO: error: Your OS is unknown. Xorg currently only supports Linux, +Free/Open/Net/DragonFlyBSD, Solaris/OpenSolaris, & GNU Hurd. If you are +interested in porting Xorg to your platform, please email +xorg@lists.freedesktop.org." >&5 +$as_echo "$as_me: error: Your OS is unknown. Xorg currently only supports Linux, +Free/Open/Net/DragonFlyBSD, Solaris/OpenSolaris, & GNU Hurd. If you are +interested in porting Xorg to your platform, please email +xorg@lists.freedesktop.org." >&2;} { (exit 1); exit 1; }; } ;; esac @@ -39137,12 +39350,12 @@ if test -n "$PKG_CONFIG"; then pkg_cv_XWINMODULES_CFLAGS="$XWINMODULES_CFLAGS" else if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xdmcp xau xfont\"") >&5 - ($PKG_CONFIG --exists --print-errors "x11 xdmcp xau xfont") 2>&5 + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xdmcp xau\"") >&5 + ($PKG_CONFIG --exists --print-errors "x11 xdmcp xau") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - pkg_cv_XWINMODULES_CFLAGS=`$PKG_CONFIG --cflags "x11 xdmcp xau xfont" 2>/dev/null` + pkg_cv_XWINMODULES_CFLAGS=`$PKG_CONFIG --cflags "x11 xdmcp xau" 2>/dev/null` else pkg_failed=yes fi @@ -39155,12 +39368,12 @@ if test -n "$PKG_CONFIG"; then pkg_cv_XWINMODULES_LIBS="$XWINMODULES_LIBS" else if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xdmcp xau xfont\"") >&5 - ($PKG_CONFIG --exists --print-errors "x11 xdmcp xau xfont") 2>&5 + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"x11 xdmcp xau\"") >&5 + ($PKG_CONFIG --exists --print-errors "x11 xdmcp xau") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - pkg_cv_XWINMODULES_LIBS=`$PKG_CONFIG --libs "x11 xdmcp xau xfont" 2>/dev/null` + pkg_cv_XWINMODULES_LIBS=`$PKG_CONFIG --libs "x11 xdmcp xau" 2>/dev/null` else pkg_failed=yes fi @@ -39179,14 +39392,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - XWINMODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11 xdmcp xau xfont"` + XWINMODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "x11 xdmcp xau"` else - XWINMODULES_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 xdmcp xau xfont"` + XWINMODULES_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "x11 xdmcp xau"` fi # Put the nasty error message in config.log where it belongs echo "$XWINMODULES_PKG_ERRORS" >&5 - { { $as_echo "$as_me:$LINENO: error: Package requirements (x11 xdmcp xau xfont) were not met: + { { $as_echo "$as_me:$LINENO: error: Package requirements (x11 xdmcp xau) were not met: $XWINMODULES_PKG_ERRORS @@ -39197,7 +39410,7 @@ Alternatively, you may set the environment variables XWINMODULES_CFLAGS and XWINMODULES_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " >&5 -$as_echo "$as_me: error: Package requirements (x11 xdmcp xau xfont) were not met: +$as_echo "$as_me: error: Package requirements (x11 xdmcp xau) were not met: $XWINMODULES_PKG_ERRORS @@ -39395,7 +39608,7 @@ _ACEOF XWIN_SYS_LIBS=-lwinsock2 ;; esac - XWIN_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $RANDR_LIB $RENDER_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $OS_LIB" + XWIN_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $RANDR_LIB $RENDER_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $OS_LIB" XWIN_SYS_LIBS="$XWIN_SYS_LIBS $XWINMODULES_LIBS" @@ -39533,7 +39746,7 @@ cat >>confdefs.h <<\_ACEOF _ACEOF - DARWIN_LIBS="$MI_LIB $OS_LIB $DIX_LIB $MAIN_LIB $FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $RECORD_LIB $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB" + DARWIN_LIBS="$MI_LIB $OS_LIB $DIX_LIB $MAIN_LIB $FB_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB" { $as_echo "$as_me:$LINENO: checking for xp_init in -lXplugin" >&5 @@ -39898,12 +40111,12 @@ if test -n "$PKG_CONFIG"; then pkg_cv_DMXMODULES_CFLAGS="$DMXMODULES_CFLAGS" else if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xmuu \$LIBXEXT x11 xrender xfixes xfont \$LIBXI \$DMXPROTO xau \$XDMCP_MODULES\"") >&5 - ($PKG_CONFIG --exists --print-errors "xmuu $LIBXEXT x11 xrender xfixes xfont $LIBXI $DMXPROTO xau $XDMCP_MODULES") 2>&5 + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xmuu \$LIBXEXT x11 xrender xfixes \$LIBXI \$DMXPROTO xau \$XDMCP_MODULES\"") >&5 + ($PKG_CONFIG --exists --print-errors "xmuu $LIBXEXT x11 xrender xfixes $LIBXI $DMXPROTO xau $XDMCP_MODULES") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - pkg_cv_DMXMODULES_CFLAGS=`$PKG_CONFIG --cflags "xmuu $LIBXEXT x11 xrender xfixes xfont $LIBXI $DMXPROTO xau $XDMCP_MODULES" 2>/dev/null` + pkg_cv_DMXMODULES_CFLAGS=`$PKG_CONFIG --cflags "xmuu $LIBXEXT x11 xrender xfixes $LIBXI $DMXPROTO xau $XDMCP_MODULES" 2>/dev/null` else pkg_failed=yes fi @@ -39916,12 +40129,12 @@ if test -n "$PKG_CONFIG"; then pkg_cv_DMXMODULES_LIBS="$DMXMODULES_LIBS" else if test -n "$PKG_CONFIG" && \ - { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xmuu \$LIBXEXT x11 xrender xfixes xfont \$LIBXI \$DMXPROTO xau \$XDMCP_MODULES\"") >&5 - ($PKG_CONFIG --exists --print-errors "xmuu $LIBXEXT x11 xrender xfixes xfont $LIBXI $DMXPROTO xau $XDMCP_MODULES") 2>&5 + { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"xmuu \$LIBXEXT x11 xrender xfixes \$LIBXI \$DMXPROTO xau \$XDMCP_MODULES\"") >&5 + ($PKG_CONFIG --exists --print-errors "xmuu $LIBXEXT x11 xrender xfixes $LIBXI $DMXPROTO xau $XDMCP_MODULES") 2>&5 ac_status=$? $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then - pkg_cv_DMXMODULES_LIBS=`$PKG_CONFIG --libs "xmuu $LIBXEXT x11 xrender xfixes xfont $LIBXI $DMXPROTO xau $XDMCP_MODULES" 2>/dev/null` + pkg_cv_DMXMODULES_LIBS=`$PKG_CONFIG --libs "xmuu $LIBXEXT x11 xrender xfixes $LIBXI $DMXPROTO xau $XDMCP_MODULES" 2>/dev/null` else pkg_failed=yes fi @@ -39940,9 +40153,9 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - DMXMODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xmuu $LIBXEXT x11 xrender xfixes xfont $LIBXI $DMXPROTO xau $XDMCP_MODULES"` + DMXMODULES_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "xmuu $LIBXEXT x11 xrender xfixes $LIBXI $DMXPROTO xau $XDMCP_MODULES"` else - DMXMODULES_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xmuu $LIBXEXT x11 xrender xfixes xfont $LIBXI $DMXPROTO xau $XDMCP_MODULES"` + DMXMODULES_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xmuu $LIBXEXT x11 xrender xfixes $LIBXI $DMXPROTO xau $XDMCP_MODULES"` fi # Put the nasty error message in config.log where it belongs echo "$DMXMODULES_PKG_ERRORS" >&5 @@ -40061,7 +40274,7 @@ $as_echo "$as_me: error: Xdmx build explicitly requested, but required fi DMX_INCLUDES="$XEXT_INC $RENDER_INC $RECORD_INC" XDMX_CFLAGS="$DMXMODULES_CFLAGS" - XDMX_LIBS="$FB_LIB $MI_LIB $RENDER_LIB $RECORD_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $MIEXT_SHADOW_LIB $MIEXT_DAMAGE_LIB $XEXT_LIB $MAIN_LIB $DIX_LIB $CONFIG_LIB $OS_LIB $FIXES_LIB" + XDMX_LIBS="$FB_LIB $MI_LIB $RENDER_LIB $RECORD_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $MIEXT_SHADOW_LIB $MIEXT_DAMAGE_LIB $XEXT_LIB $MAIN_LIB $DIX_LIB $OS_LIB $FIXES_LIB" XDMX_SYS_LIBS="$DMXMODULES_LIBS" @@ -41416,7 +41629,7 @@ _ACEOF fi - XEPHYR_REQUIRED_LIBS="x11 $LIBXEXT xfont xau xdmcp" + XEPHYR_REQUIRED_LIBS="x11 $LIBXEXT xau xdmcp" if test "x$XV" = xyes; then XEPHYR_REQUIRED_LIBS="$XEPHYR_REQUIRED_LIBS xv" fi @@ -41498,6 +41711,11 @@ fi if test "x$XEPHYR" = xauto; then XEPHYR=$xephyr fi + if test "x$XEPHYR" = xyes && test "x$xephyr" = xno; then + { { $as_echo "$as_me:$LINENO: error: Xephyr dependencies missing" >&5 +$as_echo "$as_me: error: Xephyr dependencies missing" >&2;} + { (exit 1); exit 1; }; } + fi # Xephyr needs nanosleep() which is in librt on Solaris { $as_echo "$as_me:$LINENO: checking for nanosleep" >&5 @@ -41710,7 +41928,7 @@ fi ;; esac KDRIVE_STUB_LIB='$(top_builddir)/hw/kdrive/src/libkdrivestubs.la' - KDRIVE_LOCAL_LIBS="$MAIN_LIB $DIX_LIB $KDRIVE_LIB $KDRIVE_STUB_LIB $CONFIG_LIB" + KDRIVE_LOCAL_LIBS="$MAIN_LIB $DIX_LIB $KDRIVE_LIB $KDRIVE_STUB_LIB" KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $FB_LIB $MI_LIB $KDRIVE_PURE_LIBS" KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $KDRIVE_OS_LIB $OS_LIB" KDRIVE_LIBS="$TSLIB_LIBS $KDRIVE_LOCAL_LIBS $XSERVER_SYS_LIBS $GLX_SYS_LIBS $DLOPEN_LIBS" @@ -41906,6 +42124,7 @@ _ACEOF test "$exec_prefix_NONE" && exec_prefix=NONE + BUILD_DATE="`date +'%Y%m%d'`" BUILD_TIME="`date +'1%H%M%S'`" @@ -41919,7 +42138,7 @@ DIX_CFLAGS="-DHAVE_DIX_CONFIG_H $XSERVER_CFLAGS" -ac_config_files="$ac_config_files Makefile glx/Makefile include/Makefile composite/Makefile damageext/Makefile dbe/Makefile dix/Makefile doc/Makefile fb/Makefile record/Makefile config/Makefile mi/Makefile miext/Makefile miext/damage/Makefile miext/shadow/Makefile miext/cw/Makefile miext/rootless/Makefile os/Makefile randr/Makefile render/Makefile xkb/Makefile Xext/Makefile Xi/Makefile xfixes/Makefile exa/Makefile hw/Makefile hw/xfree86/Makefile hw/xfree86/common/Makefile hw/xfree86/common/xf86Build.h hw/xfree86/ddc/Makefile hw/xfree86/dixmods/Makefile hw/xfree86/dixmods/extmod/Makefile hw/xfree86/doc/Makefile hw/xfree86/doc/devel/Makefile hw/xfree86/doc/man/Makefile hw/xfree86/doc/sgml/Makefile hw/xfree86/dri/Makefile hw/xfree86/dri2/Makefile hw/xfree86/exa/Makefile hw/xfree86/fbdevhw/Makefile hw/xfree86/i2c/Makefile hw/xfree86/int10/Makefile hw/xfree86/loader/Makefile hw/xfree86/modes/Makefile hw/xfree86/os-support/Makefile hw/xfree86/os-support/bsd/Makefile hw/xfree86/os-support/bus/Makefile hw/xfree86/os-support/hurd/Makefile hw/xfree86/os-support/misc/Makefile hw/xfree86/os-support/linux/Makefile hw/xfree86/os-support/sco/Makefile hw/xfree86/os-support/solaris/Makefile hw/xfree86/os-support/sysv/Makefile hw/xfree86/parser/Makefile hw/xfree86/ramdac/Makefile hw/xfree86/shadowfb/Makefile hw/xfree86/vbe/Makefile hw/xfree86/vgahw/Makefile hw/xfree86/x86emu/Makefile hw/xfree86/xaa/Makefile hw/xfree86/xf8_16bpp/Makefile hw/xfree86/utils/Makefile hw/xfree86/utils/cvt/Makefile hw/xfree86/utils/gtf/Makefile hw/dmx/config/Makefile hw/dmx/doc/Makefile hw/dmx/examples/Makefile hw/dmx/input/Makefile hw/dmx/glxProxy/Makefile hw/dmx/Makefile hw/vfb/Makefile hw/xnest/Makefile hw/xwin/Makefile hw/xquartz/Makefile hw/xquartz/GL/Makefile hw/xquartz/bundle/Makefile hw/xquartz/doc/Makefile hw/xquartz/mach-startup/Makefile hw/xquartz/pbproxy/Makefile hw/xquartz/xpr/Makefile hw/kdrive/Makefile hw/kdrive/ephyr/Makefile hw/kdrive/fake/Makefile hw/kdrive/fbdev/Makefile hw/kdrive/linux/Makefile hw/kdrive/openbsd/Makefile hw/kdrive/src/Makefile hw/kdrive/wscons/Makefile test/Makefile test/xi2/Makefile xorg-server.pc" +ac_config_files="$ac_config_files Makefile glx/Makefile include/Makefile composite/Makefile damageext/Makefile dbe/Makefile dix/Makefile doc/Makefile doc/xml/Makefile doc/xml/dtrace/Makefile doc/xml/xserver.ent fb/Makefile record/Makefile config/Makefile mi/Makefile miext/Makefile miext/damage/Makefile miext/shadow/Makefile miext/cw/Makefile miext/rootless/Makefile os/Makefile randr/Makefile render/Makefile xkb/Makefile Xext/Makefile Xi/Makefile xfixes/Makefile exa/Makefile hw/Makefile hw/xfree86/Makefile hw/xfree86/common/Makefile hw/xfree86/common/xf86Build.h hw/xfree86/ddc/Makefile hw/xfree86/dixmods/Makefile hw/xfree86/dixmods/extmod/Makefile hw/xfree86/doc/Makefile hw/xfree86/doc/devel/Makefile hw/xfree86/doc/man/Makefile hw/xfree86/doc/sgml/Makefile hw/xfree86/dri/Makefile hw/xfree86/dri2/Makefile hw/xfree86/exa/Makefile hw/xfree86/fbdevhw/Makefile hw/xfree86/i2c/Makefile hw/xfree86/int10/Makefile hw/xfree86/loader/Makefile hw/xfree86/modes/Makefile hw/xfree86/os-support/Makefile hw/xfree86/os-support/bsd/Makefile hw/xfree86/os-support/bus/Makefile hw/xfree86/os-support/hurd/Makefile hw/xfree86/os-support/misc/Makefile hw/xfree86/os-support/linux/Makefile hw/xfree86/os-support/sco/Makefile hw/xfree86/os-support/solaris/Makefile hw/xfree86/os-support/sysv/Makefile hw/xfree86/parser/Makefile hw/xfree86/ramdac/Makefile hw/xfree86/shadowfb/Makefile hw/xfree86/vbe/Makefile hw/xfree86/vgahw/Makefile hw/xfree86/x86emu/Makefile hw/xfree86/xaa/Makefile hw/xfree86/xf8_16bpp/Makefile hw/xfree86/utils/Makefile hw/xfree86/utils/cvt/Makefile hw/xfree86/utils/gtf/Makefile hw/dmx/config/Makefile hw/dmx/doc/Makefile hw/dmx/examples/Makefile hw/dmx/input/Makefile hw/dmx/glxProxy/Makefile hw/dmx/Makefile hw/vfb/Makefile hw/xnest/Makefile hw/xwin/Makefile hw/xwin/glx/Makefile hw/xquartz/Makefile hw/xquartz/GL/Makefile hw/xquartz/bundle/Makefile hw/xquartz/doc/Makefile hw/xquartz/mach-startup/Makefile hw/xquartz/pbproxy/Makefile hw/xquartz/xpr/Makefile hw/kdrive/Makefile hw/kdrive/ephyr/Makefile hw/kdrive/fake/Makefile hw/kdrive/fbdev/Makefile hw/kdrive/linux/Makefile hw/kdrive/openbsd/Makefile hw/kdrive/src/Makefile hw/kdrive/wscons/Makefile test/Makefile test/xi2/Makefile xorg-server.pc" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -42046,6 +42265,13 @@ $as_echo "$as_me: error: conditional \"HAVE_DOXYGEN\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi +if test -z "${HAVE_STYLESHEETS_TRUE}" && test -z "${HAVE_STYLESHEETS_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_STYLESHEETS\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +$as_echo "$as_me: error: conditional \"HAVE_STYLESHEETS\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 @@ -42236,31 +42462,31 @@ $as_echo "$as_me: error: conditional \"BUILDDOCS\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi -if test -z "${HAVE_STYLESHEETS_TRUE}" && test -z "${HAVE_STYLESHEETS_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_STYLESHEETS\" was never defined. +if test -z "${ENABLE_DEVEL_DOCS_TRUE}" && test -z "${ENABLE_DEVEL_DOCS_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"ENABLE_DEVEL_DOCS\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"HAVE_STYLESHEETS\" was never defined. +$as_echo "$as_me: error: conditional \"ENABLE_DEVEL_DOCS\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi -if test -z "${HAVE_PS2PDF_TRUE}" && test -z "${HAVE_PS2PDF_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_PS2PDF\" was never defined. +if test -z "${HAVE_XMLTO_TEXT_TRUE}" && test -z "${HAVE_XMLTO_TEXT_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_XMLTO_TEXT\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"HAVE_PS2PDF\" was never defined. +$as_echo "$as_me: error: conditional \"HAVE_XMLTO_TEXT\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi -if test -z "${BUILD_LINUXDOC_TRUE}" && test -z "${BUILD_LINUXDOC_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"BUILD_LINUXDOC\" was never defined. +if test -z "${HAVE_XMLTO_TRUE}" && test -z "${HAVE_XMLTO_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_XMLTO\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"BUILD_LINUXDOC\" was never defined. +$as_echo "$as_me: error: conditional \"HAVE_XMLTO\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi -if test -z "${BUILD_PDFDOC_TRUE}" && test -z "${BUILD_PDFDOC_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"BUILD_PDFDOC\" was never defined. +if test -z "${HAVE_FOP_TRUE}" && test -z "${HAVE_FOP_FALSE}"; then + { { $as_echo "$as_me:$LINENO: error: conditional \"HAVE_FOP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"BUILD_PDFDOC\" was never defined. +$as_echo "$as_me: error: conditional \"HAVE_FOP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi @@ -42425,13 +42651,6 @@ $as_echo "$as_me: error: conditional \"XCSECURITY\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi -if test -z "${MULTIBUFFER_TRUE}" && test -z "${MULTIBUFFER_FALSE}"; then - { { $as_echo "$as_me:$LINENO: error: conditional \"MULTIBUFFER\" was never defined. -Usually this means the macro was only invoked conditionally." >&5 -$as_echo "$as_me: error: conditional \"MULTIBUFFER\" was never defined. -Usually this means the macro was only invoked conditionally." >&2;} - { (exit 1); exit 1; }; } -fi if test -z "${DBE_TRUE}" && test -z "${DBE_FALSE}"; then { { $as_echo "$as_me:$LINENO: error: conditional \"DBE\" was never defined. Usually this means the macro was only invoked conditionally." >&5 @@ -43132,7 +43351,7 @@ exec 6>&1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by xorg-server $as_me 1.8.2, which was +This file was extended by xorg-server $as_me 1.9.2, which was generated by GNU Autoconf 2.62. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -43185,7 +43404,7 @@ Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_version="\\ -xorg-server config.status 1.8.2 +xorg-server config.status 1.9.2 configured by $0, generated by GNU Autoconf 2.62, with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" @@ -43324,6 +43543,9 @@ do "dbe/Makefile") CONFIG_FILES="$CONFIG_FILES dbe/Makefile" ;; "dix/Makefile") CONFIG_FILES="$CONFIG_FILES dix/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; + "doc/xml/Makefile") CONFIG_FILES="$CONFIG_FILES doc/xml/Makefile" ;; + "doc/xml/dtrace/Makefile") CONFIG_FILES="$CONFIG_FILES doc/xml/dtrace/Makefile" ;; + "doc/xml/xserver.ent") CONFIG_FILES="$CONFIG_FILES doc/xml/xserver.ent" ;; "fb/Makefile") CONFIG_FILES="$CONFIG_FILES fb/Makefile" ;; "record/Makefile") CONFIG_FILES="$CONFIG_FILES record/Makefile" ;; "config/Makefile") CONFIG_FILES="$CONFIG_FILES config/Makefile" ;; @@ -43389,6 +43611,7 @@ do "hw/vfb/Makefile") CONFIG_FILES="$CONFIG_FILES hw/vfb/Makefile" ;; "hw/xnest/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xnest/Makefile" ;; "hw/xwin/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xwin/Makefile" ;; + "hw/xwin/glx/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xwin/glx/Makefile" ;; "hw/xquartz/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xquartz/Makefile" ;; "hw/xquartz/GL/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xquartz/GL/Makefile" ;; "hw/xquartz/bundle/Makefile") CONFIG_FILES="$CONFIG_FILES hw/xquartz/bundle/Makefile" ;; diff --git a/xserver/configure.ac b/xserver/configure.ac index 3c721ec71..ad5f6c18b 100644 --- a/xserver/configure.ac +++ b/xserver/configure.ac @@ -26,18 +26,19 @@ dnl dnl Process this file with autoconf to create configure. AC_PREREQ(2.57) -AC_INIT([xorg-server], 1.8.2, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server) -RELEASE_DATE="2010-07-01" +AC_INIT([xorg-server], 1.9.2, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server) +RELEASE_DATE="2010-10-30" AC_CONFIG_SRCDIR([Makefile.am]) AM_INIT_AUTOMAKE([foreign dist-bzip2]) AM_MAINTAINER_MODE -# Require xorg-macros: XORG_DEFAULT_OPTIONS +# Require xorg-macros minimum of 1.10 for XORG_CHECK_SGML_DOCTOOLS m4_ifndef([XORG_MACROS_VERSION], - [m4_fatal([must install xorg-macros 1.6 or later before running autoconf/autogen])]) -XORG_MACROS_VERSION(1.6) + [m4_fatal([must install xorg-macros 1.10 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.10) XORG_DEFAULT_OPTIONS XORG_WITH_DOXYGEN(1.6.1) +XORG_CHECK_SGML_DOCTOOLS(1.5) m4_ifndef([XORG_FONT_MACROS_VERSION], [m4_fatal([must install fontutil 1.1 or later before running autoconf/autogen])]) XORG_FONT_MACROS_VERSION(1.1) @@ -123,7 +124,7 @@ AM_CONDITIONAL(SPECIAL_DTRACE_OBJECTS, [test "x$SPECIAL_DTRACE_OBJECTS" = "xyes" AC_HEADER_DIRENT AC_HEADER_STDC -AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h dlfcn.h stropts.h fnmatch.h]) +AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h dlfcn.h stropts.h fnmatch.h sys/utsname.h]) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST @@ -659,7 +660,6 @@ AC_ARG_ENABLE(xselinux, AS_HELP_STRING([--enable-xselinux], [Build SELinux AC_ARG_ENABLE(xcsecurity, AS_HELP_STRING([--enable-xcsecurity], [Build Security extension (default: disabled)]), [XCSECURITY=$enableval], [XCSECURITY=no]) AC_ARG_ENABLE(xcalibrate, AS_HELP_STRING([--enable-xcalibrate], [Build XCalibrate extension (default: disabled)]), [XCALIBRATE=$enableval], [XCALIBRATE=no]) AC_ARG_ENABLE(tslib, AS_HELP_STRING([--enable-tslib], [Build kdrive tslib touchscreen support (default: disabled)]), [TSLIB=$enableval], [TSLIB=no]) -AC_ARG_ENABLE(multibuffer, AS_HELP_STRING([--enable-multibuffer], [Build Multibuffer extension (default: disabled)]), [MULTIBUFFER=$enableval], [MULTIBUFFER=no]) AC_ARG_ENABLE(dbe, AS_HELP_STRING([--disable-dbe], [Build DBE extension (default: enabled)]), [DBE=$enableval], [DBE=yes]) AC_ARG_ENABLE(xf86bigfont, AS_HELP_STRING([--enable-xf86bigfont], [Build XF86 Big Font extension (default: disabled)]), [XF86BIGFONT=$enableval], [XF86BIGFONT=no]) AC_ARG_ENABLE(dpms, AS_HELP_STRING([--disable-dpms], [Build DPMS extension (default: enabled)]), [DPMSExtension=$enableval], [DPMSExtension=yes]) @@ -672,6 +672,7 @@ AC_ARG_ENABLE(vgahw, AS_HELP_STRING([--enable-vgahw], [Build Xorg with AC_ARG_ENABLE(vbe, AS_HELP_STRING([--enable-vbe], [Build Xorg with VBE module (default: enabled)]), [VBE=$enableval], [VBE=yes]) AC_ARG_ENABLE(int10-module, AS_HELP_STRING([--enable-int10-module], [Build Xorg with int10 module (default: enabled)]), [INT10MODULE=$enableval], [INT10MODULE=yes]) AC_ARG_ENABLE(windowswm, AS_HELP_STRING([--enable-windowswm], [Build XWin with WindowsWM extension (default: no)]), [WINDOWSWM=$enableval], [WINDOWSWM=no]) +AC_ARG_ENABLE(libdrm, AS_HELP_STRING([--enable-libdrm], [Build Xorg with libdrm support (default: enabled)]), [DRM=$enableval],[DRM=yes]) dnl DDXes. AC_ARG_ENABLE(xorg, AS_HELP_STRING([--enable-xorg], [Build Xorg server (default: auto)]), [XORG=$enableval], [XORG=auto]) @@ -744,10 +745,9 @@ fi dnl Handle building documentation AM_CONDITIONAL(BUILDDOCS, test "x$BUILDDOCS" = xyes) - -dnl Only build sgml docs when linuxdoc is available and -dnl def.ents has been installed -XORG_CHECK_LINUXDOC +XORG_ENABLE_DEVEL_DOCS +XORG_WITH_XMLTO(0.0.20) +XORG_WITH_FOP dnl Handle installing libxf86config AM_CONDITIONAL(INSTALL_LIBXF86CONFIG, [test "x$INSTALL_LIBXF86CONFIG" = xyes]) @@ -809,7 +809,7 @@ RECORDPROTO="recordproto >= 1.13.99.1" SCRNSAVERPROTO="scrnsaverproto >= 1.1" RESOURCEPROTO="resourceproto" DRIPROTO="xf86driproto >= 2.1.0" -DRI2PROTO="dri2proto >= 2.2" +DRI2PROTO="dri2proto >= 2.3" XINERAMAPROTO="xineramaproto" BIGFONTPROTO="xf86bigfontproto >= 1.2.0" XCALIBRATEPROTO="xcalibrateproto" @@ -821,8 +821,9 @@ WINDOWSWMPROTO="windowswmproto" APPLEWMPROTO="applewmproto >= 1.4" dnl Core modules for most extensions, et al. -REQUIRED_MODULES="[randrproto >= 1.2.99.3] [renderproto >= 0.11] [fixesproto >= 4.1] [damageproto >= 1.1] [xcmiscproto >= 1.2.0] [xextproto >= 7.0.99.3] [xproto >= 7.0.13] [xtrans >= 1.2.2] [bigreqsproto >= 1.1.0] fontsproto [inputproto >= 1.9.99.902] [kbproto >= 1.0.3]" -REQUIRED_LIBS="xfont xau [pixman-1 >= 0.15.20]" +SDK_REQUIRED_MODULES="[xproto >= 7.0.17] [randrproto >= 1.2.99.3] [renderproto >= 0.11] [xextproto >= 7.0.99.3] [inputproto >= 1.9.99.902] [kbproto >= 1.0.3] fontsproto" +# Make SDK_REQUIRED_MODULES available for inclusion in xorg-server.pc +AC_SUBST(SDK_REQUIRED_MODULES) dnl List of libraries that require a specific version LIBAPPLEWM="applewm >= 1.4" @@ -831,12 +832,22 @@ LIBDRI="dri >= 7.8.0" LIBDRM="libdrm >= 2.3.0" LIBGL="gl >= 7.1.0" LIBXEXT="xext >= 1.0.99.4" +LIBXFONT="xfont >= 1.4.2" LIBXI="xi >= 1.2.99.1" LIBXTST="xtst >= 1.0.99.2" LIBPCIACCESS="pciaccess >= 0.8.0" LIBGLIB="glib-2.0 >= 2.16" LIBUDEV="libudev >= 143" LIBSELINUX="libselinux >= 2.0.86" +LIBDBUS="dbus-1 >= 1.0" +LIBPIXMAN="pixman-1 >= 0.15.20" + +dnl Pixman is always required, but we separate it out so we can link +dnl specific modules against it +PKG_CHECK_MODULES(PIXMAN, $LIBPIXMAN) +REQUIRED_LIBS="$REQUIRED_LIBS $LIBPIXMAN $LIBXFONT xau" + +REQUIRED_MODULES="[fixesproto >= 4.1] [damageproto >= 1.1] [xcmiscproto >= 1.2.0] [xtrans >= 1.2.2] [bigreqsproto >= 1.1.0] $SDK_REQUIRED_MODULES" if test "x$CONFIG_UDEV" = xyes && { test "x$CONFIG_DBUS_API" = xyes || test "x$CONFIG_HAL" = xyes; }; then @@ -860,7 +871,7 @@ fi dnl HAVE_DBUS is true if we actually have the D-Bus library, whereas dnl CONFIG_DBUS_API is true if we want to enable the D-Bus config dnl API. -PKG_CHECK_MODULES(DBUS, dbus-1, [HAVE_DBUS=yes], [HAVE_DBUS=no]) +PKG_CHECK_MODULES(DBUS, $LIBDBUS, [HAVE_DBUS=yes], [HAVE_DBUS=no]) if test "x$HAVE_DBUS" = xyes; then AC_DEFINE(HAVE_DBUS, 1, [Have D-Bus support]) fi @@ -897,7 +908,6 @@ if test "x$CONFIG_NEED_DBUS" = xyes; then AC_DEFINE(CONFIG_NEED_DBUS, 1, [Use D-Bus for input hotplug]) fi AM_CONDITIONAL(CONFIG_NEED_DBUS, [test "x$CONFIG_NEED_DBUS" = xyes]) -CONFIG_LIB='$(top_builddir)/config/libconfig.la' if test "x$USE_SIGIO_BY_DEFAULT" = xyes; then USE_SIGIO_BY_DEFAULT_VALUE=TRUE @@ -969,6 +979,7 @@ if test "x$XV" = xyes; then AC_DEFINE(XV, 1, [Support Xv extension]) AC_DEFINE(XvExtension, 1, [Build Xv extension]) REQUIRED_MODULES="$REQUIRED_MODULES $VIDEOPROTO" + SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $VIDEOPROTO" else XVMC=no fi @@ -1058,14 +1069,16 @@ case "$DRI2,$HAVE_DRI2PROTO" in yes,yes | auto,yes) AC_DEFINE(DRI2, 1, [Build DRI2 extension]) DRI2=yes + SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $DRI2PROTO" ;; esac AM_CONDITIONAL(DRI2, test "x$DRI2" = xyes) if test "x$DRI" = xyes || test "x$DRI2" = xyes; then - PKG_CHECK_MODULES([LIBDRM], $LIBDRM) - AC_SUBST(LIBDRM_CFLAGS) - AC_SUBST(LIBDRM_LIBS) + if test "x$DRM" = xyes; then + AC_DEFINE(WITH_LIBDRM, 1, [Building with libdrm support]) + PKG_CHECK_MODULES([LIBDRM], $LIBDRM) + fi fi if test "x$DRI2" = xyes; then @@ -1095,6 +1108,7 @@ if test "x$XINERAMA" = xyes; then AC_DEFINE(XINERAMA, 1, [Support Xinerama extension]) AC_DEFINE(PANORAMIX, 1, [Internal define for Xinerama]) REQUIRED_MODULES="$REQUIRED_MODULES $XINERAMAPROTO" + SDK_REQUIRED_MODULES="$SDK_REQUIRED_MODULES $XINERAMAPROTO" fi AM_CONDITIONAL(XACE, [test "x$XACE" = xyes]) @@ -1122,12 +1136,6 @@ if test "x$XCSECURITY" = xyes; then AC_DEFINE(XCSECURITY, 1, [Build Security extension]) fi -AM_CONDITIONAL(MULTIBUFFER, [test "x$MULTIBUFFER" = xyes]) -if test "x$MULTIBUFFER" = xyes; then - AC_DEFINE(MULTIBUFFER, 1, [Build Multibuffer extension]) - # Requires xextproto which is always required -fi - AM_CONDITIONAL(DBE, [test "x$DBE" = xyes]) if test "x$DBE" = xyes; then AC_DEFINE(DBE, 1, [Support DBE extension]) @@ -1216,10 +1224,6 @@ if test "x$XKB_DFLT_RULES" = x; then XKB_DFLT_RULES="base" fi ;; - openbsd*) - dnl still using xkbdata for now - XKB_DFLT_RULES="xorg" - ;; *) XKB_DFLT_RULES="base" ;; @@ -1420,7 +1424,7 @@ if test "x$with_sha1" = xlibmd; then [Use libmd SHA1 functions]) SHA1_LIBS=-lmd fi -AC_CHECK_LIB([sha1], [sha1_begin], [HAVE_LIBSHA1=yes]) +PKG_CHECK_MODULES([LIBSHA1], [libsha1], [HAVE_LIBSHA1=yes], [HAVE_LIBSHA1=no]) if test "x$with_sha1" = x && test "x$HAVE_LIBSHA1" = xyes; then with_sha1=libsha1 fi @@ -1492,7 +1496,7 @@ PKG_CHECK_MODULES([XSERVERLIBS], [$REQUIRED_LIBS]) # require. # XSERVER_CFLAGS="${XSERVER_CFLAGS} ${XSERVERCFLAGS_CFLAGS}" -XSERVER_LIBS="$DIX_LIB $CONFIG_LIB $MI_LIB $OS_LIB" +XSERVER_LIBS="$DIX_LIB $MI_LIB $OS_LIB" XSERVER_SYS_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} ${LIBS}" AC_SUBST([XSERVER_LIBS]) AC_SUBST([XSERVER_SYS_LIBS]) @@ -1542,7 +1546,7 @@ AC_MSG_RESULT([$XVFB]) AM_CONDITIONAL(XVFB, [test "x$XVFB" = xyes]) if test "x$XVFB" = xyes; then - XVFB_LIBS="$FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB" + XVFB_LIBS="$FB_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB" XVFB_SYS_LIBS="$XVFBMODULES_LIBS $GLX_SYS_LIBS" AC_SUBST([XVFB_LIBS]) AC_SUBST([XVFB_SYS_LIBS]) @@ -1551,7 +1555,7 @@ fi dnl Xnest DDX -PKG_CHECK_MODULES(XNESTMODULES, [xfont $LIBXEXT x11 xau $XDMCP_MODULES], [have_xnest=yes], [have_xnest=no]) +PKG_CHECK_MODULES(XNESTMODULES, [$LIBXEXT x11 xau $XDMCP_MODULES], [have_xnest=yes], [have_xnest=no]) AC_MSG_CHECKING([whether to build Xnest DDX]) if test "x$XNEST" = xauto; then XNEST="$have_xnest" @@ -1563,7 +1567,7 @@ if test "x$XNEST" = xyes; then if test "x$have_xnest" = xno; then AC_MSG_ERROR([Xnest build explicitly requested, but required modules not found.]) fi - XNEST_LIBS="$FB_LIB $FIXES_LIB $MI_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $DIX_LIB $MAIN_LIB $OS_LIB $CONFIG_LIB" + XNEST_LIBS="$FB_LIB $FIXES_LIB $MI_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $DIX_LIB $MAIN_LIB $OS_LIB" XNEST_SYS_LIBS="$XNESTMODULES_LIBS $GLX_SYS_LIBS" AC_SUBST([XNEST_LIBS]) AC_SUBST([XNEST_SYS_LIBS]) @@ -1754,9 +1758,11 @@ if test "x$XORG" = xyes; then *) XORG_OS="unknown" XORG_OS_SUBDIR="unknown" - AC_MSG_ERROR([Your OS is unknown. Xorg currently only supports Linux, \ - Free/Open/NetBSD, Solaris, and OS X. If you are interested in porting \ - Xorg to your platform, please email xorg@lists.freedesktop.org.]) + AC_MSG_ERROR([m4_text_wrap(m4_join([ ], + [Your OS is unknown. Xorg currently only supports Linux,], + [Free/Open/Net/DragonFlyBSD, Solaris/OpenSolaris, & GNU Hurd.], + [If you are interested in porting Xorg to your platform,], + [please email xorg@lists.freedesktop.org.]))]) ;; esac @@ -1908,7 +1914,7 @@ if test "x$XWIN" = xyes; then AC_DEFINE_UNQUOTED(__VENDORDWEBSUPPORT__, ["$VENDOR_WEB"], [Vendor web address for support]) AC_CHECK_TOOL(WINDRES, windres) - PKG_CHECK_MODULES([XWINMODULES],[x11 xdmcp xau xfont]) + PKG_CHECK_MODULES([XWINMODULES],[x11 xdmcp xau]) if test "x$WINDOWSWM" = xauto; then PKG_CHECK_EXISTS($WINDOWSWMPROTO, [WINDOWSWM=yes], [WINDOWSWM=no]) @@ -1931,7 +1937,7 @@ if test "x$XWIN" = xyes; then XWIN_SYS_LIBS=-lwinsock2 ;; esac - XWIN_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $RANDR_LIB $RENDER_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $OS_LIB" + XWIN_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $RANDR_LIB $RENDER_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $OS_LIB" XWIN_SYS_LIBS="$XWIN_SYS_LIBS $XWINMODULES_LIBS" AC_SUBST(XWIN_LIBS) AC_SUBST(XWIN_SERVER_NAME) @@ -1961,7 +1967,7 @@ if test "x$XQUARTZ" = xyes; then AC_DEFINE(XQUARTZ,1,[Have Quartz]) AC_DEFINE(ROOTLESS,1,[Build Rootless code]) - DARWIN_LIBS="$MI_LIB $OS_LIB $DIX_LIB $MAIN_LIB $FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $RECORD_LIB $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB" + DARWIN_LIBS="$MI_LIB $OS_LIB $DIX_LIB $MAIN_LIB $FB_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $RANDR_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB" AC_SUBST([DARWIN_LIBS]) AC_CHECK_LIB([Xplugin],[xp_init],[:]) @@ -1997,7 +2003,7 @@ AM_CONDITIONAL(STANDALONE_XPBPROXY, [test "x$STANDALONE_XPBPROXY" = xyes]) dnl DMX DDX PKG_CHECK_MODULES( [DMXMODULES], - [xmuu $LIBXEXT x11 xrender xfixes xfont $LIBXI $DMXPROTO xau $XDMCP_MODULES], + [xmuu $LIBXEXT x11 xrender xfixes $LIBXI $DMXPROTO xau $XDMCP_MODULES], [PKG_CHECK_MODULES( [XDMXCONFIG_DEP], [xaw7 xmu xt xpm x11], @@ -2022,7 +2028,7 @@ if test "x$DMX" = xyes; then fi DMX_INCLUDES="$XEXT_INC $RENDER_INC $RECORD_INC" XDMX_CFLAGS="$DMXMODULES_CFLAGS" - XDMX_LIBS="$FB_LIB $MI_LIB $RENDER_LIB $RECORD_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $MIEXT_SHADOW_LIB $MIEXT_DAMAGE_LIB $XEXT_LIB $MAIN_LIB $DIX_LIB $CONFIG_LIB $OS_LIB $FIXES_LIB" + XDMX_LIBS="$FB_LIB $MI_LIB $RENDER_LIB $RECORD_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $MIEXT_SHADOW_LIB $MIEXT_DAMAGE_LIB $XEXT_LIB $MAIN_LIB $DIX_LIB $OS_LIB $FIXES_LIB" XDMX_SYS_LIBS="$DMXMODULES_LIBS" AC_SUBST([XDMX_CFLAGS]) AC_SUBST([XDMX_LIBS]) @@ -2102,7 +2108,7 @@ if test "$KDRIVE" = yes; then AC_DEFINE(KDRIVE_MOUSE, 1, [Enable KDrive mouse driver]) fi - XEPHYR_REQUIRED_LIBS="x11 $LIBXEXT xfont xau xdmcp" + XEPHYR_REQUIRED_LIBS="x11 $LIBXEXT xau xdmcp" if test "x$XV" = xyes; then XEPHYR_REQUIRED_LIBS="$XEPHYR_REQUIRED_LIBS xv" fi @@ -2114,6 +2120,9 @@ if test "$KDRIVE" = yes; then if test "x$XEPHYR" = xauto; then XEPHYR=$xephyr fi + if test "x$XEPHYR" = xyes && test "x$xephyr" = xno; then + AC_MSG_ERROR([Xephyr dependencies missing]) + fi # Xephyr needs nanosleep() which is in librt on Solaris AC_CHECK_FUNC([nanosleep], [], @@ -2169,7 +2178,7 @@ if test "$KDRIVE" = yes; then ;; esac KDRIVE_STUB_LIB='$(top_builddir)/hw/kdrive/src/libkdrivestubs.la' - KDRIVE_LOCAL_LIBS="$MAIN_LIB $DIX_LIB $KDRIVE_LIB $KDRIVE_STUB_LIB $CONFIG_LIB" + KDRIVE_LOCAL_LIBS="$MAIN_LIB $DIX_LIB $KDRIVE_LIB $KDRIVE_STUB_LIB" KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $FB_LIB $MI_LIB $KDRIVE_PURE_LIBS" KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $KDRIVE_OS_LIB $OS_LIB" KDRIVE_LIBS="$TSLIB_LIBS $KDRIVE_LOCAL_LIBS $XSERVER_SYS_LIBS $GLX_SYS_LIBS $DLOPEN_LIBS" @@ -2211,6 +2220,7 @@ AC_TRY_COMPILE([ AC_DEFINE_DIR(PROJECTROOT, prefix, [Overall prefix]) +AC_SUBST([RELEASE_DATE]) BUILD_DATE="`date +'%Y%m%d'`" AC_SUBST([BUILD_DATE]) BUILD_TIME="`date +'1%H%M%S'`" @@ -2233,6 +2243,9 @@ damageext/Makefile dbe/Makefile dix/Makefile doc/Makefile +doc/xml/Makefile +doc/xml/dtrace/Makefile +doc/xml/xserver.ent fb/Makefile record/Makefile config/Makefile @@ -2298,6 +2311,7 @@ hw/dmx/Makefile hw/vfb/Makefile hw/xnest/Makefile hw/xwin/Makefile +hw/xwin/glx/Makefile hw/xquartz/Makefile hw/xquartz/GL/Makefile hw/xquartz/bundle/Makefile diff --git a/xserver/damageext/Makefile.in b/xserver/damageext/Makefile.in index ddab6377f..17f70d928 100644 --- a/xserver/damageext/Makefile.in +++ b/xserver/damageext/Makefile.in @@ -107,10 +107,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -198,6 +194,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -212,6 +210,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -229,10 +228,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -288,10 +291,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -309,17 +313,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -346,20 +344,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -451,6 +452,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/damageext/damageext.c b/xserver/damageext/damageext.c index 462796e91..b4bb478dd 100644 --- a/xserver/damageext/damageext.c +++ b/xserver/damageext/damageext.c @@ -29,14 +29,11 @@ static unsigned char DamageReqCode; static int DamageEventBase; -static int DamageErrorBase; static RESTYPE DamageExtType; static RESTYPE DamageExtWinType; -static int DamageClientPrivateKeyIndex; -static DevPrivateKey DamageClientPrivateKey = &DamageClientPrivateKeyIndex; - -#define prScreen screenInfo.screens[0] +static DevPrivateKeyRec DamageClientPrivateKeyRec; +#define DamageClientPrivateKey (&DamageClientPrivateKeyRec) static void DamageExtNotify (DamageExtPtr pDamageExt, BoxPtr pBoxes, int nBoxes) @@ -50,8 +47,7 @@ DamageExtNotify (DamageExtPtr pDamageExt, BoxPtr pBoxes, int nBoxes) UpdateCurrentTimeIf (); ev.type = DamageEventBase + XDamageNotify; ev.level = pDamageExt->level; - ev.sequenceNumber = pClient->sequence; - ev.drawable = pDrawable->id; + ev.drawable = pDamageExt->drawable; ev.damage = pDamageExt->id; ev.timestamp = currentTime.milliseconds; ev.geometry.x = pDrawable->x; @@ -69,8 +65,7 @@ DamageExtNotify (DamageExtPtr pDamageExt, BoxPtr pBoxes, int nBoxes) ev.area.y = pBoxes[i].y1; ev.area.width = pBoxes[i].x2 - pBoxes[i].x1; ev.area.height = pBoxes[i].y2 - pBoxes[i].y1; - if (!pClient->clientGone) - WriteEventsToClient (pClient, 1, (xEvent *) &ev); + WriteEventsToClient (pClient, 1, (xEvent *) &ev); } } else @@ -79,8 +74,7 @@ DamageExtNotify (DamageExtPtr pDamageExt, BoxPtr pBoxes, int nBoxes) ev.area.y = 0; ev.area.width = pDrawable->width; ev.area.height = pDrawable->height; - if (!pClient->clientGone) - WriteEventsToClient (pClient, 1, (xEvent *) &ev); + WriteEventsToClient (pClient, 1, (xEvent *) &ev); } /* Composite extension marks clients with manual Subwindows as critical */ if (pDamageClient->critical > 0) @@ -98,10 +92,10 @@ DamageExtReport (DamagePtr pDamage, RegionPtr pRegion, void *closure) switch (pDamageExt->level) { case DamageReportRawRegion: case DamageReportDeltaRegion: - DamageExtNotify (pDamageExt, REGION_RECTS(pRegion), REGION_NUM_RECTS(pRegion)); + DamageExtNotify (pDamageExt, RegionRects(pRegion), RegionNumRects(pRegion)); break; case DamageReportBoundingBox: - DamageExtNotify (pDamageExt, REGION_EXTENTS(prScreen, pRegion), 1); + DamageExtNotify (pDamageExt, RegionExtents(pRegion), 1); break; case DamageReportNonEmpty: DamageExtNotify (pDamageExt, NullBox, 0); @@ -162,7 +156,7 @@ ProcDamageQueryVersion(ClientPtr client) swapl(&rep.minorVersion, n); } WriteToClient(client, sizeof(xDamageQueryVersionReply), (char *)&rep); - return(client->noClientException); + return Success; } static int @@ -201,10 +195,11 @@ ProcDamageCreate (ClientPtr client) return BadValue; } - pDamageExt = xalloc (sizeof (DamageExtRec)); + pDamageExt = malloc(sizeof (DamageExtRec)); if (!pDamageExt) return BadAlloc; pDamageExt->id = stuff->damage; + pDamageExt->drawable = stuff->drawable; pDamageExt->pDrawable = pDrawable; pDamageExt->level = level; pDamageExt->pClient = client; @@ -216,12 +211,13 @@ ProcDamageCreate (ClientPtr client) pDamageExt); if (!pDamageExt->pDamage) { - xfree (pDamageExt); + free(pDamageExt); return BadAlloc; } if (!AddResource (stuff->damage, DamageExtType, (pointer) pDamageExt)) return BadAlloc; + DamageSetReportAfterOp (pDamageExt->pDamage, TRUE); DamageRegister (pDamageExt->pDrawable, pDamageExt->pDamage); if (pDrawable->type == DRAWABLE_WINDOW) @@ -230,7 +226,7 @@ ProcDamageCreate (ClientPtr client) DamageRegionAppend(pDrawable, pRegion); } - return (client->noClientException); + return Success; } static int @@ -242,7 +238,7 @@ ProcDamageDestroy (ClientPtr client) REQUEST_SIZE_MATCH(xDamageDestroyReq); VERIFY_DAMAGEEXT(pDamageExt, stuff->damage, client, DixWriteAccess); FreeResource (stuff->damage, RT_NONE); - return (client->noClientException); + return Success; } static int @@ -264,18 +260,18 @@ ProcDamageSubtract (ClientPtr client) if (pRepair) { if (pParts) - REGION_INTERSECT (prScreen, pParts, DamageRegion (pDamage), pRepair); + RegionIntersect(pParts, DamageRegion (pDamage), pRepair); if (DamageSubtract (pDamage, pRepair)) DamageExtReport (pDamage, DamageRegion (pDamage), (void *) pDamageExt); } else { if (pParts) - REGION_COPY (prScreen, pParts, DamageRegion (pDamage)); + RegionCopy(pParts, DamageRegion (pDamage)); DamageEmpty (pDamage); } } - return (client->noClientException); + return Success; } static int @@ -296,11 +292,11 @@ ProcDamageAdd (ClientPtr client) /* The region is relative to the drawable origin, so translate it out to * screen coordinates like damage expects. */ - REGION_TRANSLATE(pScreen, pRegion, pDrawable->x, pDrawable->y); + RegionTranslate(pRegion, pDrawable->x, pDrawable->y); DamageRegionAppend(pDrawable, pRegion); - REGION_TRANSLATE(pScreen, pRegion, -pDrawable->x, -pDrawable->y); + RegionTranslate(pRegion, -pDrawable->x, -pDrawable->y); - return (client->noClientException); + return Success; } /* Major version controls available requests */ @@ -456,7 +452,7 @@ FreeDamageExt (pointer value, XID did) DamageUnregister (pDamageExt->pDrawable, pDamageExt->pDamage); DamageDestroy (pDamageExt->pDamage); } - xfree (pDamageExt); + free(pDamageExt); return Success; } @@ -505,8 +501,9 @@ DamageExtensionInit(void) if (!DamageExtWinType) return; - if (!dixRequestPrivate(DamageClientPrivateKey, sizeof (DamageClientRec))) + if (!dixRegisterPrivateKey(&DamageClientPrivateKeyRec, PRIVATE_CLIENT, sizeof (DamageClientRec))) return; + if (!AddCallback (&ClientStateCallback, DamageClientCallback, 0)) return; @@ -517,8 +514,8 @@ DamageExtensionInit(void) { DamageReqCode = (unsigned char)extEntry->base; DamageEventBase = extEntry->eventBase; - DamageErrorBase = extEntry->errorBase; EventSwapVector[DamageEventBase + XDamageNotify] = (EventSwapPtr) SDamageNotifyEvent; + SetResourceTypeErrorValue(DamageExtType, extEntry->errorBase + BadDamage); } } diff --git a/xserver/damageext/damageextint.h b/xserver/damageext/damageextint.h index 45c5ff96c..a235cb908 100644 --- a/xserver/damageext/damageextint.h +++ b/xserver/damageext/damageextint.h @@ -55,13 +55,14 @@ typedef struct _DamageExt { DamageReportLevel level; ClientPtr pClient; XID id; + XID drawable; } DamageExtRec, *DamageExtPtr; #define VERIFY_DAMAGEEXT(pDamageExt, rid, client, mode) { \ int rc = dixLookupResourceByType((pointer *)&(pDamageExt), rid, \ DamageExtType, client, mode); \ if (rc != Success) \ - return (rc == BadValue) ? DamageErrorBase + BadDamage : rc; \ + return rc; \ } void diff --git a/xserver/dbe/Makefile.in b/xserver/dbe/Makefile.in index c98128013..3fc9b9be7 100644 --- a/xserver/dbe/Makefile.in +++ b/xserver/dbe/Makefile.in @@ -119,10 +119,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -210,6 +206,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -224,6 +222,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -241,10 +240,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -300,10 +303,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -321,17 +325,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -358,20 +356,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -463,6 +464,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/dbe/dbe.c b/xserver/dbe/dbe.c index 825d2e08f..77b616b6a 100644 --- a/xserver/dbe/dbe.c +++ b/xserver/dbe/dbe.c @@ -57,15 +57,13 @@ /* GLOBALS */ -/* These are static globals copied to DBE's screen private for use by DDX */ -static int dbeScreenPrivKeyIndex; -static DevPrivateKey dbeScreenPrivKey = &dbeScreenPrivKeyIndex; -static int dbeWindowPrivKeyIndex; -static DevPrivateKey dbeWindowPrivKey = &dbeWindowPrivKeyIndex; +/* These are globals for use by DDX */ +DevPrivateKeyRec dbeScreenPrivKeyRec; +DevPrivateKeyRec dbeWindowPrivKeyRec; -/* These are static globals copied to DBE's screen private for use by DDX */ -static RESTYPE dbeDrawableResType; -static RESTYPE dbeWindowPrivResType; +/* These are globals for use by DDX */ +RESTYPE dbeDrawableResType; +RESTYPE dbeWindowPrivResType; /* Used to generate DBE's BadBuffer error. */ static int dbeErrorBase; @@ -147,7 +145,7 @@ ProcDbeGetVersion(ClientPtr client) WriteToClient(client, sizeof(xDbeGetVersionReply), (char *)&rep); - return(client->noClientException); + return Success; } /* ProcDbeGetVersion() */ @@ -201,7 +199,7 @@ ProcDbeAllocateBackBufferName(ClientPtr client) /* The window must be InputOutput. */ if (pWin->drawable.class != InputOutput) { - return(BadMatch); + return BadMatch; } /* The swap action must be valid. */ @@ -211,7 +209,7 @@ ProcDbeAllocateBackBufferName(ClientPtr client) (swapAction != XdbeUntouched ) && (swapAction != XdbeCopied )) { - return(BadValue); + return BadValue; } /* The id must be in range and not already in use. */ @@ -222,12 +220,12 @@ ProcDbeAllocateBackBufferName(ClientPtr client) */ pDbeScreenPriv = DBE_SCREEN_PRIV_FROM_WINDOW(pWin); if (!pDbeScreenPriv->GetVisualInfo) - return(BadMatch); /* screen doesn't support double buffering */ + return BadMatch; /* screen doesn't support double buffering */ if (!(*pDbeScreenPriv->GetVisualInfo)(pWin->drawable.pScreen, &scrVisInfo)) { /* GetVisualInfo() failed to allocate visual info data. */ - return(BadAlloc); + return BadAlloc; } /* See if the window's visual is on the list. */ @@ -241,11 +239,11 @@ ProcDbeAllocateBackBufferName(ClientPtr client) } /* Free what was allocated by the GetVisualInfo() call above. */ - xfree(scrVisInfo.visinfo); + free(scrVisInfo.visinfo); if (!visualMatched) { - return(BadMatch); + return BadMatch; } if ((pDbeWindowPriv = DBE_WINDOW_PRIV(pWin)) == NULL) @@ -254,9 +252,9 @@ ProcDbeAllocateBackBufferName(ClientPtr client) * Allocate a window priv. */ - pDbeWindowPriv = xcalloc(1, sizeof(DbeWindowPrivRec)); + pDbeWindowPriv = dixAllocateObjectWithPrivates(DbeWindowPrivRec, PRIVATE_DBE_WINDOW); if (!pDbeWindowPriv) - return(BadAlloc); + return BadAlloc; /* Fill out window priv information. */ pDbeWindowPriv->pWindow = pWin; @@ -319,11 +317,11 @@ ProcDbeAllocateBackBufferName(ClientPtr client) } /* malloc/realloc a new array and initialize all elements to 0. */ - pDbeWindowPriv->IDs = (XID *)xrealloc(pIDs, + pDbeWindowPriv->IDs = (XID *)realloc(pIDs, (pDbeWindowPriv->maxAvailableIDs+DBE_INCR_MAX_IDS)*sizeof(XID)); if (!pDbeWindowPriv->IDs) { - return(BadAlloc); + return BadAlloc; } memset(&pDbeWindowPriv->IDs[pDbeWindowPriv->nBufferIDs], 0, (pDbeWindowPriv->maxAvailableIDs + DBE_INCR_MAX_IDS - @@ -379,12 +377,12 @@ ProcDbeAllocateBackBufferName(ClientPtr client) /* Set swap action on all calls. */ pDbeWindowPriv->swapAction = stuff->swapAction; - return(status); + return status; out_free: dixSetPrivate(&pWin->devPrivates, dbeWindowPrivKey, NULL); - xfree(pDbeWindowPriv); - return (status); + free(pDbeWindowPriv); + return status; } /* ProcDbeAllocateBackBufferName() */ @@ -422,12 +420,12 @@ ProcDbeDeallocateBackBufferName(ClientPtr client) dbeWindowPrivResType, client, DixDestroyAccess); if (rc != Success) - return (rc == BadValue) ? dbeErrorBase + DbeBadBuffer : rc; + return rc; rc = dixLookupResourceByType(&val, stuff->buffer, dbeDrawableResType, client, DixDestroyAccess); if (rc != Success) - return (rc == BadValue) ? dbeErrorBase + DbeBadBuffer : rc; + return rc; /* Make sure that the id is valid for the window. * This is paranoid code since we already looked up the ID by type @@ -447,12 +445,12 @@ ProcDbeDeallocateBackBufferName(ClientPtr client) { /* We did not find the ID in the ID list. */ client->errorValue = stuff->buffer; - return(dbeErrorBase + DbeBadBuffer); + return dbeErrorBase + DbeBadBuffer; } FreeResource(stuff->buffer, RT_NONE); - return(Success); + return Success; } /* ProcDbeDeallocateBackBufferName() */ @@ -498,7 +496,7 @@ ProcDbeSwapBuffers(ClientPtr client) if (nStuff == 0) { - return(Success); + return Success; } if (nStuff > UINT32_MAX / sizeof(DbeSwapInfoRec)) @@ -508,10 +506,10 @@ ProcDbeSwapBuffers(ClientPtr client) dbeSwapInfo = (xDbeSwapInfo *)&stuff[1]; /* Allocate array to record swap information. */ - swapInfo = (DbeSwapInfoPtr)Xalloc(nStuff * sizeof(DbeSwapInfoRec)); + swapInfo = (DbeSwapInfoPtr)malloc(nStuff * sizeof(DbeSwapInfoRec)); if (swapInfo == NULL) { - return(BadAlloc); + return BadAlloc; } @@ -523,15 +521,15 @@ ProcDbeSwapBuffers(ClientPtr client) error = dixLookupWindow(&pWin, dbeSwapInfo[i].window, client, DixWriteAccess); if (error != Success) { - Xfree(swapInfo); + free(swapInfo); return error; } /* Each window must be double-buffered - BadMatch. */ if (DBE_WINDOW_PRIV(pWin) == NULL) { - Xfree(swapInfo); - return(BadMatch); + free(swapInfo); + return BadMatch; } /* Each window must only be specified once - BadMatch. */ @@ -539,8 +537,8 @@ ProcDbeSwapBuffers(ClientPtr client) { if (dbeSwapInfo[i].window == dbeSwapInfo[j].window) { - Xfree(swapInfo); - return(BadMatch); + free(swapInfo); + return BadMatch; } } @@ -550,8 +548,8 @@ ProcDbeSwapBuffers(ClientPtr client) (dbeSwapInfo[i].swapAction != XdbeUntouched ) && (dbeSwapInfo[i].swapAction != XdbeCopied )) { - Xfree(swapInfo); - return(BadValue); + free(swapInfo); + return BadValue; } /* Everything checks out OK. Fill in the swap info array. */ @@ -580,13 +578,13 @@ ProcDbeSwapBuffers(ClientPtr client) error = (*pDbeScreenPriv->SwapBuffers)(client, &nStuff, swapInfo); if (error != Success) { - Xfree(swapInfo); - return(error); + free(swapInfo); + return error; } } - Xfree(swapInfo); - return(Success); + free(swapInfo); + return Success; } /* ProcDbeSwapBuffers() */ @@ -628,7 +626,7 @@ ProcDbeBeginIdiom(ClientPtr client) } } - return(Success); + return Success; } /* ProcDbeBeginIdiom() */ @@ -672,10 +670,10 @@ ProcDbeGetVisualInfo(ClientPtr client) /* Make sure any specified drawables are valid. */ if (stuff->n != 0) { - if (!(pDrawables = (DrawablePtr *)Xalloc(stuff->n * + if (!(pDrawables = (DrawablePtr *)malloc(stuff->n * sizeof(DrawablePtr)))) { - return(BadAlloc); + return BadAlloc; } drawables = (Drawable *)&stuff[1]; @@ -685,22 +683,19 @@ ProcDbeGetVisualInfo(ClientPtr client) rc = dixLookupDrawable(pDrawables+i, drawables[i], client, 0, DixGetAttrAccess); if (rc != Success) { - Xfree(pDrawables); + free(pDrawables); return rc; } } } count = (stuff->n == 0) ? screenInfo.numScreens : stuff->n; - if (!(pScrVisInfo = (XdbeScreenVisualInfo *)xalloc(count * + if (!(pScrVisInfo = (XdbeScreenVisualInfo *)malloc(count * sizeof(XdbeScreenVisualInfo)))) { - if (pDrawables) - { - Xfree(pDrawables); - } + free(pDrawables); - return(BadAlloc); + return BadAlloc; } length = 0; @@ -720,14 +715,11 @@ ProcDbeGetVisualInfo(ClientPtr client) /* Free visinfos that we allocated for previous screen infos.*/ for (j = 0; j < i; j++) { - xfree(pScrVisInfo[j].visinfo); + free(pScrVisInfo[j].visinfo); } /* Free pDrawables if we needed to allocate it above. */ - if (pDrawables) - { - Xfree(pDrawables); - } + free(pDrawables); return (rc == Success) ? BadAlloc : rc; } @@ -801,16 +793,13 @@ ProcDbeGetVisualInfo(ClientPtr client) /* Clean up memory. */ for (i = 0; i < count; i++) { - xfree(pScrVisInfo[i].visinfo); + free(pScrVisInfo[i].visinfo); } - xfree(pScrVisInfo); + free(pScrVisInfo); - if (pDrawables) - { - Xfree(pDrawables); - } + free(pDrawables); - return(client->noClientException); + return Success; } /* ProcDbeGetVisualInfo() */ @@ -866,7 +855,7 @@ ProcDbeGetBackBufferAttributes(ClientPtr client) WriteToClient(client, sizeof(xDbeGetBackBufferAttributesReply), (char *)&rep); - return(client->noClientException); + return Success; } /* ProcDbeGetbackBufferAttributes() */ @@ -905,7 +894,7 @@ ProcDbeDispatch(ClientPtr client) return(ProcDbeBeginIdiom(client)); case X_DbeEndIdiom: - return(Success); + return Success; case X_DbeGetVisualInfo: return(ProcDbeGetVisualInfo(client)); @@ -914,7 +903,7 @@ ProcDbeDispatch(ClientPtr client) return(ProcDbeGetBackBufferAttributes(client)); default: - return(BadRequest); + return BadRequest; } } /* ProcDbeDispatch() */ @@ -1206,7 +1195,7 @@ SProcDbeDispatch(ClientPtr client) return(SProcDbeBeginIdiom(client)); case X_DbeEndIdiom: - return(Success); + return Success; case X_DbeGetVisualInfo: return(SProcDbeGetVisualInfo(client)); @@ -1215,7 +1204,7 @@ SProcDbeDispatch(ClientPtr client) return(SProcDbeGetBackBufferAttributes(client)); default: - return (BadRequest); + return BadRequest; } } /* SProcDbeDispatch() */ @@ -1239,7 +1228,7 @@ SProcDbeDispatch(ClientPtr client) static Bool DbeSetupBackgroundPainter(WindowPtr pWin, GCPtr pGC) { - pointer gcvalues[4]; + ChangeGCVal gcvalues[4]; int ts_x_origin, ts_y_origin; PixUnion background; int backgroundState; @@ -1265,31 +1254,25 @@ DbeSetupBackgroundPainter(WindowPtr pWin, GCPtr pGC) switch (backgroundState) { case BackgroundPixel: - gcvalues[0] = (pointer)background.pixel; - gcvalues[1] = (pointer)FillSolid; + gcvalues[0].val = background.pixel; + gcvalues[1].val = FillSolid; gcmask = GCForeground|GCFillStyle; break; case BackgroundPixmap: - gcvalues[0] = (pointer)FillTiled; - gcvalues[1] = (pointer)background.pixmap; - gcvalues[2] = (pointer)(long)ts_x_origin; - gcvalues[3] = (pointer)(long)ts_y_origin; + gcvalues[0].val = FillTiled; + gcvalues[1].ptr = background.pixmap; + gcvalues[2].val = ts_x_origin; + gcvalues[3].val = ts_y_origin; gcmask = GCFillStyle|GCTile|GCTileStipXOrigin|GCTileStipYOrigin; break; default: /* pWin->backgroundState == None */ - return(FALSE); + return FALSE; } - if (DoChangeGC(pGC, gcmask, (XID *)gcvalues, TRUE) != 0) - { - return(FALSE); - } - - return(TRUE); - + return ChangeGC(NullClient, pGC, gcmask, gcvalues) == 0; } /* DbeSetupBackgroundPainter() */ @@ -1312,7 +1295,7 @@ DbeSetupBackgroundPainter(WindowPtr pWin, GCPtr pGC) static int DbeDrawableDelete(pointer pDrawable, XID id) { - return(Success); + return Success; } /* DbeDrawableDelete() */ @@ -1352,7 +1335,7 @@ DbeWindowPrivDelete(pointer pDbeWinPriv, XID id) if (i == pDbeWindowPriv->nBufferIDs) { /* We did not find the ID in the array. We should never get here. */ - return(BadValue); + return BadValue; } /* Remove the ID from the array. */ @@ -1385,7 +1368,7 @@ DbeWindowPrivDelete(pointer pDbeWinPriv, XID id) DBE_INIT_MAX_IDS * sizeof(XID)); /* Free the extended array; use the static array. */ - xfree(pDbeWindowPriv->IDs); + free(pDbeWindowPriv->IDs); pDbeWindowPriv->IDs = pDbeWindowPriv->initIDs; pDbeWindowPriv->maxAvailableIDs = DBE_INIT_MAX_IDS; } @@ -1416,11 +1399,10 @@ DbeWindowPrivDelete(pointer pDbeWinPriv, XID id) NULL); /* We are done with the window priv. */ - dixFreePrivates(pDbeWindowPriv->devPrivates); - xfree(pDbeWindowPriv); + dixFreeObjectWithPrivates(pDbeWindowPriv, PRIVATE_DBE_WINDOW); } - return(Success); + return Success; } /* DbeWindowPrivDelete() */ @@ -1456,8 +1438,7 @@ DbeResetProc(ExtensionEntry *extEntry) if (pDbeScreenPriv->ResetProc) (*pDbeScreenPriv->ResetProc)(pScreen); - dixFreePrivates(pDbeScreenPriv->devPrivates); - xfree(pDbeScreenPriv); + free(pDbeScreenPriv); } } } /* DbeResetProc() */ @@ -1542,7 +1523,7 @@ DbeDestroyWindow(WindowPtr pWin) ************************************************************************** */ - return(ret); + return ret; } /* DbeDestroyWindow() */ @@ -1583,8 +1564,10 @@ DbeExtensionInit(void) if (!dbeWindowPrivResType) return; - if (!dixRegisterPrivateOffset(dbeDrawableResType, - offsetof(PixmapRec, devPrivates))) + if (!dixRegisterPrivateKey(&dbeScreenPrivKeyRec, PRIVATE_SCREEN, 0)) + return; + + if (!dixRegisterPrivateKey(&dbeWindowPrivKeyRec, PRIVATE_WINDOW, 0)) return; for (i = 0; i < screenInfo.numScreens; i++) @@ -1595,8 +1578,7 @@ DbeExtensionInit(void) pScreen = screenInfo.screens[i]; - if (!(pDbeScreenPriv = - (DbeScreenPrivPtr)Xcalloc(sizeof(DbeScreenPrivRec)))) + if (!(pDbeScreenPriv = malloc (sizeof (DbeScreenPrivRec)))) { /* If we can not alloc a window or screen private, * then free any privates that we already alloc'ed and return @@ -1604,7 +1586,7 @@ DbeExtensionInit(void) for (j = 0; j < i; j++) { - xfree(dixLookupPrivate(&screenInfo.screens[j]->devPrivates, + free(dixLookupPrivate(&screenInfo.screens[j]->devPrivates, dbeScreenPrivKey)); dixSetPrivate(&screenInfo.screens[j]->devPrivates, dbeScreenPrivKey, NULL); @@ -1614,14 +1596,6 @@ DbeExtensionInit(void) dixSetPrivate(&pScreen->devPrivates, dbeScreenPrivKey, pDbeScreenPriv); - /* Copy the resource types */ - pDbeScreenPriv->dbeDrawableResType = dbeDrawableResType; - pDbeScreenPriv->dbeWindowPrivResType = dbeWindowPrivResType; - - /* Copy the private indices */ - pDbeScreenPriv->dbeScreenPrivKey = dbeScreenPrivKey; - pDbeScreenPriv->dbeWindowPrivKey = dbeWindowPrivKey; - { /* We don't have DDX support for DBE anymore */ @@ -1666,7 +1640,7 @@ DbeExtensionInit(void) for (i = 0; i < screenInfo.numScreens; i++) { - xfree(dixLookupPrivate(&screenInfo.screens[i]->devPrivates, + free(dixLookupPrivate(&screenInfo.screens[i]->devPrivates, dbeScreenPrivKey)); dixSetPrivate(&pScreen->devPrivates, dbeScreenPrivKey, NULL); } @@ -1680,6 +1654,8 @@ DbeExtensionInit(void) DbeResetProc, StandardMinorOpcode); dbeErrorBase = extEntry->errorBase; + SetResourceTypeErrorValue(dbeWindowPrivResType, dbeErrorBase + DbeBadBuffer); + SetResourceTypeErrorValue(dbeDrawableResType, dbeErrorBase + DbeBadBuffer); } /* DbeExtensionInit() */ diff --git a/xserver/dbe/dbestruct.h b/xserver/dbe/dbestruct.h index 002ffbeb2..9c383cef8 100644 --- a/xserver/dbe/dbestruct.h +++ b/xserver/dbe/dbestruct.h @@ -167,14 +167,6 @@ typedef struct _DbeWindowPrivRec typedef struct _DbeScreenPrivRec { - /* Resources created by DIX to be used by DDX */ - RESTYPE dbeDrawableResType; - RESTYPE dbeWindowPrivResType; - - /* Private indices created by DIX to be used by DDX */ - DevPrivateKey dbeScreenPrivKey; - DevPrivateKey dbeWindowPrivKey; - /* Wrapped functions * It is the responsibilty of the DDX layer to wrap PositionWindow(). * DbeExtensionInit wraps DestroyWindow(). @@ -217,10 +209,6 @@ typedef struct _DbeScreenPrivRec ScreenPtr /*pScreen*/ ); - /* Device-specific private information. - */ - PrivateRec *devPrivates; - } DbeScreenPrivRec, *DbeScreenPrivPtr; #endif /* DBE_STRUCT_H */ diff --git a/xserver/dbe/midbe.c b/xserver/dbe/midbe.c index bdea35851..b43ac1b3d 100644 --- a/xserver/dbe/midbe.c +++ b/xserver/dbe/midbe.c @@ -58,14 +58,8 @@ #include -static int miDbeWindowPrivPrivKeyIndex; -static DevPrivateKey miDbeWindowPrivPrivKey = &miDbeWindowPrivPrivKeyIndex; -static RESTYPE dbeDrawableResType; -static RESTYPE dbeWindowPrivResType; -static int dbeScreenPrivKeyIndex; -static DevPrivateKey dbeScreenPrivKey = &dbeScreenPrivKeyIndex; -static int dbeWindowPrivKeyIndex; -static DevPrivateKey dbeWindowPrivKey = &dbeWindowPrivKeyIndex; +static DevPrivateKeyRec miDbeWindowPrivPrivKeyRec; +#define miDbeWindowPrivPrivKey (&miDbeWindowPrivPrivKeyRec) /****************************************************************************** @@ -100,9 +94,9 @@ miDbeGetVisualInfo(ScreenPtr pScreen, XdbeScreenVisualInfo *pScrVisInfo) } /* Allocate an array of XdbeVisualInfo items. */ - if (!(visInfo = (XdbeVisualInfo *)xalloc(count * sizeof(XdbeVisualInfo)))) + if (!(visInfo = (XdbeVisualInfo *)malloc(count * sizeof(XdbeVisualInfo)))) { - return(FALSE); /* memory alloc failure */ + return FALSE; /* memory alloc failure */ } for (i = 0, k = 0; i < pScreen->numDepths; i++) @@ -131,7 +125,7 @@ miDbeGetVisualInfo(ScreenPtr pScreen, XdbeScreenVisualInfo *pScrVisInfo) pScrVisInfo->count = count; pScrVisInfo->visinfo = visInfo; - return(TRUE); /* success */ + return TRUE; /* success */ } /* miDbeGetVisualInfo() */ @@ -181,7 +175,7 @@ miDbeAllocBackBufferName(WindowPtr pWin, XID bufId, int swapAction) pDbeWindowPriv->height, pWin->drawable.depth, 0))) { - return(BadAlloc); + return BadAlloc; } /* Get a back pixmap. */ @@ -191,7 +185,7 @@ miDbeAllocBackBufferName(WindowPtr pWin, XID bufId, int swapAction) pWin->drawable.depth, 0))) { (*pScreen->DestroyPixmap)(pDbeWindowPrivPriv->pFrontBuffer); - return(BadAlloc); + return BadAlloc; } /* Security creation/labeling check. */ @@ -208,12 +202,6 @@ miDbeAllocBackBufferName(WindowPtr pWin, XID bufId, int swapAction) return (rc == Success) ? BadAlloc : rc; } - - /* Attach the priv priv to the priv. */ - dixSetPrivate(&pDbeWindowPriv->devPrivates, miDbeWindowPrivPrivKey, - pDbeWindowPrivPriv); - - /* Clear the back buffer. */ pGC = GetScratchGC(pWin->drawable.depth, pWin->drawable.pScreen); if ((*pDbeScreenPriv->SetupBackgroundPainter)(pWin, pGC)) @@ -241,12 +229,12 @@ miDbeAllocBackBufferName(WindowPtr pWin, XID bufId, int swapAction) if (!AddResource(bufId, dbeDrawableResType, (pointer)pDbeWindowPrivPriv->pBackBuffer)) { - return(BadAlloc); + return BadAlloc; } } - return(Success); + return Success; } /* miDbeAllocBackBufferName() */ @@ -415,7 +403,7 @@ miDbeSwapBuffers(ClientPtr client, int *pNumWindows, DbeSwapInfoPtr swapInfo) FreeScratchGC(pGC); - return(Success); + return Success; } /* miSwapBuffers() */ @@ -577,13 +565,13 @@ miDbePositionWindow(WindowPtr pWin, int x, int y) if (!(pDbeWindowPriv = DBE_WINDOW_PRIV(pWin))) { - return(ret); + return ret; } if (pDbeWindowPriv->width == pWin->drawable.width && pDbeWindowPriv->height == pWin->drawable.height) { - return(ret); + return ret; } width = pWin->drawable.width; @@ -684,7 +672,7 @@ miDbePositionWindow(WindowPtr pWin, int x, int y) } FreeScratchGC(pGC); - return(FALSE); + return FALSE; } else @@ -743,7 +731,7 @@ miDbePositionWindow(WindowPtr pWin, int x, int y) FreeScratchGC(pGC); } - return(ret); + return ret; } /* miDbePositionWindow() */ @@ -787,17 +775,9 @@ miDbeResetProc(ScreenPtr pScreen) Bool miDbeInit(ScreenPtr pScreen, DbeScreenPrivPtr pDbeScreenPriv) { - /* Copy resource types created by DIX */ - dbeDrawableResType = pDbeScreenPriv->dbeDrawableResType; - dbeWindowPrivResType = pDbeScreenPriv->dbeWindowPrivResType; - - /* Copy private indices created by DIX */ - dbeScreenPrivKey = pDbeScreenPriv->dbeScreenPrivKey; - dbeWindowPrivKey = pDbeScreenPriv->dbeWindowPrivKey; - - if (!dixRequestPrivate(miDbeWindowPrivPrivKey, - sizeof(MiDbeWindowPrivPrivRec))) - return(FALSE); + if (!dixRegisterPrivateKey(&miDbeWindowPrivPrivKeyRec, PRIVATE_DBE_WINDOW, + sizeof(MiDbeWindowPrivPrivRec))) + return FALSE; /* Wrap functions. */ pDbeScreenPriv->PositionWindow = pScreen->PositionWindow; @@ -812,6 +792,6 @@ miDbeInit(ScreenPtr pScreen, DbeScreenPrivPtr pDbeScreenPriv) pDbeScreenPriv->ResetProc = miDbeResetProc; pDbeScreenPriv->WinPrivDelete = miDbeWinPrivDelete; - return(TRUE); + return TRUE; } /* miDbeInit() */ diff --git a/xserver/dbe/midbe.h b/xserver/dbe/midbe.h index 007f2e37b..cff36d038 100644 --- a/xserver/dbe/midbe.h +++ b/xserver/dbe/midbe.h @@ -36,6 +36,8 @@ #ifndef MIDBE_H #define MIDBE_H +#include "privates.h" + /* EXTERNS */ extern Bool miDbeInit( @@ -43,5 +45,14 @@ extern Bool miDbeInit( DbeScreenPrivPtr pDbeScreenPriv ); +extern DevPrivateKeyRec dbeScreenPrivKeyRec; +#define dbeScreenPrivKey (&dbeScreenPrivKeyRec) + +extern DevPrivateKeyRec dbeWindowPrivKeyRec; +#define dbeWindowPrivKey (&dbeWindowPrivKeyRec) + +extern RESTYPE dbeDrawableResType; +extern RESTYPE dbeWindowPrivResType; + #endif /* MIDBE_H */ diff --git a/xserver/dbe/midbestr.h b/xserver/dbe/midbestr.h index ae9f206fc..a47d8d9f1 100644 --- a/xserver/dbe/midbestr.h +++ b/xserver/dbe/midbestr.h @@ -48,11 +48,6 @@ #define MI_DBE_WINDOW_PRIV_PRIV_FROM_WINDOW(pWin)\ MI_DBE_WINDOW_PRIV_PRIV(DBE_WINDOW_PRIV(pWin)) -#define MI_DBE_SCREEN_PRIV_PRIV(pDbeScreenPriv) \ - (!(pDbeScreenPriv) ? NULL : (MiDbeScreenPrivPrivPtr) \ - dixLookupPrivate(&(pDbeScreenPriv)->devPrivates, miDbeScreenPrivPrivKey)) - - /* TYPEDEFS */ typedef struct _MiDbeWindowPrivPrivRec @@ -80,16 +75,5 @@ typedef struct _MiDbeWindowPrivPrivRec } MiDbeWindowPrivPrivRec, *MiDbeWindowPrivPrivPtr; -typedef struct _MiDbeScreenPrivPrivRec -{ - /* Place machine-specific fields in here. - * Since this is mi code, we do not really have machine-specific fields. - */ - - /* Pointer back to our screen private with which we are associated. */ - DbeScreenPrivPtr pDbeScreenPriv; - -} MiDbeScreenPrivPrivRec, *MiDbeScreenPrivPrivPtr; - #endif /* MIDBE_STRUCT_H */ diff --git a/xserver/dix/Makefile.am b/xserver/dix/Makefile.am index 42b5121fe..5e2dad7d3 100644 --- a/xserver/dix/Makefile.am +++ b/xserver/dix/Makefile.am @@ -32,6 +32,7 @@ libdix_la_SOURCES = \ privates.c \ property.c \ ptrveloc.c \ + region.c \ registry.c \ resource.c \ selection.c \ diff --git a/xserver/dix/Makefile.in b/xserver/dix/Makefile.in index 7b8226a3e..d1179d679 100644 --- a/xserver/dix/Makefile.in +++ b/xserver/dix/Makefile.in @@ -64,8 +64,8 @@ am_libdix_la_OBJECTS = atom.lo colormap.lo cursor.lo deprecated.lo \ events.lo eventconvert.lo extension.lo ffs.lo gc.lo \ getevents.lo globals.lo glyphcurs.lo grabs.lo initatoms.lo \ inpututils.lo pixmap.lo privates.lo property.lo ptrveloc.lo \ - registry.lo resource.lo selection.lo swaprep.lo swapreq.lo \ - tables.lo window.lo + region.lo registry.lo resource.lo selection.lo swaprep.lo \ + swapreq.lo tables.lo window.lo libdix_la_OBJECTS = $(am_libdix_la_OBJECTS) libmain_la_LIBADD = am_libmain_la_OBJECTS = main.lo @@ -133,10 +133,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -224,6 +220,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -238,6 +236,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -255,10 +254,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -314,10 +317,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -335,17 +339,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -372,20 +370,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -477,6 +478,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ @@ -654,6 +656,7 @@ libdix_la_SOURCES = \ privates.c \ property.c \ ptrveloc.c \ + region.c \ registry.c \ resource.c \ selection.c \ @@ -761,6 +764,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/privates.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/property.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ptrveloc.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/region.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/registry.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resource.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/selection.Plo@am__quote@ diff --git a/xserver/dix/atom.c b/xserver/dix/atom.c index f5bf8ad7e..88b40db65 100644 --- a/xserver/dix/atom.c +++ b/xserver/dix/atom.c @@ -68,7 +68,7 @@ typedef struct _Node { } NodeRec, *NodePtr; static Atom lastAtom = None; -static NodePtr atomRoot = (NodePtr)NULL; +static NodePtr atomRoot = NULL; static unsigned long tableLength; static NodePtr *nodeTable; @@ -88,7 +88,7 @@ MakeAtom(const char *string, unsigned len, Bool makeit) fp = fp * 27 + string[i]; fp = fp * 27 + string[len - 1 - i]; } - while (*np != (NodePtr) NULL) + while (*np != NULL) { if (fp < (*np)->fingerPrint) np = &((*np)->left); @@ -109,7 +109,7 @@ MakeAtom(const char *string, unsigned len, Bool makeit) { NodePtr nd; - nd = xalloc(sizeof(NodeRec)); + nd = malloc(sizeof(NodeRec)); if (!nd) return BAD_RESOURCE; if (lastAtom < XA_LAST_PREDEFINED) @@ -118,9 +118,9 @@ MakeAtom(const char *string, unsigned len, Bool makeit) } else { - char *newstring = xalloc(len + 1); + char *newstring = malloc(len + 1); if (!newstring) { - xfree(nd); + free(nd); return BAD_RESOURCE; } strncpy(newstring, string, (int)len); @@ -130,22 +130,23 @@ MakeAtom(const char *string, unsigned len, Bool makeit) if ((lastAtom + 1) >= tableLength) { NodePtr *table; - table = (NodePtr *) xrealloc(nodeTable, - tableLength * (2 * sizeof(NodePtr))); + table = realloc(nodeTable, tableLength * (2 * sizeof(NodePtr))); if (!table) { - if (nd->string != string) - xfree(nd->string); - xfree(nd); + if (nd->string != string) { + /* nd->string has been strdup'ed */ + free((char *)nd->string); + } + free(nd); return BAD_RESOURCE; } tableLength <<= 1; nodeTable = table; } *np = nd; - nd->left = nd->right = (NodePtr) NULL; + nd->left = nd->right = NULL; nd->fingerPrint = fp; - nd->a = (++lastAtom); - *(nodeTable+lastAtom) = nd; + nd->a = ++lastAtom; + nodeTable[lastAtom] = nd; return nd->a; } else @@ -163,7 +164,7 @@ NameForAtom(Atom atom) { NodePtr node; if (atom > lastAtom) return 0; - if ((node = nodeTable[atom]) == (NodePtr)NULL) return 0; + if ((node = nodeTable[atom]) == NULL) return 0; return node->string; } @@ -180,20 +181,25 @@ FreeAtom(NodePtr patom) FreeAtom(patom->left); if(patom->right) FreeAtom(patom->right); - if (patom->a > XA_LAST_PREDEFINED) - xfree(patom->string); - xfree(patom); + if (patom->a > XA_LAST_PREDEFINED) { + /* + * All strings above XA_LAST_PREDEFINED are strdup'ed, so it's safe to + * cast here + */ + free((char *)patom->string); + } + free(patom); } void FreeAllAtoms(void) { - if(atomRoot == (NodePtr)NULL) + if (atomRoot == NULL) return; FreeAtom(atomRoot); - atomRoot = (NodePtr)NULL; - xfree(nodeTable); - nodeTable = (NodePtr *)NULL; + atomRoot = NULL; + free(nodeTable); + nodeTable = NULL; lastAtom = None; } @@ -202,11 +208,11 @@ InitAtoms(void) { FreeAllAtoms(); tableLength = InitialTableSize; - nodeTable = xalloc(InitialTableSize*sizeof(NodePtr)); + nodeTable = malloc(InitialTableSize * sizeof(NodePtr)); if (!nodeTable) AtomError(); - nodeTable[None] = (NodePtr)NULL; + nodeTable[None] = NULL; MakePredeclaredAtoms(); if (lastAtom != XA_LAST_PREDEFINED) - AtomError (); + AtomError(); } diff --git a/xserver/dix/colormap.c b/xserver/dix/colormap.c index bf9794125..2e9a80647 100644 --- a/xserver/dix/colormap.c +++ b/xserver/dix/colormap.c @@ -57,6 +57,7 @@ SOFTWARE. #include #include "misc.h" #include "dix.h" +#include "dixstruct.h" #include "colormapst.h" #include "os.h" #include "scrnintstr.h" @@ -65,8 +66,6 @@ SOFTWARE. #include "privates.h" #include "xace.h" -extern XID clientErrorValue; - static Pixel FindBestPixel( EntryPtr /*pentFirst*/, int /*size*/, @@ -265,7 +264,7 @@ CreateColormap (Colormap mid, ScreenPtr pScreen, VisualPtr pVisual, class = pVisual->class; if(!(class & DynamicClass) && (alloc != AllocNone) && (client != SERVER_ID)) - return (BadMatch); + return BadMatch; size = pVisual->ColormapEntries; sizebytes = (size * sizeof(Entry)) + @@ -274,9 +273,20 @@ CreateColormap (Colormap mid, ScreenPtr pScreen, VisualPtr pVisual, if ((class | DynamicClass) == DirectColor) sizebytes *= 3; sizebytes += sizeof(ColormapRec); - pmap = xalloc(sizebytes); - if (!pmap) - return (BadAlloc); + if (mid == pScreen->defColormap) { + pmap = malloc(sizebytes); + if (!pmap) + return BadAlloc; + if (!dixAllocatePrivates(&pmap->devPrivates, PRIVATE_COLORMAP)) { + free (pmap); + return BadAlloc; + } + } else { + pmap = _dixAllocateObjectWithPrivates(sizebytes, sizebytes, + offsetof(ColormapRec, devPrivates), PRIVATE_COLORMAP); + if (!pmap) + return BadAlloc; + } #if defined(_XSERVER64) pmap->pad0 = 0; pmap->pad1 = 0; @@ -299,8 +309,8 @@ CreateColormap (Colormap mid, ScreenPtr pScreen, VisualPtr pVisual, if ((class | DynamicClass) == DirectColor) size = NUMRED(pVisual); pmap->freeRed = size; - bzero ((char *) pmap->red, (int)sizebytes); - bzero((char *) pmap->numPixelsRed, MAXCLIENTS * sizeof(int)); + memset((char *) pmap->red, 0, (int)sizebytes); + memset((char *) pmap->numPixelsRed, 0, MAXCLIENTS * sizeof(int)); for (pptr = &pmap->clientPixelsRed[MAXCLIENTS]; --pptr >= pmap->clientPixelsRed; ) *pptr = (Pixel *)NULL; if (alloc == AllocAll) @@ -310,11 +320,11 @@ CreateColormap (Colormap mid, ScreenPtr pScreen, VisualPtr pVisual, for (pent = &pmap->red[size - 1]; pent >= pmap->red; pent--) pent->refcnt = AllocPrivate; pmap->freeRed = 0; - ppix = xalloc(size * sizeof(Pixel)); + ppix = malloc(size * sizeof(Pixel)); if (!ppix) { - xfree(pmap); - return (BadAlloc); + free(pmap); + return BadAlloc; } pmap->clientPixelsRed[client] = ppix; for(i = 0; i < size; i++) @@ -337,8 +347,8 @@ CreateColormap (Colormap mid, ScreenPtr pScreen, VisualPtr pVisual, pmap->numPixelsBlue = (int *)((char *)pmap->clientPixelsBlue + (MAXCLIENTS * sizeof(Pixel *))); - bzero ((char *) pmap->green, (int)sizebytes); - bzero ((char *) pmap->blue, (int)sizebytes); + memset((char *) pmap->green, 0, (int)sizebytes); + memset((char *) pmap->blue, 0, (int)sizebytes); memmove((char *) pmap->clientPixelsGreen, (char *) pmap->clientPixelsRed, @@ -346,8 +356,8 @@ CreateColormap (Colormap mid, ScreenPtr pScreen, VisualPtr pVisual, memmove((char *) pmap->clientPixelsBlue, (char *) pmap->clientPixelsRed, MAXCLIENTS * sizeof(Pixel *)); - bzero((char *) pmap->numPixelsGreen, MAXCLIENTS * sizeof(int)); - bzero((char *) pmap->numPixelsBlue, MAXCLIENTS * sizeof(int)); + memset((char *) pmap->numPixelsGreen, 0, MAXCLIENTS * sizeof(int)); + memset((char *) pmap->numPixelsBlue, 0, MAXCLIENTS * sizeof(int)); /* If every cell is allocated, mark its refcnt */ if (alloc == AllocAll) @@ -356,12 +366,12 @@ CreateColormap (Colormap mid, ScreenPtr pScreen, VisualPtr pVisual, for(pent = &pmap->green[size-1]; pent >= pmap->green; pent--) pent->refcnt = AllocPrivate; pmap->freeGreen = 0; - ppix = xalloc(size * sizeof(Pixel)); + ppix = malloc(size * sizeof(Pixel)); if (!ppix) { - xfree(pmap->clientPixelsRed[client]); - xfree(pmap); - return(BadAlloc); + free(pmap->clientPixelsRed[client]); + free(pmap); + return BadAlloc; } pmap->clientPixelsGreen[client] = ppix; for(i = 0; i < size; i++) @@ -372,13 +382,13 @@ CreateColormap (Colormap mid, ScreenPtr pScreen, VisualPtr pVisual, for(pent = &pmap->blue[size-1]; pent >= pmap->blue; pent--) pent->refcnt = AllocPrivate; pmap->freeBlue = 0; - ppix = xalloc(size * sizeof(Pixel)); + ppix = malloc(size * sizeof(Pixel)); if (!ppix) { - xfree(pmap->clientPixelsGreen[client]); - xfree(pmap->clientPixelsRed[client]); - xfree(pmap); - return(BadAlloc); + free(pmap->clientPixelsGreen[client]); + free(pmap->clientPixelsRed[client]); + free(pmap); + return BadAlloc; } pmap->clientPixelsBlue[client] = ppix; for(i = 0; i < size; i++) @@ -386,11 +396,10 @@ CreateColormap (Colormap mid, ScreenPtr pScreen, VisualPtr pVisual, pmap->numPixelsBlue[client] = size; } } - pmap->devPrivates = NULL; pmap->flags |= BeingCreated; if (!AddResource(mid, RT_COLORMAP, (pointer)pmap)) - return (BadAlloc); + return BadAlloc; /* * Security creation/labeling check @@ -412,7 +421,7 @@ CreateColormap (Colormap mid, ScreenPtr pScreen, VisualPtr pVisual, } pmap->flags &= ~BeingCreated; *ppcmap = pmap; - return (Success); + return Success; } /** @@ -439,7 +448,7 @@ FreeColormap (pointer value, XID mid) if(pmap->clientPixelsRed) { for(i = 0; i < MAXCLIENTS; i++) - xfree(pmap->clientPixelsRed[i]); + free(pmap->clientPixelsRed[i]); } if ((pmap->class == PseudoColor) || (pmap->class == GrayScale)) @@ -451,11 +460,11 @@ FreeColormap (pointer value, XID mid) if(pent->fShared) { if (--pent->co.shco.red->refcnt == 0) - xfree(pent->co.shco.red); + free(pent->co.shco.red); if (--pent->co.shco.green->refcnt == 0) - xfree(pent->co.shco.green); + free(pent->co.shco.green); if (--pent->co.shco.blue->refcnt == 0) - xfree(pent->co.shco.blue); + free(pent->co.shco.blue); } } } @@ -463,14 +472,17 @@ FreeColormap (pointer value, XID mid) { for(i = 0; i < MAXCLIENTS; i++) { - xfree(pmap->clientPixelsGreen[i]); - xfree(pmap->clientPixelsBlue[i]); + free(pmap->clientPixelsGreen[i]); + free(pmap->clientPixelsBlue[i]); } } - dixFreePrivates(pmap->devPrivates); - xfree(pmap); - return(Success); + if (pmap->flags & IsDefault) { + dixFreePrivates(pmap->devPrivates, PRIVATE_COLORMAP); + free(pmap); + } else + dixFreeObjectWithPrivates(pmap, PRIVATE_COLORMAP); + return Success; } /* Tell window that pmid has disappeared */ @@ -497,7 +509,7 @@ TellNoMap (WindowPtr pwin, Colormap *pmid) } } - return (WT_WALKCHILDREN); + return WT_WALKCHILDREN; } /* Tell window that pmid got uninstalled */ @@ -522,7 +534,7 @@ TellLostMap (WindowPtr pwin, pointer value) DeliverEvents(pwin, &xE, 1, (WindowPtr)NULL); } - return (WT_WALKCHILDREN); + return WT_WALKCHILDREN; } /* Tell window that pmid got installed */ @@ -547,7 +559,7 @@ TellGainedMap (WindowPtr pwin, pointer value) DeliverEvents(pwin, &xE, 1, (WindowPtr)NULL); } - return (WT_WALKCHILDREN); + return WT_WALKCHILDREN; } @@ -570,7 +582,7 @@ CopyColormapAndFree (Colormap mid, ColormapPtr pSrc, int client) /* If the create returns non-0, it failed */ result = CreateColormap (mid, pScreen, pVisual, &pmap, alloc, client); if(result != Success) - return(result); + return result; if(alloc == AllocAll) { memmove((char *)pmap->red, (char *)pSrc->red, size * sizeof(Entry)); @@ -582,7 +594,7 @@ CopyColormapAndFree (Colormap mid, ColormapPtr pSrc, int client) pSrc->flags &= ~AllAllocated; FreePixels(pSrc, client); UpdateColors(pmap); - return(Success); + return Success; } CopyFree(REDMAP, client, pSrc, pmap); @@ -594,7 +606,7 @@ CopyColormapAndFree (Colormap mid, ColormapPtr pSrc, int client) if (pmap->class & DynamicClass) UpdateColors(pmap); /* XXX should worry about removing any RT_CMAPENTRY resource */ - return(Success); + return Success; } /* Helper routine for freeing large numbers of cells from a map */ @@ -720,11 +732,11 @@ FreeCell (ColormapPtr pmap, Pixel i, int channel) if (pent->fShared) { if(--pent->co.shco.red->refcnt == 0) - xfree(pent->co.shco.red); + free(pent->co.shco.red); if(--pent->co.shco.green->refcnt == 0) - xfree(pent->co.shco.green); + free(pent->co.shco.green); if(--pent->co.shco.blue->refcnt == 0) - xfree(pent->co.shco.blue); + free(pent->co.shco.blue); pent->fShared = FALSE; } pent->refcnt = 0; @@ -743,7 +755,7 @@ UpdateColors (ColormapPtr pmap) pVisual = pmap->pVisual; size = pVisual->ColormapEntries; - defs = xalloc(size * sizeof(xColorItem)); + defs = malloc(size * sizeof(xColorItem)); if (!defs) return; n = 0; @@ -793,7 +805,7 @@ UpdateColors (ColormapPtr pmap) } if (n) (*pmap->pScreen->StoreColors)(pmap, n, defs); - xfree(defs); + free(defs); } /* Get a read-only color from a ColorMap (probably slow for large maps) @@ -840,10 +852,10 @@ AllocColor (ColormapPtr pmap, *pgreen = pmap->red[pixR].co.local.green; *pblue = pmap->red[pixR].co.local.blue; npix = pmap->numPixelsRed[client]; - ppix = (Pixel *) xrealloc(pmap->clientPixelsRed[client], + ppix = (Pixel *) realloc(pmap->clientPixelsRed[client], (npix + 1) * sizeof(Pixel)); if (!ppix) - return (BadAlloc); + return BadAlloc; ppix[npix] = pixR; pmap->clientPixelsRed[client] = ppix; pmap->numPixelsRed[client]++; @@ -863,24 +875,24 @@ AllocColor (ColormapPtr pmap, *pgreen = pmap->green[pixG].co.local.green; *pblue = pmap->blue[pixB].co.local.blue; npix = pmap->numPixelsRed[client]; - ppix = (Pixel *) xrealloc(pmap->clientPixelsRed[client], + ppix = (Pixel *) realloc(pmap->clientPixelsRed[client], (npix + 1) * sizeof(Pixel)); if (!ppix) - return (BadAlloc); + return BadAlloc; ppix[npix] = pixR; pmap->clientPixelsRed[client] = ppix; npix = pmap->numPixelsGreen[client]; - ppix = (Pixel *) xrealloc(pmap->clientPixelsGreen[client], + ppix = (Pixel *) realloc(pmap->clientPixelsGreen[client], (npix + 1) * sizeof(Pixel)); if (!ppix) - return (BadAlloc); + return BadAlloc; ppix[npix] = pixG; pmap->clientPixelsGreen[client] = ppix; npix = pmap->numPixelsBlue[client]; - ppix = (Pixel *) xrealloc(pmap->clientPixelsBlue[client], + ppix = (Pixel *) realloc(pmap->clientPixelsBlue[client], (npix + 1) * sizeof(Pixel)); if (!ppix) - return (BadAlloc); + return BadAlloc; ppix[npix] = pixB; pmap->clientPixelsBlue[client] = ppix; pmap->numPixelsRed[client]++; @@ -903,7 +915,7 @@ AllocColor (ColormapPtr pmap, } if (FindColor(pmap, pmap->red, entries, &rgb, pPix, PSEUDOMAP, client, AllComp) != Success) - return (BadAlloc); + return BadAlloc; break; case DirectColor: @@ -932,13 +944,13 @@ AllocColor (ColormapPtr pmap, pixR = (*pPix & pVisual->redMask) >> pVisual->offsetRed; if (FindColor(pmap, pmap->red, NUMRED(pVisual), &rgb, &pixR, REDMAP, client, RedComp) != Success) - return (BadAlloc); + return BadAlloc; pixG = (*pPix & pVisual->greenMask) >> pVisual->offsetGreen; if (FindColor(pmap, pmap->green, NUMGREEN(pVisual), &rgb, &pixG, GREENMAP, client, GreenComp) != Success) { (void)FreeCo(pmap, client, REDMAP, 1, &pixR, (Pixel)0); - return (BadAlloc); + return BadAlloc; } pixB = (*pPix & pVisual->blueMask) >> pVisual->offsetBlue; if (FindColor(pmap, pmap->blue, NUMBLUE(pVisual), &rgb, &pixB, BLUEMAP, @@ -946,7 +958,7 @@ AllocColor (ColormapPtr pmap, { (void)FreeCo(pmap, client, GREENMAP, 1, &pixG, (Pixel)0); (void)FreeCo(pmap, client, REDMAP, 1, &pixR, (Pixel)0); - return (BadAlloc); + return BadAlloc; } *pPix = pixR | pixG | pixB | ALPHAMASK(pVisual); @@ -962,18 +974,18 @@ AllocColor (ColormapPtr pmap, { colorResource *pcr; - pcr = xalloc(sizeof(colorResource)); + pcr = malloc(sizeof(colorResource)); if (!pcr) { (void)FreeColors(pmap, client, 1, pPix, (Pixel)0); - return (BadAlloc); + return BadAlloc; } pcr->mid = pmap->mid; pcr->client = client; if (!AddResource(FakeClientID(client), RT_CMAPENTRY, (pointer)pcr)) - return (BadAlloc); + return BadAlloc; } - return (Success); + return Success; } /* @@ -1160,7 +1172,7 @@ FindBestPixel(EntryPtr pentFirst, int size, xrgb *prgb, int channel) minval = sum; } } - return(final); + return final; } static void @@ -1268,7 +1280,7 @@ FindColor (ColormapPtr pmap, EntryPtr pentFirst, int size, xrgb *prgb, * a free entry, we're out of luck. Otherwise, we'll usurp a free * entry and fill it in */ if (!foundFree) - return (BadAlloc); + return BadAlloc; pent = pentFirst + Free; pent->fShared = FALSE; pent->refcnt = (client >= 0) ? 1 : AllocTemporary; @@ -1327,7 +1339,7 @@ FindColor (ColormapPtr pmap, EntryPtr pentFirst, int size, xrgb *prgb, gotit: if (pmap->flags & BeingCreated || client == -1) - return(Success); + return Success; /* Now remember the pixel, for freeing later */ switch (channel) { @@ -1348,7 +1360,7 @@ gotit: break; } npix = nump[client]; - ppix = (Pixel *) xrealloc (pixp[client], (npix + 1) * sizeof(Pixel)); + ppix = (Pixel *) realloc(pixp[client], (npix + 1) * sizeof(Pixel)); if (!ppix) { pent->refcnt--; @@ -1366,13 +1378,13 @@ gotit: pmap->freeBlue++; break; } - return(BadAlloc); + return BadAlloc; } ppix[npix] = pixel; pixp[client] = ppix; nump[client]++; - return(Success); + return Success; } /* Comparison functions -- passed to FindColor to determine if an @@ -1383,39 +1395,39 @@ AllComp (EntryPtr pent, xrgb *prgb) if((pent->co.local.red == prgb->red) && (pent->co.local.green == prgb->green) && (pent->co.local.blue == prgb->blue) ) - return (1); - return (0); + return 1; + return 0; } static int RedComp (EntryPtr pent, xrgb *prgb) { if (pent->co.local.red == prgb->red) - return (1); - return (0); + return 1; + return 0; } static int GreenComp (EntryPtr pent, xrgb *prgb) { if (pent->co.local.green == prgb->green) - return (1); - return (0); + return 1; + return 0; } static int BlueComp (EntryPtr pent, xrgb *prgb) { if (pent->co.local.blue == prgb->blue) - return (1); - return (0); + return 1; + return 0; } /* Read the color value of a cell */ int -QueryColors (ColormapPtr pmap, int count, Pixel *ppixIn, xrgb *prgbList) +QueryColors (ColormapPtr pmap, int count, Pixel *ppixIn, xrgb *prgbList, ClientPtr client) { Pixel *ppix, pixel; xrgb *prgb; @@ -1438,14 +1450,14 @@ QueryColors (ColormapPtr pmap, int count, Pixel *ppixIn, xrgb *prgbList) { pixel = *ppix; if (pixel & rgbbad) { - clientErrorValue = pixel; + client->errorValue = pixel; errVal = BadValue; continue; } i = (pixel & pVisual->redMask) >> pVisual->offsetRed; if (i >= numred) { - clientErrorValue = pixel; + client->errorValue = pixel; errVal = BadValue; continue; } @@ -1453,7 +1465,7 @@ QueryColors (ColormapPtr pmap, int count, Pixel *ppixIn, xrgb *prgbList) i = (pixel & pVisual->greenMask) >> pVisual->offsetGreen; if (i >= numgreen) { - clientErrorValue = pixel; + client->errorValue = pixel; errVal = BadValue; continue; } @@ -1461,7 +1473,7 @@ QueryColors (ColormapPtr pmap, int count, Pixel *ppixIn, xrgb *prgbList) i = (pixel & pVisual->blueMask) >> pVisual->offsetBlue; if (i >= numblue) { - clientErrorValue = pixel; + client->errorValue = pixel; errVal = BadValue; continue; } @@ -1475,7 +1487,7 @@ QueryColors (ColormapPtr pmap, int count, Pixel *ppixIn, xrgb *prgbList) pixel = *ppix; if (pixel >= pVisual->ColormapEntries) { - clientErrorValue = pixel; + client->errorValue = pixel; errVal = BadValue; } else @@ -1496,7 +1508,7 @@ QueryColors (ColormapPtr pmap, int count, Pixel *ppixIn, xrgb *prgbList) } } } - return (errVal); + return errVal; } static void @@ -1518,7 +1530,7 @@ FreePixels(ColormapPtr pmap, int client) } } - xfree(ppixStart); + free(ppixStart); pmap->clientPixelsRed[client] = (Pixel *) NULL; pmap->numPixelsRed[client] = 0; if ((class | DynamicClass) == DirectColor) @@ -1527,7 +1539,7 @@ FreePixels(ColormapPtr pmap, int client) if (class & DynamicClass) for (ppix = ppixStart, n = pmap->numPixelsGreen[client]; --n >= 0;) FreeCell(pmap, *ppix++, GREENMAP); - xfree(ppixStart); + free(ppixStart); pmap->clientPixelsGreen[client] = (Pixel *) NULL; pmap->numPixelsGreen[client] = 0; @@ -1535,7 +1547,7 @@ FreePixels(ColormapPtr pmap, int client) if (class & DynamicClass) for (ppix = ppixStart, n = pmap->numPixelsBlue[client]; --n >= 0; ) FreeCell(pmap, *ppix++, BLUEMAP); - xfree(ppixStart); + free(ppixStart); pmap->clientPixelsBlue[client] = (Pixel *) NULL; pmap->numPixelsBlue[client] = 0; } @@ -1558,7 +1570,7 @@ FreeClientPixels (pointer value, XID fakeid) DixRemoveAccess); if (rc == Success) FreePixels((ColormapPtr)pmap, pcr->client); - xfree(pcr); + free(pcr); return Success; } @@ -1574,15 +1586,15 @@ AllocColorCells (int client, ColormapPtr pmap, int colors, int planes, class = pmap->class; if (!(class & DynamicClass)) - return (BadAlloc); /* Shouldn't try on this type */ + return BadAlloc; /* Shouldn't try on this type */ oldcount = pmap->numPixelsRed[client]; if (pmap->class == DirectColor) oldcount += pmap->numPixelsGreen[client] + pmap->numPixelsBlue[client]; if (!oldcount && (CLIENT_ID(pmap->mid) != client)) { - pcr = xalloc(sizeof(colorResource)); + pcr = malloc(sizeof(colorResource)); if (!pcr) - return (BadAlloc); + return BadAlloc; } if (pmap->class == DirectColor) @@ -1627,10 +1639,9 @@ AllocColorCells (int client, ColormapPtr pmap, int colors, int planes, pcr->client = client; if (!AddResource(FakeClientID(client), RT_CMAPENTRY, (pointer)pcr)) ok = BadAlloc; - } else if (pcr) - xfree(pcr); + } else free(pcr); - return (ok); + return ok; } @@ -1649,15 +1660,15 @@ AllocColorPlanes (int client, ColormapPtr pmap, int colors, class = pmap->class; if (!(class & DynamicClass)) - return (BadAlloc); /* Shouldn't try on this type */ + return BadAlloc; /* Shouldn't try on this type */ oldcount = pmap->numPixelsRed[client]; if (class == DirectColor) oldcount += pmap->numPixelsGreen[client] + pmap->numPixelsBlue[client]; if (!oldcount && (CLIENT_ID(pmap->mid) != client)) { - pcr = xalloc(sizeof(colorResource)); + pcr = malloc(sizeof(colorResource)); if (!pcr) - return (BadAlloc); + return BadAlloc; } if (class == DirectColor) @@ -1718,10 +1729,9 @@ AllocColorPlanes (int client, ColormapPtr pmap, int colors, pcr->client = client; if (!AddResource(FakeClientID(client), RT_CMAPENTRY, (pointer)pcr)) ok = BadAlloc; - } else if (pcr) - xfree(pcr); + } else free(pcr); - return (ok); + return ok; } static int @@ -1747,15 +1757,15 @@ AllocDirect (int client, ColormapPtr pmap, int c, int r, int g, int b, Bool cont for(p = pixels; p < pixels + c; p++) *p = 0; - ppixRed = xalloc(npixR * sizeof(Pixel)); - ppixGreen = xalloc(npixG * sizeof(Pixel)); - ppixBlue = xalloc(npixB * sizeof(Pixel)); + ppixRed = malloc(npixR * sizeof(Pixel)); + ppixGreen = malloc(npixG * sizeof(Pixel)); + ppixBlue = malloc(npixB * sizeof(Pixel)); if (!ppixRed || !ppixGreen || !ppixBlue) { - if (ppixBlue) xfree(ppixBlue); - if (ppixGreen) xfree(ppixGreen); - if (ppixRed) xfree(ppixRed); - return(BadAlloc); + free(ppixBlue); + free(ppixGreen); + free(ppixRed); + return BadAlloc; } okR = AllocCP(pmap, pmap->red, c, r, contig, ppixRed, prmask); @@ -1764,17 +1774,17 @@ AllocDirect (int client, ColormapPtr pmap, int c, int r, int g, int b, Bool cont if (okR && okG && okB) { - rpix = (Pixel *) xrealloc(pmap->clientPixelsRed[client], + rpix = (Pixel *) realloc(pmap->clientPixelsRed[client], (pmap->numPixelsRed[client] + (c << r)) * sizeof(Pixel)); if (rpix) pmap->clientPixelsRed[client] = rpix; - gpix = (Pixel *) xrealloc(pmap->clientPixelsGreen[client], + gpix = (Pixel *) realloc(pmap->clientPixelsGreen[client], (pmap->numPixelsGreen[client] + (c << g)) * sizeof(Pixel)); if (gpix) pmap->clientPixelsGreen[client] = gpix; - bpix = (Pixel *) xrealloc(pmap->clientPixelsBlue[client], + bpix = (Pixel *) realloc(pmap->clientPixelsBlue[client], (pmap->numPixelsBlue[client] + (c << b)) * sizeof(Pixel)); if (bpix) @@ -1792,10 +1802,10 @@ AllocDirect (int client, ColormapPtr pmap, int c, int r, int g, int b, Bool cont if (okB) for(ppix = ppixBlue, npix = npixB; --npix >= 0; ppix++) pmap->blue[*ppix].refcnt = 0; - xfree(ppixBlue); - xfree(ppixGreen); - xfree(ppixRed); - return(BadAlloc); + free(ppixBlue); + free(ppixGreen); + free(ppixRed); + return BadAlloc; } *prmask <<= pmap->pVisual->offsetRed; @@ -1836,11 +1846,11 @@ AllocDirect (int client, ColormapPtr pmap, int c, int r, int g, int b, Bool cont for (pDst = pixels; pDst < pixels + c; pDst++) *pDst |= ALPHAMASK(pmap->pVisual); - xfree(ppixBlue); - xfree(ppixGreen); - xfree(ppixRed); + free(ppixBlue); + free(ppixGreen); + free(ppixRed); - return (Success); + return Success; } static int @@ -1853,9 +1863,9 @@ AllocPseudo (int client, ColormapPtr pmap, int c, int r, Bool contig, npix = c << r; if ((r >= 32) || (npix > pmap->freeRed) || (npix < c)) - return(BadAlloc); - if(!(ppixTemp = xalloc(npix * sizeof(Pixel)))) - return(BadAlloc); + return BadAlloc; + if(!(ppixTemp = malloc(npix * sizeof(Pixel)))) + return BadAlloc; ok = AllocCP(pmap, pmap->red, c, r, contig, ppixTemp, pmask); if (ok) @@ -1863,13 +1873,13 @@ AllocPseudo (int client, ColormapPtr pmap, int c, int r, Bool contig, /* all the allocated pixels are added to the client pixel list, * but only the unique ones are returned to the client */ - ppix = (Pixel *)xrealloc(pmap->clientPixelsRed[client], + ppix = (Pixel *)realloc(pmap->clientPixelsRed[client], (pmap->numPixelsRed[client] + npix) * sizeof(Pixel)); if (!ppix) { for (p = ppixTemp; p < ppixTemp + npix; p++) pmap->red[*p].refcnt = 0; - return (BadAlloc); + return BadAlloc; } pmap->clientPixelsRed[client] = ppix; ppix += pmap->numPixelsRed[client]; @@ -1884,8 +1894,8 @@ AllocPseudo (int client, ColormapPtr pmap, int c, int r, Bool contig, pmap->numPixelsRed[client] += npix; pmap->freeRed -= npix; } - xfree(ppixTemp); - return (ok ? Success : BadAlloc); + free(ppixTemp); + return ok ? Success : BadAlloc; } /* Allocates count << planes pixels from colormap pmap for client. If @@ -1931,11 +1941,11 @@ AllocCP (ColormapPtr pmap, EntryPtr pentFirst, int count, int planes, ent->fShared = FALSE; } *pMask = 0; - return (TRUE); + return TRUE; } else if (planes > dplanes) { - return (FALSE); + return FALSE; } /* General case count pixels * 2 ^ planes cells to be allocated */ @@ -1982,7 +1992,7 @@ AllocCP (ColormapPtr pmap, EntryPtr pentFirst, int count, int planes, } } *pMask = mask; - return (TRUE); + return TRUE; } } pixel = save + 1; @@ -1993,7 +2003,7 @@ AllocCP (ColormapPtr pmap, EntryPtr pentFirst, int count, int planes, dplanes = pmap->pVisual->nplanes; if (contig || planes == 1 || dplanes < 3) - return (FALSE); + return FALSE; /* this will be very slow for large maps, need a better algorithm */ @@ -2063,10 +2073,10 @@ AllocCP (ColormapPtr pmap, EntryPtr pentFirst, int count, int planes, } *pMask = mask; - return (TRUE); + return TRUE; } } - return (FALSE); + return FALSE; } /** @@ -2084,16 +2094,16 @@ AllocShared (ColormapPtr pmap, Pixel *ppix, int c, int r, int g, int b, npixClientNew = c << (r + g + b); npixShared = (c << r) + (c << g) + (c << b); - psharedList = xalloc(npixShared * sizeof(SHAREDCOLOR *)); + psharedList = malloc(npixShared * sizeof(SHAREDCOLOR *)); if (!psharedList) return FALSE; ppshared = psharedList; for (z = npixShared; --z >= 0; ) { - if (!(ppshared[z] = xalloc(sizeof(SHAREDCOLOR)))) + if (!(ppshared[z] = malloc(sizeof(SHAREDCOLOR)))) { for (z++ ; z < npixShared; z++) - xfree(ppshared[z]); + free(ppshared[z]); return FALSE; } } @@ -2198,7 +2208,7 @@ AllocShared (ColormapPtr pmap, Pixel *ppix, int c, int r, int g, int b, } } } - xfree(psharedList); + free(psharedList); return TRUE; } @@ -2214,7 +2224,7 @@ FreeColors (ColormapPtr pmap, int client, int count, Pixel *pixels, Pixel mask) class = pmap->class; if (pmap->flags & AllAllocated) - return(BadAccess); + return BadAccess; if ((class | DynamicClass) == DirectColor) { rmask = mask & RGBMASK(pmap->pVisual); @@ -2238,11 +2248,11 @@ FreeColors (ColormapPtr pmap, int client, int count, Pixel *pixels, Pixel mask) } if ((mask != rmask) && count) { - clientErrorValue = *pixels | mask; + clients[client]->errorValue = *pixels | mask; result = BadValue; } /* XXX should worry about removing any RT_CMAPENTRY resource */ - return (result); + return result; } /** @@ -2268,7 +2278,7 @@ FreeCo (ColormapPtr pmap, int client, int color, int npixIn, Pixel *ppixIn, Pixe int offset, numents; if (npixIn == 0) - return (errVal); + return errVal; bits = 0; zapped = 0; base = lowbit (mask); @@ -2320,7 +2330,7 @@ FreeCo (ColormapPtr pmap, int client, int color, int npixIn, Pixel *ppixIn, Pixe pixTest = ((*pptr | bits) & cmask) >> offset; if ((pixTest >= numents) || (*pptr & rgbbad)) { - clientErrorValue = *pptr | bits; + clients[client]->errorValue = *pptr | bits; errVal = BadValue; continue; } @@ -2366,7 +2376,7 @@ FreeCo (ColormapPtr pmap, int client, int color, int npixIn, Pixel *ppixIn, Pixe npix++; } } - pptr = (Pixel *)xrealloc(ppixClient, npixNew * sizeof(Pixel)); + pptr = (Pixel *)realloc(ppixClient, npixNew * sizeof(Pixel)); if (pptr) ppixClient = pptr; npixClient = npixNew; @@ -2374,7 +2384,7 @@ FreeCo (ColormapPtr pmap, int client, int color, int npixIn, Pixel *ppixIn, Pixe else { npixClient = 0; - xfree(ppixClient); + free(ppixClient); ppixClient = (Pixel *)NULL; } switch(color) @@ -2394,14 +2404,14 @@ FreeCo (ColormapPtr pmap, int client, int color, int npixIn, Pixel *ppixIn, Pixe break; } } - return (errVal); + return errVal; } /* Redefine color values */ int -StoreColors (ColormapPtr pmap, int count, xColorItem *defs) +StoreColors (ColormapPtr pmap, int count, xColorItem *defs, ClientPtr client) { Pixel pix; xColorItem *pdef; @@ -2416,7 +2426,7 @@ StoreColors (ColormapPtr pmap, int count, xColorItem *defs) class = pmap->class; if(!(class & DynamicClass) && !(pmap->flags & BeingCreated)) { - return(BadAccess); + return BadAccess; } pVisual = pmap->pVisual; @@ -2439,7 +2449,7 @@ StoreColors (ColormapPtr pmap, int count, xColorItem *defs) if (pdef->pixel & rgbbad) { errVal = BadValue; - clientErrorValue = pdef->pixel; + client->errorValue = pdef->pixel; continue; } pix = (pdef->pixel & pVisual->redMask) >> pVisual->offsetRed; @@ -2511,7 +2521,7 @@ StoreColors (ColormapPtr pmap, int count, xColorItem *defs) defs[idef] = defs[n]; idef++; } else - clientErrorValue = pdef->pixel; + client->errorValue = pdef->pixel; } } else @@ -2522,7 +2532,7 @@ StoreColors (ColormapPtr pmap, int count, xColorItem *defs) ok = TRUE; if (pdef->pixel >= pVisual->ColormapEntries) { - clientErrorValue = pdef->pixel; + client->errorValue = pdef->pixel; errVal = BadValue; ok = FALSE; } @@ -2664,7 +2674,7 @@ StoreColors (ColormapPtr pmap, int count, xColorItem *defs) * count, the count of proposed entries */ if (idef != 0) ( *pmap->pScreen->StoreColors) (pmap, idef, defs); - return (errVal); + return errVal; } int @@ -2673,9 +2683,9 @@ IsMapInstalled(Colormap map, WindowPtr pWin) Colormap *pmaps; int imap, nummaps, found; - pmaps = xalloc(pWin->drawable.pScreen->maxInstalledCmaps*sizeof(Colormap)); + pmaps = malloc(pWin->drawable.pScreen->maxInstalledCmaps*sizeof(Colormap)); if(!pmaps) - return(FALSE); + return FALSE; nummaps = (*pWin->drawable.pScreen->ListInstalledColormaps) (pWin->drawable.pScreen, pmaps); found = FALSE; @@ -2687,8 +2697,8 @@ IsMapInstalled(Colormap map, WindowPtr pWin) break; } } - xfree(pmaps); - return (found); + free(pmaps); + return found; } struct colormap_lookup_data { @@ -2727,7 +2737,7 @@ ResizeVisualArray(ScreenPtr pScreen, int new_visual_count, first_new_vid = depth->numVids; first_new_visual = pScreen->numVisuals; - vids = xrealloc(depth->vids, (depth->numVids + new_visual_count) * sizeof(XID)); + vids = realloc(depth->vids, (depth->numVids + new_visual_count) * sizeof(XID)); if (!vids) return FALSE; @@ -2735,7 +2745,7 @@ ResizeVisualArray(ScreenPtr pScreen, int new_visual_count, depth->vids = vids; numVisuals = pScreen->numVisuals + new_visual_count; - visuals = xrealloc(pScreen->visuals, numVisuals * sizeof(VisualRec)); + visuals = realloc(pScreen->visuals, numVisuals * sizeof(VisualRec)); if (!visuals) { return FALSE; } diff --git a/xserver/dix/cursor.c b/xserver/dix/cursor.c index 5d9c8b080..72a7609dc 100644 --- a/xserver/dix/cursor.c +++ b/xserver/dix/cursor.c @@ -72,6 +72,8 @@ typedef struct _GlyphShare { static GlyphSharePtr sharedGlyphs = (GlyphSharePtr)NULL; +DevPrivateKeyRec cursorScreenDevPriv[MAXSCREENS]; + #ifdef XFIXES static CARD32 cursorSerial; #endif @@ -81,13 +83,12 @@ FreeCursorBits(CursorBitsPtr bits) { if (--bits->refcnt > 0) return; - xfree(bits->source); - xfree(bits->mask); + free(bits->source); + free(bits->mask); #ifdef ARGB_CURSOR - xfree(bits->argb); + free(bits->argb); #endif - dixFreePrivates(bits->devPrivates); - bits->devPrivates = NULL; + dixFiniPrivates(bits, PRIVATE_CURSOR_BITS); if (bits->refcnt == 0) { GlyphSharePtr *prev, this; @@ -100,9 +101,9 @@ FreeCursorBits(CursorBitsPtr bits) { *prev = this->next; CloseFont(this->font, (Font)0); - xfree(this); + free(this); } - xfree(bits); + free(bits); } } @@ -121,17 +122,17 @@ FreeCursor(pointer value, XID cid) DeviceIntPtr pDev = NULL; /* unused anyway */ if ( --pCurs->refcnt != 0) - return(Success); + return Success; for (nscr = 0; nscr < screenInfo.numScreens; nscr++) { pscr = screenInfo.screens[nscr]; (void)( *pscr->UnrealizeCursor)(pDev, pscr, pCurs); } - dixFreePrivates(pCurs->devPrivates); FreeCursorBits(pCurs->bits); - xfree( pCurs); - return(Success); + dixFiniPrivates(pCurs, PRIVATE_CURSOR); + free( pCurs); + return Success; } @@ -217,6 +218,7 @@ RealizeCursorAllScreens(CursorPtr pCurs) return Success; } + /** * does nothing about the resource table, just creates the data structure. * does not copy the src and mask bits @@ -237,14 +239,16 @@ AllocARGBCursor(unsigned char *psrcbits, unsigned char *pmaskbits, int rc; *ppCurs = NULL; - pCurs = (CursorPtr)xcalloc(sizeof(CursorRec) + sizeof(CursorBits), 1); + pCurs = (CursorPtr)calloc(CURSOR_REC_SIZE + CURSOR_BITS_SIZE, 1); if (!pCurs) { - xfree(psrcbits); - xfree(pmaskbits); + free(psrcbits); + free(pmaskbits); return BadAlloc; } - bits = (CursorBitsPtr)((char *)pCurs + sizeof(CursorRec)); + bits = (CursorBitsPtr)((char *)pCurs + CURSOR_REC_SIZE); + dixInitPrivates(pCurs, pCurs + 1, PRIVATE_CURSOR); + dixInitPrivates(bits, bits + 1, PRIVATE_CURSOR_BITS) bits->source = psrcbits; bits->mask = pmaskbits; #ifdef ARGB_CURSOR @@ -255,7 +259,6 @@ AllocARGBCursor(unsigned char *psrcbits, unsigned char *pmaskbits, bits->xhot = cm->xhot; bits->yhot = cm->yhot; pCurs->refcnt = 1; - bits->devPrivates = NULL; bits->refcnt = -1; CheckForEmptyMask(bits); pCurs->bits = bits; @@ -273,7 +276,6 @@ AllocARGBCursor(unsigned char *psrcbits, unsigned char *pmaskbits, pCurs->backBlue = backBlue; pCurs->id = cid; - pCurs->devPrivates = NULL; /* security creation/labeling check */ rc = XaceHook(XACE_RESOURCE_ACCESS, client, cid, RT_CURSOR, @@ -289,9 +291,9 @@ AllocARGBCursor(unsigned char *psrcbits, unsigned char *pmaskbits, return Success; error: - dixFreePrivates(pCurs->devPrivates); FreeCursorBits(bits); - xfree(pCurs); + dixFiniPrivates(pCurs, PRIVATE_CURSOR); + free(pCurs); return rc; } @@ -316,14 +318,14 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar, if (rc != Success) { client->errorValue = source; - return (rc == BadValue) ? BadFont : rc; + return rc; } rc = dixLookupResourceByType((pointer *)&maskfont, mask, RT_FONT, client, DixUseAccess); if (rc != Success && mask != None) { client->errorValue = mask; - return (rc == BadValue) ? BadFont : rc; + return rc; } if (sourcefont != maskfont) pShare = (GlyphSharePtr)NULL; @@ -339,9 +341,10 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar, } if (pShare) { - pCurs = (CursorPtr)xcalloc(sizeof(CursorRec), 1); + pCurs = (CursorPtr)calloc(CURSOR_REC_SIZE, 1); if (!pCurs) return BadAlloc; + dixInitPrivates(pCurs, pCurs + 1, PRIVATE_CURSOR); bits = pShare->bits; bits->refcnt++; } @@ -358,7 +361,7 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar, unsigned char *mskptr; n = BitmapBytePad(cm.width)*(long)cm.height; - mskptr = mskbits = xalloc(n); + mskptr = mskbits = malloc(n); if (!mskptr) return BadAlloc; while (--n >= 0) @@ -376,33 +379,35 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar, } if ((rc = ServerBitsFromGlyph(sourcefont, sourceChar, &cm, &srcbits))) { - xfree(mskbits); + free(mskbits); return rc; } if (sourcefont != maskfont) { pCurs = - (CursorPtr)xcalloc(sizeof(CursorRec) + sizeof(CursorBits), 1); + (CursorPtr)calloc(CURSOR_REC_SIZE + CURSOR_BITS_SIZE, 1); if (pCurs) - bits = (CursorBitsPtr)((char *)pCurs + sizeof(CursorRec)); + bits = (CursorBitsPtr)((char *)pCurs + CURSOR_REC_SIZE); else bits = (CursorBitsPtr)NULL; } else { - pCurs = (CursorPtr)xcalloc(sizeof(CursorRec), 1); + pCurs = (CursorPtr)calloc(CURSOR_REC_SIZE, 1); if (pCurs) - bits = (CursorBitsPtr)xcalloc(sizeof(CursorBits), 1); + bits = (CursorBitsPtr)calloc(CURSOR_BITS_SIZE, 1); else bits = (CursorBitsPtr)NULL; } if (!bits) { - xfree(pCurs); - xfree(mskbits); - xfree(srcbits); + free(pCurs); + free(mskbits); + free(srcbits); return BadAlloc; } + dixInitPrivates(pCurs, pCurs + 1, PRIVATE_CURSOR); + dixInitPrivates(bits, bits + 1, PRIVATE_CURSOR_BITS); bits->source = srcbits; bits->mask = mskbits; #ifdef ARGB_CURSOR @@ -412,13 +417,12 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar, bits->height = cm.height; bits->xhot = cm.xhot; bits->yhot = cm.yhot; - bits->devPrivates = NULL; if (sourcefont != maskfont) bits->refcnt = -1; else { bits->refcnt = 1; - pShare = xalloc(sizeof(GlyphShare)); + pShare = malloc(sizeof(GlyphShare)); if (!pShare) { FreeCursorBits(bits); @@ -451,7 +455,6 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar, pCurs->backBlue = backBlue; pCurs->id = cid; - pCurs->devPrivates = NULL; /* security creation/labeling check */ rc = XaceHook(XACE_RESOURCE_ACCESS, client, cid, RT_CURSOR, @@ -467,9 +470,9 @@ AllocGlyphCursor(Font source, unsigned sourceChar, Font mask, unsigned maskChar, return Success; error: - dixFreePrivates(pCurs->devPrivates); FreeCursorBits(bits); - xfree(pCurs); + dixFiniPrivates(pCurs, PRIVATE_CURSOR); + free(pCurs); return rc; } diff --git a/xserver/dix/devices.c b/xserver/dix/devices.c index 4021cbe8e..2aab67a79 100644 --- a/xserver/dix/devices.c +++ b/xserver/dix/devices.c @@ -77,6 +77,8 @@ SOFTWARE. #include #include #include +#include +#include #include "exglobals.h" #include "exevents.h" #include "xiquerydevice.h" /* for SizeDeviceClasses */ @@ -89,15 +91,50 @@ SOFTWARE. * This file handles input device-related stuff. */ -static int CoreDevicePrivateKeyIndex; -DevPrivateKey CoreDevicePrivateKey = &CoreDevicePrivateKeyIndex; -/* Used to store classes currently not in use by an MD */ -static int UnusedClassesPrivateKeyIndex; -DevPrivateKey UnusedClassesPrivateKey = &UnusedClassesPrivateKeyIndex; - - static void RecalculateMasterButtons(DeviceIntPtr slave); +static void +DeviceSetTransform(DeviceIntPtr dev, float *transform) +{ + struct pixman_f_transform scale; + double sx, sy; + int x, y; + + /** + * calculate combined transformation matrix: + * + * M = InvScale * Transform * Scale + * + * So we can later transform points using M * p + * + * Where: + * Scale scales coordinates into 0..1 range + * Transform is the user supplied (affine) transform + * InvScale scales coordinates back up into their native range + */ + sx = dev->valuator->axes[0].max_value - dev->valuator->axes[0].min_value; + sy = dev->valuator->axes[1].max_value - dev->valuator->axes[1].min_value; + + /* invscale */ + pixman_f_transform_init_scale(&scale, sx, sy); + scale.m[0][2] = dev->valuator->axes[0].min_value; + scale.m[1][2] = dev->valuator->axes[1].min_value; + + /* transform */ + for (y=0; y<3; y++) + for (x=0; x<3; x++) + dev->transform.m[y][x] = *transform++; + + pixman_f_transform_multiply(&dev->transform, &scale, &dev->transform); + + /* scale */ + pixman_f_transform_init_scale(&scale, 1.0 / sx, 1.0 / sy); + scale.m[0][2] = -dev->valuator->axes[0].min_value / sx; + scale.m[1][2] = -dev->valuator->axes[1].min_value / sy; + + pixman_f_transform_multiply(&dev->transform, &dev->transform, &scale); +} + /** * DIX property handler. */ @@ -122,6 +159,21 @@ DeviceSetProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr prop, else if (!(*((CARD8*)prop->data)) && dev->enabled) DisableDevice(dev, TRUE); } + } else if (property == XIGetKnownProperty(XI_PROP_TRANSFORM)) + { + float *f = (float*)prop->data; + int i; + + if (prop->format != 32 || prop->size != 9 || + prop->type != XIGetKnownProperty(XATOM_FLOAT)) + return BadValue; + + for (i=0; i<9; i++) + if (!isfinite(f[i])) + return BadValue; + + if (!checkonly) + DeviceSetTransform(dev, f); } return Success; @@ -148,7 +200,7 @@ PairDevices(ClientPtr client, DeviceIntPtr ptr, DeviceIntPtr kbd) if (kbd->spriteInfo->spriteOwner) { - xfree(kbd->spriteInfo->sprite); + free(kbd->spriteInfo->sprite); kbd->spriteInfo->sprite = NULL; kbd->spriteInfo->spriteOwner = FALSE; } @@ -190,6 +242,7 @@ AddInputDevice(ClientPtr client, DeviceProc deviceProc, Bool autoStart) int devid; char devind[MAXDEVICES]; BOOL enabled; + float transform[9]; /* Find next available id, 0 and 1 are reserved */ memset(devind, 0, sizeof(char)*MAXDEVICES); @@ -202,7 +255,9 @@ AddInputDevice(ClientPtr client, DeviceProc deviceProc, Bool autoStart) if (devid >= MAXDEVICES) return (DeviceIntPtr)NULL; - dev = xcalloc(sizeof(DeviceIntRec) + sizeof(SpriteInfoRec), 1); + dev = _dixAllocateObjectWithPrivates(sizeof(DeviceIntRec) + sizeof(SpriteInfoRec), + sizeof(DeviceIntRec) + sizeof(SpriteInfoRec), + offsetof(DeviceIntRec, devPrivates), PRIVATE_DEVICE); if (!dev) return (DeviceIntPtr)NULL; dev->id = devid; @@ -225,7 +280,7 @@ AddInputDevice(ClientPtr client, DeviceProc deviceProc, Bool autoStart) /* security creation/labeling check */ if (XaceHook(XACE_DEVICE_ACCESS, client, dev, DixCreateAccess)) { - xfree(dev); + free(dev); return NULL; } @@ -241,6 +296,17 @@ AddInputDevice(ClientPtr client, DeviceProc deviceProc, Bool autoStart) XA_INTEGER, 8, PropModeReplace, 1, &enabled, FALSE); XISetDevicePropertyDeletable(dev, XIGetKnownProperty(XI_PROP_ENABLED), FALSE); + + /* unity matrix */ + memset(transform, 0, sizeof(transform)); + transform[0] = transform[4] = transform[8] = 1.0f; + + XIChangeDeviceProperty(dev, XIGetKnownProperty(XI_PROP_TRANSFORM), + XIGetKnownProperty(XATOM_FLOAT), 32, + PropModeReplace, 9, transform, FALSE); + XISetDevicePropertyDeletable(dev, XIGetKnownProperty(XI_PROP_TRANSFORM), + FALSE); + XIRegisterPropertyHandler(dev, DeviceSetProperty, NULL, NULL); return dev; @@ -296,9 +362,9 @@ EnableDevice(DeviceIntPtr dev, BOOL sendevent) /* Sprites appear on first root window, so we can hardcode it */ if (dev->spriteInfo->spriteOwner) { - InitializeSprite(dev, WindowTable[0]); + InitializeSprite(dev, screenInfo.screens[0]->root); /* mode doesn't matter */ - EnterWindow(dev, WindowTable[0], NotifyAncestor); + EnterWindow(dev, screenInfo.screens[0]->root, NotifyAncestor); } else if ((other = NextFreePointerDevice()) == NULL) { @@ -668,37 +734,35 @@ FreeDeviceClass(int type, pointer *class) XkbFreeInfo((*k)->xkbInfo); (*k)->xkbInfo = NULL; } - xfree((*k)); + free((*k)); break; } case ButtonClass: { ButtonClassPtr *b = (ButtonClassPtr*)class; - if ((*b)->xkb_acts) - xfree((*b)->xkb_acts); - xfree((*b)); + free((*b)->xkb_acts); + free((*b)); break; } case ValuatorClass: { ValuatorClassPtr *v = (ValuatorClassPtr*)class; - if ((*v)->motion) - xfree((*v)->motion); - xfree((*v)); + free((*v)->motion); + free((*v)); break; } case FocusClass: { FocusClassPtr *f = (FocusClassPtr*)class; - xfree((*f)->trace); - xfree((*f)); + free((*f)->trace); + free((*f)); break; } case ProximityClass: { ProximityClassPtr *p = (ProximityClassPtr*)class; - xfree((*p)); + free((*p)); break; } } @@ -721,7 +785,7 @@ FreeFeedbackClass(int type, pointer *class) knext = k->next; if (k->xkb_sli) XkbFreeSrvLedInfo(k->xkb_sli); - xfree(k); + free(k); } break; } @@ -732,7 +796,7 @@ FreeFeedbackClass(int type, pointer *class) for (p = (*ptrfeed); p; p = pnext) { pnext = p->next; - xfree(p); + free(p); } break; } @@ -743,7 +807,7 @@ FreeFeedbackClass(int type, pointer *class) for (i = (*intfeed); i; i = inext) { inext = i->next; - xfree(i); + free(i); } break; } @@ -754,9 +818,9 @@ FreeFeedbackClass(int type, pointer *class) for (s = (*stringfeed); s; s = snext) { snext = s->next; - xfree(s->ctrl.symbols_supported); - xfree(s->ctrl.symbols_displayed); - xfree(s); + free(s->ctrl.symbols_supported); + free(s->ctrl.symbols_displayed); + free(s); } break; } @@ -767,7 +831,7 @@ FreeFeedbackClass(int type, pointer *class) for (b = (*bell); b; b = bnext) { bnext = b->next; - xfree(b); + free(b); } break; } @@ -780,7 +844,7 @@ FreeFeedbackClass(int type, pointer *class) lnext = l->next; if (l->xkb_sli) XkbFreeSrvLedInfo(l->xkb_sli); - xfree(l); + free(l); } break; } @@ -842,22 +906,23 @@ CloseDevice(DeviceIntPtr dev) while (dev->xkb_interest) XkbRemoveResourceClient((DevicePtr)dev,dev->xkb_interest->resource); - xfree(dev->name); + free(dev->name); classes = (ClassesPtr)&dev->key; FreeAllDeviceClasses(classes); if (IsMaster(dev)) { - classes = dixLookupPrivate(&dev->devPrivates, UnusedClassesPrivateKey); + classes = dev->unused_classes; FreeAllDeviceClasses(classes); + free(classes); } if (DevHasCursor(dev) && dev->spriteInfo->sprite) { if (dev->spriteInfo->sprite->current) FreeCursor(dev->spriteInfo->sprite->current, None); - xfree(dev->spriteInfo->sprite->spriteTrace); - xfree(dev->spriteInfo->sprite); + free(dev->spriteInfo->sprite->spriteTrace); + free(dev->spriteInfo->sprite); } /* a client may have the device set as client pointer */ @@ -870,9 +935,8 @@ CloseDevice(DeviceIntPtr dev) } } - xfree(dev->deviceGrab.sync.event); - dixFreePrivates(dev->devPrivates); - xfree(dev); + free(dev->deviceGrab.sync.event); + dixFreeObjectWithPrivates(dev, PRIVATE_DEVICE); } /** @@ -1113,7 +1177,7 @@ SetKeySymsMap(KeySymsPtr dst, KeySymsPtr src) else if (src->mapWidth > dst->mapWidth) { i = sizeof(KeySym) * src->mapWidth * (dst->maxKeyCode - dst->minKeyCode + 1); - tmp = xcalloc(sizeof(KeySym), i); + tmp = calloc(sizeof(KeySym), i); if (!tmp) return FALSE; @@ -1121,7 +1185,7 @@ SetKeySymsMap(KeySymsPtr dst, KeySymsPtr src) for (i = 0; i <= dst->maxKeyCode-dst->minKeyCode; i++) memmove(&tmp[i * src->mapWidth], &dst->map[i * dst->mapWidth], dst->mapWidth * sizeof(KeySym)); - xfree(dst->map); + free(dst->map); } dst->mapWidth = src->mapWidth; dst->map = tmp; @@ -1129,7 +1193,7 @@ SetKeySymsMap(KeySymsPtr dst, KeySymsPtr src) else if (!dst->map) { i = sizeof(KeySym) * src->mapWidth * (dst->maxKeyCode - dst->minKeyCode + 1); - tmp = xcalloc(sizeof(KeySym), i); + tmp = calloc(sizeof(KeySym), i); if (!tmp) return FALSE; @@ -1151,7 +1215,7 @@ InitButtonClassDeviceStruct(DeviceIntPtr dev, int numButtons, Atom* labels, ButtonClassPtr butc; int i; - butc = xcalloc(1, sizeof(ButtonClassRec)); + butc = calloc(1, sizeof(ButtonClassRec)); if (!butc) return FALSE; butc->numButtons = numButtons; @@ -1175,7 +1239,7 @@ InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes, Atom *labels, if (!dev) return FALSE; - if (numAxes >= MAX_VALUATORS) + if (numAxes > MAX_VALUATORS) { LogMessage(X_WARNING, "Device '%s' has %d axes, only using first %d.\n", @@ -1183,7 +1247,7 @@ InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes, Atom *labels, numAxes = MAX_VALUATORS; } - valc = (ValuatorClassPtr)xcalloc(1, sizeof(ValuatorClassRec) + + valc = (ValuatorClassPtr)calloc(1, sizeof(ValuatorClassRec) + numAxes * sizeof(AxisInfo) + numAxes * sizeof(double)); if (!valc) @@ -1266,7 +1330,7 @@ InitPointerAccelerationScheme(DeviceIntPtr dev, case PtrAccelPredictable: { DeviceVelocityPtr s; - s = xalloc(sizeof(DeviceVelocityRec)); + s = malloc(sizeof(DeviceVelocityRec)); if(!s) return FALSE; InitVelocityData(s); @@ -1298,7 +1362,7 @@ InitAbsoluteClassDeviceStruct(DeviceIntPtr dev) { AbsoluteClassPtr abs; - abs = xalloc(sizeof(AbsoluteClassRec)); + abs = malloc(sizeof(AbsoluteClassRec)); if (!abs) return FALSE; @@ -1331,7 +1395,7 @@ InitFocusClassDeviceStruct(DeviceIntPtr dev) { FocusClassPtr focc; - focc = xalloc(sizeof(FocusClassRec)); + focc = malloc(sizeof(FocusClassRec)); if (!focc) return FALSE; focc->win = PointerRootWin; @@ -1350,7 +1414,7 @@ InitPtrFeedbackClassDeviceStruct(DeviceIntPtr dev, PtrCtrlProcPtr controlProc) { PtrFeedbackPtr feedc; - feedc = xalloc(sizeof(PtrFeedbackClassRec)); + feedc = malloc(sizeof(PtrFeedbackClassRec)); if (!feedc) return FALSE; feedc->CtrlProc = controlProc; @@ -1388,22 +1452,20 @@ InitStringFeedbackClassDeviceStruct ( int i; StringFeedbackPtr feedc; - feedc = xalloc(sizeof(StringFeedbackClassRec)); + feedc = malloc(sizeof(StringFeedbackClassRec)); if (!feedc) return FALSE; feedc->CtrlProc = controlProc; feedc->ctrl.num_symbols_supported = num_symbols_supported; feedc->ctrl.num_symbols_displayed = 0; feedc->ctrl.max_symbols = max_symbols; - feedc->ctrl.symbols_supported = xalloc (sizeof (KeySym) * num_symbols_supported); - feedc->ctrl.symbols_displayed = xalloc (sizeof (KeySym) * max_symbols); + feedc->ctrl.symbols_supported = malloc(sizeof (KeySym) * num_symbols_supported); + feedc->ctrl.symbols_displayed = malloc(sizeof (KeySym) * max_symbols); if (!feedc->ctrl.symbols_supported || !feedc->ctrl.symbols_displayed) { - if (feedc->ctrl.symbols_supported) - xfree(feedc->ctrl.symbols_supported); - if (feedc->ctrl.symbols_displayed) - xfree(feedc->ctrl.symbols_displayed); - xfree(feedc); + free(feedc->ctrl.symbols_supported); + free(feedc->ctrl.symbols_displayed); + free(feedc); return FALSE; } for (i=0; iCtrlProc = controlProc; @@ -1443,7 +1505,7 @@ InitLedFeedbackClassDeviceStruct (DeviceIntPtr dev, LedCtrlProcPtr controlProc) { LedFeedbackPtr feedc; - feedc = xalloc(sizeof(LedFeedbackClassRec)); + feedc = malloc(sizeof(LedFeedbackClassRec)); if (!feedc) return FALSE; feedc->CtrlProc = controlProc; @@ -1462,7 +1524,7 @@ InitIntegerFeedbackClassDeviceStruct (DeviceIntPtr dev, IntegerCtrlProcPtr contr { IntegerFeedbackPtr feedc; - feedc = xalloc(sizeof(IntegerFeedbackClassRec)); + feedc = malloc(sizeof(IntegerFeedbackClassRec)); if (!feedc) return FALSE; feedc->CtrlProc = controlProc; @@ -1538,7 +1600,7 @@ ProcSetModifierMapping(ClientPtr client) rep.success = rc; WriteReplyToClient(client, sizeof(xSetModifierMappingReply), &rep); - return client->noClientException; + return Success; } int @@ -1562,9 +1624,9 @@ ProcGetModifierMapping(ClientPtr client) WriteReplyToClient(client, sizeof(xGetModifierMappingReply), &rep); (void)WriteToClient(client, max_keys_per_mod * 8, (char *) modkeymap); - xfree(modkeymap); + free(modkeymap); - return client->noClientException; + return Success; } int @@ -1622,7 +1684,7 @@ ProcChangeKeyboardMapping(ClientPtr client) stuff->keyCodes, NULL, client); } - return client->noClientException; + return Success; } int @@ -1722,10 +1784,10 @@ ProcGetKeyboardMapping(ClientPtr client) syms->mapWidth * stuff->count * sizeof(KeySym), &syms->map[syms->mapWidth * (stuff->firstKeyCode - syms->minKeyCode)]); - xfree(syms->map); - xfree(syms); + free(syms->map); + free(syms); - return client->noClientException; + return Success; } int @@ -2049,17 +2111,14 @@ ProcChangePointerControl(ClientPtr client) REQUEST(xChangePointerControlReq); REQUEST_SIZE_MATCH(xChangePointerControlReq); - if (!mouse->ptrfeed->CtrlProc) - return BadDevice; - ctrl = mouse->ptrfeed->ctrl; if ((stuff->doAccel != xTrue) && (stuff->doAccel != xFalse)) { client->errorValue = stuff->doAccel; - return(BadValue); + return BadValue; } if ((stuff->doThresh != xTrue) && (stuff->doThresh != xFalse)) { client->errorValue = stuff->doThresh; - return(BadValue); + return BadValue; } if (stuff->doAccel) { if (stuff->accelNum == -1) { @@ -2099,7 +2158,7 @@ ProcChangePointerControl(ClientPtr client) for (dev = inputInfo.devices; dev; dev = dev->next) { if ((dev == mouse || (!IsMaster(dev) && dev->u.master == mouse)) && - dev->ptrfeed && dev->ptrfeed->CtrlProc) { + dev->ptrfeed) { rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixManageAccess); if (rc != Success) return rc; @@ -2108,9 +2167,8 @@ ProcChangePointerControl(ClientPtr client) for (dev = inputInfo.devices; dev; dev = dev->next) { if ((dev == mouse || (!IsMaster(dev) && dev->u.master == mouse)) && - dev->ptrfeed && dev->ptrfeed->CtrlProc) { + dev->ptrfeed) { dev->ptrfeed->ctrl = ctrl; - (*dev->ptrfeed->CtrlProc)(dev, &mouse->ptrfeed->ctrl); } } @@ -2217,8 +2275,7 @@ ProcGetMotionEvents(ClientPtr client) WriteSwappedDataToClient(client, nEvents * sizeof(xTimecoord), (char *)coords); } - if (coords) - xfree(coords); + free(coords); return Success; } @@ -2279,7 +2336,7 @@ RecalculateMasterButtons(DeviceIntPtr slave) maxbuttons = max(maxbuttons, dev->button->numButtons); } - if (master->button->numButtons != maxbuttons) + if (master->button && master->button->numButtons != maxbuttons) { int i; DeviceChangedEvent event; @@ -2290,7 +2347,7 @@ RecalculateMasterButtons(DeviceIntPtr slave) event.header = ET_Internal; event.type = ET_DeviceChanged; - event.time = CurrentTime; + event.time = GetTimeInMillis(); event.deviceid = master->id; event.flags = DEVCHANGE_POINTER_EVENT | DEVCHANGE_DEVICE_CHANGE; event.buttons.num_buttons = maxbuttons; @@ -2351,7 +2408,7 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master) { screen = miPointerGetScreen(dev); screen->DeviceCursorCleanup(dev, screen); - xfree(dev->spriteInfo->sprite); + free(dev->spriteInfo->sprite); } oldmaster = dev->u.master; @@ -2370,7 +2427,7 @@ AttachDevice(ClientPtr client, DeviceIntPtr dev, DeviceIntPtr master) if (dev->spriteInfo->sprite) currentRoot = dev->spriteInfo->sprite->spriteTrace[0]; else /* new device auto-set to floating */ - currentRoot = WindowTable[0]; + currentRoot = screenInfo.screens[0]->root; /* we need to init a fake sprite */ screen = currentRoot->drawable.pScreen; @@ -2464,7 +2521,6 @@ AllocDevicePair (ClientPtr client, char* name, { DeviceIntPtr pointer; DeviceIntPtr keyboard; - ClassesPtr classes; size_t len; *ptr = *keybd = NULL; @@ -2472,9 +2528,8 @@ AllocDevicePair (ClientPtr client, char* name, pointer = AddInputDevice(client, ptr_proc, TRUE); if (!pointer) return BadAlloc; - len = strlen(name) + strlen(" pointer") + 1; - pointer->name = xcalloc(len, sizeof(char)); + pointer->name = calloc(len, sizeof(char)); snprintf(pointer->name, len, "%s pointer", name); pointer->public.processInputProc = ProcessOtherEvent; @@ -2497,7 +2552,7 @@ AllocDevicePair (ClientPtr client, char* name, } len = strlen(name) + strlen(" keyboard") + 1; - keyboard->name = xcalloc(len, sizeof(char)); + keyboard->name = calloc(len, sizeof(char)); snprintf(keyboard->name, len, "%s keyboard", name); keyboard->public.processInputProc = ProcessOtherEvent; @@ -2512,12 +2567,9 @@ AllocDevicePair (ClientPtr client, char* name, keyboard->last.slave = NULL; keyboard->type = (master) ? MASTER_KEYBOARD : SLAVE; - /* The ClassesRec stores the device classes currently not used. */ - classes = xcalloc(1, sizeof(ClassesRec)); - dixSetPrivate(&pointer->devPrivates, UnusedClassesPrivateKey, classes); - classes = xcalloc(1, sizeof(ClassesRec)); - dixSetPrivate(&keyboard->devPrivates, UnusedClassesPrivateKey, classes); + pointer->unused_classes = calloc(1, sizeof(ClassesRec)); + keyboard->unused_classes = calloc(1, sizeof(ClassesRec)); *ptr = pointer; *keybd = keyboard; diff --git a/xserver/dix/dispatch.c b/xserver/dix/dispatch.c index 982c808c7..0e5aced1a 100644 --- a/xserver/dix/dispatch.c +++ b/xserver/dix/dispatch.c @@ -176,13 +176,6 @@ CallbackListPtr ClientStateCallback; volatile char dispatchException = 0; volatile char isItTimeToYield; -/* Various of the DIX function interfaces were not designed to allow - * the client->errorValue to be set on BadValue and other errors. - * Rather than changing interfaces and breaking untold code we introduce - * a new global that dispatch can use. - */ -XID clientErrorValue; /* XXX this is a kludge */ - #define SAME_SCREENS(a, b) (\ (a.pScreen == b.pScreen)) @@ -359,7 +352,7 @@ Dispatch(void) nextFreeClientID = 1; nClients = 0; - clientReady = xalloc(sizeof(int) * MaxClients); + clientReady = malloc(sizeof(int) * MaxClients); if (!clientReady) return; @@ -444,16 +437,18 @@ Dispatch(void) client->sequence, client->index, result); #endif - if (result != Success) + if (client->noClientException != Success) { - if (client->noClientException != Success) - CloseDownClient(client); - else - SendErrorToClient(client, MAJOROP, - MinorOpcodeOfRequest(client), - client->errorValue, result); + CloseDownClient(client); break; - } + } + else if (result != Success) + { + SendErrorToClient(client, MAJOROP, + MinorOpcodeOfRequest(client), + client->errorValue, result); + break; + } } FlushAllOutput(); client = clients[clientReady[nready]]; @@ -466,7 +461,7 @@ Dispatch(void) ddxBeforeReset (); #endif KillAllClients(); - xfree(clientReady); + free(clientReady); dispatchException &= ~DE_RESET; SmartScheduleLatencyLimited = 0; } @@ -530,7 +525,7 @@ CreateConnectionBlock(void) pad_to_int32(setup.nbytesVendor) + (setup.numFormats * sizeof(xPixmapFormat)) + (setup.numRoots * sizeof(xWindowRoot)); - ConnectionInfo = xalloc(lenofblock); + ConnectionInfo = malloc(lenofblock); if (!ConnectionInfo) return FALSE; @@ -567,7 +562,7 @@ CreateConnectionBlock(void) VisualPtr pVisual; pScreen = screenInfo.screens[i]; - root.windowId = WindowTable[i]->drawable.id; + root.windowId = pScreen->root->drawable.id; root.defaultColormap = pScreen->defColormap; root.whitePixel = pScreen->whitePixel; root.blackPixel = pScreen->blackPixel; @@ -592,10 +587,10 @@ CreateConnectionBlock(void) { lenofblock += sizeof(xDepth) + (pDepth->numVids * sizeof(xVisualType)); - pBuf = (char *)xrealloc(ConnectionInfo, lenofblock); + pBuf = (char *)realloc(ConnectionInfo, lenofblock); if (!pBuf) { - xfree(ConnectionInfo); + free(ConnectionInfo); return FALSE; } ConnectionInfo = pBuf; @@ -636,7 +631,7 @@ CreateConnectionBlock(void) int ProcBadRequest(ClientPtr client) { - return (BadRequest); + return BadRequest; } int @@ -675,10 +670,7 @@ ProcCreateWindow(ClientPtr client) return BadAlloc; pWin->eventMask = mask; } - if (client->noClientException != Success) - return(client->noClientException); - else - return rc; + return rc; } int @@ -686,7 +678,7 @@ ProcChangeWindowAttributes(ClientPtr client) { WindowPtr pWin; REQUEST(xChangeWindowAttributesReq); - int result, len, rc; + int len, rc; Mask access_mode = 0; REQUEST_AT_LEAST_SIZE(xChangeWindowAttributesReq); @@ -698,14 +690,10 @@ ProcChangeWindowAttributes(ClientPtr client) len = client->req_len - bytes_to_int32(sizeof(xChangeWindowAttributesReq)); if (len != Ones(stuff->valueMask)) return BadLength; - result = ChangeWindowAttributes(pWin, + return ChangeWindowAttributes(pWin, stuff->valueMask, (XID *) &stuff[1], client); - if (client->noClientException != Success) - return(client->noClientException); - else - return(result); } int @@ -723,7 +711,7 @@ ProcGetWindowAttributes(ClientPtr client) memset(&wa, 0, sizeof(xGetWindowAttributesReply)); GetWindowAttributes(pWin, client, &wa); WriteReplyToClient(client, sizeof(xGetWindowAttributesReply), &wa); - return(client->noClientException); + return Success; } int @@ -744,7 +732,7 @@ ProcDestroyWindow(ClientPtr client) return rc; FreeResource(stuff->id, RT_NONE); } - return(client->noClientException); + return Success; } int @@ -759,7 +747,7 @@ ProcDestroySubwindows(ClientPtr client) if (rc != Success) return rc; DestroySubwindows(pWin, client); - return(client->noClientException); + return Success; } int @@ -767,7 +755,7 @@ ProcChangeSaveSet(ClientPtr client) { WindowPtr pWin; REQUEST(xChangeSaveSetReq); - int result, rc; + int rc; REQUEST_SIZE_MATCH(xChangeSaveSetReq); rc = dixLookupWindow(&pWin, stuff->window, client, DixManageAccess); @@ -776,18 +764,9 @@ ProcChangeSaveSet(ClientPtr client) if (client->clientAsMask == (CLIENT_BITS(pWin->drawable.id))) return BadMatch; if ((stuff->mode == SetModeInsert) || (stuff->mode == SetModeDelete)) - { - result = AlterSaveSetForClient(client, pWin, stuff->mode, FALSE, TRUE); - if (client->noClientException != Success) - return(client->noClientException); - else - return(result); - } - else - { - client->errorValue = stuff->mode; - return( BadValue ); - } + return AlterSaveSetForClient(client, pWin, stuff->mode, FALSE, TRUE); + client->errorValue = stuff->mode; + return BadValue; } int @@ -795,7 +774,7 @@ ProcReparentWindow(ClientPtr client) { WindowPtr pWin, pParent; REQUEST(xReparentWindowReq); - int result, rc; + int rc; REQUEST_SIZE_MATCH(xReparentWindowReq); rc = dixLookupWindow(&pWin, stuff->window, client, DixManageAccess); @@ -804,23 +783,16 @@ ProcReparentWindow(ClientPtr client) rc = dixLookupWindow(&pParent, stuff->parent, client, DixAddAccess); if (rc != Success) return rc; - if (SAME_SCREENS(pWin->drawable, pParent->drawable)) - { - if ((pWin->backgroundState == ParentRelative) && - (pParent->drawable.depth != pWin->drawable.depth)) - return BadMatch; - if ((pWin->drawable.class != InputOnly) && - (pParent->drawable.class == InputOnly)) - return BadMatch; - result = ReparentWindow(pWin, pParent, - (short)stuff->x, (short)stuff->y, client); - if (client->noClientException != Success) - return(client->noClientException); - else - return(result); - } - else - return (BadMatch); + if (!SAME_SCREENS(pWin->drawable, pParent->drawable)) + return BadMatch; + if ((pWin->backgroundState == ParentRelative) && + (pParent->drawable.depth != pWin->drawable.depth)) + return BadMatch; + if ((pWin->drawable.class != InputOnly) && + (pParent->drawable.class == InputOnly)) + return BadMatch; + return ReparentWindow(pWin, pParent, + (short)stuff->x, (short)stuff->y, client); } int @@ -836,7 +808,7 @@ ProcMapWindow(ClientPtr client) return rc; MapWindow(pWin, client); /* update cache to say it is mapped */ - return(client->noClientException); + return Success; } int @@ -852,7 +824,7 @@ ProcMapSubwindows(ClientPtr client) return rc; MapSubwindows(pWin, client); /* update cache to say it is mapped */ - return(client->noClientException); + return Success; } int @@ -868,7 +840,7 @@ ProcUnmapWindow(ClientPtr client) return rc; UnmapWindow(pWin, FALSE); /* update cache to say it is mapped */ - return(client->noClientException); + return Success; } int @@ -883,7 +855,7 @@ ProcUnmapSubwindows(ClientPtr client) if (rc != Success) return rc; UnmapSubwindows(pWin); - return(client->noClientException); + return Success; } int @@ -891,7 +863,6 @@ ProcConfigureWindow(ClientPtr client) { WindowPtr pWin; REQUEST(xConfigureWindowReq); - int result; int len, rc; REQUEST_AT_LEAST_SIZE(xConfigureWindowReq); @@ -902,12 +873,7 @@ ProcConfigureWindow(ClientPtr client) len = client->req_len - bytes_to_int32(sizeof(xConfigureWindowReq)); if (Ones((Mask)stuff->mask) != len) return BadLength; - result = ConfigureWindow(pWin, (Mask)stuff->mask, (XID *) &stuff[1], - client); - if (client->noClientException != Success) - return(client->noClientException); - else - return(result); + return ConfigureWindow(pWin, (Mask)stuff->mask, (XID *) &stuff[1], client); } int @@ -928,7 +894,7 @@ ProcCirculateWindow(ClientPtr client) if (rc != Success) return rc; CirculateWindow(pWin, (int)stuff->direction, client); - return(client->noClientException); + return Success; } static int @@ -946,7 +912,7 @@ GetGeometry(ClientPtr client, xGetGeometryReply *rep) rep->type = X_Reply; rep->length = 0; rep->sequenceNumber = client->sequence; - rep->root = WindowTable[pDraw->pScreen->myNum]->drawable.id; + rep->root = pDraw->pScreen->root->drawable.id; rep->depth = pDraw->depth; rep->width = pDraw->width; rep->height = pDraw->height; @@ -987,7 +953,7 @@ ProcGetGeometry(ClientPtr client) return status; WriteReplyToClient(client, sizeof(xGetGeometryReply), &rep); - return(client->noClientException); + return Success; } @@ -1006,7 +972,7 @@ ProcQueryTree(ClientPtr client) return rc; memset(&reply, 0, sizeof(xQueryTreeReply)); reply.type = X_Reply; - reply.root = WindowTable[pWin->drawable.pScreen->myNum]->drawable.id; + reply.root = pWin->drawable.pScreen->root->drawable.id; reply.sequenceNumber = client->sequence; if (pWin->parent) reply.parent = pWin->parent->drawable.id; @@ -1019,7 +985,7 @@ ProcQueryTree(ClientPtr client) { int curChild = 0; - childIDs = xalloc(numChildren * sizeof(Window)); + childIDs = malloc(numChildren * sizeof(Window)); if (!childIDs) return BadAlloc; for (pChild = pWin->lastChild; pChild != pHead; pChild = pChild->prevSib) @@ -1034,10 +1000,10 @@ ProcQueryTree(ClientPtr client) { client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; WriteSwappedDataToClient(client, numChildren * sizeof(Window), childIDs); - xfree(childIDs); + free(childIDs); } - return(client->noClientException); + return Success; } int @@ -1051,7 +1017,7 @@ ProcInternAtom(ClientPtr client) if ((stuff->onlyIfExists != xTrue) && (stuff->onlyIfExists != xFalse)) { client->errorValue = stuff->onlyIfExists; - return(BadValue); + return BadValue; } tchar = (char *) &stuff[1]; atom = MakeAtom(tchar, stuff->nbytes, !stuff->onlyIfExists); @@ -1064,10 +1030,10 @@ ProcInternAtom(ClientPtr client) reply.sequenceNumber = client->sequence; reply.atom = atom; WriteReplyToClient(client, sizeof(xInternAtomReply), &reply); - return(client->noClientException); + return Success; } else - return (BadAlloc); + return BadAlloc; } int @@ -1089,12 +1055,12 @@ ProcGetAtomName(ClientPtr client) reply.nameLength = len; WriteReplyToClient(client, sizeof(xGetAtomNameReply), &reply); (void)WriteToClient(client, len, str); - return(client->noClientException); + return Success; } else { client->errorValue = stuff->id; - return (BadAtom); + return BadAtom; } } @@ -1109,7 +1075,7 @@ ProcGrabServer(ClientPtr client) client->sequence--; BITSET(grabWaiters, client->index); IgnoreClient(client); - return(client->noClientException); + return Success; } rc = OnlyListenToOneClient(client); if (rc != Success) @@ -1125,7 +1091,7 @@ ProcGrabServer(ClientPtr client) CallCallbacks(&ServerGrabCallback, (pointer)&grabinfo); } - return(client->noClientException); + return Success; } static void @@ -1160,7 +1126,7 @@ ProcUngrabServer(ClientPtr client) { REQUEST_SIZE_MATCH(xReq); UngrabServer(client); - return(client->noClientException); + return Success; } int @@ -1213,14 +1179,12 @@ ProcTranslateCoords(ClientPtr client) * borderSize */ && (!wBoundingShape(pWin) || - POINT_IN_REGION(pWin->drawable.pScreen, - &pWin->borderSize, x, y, &box)) + RegionContainsPoint(&pWin->borderSize, x, y, &box)) && (!wInputShape(pWin) || - POINT_IN_REGION(pWin->drawable.pScreen, - wInputShape(pWin), - x - pWin->drawable.x, - y - pWin->drawable.y, &box)) + RegionContainsPoint(wInputShape(pWin), + x - pWin->drawable.x, + y - pWin->drawable.y, &box)) ) { rep.child = pWin->drawable.id; @@ -1234,7 +1198,7 @@ ProcTranslateCoords(ClientPtr client) rep.dstY = y - pDst->drawable.y; } WriteReplyToClient(client, sizeof(xTranslateCoordsReply), &rep); - return(client->noClientException); + return Success; } int @@ -1250,7 +1214,7 @@ ProcOpenFont(ClientPtr client) stuff->nbytes, (char *)&stuff[1]); if (err == Success) { - return(client->noClientException); + return Success; } else return err; @@ -1269,12 +1233,12 @@ ProcCloseFont(ClientPtr client) if (rc == Success) { FreeResource(stuff->id, RT_NONE); - return(client->noClientException); + return Success; } else { client->errorValue = stuff->id; - return (rc == BadValue) ? BadFont : rc; + return rc; } } @@ -1283,22 +1247,13 @@ ProcQueryFont(ClientPtr client) { xQueryFontReply *reply; FontPtr pFont; - GC *pGC; int rc; REQUEST(xResourceReq); REQUEST_SIZE_MATCH(xResourceReq); - client->errorValue = stuff->id; /* EITHER font or gc */ - rc = dixLookupResourceByType((pointer *)&pFont, stuff->id, RT_FONT, client, - DixGetAttrAccess); - if (rc == BadValue) { - rc = dixLookupResourceByType((pointer *)&pGC, stuff->id, RT_GC, client, - DixGetAttrAccess); - if (rc == Success) - pFont = pGC->font; - } + rc = dixLookupFontable(&pFont, stuff->id, client, DixGetAttrAccess); if (rc != Success) - return (rc == BadValue) ? BadFont: rc; + return rc; { xCharInfo *pmax = FONTINKMAX(pFont); @@ -1317,10 +1272,10 @@ ProcQueryFont(ClientPtr client) rlength = sizeof(xQueryFontReply) + FONTINFONPROPS(FONTCHARSET(pFont)) * sizeof(xFontProp) + nprotoxcistructs * sizeof(xCharInfo); - reply = xcalloc(1, rlength); + reply = calloc(1, rlength); if(!reply) { - return(BadAlloc); + return BadAlloc; } reply->type = X_Reply; @@ -1329,8 +1284,8 @@ ProcQueryFont(ClientPtr client) QueryFont( pFont, reply, nprotoxcistructs); WriteReplyToClient(client, rlength, reply); - xfree(reply); - return(client->noClientException); + free(reply); + return Success; } } @@ -1339,35 +1294,26 @@ ProcQueryTextExtents(ClientPtr client) { xQueryTextExtentsReply reply; FontPtr pFont; - GC *pGC; ExtentInfoRec info; unsigned long length; int rc; REQUEST(xQueryTextExtentsReq); REQUEST_AT_LEAST_SIZE(xQueryTextExtentsReq); - client->errorValue = stuff->fid; /* EITHER font or gc */ - rc = dixLookupResourceByType((pointer *)&pFont, stuff->fid, RT_FONT, client, - DixGetAttrAccess); - if (rc == BadValue) { - rc = dixLookupResourceByType((pointer *)&pGC, stuff->fid, RT_GC, client, - DixGetAttrAccess); - if (rc == Success) - pFont = pGC->font; - } + rc = dixLookupFontable(&pFont, stuff->fid, client, DixGetAttrAccess); if (rc != Success) - return (rc == BadValue) ? BadFont: rc; + return rc; length = client->req_len - bytes_to_int32(sizeof(xQueryTextExtentsReq)); length = length << 1; if (stuff->oddLength) { if (length == 0) - return(BadLength); + return BadLength; length--; } if (!QueryTextExtents(pFont, length, (unsigned char *)&stuff[1], &info)) - return(BadAlloc); + return BadAlloc; reply.type = X_Reply; reply.length = 0; reply.sequenceNumber = client->sequence; @@ -1380,7 +1326,7 @@ ProcQueryTextExtents(ClientPtr client) reply.overallLeft = info.overallLeft; reply.overallRight = info.overallRight; WriteReplyToClient(client, sizeof(xQueryTextExtentsReply), &reply); - return(client->noClientException); + return Success; } int @@ -1481,10 +1427,10 @@ CreatePmap: return rc; } if (AddResource(stuff->pid, RT_PIXMAP, (pointer)pMap)) - return(client->noClientException); + return Success; (*pDraw->pScreen->DestroyPixmap)(pMap); } - return (BadAlloc); + return BadAlloc; } int @@ -1500,12 +1446,12 @@ ProcFreePixmap(ClientPtr client) if (rc == Success) { FreeResource(stuff->id, RT_NONE); - return(client->noClientException); + return Success; } else { client->errorValue = stuff->id; - return (rc == BadValue) ? BadPixmap : rc; + return rc; } } @@ -1534,8 +1480,8 @@ ProcCreateGC(ClientPtr client) if (error != Success) return error; if (!AddResource(stuff->gc, RT_GC, (pointer)pGC)) - return (BadAlloc); - return(client->noClientException); + return BadAlloc; + return Success; } int @@ -1555,14 +1501,7 @@ ProcChangeGC(ClientPtr client) if (len != Ones(stuff->mask)) return BadLength; - result = dixChangeGC(client, pGC, stuff->mask, (CARD32 *) &stuff[1], 0); - if (client->noClientException != Success) - return(client->noClientException); - else - { - client->errorValue = clientErrorValue; - return(result); - } + return ChangeGCXIDs(client, pGC, stuff->mask, (CARD32 *) &stuff[1]); } int @@ -1581,15 +1520,13 @@ ProcCopyGC(ClientPtr client) if (result != Success) return result; if ((dstGC->pScreen != pGC->pScreen) || (dstGC->depth != pGC->depth)) - return (BadMatch); - result = CopyGC(pGC, dstGC, stuff->mask); - if (client->noClientException != Success) - return(client->noClientException); - else + return BadMatch; + if (stuff->mask & ~GCAllBits) { - client->errorValue = clientErrorValue; - return(result); + client->errorValue = stuff->mask; + return BadValue; } + return CopyGC(pGC, dstGC, stuff->mask); } int @@ -1610,15 +1547,11 @@ ProcSetDashes(ClientPtr client) if (result != Success) return result; - result = SetDashes(pGC, stuff->dashOffset, stuff->nDashes, + /* If there's an error, either there's no sensible errorValue, + * or there was a dash segment of 0. */ + client->errorValue = 0; + return SetDashes(pGC, stuff->dashOffset, stuff->nDashes, (unsigned char *)&stuff[1]); - if (client->noClientException != Success) - return(client->noClientException); - else - { - client->errorValue = clientErrorValue; - return(result); - } } int @@ -1641,14 +1574,10 @@ ProcSetClipRectangles(ClientPtr client) nr = (client->req_len << 2) - sizeof(xSetClipRectanglesReq); if (nr & 4) - return(BadLength); + return BadLength; nr >>= 3; - result = SetClipRects(pGC, stuff->xOrigin, stuff->yOrigin, + return SetClipRects(pGC, stuff->xOrigin, stuff->yOrigin, nr, (xRectangle *)&stuff[1], (int)stuff->ordering); - if (client->noClientException != Success) - return(client->noClientException); - else - return(result); } int @@ -1664,7 +1593,7 @@ ProcFreeGC(ClientPtr client) return rc; FreeResource(stuff->id, RT_NONE); - return(client->noClientException); + return Success; } int @@ -1681,17 +1610,17 @@ ProcClearToBackground(ClientPtr client) if (pWin->drawable.class == InputOnly) { client->errorValue = stuff->window; - return (BadMatch); + return BadMatch; } if ((stuff->exposures != xTrue) && (stuff->exposures != xFalse)) { client->errorValue = stuff->exposures; - return(BadValue); + return BadValue; } (*pWin->drawable.pScreen->ClearToBackground)(pWin, stuff->x, stuff->y, stuff->width, stuff->height, (Bool)stuff->exposures); - return(client->noClientException); + return Success; } int @@ -1716,7 +1645,7 @@ ProcCopyArea(ClientPtr client) if ((pDst->pScreen != pSrc->pScreen) || (pDst->depth != pSrc->depth)) { client->errorValue = stuff->dstDrawable; - return (BadMatch); + return BadMatch; } } else @@ -1730,10 +1659,10 @@ ProcCopyArea(ClientPtr client) (*pDst->pScreen->SendGraphicsExpose) (client, pRgn, stuff->dstDrawable, X_CopyArea, 0); if (pRgn) - REGION_DESTROY(pDst->pScreen, pRgn); + RegionDestroy(pRgn); } - return(client->noClientException); + return Success; } int @@ -1758,7 +1687,7 @@ ProcCopyPlane(ClientPtr client) if (pdstDraw->pScreen != psrcDraw->pScreen) { client->errorValue = stuff->dstDrawable; - return (BadMatch); + return BadMatch; } } else @@ -1769,7 +1698,7 @@ ProcCopyPlane(ClientPtr client) (stuff->bitPlane > (1L << (psrcDraw->depth - 1)))) { client->errorValue = stuff->bitPlane; - return(BadValue); + return BadValue; } pRgn = (*pGC->ops->CopyPlane)(psrcDraw, pdstDraw, pGC, stuff->srcX, stuff->srcY, @@ -1780,9 +1709,9 @@ ProcCopyPlane(ClientPtr client) (*pdstDraw->pScreen->SendGraphicsExpose) (client, pRgn, stuff->dstDrawable, X_CopyPlane, 0); if (pRgn) - REGION_DESTROY(pdstDraw->pScreen, pRgn); + RegionDestroy(pRgn); } - return(client->noClientException); + return Success; } int @@ -1805,7 +1734,7 @@ ProcPolyPoint(ClientPtr client) if (npoint) (*pGC->ops->PolyPoint)(pDraw, pGC, stuff->coordMode, npoint, (xPoint *) &stuff[1]); - return (client->noClientException); + return Success; } int @@ -1828,7 +1757,7 @@ ProcPolyLine(ClientPtr client) if (npoint > 1) (*pGC->ops->Polylines)(pDraw, pGC, stuff->coordMode, npoint, (DDXPointPtr) &stuff[1]); - return(client->noClientException); + return Success; } int @@ -1843,11 +1772,11 @@ ProcPolySegment(ClientPtr client) VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); nsegs = (client->req_len << 2) - sizeof(xPolySegmentReq); if (nsegs & 4) - return(BadLength); + return BadLength; nsegs >>= 3; if (nsegs) (*pGC->ops->PolySegment)(pDraw, pGC, nsegs, (xSegment *) &stuff[1]); - return (client->noClientException); + return Success; } int @@ -1862,12 +1791,12 @@ ProcPolyRectangle (ClientPtr client) VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); nrects = (client->req_len << 2) - sizeof(xPolyRectangleReq); if (nrects & 4) - return(BadLength); + return BadLength; nrects >>= 3; if (nrects) (*pGC->ops->PolyRectangle)(pDraw, pGC, nrects, (xRectangle *) &stuff[1]); - return(client->noClientException); + return Success; } int @@ -1882,11 +1811,11 @@ ProcPolyArc(ClientPtr client) VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); narcs = (client->req_len << 2) - sizeof(xPolyArcReq); if (narcs % sizeof(xArc)) - return(BadLength); + return BadLength; narcs /= sizeof(xArc); if (narcs) (*pGC->ops->PolyArc)(pDraw, pGC, narcs, (xArc *) &stuff[1]); - return (client->noClientException); + return Success; } int @@ -1917,7 +1846,7 @@ ProcFillPoly(ClientPtr client) (*pGC->ops->FillPolygon) (pDraw, pGC, stuff->shape, stuff->coordMode, things, (DDXPointPtr) &stuff[1]); - return(client->noClientException); + return Success; } int @@ -1932,13 +1861,13 @@ ProcPolyFillRectangle(ClientPtr client) VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); things = (client->req_len << 2) - sizeof(xPolyFillRectangleReq); if (things & 4) - return(BadLength); + return BadLength; things >>= 3; if (things) (*pGC->ops->PolyFillRect) (pDraw, pGC, things, (xRectangle *) &stuff[1]); - return (client->noClientException); + return Success; } int @@ -1953,11 +1882,11 @@ ProcPolyFillArc(ClientPtr client) VALIDATE_DRAWABLE_AND_GC(stuff->drawable, pDraw, DixWriteAccess); narcs = (client->req_len << 2) - sizeof(xPolyFillArcReq); if (narcs % sizeof(xArc)) - return(BadLength); + return BadLength; narcs /= sizeof(xArc); if (narcs) (*pGC->ops->PolyFillArc) (pDraw, pGC, narcs, (xArc *) &stuff[1]); - return (client->noClientException); + return Success; } #ifdef MATCH_CLIENT_ENDIAN @@ -2068,7 +1997,7 @@ ProcPutImage(ClientPtr client) stuff->width, stuff->height, stuff->leftPad, stuff->format, tmpImage); - return (client->noClientException); + return Success; } static int @@ -2090,7 +2019,7 @@ DoGetImage(ClientPtr client, int format, Drawable drawable, if ((format != XYPixmap) && (format != ZPixmap)) { client->errorValue = format; - return(BadValue); + return BadValue; } rc = dixLookupDrawable(&pDraw, drawable, client, 0, DixReadAccess); if (rc != Success) @@ -2124,7 +2053,7 @@ DoGetImage(ClientPtr client, int format, Drawable drawable, } else { - pBoundingDraw = (DrawablePtr)WindowTable[pDraw->pScreen->myNum]; + pBoundingDraw = (DrawablePtr)pDraw->pScreen->root; } xgi.visual = wVisual (pWin); @@ -2172,9 +2101,9 @@ DoGetImage(ClientPtr client, int format, Drawable drawable, xgi.length = length; if (im_return) { - pBuf = xcalloc(1, sz_xGetImageReply + length); + pBuf = calloc(1, sz_xGetImageReply + length); if (!pBuf) - return (BadAlloc); + return BadAlloc; if (widthBytesLine == 0) linesPerBuf = 0; else @@ -2210,8 +2139,8 @@ DoGetImage(ClientPtr client, int format, Drawable drawable, length += widthBytesLine; } } - if(!(pBuf = xcalloc(1, length))) - return (BadAlloc); + if(!(pBuf = calloc(1, length))) + return BadAlloc; WriteReplyToClient(client, sizeof (xGetImageReply), &xgi); } @@ -2220,8 +2149,7 @@ DoGetImage(ClientPtr client, int format, Drawable drawable, pVisibleRegion = NotClippedByChildren((WindowPtr)pDraw); if (pVisibleRegion) { - REGION_TRANSLATE(pDraw->pScreen, pVisibleRegion, - -pDraw->x, -pDraw->y); + RegionTranslate(pVisibleRegion, -pDraw->x, -pDraw->y); } } @@ -2309,10 +2237,10 @@ DoGetImage(ClientPtr client, int format, Drawable drawable, } } if (pVisibleRegion) - REGION_DESTROY(pDraw->pScreen, pVisibleRegion); + RegionDestroy(pVisibleRegion); if (!im_return) - xfree(pBuf); - return (client->noClientException); + free(pBuf); + return Success; } int @@ -2351,7 +2279,7 @@ ProcPolyText(ClientPtr client) if (err == Success) { - return(client->noClientException); + return Success; } else return err; @@ -2381,7 +2309,7 @@ ProcImageText8(ClientPtr client) if (err == Success) { - return(client->noClientException); + return Success; } else return err; @@ -2411,7 +2339,7 @@ ProcImageText16(ClientPtr client) if (err == Success) { - return(client->noClientException); + return Success; } else return err; @@ -2434,7 +2362,7 @@ ProcCreateColormap(ClientPtr client) if ((stuff->alloc != AllocNone) && (stuff->alloc != AllocAll)) { client->errorValue = stuff->alloc; - return(BadValue); + return BadValue; } mid = stuff->mid; LEGAL_NEW_RESOURCE(mid, client); @@ -2449,15 +2377,11 @@ ProcCreateColormap(ClientPtr client) { if (pVisual->vid != stuff->visual) continue; - result = CreateColormap(mid, pScreen, pVisual, &pmap, + return CreateColormap(mid, pScreen, pVisual, &pmap, (int)stuff->alloc, client->index); - if (client->noClientException != Success) - return(client->noClientException); - else - return(result); } client->errorValue = stuff->visual; - return(BadMatch); + return BadMatch; } int @@ -2475,12 +2399,12 @@ ProcFreeColormap(ClientPtr client) /* Freeing a default colormap is a no-op */ if (!(pmap->flags & IsDefault)) FreeResource(stuff->id, RT_NONE); - return (client->noClientException); + return Success; } else { client->errorValue = stuff->id; - return (rc == BadValue) ? BadColor : rc; + return rc; } } @@ -2499,18 +2423,9 @@ ProcCopyColormapAndFree(ClientPtr client) rc = dixLookupResourceByType((pointer *)&pSrcMap, stuff->srcCmap, RT_COLORMAP, client, DixReadAccess|DixRemoveAccess); if (rc == Success) - { - rc = CopyColormapAndFree(mid, pSrcMap, client->index); - if (client->noClientException != Success) - return(client->noClientException); - else - return rc; - } - else - { - client->errorValue = stuff->srcCmap; - return (rc == BadValue) ? BadColor : rc; - } + return CopyColormapAndFree(mid, pSrcMap, client->index); + client->errorValue = stuff->srcCmap; + return rc; } int @@ -2527,15 +2442,18 @@ ProcInstallColormap(ClientPtr client) goto out; rc = XaceHook(XACE_SCREEN_ACCESS, client, pcmp->pScreen, DixSetAttrAccess); - if (rc != Success) + if (rc != Success) { + if (rc == BadValue) + rc = BadColor; goto out; + } (*(pcmp->pScreen->InstallColormap)) (pcmp); + return Success; - rc = client->noClientException; out: client->errorValue = stuff->id; - return (rc == BadValue) ? BadColor : rc; + return rc; } int @@ -2552,16 +2470,19 @@ ProcUninstallColormap(ClientPtr client) goto out; rc = XaceHook(XACE_SCREEN_ACCESS, client, pcmp->pScreen, DixSetAttrAccess); - if (rc != Success) + if (rc != Success) { + if (rc == BadValue) + rc = BadColor; goto out; + } if(pcmp->mid != pcmp->pScreen->defColormap) (*(pcmp->pScreen->UninstallColormap)) (pcmp); + return Success; - rc = client->noClientException; out: client->errorValue = stuff->id; - return (rc == BadValue) ? BadColor : rc; + return rc; } int @@ -2575,18 +2496,18 @@ ProcListInstalledColormaps(ClientPtr client) rc = dixLookupWindow(&pWin, stuff->id, client, DixGetAttrAccess); if (rc != Success) - goto out; + return rc; rc = XaceHook(XACE_SCREEN_ACCESS, client, pWin->drawable.pScreen, DixGetAttrAccess); if (rc != Success) - goto out; + return rc; - preply = xalloc(sizeof(xListInstalledColormapsReply) + + preply = malloc(sizeof(xListInstalledColormapsReply) + pWin->drawable.pScreen->maxInstalledCmaps * sizeof(Colormap)); if(!preply) - return(BadAlloc); + return BadAlloc; preply->type = X_Reply; preply->sequenceNumber = client->sequence; @@ -2597,10 +2518,8 @@ ProcListInstalledColormaps(ClientPtr client) WriteReplyToClient(client, sizeof (xListInstalledColormapsReply), preply); client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; WriteSwappedDataToClient(client, nummaps * sizeof(Colormap), &preply[1]); - xfree(preply); - rc = client->noClientException; -out: - return rc; + free(preply); + return Success; } int @@ -2625,23 +2544,18 @@ ProcAllocColor (ClientPtr client) acr.pixel = 0; if( (rc = AllocColor(pmap, &acr.red, &acr.green, &acr.blue, &acr.pixel, client->index)) ) - { - if (client->noClientException != Success) - return(client->noClientException); - else - return rc; - } + return rc; #ifdef PANORAMIX if (noPanoramiXExtension || !pmap->pScreen->myNum) #endif WriteReplyToClient(client, sizeof(xAllocColorReply), &acr); - return (client->noClientException); + return Success; } else { client->errorValue = stuff->cmap; - return (rc == BadValue) ? BadColor : rc; + return rc; } } @@ -2673,26 +2587,21 @@ ProcAllocNamedColor (ClientPtr client) if( (rc = AllocColor(pcmp, &ancr.screenRed, &ancr.screenGreen, &ancr.screenBlue, &ancr.pixel, client->index)) ) - { - if (client->noClientException != Success) - return(client->noClientException); - else - return rc; - } + return rc; #ifdef PANORAMIX if (noPanoramiXExtension || !pcmp->pScreen->myNum) #endif WriteReplyToClient(client, sizeof (xAllocNamedColorReply), &ancr); - return (client->noClientException); + return Success; } else - return(BadName); + return BadName; } else { client->errorValue = stuff->cmap; - return (rc == BadValue) ? BadColor : rc; + return rc; } } @@ -2717,28 +2626,25 @@ ProcAllocColorCells (ClientPtr client) if (!npixels) { client->errorValue = npixels; - return (BadValue); + return BadValue; } if (stuff->contiguous != xTrue && stuff->contiguous != xFalse) { client->errorValue = stuff->contiguous; - return (BadValue); + return BadValue; } nmasks = stuff->planes; length = ((long)npixels + (long)nmasks) * sizeof(Pixel); - ppixels = xalloc(length); + ppixels = malloc(length); if(!ppixels) - return(BadAlloc); + return BadAlloc; pmasks = ppixels + npixels; if( (rc = AllocColorCells(client->index, pcmp, npixels, nmasks, (Bool)stuff->contiguous, ppixels, pmasks)) ) { - xfree(ppixels); - if (client->noClientException != Success) - return(client->noClientException); - else - return rc; + free(ppixels); + return rc; } #ifdef PANORAMIX if (noPanoramiXExtension || !pcmp->pScreen->myNum) @@ -2753,13 +2659,13 @@ ProcAllocColorCells (ClientPtr client) client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; WriteSwappedDataToClient(client, length, ppixels); } - xfree(ppixels); - return (client->noClientException); + free(ppixels); + return Success; } else { client->errorValue = stuff->cmap; - return (rc == BadValue) ? BadColor : rc; + return rc; } } @@ -2784,30 +2690,27 @@ ProcAllocColorPlanes(ClientPtr client) if (!npixels) { client->errorValue = npixels; - return (BadValue); + return BadValue; } if (stuff->contiguous != xTrue && stuff->contiguous != xFalse) { client->errorValue = stuff->contiguous; - return (BadValue); + return BadValue; } acpr.type = X_Reply; acpr.sequenceNumber = client->sequence; acpr.nPixels = npixels; length = (long)npixels * sizeof(Pixel); - ppixels = xalloc(length); + ppixels = malloc(length); if(!ppixels) - return(BadAlloc); + return BadAlloc; if( (rc = AllocColorPlanes(client->index, pcmp, npixels, (int)stuff->red, (int)stuff->green, (int)stuff->blue, (Bool)stuff->contiguous, ppixels, &acpr.redMask, &acpr.greenMask, &acpr.blueMask)) ) { - xfree(ppixels); - if (client->noClientException != Success) - return(client->noClientException); - else - return rc; + free(ppixels); + return rc; } acpr.length = bytes_to_int32(length); #ifdef PANORAMIX @@ -2818,13 +2721,13 @@ ProcAllocColorPlanes(ClientPtr client) client->pSwapReplyFunc = (ReplySwapPtr) Swap32Write; WriteSwappedDataToClient(client, length, ppixels); } - xfree(ppixels); - return (client->noClientException); + free(ppixels); + return Success; } else { client->errorValue = stuff->cmap; - return (rc == BadValue) ? BadColor : rc; + return rc; } } @@ -2843,23 +2746,15 @@ ProcFreeColors(ClientPtr client) int count; if(pcmp->flags & AllAllocated) - return(BadAccess); + return BadAccess; count = bytes_to_int32((client->req_len << 2) - sizeof(xFreeColorsReq)); - rc = FreeColors(pcmp, client->index, count, + return FreeColors(pcmp, client->index, count, (Pixel *)&stuff[1], (Pixel)stuff->planeMask); - if (client->noClientException != Success) - return(client->noClientException); - else - { - client->errorValue = clientErrorValue; - return rc; - } - } else { client->errorValue = stuff->cmap; - return (rc == BadValue) ? BadColor : rc; + return rc; } } @@ -2879,21 +2774,14 @@ ProcStoreColors (ClientPtr client) count = (client->req_len << 2) - sizeof(xStoreColorsReq); if (count % sizeof(xColorItem)) - return(BadLength); + return BadLength; count /= sizeof(xColorItem); - rc = StoreColors(pcmp, count, (xColorItem *)&stuff[1]); - if (client->noClientException != Success) - return(client->noClientException); - else - { - client->errorValue = clientErrorValue; - return rc; - } + return StoreColors(pcmp, count, (xColorItem *)&stuff[1], client); } else { client->errorValue = stuff->cmap; - return (rc == BadValue) ? BadColor : rc; + return rc; } } @@ -2916,18 +2804,14 @@ ProcStoreNamedColor (ClientPtr client) { def.flags = stuff->flags; def.pixel = stuff->pixel; - rc = StoreColors(pcmp, 1, &def); - if (client->noClientException != Success) - return(client->noClientException); - else - return rc; + return StoreColors(pcmp, 1, &def, client); } - return (BadName); + return BadName; } else { client->errorValue = stuff->cmap; - return (rc == BadValue) ? BadColor : rc; + return rc; } } @@ -2948,19 +2832,13 @@ ProcQueryColors(ClientPtr client) xQueryColorsReply qcr; count = bytes_to_int32((client->req_len << 2) - sizeof(xQueryColorsReq)); - prgbs = xcalloc(1, count * sizeof(xrgb)); + prgbs = calloc(1, count * sizeof(xrgb)); if(!prgbs && count) - return(BadAlloc); - if( (rc = QueryColors(pcmp, count, (Pixel *)&stuff[1], prgbs)) ) + return BadAlloc; + if( (rc = QueryColors(pcmp, count, (Pixel *)&stuff[1], prgbs, client)) ) { - if (prgbs) xfree(prgbs); - if (client->noClientException != Success) - return(client->noClientException); - else - { - client->errorValue = clientErrorValue; - return rc; - } + free(prgbs); + return rc; } memset(&qcr, 0, sizeof(xQueryColorsReply)); qcr.type = X_Reply; @@ -2973,14 +2851,14 @@ ProcQueryColors(ClientPtr client) client->pSwapReplyFunc = (ReplySwapPtr) SQColorsExtend; WriteSwappedDataToClient(client, count * sizeof(xrgb), prgbs); } - if (prgbs) xfree(prgbs); - return(client->noClientException); + free(prgbs); + return Success; } else { client->errorValue = stuff->cmap; - return (rc == BadValue) ? BadColor : rc; + return rc; } } @@ -3012,14 +2890,14 @@ ProcLookupColor(ClientPtr client) &lcr.screenBlue, pcmp->pVisual); WriteReplyToClient(client, sizeof(xLookupColorReply), &lcr); - return(client->noClientException); + return Success; } - return (BadName); + return BadName; } else { client->errorValue = stuff->cmap; - return (rc == BadValue) ? BadColor : rc; + return rc; } } @@ -3045,7 +2923,7 @@ ProcCreateCursor (ClientPtr client) DixReadAccess); if (rc != Success) { client->errorValue = stuff->source; - return (rc == BadValue) ? BadPixmap : rc; + return rc; } rc = dixLookupResourceByType((pointer *)&msk, stuff->mask, RT_PIXMAP, client, @@ -3055,31 +2933,31 @@ ProcCreateCursor (ClientPtr client) if (stuff->mask != None) { client->errorValue = stuff->mask; - return (rc == BadValue) ? BadPixmap : rc; + return rc; } } else if ( src->drawable.width != msk->drawable.width || src->drawable.height != msk->drawable.height || src->drawable.depth != 1 || msk->drawable.depth != 1) - return (BadMatch); + return BadMatch; width = src->drawable.width; height = src->drawable.height; if ( stuff->x > width || stuff->y > height ) - return (BadMatch); + return BadMatch; n = BitmapBytePad(width)*height; - srcbits = xcalloc(1, n); + srcbits = calloc(1, n); if (!srcbits) - return (BadAlloc); - mskbits = xalloc(n); + return BadAlloc; + mskbits = malloc(n); if (!mskbits) { - xfree(srcbits); - return (BadAlloc); + free(srcbits); + return BadAlloc; } (* src->drawable.pScreen->GetImage)( (DrawablePtr)src, 0, 0, width, height, @@ -3093,7 +2971,7 @@ ProcCreateCursor (ClientPtr client) else { /* zeroing the (pad) bits helps some ddx cursor handling */ - bzero((char *)mskbits, n); + memset((char *)mskbits, 0, n); (* msk->drawable.pScreen->GetImage)( (DrawablePtr)msk, 0, 0, width, height, XYPixmap, 1, (pointer)mskbits); } @@ -3111,7 +2989,7 @@ ProcCreateCursor (ClientPtr client) if (!AddResource(stuff->cid, RT_CURSOR, (pointer)pCursor)) return BadAlloc; - return client->noClientException; + return Success; } int @@ -3133,7 +3011,7 @@ ProcCreateGlyphCursor (ClientPtr client) if (res != Success) return res; if (AddResource(stuff->cid, RT_CURSOR, (pointer)pCursor)) - return client->noClientException; + return Success; return BadAlloc; } @@ -3151,12 +3029,12 @@ ProcFreeCursor (ClientPtr client) if (rc == Success) { FreeResource(stuff->id, RT_NONE); - return (client->noClientException); + return Success; } else { client->errorValue = stuff->id; - return (rc == BadValue) ? BadCursor : rc; + return rc; } } @@ -3175,7 +3053,7 @@ ProcQueryBestSize (ClientPtr client) (stuff->class != StippleShape)) { client->errorValue = stuff->class; - return(BadValue); + return BadValue; } rc = dixLookupDrawable(&pDraw, stuff->drawable, client, M_ANY, @@ -3183,7 +3061,7 @@ ProcQueryBestSize (ClientPtr client) if (rc != Success) return rc; if (stuff->class != CursorShape && pDraw->type == UNDRAWABLE_WINDOW) - return (BadMatch); + return BadMatch; pScreen = pDraw->pScreen; rc = XaceHook(XACE_SCREEN_ACCESS, client, pScreen, DixGetAttrAccess); if (rc != Success) @@ -3197,7 +3075,7 @@ ProcQueryBestSize (ClientPtr client) reply.width = stuff->width; reply.height = stuff->height; WriteReplyToClient(client, sizeof(xQueryBestSizeReply), &reply); - return (client->noClientException); + return Success; } @@ -3261,7 +3139,7 @@ ProcSetScreenSaver (ClientPtr client) ScreenSaverInterval = defaultScreenSaverInterval; SetScreenSaverTimer(); - return (client->noClientException); + return Success; } int @@ -3286,31 +3164,24 @@ ProcGetScreenSaver(ClientPtr client) rep.preferBlanking = ScreenSaverBlanking; rep.allowExposures = ScreenSaverAllowExposures; WriteReplyToClient(client, sizeof(xGetScreenSaverReply), &rep); - return (client->noClientException); + return Success; } int ProcChangeHosts(ClientPtr client) { REQUEST(xChangeHostsReq); - int result; REQUEST_FIXED_SIZE(xChangeHostsReq, stuff->hostLength); if(stuff->mode == HostInsert) - result = AddHost(client, (int)stuff->hostFamily, + return AddHost(client, (int)stuff->hostFamily, stuff->hostLength, (pointer)&stuff[1]); - else if (stuff->mode == HostDelete) - result = RemoveHost(client, (int)stuff->hostFamily, + if (stuff->mode == HostDelete) + return RemoveHost(client, (int)stuff->hostFamily, stuff->hostLength, (pointer)&stuff[1]); - else - { - client->errorValue = stuff->mode; - return BadValue; - } - if (!result) - result = client->noClientException; - return (result); + client->errorValue = stuff->mode; + return BadValue; } int @@ -3330,7 +3201,7 @@ ProcListHosts(ClientPtr client) result = GetHosts(&pdata, &nHosts, &len, &reply.enabled); if (result != Success) - return(result); + return result; reply.type = X_Reply; reply.sequenceNumber = client->sequence; reply.nHosts = nHosts; @@ -3341,14 +3212,13 @@ ProcListHosts(ClientPtr client) client->pSwapReplyFunc = (ReplySwapPtr) SLHostsExtend; WriteSwappedDataToClient(client, len, pdata); } - xfree(pdata); - return (client->noClientException); + free(pdata); + return Success; } int ProcChangeAccessControl(ClientPtr client) { - int result; REQUEST(xSetAccessControlReq); REQUEST_SIZE_MATCH(xSetAccessControlReq); @@ -3357,10 +3227,7 @@ ProcChangeAccessControl(ClientPtr client) client->errorValue = stuff->mode; return BadValue; } - result = ChangeAccessControl(client, stuff->mode == EnableAccess); - if (!result) - result = client->noClientException; - return (result); + return ChangeAccessControl(client, stuff->mode == EnableAccess); } /********************* @@ -3396,7 +3263,7 @@ ProcKillClient(ClientPtr client) if (stuff->id == AllTemporary) { CloseDownRetainedResources(); - return (client->noClientException); + return Success; } rc = dixLookupClient(&killclient, stuff->id, client, DixDestroyAccess); @@ -3409,9 +3276,9 @@ ProcKillClient(ClientPtr client) * doesn't try to touch client */ isItTimeToYield = TRUE; - return (Success); + return Success; } - return (client->noClientException); + return Success; } else return rc; @@ -3423,8 +3290,7 @@ ProcSetFontPath(ClientPtr client) unsigned char *ptr; unsigned long nbytes, total; long nfonts; - int n, result; - int error; + int n; REQUEST(xSetFontPathReq); REQUEST_AT_LEAST_SIZE(xSetFontPathReq); @@ -3436,20 +3302,13 @@ ProcSetFontPath(ClientPtr client) while (--nfonts >= 0) { if ((total == 0) || (total < (n = (*ptr + 1)))) - return(BadLength); + return BadLength; total -= n; ptr += n; } if (total >= 4) - return(BadLength); - result = SetFontPath(client, stuff->nFonts, (unsigned char *)&stuff[1], - &error); - if (!result) - { - result = client->noClientException; - client->errorValue = error; - } - return (result); + return BadLength; + return SetFontPath(client, stuff->nFonts, (unsigned char *)&stuff[1]); } int @@ -3473,7 +3332,7 @@ ProcGetFontPath(ClientPtr client) WriteReplyToClient(client, sizeof(xGetFontPathReply), &reply); if (stringLens || numpaths) (void)WriteToClient(client, stringLens + numpaths, (char *)bufferStart); - return(client->noClientException); + return Success; } int @@ -3492,12 +3351,12 @@ ProcChangeCloseDownMode(ClientPtr client) (stuff->mode == RetainTemporary)) { client->closeDownMode = stuff->mode; - return (client->noClientException); + return Success; } else { client->errorValue = stuff->mode; - return (BadValue); + return BadValue; } } @@ -3517,7 +3376,7 @@ int ProcForceScreenSaver(ClientPtr client) rc = dixSaveScreens(client, SCREEN_SAVER_FORCER, (int)stuff->mode); if (rc != Success) return rc; - return client->noClientException; + return Success; } int ProcNoOperation(ClientPtr client) @@ -3525,7 +3384,7 @@ int ProcNoOperation(ClientPtr client) REQUEST_AT_LEAST_SIZE(xReq); /* noop -- don't do anything */ - return(client->noClientException); + return Success; } void @@ -3636,8 +3495,7 @@ CloseDownClient(ClientPtr client) nextFreeClientID = client->index; clients[client->index] = NullClient; SmartLastClient = NullClient; - dixFreePrivates(client->devPrivates); - xfree(client); + dixFreeObjectWithPrivates(client, PRIVATE_CLIENT); while (!clients[currentMaxClients-1]) currentMaxClients--; @@ -3658,7 +3516,6 @@ KillAllClients(void) void InitClient(ClientPtr client, int i, pointer ospriv) { - memset(client, 0, sizeof(*client)); client->index = i; client->clientAsMask = ((Mask)i) << CLIENTOFFSET; client->closeDownMode = i ? DestroyAll : RetainPermanent; @@ -3686,13 +3543,13 @@ ClientPtr NextAvailableClient(pointer ospriv) i = nextFreeClientID; if (i == MAXCLIENTS) return (ClientPtr)NULL; - clients[i] = client = xalloc(sizeof(ClientRec)); + clients[i] = client = dixAllocateObjectWithPrivates(ClientRec, PRIVATE_CLIENT); if (!client) return (ClientPtr)NULL; InitClient(client, i, ospriv); if (!InitClientResources(client)) { - xfree(client); + dixFreeObjectWithPrivates(client, PRIVATE_CLIENT); return (ClientPtr)NULL; } data.reqType = 1; @@ -3700,7 +3557,7 @@ ClientPtr NextAvailableClient(pointer ospriv) if (!InsertFakeRequest(client, (char *)&data, sz_xReq)) { FreeClientResources(client); - xfree(client); + dixFreeObjectWithPrivates(client, PRIVATE_CLIENT); return (ClientPtr)NULL; } if (i == currentMaxClients) @@ -3716,7 +3573,7 @@ ClientPtr NextAvailableClient(pointer ospriv) clientinfo.setup = (xConnSetup *) NULL; CallCallbacks((&ClientStateCallback), (pointer)&clientinfo); } - return(client); + return client; } int @@ -3728,7 +3585,7 @@ ProcInitialConnection(ClientPtr client) prefix = (xConnClientPrefix *)((char *)stuff + sz_xReq); if ((prefix->byteOrder != 'l') && (prefix->byteOrder != 'B')) - return (client->noClientException = -1); + return client->noClientException = -1; if (((*(char *) &whichbyte) && (prefix->byteOrder == 'B')) || (!(*(char *) &whichbyte) && (prefix->byteOrder == 'l'))) { @@ -3743,7 +3600,7 @@ ProcInitialConnection(ClientPtr client) swaps(&stuff->length, whichbyte); } ResetCurrentRequest(client); - return (client->noClientException); + return Success; } static int @@ -3769,7 +3626,7 @@ SendConnSetup(ClientPtr client, char *reason) else (void)WriteToClient(client, sz_xConnSetupPrefix, (char *) &csp); (void)WriteToClient(client, (int)csp.lengthReason, reason); - return (client->noClientException = -1); + return client->noClientException = -1; } numScreens = screenInfo.numScreens; @@ -3804,9 +3661,9 @@ SendConnSetup(ClientPtr client, char *reason) { unsigned int j; xDepth *pDepth; + WindowPtr pRoot = screenInfo.screens[i]->root; - root->currentInputMask = WindowTable[i]->eventMask | - wOtherEventMasks (WindowTable[i]); + root->currentInputMask = pRoot->eventMask | wOtherEventMasks(pRoot); pDepth = (xDepth *)(root + 1); for (j = 0; j < root->nDepths; j++) { @@ -3840,7 +3697,7 @@ SendConnSetup(ClientPtr client, char *reason) clientinfo.setup = (xConnSetup *)lConnectionInfo; CallCallbacks((&ClientStateCallback), (pointer)&clientinfo); } - return (client->noClientException); + return Success; } int @@ -3874,7 +3731,7 @@ ProcEstablishConnection(ClientPtr client) client->clientState = ClientStateCheckedSecurity; else if (client->clientState != ClientStateAuthenticating) return(SendConnSetup(client, reason)); - return(client->noClientException); + return Success; } void @@ -3885,7 +3742,6 @@ SendErrorToClient(ClientPtr client, unsigned majorCode, unsigned minorCode, memset(&rep, 0, sizeof(xError)); rep.type = X_Error; - rep.sequenceNumber = client->sequence; rep.errorCode = errorCode; rep.majorCode = majorCode; rep.minorCode = minorCode; @@ -4003,13 +3859,16 @@ AddScreen( if (i == MAXSCREENS) return -1; - pScreen = (ScreenPtr) xcalloc(1, sizeof(ScreenRec)); + pScreen = (ScreenPtr) calloc(1, sizeof(ScreenRec)); if (!pScreen) return -1; - pScreen->devPrivates = NULL; + if (!dixAllocatePrivates(&pScreen->devPrivates, PRIVATE_SCREEN)) { + free (pScreen); + return -1; + } pScreen->myNum = i; - pScreen->totalPixmapSize = BitmapBytePad(sizeof(PixmapRec)*8); + pScreen->totalPixmapSize = 0; /* computed in CreateScratchPixmapForScreen */ pScreen->ClipNotify = 0; /* for R4 ddx compatibility */ pScreen->CreateScreenResources = 0; @@ -4055,16 +3914,17 @@ AddScreen( any of the strings pointed to by argv. They may be passed to multiple screens. */ - pScreen->rgf = ~0L; /* there are no scratch GCs yet*/ - WindowTable[i] = NullWindow; screenInfo.screens[i] = pScreen; screenInfo.numScreens++; if (!(*pfnInit)(i, pScreen, argc, argv)) { - dixFreePrivates(pScreen->devPrivates); - xfree(pScreen); + dixFreePrivates(pScreen->devPrivates, PRIVATE_SCREEN); + free(pScreen); screenInfo.numScreens--; return -1; } + + dixRegisterPrivateKey(&cursorScreenDevPriv[i], PRIVATE_CURSOR, 0); + return i; } diff --git a/xserver/dix/dixfonts.c b/xserver/dix/dixfonts.c index 6dc819313..e22eabe3a 100644 --- a/xserver/dix/dixfonts.c +++ b/xserver/dix/dixfonts.c @@ -166,7 +166,7 @@ QueueFontWakeup(FontPathElementPtr fpe) } if (num_slept_fpes == size_slept_fpes) { new = (FontPathElementPtr *) - xrealloc(slept_fpes, + realloc(slept_fpes, sizeof(FontPathElementPtr) * (size_slept_fpes + 4)); if (!new) return; @@ -222,8 +222,8 @@ FreeFPE (FontPathElementPtr fpe) fpe->refcount--; if (fpe->refcount == 0) { (*fpe_functions[fpe->type].free_fpe) (fpe); - xfree(fpe->name); - xfree(fpe); + free(fpe->name); + free(fpe); } } @@ -297,7 +297,7 @@ doOpenFont(ClientPtr client, OFclosurePtr c) if (err == FontNameAlias && alias) { newlen = strlen(alias); - newname = (char *) xrealloc(c->fontname, newlen); + newname = (char *) realloc(c->fontname, newlen); if (!newname) { err = AllocError; break; @@ -321,10 +321,10 @@ doOpenFont(ClientPtr client, OFclosurePtr c) continue; } if (err == Suspended) { - if (!c->slept) { - c->slept = TRUE; - ClientSleep(client, (ClientSleepProcPtr)doOpenFont, (pointer) c); - } + if (!ClientIsAsleep(client)) + ClientSleep(client, (ClientSleepProcPtr)doOpenFont, c); + else + goto xinerama_sleep; return TRUE; } break; @@ -373,14 +373,14 @@ bail: SendErrorToClient(c->client, X_OpenFont, 0, c->fontid, FontToXError(err)); } - if (c->slept) - ClientWakeup(c->client); + ClientWakeup(c->client); +xinerama_sleep: for (i = 0; i < c->num_fpes; i++) { FreeFPE(c->fpe_list[i]); } - xfree(c->fpe_list); - xfree(c->fontname); - xfree(c); + free(c->fpe_list); + free(c->fontname); + free(c); return TRUE; } @@ -393,11 +393,11 @@ OpenFont(ClientPtr client, XID fid, Mask flags, unsigned lenfname, char *pfontna #ifdef FONTDEBUG char *f; - f = xalloc(lenfname + 1); + f = malloc(lenfname + 1); memmove(f, pfontname, lenfname); f[lenfname] = '\0'; ErrorF("[dix] OpenFont: fontname is \"%s\"\n", f); - xfree(f); + free(f); #endif if (!lenfname || lenfname > XLFDMAXFONTNAMELEN) return BadName; @@ -430,24 +430,24 @@ OpenFont(ClientPtr client, XID fid, Mask flags, unsigned lenfname, char *pfontna return Success; } } - c = xalloc(sizeof(OFclosureRec)); + c = malloc(sizeof(OFclosureRec)); if (!c) return BadAlloc; - c->fontname = xalloc(lenfname); + c->fontname = malloc(lenfname); c->origFontName = pfontname; c->origFontNameLen = lenfname; if (!c->fontname) { - xfree(c); + free(c); return BadAlloc; } /* * copy the current FPE list, so that if it gets changed by another client * while we're blocking, the request still appears atomic */ - c->fpe_list = xalloc(sizeof(FontPathElementPtr) * num_fpes); + c->fpe_list = malloc(sizeof(FontPathElementPtr) * num_fpes); if (!c->fpe_list) { - xfree(c->fontname); - xfree(c); + free(c->fontname); + free(c); return BadAlloc; } memmove(c->fontname, pfontname, lenfname); @@ -460,7 +460,6 @@ OpenFont(ClientPtr client, XID fid, Mask flags, unsigned lenfname, char *pfontna c->current_fpe = 0; c->num_fpes = num_fpes; c->fnamelen = lenfname; - c->slept = FALSE; c->flags = flags; c->non_cachable_font = cached; @@ -482,7 +481,7 @@ CloseFont(pointer value, XID fid) FontPtr pfont = (FontPtr)value; if (pfont == NullFont) - return (Success); + return Success; if (--pfont->refcnt == 0) { if (patternCache) RemoveCachedFontPattern (patternCache, pfont); @@ -504,7 +503,7 @@ CloseFont(pointer value, XID fid) (*fpe_functions[fpe->type].close_font) (fpe, pfont); FreeFPE(fpe); } - return (Success); + return Success; } @@ -622,12 +621,12 @@ doListFontsAndAliases(ClientPtr client, LFclosurePtr c) c->names); if (err == Suspended) { - if (!c->slept) { - c->slept = TRUE; + if (!ClientIsAsleep(client)) ClientSleep(client, - (ClientSleepProcPtr)doListFontsAndAliases, - (pointer) c); - } + (ClientSleepProcPtr)doListFontsAndAliases, + c); + else + goto xinerama_sleep; return TRUE; } @@ -650,12 +649,12 @@ doListFontsAndAliases(ClientPtr client, LFclosurePtr c) c->current.patlen, c->current.max_names - c->names->nnames, &c->current.private); if (err == Suspended) { - if (!c->slept) { + if (!ClientIsAsleep(client)) ClientSleep(client, (ClientSleepProcPtr)doListFontsAndAliases, - (pointer) c); - c->slept = TRUE; - } + c); + else + goto xinerama_sleep; return TRUE; } if (err == Successful) @@ -668,17 +667,17 @@ doListFontsAndAliases(ClientPtr client, LFclosurePtr c) ((pointer) c->client, fpe, &name, &namelen, &tmpname, &resolvedlen, c->current.private); if (err == Suspended) { - if (!c->slept) { + if (ClientIsAsleep(client)) ClientSleep(client, (ClientSleepProcPtr)doListFontsAndAliases, - (pointer) c); - c->slept = TRUE; - } + c); + else + goto xinerama_sleep; return TRUE; } if (err == FontNameAlias) { - if (resolved) xfree(resolved); - resolved = xalloc(resolvedlen + 1); + free(resolved); + resolved = malloc(resolvedlen + 1); if (resolved) memmove(resolved, tmpname, resolvedlen + 1); } @@ -731,9 +730,8 @@ doListFontsAndAliases(ClientPtr client, LFclosurePtr c) { c->saved = c->current; c->haveSaved = TRUE; - if (c->savedName) - xfree(c->savedName); - c->savedName = xalloc(namelen + 1); + free(c->savedName); + c->savedName = malloc(namelen + 1); if (c->savedName) memmove(c->savedName, name, namelen + 1); c->savedNameLen = namelen; @@ -795,7 +793,7 @@ finish: reply.nFonts = nnames; reply.sequenceNumber = client->sequence; - bufptr = bufferStart = xalloc(reply.length << 2); + bufptr = bufferStart = malloc(reply.length << 2); if (!bufptr && reply.length) { SendErrorToClient(client, X_ListFonts, 0, 0, BadAlloc); @@ -820,18 +818,18 @@ finish: client->pSwapReplyFunc = ReplySwapVector[X_ListFonts]; WriteSwappedDataToClient(client, sizeof(xListFontsReply), &reply); (void) WriteToClient(client, stringLens + nnames, bufferStart); - xfree(bufferStart); + free(bufferStart); bail: - if (c->slept) - ClientWakeup(client); + ClientWakeup(client); +xinerama_sleep: for (i = 0; i < c->num_fpes; i++) FreeFPE(c->fpe_list[i]); - xfree(c->fpe_list); - if (c->savedName) xfree(c->savedName); + free(c->fpe_list); + free(c->savedName); FreeFontNames(names); - xfree(c); - if (resolved) xfree(resolved); + free(c); + free(resolved); return TRUE; } @@ -855,18 +853,18 @@ ListFonts(ClientPtr client, unsigned char *pattern, unsigned length, if (i != Success) return i; - if (!(c = xalloc(sizeof *c))) + if (!(c = malloc(sizeof *c))) return BadAlloc; - c->fpe_list = xalloc(sizeof(FontPathElementPtr) * num_fpes); + c->fpe_list = malloc(sizeof(FontPathElementPtr) * num_fpes); if (!c->fpe_list) { - xfree(c); + free(c); return BadAlloc; } c->names = MakeFontNamesRecord(max_names < 100 ? max_names : 100); if (!c->names) { - xfree(c->fpe_list); - xfree(c); + free(c->fpe_list); + free(c); return BadAlloc; } memmove( c->current.pattern, pattern, length); @@ -882,7 +880,6 @@ ListFonts(ClientPtr client, unsigned char *pattern, unsigned length, c->current.list_started = FALSE; c->current.private = 0; c->haveSaved = FALSE; - c->slept = FALSE; c->savedName = 0; doListFontsAndAliases(client, c); return Success; @@ -929,11 +926,11 @@ doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c) c->current.max_names, &c->current.private); if (err == Suspended) { - if (!c->slept) - { - ClientSleep(client, (ClientSleepProcPtr)doListFontsWithInfo, c); - c->slept = TRUE; - } + if (!ClientIsAsleep(client)) + ClientSleep(client, + (ClientSleepProcPtr)doListFontsWithInfo, c); + else + goto xinerama_sleep; return TRUE; } if (err == Successful) @@ -948,13 +945,11 @@ doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c) &numFonts, c->current.private); if (err == Suspended) { - if (!c->slept) - { + if (!ClientIsAsleep(client)) ClientSleep(client, - (ClientSleepProcPtr)doListFontsWithInfo, - c); - c->slept = TRUE; - } + (ClientSleepProcPtr)doListFontsWithInfo, c); + else + goto xinerama_sleep; return TRUE; } } @@ -994,9 +989,8 @@ doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c) c->saved = c->current; c->haveSaved = TRUE; c->savedNumFonts = numFonts; - if (c->savedName) - xfree(c->savedName); - c->savedName = xalloc(namelen + 1); + free(c->savedName); + c->savedName = malloc(namelen + 1); if (c->savedName) memmove(c->savedName, name, namelen + 1); aliascount = 20; @@ -1039,7 +1033,7 @@ doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c) reply = c->reply; if (c->length < length) { - reply = (xListFontsWithInfoReply *) xrealloc(c->reply, length); + reply = (xListFontsWithInfoReply *) realloc(c->reply, length); if (!reply) { err = AllocError; @@ -1085,29 +1079,29 @@ doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c) (void) WriteToClient(client, namelen, name); if (pFontInfo == &fontInfo) { - xfree(fontInfo.props); - xfree(fontInfo.isStringProp); + free(fontInfo.props); + free(fontInfo.isStringProp); } --c->current.max_names; } } finish: length = sizeof(xListFontsWithInfoReply); - bzero((char *) &finalReply, sizeof(xListFontsWithInfoReply)); + memset((char *) &finalReply, 0, sizeof(xListFontsWithInfoReply)); finalReply.type = X_Reply; finalReply.sequenceNumber = client->sequence; finalReply.length = bytes_to_int32(sizeof(xListFontsWithInfoReply) - sizeof(xGenericReply)); WriteSwappedDataToClient(client, length, &finalReply); bail: - if (c->slept) - ClientWakeup(client); + ClientWakeup(client); +xinerama_sleep: for (i = 0; i < c->num_fpes; i++) FreeFPE(c->fpe_list[i]); - xfree(c->reply); - xfree(c->fpe_list); - if (c->savedName) xfree(c->savedName); - xfree(c); + free(c->reply); + free(c->fpe_list); + free(c->savedName); + free(c); return TRUE; } @@ -1131,12 +1125,12 @@ StartListFontsWithInfo(ClientPtr client, int length, unsigned char *pattern, if (i != Success) return i; - if (!(c = xalloc(sizeof *c))) + if (!(c = malloc(sizeof *c))) goto badAlloc; - c->fpe_list = xalloc(sizeof(FontPathElementPtr) * num_fpes); + c->fpe_list = malloc(sizeof(FontPathElementPtr) * num_fpes); if (!c->fpe_list) { - xfree(c); + free(c); goto badAlloc; } memmove(c->current.pattern, pattern, length); @@ -1156,7 +1150,6 @@ StartListFontsWithInfo(ClientPtr client, int length, unsigned char *pattern, c->current.private = 0; c->savedNumFonts = 0; c->haveSaved = FALSE; - c->slept = FALSE; c->savedName = 0; doListFontsWithInfo(client, c); return Success; @@ -1166,14 +1159,13 @@ badAlloc: #define TextEltHeader 2 #define FontShiftSize 5 -static XID clearGC[] = { CT_NONE }; +static ChangeGCVal clearGC[] = { { .ptr = NullPixmap } }; #define clearGCmask (GCClipMask) int doPolyText(ClientPtr client, PTclosurePtr c) { FontPtr pFont = c->pGC->font, oldpFont; - Font fid, oldfid; int err = Success, lgerr; /* err is in X error, not font error, space */ enum { NEVER_SLEPT, START_SLEEP, SLEEPING } client_state = NEVER_SLEPT; FontPathElementPtr fpe; @@ -1184,7 +1176,7 @@ doPolyText(ClientPtr client, PTclosurePtr c) fpe = c->pGC->font->fpe; (*fpe_functions[fpe->type].client_died) ((pointer) client, fpe); - if (c->slept) + if (ClientIsAsleep(client)) { /* Client has died, but we cannot bail out right now. We need to clean up after the work we did when going to @@ -1201,7 +1193,7 @@ doPolyText(ClientPtr client, PTclosurePtr c) } /* Make sure our drawable hasn't disappeared while we slept. */ - if (c->slept && c->pDraw) + if (ClientIsAsleep(client) && c->pDraw) { DrawablePtr pDraw; dixLookupDrawable(&pDraw, c->did, client, 0, DixWriteAccess); @@ -1215,12 +1207,13 @@ doPolyText(ClientPtr client, PTclosurePtr c) } } - client_state = c->slept ? SLEEPING : NEVER_SLEPT; + client_state = ClientIsAsleep(client) ? SLEEPING : NEVER_SLEPT; while (c->endReq - c->pElt > TextEltHeader) { if (*c->pElt == FontChange) { + Font fid; if (c->endReq - c->pElt < FontShiftSize) { err = BadLength; @@ -1228,20 +1221,17 @@ doPolyText(ClientPtr client, PTclosurePtr c) } oldpFont = pFont; - oldfid = fid; fid = ((Font)*(c->pElt+4)) /* big-endian */ | ((Font)*(c->pElt+3)) << 8 | ((Font)*(c->pElt+2)) << 16 | ((Font)*(c->pElt+1)) << 24; err = dixLookupResourceByType((pointer *)&pFont, fid, RT_FONT, - client, DixReadAccess); + client, DixUseAccess); if (err != Success) { - err = (err == BadValue) ? BadFont : err; - /* restore pFont and fid for step 4 (described below) */ + /* restore pFont for step 4 (described below) */ pFont = oldpFont; - fid = oldfid; /* If we're in START_SLEEP mode, the following step shortens the request... in the unlikely event that @@ -1261,7 +1251,9 @@ doPolyText(ClientPtr client, PTclosurePtr c) { if (pFont != c->pGC->font && c->pDraw) { - ChangeGC( c->pGC, GCFont, &fid); + ChangeGCVal val; + val.ptr = pFont; + ChangeGC(NullClient, c->pGC, GCFont, &val); ValidateGC(c->pDraw, c->pGC); if (c->reqType == X_PolyText8) c->polyText = (PolyTextPtr) c->pGC->ops->PolyText8; @@ -1298,7 +1290,7 @@ doPolyText(ClientPtr client, PTclosurePtr c) if (lgerr == Suspended) { - if (!c->slept) { + if (!ClientIsAsleep(client)) { int len; GC *pGC; PTclosurePtr new_closure; @@ -1320,7 +1312,7 @@ doPolyText(ClientPtr client, PTclosurePtr c) /* Step 1 */ /* Allocate a malloc'd closure structure to replace the local one we were passed */ - new_closure = xalloc(sizeof(PTclosureRec)); + new_closure = malloc(sizeof(PTclosureRec)); if (!new_closure) { err = BadAlloc; @@ -1330,10 +1322,10 @@ doPolyText(ClientPtr client, PTclosurePtr c) c = new_closure; len = c->endReq - c->pElt; - c->data = xalloc(len); + c->data = malloc(len); if (!c->data) { - xfree(c); + free(c); err = BadAlloc; goto bail; } @@ -1346,8 +1338,8 @@ doPolyText(ClientPtr client, PTclosurePtr c) pGC = GetScratchGC(c->pGC->depth, c->pGC->pScreen); if (!pGC) { - xfree(c->data); - xfree(c); + free(c->data); + free(c); err = BadAlloc; goto bail; } @@ -1362,8 +1354,8 @@ doPolyText(ClientPtr client, PTclosurePtr c) Success) { FreeScratchGC(pGC); - xfree(c->data); - xfree(c); + free(c->data); + free(c); err = BadAlloc; goto bail; } @@ -1371,15 +1363,14 @@ doPolyText(ClientPtr client, PTclosurePtr c) c->pGC = pGC; ValidateGC(c->pDraw, c->pGC); - c->slept = TRUE; - ClientSleep(client, - (ClientSleepProcPtr)doPolyText, - (pointer) c); + ClientSleep(client, (ClientSleepProcPtr)doPolyText, c); /* Set up to perform steps 3 and 4 */ client_state = START_SLEEP; continue; /* on to steps 3 and 4 */ } + else + goto xinerama_sleep; return TRUE; } else if (lgerr != Successful) @@ -1404,7 +1395,9 @@ bail: /* Step 4 */ if (pFont != origGC->font) { - ChangeGC(origGC, GCFont, &fid); + ChangeGCVal val; + val.ptr = pFont; + ChangeGC(NullClient, origGC, GCFont, &val); ValidateGC(c->pDraw, origGC); } @@ -1420,18 +1413,19 @@ bail: #endif SendErrorToClient(c->client, c->reqType, 0, 0, err); } - if (c->slept) + if (ClientIsAsleep(client)) { ClientWakeup(c->client); - ChangeGC(c->pGC, clearGCmask, clearGC); +xinerama_sleep: + ChangeGC(NullClient, c->pGC, clearGCmask, clearGC); /* Unreference the font from the scratch GC */ CloseFont(c->pGC->font, (Font)0); c->pGC->font = NullFont; FreeScratchGC(c->pGC); - xfree(c->data); - xfree(c); + free(c->data); + free(c); } return TRUE; } @@ -1461,7 +1455,6 @@ PolyText(ClientPtr client, DrawablePtr pDraw, GC *pGC, unsigned char *pElt, local_closure.pGC = pGC; local_closure.did = did; local_closure.err = Success; - local_closure.slept = FALSE; (void) doPolyText(client, &local_closure); return Success; @@ -1486,7 +1479,7 @@ doImageText(ClientPtr client, ITclosurePtr c) } /* Make sure our drawable hasn't disappeared while we slept. */ - if (c->slept && c->pDraw) + if (ClientIsAsleep(client) && c->pDraw) { DrawablePtr pDraw; dixLookupDrawable(&pDraw, c->did, client, 0, DixWriteAccess); @@ -1503,7 +1496,7 @@ doImageText(ClientPtr client, ITclosurePtr c) lgerr = LoadGlyphs(client, c->pGC->font, c->nChars, c->itemSize, c->data); if (lgerr == Suspended) { - if (!c->slept) { + if (!ClientIsAsleep(client)) { GC *pGC; unsigned char *data; ITclosurePtr new_closure; @@ -1513,7 +1506,7 @@ doImageText(ClientPtr client, ITclosurePtr c) in doPolyText, but much simpler because the request structure is much simpler. */ - new_closure = xalloc(sizeof(ITclosureRec)); + new_closure = malloc(sizeof(ITclosureRec)); if (!new_closure) { err = BadAlloc; @@ -1522,10 +1515,10 @@ doImageText(ClientPtr client, ITclosurePtr c) *new_closure = *c; c = new_closure; - data = xalloc(c->nChars * c->itemSize); + data = malloc(c->nChars * c->itemSize); if (!data) { - xfree(c); + free(c); err = BadAlloc; goto bail; } @@ -1535,8 +1528,8 @@ doImageText(ClientPtr client, ITclosurePtr c) pGC = GetScratchGC(c->pGC->depth, c->pGC->pScreen); if (!pGC) { - xfree(c->data); - xfree(c); + free(c->data); + free(c); err = BadAlloc; goto bail; } @@ -1548,17 +1541,18 @@ doImageText(ClientPtr client, ITclosurePtr c) GCClipYOrigin | GCClipMask)) != Success) { FreeScratchGC(pGC); - xfree(c->data); - xfree(c); + free(c->data); + free(c); err = BadAlloc; goto bail; } c->pGC = pGC; ValidateGC(c->pDraw, c->pGC); - c->slept = TRUE; - ClientSleep(client, (ClientSleepProcPtr)doImageText, (pointer) c); + ClientSleep(client, (ClientSleepProcPtr)doImageText, c); } + else + goto xinerama_sleep; return TRUE; } else if (lgerr != Successful) @@ -1577,18 +1571,19 @@ bail: if (err != Success && c->client != serverClient) { SendErrorToClient(c->client, c->reqType, 0, 0, err); } - if (c->slept) + if (ClientIsAsleep(client)) { ClientWakeup(c->client); - ChangeGC(c->pGC, clearGCmask, clearGC); +xinerama_sleep: + ChangeGC(NullClient, c->pGC, clearGCmask, clearGC); /* Unreference the font from the scratch GC */ CloseFont(c->pGC->font, (Font)0); c->pGC->font = NullFont; FreeScratchGC(c->pGC); - xfree(c->data); - xfree(c); + free(c->data); + free(c); } return TRUE; } @@ -1617,7 +1612,6 @@ ImageText(ClientPtr client, DrawablePtr pDraw, GC *pGC, int nChars, local_closure.itemSize = 2; } local_closure.did = did; - local_closure.slept = FALSE; (void) doImageText(client, &local_closure); return Success; @@ -1659,7 +1653,7 @@ FreeFontPath(FontPathElementPtr *list, int n, Bool force) } FreeFPE(list[i]); } - xfree(list); + free(list); } static FontPathElementPtr @@ -1686,7 +1680,7 @@ SetFontPathElements(int npaths, unsigned char *paths, int *bad, Bool persist) unsigned char *cp = paths; FontPathElementPtr fpe = NULL, *fplist; - fplist = xalloc(sizeof(FontPathElementPtr) * npaths); + fplist = malloc(sizeof(FontPathElementPtr) * npaths); if (!fplist) { *bad = 0; return BadAlloc; @@ -1727,16 +1721,16 @@ SetFontPathElements(int npaths, unsigned char *paths, int *bad, Bool persist) /* if error or can't do it, act like it's a new one */ if (!fpe) { - fpe = xalloc(sizeof(FontPathElementRec)); + fpe = malloc(sizeof(FontPathElementRec)); if (!fpe) { err = BadAlloc; goto bail; } - fpe->name = xalloc(len + 1); + fpe->name = malloc(len + 1); if (!fpe->name) { - xfree(fpe); + free(fpe); err = BadAlloc; goto bail; } @@ -1757,8 +1751,8 @@ SetFontPathElements(int npaths, unsigned char *paths, int *bad, Bool persist) ErrorF("[dix] Could not init font path element %s, removing from list!\n", fpe->name); } - xfree (fpe->name); - xfree (fpe); + free(fpe->name); + free(fpe); } } } @@ -1785,13 +1779,12 @@ bail: *bad = i; while (--valid_paths >= 0) FreeFPE(fplist[valid_paths]); - xfree(fplist); + free(fplist); return FontToXError(err); } -/* XXX -- do we need to pass error down to each renderer? */ int -SetFontPath(ClientPtr client, int npaths, unsigned char *paths, int *error) +SetFontPath(ClientPtr client, int npaths, unsigned char *paths) { int err = XaceHook(XACE_SERVER_ACCESS, client, DixManageAccess); if (err != Success) @@ -1801,7 +1794,9 @@ SetFontPath(ClientPtr client, int npaths, unsigned char *paths, int *error) if (SetDefaultFontPath(defaultFontPath) != Success) return BadValue; } else { - err = SetFontPathElements(npaths, paths, error, FALSE); + int bad; + err = SetFontPathElements(npaths, paths, &bad, FALSE); + client->errorValue = bad; } return err; } @@ -1836,14 +1831,14 @@ SetDefaultFontPath(char *path) if (!start) { temp_path = Xprintf("%s%sbuilt-ins", path, *path ? "," : ""); } else { - temp_path = Xstrdup(path); + temp_path = strdup(path); } if (!temp_path) return BadAlloc; /* get enough for string, plus values -- use up commas */ len = strlen(temp_path) + 1; - nump = cp = newpath = xalloc(len); + nump = cp = newpath = malloc(len); if (!newpath) return BadAlloc; pp = (unsigned char *) temp_path; @@ -1864,8 +1859,8 @@ SetDefaultFontPath(char *path) err = SetFontPathElements(num, newpath, &bad, TRUE); - xfree(newpath); - xfree(temp_path); + free(newpath); + free(temp_path); return err; } @@ -1887,7 +1882,7 @@ GetFontPath(ClientPtr client, int *count, int *length, unsigned char **result) fpe = font_path_elements[i]; len += fpe->name_length + 1; } - font_path_string = (unsigned char *) xrealloc(font_path_string, len); + font_path_string = (unsigned char *) realloc(font_path_string, len); if (!font_path_string) return BadAlloc; @@ -1924,9 +1919,7 @@ InitFonts (void) { patternCache = MakeFontPatternCache(); - BuiltinRegisterFpeFunctions(); - FontFileRegisterFpeFunctions(); - fs_register_fpe_functions(); + register_fpe_functions(); } int @@ -1988,7 +1981,7 @@ RegisterFPEFunctions(NameCheckFunc name_func, FPEFunctions *new; /* grow the list */ - new = (FPEFunctions *) xrealloc(fpe_functions, + new = (FPEFunctions *) realloc(fpe_functions, (num_fpe_types + 1) * sizeof(FPEFunctions)); if (!new) return -1; @@ -2027,7 +2020,7 @@ FreeFonts(void) FreeFontPath(font_path_elements, num_fpes, TRUE); font_path_elements = 0; num_fpes = 0; - xfree(fpe_functions); + free(fpe_functions); num_fpe_types = 0; fpe_functions = (FPEFunctions *) 0; } diff --git a/xserver/dix/dixutils.c b/xserver/dix/dixutils.c index 8278d444b..470bb5dd7 100644 --- a/xserver/dix/dixutils.c +++ b/xserver/dix/dixutils.c @@ -92,6 +92,7 @@ Author: Adobe Systems Incorporated #include "windowstr.h" #include "dixstruct.h" #include "pixmapstr.h" +#include "gcstruct.h" #include "scrnintstr.h" #define XK_LATIN1 #include @@ -229,10 +230,25 @@ dixLookupWindow(WindowPtr *pWin, XID id, ClientPtr client, Mask access) int dixLookupGC(GCPtr *pGC, XID id, ClientPtr client, Mask access) +{ + return dixLookupResourceByType((pointer *)pGC, id, RT_GC, client, access); +} + +int +dixLookupFontable(FontPtr *pFont, XID id, ClientPtr client, Mask access) { int rc; - rc = dixLookupResourceByType((pointer *)pGC, id, RT_GC, client, access); - return (rc == BadValue) ? BadGC : rc; + GC *pGC; + client->errorValue = id; /* EITHER font or gc */ + rc = dixLookupResourceByType((pointer *) pFont, id, RT_FONT, client, access); + if (rc != BadFont) + return rc; + rc = dixLookupResourceByType((pointer *) &pGC, id, RT_GC, client, access); + if (rc == BadGC) + return BadFont; + if (rc == Success) + *pFont = pGC->font; + return rc; } int @@ -280,17 +296,17 @@ AlterSaveSetForClient(ClientPtr client, WindowPtr pWin, unsigned mode, if (mode == SetModeInsert) { if (j < numnow) /* duplicate */ - return(Success); + return Success; numnow++; - pTmp = (SaveSetElt *)xrealloc(client->saveSet, sizeof(*pTmp) * numnow); + pTmp = (SaveSetElt *)realloc(client->saveSet, sizeof(*pTmp) * numnow); if (!pTmp) - return(BadAlloc); + return BadAlloc; client->saveSet = pTmp; client->numSaved = numnow; SaveSetAssignWindow(client->saveSet[numnow - 1], pWin); SaveSetAssignToRoot(client->saveSet[numnow - 1], toRoot); SaveSetAssignMap(client->saveSet[numnow - 1], map); - return(Success); + return Success; } else if ((mode == SetModeDelete) && (j < numnow)) { @@ -302,19 +318,19 @@ AlterSaveSetForClient(ClientPtr client, WindowPtr pWin, unsigned mode, numnow--; if (numnow) { - pTmp = (SaveSetElt *)xrealloc(client->saveSet, sizeof(*pTmp) * numnow); + pTmp = (SaveSetElt *)realloc(client->saveSet, sizeof(*pTmp) * numnow); if (pTmp) client->saveSet = pTmp; } else { - xfree(client->saveSet); + free(client->saveSet); client->saveSet = (SaveSetElt *)NULL; } client->numSaved = numnow; - return(Success); + return Success; } - return(Success); + return Success; } void @@ -435,7 +451,7 @@ RegisterBlockAndWakeupHandlers (BlockHandlerProcPtr blockHandler, if (numHandlers >= sizeHandlers) { - new = (BlockHandlerPtr) xrealloc (handlers, (numHandlers + 1) * + new = (BlockHandlerPtr) realloc(handlers, (numHandlers + 1) * sizeof (BlockHandlerRec)); if (!new) return FALSE; @@ -480,7 +496,7 @@ RemoveBlockAndWakeupHandlers (BlockHandlerProcPtr blockHandler, void InitBlockAndWakeupHandlers (void) { - xfree (handlers); + free(handlers); handlers = (BlockHandlerPtr) 0; numHandlers = 0; sizeHandlers = 0; @@ -512,7 +528,7 @@ ProcessWorkQueue(void) { /* remove q from the list */ *p = q->next; /* don't fetch until after func called */ - xfree (q); + free(q); } else { @@ -535,7 +551,7 @@ ProcessWorkQueueZombies(void) (void) (*q->function) (q->client, q->closure); /* remove q from the list */ *p = q->next; /* don't fetch until after func called */ - xfree (q); + free(q); } else { @@ -552,7 +568,7 @@ QueueWorkProc ( { WorkQueuePtr q; - q = xalloc (sizeof *q); + q = malloc(sizeof *q); if (!q) return FALSE; q->function = function; @@ -586,7 +602,7 @@ ClientSleep (ClientPtr client, ClientSleepProcPtr function, pointer closure) { SleepQueuePtr q; - q = xalloc (sizeof *q); + q = malloc(sizeof *q); if (!q) return FALSE; @@ -623,7 +639,7 @@ ClientWakeup (ClientPtr client) if (q->client == client) { *prev = q->next; - xfree (q); + free(q); if (client->clientGone) /* Oops -- new zombie cleanup code ensures this only * happens from inside CloseDownClient; don't want to @@ -666,7 +682,7 @@ _AddCallback( { CallbackPtr cbr; - cbr = xalloc(sizeof(CallbackRec)); + cbr = malloc(sizeof(CallbackRec)); if (!cbr) return FALSE; cbr->proc = callback; @@ -706,7 +722,7 @@ _DeleteCallback( cbl->list = cbr->next; else pcbr->next = cbr->next; - xfree(cbr); + free(cbr); } return TRUE; } @@ -751,12 +767,12 @@ _CallCallbacks( if (pcbr) { cbr = cbr->next; - xfree(pcbr->next); + free(pcbr->next); pcbr->next = cbr; } else { cbr = cbr->next; - xfree(cbl->list); + free(cbl->list); cbl->list = cbr; } cbl->numDeleted--; @@ -796,9 +812,9 @@ _DeleteCallbackList( for (cbr = cbl->list; cbr != NULL; cbr = nextcbr) { nextcbr = cbr->next; - xfree(cbr); + free(cbr); } - xfree(cbl); + free(cbl); *pcbl = NULL; } @@ -809,7 +825,7 @@ CreateCallbackList(CallbackListPtr *pcbl) int i; if (!pcbl) return FALSE; - cbl = xalloc(sizeof(CallbackListRec)); + cbl = malloc(sizeof(CallbackListRec)); if (!cbl) return FALSE; cbl->inCallback = 0; cbl->deleted = FALSE; @@ -877,7 +893,7 @@ InitCallbackManager(void) { DeleteCallbackList(listsToCleanup[i]); } - if (listsToCleanup) xfree(listsToCleanup); + free(listsToCleanup); numCallbackListsToCleanup = 0; listsToCleanup = NULL; diff --git a/xserver/dix/enterleave.c b/xserver/dix/enterleave.c index c08cc3100..7a3ecf5b0 100644 --- a/xserver/dix/enterleave.c +++ b/xserver/dix/enterleave.c @@ -78,10 +78,19 @@ static WindowPtr FocusWindows[MAXDEVICES]; * window. */ static BOOL -HasPointer(WindowPtr win) +HasPointer(DeviceIntPtr dev, WindowPtr win) { int i; + /* FIXME: The enter/leave model does not cater for grabbed devices. For + * now, a quickfix: if the device about to send an enter/leave event to + * a window is grabbed, assume there is no pointer in that window. + * Fixes fdo 27804. + * There isn't enough beer in my fridge to fix this properly. + */ + if (dev->deviceGrab.grab) + return FALSE; + for (i = 0; i < MAXDEVICES; i++) if (PointerWindows[i] == win) return TRUE; @@ -270,7 +279,7 @@ CoreEnterNotifies(DeviceIntPtr dev, may need to be changed from Virtual to NonlinearVirtual depending on the previous P(W). */ - if (!HasPointer(parent) && !FirstPointerChild(parent)) + if (!HasPointer(dev, parent) && !FirstPointerChild(parent)) CoreEnterLeaveEvent(dev, EnterNotify, mode, detail, parent, child->drawable.id); } @@ -309,7 +318,7 @@ CoreLeaveNotifies(DeviceIntPtr dev, /* If one window has a pointer or a child with a pointer, skip some * work and exit. */ - if (HasPointer(win) || FirstPointerChild(win)) + if (HasPointer(dev, win) || FirstPointerChild(win)) return; CoreEnterLeaveEvent(dev, LeaveNotify, mode, detail, win, child->drawable.id); @@ -373,7 +382,7 @@ CoreEnterLeaveNonLinear(DeviceIntPtr dev, vice versa depending on the the new P(W) */ - if (!HasPointer(A)) + if (!HasPointer(dev, A)) { WindowPtr child = FirstPointerChild(A); if (child) @@ -417,7 +426,7 @@ CoreEnterLeaveNonLinear(DeviceIntPtr dev, The detail may need to be changed from Ancestor to Nonlinear or vice-versa depending on the previous P(W). */ - if (!HasPointer(B)) + if (!HasPointer(dev, B)) { WindowPtr child = FirstPointerChild(B); if (child) @@ -455,7 +464,7 @@ CoreEnterLeaveToAncestor(DeviceIntPtr dev, The detail may need to be changed from Ancestor to Nonlinear or vice versa depending on the the new P(W) */ - if (!HasPointer(A)) + if (!HasPointer(dev, A)) { WindowPtr child = FirstPointerChild(A); if (child) @@ -479,7 +488,7 @@ CoreEnterLeaveToAncestor(DeviceIntPtr dev, P(W) changes from a descendant to W itself. The subwindow field should be set to the child containing the old P(W) <<< WRONG */ - if (!HasPointer(B)) + if (!HasPointer(dev, B)) CoreEnterLeaveEvent(dev, EnterNotify, mode, NotifyInferior, B, None); } @@ -507,7 +516,7 @@ CoreEnterLeaveToDescendant(DeviceIntPtr dev, P(W) changes from W to a descendant of W. The subwindow field is set to the child containing the new P(W) <<< THIS IS WRONG */ - if (!HasPointer(A)) + if (!HasPointer(dev, A)) CoreEnterLeaveEvent(dev, LeaveNotify, mode, NotifyInferior, A, None); @@ -531,7 +540,7 @@ CoreEnterLeaveToDescendant(DeviceIntPtr dev, The detail may need to be changed from Ancestor to Nonlinear or vice-versa depending on the previous P(W). */ - if (!HasPointer(B)) + if (!HasPointer(dev, B)) { WindowPtr child = FirstPointerChild(B); if (child) @@ -1077,7 +1086,7 @@ CoreFocusPointerRootNoneSwitch(DeviceIntPtr dev, for (i = 0; i < nscreens; i++) { - root = WindowTable[i]; + root = screenInfo.screens[i]->root; if (!HasOtherPointer(root, GetPairedDevice(dev)) && !FirstFocusChild(root)) { /* If pointer was on PointerRootWin and changes to NoneWin, and @@ -1138,7 +1147,7 @@ CoreFocusToPointerRootOrNone(DeviceIntPtr dev, for (i = 0; i < nscreens; i++) { - root = WindowTable[i]; + root = screenInfo.screens[i]->root; if (!HasFocus(root) && !FirstFocusChild(root)) { CoreFocusEvent(dev, FocusIn, mode, B ? NotifyPointerRoot : NotifyDetailNone, root); @@ -1169,7 +1178,7 @@ CoreFocusFromPointerRootOrNone(DeviceIntPtr dev, for (i = 0; i < nscreens; i++) { - root = WindowTable[i]; + root = screenInfo.screens[i]->root; if (!HasFocus(root) && !FirstFocusChild(root)) { /* If pointer was on PointerRootWin and changes to NoneWin, and @@ -1279,7 +1288,7 @@ DeviceFocusEvents(DeviceIntPtr dev, NotifyPointer); /* Notify all the roots */ for (i = 0; i < nscreens; i++) - DeviceFocusEvent(dev, XI_FocusOut, mode, out, WindowTable[i]); + DeviceFocusEvent(dev, XI_FocusOut, mode, out, screenInfo.screens[i]->root); } else { @@ -1293,7 +1302,7 @@ DeviceFocusEvents(DeviceIntPtr dev, } /* Notify all the roots */ for (i = 0; i < nscreens; i++) - DeviceFocusEvent(dev, XI_FocusIn, mode, in, WindowTable[i]); + DeviceFocusEvent(dev, XI_FocusIn, mode, in, screenInfo.screens[i]->root); if (to == PointerRootWin) DeviceFocusInEvents(dev, RootWindow(dev), sprite->win, mode, NotifyPointer); } @@ -1305,7 +1314,7 @@ DeviceFocusEvents(DeviceIntPtr dev, DeviceFocusOutEvents(dev, sprite->win, RootWindow(dev), mode, NotifyPointer); for (i = 0; i < nscreens; i++) - DeviceFocusEvent(dev, XI_FocusOut, mode, out, WindowTable[i]); + DeviceFocusEvent(dev, XI_FocusOut, mode, out, screenInfo.screens[i]->root); if (to->parent != NullWindow) DeviceFocusInEvents(dev, RootWindow(dev), to, mode, NotifyNonlinearVirtual); DeviceFocusEvent(dev, XI_FocusIn, mode, NotifyNonlinear, to); diff --git a/xserver/dix/eventconvert.c b/xserver/dix/eventconvert.c index 878dba576..4e3de0b46 100644 --- a/xserver/dix/eventconvert.c +++ b/xserver/dix/eventconvert.c @@ -254,7 +254,7 @@ eventToKeyButtonPointer(DeviceEvent *ev, xEvent **xi, int *count) num_events = (countValuators(ev, &first) + 5)/6; /* valuator ev */ num_events++; /* the actual event event */ - *xi = xcalloc(num_events, sizeof(xEvent)); + *xi = calloc(num_events, sizeof(xEvent)); if (!(*xi)) { return BadAlloc; @@ -462,7 +462,7 @@ eventToDeviceChanged(DeviceChangedEvent *dce, xEvent **xi) len += sizeof(CARD32) * nkeys; /* keycodes */ } - dcce = xcalloc(1, len); + dcce = calloc(1, len); if (!dcce) { ErrorF("[Xi] BadAlloc in SendDeviceChangedEvent.\n"); @@ -545,7 +545,7 @@ eventToDeviceEvent(DeviceEvent *ev, xEvent **xi) vallen = bytes_to_int32(bits_to_bytes(MAX_VALUATORS)); len += vallen * 4; /* valuators mask */ - *xi = xcalloc(1, len); + *xi = calloc(1, len); xde = (xXIDeviceEvent*)*xi; xde->type = GenericEvent; xde->extension = IReqCode; @@ -612,7 +612,7 @@ eventToRawEvent(RawDeviceEvent *ev, xEvent **xi) vallen = bytes_to_int32(bits_to_bytes(MAX_VALUATORS)); len += vallen * 4; /* valuators mask */ - *xi = xcalloc(1, len); + *xi = calloc(1, len); raw = (xXIRawEvent*)*xi; raw->type = GenericEvent; raw->extension = IReqCode; diff --git a/xserver/dix/events.c b/xserver/dix/events.c index 80c29cc00..07f7b1f6b 100644 --- a/xserver/dix/events.c +++ b/xserver/dix/events.c @@ -331,7 +331,7 @@ IsKeyboardDevice(DeviceIntPtr dev) Bool IsMaster(DeviceIntPtr dev) { - return (dev->type == MASTER_POINTER || dev->type == MASTER_KEYBOARD); + return dev->type == MASTER_POINTER || dev->type == MASTER_KEYBOARD; } static WindowPtr XYToWindow( @@ -485,6 +485,13 @@ SyntheticMotion(DeviceIntPtr dev, int x, int y) { #ifdef PANORAMIX static void PostNewCursor(DeviceIntPtr pDev); +static Bool +pointOnScreen(ScreenPtr pScreen, int x, int y) +{ + return x >= pScreen->x && x < pScreen->x + pScreen->width && + y >= pScreen->y && y < pScreen->y + pScreen->height; +} + static Bool XineramaSetCursorPosition( DeviceIntPtr pDev, @@ -493,7 +500,6 @@ XineramaSetCursorPosition( Bool generateEvent ){ ScreenPtr pScreen; - BoxRec box; int i; SpritePtr pSprite = pDev->spriteInfo->sprite; @@ -502,17 +508,16 @@ XineramaSetCursorPosition( that screen are. */ pScreen = pSprite->screen; - x += panoramiXdataPtr[0].x; - y += panoramiXdataPtr[0].y; + x += screenInfo.screens[0]->x; + y += screenInfo.screens[0]->y; - if(!POINT_IN_REGION(pScreen, &XineramaScreenRegions[pScreen->myNum], - x, y, &box)) + if(!pointOnScreen(pScreen, x, y)) { FOR_NSCREENS(i) { if(i == pScreen->myNum) continue; - if(POINT_IN_REGION(pScreen, &XineramaScreenRegions[i], x, y, &box)) + if(pointOnScreen(screenInfo.screens[i], x, y)) { pScreen = screenInfo.screens[i]; break; @@ -521,10 +526,10 @@ XineramaSetCursorPosition( } pSprite->screen = pScreen; - pSprite->hotPhys.x = x - panoramiXdataPtr[0].x; - pSprite->hotPhys.y = y - panoramiXdataPtr[0].y; - x -= panoramiXdataPtr[pScreen->myNum].x; - y -= panoramiXdataPtr[pScreen->myNum].y; + pSprite->hotPhys.x = x - screenInfo.screens[0]->x; + pSprite->hotPhys.y = y - screenInfo.screens[0]->y; + x -= pScreen->x; + y -= pScreen->y; return (*pScreen->SetCursorPosition)(pDev, pScreen, x, y, generateEvent); } @@ -542,10 +547,10 @@ XineramaConstrainCursor(DeviceIntPtr pDev) /* Translate the constraining box to the screen the sprite is actually on */ - newBox.x1 += panoramiXdataPtr[0].x - panoramiXdataPtr[pScreen->myNum].x; - newBox.x2 += panoramiXdataPtr[0].x - panoramiXdataPtr[pScreen->myNum].x; - newBox.y1 += panoramiXdataPtr[0].y - panoramiXdataPtr[pScreen->myNum].y; - newBox.y2 += panoramiXdataPtr[0].y - panoramiXdataPtr[pScreen->myNum].y; + newBox.x1 += screenInfo.screens[0]->x - pScreen->x; + newBox.x2 += screenInfo.screens[0]->x - pScreen->x; + newBox.y1 += screenInfo.screens[0]->y - pScreen->y; + newBox.y2 += screenInfo.screens[0]->y - pScreen->y; (* pScreen->ConstrainCursor)(pDev, pScreen, &newBox); } @@ -556,9 +561,10 @@ XineramaSetWindowPntrs(DeviceIntPtr pDev, WindowPtr pWin) { SpritePtr pSprite = pDev->spriteInfo->sprite; - if(pWin == WindowTable[0]) { - memcpy(pSprite->windows, WindowTable, - PanoramiXNumScreens*sizeof(WindowPtr)); + if(pWin == screenInfo.screens[0]->root) { + int i; + for (i = 0; i < PanoramiXNumScreens; i++) + pSprite->windows[i] = screenInfo.screens[i]->root; } else { PanoramiXRes *win; int rc, i; @@ -592,34 +598,34 @@ XineramaConfineCursorToWindow(DeviceIntPtr pDev, i = PanoramiXNumScreens - 1; - REGION_COPY(pSprite->screen, &pSprite->Reg1, + RegionCopy(&pSprite->Reg1, &pSprite->windows[i]->borderSize); - off_x = panoramiXdataPtr[i].x; - off_y = panoramiXdataPtr[i].y; + off_x = screenInfo.screens[i]->x; + off_y = screenInfo.screens[i]->y; while(i--) { - x = off_x - panoramiXdataPtr[i].x; - y = off_y - panoramiXdataPtr[i].y; + x = off_x - screenInfo.screens[i]->x; + y = off_y - screenInfo.screens[i]->y; if(x || y) - REGION_TRANSLATE(pSprite->screen, &pSprite->Reg1, x, y); + RegionTranslate(&pSprite->Reg1, x, y); - REGION_UNION(pSprite->screen, &pSprite->Reg1, &pSprite->Reg1, + RegionUnion(&pSprite->Reg1, &pSprite->Reg1, &pSprite->windows[i]->borderSize); - off_x = panoramiXdataPtr[i].x; - off_y = panoramiXdataPtr[i].y; + off_x = screenInfo.screens[i]->x; + off_y = screenInfo.screens[i]->y; } - pSprite->hotLimits = *REGION_EXTENTS(pSprite->screen, &pSprite->Reg1); + pSprite->hotLimits = *RegionExtents(&pSprite->Reg1); - if(REGION_NUM_RECTS(&pSprite->Reg1) > 1) + if(RegionNumRects(&pSprite->Reg1) > 1) pSprite->hotShape = &pSprite->Reg1; else pSprite->hotShape = NullRegion; pSprite->confined = FALSE; - pSprite->confineWin = (pWin == WindowTable[0]) ? NullWindow : pWin; + pSprite->confineWin = (pWin == screenInfo.screens[0]->root) ? NullWindow : pWin; CheckPhysLimits(pDev, pSprite->current, generateEvents, FALSE, NULL); } @@ -665,9 +671,9 @@ ConfineToShape(DeviceIntPtr pDev, RegionPtr shape, int *px, int *py) SpritePtr pSprite; pSprite = pDev->spriteInfo->sprite; - if (POINT_IN_REGION(pSprite->hot.pScreen, shape, x, y, &box)) + if (RegionContainsPoint(shape, x, y, &box)) return; - box = *REGION_EXTENTS(pSprite->hot.pScreen, shape); + box = *RegionExtents(shape); /* this is rather crude */ do { x += incx; @@ -689,7 +695,7 @@ ConfineToShape(DeviceIntPtr pDev, RegionPtr shape, int *px, int *py) else if (y < box.y1) return; /* should never get here! */ } - } while (!POINT_IN_REGION(pSprite->hot.pScreen, shape, x, y, &box)); + } while (!RegionContainsPoint(shape, x, y, &box)); *px = x; *py = y; } @@ -811,23 +817,23 @@ CheckVirtualMotion( i = PanoramiXNumScreens - 1; - REGION_COPY(pSprite->screen, &pSprite->Reg2, + RegionCopy(&pSprite->Reg2, &pSprite->windows[i]->borderSize); - off_x = panoramiXdataPtr[i].x; - off_y = panoramiXdataPtr[i].y; + off_x = screenInfo.screens[i]->x; + off_y = screenInfo.screens[i]->y; while(i--) { - x = off_x - panoramiXdataPtr[i].x; - y = off_y - panoramiXdataPtr[i].y; + x = off_x - screenInfo.screens[i]->x; + y = off_y - screenInfo.screens[i]->y; if(x || y) - REGION_TRANSLATE(pSprite->screen, &pSprite->Reg2, x, y); + RegionTranslate(&pSprite->Reg2, x, y); - REGION_UNION(pSprite->screen, &pSprite->Reg2, &pSprite->Reg2, + RegionUnion(&pSprite->Reg2, &pSprite->Reg2, &pSprite->windows[i]->borderSize); - off_x = panoramiXdataPtr[i].x; - off_y = panoramiXdataPtr[i].y; + off_x = screenInfo.screens[i]->x; + off_y = screenInfo.screens[i]->y; } } else #endif @@ -839,7 +845,7 @@ CheckVirtualMotion( } } - lims = *REGION_EXTENTS(pWin->drawable.pScreen, &pWin->borderSize); + lims = *RegionExtents(&pWin->borderSize); if (pSprite->hot.x < lims.x1) pSprite->hot.x = lims.x1; else if (pSprite->hot.x >= lims.x2) @@ -852,7 +858,7 @@ CheckVirtualMotion( #ifdef PANORAMIX if (!noPanoramiXExtension) { - if (REGION_NUM_RECTS(&pSprite->Reg2) > 1) + if (RegionNumRects(&pSprite->Reg2) > 1) reg = &pSprite->Reg2; } else @@ -875,13 +881,12 @@ CheckVirtualMotion( #ifdef PANORAMIX if (noPanoramiXExtension) /* No typo. Only set the root win if disabled */ #endif - RootWindow(pDev) = WindowTable[pSprite->hot.pScreen->myNum]; + RootWindow(pDev) = pSprite->hot.pScreen->root; } static void ConfineCursorToWindow(DeviceIntPtr pDev, WindowPtr pWin, Bool generateEvents, Bool confineToScreen) { - ScreenPtr pScreen = pWin->drawable.pScreen; SpritePtr pSprite = pDev->spriteInfo->sprite; if (syncEvents.playingEvents) @@ -897,11 +902,11 @@ ConfineCursorToWindow(DeviceIntPtr pDev, WindowPtr pWin, Bool generateEvents, Bo return; } #endif - pSprite->hotLimits = *REGION_EXTENTS( pScreen, &pWin->borderSize); + pSprite->hotLimits = *RegionExtents(&pWin->borderSize); pSprite->hotShape = wBoundingShape(pWin) ? &pWin->borderSize : NullRegion; CheckPhysLimits(pDev, pSprite->current, generateEvents, - confineToScreen, pScreen); + confineToScreen, pWin->drawable.pScreen); } } @@ -1123,7 +1128,7 @@ EnqueueEvent(InternalEvent *ev, DeviceIntPtr device) * updated yet. */ if (ev->any.type == ET_Motion) - ev->device_event.root = WindowTable[pSprite->hotPhys.pScreen->myNum]->drawable.id; + ev->device_event.root = pSprite->hotPhys.pScreen->root->drawable.id; eventinfo.event = ev; eventinfo.device = device; @@ -1134,10 +1139,8 @@ EnqueueEvent(InternalEvent *ev, DeviceIntPtr device) { #ifdef PANORAMIX if(!noPanoramiXExtension) { - event->root_x += panoramiXdataPtr[pSprite->screen->myNum].x - - panoramiXdataPtr[0].x; - event->root_y += panoramiXdataPtr[pSprite->screen->myNum].y - - panoramiXdataPtr[0].y; + event->root_x += pSprite->screen->x - screenInfo.screens[0]->x; + event->root_y += pSprite->screen->y - screenInfo.screens[0]->y; } #endif pSprite->hotPhys.x = event->root_x; @@ -1159,7 +1162,7 @@ EnqueueEvent(InternalEvent *ev, DeviceIntPtr device) eventlen = event->length; - qe = xalloc(sizeof(QdEventRec) + eventlen); + qe = malloc(sizeof(QdEventRec) + eventlen); if (!qe) return; qe->next = (QdEventPtr)NULL; @@ -1217,10 +1220,10 @@ PlayReleasedEvents(void) case ET_KeyRelease: case ET_ProximityIn: case ET_ProximityOut: - ev->root_x += panoramiXdataPtr[0].x - - panoramiXdataPtr[pDev->spriteInfo->sprite->screen->myNum].x; - ev->root_y += panoramiXdataPtr[0].y - - panoramiXdataPtr[pDev->spriteInfo->sprite->screen->myNum].y; + ev->root_x += screenInfo.screens[0]->x - + pDev->spriteInfo->sprite->screen->x; + ev->root_y += screenInfo.screens[0]->y - + pDev->spriteInfo->sprite->screen->y; break; default: break; @@ -1229,7 +1232,7 @@ PlayReleasedEvents(void) } #endif (*qe->device->public.processInputProc)(qe->event, qe->device); - xfree(qe); + free(qe); for (dev = inputInfo.devices; dev && dev->deviceGrab.sync.frozen; dev = dev->next) ; if (!dev) @@ -1339,7 +1342,7 @@ playmore: } else ConfineCursorToWindow(dev, - WindowTable[dev->spriteInfo->sprite->hotPhys.pScreen->myNum], + dev->spriteInfo->sprite->hotPhys.pScreen->root, TRUE, FALSE); PostNewCursor(dev); } @@ -1369,7 +1372,7 @@ ScreenRestructured (ScreenPtr pScreen) } else ConfineCursorToWindow(pDev, - WindowTable[pDev->spriteInfo->sprite->hotPhys.pScreen->myNum], + pDev->spriteInfo->sprite->hotPhys.pScreen->root, TRUE, FALSE); } } @@ -1408,12 +1411,8 @@ CheckGrabForSyncs(DeviceIntPtr thisDev, Bool thisMode, Bool otherMode) ComputeFreezes(); } -/* Only ever used if a grab is called on an attached slave device. */ -static int GrabPrivateKeyIndex; -static DevPrivateKey GrabPrivateKey = &GrabPrivateKeyIndex; - /** - * Save the device's master device in the devPrivates. This needs to be done + * Save the device's master device id. This needs to be done * if a client directly grabs a slave device that is attached to a master. For * the duration of the grab, the device is detached, ungrabbing re-attaches it * though. @@ -1424,35 +1423,28 @@ static DevPrivateKey GrabPrivateKey = &GrabPrivateKeyIndex; static void DetachFromMaster(DeviceIntPtr dev) { - intptr_t id; if (!dev->u.master) return; - id = dev->u.master->id; + dev->saved_master_id = dev->u.master->id; - dixSetPrivate(&dev->devPrivates, GrabPrivateKey, (void *)id); AttachDevice(NULL, dev, NULL); } static void ReattachToOldMaster(DeviceIntPtr dev) { - int id; - void *p; DeviceIntPtr master = NULL; if (IsMaster(dev)) return; - - p = dixLookupPrivate(&dev->devPrivates, GrabPrivateKey); - id = (intptr_t) p; /* silence gcc warnings */ - dixLookupDevice(&master, id, serverClient, DixUseAccess); + dixLookupDevice(&master, dev->saved_master_id, serverClient, DixUseAccess); if (master) { AttachDevice(serverClient, dev, master); - dixSetPrivate(&dev->devPrivates, GrabPrivateKey, NULL); + dev->saved_master_id = 0; } } @@ -1852,7 +1844,6 @@ int TryClientEvents (ClientPtr client, DeviceIntPtr dev, xEvent *pEvents, int count, Mask mask, Mask filter, GrabPtr grab) { - int i; int type; #ifdef DEBUG_EVENTS @@ -1919,7 +1910,6 @@ TryClientEvents (ClientPtr client, DeviceIntPtr dev, xEvent *pEvents, { xEvent release = *pEvents; release.u.u.type = KeyRelease; - release.u.u.sequenceNumber = client->sequence; WriteEventsToClient(client, 1, &release); #ifdef DEBUG_EVENTS ErrorF(" (plus fake core release for repeat)"); @@ -1940,7 +1930,6 @@ TryClientEvents (ClientPtr client, DeviceIntPtr dev, xEvent *pEvents, { deviceKeyButtonPointer release = *(deviceKeyButtonPointer *)pEvents; release.type = DeviceKeyRelease; - release.sequenceNumber = client->sequence; #ifdef DEBUG_EVENTS ErrorF(" (plus fake xi1 release for repeat)"); #endif @@ -1954,14 +1943,6 @@ TryClientEvents (ClientPtr client, DeviceIntPtr dev, xEvent *pEvents, } } - type &= 0177; - if (type != KeymapNotify) - { - /* all extension events must have a sequence number */ - for (i = 0; i < count; i++) - pEvents[i].u.u.sequenceNumber = client->sequence; - } - if (BitIsOn(criticalEvents, type)) { if (client->smart_priority < SMART_MAX_PRIORITY) @@ -2446,7 +2427,7 @@ DeliverDeviceEvents(WindowPtr pWin, InternalEvent *event, GrabPtr grab, FixUpEventFromWindow(dev, xi2, pWin, child, FALSE); deliveries = DeliverEventsToWindow(dev, pWin, xi2, 1, filter, grab); - xfree(xi2); + free(xi2); if (deliveries > 0) goto unwind; } else if (rc != BadMatch) @@ -2503,7 +2484,7 @@ DeliverDeviceEvents(WindowPtr pWin, InternalEvent *event, GrabPtr grab, } unwind: - xfree(xE); + free(xE); return deliveries; } @@ -2569,22 +2550,21 @@ static Bool PointInBorderSize(WindowPtr pWin, int x, int y) { BoxRec box; - SpritePtr pSprite = inputInfo.pointer->spriteInfo->sprite; - if(POINT_IN_REGION(pWin->drawable.pScreen, &pWin->borderSize, x, y, &box)) + if(RegionContainsPoint(&pWin->borderSize, x, y, &box)) return TRUE; #ifdef PANORAMIX if(!noPanoramiXExtension && XineramaSetWindowPntrs(inputInfo.pointer, pWin)) { + SpritePtr pSprite = inputInfo.pointer->spriteInfo->sprite; int i; for(i = 1; i < PanoramiXNumScreens; i++) { - if(POINT_IN_REGION(pSprite->screen, - &pSprite->windows[i]->borderSize, - x + panoramiXdataPtr[0].x - panoramiXdataPtr[i].x, - y + panoramiXdataPtr[0].y - panoramiXdataPtr[i].y, - &box)) + if(RegionContainsPoint(&pSprite->windows[i]->borderSize, + x + screenInfo.screens[0]->x - screenInfo.screens[i]->x, + y + screenInfo.screens[0]->y - screenInfo.screens[i]->y, + &box)) return TRUE; } } @@ -2628,10 +2608,9 @@ XYToWindow(DeviceIntPtr pDev, int x, int y) */ && (!wBoundingShape(pWin) || PointInBorderSize(pWin, x, y)) && (!wInputShape(pWin) || - POINT_IN_REGION(pWin->drawable.pScreen, - wInputShape(pWin), - x - pWin->drawable.x, - y - pWin->drawable.y, &box)) + RegionContainsPoint(wInputShape(pWin), + x - pWin->drawable.x, + y - pWin->drawable.y, &box)) #ifdef ROOTLESS /* In rootless mode windows may be offscreen, even when * they're in X's stack. (E.g. if the native window system @@ -2644,7 +2623,7 @@ XYToWindow(DeviceIntPtr pDev, int x, int y) if (pSprite->spriteTraceGood >= pSprite->spriteTraceSize) { pSprite->spriteTraceSize += 10; - pSprite->spriteTrace = xrealloc(pSprite->spriteTrace, + pSprite->spriteTrace = realloc(pSprite->spriteTrace, pSprite->spriteTraceSize*sizeof(WindowPtr)); } pSprite->spriteTrace[pSprite->spriteTraceGood++] = pWin; @@ -2778,17 +2757,15 @@ CheckMotion(DeviceEvent *ev, DeviceIntPtr pDev) /* Motion events entering DIX get translated to Screen 0 coordinates. Replayed events have already been translated since they've entered DIX before */ - ev->root_x += panoramiXdataPtr[pSprite->screen->myNum].x - - panoramiXdataPtr[0].x; - ev->root_y += panoramiXdataPtr[pSprite->screen->myNum].y - - panoramiXdataPtr[0].y; + ev->root_x += pSprite->screen->x - screenInfo.screens[0]->x; + ev->root_y += pSprite->screen->y - screenInfo.screens[0]->y; } else #endif { if (pSprite->hot.pScreen != pSprite->hotPhys.pScreen) { pSprite->hot.pScreen = pSprite->hotPhys.pScreen; - RootWindow(pDev) = WindowTable[pSprite->hot.pScreen->myNum]; + RootWindow(pDev) = pSprite->hot.pScreen->root; } } @@ -2871,7 +2848,7 @@ WindowsRestructured(void) #ifdef PANORAMIX /* This was added to support reconfiguration under Xdmx. The problem is - * that if the 0th screen (i.e., WindowTable[0]) is moved to an origin + * that if the 0th screen (i.e., screenInfo.screens[0]) is moved to an origin * other than 0,0, the information in the private sprite structure must * be updated accordingly, or XYToWindow (and other routines) will not * compute correctly. */ @@ -2900,10 +2877,10 @@ void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff) pSprite->hotLimits.x2 -= xoff; pSprite->hotLimits.y2 -= yoff; - if (REGION_NOTEMPTY(pSprite->screen, &pSprite->Reg1)) - REGION_TRANSLATE(pSprite->screen, &pSprite->Reg1, xoff, yoff); - if (REGION_NOTEMPTY(pSprite->screen, &pSprite->Reg2)) - REGION_TRANSLATE(pSprite->screen, &pSprite->Reg2, xoff, yoff); + if (RegionNotEmpty(&pSprite->Reg1)) + RegionTranslate(&pSprite->Reg1, xoff, yoff); + if (RegionNotEmpty(&pSprite->Reg2)) + RegionTranslate(&pSprite->Reg2, xoff, yoff); /* FIXME: if we call ConfineCursorToWindow, must we do anything else? */ if ((grab = pDev->deviceGrab.grab) && grab->confineTo) { @@ -2914,7 +2891,7 @@ void ReinitializeRootWindow(WindowPtr win, int xoff, int yoff) } else ConfineCursorToWindow( pDev, - WindowTable[pSprite->hotPhys.pScreen->myNum], + pSprite->hotPhys.pScreen->root, TRUE, FALSE); } @@ -2949,7 +2926,7 @@ InitializeSprite(DeviceIntPtr pDev, WindowPtr pWin) { DeviceIntPtr it; - pDev->spriteInfo->sprite = (SpritePtr)xcalloc(1, sizeof(SpriteRec)); + pDev->spriteInfo->sprite = (SpritePtr)calloc(1, sizeof(SpriteRec)); if (!pDev->spriteInfo->sprite) FatalError("InitializeSprite: failed to allocate sprite struct"); @@ -2988,7 +2965,7 @@ InitializeSprite(DeviceIntPtr pDev, WindowPtr pWin) if (pWin) { pCursor = wCursor(pWin); - pSprite->spriteTrace = (WindowPtr *)xcalloc(1, 32*sizeof(WindowPtr)); + pSprite->spriteTrace = (WindowPtr *)calloc(1, 32*sizeof(WindowPtr)); if (!pSprite->spriteTrace) FatalError("Failed to allocate spriteTrace"); pSprite->spriteTraceSize = 32; @@ -3029,17 +3006,17 @@ InitializeSprite(DeviceIntPtr pDev, WindowPtr pWin) } #ifdef PANORAMIX if(!noPanoramiXExtension) { - pSprite->hotLimits.x1 = -panoramiXdataPtr[0].x; - pSprite->hotLimits.y1 = -panoramiXdataPtr[0].y; - pSprite->hotLimits.x2 = PanoramiXPixWidth - panoramiXdataPtr[0].x; - pSprite->hotLimits.y2 = PanoramiXPixHeight - panoramiXdataPtr[0].y; + pSprite->hotLimits.x1 = -screenInfo.screens[0]->x; + pSprite->hotLimits.y1 = -screenInfo.screens[0]->y; + pSprite->hotLimits.x2 = PanoramiXPixWidth - screenInfo.screens[0]->x; + pSprite->hotLimits.y2 = PanoramiXPixHeight - screenInfo.screens[0]->y; pSprite->physLimits = pSprite->hotLimits; pSprite->confineWin = NullWindow; pSprite->hotShape = NullRegion; pSprite->screen = pScreen; /* gotta UNINIT these someplace */ - REGION_NULL(pScreen, &pSprite->Reg1); - REGION_NULL(pScreen, &pSprite->Reg2); + RegionNull(&pSprite->Reg1); + RegionNull(&pSprite->Reg2); } #endif } @@ -3073,7 +3050,7 @@ UpdateSpriteForScreen(DeviceIntPtr pDev, ScreenPtr pScreen) pSprite = pDev->spriteInfo->sprite; - win = WindowTable[pScreen->myNum]; + win = pScreen->root; pSprite->hotPhys.pScreen = pScreen; pSprite->hot = pSprite->hotPhys; @@ -3099,10 +3076,10 @@ UpdateSpriteForScreen(DeviceIntPtr pDev, ScreenPtr pScreen) #ifdef PANORAMIX if(!noPanoramiXExtension) { - pSprite->hotLimits.x1 = -panoramiXdataPtr[0].x; - pSprite->hotLimits.y1 = -panoramiXdataPtr[0].y; - pSprite->hotLimits.x2 = PanoramiXPixWidth - panoramiXdataPtr[0].x; - pSprite->hotLimits.y2 = PanoramiXPixHeight - panoramiXdataPtr[0].y; + pSprite->hotLimits.x1 = -screenInfo.screens[0]->x; + pSprite->hotLimits.y1 = -screenInfo.screens[0]->y; + pSprite->hotLimits.x2 = PanoramiXPixWidth - screenInfo.screens[0]->x; + pSprite->hotLimits.y2 = PanoramiXPixHeight - screenInfo.screens[0]->y; pSprite->physLimits = pSprite->hotLimits; pSprite->screen = pScreen; } @@ -3135,10 +3112,8 @@ NewCurrentScreen(DeviceIntPtr pDev, ScreenPtr newScreen, int x, int y) pSprite->hotPhys.y = y; #ifdef PANORAMIX if(!noPanoramiXExtension) { - pSprite->hotPhys.x += panoramiXdataPtr[newScreen->myNum].x - - panoramiXdataPtr[0].x; - pSprite->hotPhys.y += panoramiXdataPtr[newScreen->myNum].y - - panoramiXdataPtr[0].y; + pSprite->hotPhys.x += newScreen->x - screenInfo.screens[0]->x; + pSprite->hotPhys.y += newScreen->y - screenInfo.screens[0]->y; if (newScreen != pSprite->screen) { pSprite->screen = newScreen; /* Make sure we tell the DDX to update its copy of the screen */ @@ -3146,23 +3121,22 @@ NewCurrentScreen(DeviceIntPtr pDev, ScreenPtr newScreen, int x, int y) XineramaConfineCursorToWindow(pDev, pSprite->confineWin, TRUE); else - XineramaConfineCursorToWindow(pDev, WindowTable[0], TRUE); + XineramaConfineCursorToWindow(pDev, screenInfo.screens[0]->root, TRUE); /* if the pointer wasn't confined, the DDX won't get told of the pointer warp so we reposition it here */ if(!syncEvents.playingEvents) (*pSprite->screen->SetCursorPosition)( pDev, pSprite->screen, - pSprite->hotPhys.x + panoramiXdataPtr[0].x - - panoramiXdataPtr[pSprite->screen->myNum].x, - pSprite->hotPhys.y + panoramiXdataPtr[0].y - - panoramiXdataPtr[pSprite->screen->myNum].y, FALSE); + pSprite->hotPhys.x + screenInfo.screens[0]->x - + pSprite->screen->x, + pSprite->hotPhys.y + screenInfo.screens[0]->y - + pSprite->screen->y, FALSE); } } else #endif if (newScreen != pSprite->hotPhys.pScreen) - ConfineCursorToWindow(pDev, WindowTable[newScreen->myNum], - TRUE, FALSE); + ConfineCursorToWindow(pDev, newScreen->root, TRUE, FALSE); } #ifdef PANORAMIX @@ -3174,32 +3148,29 @@ XineramaPointInWindowIsVisible( int y ) { - ScreenPtr pScreen = pWin->drawable.pScreen; BoxRec box; int i, xoff, yoff; if (!pWin->realized) return FALSE; - if (POINT_IN_REGION(pScreen, &pWin->borderClip, x, y, &box)) + if (RegionContainsPoint(&pWin->borderClip, x, y, &box)) return TRUE; if(!XineramaSetWindowPntrs(inputInfo.pointer, pWin)) return FALSE; - xoff = x + panoramiXdataPtr[0].x; - yoff = y + panoramiXdataPtr[0].y; + xoff = x + screenInfo.screens[0]->x; + yoff = y + screenInfo.screens[0]->y; for(i = 1; i < PanoramiXNumScreens; i++) { pWin = inputInfo.pointer->spriteInfo->sprite->windows[i]; - pScreen = pWin->drawable.pScreen; - x = xoff - panoramiXdataPtr[i].x; - y = yoff - panoramiXdataPtr[i].y; + x = xoff - screenInfo.screens[i]->x; + y = yoff - screenInfo.screens[i]->y; - if(POINT_IN_REGION(pScreen, &pWin->borderClip, x, y, &box) + if(RegionContainsPoint(&pWin->borderClip, x, y, &box) && (!wInputShape(pWin) || - POINT_IN_REGION(pWin->drawable.pScreen, - wInputShape(pWin), - x - pWin->drawable.x, - y - pWin->drawable.y, &box))) + RegionContainsPoint(wInputShape(pWin), + x - pWin->drawable.x, + y - pWin->drawable.y, &box))) return TRUE; } @@ -3237,9 +3208,9 @@ XineramaWarpPointer(ClientPtr client) winX = source->drawable.x; winY = source->drawable.y; - if(source == WindowTable[0]) { - winX -= panoramiXdataPtr[0].x; - winY -= panoramiXdataPtr[0].y; + if(source == screenInfo.screens[0]->root) { + winX -= screenInfo.screens[0]->x; + winY -= screenInfo.screens[0]->y; } if (x < winX + stuff->srcX || y < winY + stuff->srcY || @@ -3253,9 +3224,9 @@ XineramaWarpPointer(ClientPtr client) if (dest) { x = dest->drawable.x; y = dest->drawable.y; - if(dest == WindowTable[0]) { - x -= panoramiXdataPtr[0].x; - y -= panoramiXdataPtr[0].y; + if(dest == screenInfo.screens[0]->root) { + x -= screenInfo.screens[0]->x; + y -= screenInfo.screens[0]->y; } } @@ -3390,7 +3361,7 @@ ProcWarpPointer(ClientPtr client) static Bool BorderSizeNotEmpty(DeviceIntPtr pDev, WindowPtr pWin) { - if(REGION_NOTEMPTY(pDev->spriteInfo->sprite->hotPhys.pScreen, &pWin->borderSize)) + if(RegionNotEmpty(&pWin->borderSize)) return TRUE; #ifdef PANORAMIX @@ -3398,8 +3369,7 @@ BorderSizeNotEmpty(DeviceIntPtr pDev, WindowPtr pWin) int i; for(i = 1; i < PanoramiXNumScreens; i++) { - if(REGION_NOTEMPTY(pDev->spriteInfo->sprite->screen, - &pDev->spriteInfo->sprite->windows[i]->borderSize)) + if(RegionNotEmpty(&pDev->spriteInfo->sprite->windows[i]->borderSize)) return TRUE; } } @@ -3601,13 +3571,13 @@ CheckPassiveGrabsOnWindow( if (grabinfo->sync.state == FROZEN_NO_EVENT) { if (!grabinfo->sync.event) - grabinfo->sync.event = xcalloc(1, sizeof(InternalEvent)); + grabinfo->sync.event = calloc(1, sizeof(InternalEvent)); *grabinfo->sync.event = *event; grabinfo->sync.state = FROZEN_WITH_EVENT; } if (match & (XI_MATCH | XI2_MATCH)) - xfree(xE); /* on core match xE == &core */ + free(xE); /* on core match xE == &core */ return TRUE; } } @@ -3775,10 +3745,8 @@ DeliverFocusedEvent(DeviceIntPtr keybd, InternalEvent *event, WindowPtr window) } unwind: - if (xE) - xfree(xE); - if (xi2) - xfree(xi2); + free(xE); + free(xi2); return; } @@ -3952,16 +3920,14 @@ DeliverGrabbedEvent(InternalEvent *event, DeviceIntPtr thisDev, grabinfo->sync.state = FROZEN_WITH_EVENT; FreezeThaw(thisDev, TRUE); if (!grabinfo->sync.event) - grabinfo->sync.event = xcalloc(1, sizeof(InternalEvent)); + grabinfo->sync.event = calloc(1, sizeof(InternalEvent)); *grabinfo->sync.event = event->device_event; break; } } - if (xi) - xfree(xi); - if (xi2) - xfree(xi2); + free(xi); + free(xi2); } /* This function is used to set the key pressed or key released state - @@ -3971,13 +3937,7 @@ DeliverGrabbedEvent(InternalEvent *event, DeviceIntPtr thisDev, void FixKeyState (DeviceEvent *event, DeviceIntPtr keybd) { - int key, bit; - BYTE *kptr; - KeyClassPtr keyc = keybd->key; - - key = event->detail.key; - kptr = &keyc->down[key >> 3]; - bit = 1 << (key & 7); + int key = event->detail.key; if (event->type == ET_KeyPress) { DebugF("FixKeyState: Key %d %s\n",key, @@ -3985,9 +3945,9 @@ FixKeyState (DeviceEvent *event, DeviceIntPtr keybd) } if (event->type == ET_KeyPress) - *kptr |= bit; + set_key_down(keybd, key, KEY_PROCESSED); else if (event->type == ET_KeyRelease) - *kptr &= ~bit; + set_key_up(keybd, key, KEY_PROCESSED); else FatalError("Impossible keyboard event"); } @@ -4067,9 +4027,9 @@ OtherClientGone(pointer value, XID id) if (!(pWin->optional->otherClients = other->next)) CheckWindowOptionalNeed (pWin); } - xfree(other); + free(other); RecalculateDeliverableEvents(pWin); - return(Success); + return Success; } prev = other; } @@ -4139,7 +4099,7 @@ EventSelectForWindow(WindowPtr pWin, ClientPtr client, Mask mask) check = 0; if (!pWin->optional && !MakeWindowOptional (pWin)) return BadAlloc; - others = xalloc(sizeof(OtherClients)); + others = malloc(sizeof(OtherClients)); if (!others) return BadAlloc; others->mask = mask; @@ -4292,7 +4252,7 @@ CoreEnterLeaveEvent( xKeymapEvent ke; ClientPtr client = grab ? rClient(grab) : wClient(pWin); if (XaceHook(XACE_DEVICE_ACCESS, client, keybd, DixReadAccess)) - bzero((char *)&ke.map[0], 31); + memset((char *)&ke.map[0], 0, 31); else memmove((char *)&ke.map[0], (char *)&keybd->key->down[1], 31); @@ -4330,7 +4290,7 @@ DeviceEnterLeaveEvent( btlen = bytes_to_int32(btlen); len = sizeof(xXIEnterEvent) + btlen * 4; - event = xcalloc(1, len); + event = calloc(1, len); event->type = GenericEvent; event->extension = IReqCode; event->evtype = type; @@ -4380,7 +4340,7 @@ DeviceEnterLeaveEvent( } out: - xfree(event); + free(event); } void @@ -4402,7 +4362,7 @@ CoreFocusEvent(DeviceIntPtr dev, int type, int mode, int detail, WindowPtr pWin) xKeymapEvent ke; ClientPtr client = wClient(pWin); if (XaceHook(XACE_DEVICE_ACCESS, client, dev, DixReadAccess)) - bzero((char *)&ke.map[0], 31); + memset((char *)&ke.map[0], 0, 31); else memmove((char *)&ke.map[0], (char *)&dev->key->down[1], 31); @@ -4474,7 +4434,7 @@ SetInputFocus( /* It is a match error to try to set the input focus to an unviewable window. */ if(!focusWin->realized) - return(BadMatch); + return BadMatch; } rc = XaceHook(XACE_DEVICE_ACCESS, client, dev, DixSetFocusAccess); if (rc != Success) @@ -4511,7 +4471,7 @@ SetInputFocus( if (depth > focus->traceSize) { focus->traceSize = depth+1; - focus->trace = xrealloc(focus->trace, + focus->trace = realloc(focus->trace, focus->traceSize * sizeof(WindowPtr)); } focus->traceGood = depth; @@ -4671,7 +4631,7 @@ ProcChangeActivePointerGrab(ClientPtr client) if (rc != Success) { client->errorValue = stuff->cursor; - return (rc == BadValue) ? BadCursor : rc; + return rc; } } @@ -4794,7 +4754,7 @@ GrabDevice(ClientPtr client, DeviceIntPtr dev, if (rc != Success) { client->errorValue = curs; - return (rc == BadValue) ? BadCursor : rc; + return rc; } access_mode |= DixForceAccess; } @@ -4971,11 +4931,11 @@ ProcQueryPointer(ClientPtr client) #ifdef PANORAMIX if(!noPanoramiXExtension) { - rep.rootX += panoramiXdataPtr[0].x; - rep.rootY += panoramiXdataPtr[0].y; + rep.rootX += screenInfo.screens[0]->x; + rep.rootY += screenInfo.screens[0]->y; if(stuff->id == rep.root) { - rep.winX += panoramiXdataPtr[0].x; - rep.winY += panoramiXdataPtr[0].y; + rep.winX += screenInfo.screens[0]->x; + rep.winY += screenInfo.screens[0]->y; } } #endif @@ -4991,7 +4951,7 @@ ProcQueryPointer(ClientPtr client) WriteReplyToClient(client, sizeof(xQueryPointerReply), &rep); - return(Success); + return Success; } /** @@ -5021,7 +4981,7 @@ InitEvents(void) while (syncEvents.pending) { QdEventPtr next = syncEvents.pending->next; - xfree(syncEvents.pending); + free(syncEvents.pending); syncEvents.pending = next; } syncEvents.pendtail = &syncEvents.pending; @@ -5195,8 +5155,8 @@ ProcUngrabKey(ClientPtr client) tempGrab.next = NULL; if (!DeletePassiveGrabFromList(&tempGrab)) - return(BadAlloc); - return(Success); + return BadAlloc; + return Success; } /** @@ -5317,10 +5277,9 @@ ProcGrabButton(ClientPtr client) rc = dixLookupResourceByType((pointer *)&cursor, stuff->cursor, RT_CURSOR, client, DixUseAccess); if (rc != Success) - if (!cursor) { client->errorValue = stuff->cursor; - return (rc == BadValue) ? BadCursor : rc; + return rc; } access_mode |= DixForceAccess; } @@ -5391,8 +5350,8 @@ ProcUngrabButton(ClientPtr client) tempGrab.next = NULL; if (!DeletePassiveGrabFromList(&tempGrab)) - return(BadAlloc); - return(Success); + return BadAlloc; + return Success; } /** @@ -5583,7 +5542,7 @@ ProcRecolorCursor(ClientPtr client) if (rc != Success) { client->errorValue = stuff->cursor; - return (rc == BadValue) ? BadCursor : rc; + return rc; } pCursor->foreRed = stuff->foreRed; @@ -5606,7 +5565,7 @@ ProcRecolorCursor(ClientPtr client) ( *pscr->RecolorCursor)(PickPointer(client), pscr, pCursor, (pCursor == pSprite->current) && displayed); } - return (Success); + return Success; } /** @@ -5633,12 +5592,19 @@ WriteEventsToClient(ClientPtr pClient, int count, xEvent *events) int i, eventlength = sizeof(xEvent); + if (!pClient || pClient == serverClient || pClient->clientGone) + return; + + for (i = 0; i < count; i++) + if ((events[i].u.u.type & 0x7f) != KeymapNotify) + events[i].u.u.sequenceNumber = pClient->sequence; + /* Let XKB rewrite the state, as it depends on client preferences. */ XkbFilterEvents(pClient, count, events); #ifdef PANORAMIX if(!noPanoramiXExtension && - (panoramiXdataPtr[0].x || panoramiXdataPtr[0].y)) + (screenInfo.screens[0]->x || screenInfo.screens[0]->y)) { switch(events->u.u.type) { case MotionNotify: @@ -5655,13 +5621,13 @@ WriteEventsToClient(ClientPtr pClient, int count, xEvent *events) */ count = 1; /* should always be 1 */ memcpy(&eventCopy, events, sizeof(xEvent)); - eventCopy.u.keyButtonPointer.rootX += panoramiXdataPtr[0].x; - eventCopy.u.keyButtonPointer.rootY += panoramiXdataPtr[0].y; + eventCopy.u.keyButtonPointer.rootX += screenInfo.screens[0]->x; + eventCopy.u.keyButtonPointer.rootY += screenInfo.screens[0]->y; if(eventCopy.u.keyButtonPointer.event == eventCopy.u.keyButtonPointer.root) { - eventCopy.u.keyButtonPointer.eventX += panoramiXdataPtr[0].x; - eventCopy.u.keyButtonPointer.eventY += panoramiXdataPtr[0].y; + eventCopy.u.keyButtonPointer.eventX += screenInfo.screens[0]->x; + eventCopy.u.keyButtonPointer.eventY += screenInfo.screens[0]->y; } events = &eventCopy; break; @@ -5707,7 +5673,7 @@ WriteEventsToClient(ClientPtr pClient, int count, xEvent *events) if (eventlength > swapEventLen) { swapEventLen = eventlength; - swapEvent = Xrealloc(swapEvent, swapEventLen); + swapEvent = realloc(swapEvent, swapEventLen); if (!swapEvent) { FatalError("WriteEventsToClient: Out of memory.\n"); diff --git a/xserver/dix/extension.c b/xserver/dix/extension.c index 0740bfde2..9d20d544d 100644 --- a/xserver/dix/extension.c +++ b/xserver/dix/extension.c @@ -90,27 +90,32 @@ AddExtension(char *name, int NumEvents, int NumErrors, return((ExtensionEntry *) NULL); } - ext = xalloc(sizeof(ExtensionEntry)); + ext = calloc(sizeof (ExtensionEntry), 1); if (!ext) - return(NULL); + return NULL; + if (!dixAllocatePrivates(&ext->devPrivates, PRIVATE_EXTENSION)) { + free(ext); + return NULL; + } buflen = strlen(name) + 1; - ext->name = xalloc(buflen); + ext->name = malloc(buflen); ext->num_aliases = 0; ext->aliases = (char **)NULL; - ext->devPrivates = NULL; if (!ext->name) { - xfree(ext); + dixFreePrivates(ext->devPrivates, PRIVATE_EXTENSION); + free(ext); return((ExtensionEntry *) NULL); } strlcpy(ext->name, name, buflen); i = NumExtensions; - newexts = (ExtensionEntry **) xrealloc(extensions, + newexts = (ExtensionEntry **) realloc(extensions, (i + 1) * sizeof(ExtensionEntry *)); if (!newexts) { - xfree(ext->name); - xfree(ext); + free(ext->name); + dixFreePrivates(ext->devPrivates, PRIVATE_EXTENSION); + free(ext); return((ExtensionEntry *) NULL); } NumExtensions++; @@ -146,7 +151,7 @@ AddExtension(char *name, int NumEvents, int NumErrors, } RegisterExtensionNames(ext); - return(ext); + return ext; } Bool AddExtensionAlias(char *alias, ExtensionEntry *ext) @@ -157,13 +162,13 @@ Bool AddExtensionAlias(char *alias, ExtensionEntry *ext) if (!ext) return FALSE ; - aliases = (char **)xrealloc(ext->aliases, + aliases = (char **)realloc(ext->aliases, (ext->num_aliases + 1) * sizeof(char *)); if (!aliases) return FALSE; ext->aliases = aliases; buflen = strlen(alias) + 1; - name = xalloc(buflen); + name = malloc(buflen); if (!name) return FALSE; strlcpy(name, alias, buflen); @@ -253,14 +258,14 @@ CloseDownExtensions(void) if (extensions[i]->CloseDown) extensions[i]->CloseDown(extensions[i]); NumExtensions = i; - xfree(extensions[i]->name); + free(extensions[i]->name); for (j = extensions[i]->num_aliases; --j >= 0;) - xfree(extensions[i]->aliases[j]); - xfree(extensions[i]->aliases); - dixFreePrivates(extensions[i]->devPrivates); - xfree(extensions[i]); + free(extensions[i]->aliases[j]); + free(extensions[i]->aliases); + dixFreePrivates(extensions[i]->devPrivates, PRIVATE_EXTENSION); + free(extensions[i]); } - xfree(extensions); + free(extensions); extensions = (ExtensionEntry **)NULL; lastEvent = EXTENSION_EVENT_BASE; lastError = FirstExtensionError; @@ -297,7 +302,7 @@ ProcQueryExtension(ClientPtr client) } } WriteReplyToClient(client, sizeof(xQueryExtensionReply), &reply); - return(client->noClientException); + return Success; } int @@ -332,9 +337,9 @@ ProcListExtensions(ClientPtr client) total_length += strlen(extensions[i]->aliases[j]) + 1; } reply.length = bytes_to_int32(total_length); - buffer = bufptr = xalloc(total_length); + buffer = bufptr = malloc(total_length); if (!buffer) - return(BadAlloc); + return BadAlloc; for (i=0; inoClientException); + return Success; } diff --git a/xserver/dix/gc.c b/xserver/dix/gc.c index 649016595..6da243e01 100644 --- a/xserver/dix/gc.c +++ b/xserver/dix/gc.c @@ -60,13 +60,13 @@ SOFTWARE. #include "dixfontstr.h" #include "scrnintstr.h" #include "region.h" +#include "dixstruct.h" #include "privates.h" #include "dix.h" #include "xace.h" #include -extern XID clientErrorValue; extern FontPtr defaultFont; static Bool CreateDefaultTile(GCPtr pGC); @@ -82,78 +82,55 @@ ValidateGC(DrawablePtr pDraw, GC *pGC) } -/* dixChangeGC(client, pGC, mask, pC32, pUnion) - * - * This function was created as part of the Security extension - * implementation. The client performing the gc change must be passed so - * that access checks can be performed on any tiles, stipples, or fonts - * that are specified. ddxen can call this too; they should normally - * pass NullClient for the client since any access checking should have +/* + * ChangeGC/ChangeGCXIDs: + * + * The client performing the gc change must be passed so that access + * checks can be performed on any tiles, stipples, or fonts that are + * specified. ddxen can call this too; they should normally pass + * NullClient for the client since any access checking should have * already been done at a higher level. * - * Since we had to create a new function anyway, we decided to change the - * way the list of gc values is passed to eliminate the compiler warnings - * caused by the DoChangeGC interface. You can pass the values via pC32 - * or pUnion, but not both; one of them must be NULL. If you don't need - * to pass any pointers, you can use either one: + * If you have any XIDs, you must use ChangeGCXIDs: * - * example calling dixChangeGC using pC32 parameter - * * CARD32 v[2]; - * v[0] = foreground; - * v[1] = background; - * dixChangeGC(client, pGC, GCForeground|GCBackground, v, NULL); + * v[0] = FillTiled; + * v[1] = pid; + * ChangeGCXIDs(client, pGC, GCFillStyle|GCTile, v); * - * example calling dixChangeGC using pUnion parameter; - * same effect as above + * However, if you need to pass a pointer to a pixmap or font, you must + * use ChangeGC: + * + * ChangeGCVal v[2]; + * v[0].val = FillTiled; + * v[1].ptr = pPixmap; + * ChangeGC(client, pGC, GCFillStyle|GCTile, v); + * + * If you have neither XIDs nor pointers, you can use either function, + * but ChangeGC will do less work. * * ChangeGCVal v[2]; * v[0].val = foreground; * v[1].val = background; - * dixChangeGC(client, pGC, GCForeground|GCBackground, NULL, v); - * - * However, if you need to pass a pointer to a pixmap or font, you MUST - * use the pUnion parameter. - * - * example calling dixChangeGC passing pointers in the value list - * v[1].ptr is a pointer to a pixmap - * - * ChangeGCVal v[2]; - * v[0].val = FillTiled; - * v[1].ptr = pPixmap; - * dixChangeGC(client, pGC, GCFillStyle|GCTile, NULL, v); - * - * Note: we could have gotten by with just the pUnion parameter, but on - * 64 bit machines that would have forced us to copy the value list that - * comes in the ChangeGC request. - * - * Ideally, we'd change all the DoChangeGC calls to dixChangeGC, but this - * is far too many changes to consider at this time, so we've only - * changed the ones that caused compiler warnings. New code should use - * dixChangeGC. - * - * dpw + * ChangeGC(client, pGC, GCForeground|GCBackground, v); */ #define NEXTVAL(_type, _var) { \ - if (pC32) _var = (_type)*pC32++; \ - else { \ _var = (_type)(pUnion->val); pUnion++; \ - } \ } #define NEXT_PTR(_type, _var) { \ - assert(pUnion); _var = (_type)pUnion->ptr; pUnion++; } + _var = (_type)pUnion->ptr; pUnion++; } int -dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr pUnion) +ChangeGC(ClientPtr client, GC *pGC, BITS32 mask, ChangeGCValPtr pUnion) { BITS32 index2; - int rc, error = 0; + int error = 0; PixmapPtr pPixmap; BITS32 maskQ; - assert( (pC32 && !pUnion) || (!pC32 && pUnion) ); + assert(pUnion); pGC->serialNumber |= GC_CHANGE_SERIAL_BIT; maskQ = mask; /* save these for when we walk the GCque */ @@ -172,7 +149,8 @@ dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr pGC->alu = newalu; else { - clientErrorValue = newalu; + if (client) + client->errorValue = newalu; error = BadValue; } break; @@ -205,7 +183,8 @@ dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr pGC->lineStyle = newlinestyle; else { - clientErrorValue = newlinestyle; + if (client) + client->errorValue = newlinestyle; error = BadValue; } break; @@ -218,7 +197,8 @@ dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr pGC->capStyle = newcapstyle; else { - clientErrorValue = newcapstyle; + if (client) + client->errorValue = newcapstyle; error = BadValue; } break; @@ -231,7 +211,8 @@ dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr pGC->joinStyle = newjoinstyle; else { - clientErrorValue = newjoinstyle; + if (client) + client->errorValue = newjoinstyle; error = BadValue; } break; @@ -244,7 +225,8 @@ dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr pGC->fillStyle = newfillstyle; else { - clientErrorValue = newfillstyle; + if (client) + client->errorValue = newfillstyle; error = BadValue; } break; @@ -257,84 +239,43 @@ dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr pGC->fillRule = newfillrule; else { - clientErrorValue = newfillrule; + if (client) + client->errorValue = newfillrule; error = BadValue; } break; } case GCTile: - { - XID newpix = 0; - if (pUnion) + NEXT_PTR(PixmapPtr, pPixmap); + if ((pPixmap->drawable.depth != pGC->depth) || + (pPixmap->drawable.pScreen != pGC->pScreen)) { - NEXT_PTR(PixmapPtr, pPixmap); - rc = Success; + error = BadMatch; } else { - NEXTVAL(XID, newpix); - rc = dixLookupResourceByType((pointer *)&pPixmap, newpix, - RT_PIXMAP, client, DixReadAccess); - } - if (rc == Success) - { - if ((pPixmap->drawable.depth != pGC->depth) || - (pPixmap->drawable.pScreen != pGC->pScreen)) - { - error = BadMatch; - } - else - { - pPixmap->refcnt++; - if (!pGC->tileIsPixel) - (* pGC->pScreen->DestroyPixmap)(pGC->tile.pixmap); - pGC->tileIsPixel = FALSE; - pGC->tile.pixmap = pPixmap; - } - } - else - { - clientErrorValue = newpix; - error = (rc == BadValue) ? BadPixmap : rc; + pPixmap->refcnt++; + if (!pGC->tileIsPixel) + (* pGC->pScreen->DestroyPixmap)(pGC->tile.pixmap); + pGC->tileIsPixel = FALSE; + pGC->tile.pixmap = pPixmap; } break; - } case GCStipple: - { - XID newstipple = 0; - if (pUnion) + NEXT_PTR(PixmapPtr, pPixmap); + if ((pPixmap->drawable.depth != 1) || + (pPixmap->drawable.pScreen != pGC->pScreen)) { - NEXT_PTR(PixmapPtr, pPixmap); - rc = Success; + error = BadMatch; } else { - NEXTVAL(XID, newstipple) - rc = dixLookupResourceByType((pointer *)&pPixmap, newstipple, - RT_PIXMAP, client, DixReadAccess); - } - if (rc == Success) - { - if ((pPixmap->drawable.depth != 1) || - (pPixmap->drawable.pScreen != pGC->pScreen)) - { - error = BadMatch; - } - else - { - pPixmap->refcnt++; - if (pGC->stipple) - (* pGC->pScreen->DestroyPixmap)(pGC->stipple); - pGC->stipple = pPixmap; - } - } - else - { - clientErrorValue = newstipple; - error = (rc == BadValue) ? BadPixmap : rc; + pPixmap->refcnt++; + if (pGC->stipple) + (* pGC->pScreen->DestroyPixmap)(pGC->stipple); + pGC->stipple = pPixmap; } break; - } case GCTileStipXOrigin: NEXTVAL(INT16, pGC->patOrg.x); break; @@ -344,30 +285,11 @@ dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr case GCFont: { FontPtr pFont; - XID newfont = 0; - if (pUnion) - { - NEXT_PTR(FontPtr, pFont); - rc = Success; - } - else - { - NEXTVAL(XID, newfont) - rc = dixLookupResourceByType((pointer *)&pFont, newfont, - RT_FONT, client, DixUseAccess); - } - if (rc == Success) - { - pFont->refcnt++; - if (pGC->font) - CloseFont(pGC->font, (Font)0); - pGC->font = pFont; - } - else - { - clientErrorValue = newfont; - error = (rc == BadValue) ? BadFont : rc; - } + NEXT_PTR(FontPtr, pFont); + pFont->refcnt++; + if (pGC->font) + CloseFont(pGC->font, (Font)0); + pGC->font = pFont; break; } case GCSubwindowMode: @@ -378,7 +300,8 @@ dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr pGC->subWindowMode = newclipmode; else { - clientErrorValue = newclipmode; + if (client) + client->errorValue = newclipmode; error = BadValue; } break; @@ -391,7 +314,8 @@ dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr pGC->graphicsExposures = newge; else { - clientErrorValue = newge; + if (client) + client->errorValue = newge; error = BadValue; } break; @@ -403,53 +327,20 @@ dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr NEXTVAL(INT16, pGC->clipOrg.y); break; case GCClipMask: - { - Pixmap pid = 0; - int clipType = 0; - - if (pUnion) - { - NEXT_PTR(PixmapPtr, pPixmap); - } - else - { - NEXTVAL(Pixmap, pid) - if (pid == None) - { - clipType = CT_NONE; - pPixmap = NullPixmap; - } - else { - rc = dixLookupResourceByType((pointer *)&pPixmap, pid, - RT_PIXMAP, client, - DixReadAccess); - if (rc != Success) { - clientErrorValue = pid; - error = (rc == BadValue) ? BadPixmap : rc; - } - } - } - + NEXT_PTR(PixmapPtr, pPixmap); if (pPixmap) { if ((pPixmap->drawable.depth != 1) || (pPixmap->drawable.pScreen != pGC->pScreen)) { error = BadMatch; + break; } - else - { - clipType = CT_PIXMAP; - pPixmap->refcnt++; - } - } - if(error == Success) - { - (*pGC->funcs->ChangeClip)(pGC, clipType, - (pointer)pPixmap, 0); + pPixmap->refcnt++; } + (*pGC->funcs->ChangeClip)(pGC, pPixmap ? CT_PIXMAP : CT_NONE, + (pointer)pPixmap, 0); break; - } case GCDashOffset: NEXTVAL(INT16, pGC->dashOffset); break; @@ -461,7 +352,7 @@ dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr { if (pGC->dash != DefaultDash) { - xfree(pGC->dash); + free(pGC->dash); pGC->numInDashList = 2; pGC->dash = DefaultDash; } @@ -470,11 +361,11 @@ dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr { unsigned char *dash; - dash = xalloc(2 * sizeof(unsigned char)); + dash = malloc(2 * sizeof(unsigned char)); if (dash) { if (pGC->dash != DefaultDash) - xfree(pGC->dash); + free(pGC->dash); pGC->numInDashList = 2; pGC->dash = dash; dash[0] = newdash; @@ -485,7 +376,8 @@ dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr } else { - clientErrorValue = newdash; + if (client) + client->errorValue = newdash; error = BadValue; } break; @@ -498,13 +390,15 @@ dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr pGC->arcMode = newarcmode; else { - clientErrorValue = newarcmode; + if (client) + client->errorValue = newarcmode; error = BadValue; } break; } default: - clientErrorValue = maskQ; + if (client) + client->errorValue = maskQ; error = BadValue; break; } @@ -525,45 +419,51 @@ dixChangeGC(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32, ChangeGCValPtr #undef NEXTVAL #undef NEXT_PTR -/* Publically defined entry to ChangeGC. Just calls dixChangeGC and tells - * it that all of the entries are constants or IDs */ +static const struct { + BITS32 mask; + RESTYPE type; + Mask access_mode; +} xidfields[] = { + { GCTile, RT_PIXMAP, DixReadAccess }, + { GCStipple, RT_PIXMAP, DixReadAccess }, + { GCFont, RT_FONT, DixUseAccess }, + { GCClipMask, RT_PIXMAP, DixReadAccess }, +}; + int -ChangeGC(GC *pGC, BITS32 mask, XID *pval) +ChangeGCXIDs(ClientPtr client, GC *pGC, BITS32 mask, CARD32 *pC32) { - return (dixChangeGC(NullClient, pGC, mask, pval, NULL)); + ChangeGCVal vals[GCLastBit + 1]; + int i; + if (mask & ~GCAllBits) + { + client->errorValue = mask; + return BadValue; + } + for (i = Ones(mask); i--; ) + vals[i].val = pC32[i]; + for (i = 0; i < sizeof(xidfields) / sizeof(*xidfields); ++i) + { + int offset, rc; + if (!(mask & xidfields[i].mask)) + continue; + offset = Ones(mask & (xidfields[i].mask - 1)); + if (xidfields[i].mask == GCClipMask && vals[offset].val == None) + { + vals[offset].ptr = NullPixmap; + continue; + } + rc = dixLookupResourceByType(&vals[offset].ptr, vals[offset].val, + xidfields[i].type, client, xidfields[i].access_mode); + if (rc != Success) + { + client->errorValue = vals[offset].val; + return rc; + } + } + return ChangeGC(client, pGC, mask, vals); } -/* DoChangeGC(pGC, mask, pval, fPointer) - mask is a set of bits indicating which values to change. - pval contains an appropriate value for each mask. - fPointer is true if the values for tiles, stipples, fonts or clipmasks - are pointers instead of IDs. Note: if you are passing pointers you - MUST declare the array of values as type pointer! Other data types - may not be large enough to hold pointers on some machines. Yes, - this means you have to cast to (XID *) when you pass the array to - DoChangeGC. Similarly, if you are not passing pointers (fPointer = 0) you - MUST declare the array as type XID (not unsigned long!), or again the wrong - size data type may be used. To avoid this cruftiness, use dixChangeGC - above. - - if there is an error, the value is marked as changed - anyway, which is probably wrong, but infrequent. - -NOTE: - all values sent over the protocol for ChangeGC requests are -32 bits long -*/ -int -DoChangeGC(GC *pGC, BITS32 mask, XID *pval, int fPointer) -{ - if (fPointer) - /* XXX might be a problem on 64 bit big-endian servers */ - return dixChangeGC(NullClient, pGC, mask, NULL, (ChangeGCValPtr)pval); - else - return dixChangeGC(NullClient, pGC, mask, pval, NULL); -} - - /* CreateGC(pDrawable, mask, pval, pStatus) creates a default GC for the given drawable, using mask to fill in any non-default values. @@ -579,7 +479,7 @@ CreateGC(DrawablePtr pDrawable, BITS32 mask, XID *pval, int *pStatus, { GCPtr pGC; - pGC = xalloc(sizeof(GC)); + pGC = dixAllocateObjectWithPrivates(GC, PRIVATE_GC); if (!pGC) { *pStatus = BadAlloc; @@ -592,7 +492,6 @@ CreateGC(DrawablePtr pDrawable, BITS32 mask, XID *pval, int *pStatus, pGC->planemask = ~0; pGC->serialNumber = GC_CHANGE_SERIAL_BIT; pGC->funcs = 0; - pGC->devPrivates = NULL; pGC->fgPixel = 0; pGC->bgPixel = 1; pGC->lineWidth = 0; @@ -637,17 +536,20 @@ CreateGC(DrawablePtr pDrawable, BITS32 mask, XID *pval, int *pStatus, pGC->stipple = pGC->pScreen->PixmapPerDepth[0]; pGC->stipple->refcnt++; + /* this is not a scratch GC */ + pGC->scratch_inuse = FALSE; + /* security creation/labeling check */ *pStatus = XaceHook(XACE_RESOURCE_ACCESS, client, gcid, RT_GC, pGC, RT_NONE, NULL, DixCreateAccess|DixSetAttrAccess); if (*pStatus != Success) goto out; - pGC->stateChanges = (1 << (GCLastBit+1)) - 1; + pGC->stateChanges = GCAllBits; if (!(*pGC->pScreen->CreateGC)(pGC)) *pStatus = BadAlloc; else if (mask) - *pStatus = ChangeGC(pGC, mask, pval); + *pStatus = ChangeGCXIDs(client, pGC, mask, pval); else *pStatus = Success; @@ -660,13 +562,13 @@ out: pGC = (GCPtr)NULL; } - return (pGC); + return pGC; } static Bool CreateDefaultTile (GCPtr pGC) { - XID tmpval[3]; + ChangeGCVal tmpval[3]; PixmapPtr pTile; GCPtr pgcScratch; xRectangle rect; @@ -687,11 +589,10 @@ CreateDefaultTile (GCPtr pGC) FreeScratchGC(pgcScratch); return FALSE; } - tmpval[0] = GXcopy; - tmpval[1] = pGC->tile.pixel; - tmpval[2] = FillSolid; - (void)ChangeGC(pgcScratch, GCFunction | GCForeground | GCFillStyle, - tmpval); + tmpval[0].val = GXcopy; + tmpval[1].val = pGC->tile.pixel; + tmpval[2].val = FillSolid; + (void)ChangeGC(NullClient, pgcScratch, GCFunction | GCForeground | GCFillStyle, tmpval); ValidateGC((DrawablePtr)pTile, pgcScratch); rect.x = 0; rect.y = 0; @@ -819,7 +720,7 @@ CopyGC(GC *pgcSrc, GC *pgcDst, BITS32 mask) { if (pgcDst->dash != DefaultDash) { - xfree(pgcDst->dash); + free(pgcDst->dash); pgcDst->numInDashList = pgcSrc->numInDashList; pgcDst->dash = pgcSrc->dash; } @@ -829,11 +730,11 @@ CopyGC(GC *pgcSrc, GC *pgcDst, BITS32 mask) unsigned char *dash; unsigned int i; - dash = xalloc(pgcSrc->numInDashList * sizeof(unsigned char)); + dash = malloc(pgcSrc->numInDashList * sizeof(unsigned char)); if (dash) { if (pgcDst->dash != DefaultDash) - xfree(pgcDst->dash); + free(pgcDst->dash); pgcDst->numInDashList = pgcSrc->numInDashList; pgcDst->dash = dash; for (i=0; inumInDashList; i++) @@ -847,9 +748,7 @@ CopyGC(GC *pgcSrc, GC *pgcDst, BITS32 mask) pgcDst->arcMode = pgcSrc->arcMode; break; default: - clientErrorValue = maskQ; - error = BadValue; - break; + FatalError ("CopyGC: Unhandled mask!\n"); } } if (pgcDst->fillStyle == FillTiled && pgcDst->tileIsPixel) @@ -884,10 +783,9 @@ FreeGC(pointer value, XID gid) (*pGC->funcs->DestroyGC) (pGC); if (pGC->dash != DefaultDash) - xfree(pGC->dash); - dixFreePrivates(pGC->devPrivates); - xfree(pGC); - return(Success); + free(pGC->dash); + dixFreeObjectWithPrivates(pGC, PRIVATE_GC); + return Success; } /* CreateScratchGC(pScreen, depth) @@ -908,7 +806,7 @@ CreateScratchGC(ScreenPtr pScreen, unsigned depth) { GCPtr pGC; - pGC = xalloc(sizeof(GC)); + pGC = dixAllocateObjectWithPrivates(GC, PRIVATE_GC); if (!pGC) return (GCPtr)NULL; @@ -917,7 +815,6 @@ CreateScratchGC(ScreenPtr pScreen, unsigned depth) pGC->alu = GXcopy; /* dst <- src */ pGC->planemask = ~0; pGC->serialNumber = 0; - pGC->devPrivates = NULL; pGC->fgPixel = 0; pGC->bgPixel = 1; pGC->lineWidth = 0; @@ -947,7 +844,10 @@ CreateScratchGC(ScreenPtr pScreen, unsigned depth) pGC->lastWinOrg.x = 0; pGC->lastWinOrg.y = 0; - pGC->stateChanges = (1 << (GCLastBit+1)) - 1; + /* scratch GCs in the GCperDepth pool start off unused */ + pGC->scratch_inuse = FALSE; + + pGC->stateChanges = GCAllBits; if (!(*pScreen->CreateGC)(pGC)) { FreeGC(pGC, (XID)0); @@ -967,8 +867,10 @@ FreeGCperDepth(int screenNum) ppGC = pScreen->GCperDepth; for (i = 0; i <= pScreen->numDepths; i++) + { (void)FreeGC(ppGC[i], (XID)0); - pScreen->rgf = ~0L; + ppGC[i] = NULL; + } } @@ -981,7 +883,6 @@ CreateGCperDepth(int screenNum) GCPtr *ppGC; pScreen = screenInfo.screens[screenNum]; - pScreen->rgf = 0; ppGC = pScreen->GCperDepth; /* do depth 1 separately because it's not included in list */ if (!(ppGC[0] = CreateScratchGC(pScreen, 1))) @@ -1009,7 +910,7 @@ Bool CreateDefaultStipple(int screenNum) { ScreenPtr pScreen; - XID tmpval[3]; + ChangeGCVal tmpval[3]; xRectangle rect; CARD16 w, h; GCPtr pgcScratch; @@ -1023,14 +924,16 @@ CreateDefaultStipple(int screenNum) (*pScreen->CreatePixmap)(pScreen, w, h, 1, 0))) return FALSE; /* fill stipple with 1 */ - tmpval[0] = GXcopy; tmpval[1] = 1; tmpval[2] = FillSolid; + tmpval[0].val = GXcopy; + tmpval[1].val = 1; + tmpval[2].val = FillSolid; pgcScratch = GetScratchGC(1, pScreen); if (!pgcScratch) { (*pScreen->DestroyPixmap)(pScreen->PixmapPerDepth[0]); return FALSE; } - (void)ChangeGC(pgcScratch, GCFunction|GCForeground|GCFillStyle, tmpval); + (void)ChangeGC(NullClient, pgcScratch, GCFunction|GCForeground|GCFillStyle, tmpval); ValidateGC((DrawablePtr)pScreen->PixmapPerDepth[0], pgcScratch); rect.x = 0; rect.y = 0; @@ -1063,15 +966,14 @@ SetDashes(GCPtr pGC, unsigned offset, unsigned ndash, unsigned char *pdash) if (!*p++) { /* dash segment must be > 0 */ - clientErrorValue = 0; return BadValue; } } if (ndash & 1) - p = xalloc(2 * ndash * sizeof(unsigned char)); + p = malloc(2 * ndash * sizeof(unsigned char)); else - p = xalloc(ndash * sizeof(unsigned char)); + p = malloc(ndash * sizeof(unsigned char)); if (!p) return BadAlloc; @@ -1084,7 +986,7 @@ SetDashes(GCPtr pGC, unsigned offset, unsigned ndash, unsigned char *pdash) } if (pGC->dash != DefaultDash) - xfree(pGC->dash); + free(pGC->dash); pGC->numInDashList = ndash; pGC->dash = p; if (ndash & 1) @@ -1164,9 +1066,9 @@ SetClipRects(GCPtr pGC, int xOrigin, int yOrigin, int nrects, newct = VerifyRectOrder(nrects, prects, ordering); if (newct < 0) - return(BadMatch); + return BadMatch; size = nrects * sizeof(xRectangle); - prectsNew = xalloc(size); + prectsNew = malloc(size); if (!prectsNew && size) return BadAlloc; @@ -1199,12 +1101,11 @@ GetScratchGC(unsigned depth, ScreenPtr pScreen) GCPtr pGC; for (i=0; i<=pScreen->numDepths; i++) - if ( pScreen->GCperDepth[i]->depth == depth && - !(pScreen->rgf & (1L << (i+1))) - ) + { + pGC = pScreen->GCperDepth[i]; + if (pGC && pGC->depth == depth && !pGC->scratch_inuse) { - pScreen->rgf |= (1L << (i+1)); - pGC = (pScreen->GCperDepth[i]); + pGC->scratch_inuse = TRUE; pGC->alu = GXcopy; pGC->planemask = ~0; @@ -1226,9 +1127,10 @@ GetScratchGC(unsigned depth, ScreenPtr pScreen) pGC->clipOrg.y = 0; if (pGC->clientClipType != CT_NONE) (*pGC->funcs->ChangeClip) (pGC, CT_NONE, NULL, 0); - pGC->stateChanges = (1 << (GCLastBit+1)) - 1; + pGC->stateChanges = GCAllBits; return pGC; } + } /* if we make it this far, need to roll our own */ pGC = CreateScratchGC(pScreen, depth); if (pGC) @@ -1244,16 +1146,8 @@ mark it as available. void FreeScratchGC(GCPtr pGC) { - ScreenPtr pScreen = pGC->pScreen; - int i; - - for (i=0; i<=pScreen->numDepths; i++) - { - if ( pScreen->GCperDepth[i] == pGC) - { - pScreen->rgf &= ~(1L << (i+1)); - return; - } - } - (void)FreeGC(pGC, (GContext)0); + if (pGC->scratch_inuse) + pGC->scratch_inuse = FALSE; + else + FreeGC(pGC, (GContext)0); } diff --git a/xserver/dix/getevents.c b/xserver/dix/getevents.c index 197deb4fb..e5134d34b 100644 --- a/xserver/dix/getevents.c +++ b/xserver/dix/getevents.c @@ -33,6 +33,7 @@ #include #include #include +#include #include "misc.h" #include "resource.h" @@ -56,6 +57,7 @@ #include #include +#include #include "exglobals.h" #include "exevents.h" #include "exglobals.h" @@ -88,22 +90,53 @@ GetMotionHistorySize(void) return MOTION_HISTORY_SIZE; } +void +set_button_down(DeviceIntPtr pDev, int button, int type) +{ + if (type == BUTTON_PROCESSED) + SetBit(pDev->button->down, button); + else + SetBit(pDev->button->postdown, button); +} + +void +set_button_up(DeviceIntPtr pDev, int button, int type) +{ + if (type == BUTTON_PROCESSED) + ClearBit(pDev->button->down, button); + else + ClearBit(pDev->button->postdown, button); +} + +Bool +button_is_down(DeviceIntPtr pDev, int button, int type) +{ + int ret = 0; + + if (type & BUTTON_PROCESSED) + ret |= !!BitIsOn(pDev->button->down, button); + if (type & BUTTON_POSTED) + ret |= !!BitIsOn(pDev->button->postdown, button); + + return ret; +} + void set_key_down(DeviceIntPtr pDev, int key_code, int type) { if (type == KEY_PROCESSED) - pDev->key->down[key_code >> 3] |= (1 << (key_code & 7)); + SetBit(pDev->key->down, key_code); else - pDev->key->postdown[key_code >> 3] |= (1 << (key_code & 7)); + SetBit(pDev->key->postdown, key_code); } void set_key_up(DeviceIntPtr pDev, int key_code, int type) { if (type == KEY_PROCESSED) - pDev->key->down[key_code >> 3] &= ~(1 << (key_code & 7)); + ClearBit(pDev->key->down, key_code); else - pDev->key->postdown[key_code >> 3] &= ~(1 << (key_code & 7)); + ClearBit(pDev->key->postdown, key_code); } Bool @@ -112,9 +145,9 @@ key_is_down(DeviceIntPtr pDev, int key_code, int type) int ret = 0; if (type & KEY_PROCESSED) - ret |= !!(pDev->key->down[key_code >> 3] & (1 << (key_code & 7))); - else if (type & KEY_POSTED) - ret |= !!(pDev->key->postdown[key_code >> 3] & (1 << (key_code & 7))); + ret |= !!BitIsOn(pDev->key->down, key_code); + if (type & KEY_POSTED) + ret |= !!BitIsOn(pDev->key->postdown, key_code); return ret; } @@ -325,8 +358,7 @@ void AllocateMotionHistory(DeviceIntPtr pDev) { int size; - if (pDev->valuator->motion) - xfree(pDev->valuator->motion); + free(pDev->valuator->motion); if (pDev->valuator->numMotionEvents < 1) return; @@ -342,7 +374,7 @@ AllocateMotionHistory(DeviceIntPtr pDev) size += sizeof(Time); - pDev->valuator->motion = xcalloc(pDev->valuator->numMotionEvents, size); + pDev->valuator->motion = calloc(pDev->valuator->numMotionEvents, size); pDev->valuator->first_motion = 0; pDev->valuator->last_motion = 0; if (!pDev->valuator->motion) @@ -384,7 +416,7 @@ GetMotionHistory(DeviceIntPtr pDev, xTimecoord **buff, unsigned long start, else size = (sizeof(INT32) * pDev->valuator->numAxes) + sizeof(Time); - *buff = xalloc(size * pDev->valuator->numMotionEvents); + *buff = malloc(size * pDev->valuator->numMotionEvents); if (!(*buff)) return 0; obuff = (char *)*buff; @@ -620,8 +652,8 @@ clipValuators(DeviceIntPtr pDev, int first_valuator, int num_valuators, * events if a DCCE was generated. * @return The updated @events pointer. */ -static EventListPtr -updateFromMaster(EventListPtr events, DeviceIntPtr dev, int type, int *num_events) +EventListPtr +UpdateFromMaster(EventListPtr events, DeviceIntPtr dev, int type, int *num_events) { DeviceIntPtr master; @@ -880,24 +912,26 @@ GetKeyboardEvents(EventList *events, DeviceIntPtr pDev, int type, int key_code) int GetKeyboardValuatorEvents(EventList *events, DeviceIntPtr pDev, int type, int key_code, int first_valuator, - int num_valuators, int *valuators) { + int num_valuators, int *valuators_in) { int num_events = 0; CARD32 ms = 0; DeviceEvent *event; RawDeviceEvent *raw; + int valuators[MAX_VALUATORS]; /* refuse events from disabled devices */ if (!pDev->enabled) return 0; if (!events ||!pDev->key || !pDev->focus || !pDev->kbdfeed || + num_valuators > MAX_VALUATORS || (type != KeyPress && type != KeyRelease) || (key_code < 8 || key_code > 255)) return 0; num_events = 1; - events = updateFromMaster(events, pDev, DEVCHANGE_KEYBOARD_EVENT, &num_events); + events = UpdateFromMaster(events, pDev, DEVCHANGE_KEYBOARD_EVENT, &num_events); /* Handle core repeating, via press/release/press/release. */ if (type == KeyPress && key_is_down(pDev, key_code, KEY_POSTED)) { @@ -915,6 +949,8 @@ GetKeyboardValuatorEvents(EventList *events, DeviceIntPtr pDev, int type, events++; num_events++; + memcpy(valuators, valuators_in, num_valuators * sizeof(int)); + init_raw(pDev, raw, ms, type, key_code); set_raw_valuators(raw, first_valuator, num_valuators, valuators, raw->valuators.data_raw); @@ -959,20 +995,20 @@ InitEventList(int num_events) EventListPtr events; int i; - events = (EventListPtr)xcalloc(num_events, sizeof(EventList)); + events = (EventListPtr)calloc(num_events, sizeof(EventList)); if (!events) return NULL; for (i = 0; i < num_events; i++) { events[i].evlen = sizeof(InternalEvent); - events[i].event = xcalloc(1, sizeof(InternalEvent)); + events[i].event = calloc(1, sizeof(InternalEvent)); if (!events[i].event) { /* rollback */ while(i--) - xfree(events[i].event); - xfree(events); + free(events[i].event); + free(events); events = NULL; break; } @@ -993,8 +1029,24 @@ FreeEventList(EventListPtr list, int num_events) if (!list) return; while(num_events--) - xfree(list[num_events].event); - xfree(list); + free(list[num_events].event); + free(list); +} + +static void +transformAbsolute(DeviceIntPtr dev, int v[MAX_VALUATORS]) +{ + struct pixman_f_vector p; + + /* p' = M * p in homogeneous coordinates */ + p.v[0] = v[0]; + p.v[1] = v[1]; + p.v[2] = 1.0; + + pixman_f_transform_point(&dev->transform, &p); + + v[0] = lround(p.v[0]); + v[1] = lround(p.v[1]); } /** @@ -1019,7 +1071,7 @@ FreeEventList(EventListPtr list, int num_events) int GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, int flags, int first_valuator, int num_valuators, - int *valuators) { + int *valuators_in) { int num_events = 1; CARD32 ms; DeviceEvent *event; @@ -1028,6 +1080,7 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, cx, cy; /* only screen coordinates */ float x_frac = 0.0, y_frac = 0.0, cx_frac, cy_frac; ScreenPtr scr = miPointerGetScreen(pDev); + int valuators[MAX_VALUATORS]; /* refuse events from disabled devices */ if (!pDev->enabled) @@ -1036,6 +1089,7 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, ms = GetTimeInMillis(); /* before pointer update to help precision */ if (!scr || !pDev->valuator || first_valuator < 0 || + num_valuators > MAX_VALUATORS || ((num_valuators + first_valuator) > pDev->valuator->numAxes) || (type != MotionNotify && type != ButtonPress && type != ButtonRelease) || (type != MotionNotify && !pDev->button) || @@ -1043,12 +1097,14 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, (type == MotionNotify && num_valuators <= 0)) return 0; - events = updateFromMaster(events, pDev, DEVCHANGE_POINTER_EVENT, &num_events); + events = UpdateFromMaster(events, pDev, DEVCHANGE_POINTER_EVENT, &num_events); raw = (RawDeviceEvent*)events->event; events++; num_events++; + memcpy(valuators, valuators_in, num_valuators * sizeof(int)); + init_raw(pDev, raw, ms, type, buttons); set_raw_valuators(raw, first_valuator, num_valuators, valuators, raw->valuators.data_raw); @@ -1068,6 +1124,7 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, scr->height); } + transformAbsolute(pDev, valuators); moveAbsolute(pDev, &x, &y, first_valuator, num_valuators, valuators); } else { if (flags & POINTER_ACCELERATE) { @@ -1105,11 +1162,11 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, else { if (type == ButtonPress) { event->type = ET_ButtonPress; - pDev->button->postdown[buttons >> 3] |= (1 << (buttons & 7)); + set_button_down(pDev, buttons, BUTTON_POSTED); } else if (type == ButtonRelease) { event->type = ET_ButtonRelease; - pDev->button->postdown[buttons >> 3] &= ~(1 << (buttons & 7)); + set_button_up(pDev, buttons, BUTTON_POSTED); } event->detail.button = buttons; } @@ -1134,10 +1191,11 @@ GetPointerEvents(EventList *events, DeviceIntPtr pDev, int type, int buttons, */ int GetProximityEvents(EventList *events, DeviceIntPtr pDev, int type, - int first_valuator, int num_valuators, int *valuators) + int first_valuator, int num_valuators, int *valuators_in) { int num_events = 1; DeviceEvent *event; + int valuators[MAX_VALUATORS]; /* refuse events from disabled devices */ if (!pDev->enabled) @@ -1153,18 +1211,20 @@ GetProximityEvents(EventList *events, DeviceIntPtr pDev, int type, num_valuators = 0; /* You fail. */ - if (first_valuator < 0 || + if (first_valuator < 0 || num_valuators > MAX_VALUATORS || (num_valuators + first_valuator) > pDev->valuator->numAxes) return 0; - events = updateFromMaster(events, pDev, DEVCHANGE_POINTER_EVENT, &num_events); + events = UpdateFromMaster(events, pDev, DEVCHANGE_POINTER_EVENT, &num_events); event = (DeviceEvent *) events->event; init_event(pDev, event, GetTimeInMillis()); event->type = (type == ProximityIn) ? ET_ProximityIn : ET_ProximityOut; - if (num_valuators) + if (num_valuators) { + memcpy(valuators, valuators_in, num_valuators * sizeof(int)); clipValuators(pDev, first_valuator, num_valuators, valuators); + } set_valuators(pDev, event, first_valuator, num_valuators, valuators); @@ -1191,8 +1251,8 @@ PostSyntheticMotion(DeviceIntPtr pDev, will translate from sprite screen to screen 0 upon reentry to the DIX layer. */ if (!noPanoramiXExtension) { - x += panoramiXdataPtr[0].x - panoramiXdataPtr[screen].x; - y += panoramiXdataPtr[0].y - panoramiXdataPtr[screen].y; + x += screenInfo.screens[0]->x - screenInfo.screens[screen]->x; + y += screenInfo.screens[0]->y - screenInfo.screens[screen]->y; } #endif diff --git a/xserver/dix/globals.c b/xserver/dix/globals.c index 10b9f931e..1c3cf39ea 100644 --- a/xserver/dix/globals.c +++ b/xserver/dix/globals.c @@ -83,8 +83,6 @@ ClientPtr serverClient; int currentMaxClients; /* current size of clients array */ long maxBigRequestSize = MAX_BIG_REQUEST_SIZE; -WindowPtr WindowTable[MAXSCREENS]; - unsigned long globalSerialNumber = 0; unsigned long serverGeneration = 0; @@ -129,8 +127,6 @@ Bool party_like_its_1989 = TRUE; #endif Bool whiteRoot = FALSE; -int cursorScreenDevPriv[MAXSCREENS]; - TimeStamp currentTime; TimeStamp lastDeviceEventTime; @@ -141,5 +137,3 @@ char *display; char *ConnectionInfo; CARD32 TimeOutValue = DEFAULT_TIMEOUT * MILLI_PER_SECOND; - -DDXPointRec dixScreenOrigins[MAXSCREENS]; diff --git a/xserver/dix/glyphcurs.c b/xserver/dix/glyphcurs.c index f74b13730..fa2aeca26 100644 --- a/xserver/dix/glyphcurs.c +++ b/xserver/dix/glyphcurs.c @@ -91,7 +91,7 @@ ServerBitsFromGlyph(FontPtr pfont, unsigned ch, CursorMetricPtr cm, unsigned cha pScreen = screenInfo.screens[0]; nby = BitmapBytePad(cm->width) * (long)cm->height; - pbits = xcalloc(1, nby); + pbits = calloc(1, nby); if (!pbits) return BadAlloc; @@ -105,7 +105,7 @@ ServerBitsFromGlyph(FontPtr pfont, unsigned ch, CursorMetricPtr cm, unsigned cha (*pScreen->DestroyPixmap)(ppix); if (pGC) FreeScratchGC(pGC); - xfree(pbits); + free(pbits); return BadAlloc; } @@ -118,14 +118,13 @@ ServerBitsFromGlyph(FontPtr pfont, unsigned ch, CursorMetricPtr cm, unsigned cha gcval[0].val = GXcopy; gcval[1].val = 0; gcval[2].ptr = (pointer)pfont; - dixChangeGC(NullClient, pGC, GCFunction | GCForeground | GCFont, - NULL, gcval); + ChangeGC(NullClient, pGC, GCFunction | GCForeground | GCFont, gcval); ValidateGC((DrawablePtr)ppix, pGC); (*pGC->ops->PolyFillRect)((DrawablePtr)ppix, pGC, 1, &rect); /* draw the glyph */ gcval[0].val = 1; - dixChangeGC(NullClient, pGC, GCForeground, NULL, gcval); + ChangeGC(NullClient, pGC, GCForeground, gcval); ValidateGC((DrawablePtr)ppix, pGC); (*pGC->ops->PolyText16)((DrawablePtr)ppix, pGC, cm->xhot, cm->yhot, 1, (unsigned short *)char2b); diff --git a/xserver/dix/grabs.c b/xserver/dix/grabs.c index 4a351d647..f850e3d84 100644 --- a/xserver/dix/grabs.c +++ b/xserver/dix/grabs.c @@ -84,7 +84,7 @@ CreateGrab( { GrabPtr grab; - grab = xcalloc(1, sizeof(GrabRec)); + grab = calloc(1, sizeof(GrabRec)); if (!grab) return (GrabPtr)NULL; grab->resource = FakeClientID(client); @@ -118,15 +118,15 @@ static void FreeGrab(GrabPtr pGrab) { if (pGrab->modifiersDetail.pMask != NULL) - xfree(pGrab->modifiersDetail.pMask); + free(pGrab->modifiersDetail.pMask); if (pGrab->detail.pMask != NULL) - xfree(pGrab->detail.pMask); + free(pGrab->detail.pMask); if (pGrab->cursor) FreeCursor(pGrab->cursor, (Cursor)0); - xfree(pGrab); + free(pGrab); } int @@ -160,7 +160,7 @@ DeleteDetailFromMask(Mask *pDetailMask, unsigned int detail) Mask *mask; int i; - mask = xalloc(sizeof(Mask) * MasksPerDetailMask); + mask = malloc(sizeof(Mask) * MasksPerDetailMask); if (mask) { if (pDetailMask) @@ -435,16 +435,16 @@ DeletePassiveGrabFromList(GrabPtr pMinuendGrab) i++; if (!i) return TRUE; - deletes = xalloc(i * sizeof(GrabPtr)); - adds = xalloc(i * sizeof(GrabPtr)); - updates = xalloc(i * sizeof(Mask **)); - details = xalloc(i * sizeof(Mask *)); + deletes = malloc(i * sizeof(GrabPtr)); + adds = malloc(i * sizeof(GrabPtr)); + updates = malloc(i * sizeof(Mask **)); + details = malloc(i * sizeof(Mask *)); if (!deletes || !adds || !updates || !details) { - if (details) xfree(details); - if (updates) xfree(updates); - if (adds) xfree(adds); - if (deletes) xfree(deletes); + free(details); + free(updates); + free(adds); + free(deletes); return FALSE; } @@ -532,7 +532,7 @@ DeletePassiveGrabFromList(GrabPtr pMinuendGrab) for (i = 0; i < nadds; i++) FreeResource(adds[i]->resource, RT_NONE); for (i = 0; i < nups; i++) - xfree(details[i]); + free(details[i]); } else { @@ -546,14 +546,14 @@ DeletePassiveGrabFromList(GrabPtr pMinuendGrab) } for (i = 0; i < nups; i++) { - xfree(*updates[i]); + free(*updates[i]); *updates[i] = details[i]; } } - xfree(details); - xfree(updates); - xfree(adds); - xfree(deletes); + free(details); + free(updates); + free(adds); + free(deletes); return ok; #undef UPDATE diff --git a/xserver/dix/inpututils.c b/xserver/dix/inpututils.c index 4848c1bc2..8ec80b5e8 100644 --- a/xserver/dix/inpututils.c +++ b/xserver/dix/inpututils.c @@ -88,7 +88,6 @@ do_butmap_change(DeviceIntPtr dev, CARD8 *map, int len, ClientPtr client) if (!XIShouldNotify(clients[i], dev)) continue; - core_mn.u.u.sequenceNumber = clients[i]->sequence; WriteEventsToClient(clients[i], 1, &core_mn); } @@ -311,7 +310,7 @@ int generate_modkeymap(ClientPtr client, DeviceIntPtr dev, } } - modkeymap = xcalloc(max_keys_per_mod * 8, sizeof(KeyCode)); + modkeymap = calloc(max_keys_per_mod * 8, sizeof(KeyCode)); if (!modkeymap) return BadAlloc; @@ -332,3 +331,88 @@ int generate_modkeymap(ClientPtr client, DeviceIntPtr dev, return Success; } + +/** + * Duplicate the InputAttributes in the most obvious way. + * No special memory handling is used to give drivers the maximum + * flexibility with the data. Drivers should be able to call realloc on the + * product string if needed and perform similar operations. + */ +InputAttributes* +DuplicateInputAttributes(InputAttributes *attrs) +{ + InputAttributes *new_attr; + int ntags = 0; + char **tags, **new_tags; + + if (!attrs) + return NULL; + + if (!(new_attr = calloc(1, sizeof(InputAttributes)))) + goto unwind; + + if (attrs->product && !(new_attr->product = strdup(attrs->product))) + goto unwind; + if (attrs->vendor && !(new_attr->vendor = strdup(attrs->vendor))) + goto unwind; + if (attrs->device && !(new_attr->device = strdup(attrs->device))) + goto unwind; + if (attrs->pnp_id && !(new_attr->pnp_id = strdup(attrs->pnp_id))) + goto unwind; + if (attrs->usb_id && !(new_attr->usb_id = strdup(attrs->usb_id))) + goto unwind; + + new_attr->flags = attrs->flags; + + if ((tags = attrs->tags)) + { + while(*tags++) + ntags++; + + new_attr->tags = calloc(ntags + 1, sizeof(char*)); + if (!new_attr->tags) + goto unwind; + + tags = attrs->tags; + new_tags = new_attr->tags; + + while(*tags) + { + *new_tags = strdup(*tags); + if (!*new_tags) + goto unwind; + + tags++; + new_tags++; + } + } + + return new_attr; + +unwind: + FreeInputAttributes(new_attr); + return NULL; +} + +void +FreeInputAttributes(InputAttributes *attrs) +{ + char **tags; + + if (!attrs) + return; + + free(attrs->product); + free(attrs->vendor); + free(attrs->device); + free(attrs->pnp_id); + free(attrs->usb_id); + + if ((tags = attrs->tags)) + while(*tags) + free(*tags++); + + free(attrs->tags); + free(attrs); +} + diff --git a/xserver/dix/main.c b/xserver/dix/main.c index f0235364f..47a932f15 100644 --- a/xserver/dix/main.c +++ b/xserver/dix/main.c @@ -161,9 +161,7 @@ int main(int argc, char *argv[], char *envp[]) ScreenSaverBlanking = defaultScreenSaverBlanking; ScreenSaverAllowExposures = defaultScreenSaverAllowExposures; #ifdef DPMSExtension - DPMSStandbyTime = DEFAULT_SCREEN_SAVER_TIME; - DPMSSuspendTime = DEFAULT_SCREEN_SAVER_TIME; - DPMSOffTime = DEFAULT_SCREEN_SAVER_TIME; + DPMSStandbyTime = DPMSSuspendTime = DPMSOffTime = ScreenSaverTime; DPMSEnabled = TRUE; DPMSPowerLevel = 0; #endif @@ -176,7 +174,7 @@ int main(int argc, char *argv[], char *envp[]) InitProcVectors(); for (i=1; idevPrivates, PRIVATE_CLIENT)) + FatalError("failed to create server client privates"); + if (!InitClientResources(serverClient)) /* for root resources */ FatalError("couldn't init server resources"); SetInputCheck(&alwaysCheckForInput[0], &alwaysCheckForInput[1]); - screenInfo.arraySize = MAXSCREENS; screenInfo.numScreens = 0; InitAtoms(); InitEvents(); InitSelections(); InitGlyphCaching(); - if (!dixResetPrivates()) - FatalError("couldn't init private data storage"); dixResetRegistry(); ResetFontPrivateIndex(); InitCallbackManager(); @@ -207,6 +211,7 @@ int main(int argc, char *argv[], char *envp[]) if (screenInfo.numScreens < 1) FatalError("no screens found"); InitExtensions(argc, argv); + for (i = 0; i < screenInfo.numScreens; i++) { ScreenPtr pScreen = screenInfo.screens[i]; @@ -252,7 +257,7 @@ int main(int argc, char *argv[], char *envp[]) #endif for (i = 0; i < screenInfo.numScreens; i++) - InitRootWindow(WindowTable[i]); + InitRootWindow(screenInfo.screens[i]->root); InitCoreDevices(); InitInput(argc, argv); @@ -306,7 +311,8 @@ int main(int argc, char *argv[], char *envp[]) CloseInput(); - memset(WindowTable, 0, sizeof(WindowTable)); + for (i = 0; i < screenInfo.numScreens; i++) + screenInfo.screens[i]->root = NullWindow; CloseDownDevices(); CloseDownEvents(); @@ -316,17 +322,18 @@ int main(int argc, char *argv[], char *envp[]) FreeGCperDepth(i); FreeDefaultStipple(i); (* screenInfo.screens[i]->CloseScreen)(i, screenInfo.screens[i]); - dixFreePrivates(screenInfo.screens[i]->devPrivates); - xfree(screenInfo.screens[i]); + dixFreePrivates(screenInfo.screens[i]->devPrivates, PRIVATE_SCREEN); + free(screenInfo.screens[i]); screenInfo.numScreens = i; } + + dixFreePrivates(serverClient->devPrivates, PRIVATE_CLIENT); + serverClient->devPrivates = NULL; + FreeFonts(); FreeAuditTimer(); - dixFreePrivates(serverClient->devPrivates); - serverClient->devPrivates = NULL; - if (dispatchException & DE_TERMINATE) { CloseWellKnownConnections(); @@ -340,9 +347,9 @@ int main(int argc, char *argv[], char *envp[]) break; } - xfree(ConnectionInfo); + free(ConnectionInfo); ConnectionInfo = NULL; } - return(0); + return 0; } diff --git a/xserver/dix/pixmap.c b/xserver/dix/pixmap.c index 10ec02a78..cbb5e7f99 100644 --- a/xserver/dix/pixmap.c +++ b/xserver/dix/pixmap.c @@ -91,6 +91,11 @@ FreeScratchPixmapHeader(PixmapPtr pPixmap) Bool CreateScratchPixmapsForScreen(int scrnum) { + unsigned int pixmap_size; + + pixmap_size = sizeof(PixmapRec) + dixPrivatesSize(PRIVATE_PIXMAP); + screenInfo.screens[scrnum]->totalPixmapSize = BitmapBytePad(pixmap_size * 8); + /* let it be created on first use */ screenInfo.screens[scrnum]->pScratchPixmap = NULL; return TRUE; @@ -110,13 +115,23 @@ AllocatePixmap(ScreenPtr pScreen, int pixDataSize) { PixmapPtr pPixmap; + assert(pScreen->totalPixmapSize > 0); + if (pScreen->totalPixmapSize > ((size_t)-1) - pixDataSize) return NullPixmap; - pPixmap = xalloc(pScreen->totalPixmapSize + pixDataSize); + pPixmap = malloc(pScreen->totalPixmapSize + pixDataSize); if (!pPixmap) return NullPixmap; - pPixmap->devPrivates = NULL; + dixInitPrivates(pPixmap, pPixmap + 1, PRIVATE_PIXMAP); return pPixmap; } + +/* callable by ddx */ +void +FreePixmap(PixmapPtr pPixmap) +{ + dixFiniPrivates(pPixmap, PRIVATE_PIXMAP); + free(pPixmap); +} diff --git a/xserver/dix/privates.c b/xserver/dix/privates.c index e3e727462..17e1050d9 100644 --- a/xserver/dix/privates.c +++ b/xserver/dix/privates.c @@ -25,6 +25,28 @@ other dealings in this Software without prior written authorization from The Open Group. */ +/* + * Copyright © 2010, Keith Packard + * Copyright © 2010, Jamey Sharp + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that copyright + * notice and this permission notice appear in supporting documentation, and + * that the name of the copyright holders not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. The copyright holders make no representations + * about the suitability of this software for any purpose. It is provided "as + * is" without express or implied warranty. + * + * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE + * OF THIS SOFTWARE. + */ #ifdef HAVE_DIX_CONFIG_H #include @@ -38,215 +60,328 @@ from The Open Group. #include "cursorstr.h" #include "colormapst.h" #include "inputstr.h" +#include "scrnintstr.h" +#include "extnsionst.h" -struct _Private { - int state; - pointer value; +static struct { + DevPrivateKey key; + unsigned offset; + int created; + int allocated; +} keys[PRIVATE_LAST]; + +static const Bool xselinux_private[PRIVATE_LAST] = { + [PRIVATE_SCREEN] = TRUE, + [PRIVATE_CLIENT] = TRUE, + [PRIVATE_WINDOW] = TRUE, + [PRIVATE_PIXMAP] = TRUE, + [PRIVATE_GC] = TRUE, + [PRIVATE_CURSOR] = TRUE, + [PRIVATE_COLORMAP] = TRUE, + [PRIVATE_DEVICE] = TRUE, + [PRIVATE_EXTENSION] = TRUE, + [PRIVATE_SELECTION] = TRUE, + [PRIVATE_PROPERTY] = TRUE, + [PRIVATE_PICTURE] = TRUE, + [PRIVATE_GLYPHSET] = TRUE, }; -typedef struct _PrivateDesc { - DevPrivateKey key; - unsigned size; - CallbackListPtr initfuncs; - CallbackListPtr deletefuncs; -} PrivateDescRec; +typedef Bool (*FixupFunc)(PrivatePtr *privates, int offset, unsigned bytes); -#define PRIV_MAX 256 -#define PRIV_STEP 16 - -/* list of all allocated privates */ -static PrivateDescRec items[PRIV_MAX]; -static int nextPriv; - -static PrivateDescRec * -findItem(const DevPrivateKey key) +static Bool +dixReallocPrivates(PrivatePtr *privates, int old_offset, unsigned bytes) { - if (!*key) { - if (nextPriv >= PRIV_MAX) - return NULL; + void *new_privates; - items[nextPriv].key = key; - *key = nextPriv; - nextPriv++; + new_privates = realloc(*privates, old_offset + bytes); + if (!new_privates) + return FALSE; + memset((char *) new_privates + old_offset, '\0', bytes); + *privates = new_privates; + return TRUE; +} + +static Bool +dixMovePrivates(PrivatePtr *privates, int new_offset, unsigned bytes) +{ + memmove((char *) *privates + bytes, *privates, new_offset - bytes); + memset(*privates, '\0', bytes); + return TRUE; +} + +static Bool +fixupScreens(FixupFunc fixup, unsigned bytes) +{ + int s; + for (s = 0; s < screenInfo.numScreens; s++) + if (!fixup(&screenInfo.screens[s]->devPrivates, keys[PRIVATE_SCREEN].offset, bytes)) + return FALSE; + return TRUE; +} + +static Bool +fixupServerClient(FixupFunc fixup, unsigned bytes) +{ + if (serverClient) + return fixup(&serverClient->devPrivates, keys[PRIVATE_CLIENT].offset, bytes); + return TRUE; +} + +static Bool +fixupExtensions(FixupFunc fixup, unsigned bytes) +{ + unsigned char major; + ExtensionEntry *extension; + for (major = EXTENSION_BASE; (extension = GetExtensionEntry(major)); major++) + if (!fixup(&extension->devPrivates, keys[PRIVATE_EXTENSION].offset, bytes)) + return FALSE; + return TRUE; +} + +static Bool +fixupDefaultColormaps(FixupFunc fixup, unsigned bytes) +{ + int s; + for (s = 0; s < screenInfo.numScreens; s++) { + ColormapPtr cmap; + dixLookupResourceByType((pointer *) &cmap, screenInfo.screens[s]->defColormap, + RT_COLORMAP, serverClient, DixCreateAccess); + if (cmap && !fixup(&cmap->devPrivates, keys[PRIVATE_COLORMAP].offset, bytes)) + return FALSE; } - - return items + *key; + return TRUE; } -static _X_INLINE int -privateExists(PrivateRec **privates, const DevPrivateKey key) -{ - return *key && *privates && - (*privates)[0].state > *key && - (*privates)[*key].state; -} +static Bool (* const allocated_early[PRIVATE_LAST])(FixupFunc, unsigned) = { + [PRIVATE_SCREEN] = fixupScreens, + [PRIVATE_CLIENT] = fixupServerClient, + [PRIVATE_EXTENSION] = fixupExtensions, + [PRIVATE_COLORMAP] = fixupDefaultColormaps, +}; /* - * Request pre-allocated space. + * Register a private key. This takes the type of object the key will + * be used with, which may be PRIVATE_ALL indicating that this key + * will be used with all of the private objects. If 'size' is + * non-zero, then the specified amount of space will be allocated in + * the private storage. Otherwise, space for a single pointer will + * be allocated which can be set with dixSetPrivate */ -int -dixRequestPrivate(const DevPrivateKey key, unsigned size) +Bool +dixRegisterPrivateKey(DevPrivateKey key, DevPrivateType type, unsigned size) { - PrivateDescRec *item = findItem(key); - if (!item) - return FALSE; - if (size > item->size) - item->size = size; + DevPrivateType t; + int offset; + unsigned bytes; + + if (key->initialized) { + assert (size == key->size); + return TRUE; + } + + /* Compute required space */ + bytes = size; + if (size == 0) + bytes = sizeof (void *); + + /* align to void * size */ + bytes = (bytes + sizeof (void *) - 1) & ~(sizeof (void *) - 1); + + /* Update offsets for all affected keys */ + if (type == PRIVATE_XSELINUX) { + DevPrivateKey k; + + /* Resize if we can, or make sure nothing's allocated if we can't + */ + for (t = PRIVATE_XSELINUX; t < PRIVATE_LAST; t++) + if (xselinux_private[t]) { + if (!allocated_early[t]) + assert (!keys[t].created); + else if (!allocated_early[t](dixReallocPrivates, bytes)) + return FALSE; + } + + /* Move all existing keys up in the privates space to make + * room for this new global key + */ + for (t = PRIVATE_XSELINUX; t < PRIVATE_LAST; t++) { + if (xselinux_private[t]) { + for (k = keys[t].key; k; k = k->next) + k->offset += bytes; + keys[t].offset += bytes; + if (allocated_early[t]) + allocated_early[t](dixMovePrivates, bytes); + } + } + + offset = 0; + } else { + /* Resize if we can, or make sure nothing's allocated if we can't */ + if (!allocated_early[type]) + assert(!keys[type].created); + else if (!allocated_early[type](dixReallocPrivates, bytes)) + return FALSE; + offset = keys[type].offset; + keys[type].offset += bytes; + } + + /* Setup this key */ + key->offset = offset; + key->size = size; + key->initialized = TRUE; + key->type = type; + key->allocated = FALSE; + key->next = keys[type].key; + keys[type].key = key; + return TRUE; } /* - * Allocate a private and attach it to an existing object. + * Allocate a new private key. + * + * This manages the storage of the key object itself, freeing it when the + * privates system is restarted at server reset time. All other keys + * are expected to be statically allocated as the privates must be + * reset after all objects have been freed */ -pointer * -dixAllocatePrivate(PrivateRec **privates, const DevPrivateKey key) +DevPrivateKey +dixCreatePrivateKey(DevPrivateType type, unsigned size) { - PrivateDescRec *item = findItem(key); - PrivateCallbackRec calldata; - PrivateRec *ptr; - pointer value; - int oldsize, newsize; + DevPrivateKey key; - newsize = (*key / PRIV_STEP + 1) * PRIV_STEP; - - /* resize or init privates array */ - if (!item) + key = calloc(sizeof (DevPrivateKeyRec), 1); + if (!key) + return NULL; + if (!dixRegisterPrivateKey(key, type, size)) { + free(key); return NULL; - - /* initialize privates array if necessary */ - if (!*privates) { - ptr = xcalloc(newsize, sizeof(*ptr)); - if (!ptr) - return NULL; - *privates = ptr; - (*privates)[0].state = newsize; } - - oldsize = (*privates)[0].state; - - /* resize privates array if necessary */ - if (*key >= oldsize) { - ptr = xrealloc(*privates, newsize * sizeof(*ptr)); - if (!ptr) - return NULL; - memset(ptr + oldsize, 0, (newsize - oldsize) * sizeof(*ptr)); - *privates = ptr; - (*privates)[0].state = newsize; - } - - /* initialize slot */ - ptr = *privates + *key; - ptr->state = 1; - if (item->size) { - value = xcalloc(item->size, 1); - if (!value) - return NULL; - ptr->value = value; - } - - calldata.key = key; - calldata.value = &ptr->value; - CallCallbacks(&item->initfuncs, &calldata); - - return &ptr->value; + key->allocated = TRUE; + return key; } /* - * Look up a private pointer. - */ -pointer -dixLookupPrivate(PrivateRec **privates, const DevPrivateKey key) -{ - pointer *ptr; - - if (privateExists(privates, key)) - return (*privates)[*key].value; - - ptr = dixAllocatePrivate(privates, key); - return ptr ? *ptr : NULL; -} - -/* - * Look up the address of a private pointer. - */ -pointer * -dixLookupPrivateAddr(PrivateRec **privates, const DevPrivateKey key) -{ - if (privateExists(privates, key)) - return &(*privates)[*key].value; - - return dixAllocatePrivate(privates, key); -} - -/* - * Set a private pointer. - */ -int -dixSetPrivate(PrivateRec **privates, const DevPrivateKey key, pointer val) -{ - top: - if (privateExists(privates, key)) { - (*privates)[*key].value = val; - return TRUE; - } - - if (!dixAllocatePrivate(privates, key)) - return FALSE; - goto top; -} - -/* - * Called to free privates at object deletion time. + * Initialize privates by zeroing them */ void -dixFreePrivates(PrivateRec *privates) +_dixInitPrivates(PrivatePtr *privates, void *addr, DevPrivateType type) { - int i; - PrivateCallbackRec calldata; - - if (privates) - for (i = 1; i < privates->state; i++) - if (privates[i].state) { - /* call the delete callbacks */ - calldata.key = items[i].key; - calldata.value = &privates[i].value; - CallCallbacks(&items[i].deletefuncs, &calldata); - - /* free pre-allocated memory */ - if (items[i].size) - xfree(privates[i].value); - } - - xfree(privates); + keys[type].created++; + if (xselinux_private[type]) + keys[PRIVATE_XSELINUX].created++; + if (keys[type].offset == 0) + addr = 0; + *privates = addr; + memset(addr, '\0', keys[type].offset); } /* - * Callback registration + * Clean up privates */ -int -dixRegisterPrivateInitFunc(const DevPrivateKey key, - CallbackProcPtr callback, pointer data) +void +_dixFiniPrivates(PrivatePtr privates, DevPrivateType type) { - PrivateDescRec *item = findItem(key); - if (!item) - return FALSE; - - return AddCallback(&item->initfuncs, callback, data); + keys[type].created--; + if (xselinux_private[type]) + keys[PRIVATE_XSELINUX].created--; } -int -dixRegisterPrivateDeleteFunc(const DevPrivateKey key, - CallbackProcPtr callback, pointer data) +/* + * Allocate new object with privates. + * + * This is expected to be invoked from the + * dixAllocateObjectWithPrivates macro + */ +void * +_dixAllocateObjectWithPrivates(unsigned baseSize, unsigned clear, unsigned offset, DevPrivateType type) { - PrivateDescRec *item = findItem(key); - if (!item) - return FALSE; + unsigned totalSize; + void *object; + PrivatePtr privates; + PrivatePtr *devPrivates; - return AddCallback(&item->deletefuncs, callback, data); + assert (type > PRIVATE_SCREEN && type < PRIVATE_LAST); + + /* round up so that void * is aligned */ + baseSize = (baseSize + sizeof (void *) - 1) & ~(sizeof (void *) - 1); + totalSize = baseSize + keys[type].offset; + object = malloc(totalSize); + if (!object) + return NULL; + + memset(object, '\0', clear); + privates = (PrivatePtr) (((char *) object) + baseSize); + devPrivates = (PrivatePtr *) ((char *) object + offset); + + _dixInitPrivates(devPrivates, privates, type); + + return object; +} + +/* + * Allocate privates separately from containing object. + * Used for clients and screens. + */ +Bool +dixAllocatePrivates(PrivatePtr *privates, DevPrivateType type) +{ + unsigned size; + PrivatePtr p; + + assert (type > PRIVATE_XSELINUX && type < PRIVATE_LAST); + + size = keys[type].offset; + if (!size) { + p = NULL; + } else { + if (!(p = malloc(size))) + return FALSE; + } + + _dixInitPrivates(privates, p, type); + ++keys[type].allocated; + + return TRUE; +} + +/* + * Free an object that has privates + * + * This is expected to be invoked from the + * dixFreeObjectWithPrivates macro + */ +void +_dixFreeObjectWithPrivates(void *object, PrivatePtr privates, DevPrivateType type) +{ + _dixFiniPrivates(privates, type); + free(object); +} + +/* + * Called to free screen or client privates + */ +void +dixFreePrivates(PrivatePtr privates, DevPrivateType type) +{ + _dixFiniPrivates(privates, type); + --keys[type].allocated; + free(privates); +} + +/* + * Return size of privates for the specified type + */ +extern _X_EXPORT int +dixPrivatesSize(DevPrivateType type) +{ + assert (type >= PRIVATE_SCREEN && type < PRIVATE_LAST); + + return keys[type].offset; } /* Table of devPrivates offsets */ -static const int offsetDefaults[] = { +static const int offsets[] = { -1, /* RT_NONE */ offsetof(WindowRec, devPrivates), /* RT_WINDOW */ offsetof(PixmapRec, devPrivates), /* RT_PIXMAP */ @@ -254,69 +389,106 @@ static const int offsetDefaults[] = { -1, /* RT_FONT */ offsetof(CursorRec, devPrivates), /* RT_CURSOR */ offsetof(ColormapRec, devPrivates), /* RT_COLORMAP */ - -1, /* RT_CMAPENTRY */ - -1, /* RT_OTHERCLIENT */ - -1 /* RT_PASSIVEGRAB */ }; - -static int *offsets = NULL; -static int offsetsSize = 0; -/* - * Specify where the devPrivates field is located in a structure type - */ -int -dixRegisterPrivateOffset(RESTYPE type, int offset) -{ - type = type & TypeMask; - - /* resize offsets table if necessary */ - while (type >= offsetsSize) { - unsigned i = offsetsSize * 2 * sizeof(int); - offsets = (int *)xrealloc(offsets, i); - if (!offsets) { - offsetsSize = 0; - return FALSE; - } - for (i=offsetsSize; i < 2*offsetsSize; i++) - offsets[i] = -1; - offsetsSize *= 2; - } - - offsets[type] = offset; - return TRUE; -} +#define NUM_OFFSETS (sizeof (offsets) / sizeof (offsets[0])) int dixLookupPrivateOffset(RESTYPE type) { + /* + * Special kludge for DBE which registers a new resource type that + * points at pixmaps (thanks, DBE) + */ + if (type & RC_DRAWABLE) { + if (type == RT_WINDOW) + return offsets[RT_WINDOW & TypeMask]; + else + return offsets[RT_PIXMAP & TypeMask]; + } type = type & TypeMask; - assert(type < offsetsSize); - return offsets[type]; + if (type < NUM_OFFSETS) + return offsets[type]; + return -1; } -int +static const char *key_names[PRIVATE_LAST] = { + /* XSELinux uses the same private keys for numerous objects */ + [PRIVATE_XSELINUX] = "XSELINUX", + + /* Otherwise, you get a private in just the requested structure + */ + /* These can have objects created before all of the keys are registered */ + [PRIVATE_SCREEN] = "SCREEN", + [PRIVATE_EXTENSION] = "EXTENSION", + [PRIVATE_COLORMAP] = "COLORMAP", + + /* These cannot have any objects before all relevant keys are registered */ + [PRIVATE_DEVICE] = "DEVICE", + [PRIVATE_CLIENT] = "CLIENT", + [PRIVATE_PROPERTY] = "PROPERTY", + [PRIVATE_SELECTION] = "SELECTION", + [PRIVATE_WINDOW] = "WINDOW", + [PRIVATE_PIXMAP] = "PIXMAP", + [PRIVATE_GC] = "GC", + [PRIVATE_CURSOR] = "CURSOR", + [PRIVATE_CURSOR_BITS] = "CURSOR_BITS", + + /* extension privates */ + [PRIVATE_DBE_WINDOW] = "DBE_WINDOW", + [PRIVATE_DAMAGE] = "DAMAGE", + [PRIVATE_GLYPH] = "GLYPH", + [PRIVATE_GLYPHSET] = "GLYPHSET", + [PRIVATE_PICTURE] = "PICTURE", +}; + +void +dixPrivateUsage(void) +{ + int objects = 0; + int bytes = 0; + int alloc = 0; + DevPrivateType t; + + for (t = PRIVATE_XSELINUX + 1; t < PRIVATE_LAST; t++) { + if (keys[t].offset) { + ErrorF("%s: %d objects of %d bytes = %d total bytes %d private allocs\n", + key_names[t], keys[t].created, keys[t].offset, keys[t].created * keys[t].offset, + keys[t].allocated); + bytes += keys[t].created * keys[t].offset; + objects += keys[t].created; + alloc += keys[t].allocated; + } + } + ErrorF("TOTAL: %d objects, %d bytes, %d allocs\n", + objects, bytes, alloc); +} + +void dixResetPrivates(void) { - int i; + DevPrivateType t; - /* reset private descriptors */ - for (i = 1; i < nextPriv; i++) { - *items[i].key = 0; - items[i].size = 0; - DeleteCallbackList(&items[i].initfuncs); - DeleteCallbackList(&items[i].deletefuncs); + for (t = PRIVATE_XSELINUX; t < PRIVATE_LAST; t++) { + DevPrivateKey key, next; + + for (key = keys[t].key; key; key = next) { + next = key->next; + key->offset = 0; + key->initialized = FALSE; + key->size = 0; + key->type = 0; + if (key->allocated) + free(key); + } + if (keys[t].created) { + ErrorF("%d %ss still allocated at reset\n", + keys[t].created, key_names[t]); + dixPrivateUsage(); + } + keys[t].key = NULL; + keys[t].offset = 0; + keys[t].created = 0; + keys[t].allocated = 0; } - nextPriv = 1; - - /* reset offsets */ - if (offsets) - xfree(offsets); - offsetsSize = sizeof(offsetDefaults); - offsets = xalloc(offsetsSize); - offsetsSize /= sizeof(int); - if (!offsets) - return FALSE; - memcpy(offsets, offsetDefaults, sizeof(offsetDefaults)); - return TRUE; } diff --git a/xserver/dix/property.c b/xserver/dix/property.c index 9ec5dc6ae..1d4332a58 100644 --- a/xserver/dix/property.c +++ b/xserver/dix/property.c @@ -137,8 +137,8 @@ ProcRotateProperties(ClientPtr client) return rc; atoms = (Atom *) & stuff[1]; - props = xalloc(stuff->nAtoms * sizeof(PropertyPtr)); - saved = xalloc(stuff->nAtoms * sizeof(PropertyRec)); + props = malloc(stuff->nAtoms * sizeof(PropertyPtr)); + saved = malloc(stuff->nAtoms * sizeof(PropertyRec)); if (!props || !saved) { rc = BadAlloc; goto out; @@ -188,8 +188,8 @@ ProcRotateProperties(ClientPtr client) } } out: - xfree(saved); - xfree(props); + free(saved); + free(props); return rc; } @@ -230,12 +230,12 @@ ProcChangeProperty(ClientPtr client) if (!ValidAtom(stuff->property)) { client->errorValue = stuff->property; - return(BadAtom); + return BadAtom; } if (!ValidAtom(stuff->type)) { client->errorValue = stuff->type; - return(BadAtom); + return BadAtom; } err = dixChangeWindowProperty(client, pWin, stuff->property, stuff->type, @@ -244,7 +244,7 @@ ProcChangeProperty(ClientPtr client) if (err != Success) return err; else - return client->noClientException; + return Success; } int @@ -268,15 +268,15 @@ dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property, if (rc == BadMatch) /* just add to list */ { if (!pWin->optional && !MakeWindowOptional (pWin)) - return(BadAlloc); - pProp = xalloc(sizeof(PropertyRec)); + return BadAlloc; + pProp = dixAllocateObjectWithPrivates(PropertyRec, PRIVATE_PROPERTY); if (!pProp) - return(BadAlloc); - data = xalloc(totalSize); + return BadAlloc; + data = malloc(totalSize); if (!data && len) { - xfree(pProp); - return(BadAlloc); + dixFreeObjectWithPrivates(pProp, PRIVATE_PROPERTY); + return BadAlloc; } memcpy(data, value, totalSize); pProp->propertyName = property; @@ -284,12 +284,11 @@ dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property, pProp->format = format; pProp->data = data; pProp->size = len; - pProp->devPrivates = NULL; rc = XaceHookPropertyAccess(pClient, pWin, &pProp, DixCreateAccess|DixWriteAccess); if (rc != Success) { - xfree(data); - xfree(pProp); + free(data); + dixFreeObjectWithPrivates(pProp, PRIVATE_PROPERTY); pClient->errorValue = property; return rc; } @@ -304,18 +303,18 @@ dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property, "PropModeReplace" since they will be written over. */ if ((format != pProp->format) && (mode != PropModeReplace)) - return(BadMatch); + return BadMatch; if ((pProp->type != type) && (mode != PropModeReplace)) - return(BadMatch); + return BadMatch; /* save the old values for later */ savedProp = *pProp; if (mode == PropModeReplace) { - data = xalloc(totalSize); + data = malloc(totalSize); if (!data && len) - return(BadAlloc); + return BadAlloc; memcpy(data, value, totalSize); pProp->data = data; pProp->size = len; @@ -328,9 +327,9 @@ dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property, } else if (mode == PropModeAppend) { - data = xalloc((pProp->size + len) * sizeInBytes); + data = malloc((pProp->size + len) * sizeInBytes); if (!data) - return(BadAlloc); + return BadAlloc; memcpy(data, pProp->data, pProp->size * sizeInBytes); memcpy(data + pProp->size * sizeInBytes, value, totalSize); pProp->data = data; @@ -338,9 +337,9 @@ dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property, } else if (mode == PropModePrepend) { - data = xalloc(sizeInBytes * (len + pProp->size)); + data = malloc(sizeInBytes * (len + pProp->size)); if (!data) - return(BadAlloc); + return BadAlloc; memcpy(data + totalSize, pProp->data, pProp->size * sizeInBytes); memcpy(data, value, totalSize); pProp->data = data; @@ -353,12 +352,12 @@ dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property, if (rc == Success) { if (savedProp.data != pProp->data) - xfree(savedProp.data); + free(savedProp.data); } else { if (savedProp.data != pProp->data) - xfree(pProp->data); + free(pProp->data); *pProp = savedProp; return rc; } @@ -369,7 +368,7 @@ dixChangeWindowProperty(ClientPtr pClient, WindowPtr pWin, Atom property, if (sendevent) deliverPropertyNotifyEvent(pWin, PropertyNewValue, pProp->propertyName); - return(Success); + return Success; } int @@ -405,9 +404,8 @@ DeleteProperty(ClientPtr client, WindowPtr pWin, Atom propName) } deliverPropertyNotifyEvent(pWin, PropertyDelete, pProp->propertyName); - dixFreePrivates(pProp->devPrivates); - xfree(pProp->data); - xfree(pProp); + free(pProp->data); + dixFreeObjectWithPrivates(pProp, PRIVATE_PROPERTY); } return rc; } @@ -422,9 +420,8 @@ DeleteAllWindowProperties(WindowPtr pWin) { deliverPropertyNotifyEvent(pWin, PropertyDelete, pProp->propertyName); pNextProp = pProp->next; - dixFreePrivates(pProp->devPrivates); - xfree(pProp->data); - xfree(pProp); + free(pProp->data); + dixFreeObjectWithPrivates(pProp, PRIVATE_PROPERTY); pProp = pNextProp; } } @@ -442,7 +439,7 @@ NullPropertyReply( reply->propertyType = propertyType; reply->format = format; WriteReplyToClient(client, sizeof(xGenericReply), reply); - return(client->noClientException); + return Success; } /***************** @@ -479,17 +476,17 @@ ProcGetProperty(ClientPtr client) if (!ValidAtom(stuff->property)) { client->errorValue = stuff->property; - return(BadAtom); + return BadAtom; } if ((stuff->delete != xTrue) && (stuff->delete != xFalse)) { client->errorValue = stuff->delete; - return(BadValue); + return BadValue; } if ((stuff->type != AnyPropertyType) && !ValidAtom(stuff->type)) { client->errorValue = stuff->type; - return(BadAtom); + return BadAtom; } memset(&reply, 0, sizeof(xGetPropertyReply)); @@ -515,7 +512,7 @@ ProcGetProperty(ClientPtr client) reply.nItems = 0; reply.propertyType = pProp->type; WriteReplyToClient(client, sizeof(xGenericReply), &reply); - return(Success); + return Success; } /* @@ -570,11 +567,10 @@ ProcGetProperty(ClientPtr client) prevProp->next = pProp->next; } - dixFreePrivates(pProp->devPrivates); - xfree(pProp->data); - xfree(pProp); + free(pProp->data); + dixFreeObjectWithPrivates(pProp, PRIVATE_PROPERTY); } - return(client->noClientException); + return Success; } int @@ -595,7 +591,7 @@ ProcListProperties(ClientPtr client) for (pProp = wUserProps(pWin); pProp; pProp = pProp->next) numProps++; - if (numProps && !(pAtoms = xalloc(numProps * sizeof(Atom)))) + if (numProps && !(pAtoms = malloc(numProps * sizeof(Atom)))) return BadAlloc; numProps = 0; @@ -619,8 +615,8 @@ ProcListProperties(ClientPtr client) client->pSwapReplyFunc = (ReplySwapPtr)Swap32Write; WriteSwappedDataToClient(client, numProps * sizeof(Atom), pAtoms); } - xfree(pAtoms); - return(client->noClientException); + free(pAtoms); + return Success; } int @@ -638,12 +634,8 @@ ProcDeleteProperty(ClientPtr client) if (!ValidAtom(stuff->property)) { client->errorValue = stuff->property; - return (BadAtom); + return BadAtom; } - result = DeleteProperty(client, pWin, stuff->property); - if (client->noClientException != Success) - return(client->noClientException); - else - return(result); + return DeleteProperty(client, pWin, stuff->property); } diff --git a/xserver/dix/ptrveloc.c b/xserver/dix/ptrveloc.c index c2f43784c..30e14b17e 100644 --- a/xserver/dix/ptrveloc.c +++ b/xserver/dix/ptrveloc.c @@ -83,8 +83,6 @@ GetAccelerationProfile(DeviceVelocityPtr vel, int profile_num); /* some int which is not a profile number */ #define PROFILE_UNINITIALIZE (-100) -/* number of properties for predictable acceleration */ -#define NPROPS_PREDICTABLE_ACCEL 4 /** * Init struct so it should match the average case @@ -113,7 +111,7 @@ InitVelocityData(DeviceVelocityPtr vel) */ void FreeVelocityData(DeviceVelocityPtr vel){ - xfree(vel->tracker); + free(vel->tracker); SetAccelerationProfile(vel, PROFILE_UNINITIALIZE); } @@ -129,7 +127,7 @@ AccelerationDefaultCleanup(DeviceIntPtr dev) && dev->valuator->accelScheme.accelData != NULL){ dev->valuator->accelScheme.AccelSchemeProc = NULL; FreeVelocityData(dev->valuator->accelScheme.accelData); - xfree(dev->valuator->accelScheme.accelData); + free(dev->valuator->accelScheme.accelData); dev->valuator->accelScheme.accelData = NULL; DeletePredictableAccelerationProperties(dev); } @@ -323,26 +321,18 @@ AccelInitScaleProperty(DeviceIntPtr dev, DeviceVelocityPtr vel) return XIRegisterPropertyHandler(dev, AccelSetScaleProperty, NULL, NULL); } -static int AccelPropHandlerPrivateKeyIndex; -DevPrivateKey AccelPropHandlerPrivateKey = &AccelPropHandlerPrivateKeyIndex; - BOOL InitializePredictableAccelerationProperties(DeviceIntPtr dev) { DeviceVelocityPtr vel = GetDevicePredictableAccelData(dev); - long *prop_handlers; if(!vel) return FALSE; - prop_handlers = xalloc(NPROPS_PREDICTABLE_ACCEL * sizeof(long)); - prop_handlers[0] = AccelInitProfileProperty(dev, vel); - prop_handlers[1] = AccelInitDecelProperty(dev, vel); - prop_handlers[2] = AccelInitAdaptDecelProperty(dev, vel); - prop_handlers[3] = AccelInitScaleProperty(dev, vel); - - dixSetPrivate(&dev->devPrivates, AccelPropHandlerPrivateKey, - prop_handlers); + vel->prop_handlers[0] = AccelInitProfileProperty(dev, vel); + vel->prop_handlers[1] = AccelInitDecelProperty(dev, vel); + vel->prop_handlers[2] = AccelInitAdaptDecelProperty(dev, vel); + vel->prop_handlers[3] = AccelInitScaleProperty(dev, vel); return TRUE; } @@ -350,8 +340,8 @@ InitializePredictableAccelerationProperties(DeviceIntPtr dev) BOOL DeletePredictableAccelerationProperties(DeviceIntPtr dev) { + DeviceVelocityPtr vel; Atom prop; - long *prop_handlers; int i; prop = XIGetKnownProperty(ACCEL_PROP_VELOCITY_SCALING); @@ -363,13 +353,10 @@ DeletePredictableAccelerationProperties(DeviceIntPtr dev) prop = XIGetKnownProperty(ACCEL_PROP_PROFILE_NUMBER); XIDeleteDeviceProperty(dev, prop, FALSE); - prop_handlers = dixLookupPrivate(&dev->devPrivates, - AccelPropHandlerPrivateKey); - dixSetPrivate(&dev->devPrivates, AccelPropHandlerPrivateKey, NULL); - - for (i = 0; prop_handlers && i < NPROPS_PREDICTABLE_ACCEL; i++) - XIUnregisterPropertyHandler(dev, prop_handlers[i]); - xfree(prop_handlers); + vel = GetDevicePredictableAccelData(dev); + for (i = 0; vel && i < NPROPS_PREDICTABLE_ACCEL; i++) + if (vel->prop_handlers[i]) + XIUnregisterPropertyHandler(dev, vel->prop_handlers[i]); return TRUE; } @@ -385,8 +372,8 @@ InitTrackers(DeviceVelocityPtr vel, int ntracker) ErrorF("(dix ptracc) invalid number of trackers\n"); return; } - xfree(vel->tracker); - vel->tracker = (MotionTrackerPtr)xalloc(ntracker * sizeof(MotionTracker)); + free(vel->tracker); + vel->tracker = (MotionTrackerPtr)malloc(ntracker * sizeof(MotionTracker)); memset(vel->tracker, 0, ntracker * sizeof(MotionTracker)); vel->num_tracker = ntracker; } @@ -507,7 +494,7 @@ CalcTracker(DeviceVelocityPtr vel, int offset, int cur_t){ + vel->tracker[index].dy * vel->tracker[index].dy); int dtime = cur_t - vel->tracker[index].time; if(dtime > 0) - return (dist / dtime); + return dist / dtime; else return 0;/* synonymous for NaN, since we're not C99 */ } @@ -967,7 +954,7 @@ SetAccelerationProfile( if(vel->profile_private != NULL){ /* Here one could free old profile-private data */ - xfree(vel->profile_private); + free(vel->profile_private); vel->profile_private = NULL; } /* Here one could init profile-private data */ diff --git a/xserver/mi/miregion.c b/xserver/dix/region.c similarity index 82% rename from xserver/mi/miregion.c rename to xserver/dix/region.c index c48befc6f..5ba345773 100644 --- a/xserver/mi/miregion.c +++ b/xserver/dix/region.c @@ -83,8 +83,6 @@ Equipment Corporation. #include #include #include "gc.h" -#include "mi.h" -#include "mispans.h" #include #undef assert @@ -101,7 +99,7 @@ Equipment Corporation. #define assert(expr) #endif -#define good(reg) assert(miValidRegion(reg)) +#define good(reg) assert(RegionIsValid(reg)) /* * The functions in this file implement the Region abstraction used extensively @@ -144,7 +142,7 @@ Equipment Corporation. * * Adam de Boor wrote most of the original region code. Joel McCormack * substantially modified or rewrote most of the core arithmetic routines, - * and added miRegionValidate in order to support several speed improvements + * and added RegionValidate in order to support several speed improvements * to miValidateTree. Bob Scheifler changed the representation to be more * compact when empty or a single rectangle, and did a bunch of gratuitous * reformatting. @@ -171,16 +169,16 @@ Equipment Corporation. ((r1)->y1 <= (r2)->y1) && \ ((r1)->y2 >= (r2)->y2) ) -#define xallocData(n) xalloc(REGION_SZOF(n)) -#define xfreeData(reg) if ((reg)->data && (reg)->data->size) xfree((reg)->data) +#define xallocData(n) malloc(RegionSizeof(n)) +#define xfreeData(reg) if ((reg)->data && (reg)->data->size) free((reg)->data) #define RECTALLOC_BAIL(pReg,n,bail) \ if (!(pReg)->data || (((pReg)->data->numRects + (n)) > (pReg)->data->size)) \ - if (!miRectAlloc(pReg, n)) { goto bail; } + if (!RegionRectAlloc(pReg, n)) { goto bail; } #define RECTALLOC(pReg,n) \ if (!(pReg)->data || (((pReg)->data->numRects + (n)) > (pReg)->data->size)) \ - if (!miRectAlloc(pReg, n)) { return FALSE; } + if (!RegionRectAlloc(pReg, n)) { return FALSE; } #define ADDRECT(pNextRect,nx1,ny1,nx2,ny2) \ { \ @@ -195,9 +193,9 @@ if (!(pReg)->data || (((pReg)->data->numRects + (n)) > (pReg)->data->size)) \ { \ if (!(pReg)->data || ((pReg)->data->numRects == (pReg)->data->size))\ { \ - if (!miRectAlloc(pReg, 1)) \ + if (!RegionRectAlloc(pReg, 1)) \ return FALSE; \ - pNextRect = REGION_TOP(pReg); \ + pNextRect = RegionTop(pReg); \ } \ ADDRECT(pNextRect,nx1,ny1,nx2,ny2); \ pReg->data->numRects++; \ @@ -209,7 +207,7 @@ if (!(pReg)->data || (((pReg)->data->numRects + (n)) > (pReg)->data->size)) \ if (((numRects) < ((reg)->data->size >> 1)) && ((reg)->data->size > 50)) \ { \ RegDataPtr NewData; \ - NewData = (RegDataPtr)xrealloc((reg)->data, REGION_SZOF(numRects)); \ + NewData = (RegDataPtr)realloc((reg)->data, RegionSizeof(numRects)); \ if (NewData) \ { \ NewData->size = (numRects); \ @@ -218,16 +216,16 @@ if (((numRects) < ((reg)->data->size >> 1)) && ((reg)->data->size > 50)) \ } -BoxRec miEmptyBox = {0, 0, 0, 0}; -RegDataRec miEmptyData = {0, 0}; +BoxRec RegionEmptyBox = {0, 0, 0, 0}; +RegDataRec RegionEmptyData = {0, 0}; -RegDataRec miBrokenData = {0, 0}; -static RegionRec miBrokenRegion = { { 0, 0, 0, 0 }, &miBrokenData }; +RegDataRec RegionBrokenData = {0, 0}; +static RegionRec RegionBrokenRegion = { { 0, 0, 0, 0 }, &RegionBrokenData }; void InitRegions (void) { - pixman_region_set_static_pointers (&miEmptyBox, &miEmptyData, &miBrokenData); + pixman_region_set_static_pointers (&RegionEmptyBox, &RegionEmptyData, &RegionBrokenData); } /***************************************************************** @@ -237,37 +235,37 @@ InitRegions (void) *****************************************************************/ RegionPtr -miRegionCreate(BoxPtr rect, int size) +RegionCreate(BoxPtr rect, int size) { RegionPtr pReg; - pReg = (RegionPtr)xalloc(sizeof(RegionRec)); + pReg = (RegionPtr)malloc(sizeof(RegionRec)); if (!pReg) - return &miBrokenRegion; + return &RegionBrokenRegion; - miRegionInit (pReg, rect, size); + RegionInit (pReg, rect, size); - return(pReg); + return pReg; } void -miRegionDestroy(RegionPtr pReg) +RegionDestroy(RegionPtr pReg) { pixman_region_fini (pReg); - if (pReg != &miBrokenRegion) - xfree(pReg); + if (pReg != &RegionBrokenRegion) + free(pReg); } void -miPrintRegion(RegionPtr rgn) +RegionPrint(RegionPtr rgn) { int num, size; int i; BoxPtr rects; - num = REGION_NUM_RECTS(rgn); - size = REGION_SIZE(rgn); - rects = REGION_RECTS(rgn); + num = RegionNumRects(rgn); + size = RegionSize(rgn); + rects = RegionRects(rgn); ErrorF("[mi] num: %d size: %d\n", num, size); ErrorF("[mi] extents: %d %d %d %d\n", rgn->extents.x1, rgn->extents.y1, rgn->extents.x2, rgn->extents.y2); @@ -277,34 +275,28 @@ miPrintRegion(RegionPtr rgn) ErrorF("[mi] \n"); } -Bool -miRegionEqual(RegionPtr reg1, RegionPtr reg2) -{ - return pixman_region_equal (reg1, reg2); -} - #ifdef DEBUG Bool -miValidRegion(RegionPtr reg) +RegionIsValid(RegionPtr reg) { int i, numRects; if ((reg->extents.x1 > reg->extents.x2) || (reg->extents.y1 > reg->extents.y2)) return FALSE; - numRects = REGION_NUM_RECTS(reg); + numRects = RegionNumRects(reg); if (!numRects) return ((reg->extents.x1 == reg->extents.x2) && (reg->extents.y1 == reg->extents.y2) && - (reg->data->size || (reg->data == &miEmptyData))); + (reg->data->size || (reg->data == &RegionEmptyData))); else if (numRects == 1) - return (!reg->data); + return !reg->data; else { BoxPtr pboxP, pboxN; BoxRec box; - pboxP = REGION_RECTS(reg); + pboxP = RegionRects(reg); box = *pboxP; box.y2 = pboxP[numRects-1].y2; pboxN = pboxP + 1; @@ -330,37 +322,17 @@ miValidRegion(RegionPtr reg) } #endif /* DEBUG */ -/***************************************************************** - * RegionInit(pReg, rect, size) - * Outer region rect is statically allocated. - *****************************************************************/ - -void -miRegionInit(RegionPtr pReg, BoxPtr rect, int size) -{ - if (rect) - pixman_region_init_with_extents (pReg, rect); - else - pixman_region_init (pReg); -} - -void -miRegionUninit(RegionPtr pReg) -{ - pixman_region_fini (pReg); -} - Bool -miRegionBreak (RegionPtr pReg) +RegionBreak (RegionPtr pReg) { xfreeData (pReg); - pReg->extents = miEmptyBox; - pReg->data = &miBrokenData; + pReg->extents = RegionEmptyBox; + pReg->data = &RegionBrokenData; return FALSE; } Bool -miRectAlloc(RegionPtr pRgn, int n) +RegionRectAlloc(RegionPtr pRgn, int n) { RegDataPtr data; @@ -369,15 +341,15 @@ miRectAlloc(RegionPtr pRgn, int n) n++; pRgn->data = xallocData(n); if (!pRgn->data) - return miRegionBreak (pRgn); + return RegionBreak (pRgn); pRgn->data->numRects = 1; - *REGION_BOXPTR(pRgn) = pRgn->extents; + *RegionBoxptr(pRgn) = pRgn->extents; } else if (!pRgn->data->size) { pRgn->data = xallocData(n); if (!pRgn->data) - return miRegionBreak (pRgn); + return RegionBreak (pRgn); pRgn->data->numRects = 0; } else @@ -389,31 +361,25 @@ miRectAlloc(RegionPtr pRgn, int n) n = 250; } n += pRgn->data->numRects; - data = (RegDataPtr)xrealloc(pRgn->data, REGION_SZOF(n)); + data = (RegDataPtr)realloc(pRgn->data, RegionSizeof(n)); if (!data) - return miRegionBreak (pRgn); + return RegionBreak (pRgn); pRgn->data = data; } pRgn->data->size = n; return TRUE; } -Bool -miRegionCopy(RegionPtr dst, RegionPtr src) -{ - return pixman_region_copy (dst, src); -} - /*====================================================================== * Generic Region Operator *====================================================================*/ /*- *----------------------------------------------------------------------- - * miCoalesce -- + * RegionCoalesce -- * Attempt to merge the boxes in the current band with those in the * previous one. We are guaranteed that the current band extends to - * the end of the rects array. Used only by miRegionOp. + * the end of the rects array. Used only by RegionOp. * * Results: * The new index for the previous band. @@ -427,7 +393,7 @@ miRegionCopy(RegionPtr dst, RegionPtr src) *----------------------------------------------------------------------- */ _X_INLINE static int -miCoalesce ( +RegionCoalesce ( RegionPtr pReg, /* Region to coalesce */ int prevStart, /* Index of start of previous band */ int curStart) /* Index of start of current band */ @@ -448,8 +414,8 @@ miCoalesce ( * The bands may only be coalesced if the bottom of the previous * matches the top scanline of the current. */ - pPrevBox = REGION_BOX(pReg, prevStart); - pCurBox = REGION_BOX(pReg, curStart); + pPrevBox = RegionBox(pReg, prevStart); + pCurBox = RegionBox(pReg, curStart); if (pPrevBox->y2 != pCurBox->y1) return curStart; /* @@ -462,7 +428,7 @@ miCoalesce ( do { if ((pPrevBox->x1 != pCurBox->x1) || (pPrevBox->x2 != pCurBox->x2)) { - return (curStart); + return curStart; } pPrevBox++; pCurBox++; @@ -484,18 +450,18 @@ miCoalesce ( } -/* Quicky macro to avoid trivial reject procedure calls to miCoalesce */ +/* Quicky macro to avoid trivial reject procedure calls to RegionCoalesce */ #define Coalesce(newReg, prevBand, curBand) \ if (curBand - prevBand == newReg->data->numRects - curBand) { \ - prevBand = miCoalesce(newReg, prevBand, curBand); \ + prevBand = RegionCoalesce(newReg, prevBand, curBand); \ } else { \ prevBand = curBand; \ } /*- *----------------------------------------------------------------------- - * miAppendNonO -- + * RegionAppendNonO -- * Handle a non-overlapping band for the union and subtract operations. * Just adds the (top/bottom-clipped) rectangles into the region. * Doesn't have to check for subsumption or anything. @@ -511,7 +477,7 @@ miCoalesce ( */ _X_INLINE static Bool -miAppendNonO ( +RegionAppendNonO ( RegionPtr pReg, BoxPtr r, BoxPtr rEnd, @@ -528,7 +494,7 @@ miAppendNonO ( /* Make sure we have enough space for all rectangles to be added */ RECTALLOC(pReg, newRects); - pNextRect = REGION_TOP(pReg); + pNextRect = RegionTop(pReg); pReg->data->numRects += newRects; do { assert(r->x1 < r->x2); @@ -553,7 +519,7 @@ miAppendNonO ( int newRects; \ if ((newRects = rEnd - r)) { \ RECTALLOC(newReg, newRects); \ - memmove((char *)REGION_TOP(newReg),(char *)r, \ + memmove((char *)RegionTop(newReg),(char *)r, \ newRects * sizeof(BoxRec)); \ newReg->data->numRects += newRects; \ } \ @@ -561,9 +527,9 @@ miAppendNonO ( /*- *----------------------------------------------------------------------- - * miRegionOp -- - * Apply an operation to two regions. Called by miUnion, miInverse, - * miSubtract, miIntersect.... Both regions MUST have at least one + * RegionOp -- + * Apply an operation to two regions. Called by RegionUnion, RegionInverse, + * RegionSubtract, RegionIntersect.... Both regions MUST have at least one * rectangle, and cannot be the same object. * * Results: @@ -599,7 +565,7 @@ typedef Bool (*OverlapProcPtr)( Bool *pOverlap); static Bool -miRegionOp( +RegionOp( RegionPtr newReg, /* Place to store result */ RegionPtr reg1, /* First region in operation */ RegionPtr reg2, /* 2d region in operation */ @@ -634,8 +600,8 @@ miRegionOp( /* * Break any region computed from a broken region */ - if (REGION_NAR (reg1) || REGION_NAR(reg2)) - return miRegionBreak (newReg); + if (RegionNar (reg1) || RegionNar(reg2)) + return RegionBreak (newReg); /* * Initialization: @@ -645,11 +611,11 @@ miRegionOp( * another array of rectangles for it to use. */ - r1 = REGION_RECTS(reg1); - newSize = REGION_NUM_RECTS(reg1); + r1 = RegionRects(reg1); + newSize = RegionNumRects(reg1); r1End = r1 + newSize; - numRects = REGION_NUM_RECTS(reg2); - r2 = REGION_RECTS(reg2); + numRects = RegionNumRects(reg2); + r2 = RegionRects(reg2); r2End = r2 + numRects; assert(r1 != r1End); assert(r2 != r2End); @@ -659,18 +625,18 @@ miRegionOp( ((newReg == reg2) && (numRects > 1))) { oldData = newReg->data; - newReg->data = &miEmptyData; + newReg->data = &RegionEmptyData; } /* guess at new size */ if (numRects > newSize) newSize = numRects; newSize <<= 1; if (!newReg->data) - newReg->data = &miEmptyData; + newReg->data = &RegionEmptyData; else if (newReg->data->size) newReg->data->numRects = 0; if (newSize > newReg->data->size) - if (!miRectAlloc(newReg, newSize)) + if (!RegionRectAlloc(newReg, newSize)) return FALSE; /* @@ -691,7 +657,7 @@ miRegionOp( /* * prevBand serves to mark the start of the previous band so rectangles - * can be coalesced into larger rectangles. qv. miCoalesce, above. + * can be coalesced into larger rectangles. qv. RegionCoalesce, above. * In the beginning, there is no previous band, so prevBand == curBand * (curBand is set later on, of course, but the first band will always * start at index 0). prevBand and curBand must be indices because of @@ -728,7 +694,7 @@ miRegionOp( bot = min(r1->y2, r2y1); if (top != bot) { curBand = newReg->data->numRects; - miAppendNonO(newReg, r1, r1BandEnd, top, bot); + RegionAppendNonO(newReg, r1, r1BandEnd, top, bot); Coalesce(newReg, prevBand, curBand); } } @@ -739,7 +705,7 @@ miRegionOp( bot = min(r2->y2, r1y1); if (top != bot) { curBand = newReg->data->numRects; - miAppendNonO(newReg, r2, r2BandEnd, top, bot); + RegionAppendNonO(newReg, r2, r2BandEnd, top, bot); Coalesce(newReg, prevBand, curBand); } } @@ -781,7 +747,7 @@ miRegionOp( /* Do first nonOverlap1Func call, which may be able to coalesce */ FindBand(r1, r1BandEnd, r1End, r1y1); curBand = newReg->data->numRects; - miAppendNonO(newReg, r1, r1BandEnd, max(r1y1, ybot), r1->y2); + RegionAppendNonO(newReg, r1, r1BandEnd, max(r1y1, ybot), r1->y2); Coalesce(newReg, prevBand, curBand); /* Just append the rest of the boxes */ AppendRegions(newReg, r1BandEnd, r1End); @@ -790,23 +756,22 @@ miRegionOp( /* Do first nonOverlap2Func call, which may be able to coalesce */ FindBand(r2, r2BandEnd, r2End, r2y1); curBand = newReg->data->numRects; - miAppendNonO(newReg, r2, r2BandEnd, max(r2y1, ybot), r2->y2); + RegionAppendNonO(newReg, r2, r2BandEnd, max(r2y1, ybot), r2->y2); Coalesce(newReg, prevBand, curBand); /* Append rest of boxes */ AppendRegions(newReg, r2BandEnd, r2End); } - if (oldData) - xfree(oldData); + free(oldData); if (!(numRects = newReg->data->numRects)) { xfreeData(newReg); - newReg->data = &miEmptyData; + newReg->data = &RegionEmptyData; } else if (numRects == 1) { - newReg->extents = *REGION_BOXPTR(newReg); + newReg->extents = *RegionBoxptr(newReg); xfreeData(newReg); newReg->data = NULL; } @@ -820,10 +785,10 @@ miRegionOp( /*- *----------------------------------------------------------------------- - * miSetExtents -- + * RegionSetExtents -- * Reset the extents of a region to what they should be. Called by - * miSubtract and miIntersect as they can't figure it out along the - * way or do so easily, as miUnion can. + * Subtract and Intersect as they can't figure it out along the + * way or do so easily, as Union can. * * Results: * None. @@ -834,7 +799,7 @@ miRegionOp( *----------------------------------------------------------------------- */ static void -miSetExtents (RegionPtr pReg) +RegionSetExtents (RegionPtr pReg) { BoxPtr pBox, pBoxEnd; @@ -847,8 +812,8 @@ miSetExtents (RegionPtr pReg) return; } - pBox = REGION_BOXPTR(pReg); - pBoxEnd = REGION_END(pReg); + pBox = RegionBoxptr(pReg); + pBoxEnd = RegionEnd(pReg); /* * Since pBox is the first rectangle in the region, it must have the @@ -879,8 +844,8 @@ miSetExtents (RegionPtr pReg) *====================================================================*/ /*- *----------------------------------------------------------------------- - * miIntersectO -- - * Handle an overlapping band for miIntersect. + * RegionIntersectO -- + * Handle an overlapping band for RegionIntersect. * * Results: * TRUE if successful. @@ -891,15 +856,6 @@ miSetExtents (RegionPtr pReg) *----------------------------------------------------------------------- */ /*ARGSUSED*/ -Bool -miIntersect( - RegionPtr newReg, /* destination Region */ - RegionPtr reg1, - RegionPtr reg2 /* source regions */ - ) -{ - return pixman_region_intersect (newReg, reg1, reg2); -} #define MERGERECT(r) \ { \ @@ -922,7 +878,7 @@ miIntersect( /*- *----------------------------------------------------------------------- - * miUnionO -- + * RegionUnionO -- * Handle an overlapping band for the union operation. Picks the * left-most rectangle each time and merges it into the region. * @@ -936,7 +892,7 @@ miIntersect( *----------------------------------------------------------------------- */ static Bool -miUnionO ( +RegionUnionO ( RegionPtr pReg, BoxPtr r1, BoxPtr r1End, @@ -953,7 +909,7 @@ miUnionO ( assert (y1 < y2); assert(r1 != r1End && r2 != r2End); - pNextRect = REGION_TOP(pReg); + pNextRect = RegionTop(pReg); /* Start off current rectangle */ if (r1->x1 < r2->x1) @@ -995,29 +951,19 @@ miUnionO ( return TRUE; } -Bool -miUnion( - RegionPtr newReg, /* destination Region */ - RegionPtr reg1, - RegionPtr reg2 /* source regions */ - ) -{ - return pixman_region_union (newReg, reg1, reg2); -} - /*====================================================================== * Batch Rectangle Union *====================================================================*/ /*- *----------------------------------------------------------------------- - * miRegionAppend -- + * RegionAppend -- * * "Append" the rgn rectangles onto the end of dstrgn, maintaining * knowledge of YX-banding when it's easy. Otherwise, dstrgn just * becomes a non-y-x-banded random collection of rectangles, and not * yet a true region. After a sequence of appends, the caller must - * call miRegionValidate to ensure that a valid region is constructed. + * call RegionValidate to ensure that a valid region is constructed. * * Results: * TRUE if successful. @@ -1027,32 +973,32 @@ miUnion( * */ Bool -miRegionAppend(RegionPtr dstrgn, RegionPtr rgn) +RegionAppend(RegionPtr dstrgn, RegionPtr rgn) { int numRects, dnumRects, size; BoxPtr new, old; Bool prepend; - if (REGION_NAR(rgn)) - return miRegionBreak (dstrgn); + if (RegionNar(rgn)) + return RegionBreak (dstrgn); - if (!rgn->data && (dstrgn->data == &miEmptyData)) + if (!rgn->data && (dstrgn->data == &RegionEmptyData)) { dstrgn->extents = rgn->extents; dstrgn->data = NULL; return TRUE; } - numRects = REGION_NUM_RECTS(rgn); + numRects = RegionNumRects(rgn); if (!numRects) return TRUE; prepend = FALSE; size = numRects; - dnumRects = REGION_NUM_RECTS(dstrgn); + dnumRects = RegionNumRects(dstrgn); if (!dnumRects && (size < 200)) size = 200; /* XXX pick numbers out of a hat */ RECTALLOC(dstrgn, size); - old = REGION_RECTS(rgn); + old = RegionRects(rgn); if (!dnumRects) dstrgn->extents = rgn->extents; else if (dstrgn->extents.x2 > dstrgn->extents.x1) @@ -1060,7 +1006,7 @@ miRegionAppend(RegionPtr dstrgn, RegionPtr rgn) BoxPtr first, last; first = old; - last = REGION_BOXPTR(dstrgn) + (dnumRects - 1); + last = RegionBoxptr(dstrgn) + (dnumRects - 1); if ((first->y1 > last->y2) || ((first->y1 == last->y1) && (first->y2 == last->y2) && (first->x1 > last->x2))) @@ -1073,7 +1019,7 @@ miRegionAppend(RegionPtr dstrgn, RegionPtr rgn) } else { - first = REGION_BOXPTR(dstrgn); + first = RegionBoxptr(dstrgn); last = old + (numRects - 1); if ((first->y1 > last->y2) || ((first->y1 == last->y1) && (first->y2 == last->y2) && @@ -1092,16 +1038,16 @@ miRegionAppend(RegionPtr dstrgn, RegionPtr rgn) } if (prepend) { - new = REGION_BOX(dstrgn, numRects); + new = RegionBox(dstrgn, numRects); if (dnumRects == 1) - *new = *REGION_BOXPTR(dstrgn); + *new = *RegionBoxptr(dstrgn); else - memmove((char *)new,(char *)REGION_BOXPTR(dstrgn), + memmove((char *)new,(char *)RegionBoxptr(dstrgn), dnumRects * sizeof(BoxRec)); - new = REGION_BOXPTR(dstrgn); + new = RegionBoxptr(dstrgn); } else - new = REGION_BOXPTR(dstrgn) + dnumRects; + new = RegionBoxptr(dstrgn) + dnumRects; if (numRects == 1) *new = *old; else @@ -1180,7 +1126,7 @@ QuickSortRects( /*- *----------------------------------------------------------------------- - * miRegionValidate -- + * RegionValidate -- * * Take a ``region'' which is a non-y-x-banded random collection of * rectangles, and compute a nice region which is the union of all the @@ -1204,14 +1150,14 @@ QuickSortRects( * or a coalescing into 1 box (ala Menus). * * Step 3. Merge the separate regions down to a single region by calling - * miUnion. Maximize the work each miUnion call does by using + * Union. Maximize the work each Union call does by using * a binary merge. * *----------------------------------------------------------------------- */ Bool -miRegionValidate(RegionPtr badreg, Bool *pOverlap) +RegionValidate(RegionPtr badreg, Bool *pOverlap) { /* Descriptor for regions under construction in Step 2. */ typedef struct { @@ -1242,7 +1188,7 @@ miRegionValidate(RegionPtr badreg, Bool *pOverlap) numRects = badreg->data->numRects; if (!numRects) { - if (REGION_NAR(badreg)) + if (RegionNar(badreg)) return FALSE; good(badreg); return TRUE; @@ -1263,21 +1209,21 @@ miRegionValidate(RegionPtr badreg, Bool *pOverlap) } /* Step 1: Sort the rects array into ascending (y1, x1) order */ - QuickSortRects(REGION_BOXPTR(badreg), numRects); + QuickSortRects(RegionBoxptr(badreg), numRects); /* Step 2: Scatter the sorted array into the minimum number of regions */ /* Set up the first region to be the first rectangle in badreg */ /* Note that step 2 code will never overflow the ri[0].reg rects array */ - ri = (RegionInfo *) xalloc(4 * sizeof(RegionInfo)); + ri = (RegionInfo *) malloc(4 * sizeof(RegionInfo)); if (!ri) - return miRegionBreak (badreg); + return RegionBreak (badreg); sizeRI = 4; numRI = 1; ri[0].prevBand = 0; ri[0].curBand = 0; ri[0].reg = *badreg; - box = REGION_BOXPTR(&ri[0].reg); + box = RegionBoxptr(&ri[0].reg); ri[0].reg.extents = *box; ri[0].reg.data->numRects = 1; @@ -1294,7 +1240,7 @@ miRegionValidate(RegionPtr badreg, Bool *pOverlap) for (j = numRI, rit = ri; --j >= 0; rit++) { reg = &rit->reg; - riBox = REGION_END(reg); + riBox = RegionEnd(reg); if (box->y1 == riBox->y1 && box->y2 == riBox->y2) { @@ -1308,7 +1254,7 @@ miRegionValidate(RegionPtr badreg, Bool *pOverlap) else { RECTALLOC_BAIL(reg, 1, bail); - *REGION_TOP(reg) = *box; + *RegionTop(reg) = *box; reg->data->numRects++; } goto NextRect; /* So sue me */ @@ -1321,7 +1267,7 @@ miRegionValidate(RegionPtr badreg, Bool *pOverlap) Coalesce(reg, rit->prevBand, rit->curBand); rit->curBand = reg->data->numRects; RECTALLOC_BAIL(reg, 1, bail); - *REGION_TOP(reg) = *box; + *RegionTop(reg) = *box; reg->data->numRects++; goto NextRect; } @@ -1333,7 +1279,7 @@ miRegionValidate(RegionPtr badreg, Bool *pOverlap) { /* Oops, allocate space for new region information */ sizeRI <<= 1; - rit = (RegionInfo *) xrealloc(ri, sizeRI * sizeof(RegionInfo)); + rit = (RegionInfo *) realloc(ri, sizeRI * sizeof(RegionInfo)); if (!rit) goto bail; ri = rit; @@ -1344,7 +1290,7 @@ miRegionValidate(RegionPtr badreg, Bool *pOverlap) rit->curBand = 0; rit->reg.extents = *box; rit->reg.data = NULL; - if (!miRectAlloc(&rit->reg, (i+numRI) / numRI)) /* MUST force allocation */ + if (!RegionRectAlloc(&rit->reg, (i+numRI) / numRI)) /* MUST force allocation */ goto bail; NextRect: ; } /* for i */ @@ -1355,7 +1301,7 @@ NextRect: ; for (j = numRI, rit = ri; --j >= 0; rit++) { reg = &rit->reg; - riBox = REGION_END(reg); + riBox = RegionEnd(reg); reg->extents.y2 = riBox->y2; if (reg->extents.x2 < riBox->x2) reg->extents.x2 = riBox->x2; Coalesce(reg, rit->prevBand, rit->curBand); @@ -1374,7 +1320,7 @@ NextRect: ; { reg = &ri[j].reg; hreg = &ri[j+half].reg; - if (!miRegionOp(reg, reg, hreg, miUnionO, TRUE, TRUE, pOverlap)) + if (!RegionOp(reg, reg, hreg, RegionUnionO, TRUE, TRUE, pOverlap)) ret = FALSE; if (hreg->extents.x1 < reg->extents.x1) reg->extents.x1 = hreg->extents.x1; @@ -1389,18 +1335,18 @@ NextRect: ; numRI -= half; } *badreg = ri[0].reg; - xfree(ri); + free(ri); good(badreg); return ret; bail: for (i = 0; i < numRI; i++) xfreeData(&ri[i].reg); - xfree (ri); - return miRegionBreak (badreg); + free(ri); + return RegionBreak (badreg); } RegionPtr -miRectsToRegion(int nrects, xRectangle *prect, int ctype) +RegionFromRects(int nrects, xRectangle *prect, int ctype) { RegionPtr pRgn; @@ -1409,8 +1355,8 @@ miRectsToRegion(int nrects, xRectangle *prect, int ctype) int i; int x1, y1, x2, y2; - pRgn = miRegionCreate(NullBox, 0); - if (REGION_NAR (pRgn)) + pRgn = RegionCreate(NullBox, 0); + if (RegionNar (pRgn)) return pRgn; if (!nrects) return pRgn; @@ -1435,7 +1381,7 @@ miRectsToRegion(int nrects, xRectangle *prect, int ctype) pData = xallocData(nrects); if (!pData) { - miRegionBreak (pRgn); + RegionBreak (pRgn); return pRgn; } pBox = (BoxPtr) (pData + 1); @@ -1465,151 +1411,19 @@ miRectsToRegion(int nrects, xRectangle *prect, int ctype) { Bool overlap; /* result ignored */ pRgn->extents.x1 = pRgn->extents.x2 = 0; - miRegionValidate(pRgn, &overlap); + RegionValidate(pRgn, &overlap); } else - miSetExtents(pRgn); + RegionSetExtents(pRgn); good(pRgn); } else { - xfree (pData); + free(pData); } return pRgn; } -/*====================================================================== - * Region Subtraction - *====================================================================*/ - - -/*- - *----------------------------------------------------------------------- - * miSubtractO -- - * Overlapping band subtraction. x1 is the left-most point not yet - * checked. - * - * Results: - * TRUE if successful. - * - * Side Effects: - * pReg may have rectangles added to it. - * - *----------------------------------------------------------------------- - */ -/*ARGSUSED*/ - -/*- - *----------------------------------------------------------------------- - * miSubtract -- - * Subtract regS from regM and leave the result in regD. - * S stands for subtrahend, M for minuend and D for difference. - * - * Results: - * TRUE if successful. - * - * Side Effects: - * regD is overwritten. - * - *----------------------------------------------------------------------- - */ -Bool -miSubtract(RegionPtr regD, RegionPtr regM, RegionPtr regS) -{ - return pixman_region_subtract (regD, regM, regS); -} - -/*====================================================================== - * Region Inversion - *====================================================================*/ - -/*- - *----------------------------------------------------------------------- - * miInverse -- - * Take a region and a box and return a region that is everything - * in the box but not in the region. The careful reader will note - * that this is the same as subtracting the region from the box... - * - * Results: - * TRUE. - * - * Side Effects: - * newReg is overwritten. - * - *----------------------------------------------------------------------- - */ -Bool -miInverse( - RegionPtr newReg, /* Destination region */ - RegionPtr reg1, /* Region to invert */ - BoxPtr invRect /* Bounding box for inversion */ - ) -{ - return pixman_region_inverse (newReg, reg1, invRect); -} -int -miRectIn(RegionPtr region, BoxPtr prect) -{ - return pixman_region_contains_rectangle (region, prect); -} - -/* TranslateRegion(pReg, x, y) - translates in place -*/ - -void -miTranslateRegion(RegionPtr pReg, int x, int y) -{ - pixman_region_translate (pReg, x, y); -} - -void -miRegionReset(RegionPtr pReg, BoxPtr pBox) -{ - pixman_region_reset (pReg, pBox); -} - -Bool -miPointInRegion( - RegionPtr pReg, - int x, - int y, - BoxPtr box /* "return" value */ - ) -{ - return pixman_region_contains_point (pReg, x, y, box); -} - -Bool -miRegionNotEmpty(RegionPtr pReg) -{ - return pixman_region_not_empty (pReg); -} - -Bool -miRegionBroken(RegionPtr pReg) -{ - good(pReg); - return (REGION_NAR(pReg)); -} - -void -miRegionEmpty(RegionPtr pReg) -{ - good(pReg); - xfreeData(pReg); - pReg->extents.x2 = pReg->extents.x1; - pReg->extents.y2 = pReg->extents.y1; - pReg->data = &miEmptyData; -} - -BoxPtr -miRegionExtents(RegionPtr pReg) -{ - good(pReg); - return(&pReg->extents); -} - #define ExchangeSpans(a, b) \ { \ DDXPointRec tpt; \ @@ -1729,7 +1543,7 @@ static void QuickSortSpans( */ int -miClipSpans( +RegionClipSpans( RegionPtr prgnDst, DDXPointPtr ppt, int *pwidth, @@ -1795,7 +1609,7 @@ miClipSpans( if ((! fSorted) && (nspans > 1)) QuickSortSpans(ppt, pwidth, nspans); - pboxBandStart = REGION_BOXPTR(prgnDst); + pboxBandStart = RegionBoxptr(prgnDst); pboxLast = pboxBandStart + numRects; NextBand(); @@ -1841,5 +1655,5 @@ miClipSpans( } } } - return (pwidthNew - pwidthNewStart); + return pwidthNew - pwidthNewStart; } diff --git a/xserver/dix/registry.c b/xserver/dix/registry.c index 1381a3dcd..fc35dbbc7 100644 --- a/xserver/dix/registry.c +++ b/xserver/dix/registry.c @@ -61,7 +61,7 @@ static int double_size(void *p, unsigned n, unsigned size) n = f = BASE_SIZE * size; } - *ptr = xrealloc(*ptr, n); + *ptr = realloc(*ptr, n); if (!*ptr) { dixResetRegistry(); return FALSE; @@ -285,20 +285,20 @@ dixResetRegistry(void) while (nmajor--) { while (nminor[nmajor]) free(requests[nmajor][--nminor[nmajor]]); - xfree(requests[nmajor]); + free(requests[nmajor]); } - xfree(requests); - xfree(nminor); + free(requests); + free(nminor); while (nevent--) free(events[nevent]); - xfree(events); + free(events); while (nerror--) free(errors[nerror]); - xfree(errors); + free(errors); - xfree(resources); + free(resources); requests = NULL; nminor = NULL; diff --git a/xserver/dix/resource.c b/xserver/dix/resource.c index ab3762eb5..a0fe719de 100644 --- a/xserver/dix/resource.c +++ b/xserver/dix/resource.c @@ -183,7 +183,54 @@ RESTYPE lastResourceType; static RESTYPE lastResourceClass; RESTYPE TypeMask; -static DeleteType *DeleteFuncs = (DeleteType *)NULL; +struct ResourceType { + DeleteType deleteFunc; + int errorValue; +}; + +static struct ResourceType *resourceTypes; +static const struct ResourceType predefTypes[] = { + [RT_NONE & (RC_LASTPREDEF - 1)] = { + .deleteFunc = (DeleteType)NoopDDA, + .errorValue = BadValue, + }, + [RT_WINDOW & (RC_LASTPREDEF - 1)] = { + .deleteFunc = DeleteWindow, + .errorValue = BadWindow, + }, + [RT_PIXMAP & (RC_LASTPREDEF - 1)] = { + .deleteFunc = dixDestroyPixmap, + .errorValue = BadPixmap, + }, + [RT_GC & (RC_LASTPREDEF - 1)] = { + .deleteFunc = FreeGC, + .errorValue = BadGC, + }, + [RT_FONT & (RC_LASTPREDEF - 1)] = { + .deleteFunc = CloseFont, + .errorValue = BadFont, + }, + [RT_CURSOR & (RC_LASTPREDEF - 1)] = { + .deleteFunc = FreeCursor, + .errorValue = BadCursor, + }, + [RT_COLORMAP & (RC_LASTPREDEF - 1)] = { + .deleteFunc = FreeColormap, + .errorValue = BadColor, + }, + [RT_CMAPENTRY & (RC_LASTPREDEF - 1)] = { + .deleteFunc = FreeClientPixels, + .errorValue = BadColor, + }, + [RT_OTHERCLIENT & (RC_LASTPREDEF - 1)] = { + .deleteFunc = OtherClientGone, + .errorValue = BadValue, + }, + [RT_PASSIVEGRAB & (RC_LASTPREDEF - 1)] = { + .deleteFunc = DeletePassiveGrab, + .errorValue = BadValue, + }, +}; CallbackListPtr ResourceStateCallback; @@ -200,20 +247,18 @@ RESTYPE CreateNewResourceType(DeleteType deleteFunc, char *name) { RESTYPE next = lastResourceType + 1; - DeleteType *funcs; + struct ResourceType *types; if (next & lastResourceClass) return 0; - funcs = (DeleteType *)xrealloc(DeleteFuncs, - (next + 1) * sizeof(DeleteType)); - if (!funcs) - return 0; - if (!dixRegisterPrivateOffset(next, -1)) + types = realloc(resourceTypes, (next + 1) * sizeof(*resourceTypes)); + if (!types) return 0; lastResourceType = next; - DeleteFuncs = funcs; - DeleteFuncs[next] = deleteFunc; + resourceTypes = types; + resourceTypes[next].deleteFunc = deleteFunc; + resourceTypes[next].errorValue = BadValue; /* Called even if name is NULL, to remove any previous entry */ RegisterResourceName(next, name); @@ -221,6 +266,12 @@ CreateNewResourceType(DeleteType deleteFunc, char *name) return next; } +void +SetResourceTypeErrorValue(RESTYPE type, int errorValue) +{ + resourceTypes[type & TypeMask].errorValue = errorValue; +} + RESTYPE CreateNewResourceClass(void) { @@ -251,24 +302,14 @@ InitClientResources(ClientPtr client) lastResourceType = RT_LASTPREDEF; lastResourceClass = RC_LASTPREDEF; TypeMask = RC_LASTPREDEF - 1; - if (DeleteFuncs) - xfree(DeleteFuncs); - DeleteFuncs = xalloc((lastResourceType + 1) * sizeof(DeleteType)); - if (!DeleteFuncs) + free(resourceTypes); + resourceTypes = malloc(sizeof(predefTypes)); + if (!resourceTypes) return FALSE; - DeleteFuncs[RT_NONE & TypeMask] = (DeleteType)NoopDDA; - DeleteFuncs[RT_WINDOW & TypeMask] = DeleteWindow; - DeleteFuncs[RT_PIXMAP & TypeMask] = dixDestroyPixmap; - DeleteFuncs[RT_GC & TypeMask] = FreeGC; - DeleteFuncs[RT_FONT & TypeMask] = CloseFont; - DeleteFuncs[RT_CURSOR & TypeMask] = FreeCursor; - DeleteFuncs[RT_COLORMAP & TypeMask] = FreeColormap; - DeleteFuncs[RT_CMAPENTRY & TypeMask] = FreeClientPixels; - DeleteFuncs[RT_OTHERCLIENT & TypeMask] = OtherClientGone; - DeleteFuncs[RT_PASSIVEGRAB & TypeMask] = DeletePassiveGrab; + memcpy(resourceTypes, predefTypes, sizeof(predefTypes)); } clientTable[i = client->index].resources = - xalloc(INITBUCKETS*sizeof(ResourcePtr)); + malloc(INITBUCKETS*sizeof(ResourcePtr)); if (!clientTable[i].resources) return FALSE; clientTable[i].buckets = INITBUCKETS; @@ -459,10 +500,10 @@ AddResource(XID id, RESTYPE type, pointer value) (rrec->hashsize < MAXHASHSIZE)) RebuildTable(client); head = &rrec->resources[Hash(client, id)]; - res = xalloc(sizeof(ResourceRec)); + res = malloc(sizeof(ResourceRec)); if (!res) { - (*DeleteFuncs[type & TypeMask])(value, id); + (*resourceTypes[type & TypeMask].deleteFunc)(value, id); return FALSE; } res->next = *head; @@ -491,13 +532,13 @@ RebuildTable(int client) */ j = 2 * clientTable[client].buckets; - tails = xalloc(j * sizeof(ResourcePtr *)); + tails = malloc(j * sizeof(ResourcePtr *)); if (!tails) return; - resources = xalloc(j * sizeof(ResourcePtr)); + resources = malloc(j * sizeof(ResourcePtr)); if (!resources) { - xfree(tails); + free(tails); return; } for (rptr = resources, tptr = tails; --j >= 0; rptr++, tptr++) @@ -520,9 +561,9 @@ RebuildTable(int client) *tptr = &res->next; } } - xfree(tails); + free(tails); clientTable[client].buckets *= 2; - xfree(clientTable[client].resources); + free(clientTable[client].resources); clientTable[client].resources = resources; } @@ -557,8 +598,8 @@ FreeResource(XID id, RESTYPE skipDeleteFuncType) CallResourceStateCallback(ResourceStateFreeing, res); if (rtype != skipDeleteFuncType) - (*DeleteFuncs[rtype & TypeMask])(res->value, res->id); - xfree(res); + (*resourceTypes[rtype & TypeMask].deleteFunc)(res->value, res->id); + free(res); if (*eltptr != elements) prev = head; /* prev may no longer be valid */ } @@ -594,8 +635,8 @@ FreeResourceByType(XID id, RESTYPE type, Bool skipFree) CallResourceStateCallback(ResourceStateFreeing, res); if (!skipFree) - (*DeleteFuncs[type & TypeMask])(res->value, res->id); - xfree(res); + (*resourceTypes[type & TypeMask].deleteFunc)(res->value, res->id); + free(res); break; } else @@ -761,8 +802,8 @@ FreeClientNeverRetainResources(ClientPtr client) CallResourceStateCallback(ResourceStateFreeing, this); elements = *eltptr; - (*DeleteFuncs[rtype & TypeMask])(this->value, this->id); - xfree(this); + (*resourceTypes[rtype & TypeMask].deleteFunc)(this->value, this->id); + free(this); if (*eltptr != elements) prev = &resources[j]; /* prev may no longer be valid */ } @@ -815,11 +856,11 @@ FreeClientResources(ClientPtr client) CallResourceStateCallback(ResourceStateFreeing, this); - (*DeleteFuncs[rtype & TypeMask])(this->value, this->id); - xfree(this); + (*resourceTypes[rtype & TypeMask].deleteFunc)(this->value, this->id); + free(this); } } - xfree(clientTable[client->index].resources); + free(clientTable[client->index].resources); clientTable[client->index].resources = NULL; clientTable[client->index].buckets = 0; } @@ -860,7 +901,7 @@ LegalNewID(XID id, ClientPtr client) rc = dixLookupResourceByClass(&val, id, RC_ANY, serverClient, DixGetAttrAccess); - return (rc == BadValue); + return rc == BadValue; } return FALSE; } @@ -873,6 +914,8 @@ dixLookupResourceByType(pointer *result, XID id, RESTYPE rtype, ResourcePtr res = NULL; *result = NULL; + if ((rtype & TypeMask) > lastResourceType) + return BadImplementation; if ((cid < MAXCLIENTS) && clientTable[cid].buckets) { res = clientTable[cid].resources[Hash(cid, id)]; @@ -882,12 +925,14 @@ dixLookupResourceByType(pointer *result, XID id, RESTYPE rtype, break; } if (!res) - return BadValue; + return resourceTypes[rtype & TypeMask].errorValue; if (client) { client->errorValue = id; cid = XaceHook(XACE_RESOURCE_ACCESS, client, id, res->type, res->value, RT_NONE, NULL, mode); + if (cid == BadValue) + return resourceTypes[rtype & TypeMask].errorValue; if (cid != Success) return cid; } diff --git a/xserver/dix/selection.c b/xserver/dix/selection.c index d72f381ca..87ed1abe9 100644 --- a/xserver/dix/selection.c +++ b/xserver/dix/selection.c @@ -94,8 +94,7 @@ InitSelections(void) pSel = CurrentSelections; while (pSel) { pNextSel = pSel->next; - dixFreePrivates(pSel->devPrivates); - xfree(pSel); + dixFreeObjectWithPrivates(pSel, PRIVATE_SELECTION); pSel = pNextSel; } @@ -189,8 +188,7 @@ ProcSetSelectionOwner(ClientPtr client) event.u.selectionClear.time = time.milliseconds; event.u.selectionClear.window = pSel->window; event.u.selectionClear.atom = pSel->selection; - TryClientEvents(pSel->client, NULL, &event, 1, NoEventMask, - NoEventMask /* CantBeFiltered */, NullGrab); + WriteEventsToClient(pSel->client, 1, &event); } } else if (rc == BadMatch) @@ -198,18 +196,17 @@ ProcSetSelectionOwner(ClientPtr client) /* * It doesn't exist, so add it... */ - pSel = xalloc(sizeof(Selection)); + pSel = dixAllocateObjectWithPrivates(Selection, PRIVATE_SELECTION); if (!pSel) return BadAlloc; pSel->selection = stuff->selection; - pSel->devPrivates = NULL; /* security creation/labeling check */ rc = XaceHookSelectionAccess(client, &pSel, DixCreateAccess|DixSetAttrAccess); if (rc != Success) { - xfree(pSel); + free(pSel); return rc; } @@ -225,7 +222,7 @@ ProcSetSelectionOwner(ClientPtr client) pSel->client = (pWin ? client : NullClient); CallSelectionCallback(pSel, client, SelectionSetOwner); - return client->noClientException; + return Success; } int @@ -257,7 +254,7 @@ ProcGetSelectionOwner(ClientPtr client) return rc; WriteReplyToClient(client, sizeof(xGetSelectionOwnerReply), &reply); - return client->noClientException; + return Success; } int @@ -296,9 +293,11 @@ ProcConvertSelection(ClientPtr client) event.u.selectionRequest.selection = stuff->selection; event.u.selectionRequest.target = stuff->target; event.u.selectionRequest.property = stuff->property; - if (TryClientEvents(pSel->client, NULL, &event, 1, NoEventMask, - NoEventMask /* CantBeFiltered */, NullGrab)) - return client->noClientException; + if (pSel->client && pSel->client != serverClient && !pSel->client->clientGone) + { + WriteEventsToClient(pSel->client, 1, &event); + return Success; + } } event.u.u.type = SelectionNotify; @@ -307,7 +306,6 @@ ProcConvertSelection(ClientPtr client) event.u.selectionNotify.selection = stuff->selection; event.u.selectionNotify.target = stuff->target; event.u.selectionNotify.property = None; - TryClientEvents(client, NULL, &event, 1, NoEventMask, - NoEventMask /* CantBeFiltered */, NullGrab); - return client->noClientException; + WriteEventsToClient(client, 1, &event); + return Success; } diff --git a/xserver/dix/swaprep.c b/xserver/dix/swaprep.c index 12c6dbd26..c173411ab 100644 --- a/xserver/dix/swaprep.c +++ b/xserver/dix/swaprep.c @@ -99,7 +99,7 @@ CopySwap32Write(ClientPtr pClient, int size, CARD32 *pbuf) CARD32 tmpbuf[1]; /* Allocate as big a buffer as we can... */ - while (!(pbufT = xalloc(bufsize))) + while (!(pbufT = malloc(bufsize))) { bufsize >>= 1; if (bufsize == 4) @@ -131,7 +131,7 @@ CopySwap32Write(ClientPtr pClient, int size, CARD32 *pbuf) } if (pbufT != tmpbuf) - xfree (pbufT); + free(pbufT); } /** @@ -147,7 +147,7 @@ CopySwap16Write(ClientPtr pClient, int size, short *pbuf) short tmpbuf[2]; /* Allocate as big a buffer as we can... */ - while (!(pbufT = xalloc(bufsize))) + while (!(pbufT = malloc(bufsize))) { bufsize >>= 1; if (bufsize == 4) @@ -179,7 +179,7 @@ CopySwap16Write(ClientPtr pClient, int size, short *pbuf) } if (pbufT != tmpbuf) - xfree (pbufT); + free(pbufT); } @@ -1262,7 +1262,7 @@ WriteSConnectionInfo(ClientPtr pClient, unsigned long size, char *pInfo) { char *pInfoTBase; - pInfoTBase = xalloc(size); + pInfoTBase = malloc(size); if (!pInfoTBase) { pClient->noClientException = -1; @@ -1270,7 +1270,7 @@ WriteSConnectionInfo(ClientPtr pClient, unsigned long size, char *pInfo) } SwapConnSetupInfo(pInfo, pInfoTBase); (void)WriteToClient(pClient, (int)size, (char *) pInfoTBase); - xfree(pInfoTBase); + free(pInfoTBase); } void diff --git a/xserver/dix/swapreq.c b/xserver/dix/swapreq.c index 5d7d71c8f..2e34711c0 100644 --- a/xserver/dix/swapreq.c +++ b/xserver/dix/swapreq.c @@ -318,7 +318,7 @@ SProcSendEvent(ClientPtr client) /* Swap event */ proc = EventSwapVector[stuff->event.u.u.type & 0177]; if (!proc || proc == NotImplemented) /* no swapping proc; invalid event type? */ - return (BadValue); + return BadValue; (*proc)(&stuff->event, &eventT); stuff->event = eventT; diff --git a/xserver/dix/window.c b/xserver/dix/window.c index c7201df09..1913030cf 100644 --- a/xserver/dix/window.c +++ b/xserver/dix/window.c @@ -151,13 +151,7 @@ WindowSeekDeviceCursor(WindowPtr pWin, int screenIsSaved = SCREEN_SAVER_OFF; -ScreenSaverStuffRec savedScreenInfo[MAXSCREENS]; - -static int FocusPrivatesKeyIndex; -DevPrivateKey FocusPrivatesKey = &FocusPrivatesKeyIndex; - -static Bool TileScreenSaver(int i, int kind); - +static Bool TileScreenSaver(ScreenPtr pScreen, int kind); #define INPUTONLY_LEGAL_MASK (CWWinGravity | CWEventMask | \ CWDontPropagate | CWOverrideRedirect | CWCursor ) @@ -197,7 +191,7 @@ PrintChildren(WindowPtr p1, int indent) ErrorF("[dix] "); for (i=0; idrawable.id); - miPrintRegion(&p1->clipList); + RegionPrint(&p1->clipList); PrintChildren(p2, indent+4); p1 = p1->nextSib; } @@ -212,8 +206,8 @@ PrintWindowTree(void) for (i=0; iclipList); + pWin = screenInfo.screens[i]->root; + RegionPrint(&pWin->clipList); p1 = pWin->firstChild; PrintChildren(p1, 4); } @@ -227,12 +221,12 @@ TraverseTree(WindowPtr pWin, VisitWindowProcPtr func, pointer data) WindowPtr pChild; if (!(pChild = pWin)) - return(WT_NOMATCH); + return WT_NOMATCH; while (1) { result = (* func)(pChild, data); if (result == WT_STOPWALKING) - return(WT_STOPWALKING); + return WT_STOPWALKING; if ((result == WT_WALKCHILDREN) && pChild->firstChild) { pChild = pChild->firstChild; @@ -244,7 +238,7 @@ TraverseTree(WindowPtr pWin, VisitWindowProcPtr func, pointer data) break; pChild = pChild->nextSib; } - return(WT_NOMATCH); + return WT_NOMATCH; } /***** @@ -258,7 +252,7 @@ TraverseTree(WindowPtr pWin, VisitWindowProcPtr func, pointer data) int WalkTree(ScreenPtr pScreen, VisitWindowProcPtr func, pointer data) { - return(TraverseTree(WindowTable[pScreen->myNum], func, data)); + return(TraverseTree(pScreen->root, func, data)); } /* hack for forcing backing store on all windows */ @@ -323,12 +317,12 @@ MakeRootTile(WindowPtr pWin) FatalError("could not create root tile"); { - CARD32 attributes[2]; + ChangeGCVal attributes[2]; - attributes[0] = pScreen->whitePixel; - attributes[1] = pScreen->blackPixel; + attributes[0].val = pScreen->whitePixel; + attributes[1].val = pScreen->blackPixel; - (void)ChangeGC(pGC, GCForeground | GCBackground, attributes); + (void)ChangeGC(NullClient, pGC, GCForeground | GCBackground, attributes); } ValidateGC((DrawablePtr)pWin->background.pixmap, pGC); @@ -359,20 +353,19 @@ CreateRootWindow(ScreenPtr pScreen) BoxRec box; PixmapFormatRec *format; - pWin = xalloc(sizeof(WindowRec)); + pWin = dixAllocateObjectWithPrivates(WindowRec, PRIVATE_WINDOW); if (!pWin) return FALSE; - savedScreenInfo[pScreen->myNum].pWindow = NULL; - savedScreenInfo[pScreen->myNum].wid = FakeClientID(0); - savedScreenInfo[pScreen->myNum].ExternalScreenSaver = NULL; + pScreen->screensaver.pWindow = NULL; + pScreen->screensaver.wid = FakeClientID(0); + pScreen->screensaver.ExternalScreenSaver = NULL; screenIsSaved = SCREEN_SAVER_OFF; - WindowTable[pScreen->myNum] = pWin; + pScreen->root = pWin; pWin->drawable.pScreen = pScreen; pWin->drawable.type = DRAWABLE_WINDOW; - pWin->devPrivates = NULL; pWin->drawable.depth = pScreen->rootDepth; for (format = screenInfo.formats; @@ -386,7 +379,7 @@ CreateRootWindow(ScreenPtr pScreen) pWin->parent = NullWindow; SetWindowToDefaults(pWin); - pWin->optional = xalloc (sizeof (WindowOptRec)); + pWin->optional = malloc(sizeof (WindowOptRec)); if (!pWin->optional) return FALSE; @@ -418,10 +411,10 @@ CreateRootWindow(ScreenPtr pScreen) box.y1 = 0; box.x2 = pScreen->width; box.y2 = pScreen->height; - REGION_INIT(pScreen, &pWin->clipList, &box, 1); - REGION_INIT(pScreen, &pWin->winSize, &box, 1); - REGION_INIT(pScreen, &pWin->borderSize, &box, 1); - REGION_INIT(pScreen, &pWin->borderClip, &box, 1); + RegionInit(&pWin->clipList, &box, 1); + RegionInit(&pWin->winSize, &box, 1); + RegionInit(&pWin->borderSize, &box, 1); + RegionInit(&pWin->borderClip, &box, 1); pWin->drawable.class = InputOutput; pWin->optional->visual = pScreen->rootVisual; @@ -496,12 +489,8 @@ ClippedRegionFromBox(WindowPtr pWin, RegionPtr Rgn, int x, int y, int w, int h) { - ScreenPtr pScreen; - BoxRec box; + BoxRec box = *RegionExtents(&pWin->winSize); - pScreen = pWin->drawable.pScreen; - - box = *(REGION_EXTENTS(pScreen, &pWin->winSize)); /* we do these calculations to avoid overflows */ if (x > box.x1) box.x1 = x; @@ -517,8 +506,8 @@ ClippedRegionFromBox(WindowPtr pWin, RegionPtr Rgn, box.x2 = box.x1; if (box.y1 > box.y2) box.y2 = box.y1; - REGION_RESET(pScreen, Rgn, &box); - REGION_INTERSECT(pScreen, Rgn, Rgn, &pWin->winSize); + RegionReset(Rgn, &box); + RegionIntersect(Rgn, Rgn, &pWin->winSize); } static RealChildHeadProc realChildHeadProc = NULL; @@ -539,10 +528,10 @@ RealChildHead(WindowPtr pWin) if (!pWin->parent && (screenIsSaved == SCREEN_SAVER_ON) && - (HasSaverWindow (pWin->drawable.pScreen->myNum))) - return (pWin->firstChild); + (HasSaverWindow (pWin->drawable.pScreen))) + return pWin->firstChild; else - return (NullWindow); + return NullWindow; } /***** @@ -639,14 +628,13 @@ CreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w, return NullWindow; } - pWin = xalloc(sizeof(WindowRec)); + pWin = dixAllocateObjectWithPrivates(WindowRec, PRIVATE_WINDOW); if (!pWin) { *error = BadAlloc; return NullWindow; } pWin->drawable = pParent->drawable; - pWin->devPrivates = NULL; pWin->drawable.depth = depth; if (depth == pParent->drawable.depth) pWin->drawable.bitsPerPixel = pParent->drawable.bitsPerPixel; @@ -670,7 +658,7 @@ CreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w, { if (!MakeWindowOptional (pWin)) { - xfree (pWin); + dixFreeObjectWithPrivates(pWin, PRIVATE_WINDOW); *error = BadAlloc; return NullWindow; } @@ -685,7 +673,7 @@ CreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w, *error = XaceHook(XACE_RESOURCE_ACCESS, client, wid, RT_WINDOW, pWin, RT_WINDOW, pWin->parent, DixCreateAccess|DixSetAttrAccess); if (*error != Success) { - xfree(pWin); + dixFreeObjectWithPrivates(pWin, PRIVATE_WINDOW); return NullWindow; } @@ -705,10 +693,10 @@ CreateWindow(Window wid, WindowPtr pParent, int x, int y, unsigned w, pWin->drawable.y = pParent->drawable.y + y + (int)bw; /* set up clip list correctly for unobscured WindowPtr */ - REGION_NULL(pScreen, &pWin->clipList); - REGION_NULL(pScreen, &pWin->borderClip); - REGION_NULL(pScreen, &pWin->winSize); - REGION_NULL(pScreen, &pWin->borderSize); + RegionNull(&pWin->clipList); + RegionNull(&pWin->borderClip); + RegionNull(&pWin->winSize); + RegionNull(&pWin->borderSize); pHead = RealChildHead(pParent); if (pHead) @@ -809,12 +797,12 @@ DisposeWindowOptional (WindowPtr pWin) FreeCursor(pList->cursor, (XID)0); pPrev = pList; pList = pList->next; - xfree(pPrev); + free(pPrev); } pWin->optional->deviceCursors = NULL; } - xfree (pWin->optional); + free(pWin->optional); pWin->optional = NULL; } @@ -826,16 +814,16 @@ FreeWindowResources(WindowPtr pWin) DeleteWindowFromAnySaveSet(pWin); DeleteWindowFromAnySelections(pWin); DeleteWindowFromAnyEvents(pWin, TRUE); - REGION_UNINIT(pScreen, &pWin->clipList); - REGION_UNINIT(pScreen, &pWin->winSize); - REGION_UNINIT(pScreen, &pWin->borderClip); - REGION_UNINIT(pScreen, &pWin->borderSize); + RegionUninit(&pWin->clipList); + RegionUninit(&pWin->winSize); + RegionUninit(&pWin->borderClip); + RegionUninit(&pWin->borderSize); if (wBoundingShape (pWin)) - REGION_DESTROY(pScreen, wBoundingShape (pWin)); + RegionDestroy(wBoundingShape (pWin)); if (wClipShape (pWin)) - REGION_DESTROY(pScreen, wClipShape (pWin)); + RegionDestroy(wClipShape (pWin)); if (wInputShape (pWin)) - REGION_DESTROY(pScreen, wInputShape (pWin)); + RegionDestroy(wInputShape (pWin)); if (pWin->borderIsPixel == FALSE) (*pScreen->DestroyPixmap)(pWin->border.pixmap); if (pWin->backgroundState == BackgroundPixmap) @@ -883,8 +871,7 @@ CrushTree(WindowPtr pWin) (*UnrealizeWindow)(pChild); } FreeWindowResources(pChild); - dixFreePrivates(pChild->devPrivates); - xfree(pChild); + dixFreeObjectWithPrivates(pChild, PRIVATE_WINDOW); if ( (pChild = pSib) ) break; pChild = pParent; @@ -934,9 +921,9 @@ DeleteWindow(pointer value, XID wid) if (pWin->prevSib) pWin->prevSib->nextSib = pWin->nextSib; } - xfree(dixLookupPrivate(&pWin->devPrivates, FocusPrivatesKey)); - dixFreePrivates(pWin->devPrivates); - xfree(pWin); + else + pWin->drawable.pScreen->root = NULL; + dixFreeObjectWithPrivates(pWin, PRIVATE_WINDOW); return Success; } @@ -1056,7 +1043,7 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client) } else { - error = (rc == BadValue) ? BadPixmap : rc; + error = rc; client->errorValue = pixID; goto PatchUp; } @@ -1116,7 +1103,7 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client) } else { - error = (rc == BadValue) ? BadPixmap : rc; + error = rc; client->errorValue = pixID; goto PatchUp; } @@ -1264,7 +1251,7 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client) client, DixUseAccess); if (rc != Success) { - error = (rc == BadValue) ? BadColor : rc; + error = rc; client->errorValue = cmap; goto PatchUp; } @@ -1329,7 +1316,7 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client) */ if ( cursorID == None) { - if (pWin == WindowTable[pWin->drawable.pScreen->myNum]) + if (pWin == pWin->drawable.pScreen->root) pCursor = rootCursor; else pCursor = (CursorPtr) None; @@ -1340,7 +1327,7 @@ ChangeWindowAttributes(WindowPtr pWin, Mask vmask, XID *vlist, ClientPtr client) RT_CURSOR, client, DixUseAccess); if (rc != Success) { - error = (rc == BadValue) ? BadCursor : rc; + error = rc; client->errorValue = cursorID; goto PatchUp; } @@ -1433,10 +1420,10 @@ PatchUp: { RegionRec exposed; - REGION_NULL(pScreen, &exposed); - REGION_SUBTRACT(pScreen, &exposed, &pWin->borderClip, &pWin->winSize); + RegionNull(&exposed); + RegionSubtract(&exposed, &pWin->borderClip, &pWin->winSize); miPaintWindow(pWin, &exposed, PW_BORDER); - REGION_UNINIT(pScreen, &exposed); + RegionUninit(&exposed); } return error; } @@ -1564,7 +1551,7 @@ MoveWindowInStack(WindowPtr pWin, WindowPtr pNextSib) (*pWin->drawable.pScreen->RestackWindow)(pWin, pWin->nextSib); #endif - return( pFirstChange ); + return pFirstChange; } void @@ -1583,7 +1570,7 @@ SetWinSize (WindowPtr pWin) box.y1 = pWin->drawable.y; box.x2 = pWin->drawable.x + pWin->drawable.width; box.y2 = pWin->drawable.y + pWin->drawable.height; - REGION_RESET (pScreen, &pWin->winSize, &box); + RegionReset(&pWin->winSize, &box); } else #endif @@ -1592,18 +1579,15 @@ SetWinSize (WindowPtr pWin) (int)pWin->drawable.width, (int)pWin->drawable.height); if (wBoundingShape (pWin) || wClipShape (pWin)) { - ScreenPtr pScreen; - pScreen = pWin->drawable.pScreen; - - REGION_TRANSLATE(pScreen, &pWin->winSize, - pWin->drawable.x, + RegionTranslate(&pWin->winSize, - pWin->drawable.x, - pWin->drawable.y); if (wBoundingShape (pWin)) - REGION_INTERSECT(pScreen, &pWin->winSize, &pWin->winSize, + RegionIntersect(&pWin->winSize, &pWin->winSize, wBoundingShape (pWin)); if (wClipShape (pWin)) - REGION_INTERSECT(pScreen, &pWin->winSize, &pWin->winSize, + RegionIntersect(&pWin->winSize, &pWin->winSize, wClipShape (pWin)); - REGION_TRANSLATE(pScreen, &pWin->winSize, pWin->drawable.x, + RegionTranslate(&pWin->winSize, pWin->drawable.x, pWin->drawable.y); } } @@ -1628,7 +1612,7 @@ SetBorderSize (WindowPtr pWin) box.y1 = pWin->drawable.y - bw; box.x2 = pWin->drawable.x + pWin->drawable.width + bw; box.y2 = pWin->drawable.y + pWin->drawable.height + bw; - REGION_RESET (pScreen, &pWin->borderSize, &box); + RegionReset(&pWin->borderSize, &box); } else #endif @@ -1637,21 +1621,17 @@ SetBorderSize (WindowPtr pWin) (int)(pWin->drawable.width + (bw<<1)), (int)(pWin->drawable.height + (bw<<1))); if (wBoundingShape (pWin)) { - ScreenPtr pScreen; - pScreen = pWin->drawable.pScreen; - - REGION_TRANSLATE(pScreen, &pWin->borderSize, - pWin->drawable.x, + RegionTranslate(&pWin->borderSize, - pWin->drawable.x, - pWin->drawable.y); - REGION_INTERSECT(pScreen, &pWin->borderSize, &pWin->borderSize, + RegionIntersect(&pWin->borderSize, &pWin->borderSize, wBoundingShape (pWin)); - REGION_TRANSLATE(pScreen, &pWin->borderSize, pWin->drawable.x, + RegionTranslate(&pWin->borderSize, pWin->drawable.x, pWin->drawable.y); - REGION_UNION(pScreen, &pWin->borderSize, &pWin->borderSize, + RegionUnion(&pWin->borderSize, &pWin->borderSize, &pWin->winSize); } } else { - REGION_COPY(pWin->drawable.pScreen, &pWin->borderSize, - &pWin->winSize); + RegionCopy(&pWin->borderSize, &pWin->winSize); } } @@ -1817,12 +1797,12 @@ IsSiblingAboveMe( while (pWin) { if (pWin == pSib) - return(Above); + return Above; else if (pWin == pMe) - return(Below); + return Below; pWin = pWin->nextSib; } - return(Below); + return Below; } static BoxPtr @@ -1836,7 +1816,7 @@ WindowExtents( + wBorderWidth (pWin); pBox->y2 = pWin->drawable.y + (int)pWin->drawable.height + wBorderWidth (pWin); - return(pBox); + return pBox; } #define IS_SHAPED(pWin) (wBoundingShape (pWin) != (RegionPtr) NULL) @@ -1846,17 +1826,11 @@ MakeBoundingRegion ( WindowPtr pWin, BoxPtr pBox) { - RegionPtr pRgn; - ScreenPtr pScreen; - pScreen = pWin->drawable.pScreen; - - pRgn = REGION_CREATE(pScreen, pBox, 1); + RegionPtr pRgn = RegionCreate(pBox, 1); if (wBoundingShape (pWin)) { - REGION_TRANSLATE(pScreen, pRgn, -pWin->origin.x, - -pWin->origin.y); - REGION_INTERSECT(pScreen, pRgn, pRgn, wBoundingShape (pWin)); - REGION_TRANSLATE(pScreen, pRgn, pWin->origin.x, - pWin->origin.y); + RegionTranslate(pRgn, -pWin->origin.x, -pWin->origin.y); + RegionIntersect(pRgn, pRgn, wBoundingShape (pWin)); + RegionTranslate(pRgn, pWin->origin.x, pWin->origin.y); } return pRgn; } @@ -1869,18 +1843,16 @@ ShapeOverlap ( BoxPtr pSibBox) { RegionPtr pWinRgn, pSibRgn; - ScreenPtr pScreen; Bool ret; if (!IS_SHAPED(pWin) && !IS_SHAPED(pSib)) return TRUE; - pScreen = pWin->drawable.pScreen; pWinRgn = MakeBoundingRegion (pWin, pWinBox); pSibRgn = MakeBoundingRegion (pSib, pSibBox); - REGION_INTERSECT(pScreen, pWinRgn, pWinRgn, pSibRgn); - ret = REGION_NOTEMPTY(pScreen, pWinRgn); - REGION_DESTROY(pScreen, pWinRgn); - REGION_DESTROY(pScreen, pSibRgn); + RegionIntersect(pWinRgn, pWinRgn, pSibRgn); + ret = RegionNotEmpty(pWinRgn); + RegionDestroy(pWinRgn); + RegionDestroy(pSibRgn); return ret; } @@ -1902,10 +1874,10 @@ AnyWindowOverlapsMe( if (BOXES_OVERLAP(sbox, box) && ShapeOverlap (pWin, box, pSib, sbox) ) - return(TRUE); + return TRUE; } } - return(FALSE); + return FALSE; } static Bool @@ -1925,10 +1897,10 @@ IOverlapAnyWindow( if (BOXES_OVERLAP(sbox, box) && ShapeOverlap (pWin, box, pSib, sbox) ) - return(TRUE); + return TRUE; } } - return(FALSE); + return FALSE; } /* @@ -1970,7 +1942,6 @@ WhereDoIGoInTheStack( int smode) { BoxRec box; - ScreenPtr pScreen; WindowPtr pHead, pFirst; if ((pWin == pWin->parent->firstChild) && @@ -1978,7 +1949,6 @@ WhereDoIGoInTheStack( return((WindowPtr ) NULL); pHead = RealChildHead(pWin->parent); pFirst = pHead ? pHead->nextSib : pWin->parent->firstChild; - pScreen = pWin->drawable.pScreen; box.x1 = x; box.y1 = y; box.x2 = x + (int)w; @@ -1987,63 +1957,63 @@ WhereDoIGoInTheStack( { case Above: if (pSib) - return(pSib); + return pSib; else if (pWin == pFirst) - return(pWin->nextSib); + return pWin->nextSib; else - return(pFirst); + return pFirst; case Below: if (pSib) if (pSib->nextSib != pWin) - return(pSib->nextSib); + return pSib->nextSib; else - return(pWin->nextSib); + return pWin->nextSib; else return NullWindow; case TopIf: if ((!pWin->mapped || (pSib && !pSib->mapped))) - return(pWin->nextSib); + return pWin->nextSib; else if (pSib) { if ((IsSiblingAboveMe(pWin, pSib) == Above) && - (RECT_IN_REGION(pScreen, &pSib->borderSize, &box) != rgnOUT)) - return(pFirst); + (RegionContainsRect(&pSib->borderSize, &box) != rgnOUT)) + return pFirst; else - return(pWin->nextSib); + return pWin->nextSib; } else if (AnyWindowOverlapsMe(pWin, pHead, &box)) - return(pFirst); + return pFirst; else - return(pWin->nextSib); + return pWin->nextSib; case BottomIf: if ((!pWin->mapped || (pSib && !pSib->mapped))) - return(pWin->nextSib); + return pWin->nextSib; else if (pSib) { if ((IsSiblingAboveMe(pWin, pSib) == Below) && - (RECT_IN_REGION(pScreen, &pSib->borderSize, &box) != rgnOUT)) + (RegionContainsRect(&pSib->borderSize, &box) != rgnOUT)) return NullWindow; else - return(pWin->nextSib); + return pWin->nextSib; } else if (IOverlapAnyWindow(pWin, &box)) return NullWindow; else - return(pWin->nextSib); + return pWin->nextSib; case Opposite: if ((!pWin->mapped || (pSib && !pSib->mapped))) - return(pWin->nextSib); + return pWin->nextSib; else if (pSib) { - if (RECT_IN_REGION(pScreen, &pSib->borderSize, &box) != rgnOUT) + if (RegionContainsRect(&pSib->borderSize, &box) != rgnOUT) { if (IsSiblingAboveMe(pWin, pSib) == Above) - return(pFirst); + return pFirst; else return NullWindow; } else - return(pWin->nextSib); + return pWin->nextSib; } else if (AnyWindowOverlapsMe(pWin, pHead, &box)) { @@ -2051,7 +2021,7 @@ WhereDoIGoInTheStack( * if (pWin == pWin->parent->firstChild) * return pWin->nextSib; */ - return(pFirst); + return pFirst; } else if (IOverlapAnyWindow(pWin, &box)) return NullWindow; @@ -2126,10 +2096,10 @@ ConfigureWindow(WindowPtr pWin, Mask mask, XID *vlist, ClientPtr client) xEvent event; if ((pWin->drawable.class == InputOnly) && (mask & IllegalInputOnlyConfigureMask)) - return(BadMatch); + return BadMatch; if ((mask & CWSibling) && !(mask & CWStackMode)) - return(BadMatch); + return BadMatch; pVlist = vlist; @@ -2186,9 +2156,9 @@ ConfigureWindow(WindowPtr pWin, Mask mask, XID *vlist, ClientPtr client) return rc; } if (pSib->parent != pParent) - return(BadMatch); + return BadMatch; if (pSib == pWin) - return(BadMatch); + return BadMatch; break; case CWStackMode: GET_CARD8(CWStackMode, smode); @@ -2196,12 +2166,12 @@ ConfigureWindow(WindowPtr pWin, Mask mask, XID *vlist, ClientPtr client) (smode != Opposite) && (smode != Above) && (smode != Below)) { client->errorValue = smode; - return(BadValue); + return BadValue; } break; default: client->errorValue = mask; - return(BadValue); + return BadValue; } } /* root really can't be reconfigured, so just return */ @@ -2238,8 +2208,8 @@ ConfigureWindow(WindowPtr pWin, Mask mask, XID *vlist, ClientPtr client) event.u.configureRequest.y = y; #ifdef PANORAMIX if(!noPanoramiXExtension && (!pParent || !pParent->parent)) { - event.u.configureRequest.x += panoramiXdataPtr[0].x; - event.u.configureRequest.y += panoramiXdataPtr[0].y; + event.u.configureRequest.x += screenInfo.screens[0]->x; + event.u.configureRequest.y += screenInfo.screens[0]->y; } #endif event.u.configureRequest.width = w; @@ -2249,7 +2219,7 @@ ConfigureWindow(WindowPtr pWin, Mask mask, XID *vlist, ClientPtr client) event.u.configureRequest.parent = pParent->drawable.id; if (MaybeDeliverEventsToClient(pParent, &event, 1, SubstructureRedirectMask, client) == 1) - return(Success); + return Success; } if (action == RESIZE_WIN) { @@ -2300,11 +2270,18 @@ ConfigureWindow(WindowPtr pWin, Mask mask, XID *vlist, ClientPtr client) #endif goto ActuallyDoSomething; } - return(Success); + return Success; ActuallyDoSomething: if (pWin->drawable.pScreen->ConfigNotify) - (*pWin->drawable.pScreen->ConfigNotify)(pWin, x, y, w, h, bw, pSib); + { + int ret; + ret = (*pWin->drawable.pScreen->ConfigNotify)(pWin, x, y, w, h, bw, pSib); + if (ret) { + client->errorValue = 0; + return ret; + } + } if (SubStrSend(pWin, pParent)) { @@ -2319,8 +2296,8 @@ ActuallyDoSomething: event.u.configureNotify.y = y; #ifdef PANORAMIX if(!noPanoramiXExtension && (!pParent || !pParent->parent)) { - event.u.configureNotify.x += panoramiXdataPtr[0].x; - event.u.configureNotify.y += panoramiXdataPtr[0].y; + event.u.configureNotify.x += screenInfo.screens[0]->x; + event.u.configureNotify.y += screenInfo.screens[0]->y; } #endif event.u.configureNotify.width = w; @@ -2356,7 +2333,7 @@ ActuallyDoSomething: if (action != RESTACK_WIN) CheckCursorConfinement(pWin); - return(Success); + return Success; #undef RESTACK_WIN #undef MOVE_WIN #undef RESIZE_WIN @@ -2417,7 +2394,7 @@ CirculateWindow(WindowPtr pParent, int direction, ClientPtr client) event.u.u.type = CirculateRequest; if (MaybeDeliverEventsToClient(pParent, &event, 1, SubstructureRedirectMask, client) == 1) - return(Success); + return Success; } event.u.u.type = CirculateNotify; @@ -2426,7 +2403,7 @@ CirculateWindow(WindowPtr pParent, int direction, ClientPtr client) (direction == RaiseLowest) ? pFirst : NullWindow, VTStack); - return(Success); + return Success; } static int @@ -2437,9 +2414,9 @@ CompareWIDs( Window *wid = (Window *)value; if (pWin->drawable.id == *wid) - return(WT_STOPWALKING); + return WT_STOPWALKING; else - return(WT_WALKCHILDREN); + return WT_WALKCHILDREN; } /***** @@ -2458,9 +2435,9 @@ ReparentWindow(WindowPtr pWin, WindowPtr pParent, pScreen = pWin->drawable.pScreen; if (TraverseTree(pWin, CompareWIDs, (pointer)&pParent->drawable.id) == WT_STOPWALKING) - return(BadMatch); + return BadMatch; if (!MakeWindowOptional(pWin)) - return(BadAlloc); + return BadAlloc; if (WasMapped) UnmapWindow(pWin, FALSE); @@ -2473,8 +2450,8 @@ ReparentWindow(WindowPtr pWin, WindowPtr pParent, event.u.reparent.y = y; #ifdef PANORAMIX if(!noPanoramiXExtension && !pParent->parent) { - event.u.reparent.x += panoramiXdataPtr[0].x; - event.u.reparent.y += panoramiXdataPtr[0].y; + event.u.reparent.x += screenInfo.screens[0]->x; + event.u.reparent.y += screenInfo.screens[0]->y; } #endif event.u.reparent.override = pWin->overrideRedirect; @@ -2536,7 +2513,7 @@ ReparentWindow(WindowPtr pWin, WindowPtr pParent, if (WasMapped) MapWindow(pWin, client); RecalculateDeliverableEvents(pWin); - return(Success); + return Success; } static void @@ -2609,7 +2586,7 @@ MapWindow(WindowPtr pWin, ClientPtr client) WindowPtr pLayerWin; if (pWin->mapped) - return(Success); + return Success; /* general check for permission to map window */ if (XaceHook(XACE_RESOURCE_ACCESS, client, pWin->drawable.id, RT_WINDOW, @@ -2633,7 +2610,7 @@ MapWindow(WindowPtr pWin, ClientPtr client) if (MaybeDeliverEventsToClient(pParent, &event, 1, SubstructureRedirectMask, client) == 1) - return(Success); + return Success; } pWin->mapped = TRUE; @@ -2647,7 +2624,7 @@ MapWindow(WindowPtr pWin, ClientPtr client) } if (!pParent->realized) - return(Success); + return Success; RealizeTree(pWin); if (pWin->viewable) { @@ -2676,13 +2653,13 @@ MapWindow(WindowPtr pWin, ClientPtr client) (*pScreen->ClipNotify) (pWin, 0, 0); if (pScreen->PostValidateTree) (*pScreen->PostValidateTree)(NullWindow, pWin, VTMap); - REGION_NULL(pScreen, &temp); - REGION_COPY(pScreen, &temp, &pWin->clipList); + RegionNull(&temp); + RegionCopy(&temp, &pWin->clipList); (*pScreen->WindowExposures) (pWin, &temp, NullRegion); - REGION_UNINIT(pScreen, &temp); + RegionUninit(&temp); } - return(Success); + return Success; } @@ -2777,7 +2754,6 @@ UnrealizeTree( WindowPtr pChild; UnrealizeWindowProcPtr Unrealize; MarkUnrealizedWindowProcPtr MarkUnrealizedWindow; - int rc; Unrealize = pWin->drawable.pScreen->UnrealizeWindow; MarkUnrealizedWindow = pWin->drawable.pScreen->MarkUnrealizedWindow; @@ -2791,7 +2767,7 @@ UnrealizeTree( #ifdef PANORAMIX if(!noPanoramiXExtension && !pChild->drawable.pScreen->myNum) { PanoramiXRes *win; - rc = dixLookupResourceByType((pointer *)&win, + int rc = dixLookupResourceByType((pointer *)&win, pChild->drawable.id, XRT_WINDOW, serverClient, DixWriteAccess); if (rc == Success) @@ -2839,7 +2815,7 @@ UnmapWindow(WindowPtr pWin, Bool fromConfigure) WindowPtr pLayerWin = pWin; if ((!pWin->mapped) || (!(pParent = pWin->parent))) - return(Success); + return Success; if (SubStrSend(pWin, pParent) && MapUnmapEventsEnabled(pWin)) { memset(&event, 0, sizeof(xEvent)); @@ -2869,7 +2845,7 @@ UnmapWindow(WindowPtr pWin, Bool fromConfigure) } if (wasRealized && !fromConfigure) WindowsRestructured (); - return(Success); + return Success; } /***** @@ -2967,7 +2943,7 @@ HandleSaveSet(ClientPtr client) pWin = SaveSetWindow(client->saveSet[j]); #ifdef XFIXES if (SaveSetToRoot(client->saveSet[j])) - pParent = WindowTable[pWin->drawable.pScreen->myNum]; + pParent = pWin->drawable.pScreen->root; else #endif { @@ -2997,7 +2973,7 @@ HandleSaveSet(ClientPtr client) MapWindow(pWin, client); } } - xfree(client->saveSet); + free(client->saveSet); client->numSaved = 0; client->saveSet = (SaveSetElt *)NULL; } @@ -3012,43 +2988,37 @@ PointInWindowIsVisible(WindowPtr pWin, int x, int y) BoxRec box; if (!pWin->realized) - return (FALSE); - if (POINT_IN_REGION(pWin->drawable.pScreen, &pWin->borderClip, + return FALSE; + if (RegionContainsPoint(&pWin->borderClip, x, y, &box) && (!wInputShape(pWin) || - POINT_IN_REGION(pWin->drawable.pScreen, - wInputShape(pWin), - x - pWin->drawable.x, - y - pWin->drawable.y, &box))) - return(TRUE); - return(FALSE); + RegionContainsPoint(wInputShape(pWin), + x - pWin->drawable.x, + y - pWin->drawable.y, &box))) + return TRUE; + return FALSE; } RegionPtr NotClippedByChildren(WindowPtr pWin) { - ScreenPtr pScreen; - RegionPtr pReg; - - pScreen = pWin->drawable.pScreen; - pReg = REGION_CREATE(pScreen, NullBox, 1); + RegionPtr pReg = RegionCreate(NullBox, 1); if (pWin->parent || screenIsSaved != SCREEN_SAVER_ON || - !HasSaverWindow (pWin->drawable.pScreen->myNum)) + !HasSaverWindow (pWin->drawable.pScreen)) { - REGION_INTERSECT(pScreen, pReg, &pWin->borderClip, &pWin->winSize); + RegionIntersect(pReg, &pWin->borderClip, &pWin->winSize); } - return(pReg); + return pReg; } void SendVisibilityNotify(WindowPtr pWin) { xEvent event; -#ifndef NO_XINERAMA_PORT unsigned int visibility = pWin->visibility; -#endif + if (!MapUnmapEventsEnabled(pWin)) return; #ifdef PANORAMIX @@ -3153,33 +3123,33 @@ dixSaveScreens(ClientPtr client, int on, int mode) } for (i = 0; i < screenInfo.numScreens; i++) { + ScreenPtr pScreen = screenInfo.screens[i]; if (on == SCREEN_SAVER_FORCER) - (* screenInfo.screens[i]->SaveScreen) (screenInfo.screens[i], on); - if (savedScreenInfo[i].ExternalScreenSaver) + (* pScreen->SaveScreen) (pScreen, on); + if (pScreen->screensaver.ExternalScreenSaver) { - if ((*savedScreenInfo[i].ExternalScreenSaver) - (screenInfo.screens[i], type, on == SCREEN_SAVER_FORCER)) + if ((*pScreen->screensaver.ExternalScreenSaver) + (pScreen, type, on == SCREEN_SAVER_FORCER)) continue; } if (type == screenIsSaved) continue; switch (type) { case SCREEN_SAVER_OFF: - if (savedScreenInfo[i].blanked == SCREEN_IS_BLANKED) + if (pScreen->screensaver.blanked == SCREEN_IS_BLANKED) { - (* screenInfo.screens[i]->SaveScreen) (screenInfo.screens[i], - what); + (* pScreen->SaveScreen) (pScreen, what); } - else if (HasSaverWindow (i)) + else if (HasSaverWindow (pScreen)) { - savedScreenInfo[i].pWindow = NullWindow; - FreeResource(savedScreenInfo[i].wid, RT_NONE); + pScreen->screensaver.pWindow = NullWindow; + FreeResource(pScreen->screensaver.wid, RT_NONE); } break; case SCREEN_SAVER_CYCLE: - if (savedScreenInfo[i].blanked == SCREEN_IS_TILED) + if (pScreen->screensaver.blanked == SCREEN_IS_TILED) { - WindowPtr pWin = savedScreenInfo[i].pWindow; + WindowPtr pWin = pScreen->screensaver.pWindow; /* make it look like screen saver is off, so that * NotClippedByChildren will compute a clip list * for the root window, so miPaintWindow works @@ -3203,35 +3173,33 @@ dixSaveScreens(ClientPtr client, int on, int mode) * Call the DDX saver in case it wants to do something * at cycle time */ - else if (savedScreenInfo[i].blanked == SCREEN_IS_BLANKED) + else if (pScreen->screensaver.blanked == SCREEN_IS_BLANKED) { - (* screenInfo.screens[i]->SaveScreen) (screenInfo.screens[i], - type); + (* pScreen->SaveScreen) (pScreen, type); } break; case SCREEN_SAVER_ON: if (ScreenSaverBlanking != DontPreferBlanking) { - if ((* screenInfo.screens[i]->SaveScreen) - (screenInfo.screens[i], what)) + if ((* pScreen->SaveScreen) (pScreen, what)) { - savedScreenInfo[i].blanked = SCREEN_IS_BLANKED; + pScreen->screensaver.blanked = SCREEN_IS_BLANKED; continue; } if ((ScreenSaverAllowExposures != DontAllowExposures) && - TileScreenSaver(i, SCREEN_IS_BLACK)) + TileScreenSaver(pScreen, SCREEN_IS_BLACK)) { - savedScreenInfo[i].blanked = SCREEN_IS_BLACK; + pScreen->screensaver.blanked = SCREEN_IS_BLACK; continue; } } if ((ScreenSaverAllowExposures != DontAllowExposures) && - TileScreenSaver(i, SCREEN_IS_TILED)) + TileScreenSaver(pScreen, SCREEN_IS_TILED)) { - savedScreenInfo[i].blanked = SCREEN_IS_TILED; + pScreen->screensaver.blanked = SCREEN_IS_TILED; } else - savedScreenInfo[i].blanked = SCREEN_ISNT_SAVED; + pScreen->screensaver.blanked = SCREEN_ISNT_SAVED; break; } } @@ -3253,7 +3221,7 @@ SaveScreens(int on, int mode) } static Bool -TileScreenSaver(int i, int kind) +TileScreenSaver(ScreenPtr pScreen, int kind) { int j; int result; @@ -3270,9 +3238,9 @@ TileScreenSaver(int i, int kind) attri = 0; switch (kind) { case SCREEN_IS_TILED: - switch (WindowTable[i]->backgroundState) { + switch (pScreen->root->backgroundState) { case BackgroundPixel: - attributes[attri++] = WindowTable[i]->background.pixel; + attributes[attri++] = pScreen->root->background.pixel; mask |= CWBackPixel; break; case BackgroundPixmap: @@ -3284,7 +3252,7 @@ TileScreenSaver(int i, int kind) } break; case SCREEN_IS_BLACK: - attributes[attri++] = WindowTable[i]->drawable.pScreen->blackPixel; + attributes[attri++] = pScreen->root->drawable.pScreen->blackPixel; mask |= CWBackPixel; break; } @@ -3299,12 +3267,12 @@ TileScreenSaver(int i, int kind) cm.height=16; cm.xhot=8; cm.yhot=8; - srcbits = xalloc( BitmapBytePad(32)*16); - mskbits = xalloc( BitmapBytePad(32)*16); + srcbits = malloc( BitmapBytePad(32)*16); + mskbits = malloc( BitmapBytePad(32)*16); if (!srcbits || !mskbits) { - xfree(srcbits); - xfree(mskbits); + free(srcbits); + free(mskbits); cursor = 0; } else @@ -3326,19 +3294,19 @@ TileScreenSaver(int i, int kind) } else { - xfree (srcbits); - xfree (mskbits); + free(srcbits); + free(mskbits); } } - pWin = savedScreenInfo[i].pWindow = - CreateWindow(savedScreenInfo[i].wid, - WindowTable[i], + pWin = pScreen->screensaver.pWindow = + CreateWindow(pScreen->screensaver.wid, + pScreen->root, -RANDOM_WIDTH, -RANDOM_WIDTH, - (unsigned short)screenInfo.screens[i]->width + RANDOM_WIDTH, - (unsigned short)screenInfo.screens[i]->height + RANDOM_WIDTH, + (unsigned short)pScreen->width + RANDOM_WIDTH, + (unsigned short)pScreen->height + RANDOM_WIDTH, 0, InputOutput, mask, attributes, 0, serverClient, - wVisual (WindowTable[i]), &result); + wVisual (pScreen->root), &result); if (cursor) FreeResource (cursorID, RT_NONE); @@ -3347,7 +3315,7 @@ TileScreenSaver(int i, int kind) return FALSE; if (!AddResource(pWin->drawable.id, RT_WINDOW, - (pointer)savedScreenInfo[i].pWindow)) + (pointer)pScreen->screensaver.pWindow)) return FALSE; if (mask & CWBackPixmap) @@ -3457,7 +3425,7 @@ MakeWindowOptional (WindowPtr pWin) if (pWin->optional) return TRUE; - optional = xalloc (sizeof (WindowOptRec)); + optional = malloc(sizeof (WindowOptRec)); if (!optional) return FALSE; optional->dontPropagateMask = DontPropagateMasks[pWin->dontPropagate]; @@ -3548,7 +3516,7 @@ ChangeWindowDeviceCursor(WindowPtr pWin, /* first item in list */ pWin->optional->deviceCursors = pNode->next; - xfree(pNode); + free(pNode); goto out; } @@ -3560,7 +3528,7 @@ ChangeWindowDeviceCursor(WindowPtr pWin, if (!pCursor) return Success; - pNewNode = xalloc(sizeof(DevCursNodeRec)); + pNewNode = malloc(sizeof(DevCursNodeRec)); pNewNode->dev = pDev; pNewNode->next = pWin->optional->deviceCursors; pWin->optional->deviceCursors = pNewNode; @@ -3744,7 +3712,7 @@ DrawLogo(WindowPtr pWin) querypixels[0] = fore[0].val; querypixels[1] = pWin->background.pixel; - QueryColors(cmap, 2, querypixels, rgb); + QueryColors(cmap, 2, querypixels, rgb, serverClient); if ((rgb[0].red == rgb[1].red) && (rgb[0].green == rgb[1].green) && (rgb[0].blue == rgb[1].blue)) { @@ -3764,8 +3732,7 @@ DrawLogo(WindowPtr pWin) } else { back[0].val = 0; back[1].val = 0; - dixChangeGC(NullClient, pGC, GCTileStipXOrigin|GCTileStipYOrigin, - NULL, back); + ChangeGC(NullClient, pGC, GCTileStipXOrigin|GCTileStipYOrigin, back); back[0].val = FillTiled; back[1].ptr = pWin->background.pixmap; bmask = GCFillStyle|GCTile; @@ -3803,7 +3770,7 @@ DrawLogo(WindowPtr pWin) poly[1].x = x + size-d31; poly[1].y = y; poly[2].x = x + 0; poly[2].y = y + size; poly[3].x = x + d31; poly[3].y = y + size; - dixChangeGC(NullClient, pGC, fmask, NULL, fore); + ChangeGC(NullClient, pGC, fmask, fore); ValidateGC(pDraw, pGC); (*pGC->ops->FillPolygon)(pDraw, pGC, Convex, CoordModeOrigin, 4, poly); @@ -3822,7 +3789,7 @@ DrawLogo(WindowPtr pWin) poly[1].x = x + size / 2; poly[1].y = y + size/2; poly[2].x = x + (size/2)+(d31-(d31/2)); poly[2].y = y + size/2; poly[3].x = x + d31; poly[3].y = y + size; - dixChangeGC(NullClient, pGC, bmask, NULL, back); + ChangeGC(NullClient, pGC, bmask, back); ValidateGC(pDraw, pGC); (*pGC->ops->FillPolygon)(pDraw, pGC, Convex, CoordModeOrigin, 4, poly); @@ -3861,7 +3828,7 @@ DrawLogo(WindowPtr pWin) poly[1].x = x + size/4; poly[1].y = y; poly[2].x = x + size; poly[2].y = y + size; poly[3].x = x + size - size/4; poly[3].y = y + size; - dixChangeGC(NullClient, pGC, fmask, NULL, fore); + ChangeGC(NullClient, pGC, fmask, fore); ValidateGC(pDraw, pGC); (*pGC->ops->FillPolygon)(pDraw, pGC, Convex, CoordModeOrigin, 4, poly); @@ -3879,7 +3846,7 @@ DrawLogo(WindowPtr pWin) poly[1].x = x + size-( thin+gap); poly[1].y = y; poly[2].x = x + thin; poly[2].y = y + size; poly[3].x = x + thin + gap; poly[3].y = y + size; - dixChangeGC(NullClient, pGC, bmask, NULL, back); + ChangeGC(NullClient, pGC, bmask, back); ValidateGC(pDraw, pGC); (*pGC->ops->FillPolygon)(pDraw, pGC, Convex, CoordModeOrigin, 4, poly); diff --git a/xserver/doc/Makefile.am b/xserver/doc/Makefile.am index 2ff683c7f..43606a3f6 100644 --- a/xserver/doc/Makefile.am +++ b/xserver/doc/Makefile.am @@ -22,3 +22,5 @@ EXTRAMANDEFS = -D__default_font_path__="`echo $(COMPILEDDEFAULTFONTPATH) | $(SED DEVEL_DOCS = smartsched EXTRA_DIST = $(DEVEL_DOCS) $(appman_PRE) $(fileman_PRE) + +SUBDIRS = xml diff --git a/xserver/doc/Makefile.in b/xserver/doc/Makefile.in index b50a2b5a8..4b74b0b57 100644 --- a/xserver/doc/Makefile.in +++ b/xserver/doc/Makefile.in @@ -60,6 +60,12 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ CONFIG_CLEAN_FILES = SOURCES = DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-exec-recursive install-info-recursive \ + install-recursive installcheck-recursive installdirs-recursive \ + pdf-recursive ps-recursive uninstall-info-recursive \ + uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -69,6 +75,9 @@ am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(appmandir)" appmanDATA_INSTALL = $(INSTALL_DATA) DATA = $(appman_DATA) +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ @@ -107,10 +116,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -198,6 +203,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -212,6 +219,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -229,10 +237,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -288,10 +300,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -309,17 +322,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -346,20 +353,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -451,6 +461,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ @@ -650,8 +661,9 @@ EXTRAMANDEFS = -D__default_font_path__="`echo $(COMPILEDDEFAULTFONTPATH) | $(SED # Docs about X server internals that we ship with source but don't install DEVEL_DOCS = smartsched EXTRA_DIST = $(DEVEL_DOCS) $(appman_PRE) $(fileman_PRE) +SUBDIRS = xml all: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) all-am + $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .pre .man .man.pre .$(APP_MAN_SUFFIX) @@ -711,12 +723,138 @@ uninstall-appmanDATA: echo " rm -f '$(DESTDIR)$(appmandir)/$$f'"; \ rm -f "$(DESTDIR)$(appmandir)/$$f"; \ done + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +mostlyclean-recursive clean-recursive distclean-recursive \ +maintainer-clean-recursive: + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +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; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique tags: TAGS -TAGS: +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + 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; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi ctags: CTAGS -CTAGS: +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + 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; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(mkdir_p) $(distdir)/.. @@ -746,24 +884,40 @@ distdir: $(DISTFILES) || exit 1; \ fi; \ done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(mkdir_p) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + distdir) \ + || exit 1; \ + fi; \ + done check-am: all-am check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-am + $(MAKE) $(AM_MAKEFLAGS) check-recursive all-am: Makefile $(DATA) -installdirs: +installdirs: installdirs-recursive +installdirs-am: for dir in "$(DESTDIR)$(appmandir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am + $(MAKE) $(AM_MAKEFLAGS) install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -installcheck: installcheck-am +installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ @@ -781,21 +935,22 @@ maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -clean: clean-am +clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am -distclean: distclean-am +distclean: distclean-recursive -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool +distclean-am: clean-am distclean-generic distclean-libtool \ + distclean-tags -dvi: dvi-am +dvi: dvi-recursive dvi-am: -html: html-am +html: html-recursive -info: info-am +info: info-recursive info-am: @@ -803,39 +958,45 @@ install-data-am: install-appmanDATA install-exec-am: -install-info: install-info-am +install-info: install-info-recursive install-man: installcheck-am: -maintainer-clean: maintainer-clean-am +maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic -mostlyclean: mostlyclean-am +mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool -pdf: pdf-am +pdf: pdf-recursive pdf-am: -ps: ps-am +ps: ps-recursive ps-am: uninstall-am: uninstall-appmanDATA uninstall-info-am -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-appmanDATA install-data install-data-am install-exec \ - install-exec-am install-info install-info-am install-man \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - uninstall uninstall-am uninstall-appmanDATA uninstall-info-am +uninstall-info: uninstall-info-recursive + +.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ + clean clean-generic clean-libtool clean-recursive ctags \ + ctags-recursive distclean distclean-generic distclean-libtool \ + distclean-recursive distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-appmanDATA \ + install-data install-data-am install-exec install-exec-am \ + install-info install-info-am install-man install-strip \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic \ + maintainer-clean-recursive mostlyclean mostlyclean-generic \ + mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \ + tags tags-recursive uninstall uninstall-am \ + uninstall-appmanDATA uninstall-info-am .pre: diff --git a/xserver/doc/xml/Makefile.am b/xserver/doc/xml/Makefile.am new file mode 100644 index 000000000..e66f192e2 --- /dev/null +++ b/xserver/doc/xml/Makefile.am @@ -0,0 +1,35 @@ +# +# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice (including the next +# paragraph) shall be included in all copies or substantial portions of the +# Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# + +SUBDIRS = dtrace + +XML_FILES = Xserver-spec.xml + +include xmlrules.in + +if ENABLE_DEVEL_DOCS +noinst_DATA = $(BUILT_DOC_FILES) +endif +CLEANFILES = $(CLEAN_DOC_FILES) + +EXTRA_DIST = $(XML_FILES) diff --git a/xserver/doc/xml/Makefile.in b/xserver/doc/xml/Makefile.in index c21113994..3e121c656 100644 --- a/xserver/doc/xml/Makefile.in +++ b/xserver/doc/xml/Makefile.in @@ -91,8 +91,11 @@ build_triplet = @build@ host_triplet = @host@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/xmlrules.in $(srcdir)/xserver.ent.in -@HAVE_XMLTO_TRUE@am__append_1 = $(TXT_FILES) $(HTML_FILES) -@HAVE_FOP_TRUE@@HAVE_XMLTO_TRUE@am__append_2 = $(PDF_FILES) +@HAVE_STYLESHEETS_TRUE@am__append_1 = -m $(XSL_STYLESHEET) +@HAVE_STYLESHEETS_TRUE@am__append_2 = xorg.css +@HAVE_XMLTO_TEXT_TRUE@@HAVE_XMLTO_TRUE@am__append_3 = $(TXT_FILES) +@HAVE_XMLTO_TRUE@am__append_4 = $(HTML_FILES) +@HAVE_FOP_TRUE@@HAVE_XMLTO_TRUE@am__append_5 = $(PDF_FILES) subdir = doc/xml ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ @@ -111,7 +114,16 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ CONFIG_CLEAN_FILES = xserver.ent SOURCES = DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-exec-recursive install-info-recursive \ + install-recursive installcheck-recursive installdirs-recursive \ + pdf-recursive ps-recursive uninstall-info-recursive \ + uninstall-recursive DATA = $(noinst_DATA) +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ @@ -273,7 +285,11 @@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ +HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ +HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ @@ -352,6 +368,7 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ +MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ @@ -424,6 +441,7 @@ SPECIAL_DTRACE_OBJECTS_TRUE = @SPECIAL_DTRACE_OBJECTS_TRUE@ STANDALONE_XPBPROXY_FALSE = @STANDALONE_XPBPROXY_FALSE@ STANDALONE_XPBPROXY_TRUE = @STANDALONE_XPBPROXY_TRUE@ STRIP = @STRIP@ +STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SYSCONFDIR = @SYSCONFDIR@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_FALSE = @TSLIB_FALSE@ @@ -506,10 +524,12 @@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_FALSE = @XORG_FALSE@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ +XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS = @XORG_OS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XORG_TRUE = @XORG_TRUE@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ @@ -533,6 +553,7 @@ XSERVER_DTRACE_FALSE = @XSERVER_DTRACE_FALSE@ XSERVER_DTRACE_TRUE = @XSERVER_DTRACE_TRUE@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ +XSL_STYLESHEET = @XSL_STYLESHEET@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_FALSE = @XVFB_FALSE@ @@ -632,19 +653,21 @@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ +SUBDIRS = dtrace XML_FILES = Xserver-spec.xml TXT_FILES = $(XML_FILES:%.xml=%.txt) HTML_FILES = $(XML_FILES:%.xml=%.html) PDF_FILES = $(XML_FILES:%.xml=%.pdf) -BUILT_DOC_FILES = $(am__append_1) $(am__append_2) +BUILT_DOC_FILES = $(am__append_2) $(am__append_3) $(am__append_4) \ + $(am__append_5) SUFFIXES = .xml .txt .html .pdf XML_ENT_DIR = $(abs_top_builddir)/doc/xml -XMLTO_FLAGS = --searchpath $(XML_ENT_DIR) -CLEAN_DOC_FILES = $(TXT_FILES) $(HTML_FILES) $(PDF_FILES) +XMLTO_FLAGS = --searchpath $(XML_ENT_DIR) $(am__append_1) +CLEAN_DOC_FILES = $(TXT_FILES) $(HTML_FILES) $(PDF_FILES) xorg.css @ENABLE_DEVEL_DOCS_TRUE@noinst_DATA = $(BUILT_DOC_FILES) CLEANFILES = $(CLEAN_DOC_FILES) EXTRA_DIST = $(XML_FILES) -all: all-am +all: all-recursive .SUFFIXES: .SUFFIXES: .xml .txt .html .pdf @@ -689,12 +712,138 @@ clean-libtool: distclean-libtool: -rm -f libtool uninstall-info-am: + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +mostlyclean-recursive clean-recursive distclean-recursive \ +maintainer-clean-recursive: + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +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; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique tags: TAGS -TAGS: +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + 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; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi ctags: CTAGS -CTAGS: +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + 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; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ @@ -723,19 +872,35 @@ distdir: $(DISTFILES) || exit 1; \ fi; \ done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(mkdir_p) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + distdir) \ + || exit 1; \ + fi; \ + done check-am: all-am -check: check-am +check: check-recursive all-am: Makefile $(DATA) -installdirs: -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -installcheck: installcheck-am +installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ @@ -752,21 +917,22 @@ distclean-generic: 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: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am -distclean: distclean-am +distclean: distclean-recursive -rm -f Makefile -distclean-am: clean-am distclean-generic distclean-libtool +distclean-am: clean-am distclean-generic distclean-libtool \ + distclean-tags -dvi: dvi-am +dvi: dvi-recursive dvi-am: -html: html-am +html: html-recursive -info: info-am +info: info-recursive info-am: @@ -774,43 +940,51 @@ install-data-am: install-exec-am: -install-info: install-info-am +install-info: install-info-recursive install-man: installcheck-am: -maintainer-clean: maintainer-clean-am +maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic -mostlyclean: mostlyclean-am +mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool -pdf: pdf-am +pdf: pdf-recursive pdf-am: -ps: ps-am +ps: ps-recursive ps-am: uninstall-am: uninstall-info-am -.PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-exec install-exec-am \ - install-info install-info-am install-man install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ - uninstall-info-am +uninstall-info: uninstall-info-recursive -@HAVE_XMLTO_TRUE@.xml.txt: -@HAVE_XMLTO_TRUE@ @rm -f $@ -@HAVE_XMLTO_TRUE@ $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) txt $< +.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ + clean clean-generic clean-libtool clean-recursive ctags \ + ctags-recursive distclean distclean-generic distclean-libtool \ + distclean-recursive distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-exec install-exec-am install-info \ + install-info-am install-man install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic maintainer-clean-recursive \ + mostlyclean mostlyclean-generic mostlyclean-libtool \ + mostlyclean-recursive pdf pdf-am ps ps-am tags tags-recursive \ + uninstall uninstall-am uninstall-info-am + + +@HAVE_STYLESHEETS_TRUE@xorg.css: $(STYLESHEET_SRCDIR)/xorg.css +@HAVE_STYLESHEETS_TRUE@ $(AM_V_GEN)cp -pf $(STYLESHEET_SRCDIR)/xorg.css $@ +@HAVE_XMLTO_TEXT_TRUE@@HAVE_XMLTO_TRUE@.xml.txt: +@HAVE_XMLTO_TEXT_TRUE@@HAVE_XMLTO_TRUE@ @rm -f $@ +@HAVE_XMLTO_TEXT_TRUE@@HAVE_XMLTO_TRUE@ $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) txt $< @HAVE_XMLTO_TRUE@.xml.html: @HAVE_XMLTO_TRUE@ @rm -f $@ @HAVE_XMLTO_TRUE@ $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) xhtml-nochunks $< diff --git a/xserver/doc/xml/Xserver-spec.xml b/xserver/doc/xml/Xserver-spec.xml new file mode 100644 index 000000000..563705fb9 --- /dev/null +++ b/xserver/doc/xml/Xserver-spec.xml @@ -0,0 +1,5202 @@ + + %defs; +]> + +
+ + + SusanAngebranndt + Digital Equipment Corporation + + + RaymondDrewry + Digital Equipment Corporation + + + PhilipKarlton + Digital Equipment Corporation + + + ToddNewman + Digital Equipment Corporation + + + BobScheifler + Massachusetts Institute of Technology + + + KeithPackard + MIT X Consortium + + + DavidP.Wiggins + X Consortium + + + JimGettys + X.org Foundation and Hewlett Packard + + The X.Org Foundation + &xserver.reldate; + X server version &xserver.version; + Definition of the Porting Layer for the X v11 Sample Server + X Porting Layer + + + 1.0 + 27 Oct 2004 + sa + Initial Version + + + 1.1 + 27 Oct 2004 + bs + Minor Revisions + + + 2.0 + 27 Oct 2004 + kp + Revised for Release 4 and 5 + + + 3.0 + 27 Oct 2004 + dpw + Revised for Release 6 + + + 3.1 + 27 Oct 2004 + jg + Revised for Release 6.8.2 + + + 3.2 + 17 Dec 2006 + efw + DocBook conversion + + + 3.3 + 17 Feb 2008 + aj + Revised for backing store changes + + + 3.4 + 31 Mar 2008 + efw + Revised for devPrivates changes + + + 3.5 + July 2010 + ac + Revised for Xorg 1.9 devPrivates changes + and 1.8 CreateNewResourceType changes + + + + Copyright © 1994 X Consortium, Inc., 2004 X.org Foundation, Inc. + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ``Software''), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + LK201 and DEC are trademarks of Digital Equipment Corporation. Macintosh and Apple are trademarks of Apple Computer, Inc. PostScript is a trademark of Adobe Systems, Inc. Ethernet is a trademark of Xerox Corporation. X Window System is a trademark of the X.org Foundation, Inc. Cray is a trademark of Cray Research, Inc. + + + The following document explains the structure of the X Window System display server and the interfaces among the larger pieces. It is intended as a reference for programmers who are implementing an X Display Server on their workstation hardware. It is included with the X Window System source tape, along with the document "Strategies for Porting the X v11 Sample Server." The order in which you should read these documents is: + + Read the first section of the "Strategies for Porting" document (Overview of Porting Process). + Skim over this document (the Definition document). + Skim over the remainder of the Strategies document. + Start planning and working, referring to the Strategies and Definition documents. + + You may also want to look at the following documents: + + "The X Window System" for an overview of X. + "Xlib - C Language X Interface" for a view of what the client programmer sees. + "X Window System Protocol" for a terse description of the byte stream protocol between the client and server. + + + To understand this document and the accompanying source code, you should know the C language. You should be familiar with 2D graphics and windowing concepts such as clipping, bitmaps, fonts, etc. You should have a general knowledge of the X Window System. To implement the server code on your hardware, you need to know a lot about your hardware, its graphic display device(s), and (possibly) its networking and multitasking facilities. This document depends a lot on the source code, so you should have a listing of the code handy. + Some source in the distribution is directly compilable on your machine. Some of it will require modification. Other parts may have to be completely written from scratch. The distribution also includes source for a sample implementation of a display server which runs on a very wide variety of color and monochrome displays on Linux and *BSD which you will find useful for implementing any type of X server. + Note to the 2008 edition: at this time this document must be considered incomplete, though improved over the 2004 edition. In particular, the new Render extension is still lacking good documentation, and has become vital to high performance X implementations. Modern applications and desktop environments are now much more sensitive to good implementation of the Render extension than in most operations of the old X graphics model. The shadow frame buffer implementation is also very useful in many circumstances, and also needs documentation. We hope to rectify these shortcomings in our documentation in the future. Help would be greatly appreciated. + + + + + +
+ The X Window System + +The X Window System, or simply "X," is a +windowing system that provides high-performance, high-level, +device-independent graphics. + + +X is a windowing system designed for bitmapped graphic displays. +The display can have a +simple, monochrome display or it can have a color display with up to 32 bits +per pixel with a special graphics processor doing the work. (In this +document, monochrome means a black and white display with one bit per pixel. +Even though the usual meaning of monochrome is more general, this special +case is so common that we decided to reserve the word for this purpose.) +In practice, monochrome displays are now almost unheard of, with 4 bit +gray scale displays being the low end. + + +X is designed for a networking environment where +users can run applications on machines other than their own workstations. +Sometimes, the connection is over an Ethernet network with a protocol such as TCP/IP; +but, any "reliable" byte stream is allowable. +A high-bandwidth byte stream is preferable; RS-232 at +9600 baud would be slow without compression techniques. + + +X by itself allows great freedom of design. +For instance, it does not include any user interface standard. +Its intent is to "provide mechanism, not policy." +By making it general, it can be the foundation for a wide +variety of interactive software. + + +For a more detailed overview, see the document "The X Window System." +For details on the byte stream protocol, see "X Window System protocol." + +
+
+Overview of the Server + +The display server +manages windows and simple graphics requests +for the user on behalf of different client applications. +The client applications can be running on any machine on the network. +The server mainly does three things: + + Responds to protocol requests from existing clients (mostly graphic and text drawing commands) + Sends device input (keystrokes and mouse actions) and other events to existing clients + Maintains client connections + + + +The server code is organized into four major pieces: + + Device Independent (DIX) layer - code shared among all implementations + Operating System (OS) layer - code that is different for each operating system but is shared among all graphic devices for this operating system + Device Dependent (DDX) layer - code that is (potentially) different for each combination of operating system and graphic device + Extension Interface - a standard way to add features to the X server + + + +The "porting layer" consists of the OS and DDX layers; these are +actually parallel and neither one is on top of the other. +The DIX layer is intended to be portable +without change to target systems and is not +detailed here, although several routines +in DIX that are called by DDX are +documented. +Extensions incorporate new functionality into the server; and require +additional functionality over a simple DDX. + + +The following sections outline the functions of the layers. +Section 3 briefly tells what you need to know about the DIX layer. +The OS layer is explained in Section 4. +Section 5 gives the theory of operation and procedural interface for the +DDX layer. +Section 6 describes the functions which exist for the extension writer. + +
+ +
+ DIX Layer + +The DIX layer is the machine and device independent part of X. +The source should be common to all operating systems and devices. +The port process should not include changes to this part, therefore internal interfaces to DIX +modules are not discussed, except for public interfaces to the DDX and the OS layers. +The functions described in this section are available for extension writers to use. + + +In the process of getting your server to work, if +you think that DIX must be modified for purposes other than bug fixes, +you may be doing something wrong. +Keep looking for a more compatible solution. +When the next release of the X server code is available, +you should be able to just drop in the new DIX code and compile it. +If you change DIX, +you will have to remember what changes you made and will have +to change the new sources before you can update to the new version. + + +The heart of the DIX code is a loop called the dispatch loop. +Each time the processor goes around the loop, it sends off accumulated input events +from the input devices to the clients, and it processes requests from the clients. +This loop is the most organized way for the server to +process the asynchronous requests that +it needs to process. +Most of these operations are performed by OS and DDX routines that you must supply. + +
+ Server Resource System + +X resources are C structs inside the server. +Client applications create and manipulate these objects +according to the rules of the X byte stream protocol. +Client applications refer to resources with resource IDs, +which are 32-bit integers that are sent over the network. +Within the server, of course, they are just C structs, and we refer to them +by pointers. + +
+ Pre-Defined Resource Types + +The DDX layer has several kinds of resources: + +Window +Pixmap +Screen +Device +Colormap +Font +Cursor +Graphics Contexts + + + +The type names of the more +important server +structs usually end in "Rec," such as "DeviceRec;" +the pointer types usually end in "Ptr," such as "DevicePtr." + + +The structs and +important defined constants are declared +in .h files that have names that suggest the name of the object. +For instance, there are two .h files for windows, +window.h and windowstr.h. +window.h defines only what needs to be defined in order to use windows +without peeking inside of them; +windowstr.h defines the structs with all of their components in great detail +for those who need it. + + +Three kinds of fields are in these structs: + +Attribute fields - struct fields that contain values like normal structs +Pointers to procedures, or structures of procedures, that operate on the object +A single private field or a devPrivates list (see ) +used by your DDX code to store private data. + + + +DIX calls through +the struct's procedure pointers to do its tasks. +These procedures are set either directly or indirectly by DDX procedures. +Most of +the procedures described in the remainder of this +document are accessed through one of these structs. +For example, the procedure to create a pixmap +is attached to a ScreenRec and might be called by using the expression + + +
+(* pScreen->CreatePixmap)(pScreen, width, height, depth). +
+
+ +All procedure pointers must be set to some routine unless noted otherwise; +a null pointer will have unfortunate consequences. + + +Procedure routines will be indicated in the documentation by this convention: +
+void pScreen->MyScreenRoutine(arg, arg, ...) +
+as opposed to a free routine, not in a data structure: +
+void MyFreeRoutine(arg, arg, ...) +
+
+ +The attribute fields are mostly set by DIX; DDX should not modify them +unless noted otherwise. + +
+
+ Creating Resources and Resource Types + +These functions should also be called from your extensionInitProc to +allocate all of the various resource classes and types required for +the extension. Each time the server resets, these types must be reallocated +as the old allocations will have been discarded. +Resource types are integer values starting at 1. Get +a resource type by calling +
+ + RESTYPE CreateNewResourceType(deleteFunc, char *name) + +
+deleteFunc will be called to destroy all resources with this +type. name will be used to identify this type of resource +to clients using the X-Resource extension, to security +extensions such as SELinux, and to tracing frameworks such as DTrace. +[The name argument was added in xorg-server 1.8.] +
+ +Resource classes are masks starting at 1 << 31 which can +be or'ed with any resource type to provide attributes for the +type. To allocate a new class bit, call +
+ + RESTYPE CreateNewResourceClass() + +
+
+ +There are two ways of looking up resources, by type or +by class. Classes are non-exclusive subsets of the space of +all resources, so you can lookup the union of multiple classes. +(RC_ANY is the union of all classes). + +Note that the appropriate class bits must be or'ed into the value returned +by CreateNewResourceType when calling resource lookup functions. + +If you need to create a ``private'' resource ID for internal use, you +can call FakeClientID. +
+ + XID FakeClientID(client) + int client; + +
+This allocates from ID space reserved for the server.
+ +To associate a resource value with an ID, use AddResource. +
+ + Bool AddResource(id, type, value) + XID id; + RESTYPE type; + pointer value; + +
+The type should be the full type of the resource, including any class +bits. If AddResource fails to allocate memory to store the resource, +it will call the deleteFunc for the type, and then return False.
+ +To free a resource, use one of the following. +
+ + void FreeResource(id, skipDeleteFuncType) + XID id; + RESTYPE skipDeleteFuncType; + + void FreeResourceByType(id, type, skipFree) + XID id; + RESTYPE type; + Bool skipFree; + +
+FreeResource frees all resources matching the given id, regardless of +type; the type's deleteFunc will be called on each matching resource, +except that skipDeleteFuncType can be set to a single type for which +the deleteFunc should not be called (otherwise pass RT_NONE). +FreeResourceByType frees a specific resource matching a given id +and type; if skipFree is true, then the deleteFunc is not called. +
+
+
+ Looking Up Resources + +To look up a resource, use one of the following. +
+ + pointer LookupIDByType(id, rtype) + XID id; + RESTYPE rtype; + + pointer LookupIDByClass(id, classes) + XID id; + RESTYPE classes; + +
+LookupIDByType finds a resource with the given id and exact type. +LookupIDByClass finds a resource with the given id whose type is +included in any one of the specified classes.
+
+
+
+ Callback Manager + +To satisfy a growing number of requests for the introduction of ad hoc +notification style hooks in the server, a generic callback manager was +introduced in R6. A callback list object can be introduced for each +new hook that is desired, and other modules in the server can register +interest in the new callback list. The following functions support +these operations. + +Before getting bogged down in the interface details, an typical usage +example should establish the framework. Let's look at the +ClientStateCallback in dix/dispatch.c. The purpose of this particular +callback is to notify intereseted parties when a client's state +(initial, running, gone) changes. The callback is "created" in this +case by simply declaring a variable: +
+ CallbackListPtr ClientStateCallback; +
+
+ +Whenever the client's state changes, the following code appears, which notifies +all intereseted parties of the change: +
+ if (ClientStateCallback) CallCallbacks(&ClientStateCallback, (pointer)client); +
+
+ +Interested parties subscribe to the ClientStateCallback list by saying: +
+ AddCallback(&ClientStateCallback, func, data); +
+
+ +When CallCallbacks is invoked on the list, func will be called thusly: +
+ (*func)(&ClientStateCallback, data, client) +
+
+ +Now for the details. +
+ + Bool CreateCallbackList(pcbl, cbfuncs) + CallbackListPtr *pcbl; + CallbackFuncsPtr cbfuncs; + +
+CreateCallbackList creates a callback list. We envision that this +function will be rarely used because the callback list is created +automatically (if it doesn't already exist) when the first call to +AddCallback is made on the list. The only reason to explicitly create +the callback list with this function is if you want to override the +implementation of some of the other operations on the list by passing +your own cbfuncs. You also lose something by explicit creation: you +introduce an order dependency during server startup because the list +must be created before any modules subscribe to it. Returns TRUE if +successful.
+ +
+ + Bool AddCallback(pcbl, callback, subscriber_data) + CallbackListPtr *pcbl; + CallbackProcPtr callback; + pointer subscriber_data; + +
+Adds the (callback, subscriber_data) pair to the given callback list. Creates the callback +list if it doesn't exist. Returns TRUE if successful.
+ +
+ + Bool DeleteCallback(pcbl, callback, subscriber_data) + CallbackListPtr *pcbl; + CallbackProcPtr callback; + pointer subscriber_data; + +
+Removes the (callback, data) pair to the given callback list if present. +Returns TRUE if (callback, data) was found.
+ +
+ + void CallCallbacks(pcbl, call_data) + CallbackListPtr *pcbl; + pointer call_data; + +
+For each callback currently registered on the given callback list, call +it as follows: +
+ + (*callback)(pcbl, subscriber_data, call_data); +
+
+ +
+ void DeleteCallbackList(pcbl) + CallbackListPtr *pcbl; + +
+Destroys the given callback list.
+
+
+ Extension Interfaces + +This function should be called from your extensionInitProc which +should be called by InitExtensions. +
+ + ExtensionEntry *AddExtension(name, NumEvents,NumErrors, + MainProc, SwappedMainProc, CloseDownProc, MinorOpcodeProc) + + char *name; /*Null terminate string; case matters*/ + int NumEvents; + int NumErrors; + int (* MainProc)(ClientPtr);/*Called if client matches server order*/ + int (* SwappedMainProc)(ClientPtr);/*Called if client differs from server*/ + void (* CloseDownProc)(ExtensionEntry *); + unsigned short (*MinorOpcodeProc)(ClientPtr); + +
+name is the name used by clients to refer to the extension. NumEvents is the +number of event types used by the extension, NumErrors is the number of +error codes needed by the extension. MainProc is called whenever a client +accesses the major opcode assigned to the extension. SwappedMainProc is +identical, except the client using the extension has reversed byte-sex. +CloseDownProc is called at server reset time to deallocate any private +storage used by the extension. MinorOpcodeProc is used by DIX to place the +appropriate value into errors. The DIX routine StandardMinorOpcode can be +used here which takes the minor opcode from the normal place in the request +(i.e. just after the major opcode).
+
+
+ Macros and Other Helpers + +There are a number of macros in Xserver/include/dix.h which +are useful to the extension writer. Ones of particular interest +are: REQUEST, REQUEST_SIZE_MATCH, REQUEST_AT_LEAST_SIZE, +REQUEST_FIXED_SIZE, LEGAL_NEW_RESOURCE, LOOKUP_DRAWABLE, VERIFY_GC, and +VALIDATE_DRAWABLE_AND_GC. Useful byte swapping macros can be found +in Xserver/include/misc.h: lswapl, lswaps, LengthRestB, LengthRestS, +LengthRestL, SwapRestS, SwapRestL, swapl, swaps, cpswapl, and cpswaps. +
+
+ +
+ OS Layer + +This part of the source consists of a few routines that you have to rewrite +for each operating system. +These OS functions maintain the client connections and schedule work +to be done for clients. +They also provide an interface to font files, +font name to file name translation, and +low level memory management. +
+void OsInit() +
+OsInit initializes your OS code, performing whatever tasks need to be done. +Frequently there is not much to be done. +The sample server implementation is in Xserver/os/osinit.c. +
+
+ Scheduling and Request Delivery + +The main dispatch loop in DIX creates the illusion of multitasking between +different windows, while the server is itself but a single process. +The dispatch loop breaks up the work for each client into small digestible parts. +Some parts are requests from a client, such as individual graphic commands. +Some parts are events delivered to the client, such as keystrokes from the user. +The processing of events and requests for different +clients can be interleaved with one another so true multitasking +is not needed in the server. + + +You must supply some of the pieces for proper scheduling between clients. +
+ + int WaitForSomething(pClientReady) + int *pClientReady; + +
+
+ +WaitForSomething is the scheduler procedure you must write that will +suspend your server process until something needs to be done. +This call should +make the server suspend until one or more of the following occurs: + +There is an input event from the user or hardware (see SetInputCheck()) +There are requests waiting from known clients, in which case you should return a count of clients stored in pClientReady +A new client tries to connect, in which case you should create the client and then continue waiting + + + +Before WaitForSomething() computes the masks to pass to select, poll or +similar operating system interface, it needs to +see if there is anything to do on the work queue; if so, it must call a DIX +routine called ProcessWorkQueue. +
+ + extern WorkQueuePtr workQueue; + + if (workQueue) + ProcessWorkQueue (); + +
+
+ +If WaitForSomething() decides it is about to do something that might block +(in the sample server, before it calls select() or poll) it must call a DIX +routine called BlockHandler(). +
+ + void BlockHandler(pTimeout, pReadmask) + pointer pTimeout; + pointer pReadmask; + +
+The types of the arguments are for agreement between the OS and DDX +implementations, but the pTimeout is a pointer to the information +determining how long the block is allowed to last, and the +pReadmask is a pointer to the information describing the descriptors +that will be waited on. +
+ +In the sample server, pTimeout is a struct timeval **, and pReadmask is +the address of the select() mask for reading. + + +The DIX BlockHandler() iterates through the Screens, for each one calling +its BlockHandler. A BlockHandler is declared thus: +
+ + void xxxBlockHandler(nscreen, pbdata, pptv, pReadmask) + int nscreen; + pointer pbdata; + struct timeval ** pptv; + pointer pReadmask; + +
+The arguments are the index of the Screen, the blockData field +of the Screen, and the arguments to the DIX BlockHandler(). +
+ +Immediately after WaitForSomething returns from the +block, even if it didn't actually block, it must call the DIX routine +WakeupHandler(). +
+ + void WakeupHandler(result, pReadmask) + int result; + pointer pReadmask; + +
+Once again, the types are not specified by DIX. The result is the +success indicator for the thing that (may have) blocked, +and the pReadmask is a mask of the descriptors that came active. +In the sample server, result is the result from select() (or equivalent +operating system function), and pReadmask is +the address of the select() mask for reading. +
+ +The DIX WakeupHandler() calls each Screen's +WakeupHandler. A WakeupHandler is declared thus: +
+ + void xxxWakeupHandler(nscreen, pbdata, err, pReadmask) + int nscreen; + pointer pbdata; + unsigned long result; + pointer pReadmask; + +
+The arguments are the index of the Screen, the blockData field +of the Screen, and the arguments to the DIX WakeupHandler(). +
+ +In addition to the per-screen BlockHandlers, any module may register +block and wakeup handlers (only together) using: +
+ + Bool RegisterBlockAndWakeupHandlers (blockHandler, wakeupHandler, blockData) + BlockHandlerProcPtr blockHandler; + WakeupHandlerProcPtr wakeupHandler; + pointer blockData; + +
+A FALSE return code indicates that the registration failed for lack of +memory. To remove a registered Block handler at other than server reset time +(when they are all removed automatically), use: +
+ + RemoveBlockAndWakeupHandlers (blockHandler, wakeupHandler, blockData) + BlockHandlerProcPtr blockHandler; + WakeupHandlerProcPtr wakeupHandler; + pointer blockData; + +
+All three arguments must match the values passed to +RegisterBlockAndWakeupHandlers. +
+ +These registered block handlers are called after the per-screen handlers: +
+ + void (*BlockHandler) (blockData, pptv, pReadmask) + pointer blockData; + OSTimePtr pptv; + pointer pReadmask; + +
+
+ +Sometimes block handlers need to adjust the time in a OSTimePtr structure, +which on UNIX family systems is generally represented by a struct timeval +consisting of seconds and microseconds in 32 bit values. +As a convenience to reduce error prone struct timeval computations which +require modulus arithmetic and correct overflow behavior in the face of +millisecond wrapping throrugh 32 bits, +
+ + void AdjustWaitForDelay(pointer /*waitTime*, unsigned long /* newdelay */) + +
+has been provided. +
+ +Any wakeup handlers registered with RegisterBlockAndWakeupHandlers will +be called before the Screen handlers: +
+ + void (*WakeupHandler) (blockData, err, pReadmask) + pointer blockData; + int err; + pointer pReadmask; +
+
+ +The WaitForSomething on the sample server also has a built +in screen saver that darkens the screen if no input happens for a period of time. +The sample server implementation is in Xserver/os/WaitFor.c. + + +Note that WaitForSomething() may be called when you already have several +outstanding things (events, requests, or new clients) queued up. +For instance, your server may have just done a large graphics request, +and it may have been a long time since WaitForSomething() was last called. +If many clients have lots of requests queued up, DIX will only service +some of them for a given client +before going on to the next client (see isItTimeToYield, below). +Therefore, WaitForSomething() will have to report that these same clients +still have requests queued up the next time around. + + +An implementation should return information on as +many outstanding things as it can. +For instance, if your implementation always checks for client data first and does not +report any input events until there is no client data left, +your mouse and keyboard might get locked out by an application that constantly +barrages the server with graphics drawing requests. +Therefore, as a general rule, input devices should always have priority over graphics +devices. + + +A list of indexes (client->index) for clients with data ready to be read or +processed should be returned in pClientReady, and the count of indexes +returned as the result value of the call. +These are not clients that have full requests ready, but any clients who have +any data ready to be read or processed. +The DIX dispatcher +will process requests from each client in turn by calling +ReadRequestFromClient(), below. + + +WaitForSomething() must create new clients as they are requested (by +whatever mechanism at the transport level). A new client is created +by calling the DIX routine: +
+ + ClientPtr NextAvailableClient(ospriv) + pointer ospriv; +
+This routine returns NULL if a new client cannot be allocated (e.g. maximum +number of clients reached). The ospriv argument will be stored into the OS +private field (pClient->osPrivate), to store OS private information about the +client. In the sample server, the osPrivate field contains the +number of the socket for this client. See also "New Client Connections." +NextAvailableClient() will call InsertFakeRequest(), so you must be +prepared for this. +
+ +If there are outstanding input events, +you should make sure that the two SetInputCheck() locations are unequal. +The DIX dispatcher will call your implementation of ProcessInputEvents() +until the SetInputCheck() locations are equal. + + +The sample server contains an implementation of WaitForSomething(). +The +following two routines indicate to WaitForSomething() what devices should +be waited for. fd is an OS dependent type; in the sample server +it is an open file descriptor. +
+ + int AddEnabledDevice(fd) + int fd; + + int RemoveEnabledDevice(fd) + int fd; +
+These two routines are +usually called by DDX from the initialize cases of the +Input Procedures that are stored in the DeviceRec (the +routine passed to AddInputDevice()). +The sample server implementation of AddEnabledDevice +and RemoveEnabledDevice are in Xserver/os/connection.c. +
+
+ Timer Facilities + +Similarly, the X server or an extension may need to wait for some timeout. +Early X releases implemented this functionality using block and wakeup handlers, +but this has been rewritten to use a general timer facilty, and the +internal screen saver facilties reimplemented to use Timers. +These functions are TimerInit, TimerForce, TimerSet, TimerCheck, TimerCancel, +and TimerFree, as defined in Xserver/include/os.h. A callback function will be called +when the timer fires, along with the current time, and a user provided argument. +
+ typedef struct _OsTimerRec *OsTimerPtr; + + typedef CARD32 (*OsTimerCallback)( + OsTimerPtr /* timer */, + CARD32 /* time */, + pointer /* arg */); + + OsTimerPtr TimerSet( OsTimerPtr /* timer */, + int /* flags */, + CARD32 /* millis */, + OsTimerCallback /* func */, + pointer /* arg */); + +
+
+ +TimerSet returns a pointer to a timer structure and sets a timer to the specified time +with the specified argument. The flags can be TimerAbsolute and TimerForceOld. +The TimerSetOld flag controls whether if the timer is reset and the timer is pending, the +whether the callback function will get called. +The TimerAbsolute flag sets the callback time to an absolute time in the future rather +than a time relative to when TimerSet is called. +TimerFree should be called to free the memory allocated +for the timer entry. +
+ void TimerInit(void) + + Bool TimerForce(OsTimerPtr /* pTimer */) + + void TimerCheck(void); + + void TimerCancel(OsTimerPtr /* pTimer */) + + void TimerFree(OSTimerPtr /* pTimer */) +
+
+ +TimerInit frees any exisiting timer entries. TimerForce forces a call to the timer's +callback function and returns true if the timer entry existed, else it returns false and +does not call the callback function. TimerCancel will cancel the specified timer. +TimerFree calls TimerCancel and frees the specified timer. +Calling TimerCheck will force the server to see if any timer callbacks should be called. + +
+
+
+ New Client Connections + +The process whereby a new client-server connection starts up is +very dependent upon what your byte stream mechanism. +This section describes byte stream initiation using examples from the TCP/IP +implementation on the sample server. + + +The first thing that happens is a client initiates a connection with the server. +How a client knows to do this depends upon your network facilities and the +Xlib implementation. +In a typical scenario, a user named Fred +on his X workstation is logged onto a Cray +supercomputer running a command shell in an X window. Fred can type shell +commands and have the Cray respond as though the X server were a dumb terminal. +Fred types in a command to run an X client application that was linked with Xlib. +Xlib looks at the shell environment variable DISPLAY, which has the +value "fredsbittube:0.0." +The host name of Fred's workstation is "fredsbittube," and the 0s are +for multiple screens and multiple X server processes. +(Precisely what +happens on your system depends upon how X and Xlib are implemented.) + + +The client application calls a TCP routine on the +Cray to open a TCP connection for X +to communicate with the network node "fredsbittube." +The TCP software on the Cray does this by looking up the TCP +address of "fredsbittube" and sending an open request to TCP port 6000 +on fredsbittube. + + +All X servers on TCP listen for new clients on port 6000 by default; +this is known as a "well-known port" in IP terminology. + + +The server receives this request from its port 6000 +and checks where it came from to see if it is on the server's list +of "trustworthy" hosts to talk to. +Then, it opens another port for communications with the client. +This is the byte stream that all X communications will go over. + + +Actually, it is a bit more complicated than that. +Each X server process running on the host machine is called a "display." +Each display can have more than one screen that it manages. +"corporatehydra:3.2" represents screen 2 on display 3 on +the multi-screened network node corporatehydra. +The open request would be sent on well-known port number 6003. + + +Once the byte stream is set up, what goes on does not depend very much +upon whether or not it is TCP. +The client sends an xConnClientPrefix struct (see Xproto.h) that has the +version numbers for the version of Xlib it is running, some byte-ordering information, +and two character strings used for authorization. +If the server does not like the authorization strings +or the version numbers do not match within the rules, +or if anything else is wrong, it sends a failure +response with a reason string. + + +If the information never comes, or comes much too slowly, the connection +should be broken off. You must implement the connection timeout. The +sample server implements this by keeping a timestamp for each still-connecting +client and, each time just before it attempts to accept new connections, it +closes any connection that are too old. +The connection timeout can be set from the command line. + + +You must implement whatever authorization schemes you want to support. +The sample server on the distribution tape supports a simple authorization +scheme. The only interface seen by DIX is: +
+ + char * + ClientAuthorized(client, proto_n, auth_proto, string_n, auth_string) + ClientPtr client; + unsigned int proto_n; + char *auth_proto; + unsigned int string_n; + char *auth_string; +
+DIX will only call this once per client, once it has read the full initial +connection data from the client. If the connection should be +accepted ClientAuthorized() should return NULL, and otherwise should +return an error message string. +
+ +Accepting new connections happens internally to WaitForSomething(). +WaitForSomething() must call the DIX routine NextAvailableClient() +to create a client object. +Processing of the initial connection data will be handled by DIX. +Your OS layer must be able to map from a client +to whatever information your OS code needs to communicate +on the given byte stream to the client. +DIX uses this ClientPtr to refer to +the client from now on. The sample server uses the osPrivate field in +the ClientPtr to store the file descriptor for the socket, the +input and output buffers, and authorization information. + + +To initialize the methods you choose to allow clients to connect to +your server, main() calls the routine +
+ + void CreateWellKnownSockets() +
+This routine is called only once, and not called when the server +is reset. To recreate any sockets during server resets, the following +routine is called from the main loop: +
+ + void ResetWellKnownSockets() +
+Sample implementations of both of these routines are found in +Xserver/os/connection.c. +
+ +For more details, see the section called "Connection Setup" in the X protocol specification. + +
+
+ Reading Data from Clients + +Requests from the client are read in as a byte stream by the OS layer. +They may be in the form of several blocks of bytes delivered in sequence; requests may +be broken up over block boundaries or there may be many requests per block. +Each request carries with it length information. +It is the responsibility of the following routine to break it up into request blocks. +
+ + int ReadRequestFromClient(who) + ClientPtr who; +
+
+ +You must write +the routine ReadRequestFromClient() to get one request from the byte stream +belonging to client "who." +You must swap the third and fourth bytes (the second 16-bit word) according to the +byte-swap rules of +the protocol to determine the length of the +request. +This length is measured in 32-bit words, not in bytes. Therefore, the +theoretical maximum request is 256K. +(However, the maximum length allowed is dependent upon the server's input +buffer. This size is sent to the client upon connection. The maximum +size is the constant MAX_REQUEST_SIZE in Xserver/include/os.h) +The rest of the request you return is +assumed NOT to be correctly swapped for internal +use, because that is the responsibility of DIX. + + +The 'who' argument is the ClientPtr returned from WaitForSomething. +The return value indicating status should be set to the (positive) byte count if the read is successful, +0 if the read was blocked, or a negative error code if an error happened. + + +You must then store a pointer to +the bytes of the request in the client request buffer field; +who->requestBuffer. This can simply be a pointer into your buffer; +DIX may modify it in place but will not otherwise cause damage. +Of course, the request must be contiguous; you must +shuffle it around in your buffers if not. + + +The sample server implementation is in Xserver/os/io.c. + +
Inserting Data for Clients + +DIX can insert data into the client stream, and can cause a "replay" of +the current request. +
+ + Bool InsertFakeRequest(client, data, count) + ClientPtr client; + char *data; + int count; + + int ResetCurrentRequest(client) + ClientPtr client; +
+
+ +InsertFakeRequest() must insert the specified number of bytes of data +into the head of the input buffer for the client. This may be a +complete request, or it might be a partial request. For example, +NextAvailableCient() will insert a partial request in order to read +the initial connection data sent by the client. The routine returns FALSE +if memory could not be allocated. ResetCurrentRequest() +should "back up" the input buffer so that the currently executing request +will be reexecuted. DIX may have altered some values (e.g. the overall +request length), so you must recheck to see if you still have a complete +request. ResetCurrentRequest() should always cause a yield (isItTimeToYield). + +
+
+ +
+ Sending Events, Errors And Replies To Clients + +
+ + int WriteToClient(who, n, buf) + ClientPtr who; + int n; + char *buf; +
+WriteToClient should write n bytes starting at buf to the +ClientPtr "who". +It returns the number of bytes written, but for simplicity, +the number returned must be either the same value as the number +requested, or -1, signaling an error. +The sample server implementation is in Xserver/os/io.c. +
+ +
+ void SendErrorToClient(client, majorCode, minorCode, resId, errorCode) + ClientPtr client; + unsigned int majorCode; + unsigned int minorCode; + XID resId; + int errorCode; +
+SendErrorToClient can be used to send errors back to clients, +although in most cases your request function should simply return +the error code, having set client->errorValue to the appropriate +error value to return to the client, and DIX will call this +function with the correct opcodes for you. +
+ +
+ + void FlushAllOutput() + + void FlushIfCriticalOutputPending() + + void SetCriticalOutputPending() +
+These three routines may be implemented to support buffered or delayed +writes to clients, but at the very least, the stubs must exist. +FlushAllOutput() unconditionally flushes all output to clients; +FlushIfCriticalOutputPending() flushes output only if +SetCriticalOutputPending() has be called since the last time output +was flushed. +The sample server implementation is in Xserver/os/io.c and +actually ignores requests to flush output on a per-client basis +if it knows that there +are requests in that client's input queue. +
+
+
+ Font Support + +In the sample server, fonts are encoded in disk files or fetched from the +font server. +For disk fonts, there is one file per font, with a file name like +"fixed.pcf". Font server fonts are read over the network using the +X Font Server Protocol. The disk directories containing disk fonts and +the names of the font servers are listed together in the current "font path." + + +In principle, you can put all your fonts in ROM or in RAM in your server. +You can put them all in one library file on disk. +You could generate them on the fly from stroke descriptions. By placing the +appropriate code in the Font Library, you will automatically export fonts in +that format both through the X server and the Font server. + + +With the incorporation of font-server based fonts and the Speedo donation +from Bitstream, the font interfaces have been moved into a separate +library, now called the Font Library (../fonts/lib). These routines are +shared between the X server and the Font server, so instead of this document +specifying what you must implement, simply refer to the font +library interface specification for the details. All of the interface code to the Font +library is contained in dix/dixfonts.c + +
+
+ Memory Management + +Memory management is based on functions in the C runtime library. +Xalloc(), Xrealloc(), and Xfree() work just like malloc(), realloc(), +and free(), except that you can pass a null pointer to Xrealloc() to +have it allocate anew or pass a null pointer to Xfree() and nothing +will happen. The versions in the sample server also do some checking +that is useful for debugging. Consult a C runtime library reference +manual for more details. + + +The macros ALLOCATE_LOCAL and DEALLOCATE_LOCAL are provided in +Xserver/include/os.h. These are useful if your compiler supports +alloca() (or some method of allocating memory from the stack); and are +defined appropriately on systems which support it. + + +Treat memory allocation carefully in your implementation. Memory +leaks can be very hard to find and are frustrating to a user. An X +server could be running for days or weeks without being reset, just +like a regular terminal. If you leak a few dozen k per day, that will +add up and will cause problems for users that leave their workstations +on. + +
+
+ Client Scheduling + +The X server +has the ability to schedule clients much like an operating system would, +suspending and restarting them without regard for the state of their input +buffers. This functionality allows the X server to suspend one client and +continue processing requests from other clients while waiting for a +long-term network activity (like loading a font) before continuing with the +first client. +
+ Bool isItTimeToYield; +
+isItTimeToYield is a global variable you can set +if you want to tell +DIX to end the client's "time slice" and start paying attention to the next client. +After the current request is finished, DIX will move to the next client. +
+ +In the sample +server, ReadRequestFromClient() sets isItTimeToYield after +10 requests packets in a row are read from the same client. + + +This scheduling algorithm can have a serious effect upon performance when two +clients are drawing into their windows simultaneously. +If it allows one client to run until its request +queue is empty by ignoring isItTimeToYield, the client's queue may +in fact never empty and other clients will be blocked out. +On the other hand, if it switchs between different clients too quickly, +performance may suffer due to too much switching between contexts. +For example, if a graphics processor needs to be set up with drawing modes +before drawing, and two different clients are drawing with +different modes into two different windows, you may +switch your graphics processor modes so often that performance is impacted. + + +See the Strategies document for +heuristics on setting isItTimeToYield. + + +The following functions provide the ability to suspend request +processing on a particular client, resuming it at some later time: +
+ + int IgnoreClient (who) + ClientPtr who; + + int AttendClient (who) + ClientPtr who; +
+Ignore client is responsible for pretending that the given client doesn't +exist. WaitForSomething should not return this client as ready for reading +and should not return if only this client is ready. AttendClient undoes +whatever IgnoreClient did, setting it up for input again. +
+ +Three functions support "process control" for X clients: +
+ + Bool ClientSleep (client, function, closure) + ClientPtr client; + Bool (*function)(); + pointer closure; + +
+This suspends the current client (the calling routine is responsible for +making its way back to Dispatch()). No more X requests will be processed +for this client until ClientWakeup is called. +
+ + Bool ClientSignal (client) + ClientPtr client; + +
+This function causes a call to the (*function) parameter passed to +ClientSleep to be queued on the work queue. This does not automatically +"wakeup" the client, but the function called is free to do so by calling: +
+ + ClientWakeup (client) + ClientPtr client; + +
+This re-enables X request processing for the specified client. +
+
+
+ Other OS Functions + +
+ void + ErrorF(char *f, ...) + + void + FatalError(char *f, ...) + + void + Error(str) + char *str; +
+You should write these three routines to provide for diagnostic output +from the dix and ddx layers, although implementing them to produce no +output will not affect the correctness of your server. ErrorF() and +FatalError() take a printf() type of format specification in the first +argument and an implementation-dependent number of arguments following +that. Normally, the formats passed to ErrorF() and FatalError() +should be terminated with a newline. Error() provides an os interface +for printing out the string passed as an argument followed by a +meaningful explanation of the last system error. Normally the string +does not contain a newline, and it is only called by the ddx layer. +In the sample implementation, Error() uses the perror() function. +
+ +After printing the message arguments, FatalError() must be implemented +such that the server will call AbortDDX() to give the ddx layer +a chance to reset the hardware, and then +terminate the server; it must not return. + + +The sample server implementation for these routines +is in Xserver/os/util.c. + +
+
+ Idiom Support + +The DBE specification introduces the notion of idioms, which are +groups of X requests which can be executed more efficiently when taken +as a whole compared to being performed individually and sequentially. +This following server internal support to allows DBE +implementations, as well as other parts of the server, +to do idiom processing. + + +
+ + xReqPtr PeekNextRequest(xReqPtr req, ClientPtr client, Bool readmore) +
+If req is NULL, the return value will be a pointer to the start of the +complete request that follows the one currently being executed for the +client. If req is not NULL, the function assumes that req is a +pointer to a request in the client's request buffer, and the return +value will be a pointer to the the start of the complete request that +follows req. If the complete request is not available, the function +returns NULL; pointers to partial requests will never be returned. If +(and only if) readmore is TRUE, PeekNextRequest should try to read an +additional request from the client if one is not already available in +the client's request buffer. If PeekNextRequest reads more data into +the request buffer, it should not move or change the existing data. +
+ +
+ + void SkipRequests(xReqPtr req, ClientPtr client, int numskipped) +
+The requests for the client up to and including the one specified by +req will be skipped. numskipped must be the number of requests being +skipped. Normal request processing will resume with the request that +follows req. The caller must not have modified the contents of the +request buffer in any way (e.g., by doing byte swapping in place). +
+ +Additionally, two macros in os.h operate on the xReq +pointer returned by PeekNextRequest: +
+ + int ReqLen(xReqPtr req, ClientPtr client) +
+The value of ReqLen is the request length in bytes of the given xReq. +
+ + otherReqTypePtr CastxReq(xReq *req, otherReqTypePtr) +
+The value of CastxReq is the conversion of the given request pointer +to an otherReqTypePtr (which should be a pointer to a protocol +structure type). Only those fields which come after the length field +of otherReqType may be accessed via the returned pointer. +
+ +Thus the first two fields of a request, reqType and data, can be +accessed directly using the xReq * returned by PeekNextRequest. The +next field, the length, can be accessed with ReqLen. Fields beyond +that can be accessed with CastxReq. This complexity was necessary +because of the reencoding of core protocol that can happen due to the +BigRequests extension. + +
+
+ +
+ DDX Layer + +This section describes the +interface between DIX and DDX. +While there may be an OS-dependent driver interface between DDX +and the physical device, that interface is left to the DDX +implementor and is not specified here. + + +The DDX layer does most of its work through procedures that are +pointed to by different structs. +As previously described, the behavior of these resources is largely determined by +these procedure pointers. +Most of these routines are for graphic display on the screen or support functions thereof. +The rest are for user input from input devices. + +
+ Input + +In this document "input" refers to input from the user, +such as mouse, keyboard, and +bar code readers. +X input devices are of several types: keyboard, pointing device, and +many others. The core server has support for extension devices as +described by the X Input Extension document; the interfaces used by +that extension are described elsewhere. The core devices are actually +implemented as two collections of devices, the mouse is a ButtonDevice, +a ValuatorDevice and a PtrFeedbackDevice while the keyboard is a KeyDevice, +a FocusDevice and a KbdFeedbackDevice. Each part implements a portion of +the functionality of the device. This abstraction is hidden from view for +core devices by DIX. + + +You, the DDX programmer, are +responsible for some of the routines in this section. +Others are DIX routines that you should call to do the things you need to do in these DDX routines. +Pay attention to which is which. + +
+ Input Device Data Structures + +DIX keeps a global directory of devices in a central data structure +called InputInfo. +For each device there is a device structure called a DeviceRec. +DIX can locate any DeviceRec through InputInfo. +In addition, it has a special pointer to identify the main pointing device +and a special pointer to identify the main keyboard. + + +The DeviceRec (Xserver/include/input.h) is a device-independent +structure that contains the state of an input device. +A DevicePtr is simply a pointer to a DeviceRec. + + +An xEvent describes an event the server reports to a client. +Defined in Xproto.h, it is a huge struct of union of structs that have fields for +all kinds of events. +All of the variants overlap, so that the struct is actually very small in memory. + +
+
+ Processing Events + +The main DDX input interface is the following routine: +
+ + void ProcessInputEvents() +
+You must write this routine to deliver input events from the user. +DIX calls it when input is pending (see next section), and possibly +even when it is not. +You should write it to get events from each device and deliver +the events to DIX. +To deliver the events to DIX, DDX should call the following +routine: +
+ + void DevicePtr->processInputProc(pEvent, device, count) + xEventPtr events; + DeviceIntPtr device; + int count; +
+This is the "input proc" for the device, a DIX procedure. +DIX will fill in this procedure pointer to one of its own routines by +the time ProcessInputEvents() is called the first time. +Call this input proc routine as many times as needed to +deliver as many events as should be delivered. +DIX will buffer them up and send them out as needed. Count is set +to the number of event records which make up one atomic device event and +is always 1 for the core devices (see the X Input Extension for descriptions +of devices which may use count > 1). +
+ +For example, your ProcessInputEvents() routine might check the mouse and the +keyboard. +If the keyboard had several keystrokes queued up, it could just call +the keyboard's processInputProc as many times as needed to flush its internal queue. + + +event is an xEvent struct you pass to the input proc. +When the input proc returns, it is finished with the event rec, and you can fill +in new values and call the input proc again with it. + + +You should deliver the events in the same order that they were generated. + + +For keyboard and pointing devices the xEvent variant should be keyButtonPointer. +Fill in the following fields in the xEvent record: + + +type - is one of the following: KeyPress, KeyRelease, ButtonPress, + ButtonRelease, or MotionNotify +detail - for KeyPress or KeyRelease fields, this should be the + key number (not the ASCII code); otherwise unused +time - is the time that the event happened (32-bits, in milliseconds, arbitrary origin) +rootX - is the x coordinate of cursor +rootY - is the y coordinate of cursor + + +The rest of the fields are filled in by DIX. + + +The time stamp is maintained by your code in the DDX layer, and it is your responsibility to +stamp all events correctly. + + +The x and y coordinates of the pointing device and the time must be filled in for all event types +including keyboard events. + + +The pointing device must report all button press and release events. +In addition, it should report a MotionNotify event every time it gets called +if the pointing device has moved since the last notify. +Intermediate pointing device moves are stored in a special GetMotionEvents buffer, +because most client programs are not interested in them. + + +There are quite a collection of sample implementations of this routine, +one for each supported device. + +
+
+Telling DIX When Input is Pending + +In the server's dispatch loop, DIX checks to see +if there is any device input pending whenever WaitForSomething() returns. +If the check says that input is pending, DIX calls the +DDX routine ProcessInputEvents(). + + +This check for pending input must be very quick; a procedure call +is too slow. +The code that does the check is a hardwired IF +statement in DIX code that simply compares the values +pointed to by two pointers. +If the values are different, then it assumes that input is pending and +ProcessInputEvents() is called by DIX. + + +You must pass pointers to DIX to tell it what values to compare. +The following procedure +is used to set these pointers: +
+ + void SetInputCheck(p1, p2) + long *p1, *p2; +
+You should call it sometime during initialization to indicate to DIX the +correct locations to check. +You should +pay special attention to the size of what they actually point to, +because the locations are assumed to be longs. +
+ +These two pointers are initialized by DIX +to point to arbitrary values that +are different. +In other words, if you forget to call this routine during initialization, +the worst thing that will happen is that +ProcessInputEvents will be called when +there are no events to process. + + +p1 and p2 might +point at the head and tail of some shared +memory queue. +Another use would be to have one point at a constant 0, with the +other pointing at some mask containing 1s +for each input device that has +something pending. + + +The DDX layer of the sample server calls SetInputCheck() +once when the +server's private internal queue is initialized. +It passes pointers to the queue's head and tail. See Xserver/mi/mieq.c. + + +
+ int TimeSinceLastInputEvent() +
+DDX must time stamp all hardware input +events. But DIX sometimes needs to know the +time and the OS layer needs to know the time since the last hardware +input event in +order for the screen saver to work. TimeSinceLastInputEvent() returns +the this time in milliseconds. +
+
+
+ Controlling Input Devices + +You must write four routines to do various device-specific +things with the keyboard and pointing device. +They can have any name you wish because +you pass the procedure pointers to DIX routines. + + +
+ + int pInternalDevice->valuator->GetMotionProc(pdevice, coords, start, stop, pScreen) + DeviceIntPtr pdevice; + xTimecoord * coords; + unsigned long start; + unsigned long stop; + ScreenPtr pScreen; +
+You write this DDX routine to fill in coords with all the motion +events that have times (32-bit count of milliseconds) between time +start and time stop. It should return the number of motion events +returned. If there is no motion events support, this routine should +do nothing and return zero. The maximum number of coords to return is +set in InitPointerDeviceStruct(), below. +
+ +When the user drags the pointing device, the cursor position +theoretically sweeps through an infinite number of points. Normally, +a client that is concerned with points other than the starting and +ending points will receive a pointer-move event only as often as the +server generates them. (Move events do not queue up; each new one +replaces the last in the queue.) A server, if desired, can implement +a scheme to save these intermediate events in a motion buffer. A +client application, like a paint program, may then request that these +events be delivered to it through the GetMotionProc routine. + + +
+ + void pInternalDevice->bell->BellProc(percent, pDevice, ctrl, unknown) + int percent; + DeviceIntPtr pDevice; + pointer ctrl; + int class; +
+You need to write this routine to ring the bell on the keyboard. +loud is a number from 0 to 100, with 100 being the loudest. +Class is either BellFeedbackClass or KbdFeedbackClass (from XI.h). +
+ +
+ + void pInternalDevice->somedevice->CtrlProc(device, ctrl) + DevicePtr device; + SomethingCtrl *ctrl; + +
+You write two versions of this procedure, one for the keyboard and one for the pointing device. +DIX calls it to inform DDX when a client has requested changes in the current +settings for the particular device. +For a keyboard, this might be the repeat threshold and rate. +For a pointing device, this might be a scaling factor (coarse or fine) for position reporting. +See input.h for the ctrl structures. +
+
+
+ Input Initialization + +Input initialization is a bit complicated. +It all starts with InitInput(), a routine that you write to call +AddInputDevice() twice +(once for pointing device and once for keyboard.) +You also want to call RegisterKeyboardDevice() and RegisterPointerDevice() +on them. + + +When you Add the devices, a routine you supply for each device +gets called to initialize them. +Your individual initialize routines must call InitKeyboardDeviceStruct() +or InitPointerDeviceStruct(), depending upon which it is. +In other words, you indicate twice that the keyboard is the keyboard and +the pointer is the pointer. + + +
+ + void InitInput(argc, argv) + int argc; + char **argv; +
+InitInput is a DDX routine you must write to initialize the +input subsystem in DDX. +It must call AddInputDevice() for each device that might generate events. +In addition, you must register the main keyboard and pointing devices by +calling RegisterPointerDevice() and RegisterKeyboardDevice(). +
+ +
+ + DevicePtr AddInputDevice(deviceProc, autoStart) + DeviceProc deviceProc; + Bool autoStart; +
+AddInputDevice is a DIX routine you call to create a device object. +deviceProc is a DDX routine that is called by DIX to do various operations. +AutoStart should be TRUE for devices that need to be turned on at +initialization time with a special call, as opposed to waiting for some +client application to +turn them on. +This routine returns NULL if sufficient memory cannot be allocated to +install the device. +
+ +Note also that except for the main keyboard and pointing device, +an extension is needed to provide for a client interface to a device. + + +
+ + void RegisterPointerDevice(device) + DevicePtr device; +
+RegisterPointerDevice is a DIX routine that your DDX code calls that +makes that device the main pointing device. +This routine is called once upon initialization and cannot be called again. +
+ +
+ + void RegisterKeyboardDevice(device) + DevicePtr device; +
+RegisterKeyboardDevice makes the given device the main keyboard. +This routine is called once upon initialization and cannot be called again. +
+ +The following DIX +procedures return the specified DevicePtr. They may or may not be useful +to DDX implementors. + + +
+ + DevicePtr LookupKeyboardDevice() +
+LookupKeyboardDevice returns pointer for current main keyboard device. +
+ +
+ + DevicePtr LookupPointerDevice() +
+LookupPointerDevice returns pointer for current main pointing device. +
+ +A DeviceProc (the kind passed to AddInputDevice()) in the following form: +
+ + Bool pInternalDevice->DeviceProc(device, action); + DeviceIntPtr device; + int action; +
+You must write a DeviceProc for each device. +device points to the device record. +action tells what action to take; +it will be one of these defined constants (defined in input.h): + + +DEVICE_INIT - +At DEVICE_INIT time, the device should initialize itself by calling +InitPointerDeviceStruct(), InitKeyboardDeviceStruct(), or a similar +routine (see below) +and "opening" the device if necessary. +If you return a non-zero (i.e., != Success) value from the DEVICE_INIT +call, that device will be considered unavailable. If either the main keyboard +or main pointing device cannot be initialized, the DIX code will refuse +to continue booting up. + +DEVICE_ON - If the DeviceProc is called with DEVICE_ON, then it is +allowed to start +putting events into the client stream by calling through the ProcessInputProc +in the device. + +DEVICE_OFF - If the DeviceProc is called with DEVICE_OFF, no further +events from that +device should be given to the DIX layer. +The device will appear to be dead to the user. + +DEVICE_CLOSE - At DEVICE_CLOSE (terminate or reset) time, the device should +be totally closed down. + +
+ +
+ + void InitPointerDeviceStruct(device, map, mapLength, + GetMotionEvents, ControlProc, numMotionEvents) + DevicePtr device; + CARD8 *map; + int mapLength; + ValuatorMotionProcPtr ControlProc; + PtrCtrlProcPtr GetMotionEvents; + int numMotionEvents; +
+InitPointerDeviceStruct is a DIX routine you call at DEVICE_INIT time to declare +some operating routines and data structures for a pointing device. +map and mapLength are as described in the X Window +System protocol specification. +ControlProc and GetMotionEvents are DDX routines, see above. +
+ +numMotionEvents is for the motion-buffer-size for the GetMotionEvents +request. +A typical length for a motion buffer would be 100 events. +A server that does not implement this capability should set +numMotionEvents to zero. + + +
+ + void InitKeyboardDeviceStruct(device, pKeySyms, pModifiers, Bell, ControlProc) + DevicePtr device; + KeySymsPtr pKeySyms; + CARD8 *pModifiers; + BellProcPtr Bell; + KbdCtrlProcPtr ControlProc; + +
+You call this DIX routine when a keyboard device is initialized and +its device procedure is called with +DEVICE_INIT. +The formats of the keysyms and modifier maps are defined in +Xserver/include/input.h. +They describe the layout of keys on the keyboards, and the glyphs +associated with them. ( See the next section for information on +setting up the modifier map and the keysym map.) +ControlProc and Bell are DDX routines, see above. +
+
+
+ Keyboard Mapping and Keycodes + +When you send a keyboard event, you send a report that a given key has +either been pressed or has been released. There must be a keycode for +each key that identifies the key; the keycode-to-key mapping can be +any mapping you desire, because you specify the mapping in a table you +set up for DIX. However, you are restricted by the protocol +specification to keycode values in the range 8 to 255 inclusive. + + +The keycode mapping information that you set up consists of the following: + + +A minimum and maximum keycode number + +An array of sets of keysyms for each key, that is of length +maxkeycode - minkeycode + 1. +Each element of this array is a list of codes for symbols that are on that key. +There is no limit to the number of symbols that can be on a key. + +Once the map is set up, DIX keeps and +maintains the client's changes to it. + + +The X protocol defines standard names to indicate the symbol(s) +printed on each keycap. (See X11/keysym.h) + + +Legal modifier keys must generate both up and down transitions. When +a client tries to change a modifier key (for instance, to make "A" the +"Control" key), DIX calls the following routine, which should retuurn +TRUE if the key can be used as a modifier on the given device: +
+ + Bool LegalModifier(key, pDev) + unsigned int key; + DevicePtr pDev; +
+
+
+
+
+Screens + +Different computer graphics +displays have different capabilities. +Some are simple monochrome +frame buffers that are just lying +there in memory, waiting to be written into. +Others are color displays with many bits per pixel using some color lookup table. +Still others have high-speed graphic processors that prefer to do all of the work +themselves, +including maintaining their own high-level, graphic data structures. + +
+ Screen Hardware Requirements + +The only requirement on screens is that you be able to both read +and write locations in the frame buffer. +All screens must have a depth of 32 or less (unless you use +an X extension to allow a greater depth). +All screens must fit into one of the classes listed in the section +in this document on Visuals and Depths. + + +X uses the pixel as its fundamental unit of distance on the screen. +Therefore, most programs will measure everything in pixels. + +The sample server assumes square pixels. +Serious WYSIWYG (what you see is what you get) applications for +publishing and drawing programs will adjust for +different screen resolutions automatically. +Considerable work +is involved in compensating for non-square pixels (a bit in the DDX +code for the sample server but quite a bit in the client applications). +
+
+ Data Structures + +X supports multiple screens that are connected to the same +server. Therefore, all the per-screen information is bundled into one data +structure of attributes and procedures, which is the ScreenRec (see +Xserver/include/scrnintstr.h). +The procedure entry points in a ScreenRec operate on +regions, colormaps, cursors, and fonts, because these resources +can differ in format from one screen to another. + +Windows are areas on the screen that can be drawn into by graphic +routines. "Pixmaps" are off-screen graphic areas that can be drawn +into. They are both considered drawables and are described in the +section on Drawables. All graphic operations work on drawables, and +operations are available to copy patches from one drawable to another. + +The pixel image data in all drawables is in a format that is private +to DDX. In fact, each instance of a drawable is associated with a +given screen. Presumably, the pixel image data for pixmaps is chosen +to be conveniently understood by the hardware. All screens in a +single server must be able to handle all pixmaps depths declared in +the connection setup information. + +Pixmap images are transferred to the server in one of two ways: +XYPixmap or ZPimap. XYPixmaps are a series of bitmaps, one for each +bit plane of the image, using the bitmap padding rules from the +connection setup. ZPixmaps are a series of bits, nibbles, bytes or +words, one for each pixel, using the format rules (padding and so on) +for the appropriate depth. + +All screens in a given server must agree on a set of pixmap image +formats (PixmapFormat) to support (depth, number of bits per pixel, +etc.). + +There is no color interpretation of bits in the pixmap. Pixmaps +do not contain pixel values. The interpretation is made only when +the bits are transferred onto the screen. + +The screenInfo structure (in scrnintstr.h) is a global data structure +that has a pointer to an array of ScreenRecs, one for each screen on +the server. (These constitute the one and only description of each +screen in the server.) Each screen has an identifying index (0, 1, 2, ...). +In addition, the screenInfo struct contains global server-wide +details, such as the bit- and byte- order in all bit images, and the +list of pixmap image formats that are supported. The X protocol +insists that these must be the same for all screens on the server. +
+
+ Output Initialization + +
+ + InitOutput(pScreenInfo, argc, argv) + ScreenInfo *pScreenInfo; + int argc; + char **argv; +
+Upon initialization, your DDX routine InitOutput() is called by DIX. +It is passed a pointer to screenInfo to initialize. It is also passed +the argc and argv from main() for your server for the command-line +arguments. These arguments may indicate what or how many screen +device(s) to use or in what way to use them. For instance, your +server command line may allow a "-D" flag followed by the name of the +screen device to use.
+ +Your InitOutput() routine should initialize each screen you wish to +use by calling AddScreen(), and then it should initialize the pixmap +formats that you support by storing values directly into the +screenInfo data structure. You should also set certain +implementation-dependent numbers and procedures in your screenInfo, +which determines the pixmap and scanline padding rules for all screens +in the server. + +
+ + int AddScreen(scrInitProc, argc, argv) + Bool (*scrInitProc)(); + int argc; + char **argv; +
+You should call AddScreen(), a DIX procedure, in InitOutput() once for +each screen to add it to the screenInfo database. The first argument +is an initialization procedure for the screen that you supply. The +second and third are the argc and argv from main(). It returns the +screen number of the screen installed, or -1 if there is either +insufficient memory to add the screen, or (*scrInitProc) returned +FALSE.
+ +The scrInitProc should be of the following form: +
+ + Bool scrInitProc(iScreen, pScreen, argc, argv) + int iScreen; + ScreenPtr pScreen; + int argc; + char **argv; +
+iScreen is the index for this screen; 0 for the first one initialized, +1 for the second, etc. pScreen is the pointer to the screen's new +ScreenRec. argc and argv are as before. Your screen initialize +procedure should return TRUE upon success or FALSE if the screen +cannot be initialized (for instance, if the screen hardware does not +exist on this machine).
+ +This procedure must determine what actual device it is supposed to initialize. +If you have a different procedure for each screen, then it is no problem. +If you have the same procedure for multiple screens, it may have trouble +figuring out which screen to initialize each time around, especially if +InitOutput() does not initialize all of the screens. +It is probably easiest to have one procedure for each screen. + +The initialization procedure should fill in all the screen procedures +for that screen (windowing functions, region functions, etc.) and certain +screen attributes for that screen. +
+
+ Region Routines in the ScreenRec + +A region is a dynamically allocated data structure that describes an +irregularly shaped piece of real estate in XY pixel space. You can +think of it as a set of pixels on the screen to be operated upon with +set operations such as AND and OR. + +A region is frequently implemented as a list of rectangles or bitmaps +that enclose the selected pixels. Region operators control the +"clipping policy," or the operations that work on regions. (The +sample server uses YX-banded rectangles. Unless you have something +already implemented for your graphics system, you should keep that +implementation.) The procedure pointers to the region operators are +located in the ScreenRec data structure. The definition of a region +can be found in the file Xserver/include/regionstr.h. The region code +is found in Xserver/mi/miregion.c. DDX implementations using other +region formats will need to supply different versions of the region +operators. + +Since the list of rectangles is unbounded in size, part of the region +data structure is usually a large, dynamically allocated chunk of +memory. As your region operators calculate logical combinations of +regions, these blocks may need to be reallocated by your region +software. For instance, in the sample server, a RegionRec has some +header information and a pointer to a dynamically allocated rectangle +list. Periodically, the rectangle list needs to be expanded with +Xrealloc(), whereupon the new pointer is remembered in the RegionRec. + +Most of the region operations come in two forms: a function pointer in +the Screen structure, and a macro. The server can be compiled so that +the macros make direct calls to the appropriate functions (instead of +indirecting through a screen function pointer), or it can be compiled +so that the macros are identical to the function pointer forms. +Making direct calls is faster on many architectures. + +
+ + RegionPtr pScreen->RegionCreate( rect, size) + BoxPtr rect; + int size; + + macro: RegionPtr RegionCreate(rect, size) + +
+RegionCreate creates a region that describes ONE rectangle. The +caller can avoid unnecessary reallocation and copying by declaring the +probable maximum number of rectangles that this region will need to +describe itself. Your region routines, though, cannot fail just +because the region grows beyond this size. The caller of this routine +can pass almost anything as the size; the value is merely a good guess +as to the maximum size until it is proven wrong by subsequent use. +Your region procedures are then on their own in estimating how big the +region will get. Your implementation might ignore size, if +applicable.
+ +
+ + void pScreen->RegionInit (pRegion, rect, size) + RegionPtr pRegion; + BoxPtr rect; + int size; + + macro: RegionInit(pRegion, rect, size) + +
+Given an existing raw region structure (such as an local variable), this +routine fills in the appropriate fields to make this region as usable as +one returned from RegionCreate. This avoids the additional dynamic memory +allocation overhead for the region structure itself. +
+ +
+ + Bool pScreen->RegionCopy(dstrgn, srcrgn) + RegionPtr dstrgn, srcrgn; + + macro: Bool RegionCopy(dstrgn, srcrgn) + +
+RegionCopy copies the description of one region, srcrgn, to another +already-created region, +dstrgn; returning TRUE if the copy succeeded, and FALSE otherwise.
+ +
+ + void pScreen->RegionDestroy( pRegion) + RegionPtr pRegion; + + macro: RegionDestroy(pRegion) + +
+RegionDestroy destroys a region and frees all allocated memory.
+ +
+ + void pScreen->RegionUninit (pRegion) + RegionPtr pRegion; + + macro: RegionUninit(pRegion) + +
+Frees everything except the region structure itself, useful when the +region was originally passed to RegionInit instead of received from +RegionCreate. When this call returns, pRegion must not be reused until +it has been RegionInit'ed again.
+ +
+ + Bool pScreen->Intersect(newReg, reg1, reg2) + RegionPtr newReg, reg1, reg2; + + macro: Bool RegionIntersect(newReg, reg1, reg2) + + Bool pScreen->Union(newReg, reg1, reg2) + RegionPtr newReg, reg1, reg2; + + macro: Bool RegionUnion(newReg, reg1, reg2) + + Bool pScreen->Subtract(newReg, regMinuend, regSubtrahend) + RegionPtr newReg, regMinuend, regSubtrahend; + + macro: Bool RegionUnion(newReg, regMinuend, regSubtrahend) + + Bool pScreen->Inverse(newReg, pReg, pBox) + RegionPtr newReg, pReg; + BoxPtr pBox; + + macro: Bool RegionInverse(newReg, pReg, pBox) + +
+The above four calls all do basic logical operations on regions. They +set the new region (which already exists) to describe the logical +intersection, union, set difference, or inverse of the region(s) that +were passed in. Your routines must be able to handle a situation +where the newReg is the same region as one of the other region +arguments.
+ +The subtract function removes the Subtrahend from the Minuend and +puts the result in newReg. + +The inverse function returns a region that is the pBox minus the +region passed in. (A true "inverse" would make a region that extends +to infinity in all directions but has holes in the middle.) It is +undefined for situations where the region extends beyond the box. + +Each routine must return the value TRUE for success. + +
+ + void pScreen->RegionReset(pRegion, pBox) + RegionPtr pRegion; + BoxPtr pBox; + + macro: RegionReset(pRegion, pBox) + +
+RegionReset sets the region to describe +one rectangle and reallocates it to a size of one rectangle, if applicable.
+ +
+ + void pScreen->TranslateRegion(pRegion, x, y) + RegionPtr pRegion; + int x, y; + + macro: RegionTranslate(pRegion, x, y) + +
+TranslateRegion simply moves a region +x in the x direction and +y in the y +direction.
+ +
+ + int pScreen->RectIn(pRegion, pBox) + RegionPtr pRegion; + BoxPtr pBox; + + macro: int RegionContainsRect(pRegion, pBox) + +
+RectIn returns one of the defined constants rgnIN, rgnOUT, or rgnPART, +depending upon whether the box is entirely inside the region, entirely +outside of the region, or partly in and partly out of the region. +These constants are defined in Xserver/include/region.h.
+ +
+ + Bool pScreen->PointInRegion(pRegion, x, y, pBox) + RegionPtr pRegion; + int x, y; + BoxPtr pBox; + + macro: Bool RegionContainsPoint(pRegion, x, y, pBox) + +
+PointInRegion returns true if the point x, y is in the region. In +addition, it fills the rectangle pBox with coordinates of a rectangle +that is entirely inside of pRegion and encloses the point. In the mi +implementation, it is the largest such rectangle. (Due to the sample +server implementation, this comes cheaply.)
+ +This routine used by DIX when tracking the pointing device and +deciding whether to report mouse events or change the cursor. For +instance, DIX needs to change the cursor when it moves from one window +to another. Due to overlapping windows, the shape to check may be +irregular. A PointInRegion() call for every pointing device movement +may be too expensive. The pBox is a kind of wake-up box; DIX need not +call PointInRegion() again until the cursor wanders outside of the +returned box. + +
+ + Bool pScreen->RegionNotEmpty(pRegion) + RegionPtr pRegion; + + macro: Bool RegionNotEmpty(pRegion) + +
+RegionNotEmpty is a boolean function that returns +true or false depending upon whether the region encloses any pixels.
+ +
+ + void pScreen->RegionEmpty(pRegion) + RegionPtr pRegion; + + macro: RegionEmpty(pRegion) + +
+RegionEmpty sets the region to be empty.
+ +
+ + BoxPtr pScreen->RegionExtents(pRegion) + RegionPtr pRegion; + + macro: RegionExtents(pRegion) + +
+RegionExtents returns a rectangle that is the smallest +possible superset of the entire region. +The caller will not modify this rectangle, so it can be the one +in your region struct.
+ +
+ + Bool pScreen->RegionAppend (pDstRgn, pRegion) + RegionPtr pDstRgn; + RegionPtr pRegion; + + macro: Bool RegionAppend(pDstRgn, pRegion) + + Bool pScreen->RegionValidate (pRegion, pOverlap) + RegionPtr pRegion; + Bool *pOverlap; + + macro: Bool RegionValidate(pRegion, pOverlap) + +
+These functions provide an optimization for clip list generation and +must be used in conjunction. The combined effect is to produce the +union of a collection of regions, by using RegionAppend several times, +and finally calling RegionValidate which takes the intermediate +representation (which needn't be a valid region) and produces the +desired union. pOverlap is set to TRUE if any of the original +regions overlap; FALSE otherwise.
+ +
+ + RegionPtr pScreen->BitmapToRegion (pPixmap) + PixmapPtr pPixmap; + + macro: RegionPtr BitmapToRegion(pScreen, pPixmap) + +
+Given a depth-1 pixmap, this routine must create a valid region which +includes all the areas of the pixmap filled with 1's and excludes the +areas filled with 0's. This routine returns NULL if out of memory.
+ +
+ + RegionPtr pScreen->RectsToRegion (nrects, pRects, ordering) + int nrects; + xRectangle *pRects; + int ordering; + + macro: RegionPtr RegionFromRects(nrects, pRects, ordering) + +
+Given a client-supplied list of rectangles, produces a region which includes +the union of all the rectangles. Ordering may be used as a hint which +describes how the rectangles are sorted. As the hint is provided by a +client, it must not be required to be correct, but the results when it is +not correct are not defined (core dump is not an option here).
+ +
+ + void pScreen->SendGraphicsExpose(client,pRegion,drawable,major,minor) + ClientPtr client; + RegionPtr pRegion; + XID drawable; + int major; + int minor; + +
+SendGraphicsExpose dispatches a list of GraphicsExposure events which +span the region to the specified client. If the region is empty, or +a NULL pointer, a NoExpose event is sent instead.
+
+
+ Cursor Routines for a Screen + +A cursor is the visual form tied to the pointing device. The default +cursor is an "X" shape, but the cursor can have any shape. When a +client creates a window, it declares what shape the cursor will be +when it strays into that window on the screen. + +For each possible shape the cursor assumes, there is a CursorRec data +structure. This data structure contains a pointer to a CursorBits +data structure which contains a bitmap for the image of the cursor and +a bitmap for a mask behind the cursor, in addition, the CursorRec data +structure contains foreground and background colors for the cursor. +The CursorBits data structure is shared among multiple CursorRec +structures which use the same font and glyph to describe both source +and mask. The cursor image is applied to the screen by applying the +mask first, clearing 1 bits in its form to the background color, and +then overwriting on the source image, in the foreground color. (One +bits of the source image that fall on top of zero bits of the mask +image are undefined.) This way, a cursor can have transparent parts, +and opaque parts in two colors. X allows any cursor size, but some +hardware cursor schemes allow a maximum of N pixels by M pixels. +Therefore, you are allowed to transform the cursor to a smaller size, +but be sure to include the hot-spot. + +CursorBits in Xserver/include/cursorstr.h is a device-independent +structure containing a device-independent representation of the bits +for the source and mask. (This is possible because the bitmap +representation is the same for all screens.) + +When a cursor is created, it is "realized" for each screen. At +realization time, each screen has the chance to convert the bits into +some other representation that may be more convenient (for instance, +putting the cursor into off-screen memory) and set up its +device-private area in either the CursorRec data structure or +CursorBits data structure as appropriate to possibly point to whatever +data structures are needed. It is more memory-conservative to share +realizations by using the CursorBits private field, but this makes the +assumption that the realization is independent of the colors used +(which is typically true). For instance, the following are the device +private entries for a particular screen and cursor: +
+ + pCursor->devPriv[pScreen->myNum] + pCursor->bits->devPriv[pScreen->myNum] + +
+This is done because the change from one cursor shape to another must +be fast and responsive; the cursor image should be able to flutter as +fast as the user moves it across the screen.
+ +You must implement the following routines for your hardware: +
+ + Bool pScreen->RealizeCursor( pScr, pCurs) + ScreenPtr pScr; + CursorPtr pCurs; + + Bool pScreen->UnrealizeCursor( pScr, pCurs) + ScreenPtr pScr; + CursorPtr pCurs; + +
+
+ +RealizeCursor and UnrealizeCursor should realize (allocate and +calculate all data needed) and unrealize (free the dynamically +allocated data) a given cursor when DIX needs them. They are called +whenever a device-independent cursor is created or destroyed. The +source and mask bits pointed to by fields in pCurs are undefined for +bits beyond the right edge of the cursor. This is so because the bits +are in Bitmap format, which may have pad bits on the right edge. You +should inhibit UnrealizeCursor() if the cursor is currently in use; +this happens when the system is reset. + +
+ + Bool pScreen->DisplayCursor( pScr, pCurs) + ScreenPtr pScr; + CursorPtr pCurs; + +
+DisplayCursor should change the cursor on the given screen to the one +passed in. It is called by DIX when the user moves the pointing +device into a different window with a different cursor. The hotspot +in the cursor should be aligned with the current cursor position.
+ +
+ + void pScreen->RecolorCursor( pScr, pCurs, displayed) + ScreenPtr pScr; + CursorPtr pCurs; + Bool displayed; +
+RecolorCursor notifies DDX that the colors in pCurs have changed and +indicates whether this is the cursor currently being displayed. If it +is, the cursor hardware state may have to be updated. Whether +displayed or not, state created at RealizeCursor time may have to be +updated. A generic version, miRecolorCursor, may be used that +does an unrealize, a realize, and possibly a display (in micursor.c); +however this constrains UnrealizeCursor and RealizeCursor to always return +TRUE as no error indication is returned here.
+ +
+ + void pScreen->ConstrainCursor( pScr, pBox) + ScreenPtr pScr; + BoxPtr pBox; + +
+ConstrainCursor should cause the cursor to restrict its motion to the +rectangle pBox. DIX code is capable of enforcing this constraint by +forcefully moving the cursor if it strays out of the rectangle, but +ConstrainCursor offers a way to send a hint to the driver or hardware +if such support is available. This can prevent the cursor from +wandering out of the box, then jumping back, as DIX forces it back.
+ +
+ + void pScreen->PointerNonInterestBox( pScr, pBox) + ScreenPtr pScr; + BoxPtr pBox; + +
+PointerNonInterestBox is DIX's way of telling the pointing device code +not to report motion events while the cursor is inside a given +rectangle on the given screen. It is optional and, if not +implemented, it should do nothing. This routine is called only when +the client has declared that it is not interested in motion events in +a given window. The rectangle you get may be a subset of that window. +It saves DIX code the time required to discard uninteresting mouse +motion events. This is only a hint, which may speed performance. +Nothing in DIX currently calls PointerNonInterestBox.
+ +
+ + void pScreen->CursorLimits( pScr, pCurs, pHotBox, pTopLeftBox) + ScreenPtr pScr; + CursorPtr pCurs; + BoxPtr pHotBox; + BoxPtr pTopLeftBox; /* return value */ + +
+CursorLimits should calculate the box that the cursor hot spot is +physically capable of moving within, as a function of the screen pScr, +the device-independent cursor pCurs, and a box that DIX hypothetically +would want the hot spot confined within, pHotBox. This routine is for +informing DIX only; it alters no state within DDX.
+ +
+ + Bool pScreen->SetCursorPosition( pScr, newx, newy, generateEvent) + ScreenPtr pScr; + int newx; + int newy; + Bool generateEvent; + +
+SetCursorPosition should artificially move the cursor as though the +user had jerked the pointing device very quickly. This is called in +response to the WarpPointer request from the client, and at other +times. If generateEvent is True, the device should decide whether or +not to call ProcessInputEvents() and then it must call +DevicePtr->processInputProc. Its effects are, of course, limited in +value for absolute pointing devices such as a tablet.
+ +
+ + void NewCurrentScreen(newScreen, x, y) + ScreenPtr newScreen; + int x,y; + +
+If your ddx provides some mechanism for the user to magically move the +pointer between multiple screens, you need to inform DIX when this +occurs. You should call NewCurrentScreen to accomplish this, specifying +the new screen and the new x and y coordinates of the pointer on that screen.
+
+
+ Visuals, Depths and Pixmap Formats for Screens + +The "depth" of a image is the number of bits that are used per pixel to display it. + +The "bits per pixel" of a pixmap image that is sent over the client +byte stream is a number that is either 4, 8, 16, 24 or 32. It is the +number of bits used per pixel in Z format. For instance, a pixmap +image that has a depth of six is best sent in Z format as 8 bits per +pixel. + +A "pixmap image format" or a "pixmap format" is a description of the +format of a pixmap image as it is sent over the byte stream. For each +depth available on a server, there is one and only one pixmap format. +This pixmap image format gives the bits per pixel and the scanline +padding unit. (For instance, are pixel rows padded to bytes, 16-bit +words, or 32-bit words?) + +For each screen, you must decide upon what depth(s) it supports. You +should only count the number of bits used for the actual image. Some +displays store additional bits to indicate what window this pixel is +in, how close this object is to a viewer, transparency, and other +data; do not count these bits. + +A "display class" tells whether the display is monochrome or color, +whether there is a lookup table, and how the lookup table works. + +A "visual" is a combination of depth, display class, and a description +of how the pixel values result in a color on the screen. Each visual +has a set of masks and offsets that are used to separate a pixel value +into its red, green, and blue components and a count of the number of +colormap entries. Some of these fields are only meaningful when the +class dictates so. Each visual also has a screen ID telling which +screen it is usable on. Note that the depth does not imply the number +of map_entries; for instance, a display can have 8 bits per pixel but +only 254 colormap entries for use by applications (the other two being +reserved by hardware for the cursor). + +Each visual is identified by a 32-bit visual ID which the client uses +to choose what visual is desired on a given window. Clients can be +using more than one visual on the same screen at the same time. + +The class of a display describes how this translation takes place. +There are three ways to do the translation. + + +Pseudo - The pixel value, as a whole, is looked up +in a table of length map_entries to +determine the color to display. + +True - The +pixel value is broken up into red, green, and blue fields, each of which +are looked up in separate red, green, and blue lookup tables, +each of length map_entries. + +Gray - The pixel value is looked up in a table of length map_entries to +determine a gray level to display. + + + +In addition, the lookup table can be static (resulting colors are fixed for each +pixel value) +or dynamic (lookup entries are under control of the client program). +This leads to a total of six classes: + + +Static Gray - The pixel value (of however many bits) determines directly the +level of gray +that the pixel assumes. + +Gray Scale - The pixel value is fed through a lookup table to arrive at the level +of gray to display +for the given pixel. + +Static Color - The pixel value is fed through a fixed lookup table that yields the +color to display +for that pixel. + +PseudoColor - The whole pixel value is fed through a programmable lookup +table that has one +color (including red, green, and blue intensities) for each possible pixel value, +and that color is displayed. + +True Color - Each pixel value consists of one or more bits +that directly determine each primary color intensity after being fed through +a fixed table. + +Direct Color - Each pixel value consists of one or more bits for each primary color. +Each primary color value is individually looked up in a table for that primary +color, yielding +an intensity for that primary color. +For each pixel, the red value is looked up in the +red table, the green value in the green table, and +the blue value in the blue table. + + + +Here are some examples: + + +A simple monochrome 1 bit per pixel display is Static Gray. + +A display that has 2 bits per pixel for a choice +between the colors of black, white, green and violet is Static Color. + +A display that has three bits per pixel, where +each bit turns on or off one of the red, green or +blue guns, is in the True Color class. + +If you take the last example and scramble the +correspondence between pixel values and colors +it becomes a Static Color display. + + +A display has 8 bits per pixel. The 8 bits select one entry out of 256 entries +in a lookup table, each entry consisting of 24 bits (8bits each for red, green, +and blue). +The display can show any 256 of 16 million colors on the screen at once. +This is a pseudocolor display. +The client application gets to fill the lookup table in this class of display. + +Imagine the same hardware from the last example. +Your server software allows the user, on the +command line that starts up the server +program, +to fill the lookup table to his liking once and for all. +From then on, the server software would not change the lookup table +until it exits. +For instance, the default might be a lookup table with a reasonable sample of +colors from throughout the color space. +But the user could specify that the table be filled with 256 steps of gray scale +because he knew ahead of time he would be manipulating a lot of black-and-white +scanned photographs +and not very many color things. +Clients would be presented with this unchangeable lookup table. +Although the hardware qualifies as a PseudoColor display, +the facade presented to the X client is that this is a Static Color display. + +You have to decide what kind of display you have or want +to pretend you have. +When you initialize the screen(s), this class value must be set in the +VisualRec data structure along with other display characteristics like the +depth and other numbers. + +The allowable DepthRec's and VisualRec's are pointed to by fields in the ScreenRec. +These are set up when InitOutput() is called; you should Xalloc() appropriate blocks +or use static variables initialized to the correct values. +
+
+Colormaps for Screens + +A colormap is a device-independent +mapping between pixel values and colors displayed on the screen. + +Different windows on the same screen can have different +colormaps at the same time. +At any given time, the most recently installed +colormap(s) will be in use in the server +so that its (their) windows' colors will be guaranteed to be correct. +Other windows may be off-color. +Although this may seem to be chaotic, in practice most clients +use the default colormap for the screen. + +The default colormap for a screen is initialized when the screen is initialized. +It always remains in existence and is not owned by any regular client. It +is owned by client 0 (the server itself). +Many clients will simply use this default colormap for their drawing. +Depending upon the class of the screen, the entries in this colormap may +be modifiable by client applications. +
+
+ Colormap Routines + +You need to implement the following routines to handle the device-dependent +aspects of color maps. You will end up placing pointers to these procedures +in your ScreenRec data structure(s). The sample server implementations of +many of these routines are in fbcmap.c. + +
+ + Bool pScreen->CreateColormap(pColormap) + ColormapPtr pColormap; + +
+This routine is called by the DIX CreateColormap routine after it has allocated +all the data for the new colormap and just before it returns to the dispatcher. +It is the DDX layer's chance to initialize the colormap, particularly if it is +a static map. See the following +section for more details on initializing colormaps. +The routine returns FALSE if creation failed, such as due to memory +limitations. +Notice that the colormap has a devPriv field from which you can hang any +colormap specific storage you need. Since each colormap might need special +information, we attached the field to the colormap and not the visual.
+ +
+ + void pScreen->DestroyColormap(pColormap) + ColormapPtr pColormap; + +
+This routine is called by the DIX FreeColormap routine after it has uninstalled +the colormap and notified all interested parties, and before it has freed +any of the colormap storage. +It is the DDX layer's chance to free any data it added to the colormap.
+ +
+ + void pScreen->InstallColormap(pColormap) + ColormapPtr pColormap; + +
+InstallColormap should +fill a lookup table on the screen with which the colormap is associated with +the colors in pColormap. +If there is only one hardware lookup table for the screen, then all colors on +the screen may change simultaneously.
+ +In the more general case of multiple hardware lookup tables, +this may cause some other colormap to be +uninstalled, meaning that windows that subscribed to the colormap +that was uninstalled may end up being off-color. +See the note, below, about uninstalling maps. + +
+ + void pScreen->UninstallColormap(pColormap) + ColormapPtr pColormap; + +
+UninstallColormap should +remove pColormap from screen pColormap->pScreen. +Some other map, such as the default map if possible, +should be installed in place of pColormap if applicable. +If +pColormap is the default map, do nothing. +If any client has requested ColormapNotify events, the DDX layer must notify the client. +(The routine WalkTree() is +be used to find such windows. The DIX routines TellNoMap(), +TellNewMap() and TellGainedMap() are provided to be used as +the procedure parameter to WalkTree. These procedures are in +Xserver/dix/colormap.c.)
+ +
+ + int pScreen->ListInstalledColormaps(pScreen, pCmapList) + ScreenPtr pScreen; + XID *pCmapList; + + +
+ListInstalledColormaps fills the pCMapList in with the resource ids +of the installed maps and returns a count of installed maps. +pCmapList will point to an array of size MaxInstalledMaps that was allocated +by the caller.
+ +
+ + void pScreen->StoreColors (pmap, ndef, pdefs) + ColormapPtr pmap; + int ndef; + xColorItem *pdefs; + +
+StoreColors changes some of the entries in the colormap pmap. +The number of entries to change are ndef, and pdefs points to the information +describing what to change. +Note that partial changes of entries in the colormap are allowed. +Only the colors +indicated in the flags field of each xColorItem need to be changed. +However, all three color fields will be sent with the proper value for the +benefit of screens that may not be able to set part of a colormap value. +If the screen is a static class, this routine does nothing. +The structure of colormap entries is nontrivial; see colormapst.h +and the definition of xColorItem in Xproto.h for +more details.
+ +
+ + void pScreen->ResolveColor(pRed, pGreen, pBlue, pVisual) + unsigned short *pRed, *pGreen, *pBlue; + VisualPtr pVisual; + + +
+Given a requested color, ResolveColor returns the nearest color that this hardware is +capable of displaying on this visual. +In other words, this rounds off each value, in place, to the number of bits +per primary color that your screen can use. +Remember that each screen has one of these routines. +The level of roundoff should be what you would expect from the value +you put in the bits_per_rgb field of the pVisual.
+ +Each value is an unsigned value ranging from 0 to 65535. +The bits least likely to be used are the lowest ones. + +For example, if you had a pseudocolor display +with any number of bits per pixel +that had a lookup table supplying 6 bits for each color gun +(a total of 256K different colors), you would +round off each value to 6 bits. Please don't simply truncate these values +to the upper 6 bits, scale the result so that the maximum value seen +by the client will be 65535 for each primary. This makes color values +more portable between different depth displays (a 6-bit truncated white +will not look white on an 8-bit display). +
+Initializing a Colormap + +When a client requests a new colormap and when the server creates the default +colormap, the procedure CreateColormap in the DIX layer is invoked. +That procedure allocates memory for the colormap and related storage such as +the lists of which client owns which pixels. +It then sets a bit, BeingCreated, in the flags field of the ColormapRec +and calls the DDX layer's CreateColormap routine. +This is your chance to initialize the colormap. +If the colormap is static, which you can tell by looking at the class field, +you will want to fill in each color cell to match the hardwares notion of the +color for that pixel. +If the colormap is the default for the screen, which you can tell by looking +at the IsDefault bit in the flags field, you should allocate BlackPixel +and WhitePixel to match the values you set in the pScreen structure. +(Of course, you picked those values to begin with.) + +You can also wait and use AllocColor() to allocate blackPixel +and whitePixel after the default colormap has been created. +If the default colormap is static and you initialized it in +pScreen->CreateColormap, then use can use AllocColor afterwards +to choose pixel values with the closest rgb values to those +desired for blackPixel and whitePixel. +If the default colormap is dynamic and uninitialized, then +the rgb values you request will be obeyed, and AllocColor will +again choose pixel values for you. +These pixel values can then be stored into the screen. + +There are two ways to fill in the colormap. +The simplest way is to use the DIX function AllocColor. +
+ +int AllocColor (pmap, pred, pgreen, pblue, pPix, client) + ColormapPtr pmap; + unsigned short *pred, *pgreen, *pblue; + Pixel *pPix; + int client; + +
+This takes three pointers to 16 bit color values and a pointer to a suggested +pixel value. The pixel value is either an index into one colormap or a +combination of three indices depending on the type of pmap. +If your colormap starts out empty, and you don't deliberately pick the same +value twice, you will always get your suggested pixel. +The truly nervous could check that the value returned in *pPix is the one +AllocColor was called with. +If you don't care which pixel is used, or would like them sequentially +allocated from entry 0, set *pPix to 0. This will find the first free +pixel and use that.
+ +AllocColor will take care of all the bookkeeping and will +call StoreColors to get the colormap rgb values initialized. +The hardware colormap will be changed whenever this colormap +is installed. + +If for some reason AllocColor doesn't do what you want, you can do your +own bookkeeping and call StoreColors yourself. This is much more difficult +and shouldn't be necessary for most devices. +
+
+
+ Fonts for Screens + +A font is a set of bitmaps that depict the symbols in a character set. +Each font is for only one typeface in a given size, in other words, +just one bitmap for each character. Parallel fonts may be available +in a variety of sizes and variations, including "bold" and "italic." +X supports fonts for 8-bit and 16-bit character codes (for oriental +languages that have more than 256 characters in the font). Glyphs are +bitmaps for individual characters. + +The source comes with some useful font files in an ASCII, plain-text +format that should be comprehensible on a wide variety of operating +systems. The text format, referred to as BDF, is a slight extension +of the current Adobe 2.1 Bitmap Distribution Format (Adobe Systems, +Inc.). + +A short paper in PostScript format is included with the sample server +that defines BDF. It includes helpful pictures, which is why it is +done in PostScript and is not included in this document. + +Your implementation should include some sort of font compiler to read +these files and generate binary files that are directly usable by your +server implementation. The sample server comes with the source for a +font compiler. + +It is important the font properties contained in the BDF files are +preserved across any font compilation. In particular, copyright +information cannot be casually tossed aside without legal +ramifications. Other properties will be important to some +sophisticated applications. + +All clients get font information from the server. Therefore, your +server can support any fonts it wants to. It should probably support +at least the fonts supplied with the X11 tape. In principle, you can +convert fonts from other sources or dream up your own fonts for use on +your server. +
+Portable Compiled Format + +A font compiler is supplied with the sample server. It has +compile-time switches to convert the BDF files into a portable binary +form, called Portable Compiled Format or PCF. This allows for an +arbitrary data format inside the file, and by describing the details +of the format in the header of the file, any PCF file can be read by +any PCF reading client. By selecting the format which matches the +required internal format for your renderer, the PCF reader can avoid +reformatting the data each time it is read in. The font compiler +should be quite portable. + +The fonts included with the tape are stored in fonts/bdf. The +font compiler is found in fonts/tools/bdftopcf. +
+
+ Font Realization + +Each screen configured into the server +has an opportunity at font-load time +to "realize" a font into some internal format if necessary. +This happens every time the font is loaded into memory. + +A font (FontRec in Xserver/include/dixfontstr.h) is +a device-independent structure containing a device-independent +representation of the font. When a font is created, it is "realized" +for each screen. At this point, the screen has the chance to convert +the font into some other format. The DDX layer can also put information +in the devPrivate storage. + +
+ + Bool pScreen->RealizeFont(pScr, pFont) + ScreenPtr pScr; + FontPtr pFont; + + Bool pScreen->UnrealizeFont(pScr, pFont) + ScreenPtr pScr; + FontPtr pFont; + +
+RealizeFont and UnrealizeFont should calculate and allocate these extra data structures and +dispose of them when no longer needed. +These are called in response to OpenFont and CloseFont requests from +the client. +The sample server implementation is in fbscreen.c (which does very little).
+
+
+
+ Other Screen Routines + +You must supply several other screen-specific routines for +your X server implementation. +Some of these are described in other sections: + + +GetImage() is described in the Drawing Primitives section. + +GetSpans() is described in the Pixblit routine section. + +Several window and pixmap manipulation procedures are +described in the Window section under Drawables. + +The CreateGC() routine is described under Graphics Contexts. + + + +
+ + void pScreen->QueryBestSize(kind, pWidth, pHeight) + int kind; + unsigned short *pWidth, *pHeight; + ScreenPtr pScreen; + +
+QueryBestSize() returns the best sizes for cursors, tiles, and stipples +in response to client requests. +kind is one of the defined constants CursorShape, TileShape, or StippleShape +(defined in X.h). +For CursorShape, return the maximum width and +height for cursors that you can handle. +For TileShape and StippleShape, start with the suggested values in pWidth +and pHeight and modify them in place to be optimal values that are +greater than or equal to the suggested values. +The sample server implementation is in Xserver/fb/fbscreen.c.
+ +
+ + pScreen->SourceValidate(pDrawable, x, y, width, height) + DrawablePtr pDrawable; + int x, y, width, height; + +
+SourceValidate should be called by CopyArea/CopyPlane primitives when +the source drawable is not the same as the destination, and the +SourceValidate function pointer in the screen is non-null. If you know that +you will never need SourceValidate, you can avoid this check. Currently, +SourceValidate is used by the mi software cursor code to remove the cursor +from the screen when the source rectangle overlaps the cursor position. +x,y,width,height describe the source rectangle (source relative, that is) +for the copy operation.
+ +
+ + Bool pScreen->SaveScreen(pScreen, on) + ScreenPtr pScreen; + int on; + +
+SaveScreen() is used for Screen Saver support (see WaitForSomething()). +pScreen is the screen to save.
+ +
+ + Bool pScreen->CloseScreen(pScreen) + ScreenPtr pScreen; + +
+When the server is reset, it calls this routine for each screen.
+ +
+ + Bool pScreen->CreateScreenResources(pScreen) + ScreenPtr pScreen; + +
+If this routine is not NULL, it will be called once per screen per +server initialization/reset after all modules have had a chance to +request private space on all structures that support them (see + below). You may create resources +in this function instead of in the +screen init function passed to AddScreen in order to guarantee that +all pre-allocated space requests have been registered first. With the +new devPrivates mechanism, this is not strictly necessary, however. +This routine returns TRUE if successful.
+
+
+
+Drawables + +A drawable is a descriptor of a surface that graphics are drawn into, either +a window on the screen or a pixmap in memory. + +Each drawable has a type, class, +ScreenPtr for the screen it is associated with, depth, position, size, +and serial number. +The type is one of the defined constants DRAWABLE_PIXMAP, +DRAWABLE_WINDOW and UNDRAWABLE_WINDOW. +(An undrawable window is used for window class InputOnly.) +The serial number is guaranteed to be unique across drawables, and +is used in determining +the validity of the clipping information in a GC. +The screen selects the set of procedures used to manipulate and draw into the +drawable. Position is used (currently) only by windows; pixmaps must +set these fields to 0,0 as this reduces the amount of conditional code +executed throughout the mi code. Size indicates the actual client-specified +size of the drawable. +There are, in fact, no other fields that a window drawable and pixmap +drawable have in common besides those mentioned here. + +Both PixmapRecs and WindowRecs are structs that start with a drawable +and continue on with more fields. Pixmaps have a single pointer field +named devPrivate which usually points to the pixmap data but could conceivably be +used for anything that DDX wants. Both windows and pixmaps also have a +devPrivates field which can be used for DDX specific data (see +below). This is done because different graphics hardware has +different requirements for management; if the graphics is always +handled by a processor with an independent address space, there is no +point having a pointer to the bit image itself. + +The definition of a drawable and a pixmap can be found in the file +Xserver/include/pixmapstr.h. +The definition of a window can be found in the file Xserver/include/windowstr.h. +
+ Pixmaps + +A pixmap is a three-dimensional array of bits stored somewhere offscreen, +rather than in the visible portion of the screen's display frame buffer. It +can be used as a source or destination in graphics operations. There is no +implied interpretation of the pixel values in a pixmap, because it has no +associated visual or colormap. There is only a depth that indicates the +number of significant bits per pixel. Also, there is no implied physical +size for each pixel; all graphic units are in numbers of pixels. Therefore, +a pixmap alone does not constitute a complete image; it represents only a +rectangular array of pixel values. + +Note that the pixmap data structure is reference-counted. + +The server implementation is free to put the pixmap data +anywhere it sees fit, according to its graphics hardware setup. Many +implementations will simply have the data dynamically allocated in the +server's address space. More sophisticated implementations may put the +data in undisplayed framebuffer storage. + +In addition to dynamic devPrivates (see +below), the pixmap data structure has two fields that are private to +the device. Although you can use them for anything you want, they +have intended purposes. devKind is intended to be a device specific +indication of the pixmap location (host memory, off-screen, etc.). In +the sample server, since all pixmaps are in memory, devKind stores the +width of the pixmap in bitmap scanline units. devPrivate is usually +a pointer to the bits in the pixmap. + +A bitmap is a pixmap that is one bit deep. + +
+ + PixmapPtr pScreen->CreatePixmap(pScreen, width, height, depth) + ScreenPtr pScreen; + int width, height, depth; + +
+This ScreenRec procedure must create a pixmap of the size +requested. +It must allocate a PixmapRec and fill in all of the fields. +The reference count field must be set to 1. +If width or height are zero, no space should be allocated +for the pixmap data, and if the implementation is using the +devPrivate field as a pointer to the pixmap data, it should be +set to NULL. +If successful, it returns a pointer to the new pixmap; if not, it returns NULL. +See Xserver/fb/fbpixmap.c for the sample server implementation.
+ +
+ + Bool pScreen->DestroyPixmap(pPixmap) + PixmapPtr pPixmap; + +
+This ScreenRec procedure must "destroy" a pixmap. +It should decrement the reference count and, if zero, it +must deallocate the PixmapRec and all attached devPrivate blocks. +If successful, it returns TRUE. +See Xserver/fb/fbpixmap.c for the sample server implementation.
+ +
+ + Bool + pScreen->ModifyPixmapHeader(pPixmap, width, height, depth, bitsPerPixel, devKind, pPixData) + PixmapPtr pPixmap; + int width; + int height; + int depth; + int bitsPerPixel; + int devKind; + pointer pPixData; + +
+This routine takes a pixmap header and initializes the fields of the PixmapRec to the +parameters of the same name. pPixmap must have been created via +pScreen->CreatePixmap with a zero width or height to avoid +allocating space for the pixmap data. pPixData is assumed to be the +pixmap data; it will be stored in an implementation-dependent place +(usually pPixmap->devPrivate.ptr). This routine returns +TRUE if successful. See Xserver/mi/miscrinit.c for the sample +server implementation.
+ +
+ + PixmapPtr + GetScratchPixmapHeader(pScreen, width, height, depth, bitsPerPixel, devKind, pPixData) + ScreenPtr pScreen; + int width; + int height; + int depth; + int bitsPerPixel; + int devKind; + pointer pPixData; + + void FreeScratchPixmapHeader(pPixmap) + PixmapPtr pPixmap; + +
+DDX should use these two DIX routines when it has a buffer of raw +image data that it wants to manipulate as a pixmap temporarily, +usually so that some other part of the server can be leveraged to +perform some operation on the data. The data should be passed in +pPixData, and will be stored in an implementation-dependent place +(usually pPixmap->devPrivate.ptr). The other +fields go into the corresponding PixmapRec fields. +If successful, GetScratchPixmapHeader returns a valid PixmapPtr which can +be used anywhere the server expects a pixmap, else +it returns NULL. The pixmap should be released when no longer needed +(usually within the same function that allocated it) +with FreeScratchPixmapHeader.
+
+
+ Windows + +A window is a visible, or potentially visible, rectangle on the screen. +DIX windowing functions maintain an internal n-ary tree data structure, which +represents the current relationships of the mapped windows. +Windows that are contained in another window are children of that window and +are clipped to the boundaries of the parent. +The root window in the tree is the window for the entire screen. +Sibling windows constitute a doubly-linked list; the parent window has a pointer +to the head and tail of this list. +Each child also has a pointer to its parent. + +The border of a window is drawn by a DDX procedure when DIX requests that it +be drawn. The contents of the window is drawn by the client through +requests to the server. + +Window painting is orchestrated through an expose event system. +When a region is exposed, +DIX generates an expose event, telling the client to repaint the window and +passing the region that is the minimal area needed to be repainted. + +As a favor to clients, the server may retain +the output to the hidden parts of windows +in off-screen memory; this is called "backing store". +When a part of such a window becomes exposed, it +can quickly move pixels into place instead of +triggering an expose event and waiting for a client on the other +end of the network to respond. +Even if the network response is insignificant, the time to +intelligently paint a section of a window is usually more than +the time to just copy already-painted sections. +At best, the repainting involves blanking out the area to a background color, +which will take about the +same amount of time. +In this way, backing store can dramatically increase the +performance of window moves. + +On the other hand, backing store can be quite complex, because +all graphics drawn to hidden areas must be intercepted and redirected +to the off-screen window sections. +Not only can this be complicated for the server programmer, +but it can also impact window painting performance. +The backing store implementation can choose, at any time, to +forget pieces of backing that are written into, relying instead upon +expose events to repaint for simplicity. + +In X, the decision to use the backing-store scheme is made +by you, the server implementor. The sample server implements +backing store "for free" by reusing the infrastructure for the Composite +extension. As a side effect, it treats the WhenMapped and Always hints +as equivalent. However, it will never forget pixel contents when the +window is mapped. + +When a window operation is requested by the client, +such as a window being created or moved, +a new state is computed. +During this transition, DIX informs DDX what rectangles in what windows are about to +become obscured and what rectangles in what windows have become exposed. +This provides a hook for the implementation of backing store. +If DDX is unable to restore exposed regions, DIX generates expose +events to the client. +It is then the client's responsibility to paint the +window parts that were exposed but not restored. + +If a window is resized, pixels sometimes need to be +moved, depending upon +the application. +The client can request "Gravity" so that +certain blocks of the window are +moved as a result of a resize. +For instance, if the window has controls or other items +that always hang on the edge of the +window, and that edge is moved as a result of the resize, +then those pixels should be moved +to avoid having the client repaint it. +If the client needs to repaint it anyway, such an operation takes +time, so it is desirable +for the server to approximate the appearance of the window as best +it can while waiting for the client +to do it perfectly. +Gravity is used for that, also. + +The window has several fields used in drawing +operations: + + +clipList - This region, in conjunction with +the client clip region in the gc, is used to clip output. +clipList has the window's children subtracted from it, in addition to pieces of sibling windows +that overlap this window. To get the list with the +children included (subwindow-mode is IncludeInferiors), +the routine NotClippedByChildren(pWin) returns the unclipped region. + +borderClip is the region used by CopyWindow and +includes the area of the window, its children, and the border, but with the +overlapping areas of sibling children removed. + +Most of the other fields are for DIX use only. +
+Window Procedures in the ScreenRec + +You should implement +all of the following procedures and store pointers to them in the screen record. + +The device-independent portion of the server "owns" the window tree. +However, clever hardware might want to know the relationship of +mapped windows. There are pointers to procedures +in the ScreenRec data structure that are called to give the hardware +a chance to update its internal state. These are helpers and +hints to DDX only; +they do not change the window tree, which is only changed by DIX. + +
+ + Bool pScreen->CreateWindow(pWin) + WindowPtr pWin; + +
+This routine is a hook for when DIX creates a window. +It should fill in the "Window Procedures in the WindowRec" below +and also allocate the devPrivate block for it.
+ +See Xserver/fb/fbwindow.c for the sample server implementation. + +
+ + Bool pScreen->DestroyWindow(pWin); + WindowPtr pWin; + +
+This routine is a hook for when DIX destroys a window. +It should deallocate the devPrivate block for it and any other blocks that need +to be freed, besides doing other cleanup actions.
+ +See Xserver/fb/fbwindow.c for the sample server implementation. + +
+ + Bool pScreen->PositionWindow(pWin, x, y); + WindowPtr pWin; + int x, y; + +
+This routine is a hook for when DIX moves or resizes a window. +It should do whatever private operations need to be done when a window is moved or resized. +For instance, if DDX keeps a pixmap tile used for drawing the background +or border, and it keeps the tile rotated such that it is longword +aligned to longword locations in the frame buffer, then you should rotate your tiles here. +The actual graphics involved in moving the pixels on the screen and drawing the +border are handled by CopyWindow(), below.
+ +See Xserver/fb/fbwindow.c for the sample server implementation. + +
+ + Bool pScreen->RealizeWindow(pWin); + WindowPtr pWin; + + Bool pScreen->UnrealizeWindow(pWin); + WindowPtr pWin; + +
+These routines are hooks for when DIX maps (makes visible) and unmaps +(makes invisible) a window. It should do whatever private operations +need to be done when these happen, such as allocating or deallocating +structures that are only needed for visible windows. RealizeWindow +does NOT draw the window border, background or contents; +UnrealizeWindow does NOT erase the window or generate exposure events +for underlying windows; this is taken care of by DIX. DIX does, +however, call PaintWindowBackground() and PaintWindowBorder() to +perform some of these.
+ +
+ + Bool pScreen->ChangeWindowAttributes(pWin, vmask) + WindowPtr pWin; + unsigned long vmask; + +
+ChangeWindowAttributes is called whenever DIX changes window +attributes, such as the size, front-to-back ordering, title, or +anything of lesser severity that affects the window itself. The +sample server implements this routine. It computes accelerators for +quickly putting up background and border tiles. (See description of +the set of routines stored in the WindowRec.)
+ +
+ + int pScreen->ValidateTree(pParent, pChild, kind) + WindowPtr pParent, pChild; + VTKind kind; + +
+ValidateTree calculates the clipping region for the parent window and +all of its children. This routine must be provided. The sample server +has a machine-independent version in Xserver/mi/mivaltree.c. This is +a very difficult routine to replace.
+ +
+ + void pScreen->PostValidateTree(pParent, pChild, kind) + WindowPtr pParent, pChild; + VTKind kind; + +
+If this routine is not NULL, DIX calls it shortly after calling +ValidateTree, passing it the same arguments. This is useful for +managing multi-layered framebuffers. +The sample server sets this to NULL.
+ +
+ + void pScreen->WindowExposures(pWin, pRegion, pBSRegion) + WindowPtr pWin; + RegionPtr pRegion; + RegionPtr pBSRegion; + +
+The WindowExposures() routine +paints the border and generates exposure events for the window. +pRegion is an unoccluded region of the window, and pBSRegion is an +occluded region that has backing store. +Since exposure events include a rectangle describing what was exposed, +this routine may have to send back a series of exposure events, one for +each rectangle of the region. +The count field in the expose event is a hint to the +client as to the number of +regions that are after this one. +This routine must be provided. The sample +server has a machine-independent version in Xserver/mi/miexpose.c.
+ +
+ + void pScreen->ClipNotify (pWin, dx, dy) + WindowPtr pWin; + int dx, dy; + +
+Whenever the cliplist for a window is changed, this function is called to +perform whatever hardware manipulations might be necessary. When called, +the clip list and border clip regions in the window are set to the new +values. dx,dy are the distance that the window has been moved (if at all).
+
+
+ Window Painting Procedures + +In addition to the procedures listed above, there are two routines which +manipulate the actual window image directly. +In the sample server, mi implementations will work for +most purposes and fb routines speed up situations, such +as solid backgrounds/borders or tiles that are 8, 16 or 32 pixels square. + +
+ + void pScreen->ClearToBackground(pWin, x, y, w, h, generateExposures); + WindowPtr pWin; + int x, y, w, h; + Bool generateExposures; + +
+This routine is called on a window in response to a ClearToBackground request +from the client. +This request has two different but related functions, depending upon generateExposures.
+ +If generateExposures is true, the client is declaring that the given rectangle +on the window is incorrectly painted and needs to be repainted. +The sample server implementation calculates the exposure region +and hands it to the DIX procedure HandleExposures(), which +calls the WindowExposures() routine, below, for the window +and all of its child windows. + +If generateExposures is false, the client is trying to simply erase part +of the window to the background fill style. +ClearToBackground should write the background color or tile to the +rectangle in question (probably using PaintWindowBackground). +If w or h is zero, it clears all the way to the right or lower edge of the window. + +The sample server implementation is in Xserver/mi/miwindow.c. + +
+ + void pScreen->CopyWindow(pWin, oldpt, oldRegion); + WindowPtr pWin; + DDXPointRec oldpt; + RegionPtr oldRegion; + +
+CopyWindow is called when a window is moved, and graphically moves to +pixels of a window on the screen. It should not change any other +state within DDX (see PositionWindow(), above).
+ +oldpt is the old location of the upper-left corner. oldRegion is the +old region it is coming from. The new location and new region is +stored in the WindowRec. oldRegion might modified in place by this +routine (the sample implementation does this). + +CopyArea could be used, except that this operation has more +complications. First of all, you do not want to copy a rectangle onto +a rectangle. The original window may be obscured by other windows, +and the new window location may be similarly obscured. Second, some +hardware supports multiple windows with multiple depths, and your +routine needs to take care of that. + +The pixels in oldRegion (with reference point oldpt) are copied to the +window's new region (pWin->borderClip). pWin->borderClip is gotten +directly from the window, rather than passing it as a parameter. + +The sample server implementation is in Xserver/fb/fbwindow.c. +
+
+Screen Operations for Multi-Layered Framebuffers + +The following screen functions are useful if you have a framebuffer with +multiple sets of independent bit planes, e.g. overlays or underlays in +addition to the "main" planes. If you have a simple single-layer +framebuffer, you should probably use the mi versions of these routines +in mi/miwindow.c. This can be easily accomplished by calling miScreenInit. + +
+ + void pScreen->MarkWindow(pWin) + WindowPtr pWin; + +
+This formerly dix function MarkWindow has moved to ddx and is accessed +via this screen function. This function should store something, +usually a pointer to a device-dependent structure, in pWin->valdata so +that ValidateTree has the information it needs to validate the window.
+ +
+ + Bool pScreen->MarkOverlappedWindows(parent, firstChild, ppLayerWin) + WindowPtr parent; + WindowPtr firstChild; + WindowPtr * ppLayerWin; + +
+This formerly dix function MarkWindow has moved to ddx and is accessed +via this screen function. In the process, it has grown another +parameter: ppLayerWin, which is filled in with a pointer to the window +at which save under marking and ValidateTree should begin. In the +single-layered framebuffer case, pLayerWin == pWin.
+ +
+ + Bool pScreen->ChangeSaveUnder(pLayerWin, firstChild) + WindowPtr pLayerWin; + WindowPtr firstChild; + +
+The dix functions ChangeSaveUnder and CheckSaveUnder have moved to ddx and +are accessed via this screen function. pLayerWin should be the window +returned in the ppLayerWin parameter of MarkOverlappedWindows. The function +may turn on backing store for windows that might be covered, and may partially +turn off backing store for windows. It returns TRUE if PostChangeSaveUnder +needs to be called to finish turning off backing store.
+ +
+ + void pScreen->PostChangeSaveUnder(pLayerWin, firstChild) + WindowPtr pLayerWin; + WindowPtr firstChild; + +
+The dix function DoChangeSaveUnder has moved to ddx and is accessed via +this screen function. This function completes the job of turning off +backing store that was started by ChangeSaveUnder.
+ +
+ + void pScreen->MoveWindow(pWin, x, y, pSib, kind) + WindowPtr pWin; + int x; + int y; + WindowPtr pSib; + VTKind kind; + +
+The formerly dix function MoveWindow has moved to ddx and is accessed via +this screen function. The new position of the window is given by +x,y. kind is VTMove if the window is only moving, or VTOther if +the border is also changing.
+ +
+ + void pScreen->ResizeWindow(pWin, x, y, w, h, pSib) + WindowPtr pWin; + int x; + int y; + unsigned int w; + unsigned int h; + WindowPtr pSib; + +
+The formerly dix function SlideAndSizeWindow has moved to ddx and is accessed via +this screen function. The new position is given by x,y. The new size +is given by w,h.
+ +
+ + WindowPtr pScreen->GetLayerWindow(pWin) + WindowPtr pWin + +
+This is a new function which returns a child of the layer parent of pWin.
+ +
+ + void pScreen->HandleExposures(pWin) + WindowPtr pWin; + +
+The formerly dix function HandleExposures has moved to ddx and is accessed via +this screen function. This function is called after ValidateTree and +uses the information contained in valdata to send exposures to windows.
+ +
+ + void pScreen->ReparentWindow(pWin, pPriorParent) + WindowPtr pWin; + WindowPtr pPriorParent; + +
+This function will be called when a window is reparented. At the time of +the call, pWin will already be spliced into its new position in the +window tree, and pPriorParent is its previous parent. This function +can be NULL.
+ +
+ + void pScreen->SetShape(pWin) + WindowPtr pWin; + +
+The formerly dix function SetShape has moved to ddx and is accessed via +this screen function. The window's new shape will have already been +stored in the window when this function is called.
+ +
+ + void pScreen->ChangeBorderWidth(pWin, width) + WindowPtr pWin; + unsigned int width; + +
+The formerly dix function ChangeBorderWidth has moved to ddx and is accessed via +this screen function. The new border width is given by width.
+ +
+ + void pScreen->MarkUnrealizedWindow(pChild, pWin, fromConfigure) + WindowPtr pChild; + WindowPtr pWin; + Bool fromConfigure; + +
+This function is called for windows that are being unrealized as part of +an UnrealizeTree. pChild is the window being unrealized, pWin is an +ancestor, and the fromConfigure value is simply propogated from UnrealizeTree.
+
+
+
+
+Graphics Contexts and Validation + +This graphics context (GC) contains state variables such as foreground and +background pixel value (color), the current line style and width, +the current tile or stipple for pattern generation, the current font for text +generation, and other similar attributes. + +In many graphics systems, the equivalent of the graphics context and the +drawable are combined as one entity. +The main distinction between the two kinds of status is that a drawable +describes a writing surface and the writings that may have already been done +on it, whereas a graphics context describes the drawing process. +A drawable is like a chalkboard. +A GC is like a piece of chalk. + +Unlike many similar systems, there is no "current pen location." +Every graphic operation is accompanied by the coordinates where it is to happen. + +The GC also includes two vectors of procedure pointers, the first +operate on the GC itself and are called GC funcs. The second, called +GC ops, +contains the functions that carry out the fundamental graphic operations +such as drawing lines, polygons, arcs, text, and copying bitmaps. +The DDX graphic software can, if it +wants to be smart, change these two vectors of procedure pointers +to take advantage of hardware/firmware in the server machine, which can do +a better job under certain circumstances. To reduce the amount of memory +consumed by each GC, it is wise to create a few "boilerplate" GC ops vectors +which can be shared by every GC which matches the constraints for that set. +Also, it is usually reasonable to have every GC created by a particular +module to share a common set of GC funcs. Samples of this sort of +sharing can be seen in fb/fbgc.c. + +The DDX software is notified any time the client (or DIX) uses a changed GC. +For instance, if the hardware has special support for drawing fixed-width +fonts, DDX can intercept changes to the current font in a GC just before +drawing is done. It can plug into either a fixed-width procedure that makes +the hardware draw characters, or a variable-width procedure that carefully +lays out glyphs by hand in software, depending upon the new font that is +selected. + +A definition of these structures can be found in the file +Xserver/include/gcstruct.h. + +Also included in each GC is support for dynamic devPrivates, which the +DDX can use for any purpose (see below). + +The DIX routines available for manipulating GCs are +CreateGC, ChangeGC, ChangeGCXIDs, CopyGC, SetClipRects, SetDashes, and FreeGC. +
+ + GCPtr CreateGC(pDrawable, mask, pval, pStatus) + DrawablePtr pDrawable; + BITS32 mask; + XID *pval; + int *pStatus; + + int ChangeGC(client, pGC, mask, pUnion) + ClientPtr client; + GCPtr pGC; + BITS32 mask; + ChangeGCValPtr pUnion; + + int ChangeGCXIDs(client, pGC, mask, pC32) + ClientPtr client; + GCPtr pGC; + BITS32 mask; + CARD32 *pC32; + + int CopyGC(pgcSrc, pgcDst, mask) + GCPtr pgcSrc; + GCPtr pgcDst; + BITS32 mask; + + int SetClipRects(pGC, xOrigin, yOrigin, nrects, prects, ordering) + GCPtr pGC; + int xOrigin, yOrigin; + int nrects; + xRectangle *prects; + int ordering; + + SetDashes(pGC, offset, ndash, pdash) + GCPtr pGC; + unsigned offset; + unsigned ndash; + unsigned char *pdash; + + int FreeGC(pGC, gid) + GCPtr pGC; + GContext gid; + +
+
+ +As a convenience, each Screen structure contains an array of +GCs that are preallocated, one at each depth the screen supports. +These are particularly useful in the mi code. Two DIX routines +must be used to get these GCs: +
+ + GCPtr GetScratchGC(depth, pScreen) + int depth; + ScreenPtr pScreen; + + FreeScratchGC(pGC) + GCPtr pGC; + +
+Always use these two routines, don't try to extract the scratch +GC yourself -- someone else might be using it, so a new one must +be created on the fly.
+ +If you need a GC for a very long time, say until the server is restarted, +you should not take one from the pool used by GetScratchGC, but should +get your own using CreateGC or CreateScratchGC. +This leaves the ones in the pool free for routines that only need it for +a little while and don't want to pay a heavy cost to get it. +
+ + GCPtr CreateScratchGC(pScreen, depth) + ScreenPtr pScreen; + int depth; + +
+NULL is returned if the GC cannot be created. +The GC returned can be freed with FreeScratchGC.
+
+ Details of Operation + +At screen initialization, a screen must supply a GC creation procedure. +At GC creation, the screen must fill in GC funcs and GC ops vectors +(Xserver/include/gcstruct.h). For any particular GC, the func vector +must remain constant, while the op vector may vary. This invariant is to +ensure that Wrappers work correctly. + +When a client request is processed that results in a change +to the GC, the device-independent state of the GC is updated. +This includes a record of the state that changed. +Then the ChangeGC GC func is called. +This is useful for graphics subsystems that are able to process +state changes in parallel with the server CPU. +DDX may opt not to take any action at GC-modify time. +This is more efficient if multiple GC-modify requests occur +between draws using a given GC. + +Validation occurs at the first draw operation that specifies the GC after +that GC was modified. DIX calls then the ValidateGC GC func. DDX should +then update its internal state. DDX internal state may be stored as one or +more of the following: 1) device private block on the GC; 2) hardware +state; 3) changes to the GC ops. + +The GC contains a serial number, which is loaded with a number fetched from +the window that was drawn into the last time the GC was used. The serial +number in the drawable is changed when the drawable's +clipList or absCorner changes. Thus, by +comparing the GC serial number with the drawable serial number, DIX can +force a validate if the drawable has been changed since the last time it +was used with this GC. + +In addition, the drawable serial number is always guaranteed to have the +most significant bit set to 0. Thus, the DDX layer can set the most +significant bit of the serial number to 1 in a GC to force a validate the next time +the GC is used. DIX also uses this technique to indicate that a change has +been made to the GC by way of a SetGC, a SetDashes or a SetClip request. +
+
+ GC Handling Routines + +The ScreenRec data structure has a pointer for +CreateGC(). +
+ + Bool pScreen->CreateGC(pGC) + GCPtr pGC; +
+This routine must fill in the fields of +a dynamically allocated GC that is passed in. +It does NOT allocate the GC record itself or fill +in the defaults; DIX does that.
+ +This must fill in both the GC funcs and ops; none of the drawing +functions will be called before the GC has been validated, +but the others (dealing with allocating of clip regions, +changing and destroying the GC, etc.) might be. + +The GC funcs vector contains pointers to 7 +routines and a devPrivate field: +
+ + pGC->funcs->ChangeGC(pGC, changes) + GCPtr pGC; + unsigned long changes; + +
+This GC func is called immediately after a field in the GC is changed. +changes is a bit mask indicating the changed fields of the GC in this +request.
+ +The ChangeGC routine is useful if you have a system where +state-changes to the GC can be swallowed immediately by your graphics +system, and a validate is not necessary. + +
+ + pGC->funcs->ValidateGC(pGC, changes, pDraw) + GCPtr pGC; + unsigned long changes; + DrawablePtr pDraw; + +
+ValidateGC is called by DIX just before the GC will be used when one +of many possible changes to the GC or the graphics system has +happened. It can modify devPrivates data attached to the GC, +change the op vector, or change hardware according to the +values in the GC. It may not change the device-independent portion of +the GC itself.
+ +In almost all cases, your ValidateGC() procedure should take the +regions that drawing needs to be clipped to and combine them into a +composite clip region, which you keep a pointer to in the private part +of the GC. In this way, your drawing primitive routines (and whatever +is below them) can easily determine what to clip and where. You +should combine the regions clientClip (the region that the client +desires to clip output to) and the region returned by +NotClippedByChildren(), in DIX. An example is in Xserver/fb/fbgc.c. + +Some kinds of extension software may cause this routine to be called +more than originally intended; you should not rely on algorithms that +will break under such circumstances. + +See the Strategies document for more information on creatively using +this routine. + +
+ + pGC->funcs->CopyGC(pGCSrc, mask, pGCDst) + GCPtr pGCSrc; + unsigned long mask; + GCPtr pGCDst; + +
+This routine is called by DIX when a GC is being copied to another GC. +This is for situations where dynamically allocated chunks of memory +are stored in the GC's dynamic devPrivates and need to be transferred to +the destination GC.
+ +
+ + pGC->funcs->DestroyGC(pGC) + GCPtr pGC; + +
+This routine is called before the GC is destroyed for the +entity interested in this GC to clean up after itself. +This routine is responsible for freeing any auxiliary storage allocated.
+
+
+ GC Clip Region Routines + +The GC clientClip field requires three procedures to manage it. These +procedures are in the GC funcs vector. The underlying principle is that dix +knows nothing about the internals of the clipping information, (except when +it has come from the client), and so calls ddX whenever it needs to copy, +set, or destroy such information. It could have been possible for dix not +to allow ddX to touch the field in the GC, and require it to keep its own +copy in devPriv, but since clip masks can be very large, this seems like a +bad idea. Thus, the server allows ddX to do whatever it wants to the +clientClip field of the GC, but requires it to do all manipulation itself. + +
+ + void pGC->funcs->ChangeClip(pGC, type, pValue, nrects) + GCPtr pGC; + int type; + char *pValue; + int nrects; + +
+This routine is called whenever the client changes the client clip +region. The pGC points to the GC involved, the type tells what form +the region has been sent in. If type is CT_NONE, then there is no +client clip. If type is CT_UNSORTED, CT_YBANDED or CT_YXBANDED, then +pValue pointer to a list of rectangles, nrects long. If type is +CT_REGION, then pValue pointer to a RegionRec from the mi region code. +If type is CT_PIXMAP pValue is a pointer to a pixmap. (The defines +for CT_NONE, etc. are in Xserver/include/gc.h.) This routine is +responsible for incrementing any necessary reference counts (e.g. for +a pixmap clip mask) for the new clipmask and freeing anything that +used to be in the GC's clipMask field. The lists of rectangles passed +in can be freed with Xfree(), the regions can be destroyed with the +RegionDestroy field in the screen, and pixmaps can be destroyed by +calling the screen's DestroyPixmap function. DIX and MI code expect +what they pass in to this to be freed or otherwise inaccessible, and +will never look inside what's been put in the GC. This is a good +place to be wary of storage leaks.
+ +In the sample server, this routine transforms either the bitmap or the +rectangle list into a region, so that future routines will have a more +predictable starting point to work from. (The validate routine must +take this client clip region and merge it with other regions to arrive +at a composite clip region before any drawing is done.) + +
+ + void pGC->funcs->DestroyClip(pGC) + GCPtr pGC; + +
+This routine is called whenever the client clip region must be destroyed. +The pGC points to the GC involved. This call should set the clipType +field of the GC to CT_NONE. +In the sample server, the pointer to the client clip region is set to NULL +by this routine after destroying the region, so that other software +(including ChangeClip() above) will recognize that there is no client clip region.
+ +
+ + void pGC->funcs->CopyClip(pgcDst, pgcSrc) + GCPtr pgcDst, pgcSrc; + +
+This routine makes a copy of the clipMask and clipType from pgcSrc +into pgcDst. It is responsible for destroying any previous clipMask +in pgcDst. The clip mask in the source can be the same as the +clip mask in the dst (clients do the strangest things), so care must +be taken when destroying things. This call is required because dix +does not know how to copy the clip mask from pgcSrc.
+
+
+
+ Drawing Primitives + +The X protocol (rules for the byte stream that goes between client and server) +does all graphics using primitive +operations, which are called Drawing Primitives. +These include line drawing, area filling, arcs, and text drawing. +Your implementation must supply 16 routines +to perform these on your hardware. +(The number 16 is arbitrary.) + +More specifically, 16 procedure pointers are in each +GC op vector. +At any given time, ALL of them MUST point to a valid procedure that +attempts to do the operation assigned, although +the procedure pointers may change and may +point to different procedures to carry out the same operation. +A simple server will leave them all pointing to the same 16 routines, while +a more optimized implementation will switch each from one +procedure to another, depending upon what is most optimal +for the current GC and drawable. + +The sample server contains a considerable chunk of code called the +mi (machine independent) +routines, which serve as drawing primitive routines. +Many server implementations will be able to use these as-is, +because they work for arbitrary depths. +They make no assumptions about the formats of pixmaps +and frame buffers, since they call a set of routines +known as the "Pixblit Routines" (see next section). +They do assume that the way to draw is +through these low-level routines that apply pixel values rows at a time. +If your hardware or firmware gives more performance when +things are done differently, you will want to take this fact into account +and rewrite some or all of the drawing primitives to fit your needs. +
+ GC Components + +This section describes the fields in the GC that affect each drawing primitive. +The only primitive that is not affected is GetImage, which does not use a GC +because its destination is a protocol-style bit image. +Since each drawing primitive mirrors exactly the X protocol request of the +same name, you should refer to the X protocol specification document +for more details. + +ALL of these routines MUST CLIP to the +appropriate regions in the drawable. +Since there are many regions to clip to simultaneously, +your ValidateGC routine should combine these into a unified +clip region to which your drawing routines can quickly refer. +This is exactly what the fb routines supplied with the sample server +do. +The mi implementation passes responsibility for clipping while drawing +down to the Pixblit routines. + +Also, all of them must adhere to the current plane mask. +The plane mask has one bit for every bit plane in the drawable; +only planes with 1 bits in the mask are affected by any drawing operation. + +All functions except for ImageText calls must obey the alu function. +This is usually Copy, but could be any of the allowable 16 raster-ops. + +All of the functions, except for CopyArea, might use the current +foreground and background pixel values. +Each pixel value is 32 bits. +These correspond to foreground and background colors, but you have +to run them through the colormap to find out what color the pixel values +represent. Do not worry about the color, just apply the pixel value. + +The routines that draw lines (PolyLine, PolySegment, PolyRect, and PolyArc) +use the line width, line style, cap style, and join style. +Line width is in pixels. +The line style specifies whether it is solid or dashed, and what kind of dash. +The cap style specifies whether Rounded, Butt, etc. +The join style specifies whether joins between joined lines are Miter, Round or Beveled. +When lines cross as part of the same polyline, they are assumed to be drawn once. +(See the X protocol specification for more details.) + +Zero-width lines are NOT meant to be really zero width; this is the client's way +of telling you that you can optimize line drawing with little regard to +the end caps and joins. +They are called "thin" lines and are meant to be one pixel wide. +These are frequently done in hardware or in a streamlined assembly language +routine. + +Lines with widths greater than zero, though, must all be drawn with the same +algorithm, because client software assumes that every jag on every +line at an angle will come at the same place. +Two lines that should have +one pixel in the space between them +(because of their distance apart and their widths) should have such a one-pixel line +of space between them if drawn, regardless of angle. + +The solid area fill routines (FillPolygon, PolyFillRect, PolyFillArc) +all use the fill rule, which specifies subtle interpretations of +what points are inside and what are outside of a given polygon. +The PolyFillArc routine also uses the arc mode, which specifies +whether to fill pie segments or single-edge slices of an ellipse. + +The line drawing, area fill, and PolyText routines must all +apply the correct "fill style." +This can be either a solid foreground color, a transparent stipple, +an opaque stipple, or a tile. +Stipples are bitmaps where the 1 bits represent that the foreground color is written, +and 0 bits represent that either the pixel is left alone (transparent) or that +the background color is written (opaque). +A tile is a pixmap of the full depth of the GC that is applied in its full glory to all areas. +The stipple and tile patterns can be any rectangular size, although some implementations +will be faster for certain sizes such as 8x8 or 32x32. +The mi implementation passes this responsibility down to the Pixblit routines. + +See the X protocol document for full details. +The description of the CreateGC request has a very good, detailed description of these +attributes. +
+
+The Primitives + +The Drawing Primitives are as follows: + +
+ + RegionPtr pGC->ops->CopyArea(src, dst, pGC, srcx, srcy, w, h, dstx, dsty) + DrawablePtr dst, src; + GCPtr pGC; + int srcx, srcy, w, h, dstx, dsty; + +
+CopyArea copies a rectangle of pixels from one drawable to another of +the same depth. To effect scrolling, this must be able to copy from +any drawable to itself, overlapped. No squeezing or stretching is done +because the source and destination are the same size. However, +everything is still clipped to the clip regions of the destination +drawable.
+ +If pGC->graphicsExposures is True, any portions of the destination which +were not valid in the source (either occluded by covering windows, or +outside the bounds of the drawable) should be collected together and +returned as a region (if this resultant region is empty, NULL can be +returned instead). Furthermore, the invalid bits of the source are +not copied to the destination and (when the destination is a window) +are filled with the background tile. The sample routine +miHandleExposures generates the appropriate return value and fills the +invalid area using pScreen->PaintWindowBackground. + +For instance, imagine a window that is partially obscured by other +windows in front of it. As text is scrolled on your window, the pixels +that are scrolled out from under obscuring windows will not be +available on the screen to copy to the right places, and so an exposure +event must be sent for the client to correctly repaint them. Of +course, if you implement backing store, you could do this without resorting +to exposure events. + +An example implementation is fbCopyArea() in Xserver/fb/fbcopy.c. + +
+ + RegionPtr pGC->ops->CopyPlane(src, dst, pGC, srcx, srcy, w, h, dstx, dsty, plane) + DrawablePtr dst, src; + GCPtr pGC; + int srcx, srcy, w, h, dstx, dsty; + unsigned long plane; + +
+CopyPlane must copy one plane of a rectangle from the source drawable +onto the destination drawable. Because this routine only copies one +bit out of each pixel, it can copy between drawables of different +depths. This is the only way of copying between drawables of +different depths, except for copying bitmaps to pixmaps and applying +foreground and background colors to it. All other conditions of +CopyArea apply to CopyPlane too.
+ +An example implementation is fbCopyPlane() in +Xserver/fb/fbcopy.c. + +
+ + void pGC->ops->PolyPoint(dst, pGC, mode, n, pPoint) + DrawablePtr dst; + GCPtr pGC; + int mode; + int n; + DDXPointPtr pPoint; + +
+PolyPoint draws a set of one-pixel dots (foreground color) +at the locations given in the array. +mode is one of the defined constants Origin (absolute coordinates) or Previous +(each coordinate is relative to the last). +Note that this does not use the background color or any tiles or stipples.
+ +Example implementations are fbPolyPoint() in Xserver/fb/fbpoint.c and +miPolyPoint in Xserver/mi/mipolypnt.c. + +
+ + void pGC->ops->Polylines(dst, pGC, mode, n, pPoint) + DrawablePtr dst; + GCPtr pGC; + int mode; + int n; + DDXPointPtr pPoint; + +
+Similar to PolyPoint, Polylines draws lines between the locations given in the array. +Zero-width lines are NOT meant to be really zero width; this is the client's way of +telling you that you can maximally optimize line drawing with little regard to +the end caps and joins. +mode is one of the defined constants Previous or Origin, depending upon +whether the points are each relative to the last or are absolute.
+ +Example implementations are miWideLine() and miWideDash() in +mi/miwideline.c and miZeroLine() in mi/mizerline.c. + +
+ + void pGC->ops->PolySegment(dst, pGC, n, pPoint) + DrawablePtr dst; + GCPtr pGC; + int n; + xSegment *pSegments; + +
+PolySegments draws unconnected +lines between pairs of points in the array; the array must be of +even size; no interconnecting lines are drawn.
+ +An example implementation is miPolySegment() in mipolyseg.c. + +
+ + void pGC->ops->PolyRectangle(dst, pGC, n, pRect) + DrawablePtr dst; + GCPtr pGC; + int n; + xRectangle *pRect; + +
+PolyRectangle draws outlines of rectangles for each rectangle in the array.
+ +An example implementation is miPolyRectangle() in Xserver/mi/mipolyrect.c. + +
+ + void pGC->ops->PolyArc(dst, pGC, n, pArc) + DrawablePtr dst; + GCPtr pGC; + int n; + xArc*pArc; + +
+PolyArc draws connected conic arcs according to the descriptions in the array. +See the protocol specification for more details.
+ +Example implementations are miZeroPolyArc in Xserver/mi/mizerarc. and +miPolyArc() in Xserver/mi/miarc.c. + +
+ + void pGC->ops->FillPolygon(dst, pGC, shape, mode, count, pPoint) + DrawablePtr dst; + GCPtr pGC; + int shape; + int mode; + int count; + DDXPointPtr pPoint; + +
+FillPolygon fills a polygon specified by the points in the array +with the appropriate fill style. +If necessary, an extra border line is assumed between the starting and ending lines. +The shape can be used as a hint +to optimize filling; it indicates whether it is convex (all interior angles +less than 180), nonconvex (some interior angles greater than 180 but +border does not cross itself), or complex (border crosses itself). +You can choose appropriate algorithms or hardware based upon mode. +mode is one of the defined constants Previous or Origin, depending upon +whether the points are each relative to the last or are absolute.
+ +An example implementation is miFillPolygon() in Xserver/mi/mipoly.c. + +
+ + void pGC->ops->PolyFillRect(dst, pGC, n, pRect) + DrawablePtr dst; + GCPtr pGC; + int n; + xRectangle *pRect; + +
+PolyFillRect fills multiple rectangles.
+ +Example implementations are fbPolyFillRect() in Xserver/fb/fbfillrect.c and +miPolyFillRect() in Xserver/mi/mifillrct.c. + +
+ + void pGC->ops->PolyFillArc(dst, pGC, n, pArc) + DrawablePtr dst; + GCPtr pGC; + int n; + xArc *pArc; + +
+PolyFillArc fills a shape for each arc in the +list that is bounded by the arc and one or two +line segments with the current fill style.
+ +An example implementation is miPolyFillArc() in Xserver/mi/mifillarc.c. + +
+ + void pGC->ops->PutImage(dst, pGC, depth, x, y, w, h, leftPad, format, pBinImage) + DrawablePtr dst; + GCPtr pGC; + int x, y, w, h; + int format; + char *pBinImage; + +
+PutImage copies a pixmap image into the drawable. The pixmap image +must be in X protocol format (either Bitmap, XYPixmap, or ZPixmap), +and format tells the format. (See the X protocol specification for +details on these formats). You must be able to accept all three +formats, because the client gets to decide which format to send. +Either the drawable and the pixmap image have the same depth, or the +source pixmap image must be a Bitmap. If a Bitmap, the foreground and +background colors will be applied to the destination.
+ +An example implementation is fbPutImage() in Xserver/fb/fbimage.c. + +
+ + void pScreen->GetImage(src, x, y, w, h, format, planeMask, pBinImage) + DrawablePtr src; + int x, y, w, h; + unsigned int format; + unsigned long planeMask; + char *pBinImage; + +
+GetImage copies the bits from the source drawable into +the destination pointer. The bits are written into the buffer +according to the server-defined pixmap padding rules. +pBinImage is guaranteed to be big enough to hold all +the bits that must be written.
+ +This routine does not correspond exactly to the X protocol GetImage +request, since DIX has to break the reply up into buffers of a size +requested by the transport layer. If format is ZPixmap, the bits are +written in the ZFormat for the depth of the drawable; if there is a 0 +bit in the planeMask for a particular plane, all pixels must have the +bit in that plane equal to 0. If format is XYPixmap, planemask is +guaranteed to have a single bit set; the bits should be written in +Bitmap format, which is the format for a single plane of an XYPixmap. + +An example implementation is miGetImage() in Xserver/mi/mibitblt.c. +
+ + void pGC->ops->ImageText8(pDraw, pGC, x, y, count, chars) + DrawablePtr pDraw; + GCPtr pGC; + int x, y; + int count; + char *chars; + +
+ImageText8 draws text. The text is drawn in the foreground color; the +background color fills the remainder of the character rectangles. The +coordinates specify the baseline and start of the text.
+ +An example implementation is miImageText8() in Xserver/mi/mipolytext.c. + +
+ + int pGC->ops->PolyText8(pDraw, pGC, x, y, count, chars) + DrawablePtr pDraw; + GCPtr pGC; + int x, y; + int count; + char *chars; + +
+PolyText8 works like ImageText8, except it draws with +the current fill style for special effects such as +shaded text. +See the X protocol specification for more details.
+ +An example implementation is miPolyText8() in Xserver/mi/mipolytext.c. + +
+ + int pGC->ops->PolyText16(pDraw, pGC, x, y, count, chars) + DrawablePtr pDraw; + GCPtr pGC; + int x, y; + int count; + unsigned short *chars; + + void pGC->ops->ImageText16(pDraw, pGC, x, y, count, chars) + DrawablePtr pDraw; + GCPtr pGC; + int x, y; + int count; + unsigned short *chars; + +
+These two routines are the same as the "8" versions, +except that they are for 16-bit character codes (useful +for oriental writing systems).
+ +The primary difference is in the way the character information is +looked up. The 8-bit and the 16-bit versions obviously have different +kinds of character values to look up; the main goal of the lookup is +to provide a pointer to the CharInfo structs for the characters to +draw and to pass these pointers to the Glyph routines. Given a +CharInfo struct, lower-level software can draw the glyph desired with +little concern for other characteristics of the font. + +16-bit character fonts have a row-and-column scheme, where the 2bytes +of the character code constitute the row and column in a square matrix +of CharInfo structs. Each font has row and column minimum and maximum +values; the CharInfo structures form a two-dimensional matrix. + +Example implementations are miPolyText16() and +miImageText16() in Xserver/mi/mipolytext.c. + +See the X protocol specification for more details on these graphic operations. + +There is a hook in the GC ops, called LineHelper, that used to be used in the +sample implementation by the code for wide lines. It no longer servers any +purpose in the sample servers, but still exists, #ifdef'ed by NEED_LINEHELPER, +in case someone needs it. +
+
+
+ Pixblit Procedures + +The Drawing Primitive functions must be defined for your server. +One possible way to do this is to use the mi routines from the sample server. +If you choose to use the mi routines (even part of them!) you must implement +these Pixblit routines. +These routines read and write pixel values +and deal directly with the image data. + +The Pixblit routines for the sample server are part of the "fb" +routines. As with the mi routines, the fb routines are +portable but are not as portable as the mi routines. + +The fb subsystem is a depth-independent framebuffer core, capable of +operating at any depth from 1 to 32, based on the depth of the window +or pixmap it is currently operating on. In particular, this means it +can support pixmaps of multiple depths on the same screen. It supplies +both Pixblit routines and higher-level optimized implementations of the +Drawing Primitive routines. It does make the assumption that the pixel +data it touches is available in the server's address space. + +In other words, if you have a "normal" frame buffer type display, you +can probably use the fb code, and the mi code. If you +have a stranger hardware, you will have to supply your own Pixblit +routines, but you can use the mi routines on top of them. If you have +better ways of doing some of the Drawing Primitive functions, then you +may want to supply some of your own Drawing Primitive routines. (Even +people who write their own Drawing Primitives save at least some of +the mi code for certain special cases that their hardware or library +or fancy algorithm does not handle.) + +The client, DIX, and the machine-independent routines do not carry the +final responsibility of clipping. They all depend upon the Pixblit +routines to do their clipping for them. The rule is, if you touch the +frame buffer, you clip. + +(The higher level routines may decide to clip at a high level, but +this is only for increased performance and cannot substitute for +bottom-level clipping. For instance, the mi routines, DIX, or the +client may decide to check all character strings to be drawn and chop +off all characters that would not be displayed. If so, it must retain +the character on the edge that is partly displayed so that the Pixblit +routines can clip off precisely at the right place.) + +To make this easier, all of the reasons to clip can be combined into +one region in your ValidateGC procedure. You take this composite clip +region with you into the Pixblit routines. (The sample server does +this.) + +Also, FillSpans() has to apply tile and stipple patterns. The +patterns are all aligned to the window origin so that when two people +write patches that are contiguous, they will merge nicely. (Really, +they are aligned to the patOrg point in the GC. This defaults to (0, +0) but can be set by the client to anything.) + +However, the mi routines can translate (relocate) the points from +window-relative to screen-relative if desired. If you set the +miTranslate field in the GC (set it in the CreateGC or ValidateGC +routine), then the mi output routines will translate all coordinates. +If it is false, then the coordinates will be passed window-relative. +Screens with no hardware translation will probably set miTranslate to +TRUE, so that geometry (e.g. polygons, rectangles) can be translated, +rather than having the resulting list of scanlines translated; this is +good because the list vertices in a drawing request will generally be +much smaller than the list of scanlines it produces. Similarly, +hardware that does translation can set miTranslate to FALSE, and avoid +the extra addition per vertex, which can be (but is not always) +important for getting the highest possible performance. (Contrast the +behavior of GetSpans, which is not expected to be called as often, and +so has different constraints.) The miTranslate field is settable in +each GC, if , for example, you are mixing several kinds of +destinations (offscreen pixmaps, main memory pixmaps, backing store, +and windows), all of which have different requirements, on one screen. + +As with other drawing routines, there are fields in the GC to direct +higher code to the correct routine to execute for each function. In +this way, you can optimize for special cases, for example, drawing +solids versus drawing stipples. + +The Pixblit routines are broken up into three sets. The Span routines +simply fill in rows of pixels. The Glyph routines fill in character +glyphs. The PushPixels routine is a three-input bitblt for more +sophisticated image creation. + +It turns out that the Glyph and PushPixels routines actually have a +machine-independent implementation that depends upon the Span +routines. If you are really pressed for time, you can use these +versions, although they are quite slow. +
+Span Routines + +For these routines, all graphic operations have been reduced to "spans." +A span is a horizontal row of pixels. +If you can design these routines which write into and read from +rows of pixels at a time, you can use the mi routines. + +Each routine takes +a destination drawable to draw into, a GC to use while drawing, +the number of spans to do, and two pointers to arrays that indicate the list +of starting points and the list of widths of spans. + +
+ + void pGC->ops->FillSpans(dst, pGC, nSpans, pPoints, pWidths, sorted) + DrawablePtr dst; + GCPtr pGC; + int nSpans; + DDXPointPtr pPoints; + int *pWidths; + int sorted; + +
+FillSpans should fill horizontal rows of pixels with +the appropriate patterns, stipples, etc., +based on the values in the GC. +The starting points are in the array at pPoints; the widths are in pWidths. +If sorted is true, the scan lines are in increasing y order, in which case +you may be able to make assumptions and optimizations.
+ +GC components: alu, clipOrg, clientClip, and fillStyle. + +GC mode-dependent components: fgPixel (for fillStyle Solid); tile, patOrg +(for fillStyle Tile); stipple, patOrg, fgPixel (for fillStyle Stipple); +and stipple, patOrg, fgPixel and bgPixel (for fillStyle OpaqueStipple). + +
+ + void pGC->ops->SetSpans(pDrawable, pGC, pSrc, ppt, pWidths, nSpans, sorted) + DrawablePtr pDrawable; + GCPtr pGC; + char *pSrc; + DDXPointPtr pPoints; + int *pWidths; + int nSpans; + int sorted; + +
+For each span, this routine should copy pWidths bits from pSrc to +pDrawable at pPoints using the raster-op from the GC. +If sorted is true, the scan lines are in increasing y order. +The pixels in pSrc are +padded according to the screen's padding rules. +These +can be used to support +interesting extension libraries, for example, shaded primitives. It does not +use the tile and stipple.
+ +GC components: alu, clipOrg, and clientClip + +The above functions are expected to handle all modifiers in the current +GC. Therefore, it is expedient to have +different routines to quickly handle common special cases +and reload the procedure pointers +at validate time, as with the other output functions. + +
+ + void pScreen->GetSpans(pDrawable, wMax, pPoints, pWidths, nSpans) + DrawablePtr pDrawable; + int wMax; + DDXPointPtr pPoints; + int *pWidths; + int nSpans; + char *pDst; + +
+For each span, GetSpans gets bits from the drawable starting at pPoints +and continuing for pWidths bits. +Each scanline returned will be server-scanline padded. +The routine can return NULL if memory cannot be allocated to hold the +result.
+ +GetSpans never translates -- for a window, the coordinates are already +screen-relative. Consider the case of hardware that doesn't do +translation: the mi code that calls ddX will translate each shape +(rectangle, polygon,. etc.) before scan-converting it, which requires +many fewer additions that having GetSpans translate each span does. +Conversely, consider hardware that does translate: it can set its +translation point to (0, 0) and get each span, and the only penalty is +the small number of additions required to translate each shape being +scan-converted by the calling code. Contrast the behavior of +FillSpans and SetSpans (discussed above under miTranslate), which are +expected to be used more often. + +Thus, the penalty to hardware that does hardware translation is +negligible, and code that wants to call GetSpans() is greatly +simplified, both for extensions and the machine-independent core +implementation. +
+ Glyph Routines + +The Glyph routines draw individual character glyphs for text drawing requests. + +You have a choice in implementing these routines. You can use the mi +versions; they depend ultimately upon the span routines. Although +text drawing will work, it will be very slow. + +
+ + void pGC->ops->PolyGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase) + DrawablePtr pDrawable; + GCPtr pGC; + int x , y; + unsigned int nglyph; + CharInfoRec **ppci; /* array of character info */ + pointer unused; /* unused since R5 */ + +
+GC components: alu, clipOrg, clientClip, font, and fillStyle.
+ +GC mode-dependent components: fgPixel (for fillStyle Solid); tile, patOrg +(for fillStyle Tile); stipple, patOrg, fgPixel (for fillStyle Stipple); +and stipple, patOrg, fgPixel and bgPixel (for fillStyle OpaqueStipple). + +
+ + void pGC->ops->ImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase) + DrawablePtr pDrawable; + GCPtr pGC; + int x , y; + unsigned int nglyph; + CharInfoRec **ppci; /* array of character info */ + pointer unused; /* unused since R5 */ + +
+GC components: clipOrg, clientClip, font, fgPixel, bgPixel
+ +These routines must copy the glyphs defined by the bitmaps in +pglyphBase and the font metrics in ppci to the DrawablePtr, pDrawable. +The poly routine follows all fill, stipple, and tile rules. The image +routine simply blasts the glyph onto the glyph's rectangle, in +foreground and background colors. + +More precisely, the Image routine fills the character rectangle with +the background color, and then the glyph is applied in the foreground +color. The glyph can extend outside of the character rectangle. +ImageGlyph() is used for terminal emulators and informal text purposes +such as button labels. + +The exact specification for the Poly routine is that the glyph is +painted with the current fill style. The character rectangle is +irrelevant for this operation. PolyText, at a higher level, includes +facilities for font changes within strings and such; it is to be used +for WYSIWYG word processing and similar systems. + +Both of these routines must clip themselves to the overall clipping region. + +Example implementations in mi are miPolyGlyphBlt() and +miImageGlyphBlt() in Xserver/mi/miglblt.c. +
+
+PushPixels routine + +The PushPixels routine writes the current fill style onto the drawable +in a certain shape defined by a bitmap. PushPixels is equivalent to +using a second stipple. You can thing of it as pushing the fillStyle +through a stencil. PushPixels is not used by any of the mi rendering code, +but is used by the mi software cursor code. +
+ Suppose the stencil is: 00111100 + and the stipple is: 10101010 + PushPixels result: 00101000 +
+
+ +You have a choice in implementing this routine. +You can use the mi version which depends ultimately upon FillSpans(). +Although it will work, it will be slow. + +
+ + void pGC->ops->PushPixels(pGC, pBitMap, pDrawable, dx, dy, xOrg, yOrg) + GCPtr pGC; + PixmapPtr pBitMap; + DrawablePtr pDrawable; + int dx, dy, xOrg, yOrg; + +
+GC components: alu, clipOrg, clientClip, and fillStyle.
+ +GC mode-dependent components: fgPixel (for fillStyle Solid); tile, patOrg +(for fillStyle Tile); stipple, patOrg, fgPixel (for fillStyle Stipple); +and stipple, patOrg, fgPixel and bgPixel (for fillStyle OpaqueStipple). + +PushPixels applys the foreground color, tile, or stipple from the pGC +through a stencil onto pDrawable. pBitMap points to a stencil (of +which we use an area dx wide by dy high), which is oriented over the +drawable at xOrg, yOrg. Where there is a 1 bit in the bitmap, the +destination is set according to the current fill style. Where there +is a 0 bit in the bitmap, the destination is left the way it is. + +This routine must clip to the overall clipping region. + +An Example implementation is miPushPixels() in Xserver/mi/mipushpxl.c. +
+
+
+
+ Shutdown Procedures + +
+ void AbortDDX() + void ddxGiveUp() +
+Some hardware may require special work to be done before the server +exits so that it is not left in an intermediate state. As explained +in the OS layer, FatalError() will call AbortDDX() just before +terminating the server. In addition, ddxGiveUp() will be called just +before terminating the server on a "clean" death. What AbortDDX() and +ddxGiveUP do is left unspecified, only that stubs must exist in the +ddx layer. It is up to local implementors as to what they should +accomplish before termination.
+
+ Command Line Procedures + +
+ int ddxProcessArgument(argc, argv, i) + int argc; + char *argv[]; + int i; + + void + ddxUseMsg() + +
+You should write these routines to deal with device-dependent command line +arguments. The routine ddxProcessArgument() is called with the command line, +and the current index into argv; you should return zero if the argument +is not a device-dependent one, and otherwise return a count of the number +of elements of argv that are part of this one argument. For a typical +option (e.g., "-realtime"), you should return the value one. This +routine gets called before checks are made against device-independent +arguments, so it is possible to peek at all arguments or to override +device-independent argument processing. You can document the +device-dependent arguments in ddxUseMsg(), which will be +called from UseMsg() after printing out the device-independent arguments.
+
+
+
+ Wrappers and Privates + +Two new extensibility concepts have been developed for release 4, Wrappers +and devPrivates. These replace the R3 GCInterest queues, which were not a +general enough mechanism for many extensions and only provided hooks into a +single data structure. devPrivates have been revised substantially for +X.Org X server release 1.5, and updated again for the 1.9 release. +
+ devPrivates + +devPrivates provides a way to attach arbitrary private data to various server structures. +Any structure which contains a devPrivates field of +type PrivateRec supports this mechanism. Some structures allow +allocating space for private data after some objects have been created, others +require all space allocations be registered before any objects of that type +are created. Xserver/include/privates.h +lists which of these cases applies to each structure containing +devPrivates. + + +To request private space, use +
+ Bool dixRegisterPrivateKey(DevPrivateKey key, DevPrivateType type, unsigned size); +
+The first argument is a pointer to a DevPrivateKeyRec which +will serve as the unique identifier for the private data. Typically this is +the address of a static DevPrivateKeyRec in your code. +The second argument is the class of objects for which this key will apply. +The third argument is the size of the space being requested, or +0 to only allocate a pointer that the caller will manage. +If space is requested, this space will be automatically freed when the object +is destroyed. Note that a call to dixSetPrivate +that changes the pointer value may cause the space to be unreachable by the caller, however it will still be automatically freed. +The function returns TRUE unless memory allocation fails. +If the function is called more than once on the same key, all calls must use +the same value for size or the server will abort.
+ + +To request private space and have the server manage the key, use +
+ DevPrivateKey dixCreatePrivateKey(DevPrivateType type, unsigned size); +
+The type and size arguments are +the same as those to dixRegisterPrivateKey but this +function allocates a DevPrivateKeyRec and returns a pointer to it +instead of requiring the caller to pass a pointer to an existing structure. +The server will free it automatically when the privates system is restarted +at server reset time.
+ + +To attach a piece of private data to an object, use: +
+ void dixSetPrivate(PrivateRec **privates, const DevPrivateKey key, pointer val) +
+The first argument is the address of the devPrivates +field in the target structure. This field is managed privately by the DIX +layer and should not be directly modified. The second argument is a pointer +to the DevPrivateKeyRec which you registered with +dixRegisterPrivateKey or allocated with +dixCreatePrivateKey. Only one +piece of data with a given key can be attached to an object, and in most cases +each key is specific to the type of object it was registered for. (An +exception is the PRIVATE_XSELINUX class which applies to multiple object types.) +The third argument is the value to store.
+ +If private data with the given key is already associated with the object, +dixSetPrivate will overwrite the old value with the +new one. + + +To look up a piece of private data, use one of: +
+ pointer dixLookupPrivate(PrivateRec **privates, const DevPrivateKey key) + pointer *dixLookupPrivateAddr(PrivateRec **privates, const DevPrivateKey key) +
+The first argument is the address of the devPrivates field +in the target structure. The second argument is the key to look up. +If a non-zero size was given when the key was registered, or if private data +with the given key is already associated with the object, then +dixLookupPrivate will return the pointer value +while dixLookupPrivateAddr +will return the address of the pointer.
+ + +When implementing new server resource objects that support devPrivates, there +are four steps to perform: +Add a type value to the DevPrivateType enum in +Xserver/include/privates.h, +declare a field of type PrivateRec * in your structure; +initialize this field to NULL when creating any objects; and +when freeing any objects call the dixFreePrivates or +dixFreeObjectWithPrivates function. +
+
+ Wrappers + +Wrappers are not a body of code, nor an interface spec. They are, instead, +a technique for hooking a new module into an existing calling sequence. +There are limitations on other portions of the server implementation which +make using wrappers possible; limits on when specific fields of data +structures may be modified. They are intended as a replacement for +GCInterest queues, which were not general enough to support existing +modules; in particular software cursors needed more +control over the activity. The general mechanism for using wrappers is: +
+privateWrapperFunction (object, ...) + ObjectPtr object; +{ + pre-wrapped-function-stuff ... + + object->functionVector = dixLookupPrivate(&object->devPrivates, privateKey); + (*object->functionVector) (object, ...); + /* + * this next line is occasionally required by the rules governing + * wrapper functions. Always using it will not cause problems. + * Not using it when necessary can cause severe troubles. + */ + dixSetPrivate(&object->devPrivates, privateKey, object->functionVector); + object->functionVector = privateWrapperFunction; + + post-wrapped-function-stuff ... +} + +privateInitialize (object) + ObjectPtr object; +{ + dixSetPrivate(&object->devPrivates, privateKey, object->functionVector); + object->functionVector = privateWrapperFunction; +} +
+
+ +Thus the privateWrapperFunction provides hooks for performing work both +before and after the wrapped function has been called; the process of +resetting the functionVector is called "unwrapping" while the process of +fetching the wrapped function and replacing it with the wrapping function +is called "wrapping". It should be clear that GCInterest queues could +be emulated using wrappers. In general, any function vectors contained in +objects can be wrapped, but only vectors in GCs and Screens have been tested. + +Wrapping screen functions is quite easy; each vector is individually +wrapped. Screen functions are not supposed to change after initialization, +so rewrapping is technically not necessary, but causes no problems. + +Wrapping GC functions is a bit more complicated. GC's have two tables of +function vectors, one hanging from gc->ops and the other from gc->funcs, which +should be initially wrapped from a CreateGC wrapper. Wrappers should modify +only table pointers, not the contents of the tables, as they +may be shared by more than one GC (and, in the case of funcs, are probably +shared by all gcs). Your func wrappers may change the GC funcs or ops +pointers, and op wrappers may change the GC op pointers but not the funcs. + +Thus, the rule for GC wrappings is: wrap the funcs from CreateGC and, in each +func wrapper, unwrap the ops and funcs, call down, and re-wrap. In each op +wrapper, unwrap the ops, call down, and rewrap afterwards. Note that in +re-wrapping you must save out the pointer you're replacing again. This way the +chain will be maintained when wrappers adjust the funcs/ops tables they use. +
+
+
+ Work Queue + +To queue work for execution when all clients are in a stable state (i.e. +just before calling select() in WaitForSomething), call: +
+ Bool QueueWorkProc(function,client,closure) + Bool (*function)(); + ClientPtr client; + pointer closure; +
+
+ +When the server is about to suspend itself, the given function will be +executed: +
+ (*function) (client, closure) +
+
+ +Neither client nor closure are actually used inside the work queue routines. +
+
+
+ Summary of Routines + +This is a summary of the routines discussed in this document. +The procedure names are in alphabetical order. +The Struct is the structure it is attached to; if blank, this +procedure is not attached to a struct and must be named as shown. +The sample server provides implementations in the following +categories. Notice that many of the graphics routines have both +mi and fb implementations. + + +dix portable to all systems; do not attempt to rewrite (Xserver/dix) +os routine provided in Xserver/os or Xserver/include/os.h +ddx frame buffer dependent (examples in Xserver/fb) +mi routine provided in Xserver/mi +hd hardware dependent (examples in many Xserver/hw directories) +none not implemented in sample implementation + + + + Server Routines (Page 1) + + + + Procedure + Port + Struct + + + +ALLOCATE_LOCALos +AbortDDXhd +AddCallbackdix +AddEnabledDeviceos +AddInputDevicedix +AddScreendix +AdjustWaitForDelayos +BellhdDevice +ChangeClipmiGC func +ChangeGCGC func +ChangeWindowAttributesddxScreen +ClearToBackgroundddxWindow +ClientAuthorizedos +ClientSignaldix +ClientSleepdix +ClientWakeupdix +ClipNotifyddxScreen +CloseScreenhd +ConstrainCursorhdScreen +CopyAreamiGC op +CopyGCDestddxGC func +CopyGCSourcenoneGC func +CopyPlanemiGC op +CopyWindowddxWindow +CreateGCddxScreen +CreateCallbackListdix +CreatePixmapddxScreen +CreateScreenResourcesddxScreen +CreateWellKnowSocketsos +CreateWindowddxScreen +CursorLimitshdScreen +DEALLOCATE_LOCALos +DeleteCallbackdix +DeleteCallbackListdix +DestroyClipddxGC func +DestroyGCddxGC func +DestroyPixmapddxScreen +DestroyWindowddxScreen +DisplayCursorhdScreen +Erroros +ErrorFos +FatalErroros +FillPolygonmiGC op +FillSpansddxGC op +FlushAllOutputos +FlushIfCriticalOutputPendingos +FreeScratchPixmapHeaderdix +GetImagemiScreen +GetMotionEventshdDevice +GetScratchPixmapHeaderdix +GetSpansddxScreen +GetStaticColormapddxScreen + + +
+ + + Server Routines (Page 2) + + + + Procedure + Port + Struct + + + +ImageGlyphBltmiGC op +ImageText16miGC op +ImageText8miGC op +InitInputhd +InitKeyboardDeviceStructdix +InitOutputhd +InitPointerDeviceStructdix +InsertFakeRequestos +InstallColormapddxScreen +IntersectmiScreen +InversemiScreen +LegalModifierhd +LineHelpermiGC op +ListInstalledColormapsddxScreen +LookupKeyboardDevicedix +LookupPointerDevicedix +ModifyPixmapheadermiScreen +NextAvailableClientdix +OsInitos +PaintWindowBackgroundmiWindow +PaintWindowBordermiWindow +PointerNonInterestBoxhdScreen +PointInRegionmiScreen +PolyArcmiGC op +PolyFillArcmiGC op +PolyFillRectmiGC op +PolyGlyphBltmiGC op +PolylinesmiGC op +PolyPointmiGC op +PolyRectanglemiGC op +PolySegmentmiGC op +PolyText16miGC op +PolyText8miGC op +PositionWindowddxScreen +ProcessInputEventshd +PushPixelsmiGC op +PutImagemiGC op +QueryBestSizehdScreen +ReadRequestFromClientos +RealizeCursorhdScreen +RealizeFontddxScreen +RealizeWindowddxScreen +RecolorCursorhdScreen +RectInmiScreen +RegionCopymiScreen +RegionCreatemiScreen +RegionDestroymiScreen +RegionEmptymiScreen +RegionExtentsmiScreen +RegionNotEmptymiScreen +RegionResetmiScreen +ResolveColorddxScreen + + +
+ + + Server Routines (Page 3) + + + + Procedure + Port + Struct + + + +RegisterKeyboardDevicedix +RegisterPointerDevicedix +RemoveEnabledDeviceos +ResetCurrentRequestos +SaveScreenddxScreen +SetCriticalOutputPendingos +SetCursorPositionhdScreen +SetInputCheckdix +SetSpansddxGC op +StoreColorsddxScreen +SubtractmiScreen +TimerCancelos +TimerCheckos +TimerForceos +TimerFreeos +TimerInitos +TimerSetos +TimeSinceLastInputEventhd +TranslateRegionmiScreen +UninstallColormapddxScreen +UnionmiScreen +UnrealizeCursorhdScreen +UnrealizeFontddxScreen +UnrealizeWindowddxScreen +ValidateGCddxGC func +ValidateTreemiScreen +WaitForSomethingos +WindowExposuresmiWindow +WriteToClientos +Xallocos +Xfreeos +Xreallocos + + +
+
+
diff --git a/xserver/doc/xml/dtrace/Makefile.am b/xserver/doc/xml/dtrace/Makefile.am new file mode 100644 index 000000000..0e25e5d43 --- /dev/null +++ b/xserver/doc/xml/dtrace/Makefile.am @@ -0,0 +1,36 @@ +# +# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice (including the next +# paragraph) shall be included in all copies or substantial portions of the +# Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# + +XML_FILES = Xserver-DTrace.xml + +include ../xmlrules.in + +if XSERVER_DTRACE +doc_DATA = $(BUILT_DOC_FILES) +else +noinst_DATA = $(BUILT_DOC_FILES) +endif + +CLEANFILES = $(CLEAN_DOC_FILES) + +EXTRA_DIST = $(XML_FILES) diff --git a/xserver/doc/xml/dtrace/Makefile.in b/xserver/doc/xml/dtrace/Makefile.in new file mode 100644 index 000000000..d73c4b312 --- /dev/null +++ b/xserver/doc/xml/dtrace/Makefile.in @@ -0,0 +1,872 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# +# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice (including the next +# paragraph) shall be included in all copies or substantial portions of the +# Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# + +# +# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice (including the next +# paragraph) shall be included in all copies or substantial portions of the +# Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# + +# This file is included by Makefile.am in subdirectories that have +# DocBook XML documentation files. +# +# No files are automatically distributed or installed by this subset of rules +# Any files to be distributed or installed would be listed in the including +# Makefile.am + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = ../../.. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +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@ +DIST_COMMON = $(srcdir)/../xmlrules.in $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in +@HAVE_STYLESHEETS_TRUE@am__append_1 = -m $(XSL_STYLESHEET) +@HAVE_STYLESHEETS_TRUE@am__append_2 = xorg.css +@HAVE_XMLTO_TEXT_TRUE@@HAVE_XMLTO_TRUE@am__append_3 = $(TXT_FILES) +@HAVE_XMLTO_TRUE@am__append_4 = $(HTML_FILES) +@HAVE_FOP_TRUE@@HAVE_XMLTO_TRUE@am__append_5 = $(PDF_FILES) +subdir = doc/xml/dtrace +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/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 = +SOURCES = +DIST_SOURCES = +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 = `echo $$p | sed -e 's|^.*/||'`; +am__installdirs = "$(DESTDIR)$(docdir)" +docDATA_INSTALL = $(INSTALL_DATA) +DATA = $(doc_DATA) $(noinst_DATA) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +ADMIN_MAN_DIR = @ADMIN_MAN_DIR@ +ADMIN_MAN_SUFFIX = @ADMIN_MAN_SUFFIX@ +AGP_FALSE = @AGP_FALSE@ +AGP_TRUE = @AGP_TRUE@ +AIGLX_FALSE = @AIGLX_FALSE@ +AIGLX_TRUE = @AIGLX_TRUE@ +ALLOCA = @ALLOCA@ +ALPHA_VIDEO_FALSE = @ALPHA_VIDEO_FALSE@ +ALPHA_VIDEO_TRUE = @ALPHA_VIDEO_TRUE@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +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@ +ARM_BACKTRACE_CFLAGS = @ARM_BACKTRACE_CFLAGS@ +ARM_VIDEO_FALSE = @ARM_VIDEO_FALSE@ +ARM_VIDEO_TRUE = @ARM_VIDEO_TRUE@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BSD_APM_FALSE = @BSD_APM_FALSE@ +BSD_APM_TRUE = @BSD_APM_TRUE@ +BSD_KQUEUE_APM_FALSE = @BSD_KQUEUE_APM_FALSE@ +BSD_KQUEUE_APM_TRUE = @BSD_KQUEUE_APM_TRUE@ +BUILDDOCS_FALSE = @BUILDDOCS_FALSE@ +BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ +BUILD_DATE = @BUILD_DATE@ +BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ +BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +COMPOSITE_FALSE = @COMPOSITE_FALSE@ +COMPOSITE_TRUE = @COMPOSITE_TRUE@ +CONFIG_DBUS_API_FALSE = @CONFIG_DBUS_API_FALSE@ +CONFIG_DBUS_API_TRUE = @CONFIG_DBUS_API_TRUE@ +CONFIG_HAL_FALSE = @CONFIG_HAL_FALSE@ +CONFIG_HAL_TRUE = @CONFIG_HAL_TRUE@ +CONFIG_NEED_DBUS_FALSE = @CONFIG_NEED_DBUS_FALSE@ +CONFIG_NEED_DBUS_TRUE = @CONFIG_NEED_DBUS_TRUE@ +CONFIG_UDEV_FALSE = @CONFIG_UDEV_FALSE@ +CONFIG_UDEV_TRUE = @CONFIG_UDEV_TRUE@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBE_FALSE = @DBE_FALSE@ +DBE_TRUE = @DBE_TRUE@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEBUG_FALSE = @DEBUG_FALSE@ +DEBUG_TRUE = @DEBUG_TRUE@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGDIR = @DEFAULT_LOGDIR@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_FALSE = @DGA_FALSE@ +DGA_LIBS = @DGA_LIBS@ +DGA_TRUE = @DGA_TRUE@ +DIX_CFLAGS = @DIX_CFLAGS@ +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@ +DMX_BUILD_LNX_FALSE = @DMX_BUILD_LNX_FALSE@ +DMX_BUILD_LNX_TRUE = @DMX_BUILD_LNX_TRUE@ +DMX_BUILD_USB_FALSE = @DMX_BUILD_USB_FALSE@ +DMX_BUILD_USB_TRUE = @DMX_BUILD_USB_TRUE@ +DMX_FALSE = @DMX_FALSE@ +DMX_TRUE = @DMX_TRUE@ +DOLT_BASH = @DOLT_BASH@ +DOXYGEN = @DOXYGEN@ +DPMSExtension_FALSE = @DPMSExtension_FALSE@ +DPMSExtension_TRUE = @DPMSExtension_TRUE@ +DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ +DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ +DRI2_AIGLX_FALSE = @DRI2_AIGLX_FALSE@ +DRI2_AIGLX_TRUE = @DRI2_AIGLX_TRUE@ +DRI2_FALSE = @DRI2_FALSE@ +DRI2_TRUE = @DRI2_TRUE@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_FALSE = @DRI_FALSE@ +DRI_LIBS = @DRI_LIBS@ +DRI_TRUE = @DRI_TRUE@ +DSYMUTIL = @DSYMUTIL@ +DTRACE = @DTRACE@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FBDEVHW_FALSE = @FBDEVHW_FALSE@ +FBDEVHW_TRUE = @FBDEVHW_TRUE@ +FFLAGS = @FFLAGS@ +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@ +FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ +FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ +GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ +GLX_DEFINES = @GLX_DEFINES@ +GLX_FALSE = @GLX_FALSE@ +GLX_TRUE = @GLX_TRUE@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ +HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ +HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ +HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ +HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ +HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ +HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ +HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ +HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ +HPPA_VIDEO_TRUE = @HPPA_VIDEO_TRUE@ +I386_VIDEO_FALSE = @I386_VIDEO_FALSE@ +I386_VIDEO_TRUE = @I386_VIDEO_TRUE@ +INSTALL_CMD = @INSTALL_CMD@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_LIBXF86CONFIG_FALSE = @INSTALL_LIBXF86CONFIG_FALSE@ +INSTALL_LIBXF86CONFIG_TRUE = @INSTALL_LIBXF86CONFIG_TRUE@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_SETUID_FALSE = @INSTALL_SETUID_FALSE@ +INSTALL_SETUID_TRUE = @INSTALL_SETUID_TRUE@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INT10MODULE_FALSE = @INT10MODULE_FALSE@ +INT10MODULE_TRUE = @INT10MODULE_TRUE@ +INT10_STUB_FALSE = @INT10_STUB_FALSE@ +INT10_STUB_TRUE = @INT10_STUB_TRUE@ +INT10_VM86_FALSE = @INT10_VM86_FALSE@ +INT10_VM86_TRUE = @INT10_VM86_TRUE@ +INT10_X86EMU_FALSE = @INT10_X86EMU_FALSE@ +INT10_X86EMU_TRUE = @INT10_X86EMU_TRUE@ +KDRIVEFBDEV_FALSE = @KDRIVEFBDEV_FALSE@ +KDRIVEFBDEV_TRUE = @KDRIVEFBDEV_TRUE@ +KDRIVELINUX_FALSE = @KDRIVELINUX_FALSE@ +KDRIVELINUX_TRUE = @KDRIVELINUX_TRUE@ +KDRIVEOPENBSD_FALSE = @KDRIVEOPENBSD_FALSE@ +KDRIVEOPENBSD_TRUE = @KDRIVEOPENBSD_TRUE@ +KDRIVEWSCONS_FALSE = @KDRIVEWSCONS_FALSE@ +KDRIVEWSCONS_TRUE = @KDRIVEWSCONS_TRUE@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_EVDEV_FALSE = @KDRIVE_EVDEV_FALSE@ +KDRIVE_EVDEV_TRUE = @KDRIVE_EVDEV_TRUE@ +KDRIVE_FALSE = @KDRIVE_FALSE@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_KBD_FALSE = @KDRIVE_KBD_FALSE@ +KDRIVE_KBD_TRUE = @KDRIVE_KBD_TRUE@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_MOUSE_FALSE = @KDRIVE_MOUSE_FALSE@ +KDRIVE_MOUSE_TRUE = @KDRIVE_MOUSE_TRUE@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +KDRIVE_TRUE = @KDRIVE_TRUE@ +LAUNCHD_ID_PREFIX = @LAUNCHD_ID_PREFIX@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_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@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ +LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ +LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ +LINUX_IA64_TRUE = @LINUX_IA64_TRUE@ +LNXACPI_FALSE = @LNXACPI_FALSE@ +LNXACPI_TRUE = @LNXACPI_TRUE@ +LNXAPM_FALSE = @LNXAPM_FALSE@ +LNXAPM_TRUE = @LNXAPM_TRUE@ +LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAIN_LIB = @MAIN_LIB@ +MAKEINFO = @MAKEINFO@ +MAN_SUBSTS = @MAN_SUBSTS@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MITSHM_FALSE = @MITSHM_FALSE@ +MITSHM_TRUE = @MITSHM_TRUE@ +NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ +NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ +NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ +NEED_VSNPRINTF_TRUE = @NEED_VSNPRINTF_TRUE@ +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@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ +PCIACCESS_LIBS = @PCIACCESS_LIBS@ +PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ +PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ +PKG_CONFIG = @PKG_CONFIG@ +PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ +PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ +PROJECTROOT = @PROJECTROOT@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RECORD_FALSE = @RECORD_FALSE@ +RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ +RES_FALSE = @RES_FALSE@ +RES_TRUE = @RES_TRUE@ +SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ +SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ +SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ +SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ +SED = @SED@ +SELINUX_CFLAGS = @SELINUX_CFLAGS@ +SELINUX_LIBS = @SELINUX_LIBS@ +SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ +SET_MAKE = @SET_MAKE@ +SGI_VIDEO_FALSE = @SGI_VIDEO_FALSE@ +SGI_VIDEO_TRUE = @SGI_VIDEO_TRUE@ +SHA1_CFLAGS = @SHA1_CFLAGS@ +SHA1_LIBS = @SHA1_LIBS@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_ASM_INLINE_FALSE = @SOLARIS_ASM_INLINE_FALSE@ +SOLARIS_ASM_INLINE_TRUE = @SOLARIS_ASM_INLINE_TRUE@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +SOLARIS_VT_FALSE = @SOLARIS_VT_FALSE@ +SOLARIS_VT_TRUE = @SOLARIS_VT_TRUE@ +SPARC64_VIDEO_FALSE = @SPARC64_VIDEO_FALSE@ +SPARC64_VIDEO_TRUE = @SPARC64_VIDEO_TRUE@ +SPECIAL_DTRACE_OBJECTS_FALSE = @SPECIAL_DTRACE_OBJECTS_FALSE@ +SPECIAL_DTRACE_OBJECTS_TRUE = @SPECIAL_DTRACE_OBJECTS_TRUE@ +STANDALONE_XPBPROXY_FALSE = @STANDALONE_XPBPROXY_FALSE@ +STANDALONE_XPBPROXY_TRUE = @STANDALONE_XPBPROXY_TRUE@ +STRIP = @STRIP@ +STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ +SYSCONFDIR = @SYSCONFDIR@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_FALSE = @TSLIB_FALSE@ +TSLIB_LIBS = @TSLIB_LIBS@ +TSLIB_TRUE = @TSLIB_TRUE@ +UDEV_CFLAGS = @UDEV_CFLAGS@ +UDEV_LIBS = @UDEV_LIBS@ +UNITTESTS_FALSE = @UNITTESTS_FALSE@ +UNITTESTS_TRUE = @UNITTESTS_TRUE@ +UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ +VBE_FALSE = @VBE_FALSE@ +VBE_TRUE = @VBE_TRUE@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VERSION = @VERSION@ +VGAHW_FALSE = @VGAHW_FALSE@ +VGAHW_TRUE = @VGAHW_TRUE@ +WINDOWSWM_CFLAGS = @WINDOWSWM_CFLAGS@ +WINDOWSWM_LIBS = @WINDOWSWM_LIBS@ +WINDRES = @WINDRES@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XAA_FALSE = @XAA_FALSE@ +XAA_TRUE = @XAA_TRUE@ +XACE_FALSE = @XACE_FALSE@ +XACE_TRUE = @XACE_TRUE@ +XCALIBRATE_FALSE = @XCALIBRATE_FALSE@ +XCALIBRATE_TRUE = @XCALIBRATE_TRUE@ +XCSECURITY_FALSE = @XCSECURITY_FALSE@ +XCSECURITY_TRUE = @XCSECURITY_TRUE@ +XDMAUTH_FALSE = @XDMAUTH_FALSE@ +XDMAUTH_TRUE = @XDMAUTH_TRUE@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_FALSE = @XDMCP_FALSE@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMCP_TRUE = @XDMCP_TRUE@ +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_FALSE = @XEPHYR_FALSE@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XEPHYR_TRUE = @XEPHYR_TRUE@ +XF86BIGFONT_FALSE = @XF86BIGFONT_FALSE@ +XF86BIGFONT_TRUE = @XF86BIGFONT_TRUE@ +XF86CONFIGDIR = @XF86CONFIGDIR@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86UTILS_FALSE = @XF86UTILS_FALSE@ +XF86UTILS_TRUE = @XF86UTILS_TRUE@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_FALSE = @XF86VIDMODE_FALSE@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XF86VIDMODE_TRUE = @XF86VIDMODE_TRUE@ +XFAKESERVER_FALSE = @XFAKESERVER_FALSE@ +XFAKESERVER_TRUE = @XFAKESERVER_TRUE@ +XINERAMA_FALSE = @XINERAMA_FALSE@ +XINERAMA_TRUE = @XINERAMA_TRUE@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +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_FALSE = @XNEST_FALSE@ +XNEST_LIBS = @XNEST_LIBS@ +XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ +XNEST_TRUE = @XNEST_TRUE@ +XORG_BUS_BSDPCI_FALSE = @XORG_BUS_BSDPCI_FALSE@ +XORG_BUS_BSDPCI_TRUE = @XORG_BUS_BSDPCI_TRUE@ +XORG_BUS_LINUXPCI_FALSE = @XORG_BUS_LINUXPCI_FALSE@ +XORG_BUS_LINUXPCI_TRUE = @XORG_BUS_LINUXPCI_TRUE@ +XORG_BUS_SPARC_FALSE = @XORG_BUS_SPARC_FALSE@ +XORG_BUS_SPARC_TRUE = @XORG_BUS_SPARC_TRUE@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_FALSE = @XORG_FALSE@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MAN_PAGE = @XORG_MAN_PAGE@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XORG_SGML_PATH = @XORG_SGML_PATH@ +XORG_SYS_LIBS = @XORG_SYS_LIBS@ +XORG_TRUE = @XORG_TRUE@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_FALSE = @XQUARTZ_FALSE@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ +XQUARTZ_SPARKLE_FALSE = @XQUARTZ_SPARKLE_FALSE@ +XQUARTZ_SPARKLE_TRUE = @XQUARTZ_SPARKLE_TRUE@ +XQUARTZ_TRUE = @XQUARTZ_TRUE@ +XREGISTRY_FALSE = @XREGISTRY_FALSE@ +XREGISTRY_TRUE = @XREGISTRY_TRUE@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSELINUX_FALSE = @XSELINUX_FALSE@ +XSELINUX_TRUE = @XSELINUX_TRUE@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_DTRACE_FALSE = @XSERVER_DTRACE_FALSE@ +XSERVER_DTRACE_TRUE = @XSERVER_DTRACE_TRUE@ +XSERVER_LIBS = @XSERVER_LIBS@ +XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ +XSL_STYLESHEET = @XSL_STYLESHEET@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_FALSE = @XVFB_FALSE@ +XVFB_LIBS = @XVFB_LIBS@ +XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XVFB_TRUE = @XVFB_TRUE@ +XVMC_FALSE = @XVMC_FALSE@ +XVMC_TRUE = @XVMC_TRUE@ +XV_FALSE = @XV_FALSE@ +XV_TRUE = @XV_TRUE@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_CLIPBOARD_FALSE = @XWIN_CLIPBOARD_FALSE@ +XWIN_CLIPBOARD_TRUE = @XWIN_CLIPBOARD_TRUE@ +XWIN_FALSE = @XWIN_FALSE@ +XWIN_GLX_WINDOWS_FALSE = @XWIN_GLX_WINDOWS_FALSE@ +XWIN_GLX_WINDOWS_TRUE = @XWIN_GLX_WINDOWS_TRUE@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_MULTIWINDOWEXTWM_FALSE = @XWIN_MULTIWINDOWEXTWM_FALSE@ +XWIN_MULTIWINDOWEXTWM_TRUE = @XWIN_MULTIWINDOWEXTWM_TRUE@ +XWIN_MULTIWINDOW_FALSE = @XWIN_MULTIWINDOW_FALSE@ +XWIN_MULTIWINDOW_TRUE = @XWIN_MULTIWINDOW_TRUE@ +XWIN_NATIVEGDI_FALSE = @XWIN_NATIVEGDI_FALSE@ +XWIN_NATIVEGDI_TRUE = @XWIN_NATIVEGDI_TRUE@ +XWIN_PRIMARYFB_FALSE = @XWIN_PRIMARYFB_FALSE@ +XWIN_PRIMARYFB_TRUE = @XWIN_PRIMARYFB_TRUE@ +XWIN_RANDR_FALSE = @XWIN_RANDR_FALSE@ +XWIN_RANDR_TRUE = @XWIN_RANDR_TRUE@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ +XWIN_TRUE = @XWIN_TRUE@ +XWIN_XV_FALSE = @XWIN_XV_FALSE@ +XWIN_XV_TRUE = @XWIN_XV_TRUE@ +X_PRIVSEP_FALSE = @X_PRIVSEP_FALSE@ +X_PRIVSEP_TRUE = @X_PRIVSEP_TRUE@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGDIR__ = @__XCONFIGDIR__@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abi_ansic = @abi_ansic@ +abi_extension = @abi_extension@ +abi_videodrv = @abi_videodrv@ +abi_xinput = @abi_xinput@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__fastdepOBJC_FALSE = @am__fastdepOBJC_FALSE@ +am__fastdepOBJC_TRUE = @am__fastdepOBJC_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +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@ +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@ +symbol_visibility = @symbol_visibility@ +sysconfdir = @sysconfdir@ +sysconfigdir = @sysconfigdir@ +target_alias = @target_alias@ +XML_FILES = Xserver-DTrace.xml +TXT_FILES = $(XML_FILES:%.xml=%.txt) +HTML_FILES = $(XML_FILES:%.xml=%.html) +PDF_FILES = $(XML_FILES:%.xml=%.pdf) +BUILT_DOC_FILES = $(am__append_2) $(am__append_3) $(am__append_4) \ + $(am__append_5) +SUFFIXES = .xml .txt .html .pdf +XML_ENT_DIR = $(abs_top_builddir)/doc/xml +XMLTO_FLAGS = --searchpath $(XML_ENT_DIR) $(am__append_1) +CLEAN_DOC_FILES = $(TXT_FILES) $(HTML_FILES) $(PDF_FILES) xorg.css +@XSERVER_DTRACE_TRUE@doc_DATA = $(BUILT_DOC_FILES) +@XSERVER_DTRACE_FALSE@noinst_DATA = $(BUILT_DOC_FILES) +CLEANFILES = $(CLEAN_DOC_FILES) +EXTRA_DIST = $(XML_FILES) +all: all-am + +.SUFFIXES: +.SUFFIXES: .xml .txt .html .pdf +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../xmlrules.in $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign doc/xml/dtrace/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign doc/xml/dtrace/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: +install-docDATA: $(doc_DATA) + @$(NORMAL_INSTALL) + test -z "$(docdir)" || $(mkdir_p) "$(DESTDIR)$(docdir)" + @list='$(doc_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f=$(am__strip_dir) \ + echo " $(docDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(docdir)/$$f'"; \ + $(docDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(docdir)/$$f"; \ + done + +uninstall-docDATA: + @$(NORMAL_UNINSTALL) + @list='$(doc_DATA)'; for p in $$list; do \ + f=$(am__strip_dir) \ + echo " rm -f '$(DESTDIR)$(docdir)/$$f'"; \ + rm -f "$(DESTDIR)$(docdir)/$$f"; \ + done +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + $(mkdir_p) $(distdir)/.. + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) +installdirs: + for dir in "$(DESTDIR)$(docdir)"; 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: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-libtool + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: install-docDATA + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: uninstall-docDATA uninstall-info-am + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-data install-data-am install-docDATA install-exec \ + install-exec-am install-info install-info-am install-man \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + uninstall uninstall-am uninstall-docDATA uninstall-info-am + + +@HAVE_STYLESHEETS_TRUE@xorg.css: $(STYLESHEET_SRCDIR)/xorg.css +@HAVE_STYLESHEETS_TRUE@ $(AM_V_GEN)cp -pf $(STYLESHEET_SRCDIR)/xorg.css $@ +@HAVE_XMLTO_TEXT_TRUE@@HAVE_XMLTO_TRUE@.xml.txt: +@HAVE_XMLTO_TEXT_TRUE@@HAVE_XMLTO_TRUE@ @rm -f $@ +@HAVE_XMLTO_TEXT_TRUE@@HAVE_XMLTO_TRUE@ $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) txt $< +@HAVE_XMLTO_TRUE@.xml.html: +@HAVE_XMLTO_TRUE@ @rm -f $@ +@HAVE_XMLTO_TRUE@ $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) xhtml-nochunks $< +@HAVE_FOP_TRUE@@HAVE_XMLTO_TRUE@.xml.pdf: +@HAVE_FOP_TRUE@@HAVE_XMLTO_TRUE@ @rm -f $@ +@HAVE_FOP_TRUE@@HAVE_XMLTO_TRUE@ $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) --with-fop pdf $< + +# All the files we build depend on the entities +$(BUILT_DOC_FILES): $(XML_ENT_DIR)/xserver.ent + +$(XML_ENT_DIR)/xserver.ent: + (cd $(XML_ENT_DIR) && $(MAKE) $(AM_MAKEFLAGS) $(@F)) +# 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/doc/xml/dtrace/Xserver-DTrace.xml b/xserver/doc/xml/dtrace/Xserver-DTrace.xml new file mode 100644 index 000000000..290f0d3eb --- /dev/null +++ b/xserver/doc/xml/dtrace/Xserver-DTrace.xml @@ -0,0 +1,579 @@ + + %defs; +]> + +
+ + Xserver provider for DTrace + + AlanCoopersmith + + Oracle Corporation + Solaris Engineering + + + X.Org Xserver version &xserver.version; + + +Copyright (c) 2005, 2006, 2007, 2010, Oracle and/or its affiliates. +All rights reserved. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + + + + + + Introduction + + This page provides details on a + statically defined user application tracing provider + for the + DTrace + facility in Solaris 10, + MacOS X 10.5, and later releases. This + provider instruments various points in the X server, to allow + tracing what client applications are up to. + + + + The provider was integrated into the X.Org git master repository + with Solaris 10 & OpenSolaris support for the Xserver 1.4 release, + released in 2007 with X11R7.3. Support for DTrace on MacOS X + was added in Xserver 1.7. + + + + These probes expose the request and reply structure of the X protocol + between clients and the X server, so an understanding of that basic + nature will aid in learning how to use these probes. + + + + + Available probes + + + Due to the way User-Defined DTrace probes work, arguments to + these probes all bear undistinguished names of + arg0, arg1, + arg2, etc. These tables should help you + determine what the real data is for each of the probe arguments. + + + Probes and their arguments + + + + + + + + + + + + Probe name + Description + arg0 + arg1 + arg2 + arg3 + arg4 + + + + + Request Probes + + + request-start + Called just before processing each client request. + requestName + requestCode + requestLength + clientId + requestBuffer + + + request-done + Called just after processing each client request. + requestName + requestCode + sequenceNumber + clientId + resultCode + + + Event Probes + + + send-event + Called just before send each event to a client. + clientId + eventCode + eventBuffer + + + + Client Connection Probes + + + client-connect + Called when a new connection is opened from a client + clientId + clientFD + + + + client-auth + Called when client authenticates (normally just after connection opened) + clientId + clientAddr + clientPid + clientZoneId + + + + client-disconnect + Called when a client connection is closed + clientId + + + + Resource Allocation Probes + + + resource-alloc + Called when a new resource (pixmap, gc, colormap, etc.) is allocated + resourceId + resourceTypeId + resourceValue + resourceTypeName + + + + resource-free + Called when a resource is freed + resourceId + resourceTypeId + resourceValue + resourceTypeName + + + + +
+
+
+ + + Data Available in Probe Arguments + + + To access data in arguments of type string, you will need + to use copyinstr(). + To access data buffers referenced via uintptr_t's, you will + need to use copyin(). + + + Probe Arguments + + + + + + + Argument name + Type + Description + + + + + clientAddr + string + String representing address client connected from + + + clientFD + int + X server's file descriptor for server side of each connection + + + clientId + int + Unique integer identifier for each connection to the + X server + + + clientPid + pid_t + Process id of client, if connection is local + (from getpeerucred()) + + + clientZoneId + zoneid_t + Solaris: Zone id of client, if connection is local + (from getpeerucred()) + + + eventBuffer + uintptr_t + Pointer to buffer containing X event - decode using + structures in + <X11/Xproto.h> + and similar headers for each extension + + + eventCode + uint8_t + Event number of X event + + + resourceId + uint32_t + X resource id (XID) + + + resourceTypeId + uint32_t + Resource type id + + + resourceTypeName + string + String representing X resource type + ("PIXMAP", etc.) + + + resourceValue + uintptr_t + Pointer to data for X resource + + + resultCode + int + Integer code representing result status of request + + + requestBuffer + uintptr_t + Pointer to buffer containing X request - decode using + structures in + <X11/Xproto.h> + and similar headers for each extension + + + requestCode + uint8_t + Request number of X request or Extension + + + requestName + string + Name of X request or Extension + + + requestLength + uint16_t + Length of X request + + + sequenceNumber + uint32_t + Number of X request in in this connection + + + +
+
+
+ + + Examples + + + Counting requests by request name + + + This script simply increments a counter for each different request + made, and when you exit the script (such as by hitting + ControlC + ) prints the counts. + + +#!/usr/sbin/dtrace -s + +Xserver*:::request-start +{ + @counts[copyinstr(arg0)] = count(); +} + + + The output from a short run may appear as: + + QueryPointer 1 + CreatePixmap 2 + FreePixmap 2 + PutImage 2 + ChangeGC 10 + CopyArea 10 + CreateGC 14 + FreeGC 14 + RENDER 28 + SetClipRectangles 40 + + + + + This can be rewritten slightly to cache the string containing the name + of the request since it will be reused many times, instead of copying + it over and over from the kernel: + + +#!/usr/sbin/dtrace -s + +string Xrequest[uintptr_t]; + +Xserver*:::request-start +/Xrequest[arg0] == ""/ +{ + Xrequest[arg0] = copyinstr(arg0); +} + +Xserver*:::request-start +{ + @counts[Xrequest[arg0]] = count(); +} + + + + + + Get average CPU time per request + + This script records the CPU time used between the probes at + the start and end of each request and aggregates it per request type. + + +#!/usr/sbin/dtrace -s + +Xserver*:::request-start +{ + reqstart = vtimestamp; +} + +Xserver*:::request-done +{ + @times[copyinstr(arg0)] = avg(vtimestamp - reqstart); +} + + + The output from a sample run might look like: + + + ChangeGC 889 + MapWindow 907 + SetClipRectangles 1319 + PolyPoint 1413 + PolySegment 1434 + PolyRectangle 1828 + FreeCursor 1895 + FreeGC 1950 + CreateGC 2244 + FreePixmap 2246 + GetInputFocus 2249 + TranslateCoords 8508 + QueryTree 8846 + GetGeometry 9948 + CreatePixmap 12111 + AllowEvents 14090 + GrabServer 14791 + MIT-SCREEN-SAVER 16747 + ConfigureWindow 22917 + SetInputFocus 28521 + PutImage 240841 + + + + + + + Monitoring clients that connect and disconnect + + + This script simply prints information about each client that + connects or disconnects from the server while it is running. + Since the provider is specified as Xserver$1 instead + of Xserver* like previous examples, it won't monitor + all Xserver processes running on the machine, but instead expects + the process id of the X server to monitor to be specified as the + argument to the script. + + +#!/usr/sbin/dtrace -s + +Xserver$1:::client-connect +{ + printf("** Client Connect: id %d\n", arg0); +} + +Xserver$1:::client-auth +{ + printf("** Client auth'ed: id %d => %s pid %d\n", + arg0, copyinstr(arg1), arg2); +} + +Xserver$1:::client-disconnect +{ + printf("** Client Disconnect: id %d\n", arg0); +} + + + A sample run: + + +# ./foo.d 5790 +dtrace: script './foo.d' matched 4 probes +CPU ID FUNCTION:NAME + 0 15774 CloseDownClient:client-disconnect ** Client Disconnect: id 65 + + 2 15774 CloseDownClient:client-disconnect ** Client Disconnect: id 64 + + 0 15773 EstablishNewConnections:client-connect ** Client Connect: id 64 + + 0 15772 AuthAudit:client-auth ** Client auth'ed: id 64 => local host pid 2034 + + 0 15773 EstablishNewConnections:client-connect ** Client Connect: id 65 + + 0 15772 AuthAudit:client-auth ** Client auth'ed: id 65 => local host pid 2034 + + 0 15774 CloseDownClient:client-disconnect ** Client Disconnect: id 64 + + + + + + + + Monitoring clients creating Pixmaps + + + This script can be used to determine which clients are creating + pixmaps in the X server, printing information about each client + as it connects to help trace it back to the program on the other + end of the X connection. + + +#!/usr/sbin/dtrace -qs + +string Xrequest[uintptr_t]; +string Xrestype[uintptr_t]; + +Xserver$1:::request-start +/Xrequest[arg0] == ""/ +{ + Xrequest[arg0] = copyinstr(arg0); +} + +Xserver$1:::resource-alloc +/arg3 != 0 && Xrestype[arg3] == ""/ +{ + Xrestype[arg3] = copyinstr(arg3); +} + + +Xserver$1:::request-start +/Xrequest[arg0] == "X_CreatePixmap"/ +{ + printf("-> %s: client %d\n", Xrequest[arg0], arg3); +} + +Xserver$1:::request-done +/Xrequest[arg0] == "X_CreatePixmap"/ +{ + printf("<- %s: client %d\n", Xrequest[arg0], arg3); +} + +Xserver$1:::resource-alloc +/Xrestype[arg3] == "PIXMAP"/ +{ + printf("** Pixmap alloc: %08x\n", arg0); +} + + +Xserver$1:::resource-free +/Xrestype[arg3] == "PIXMAP"/ +{ + printf("** Pixmap free: %08x\n", arg0); +} + +Xserver$1:::client-connect +{ + printf("** Client Connect: id %d\n", arg0); +} + +Xserver$1:::client-auth +{ + printf("** Client auth'ed: id %d => %s pid %d\n", + arg0, copyinstr(arg1), arg2); +} + +Xserver$1:::client-disconnect +{ + printf("** Client Disconnect: id %d\n", arg0); +} + + + Sample output from a run of this script: + +** Client Connect: id 17 +** Client auth'ed: id 17 => local host pid 20273 +-> X_CreatePixmap: client 17 +** Pixmap alloc: 02200009 +<- X_CreatePixmap: client 17 +-> X_CreatePixmap: client 15 +** Pixmap alloc: 01e00180 +<- X_CreatePixmap: client 15 +-> X_CreatePixmap: client 15 +** Pixmap alloc: 01e00181 +<- X_CreatePixmap: client 15 +-> X_CreatePixmap: client 14 +** Pixmap alloc: 01c004c8 +<- X_CreatePixmap: client 14 +** Pixmap free: 02200009 +** Client Disconnect: id 17 +** Pixmap free: 01e00180 +** Pixmap free: 01e00181 + + + + + + + + + +
+ diff --git a/xserver/doc/xml/xmlrules.in b/xserver/doc/xml/xmlrules.in new file mode 100644 index 000000000..b7fda11c0 --- /dev/null +++ b/xserver/doc/xml/xmlrules.in @@ -0,0 +1,78 @@ +# +# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice (including the next +# paragraph) shall be included in all copies or substantial portions of the +# Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# + +# This file is included by Makefile.am in subdirectories that have +# DocBook XML documentation files. +# +# No files are automatically distributed or installed by this subset of rules +# Any files to be distributed or installed would be listed in the including +# Makefile.am + +TXT_FILES = $(XML_FILES:%.xml=%.txt) +HTML_FILES = $(XML_FILES:%.xml=%.html) +PDF_FILES = $(XML_FILES:%.xml=%.pdf) + +BUILT_DOC_FILES = + +SUFFIXES = .xml .txt .html .pdf + +XML_ENT_DIR = $(abs_top_builddir)/doc/xml +XMLTO_FLAGS = --searchpath $(XML_ENT_DIR) + +if HAVE_STYLESHEETS +XMLTO_FLAGS += -m $(XSL_STYLESHEET) +BUILT_DOC_FILES += xorg.css + +xorg.css: $(STYLESHEET_SRCDIR)/xorg.css + $(AM_V_GEN)cp -pf $(STYLESHEET_SRCDIR)/xorg.css $@ +endif + +if HAVE_XMLTO +if HAVE_XMLTO_TEXT +BUILT_DOC_FILES += $(TXT_FILES) +.xml.txt: + @rm -f $@ + $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) txt $< +endif + +BUILT_DOC_FILES += $(HTML_FILES) +.xml.html: + @rm -f $@ + $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) xhtml-nochunks $< + +if HAVE_FOP +BUILT_DOC_FILES += $(PDF_FILES) +.xml.pdf: + @rm -f $@ + $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) --with-fop pdf $< +endif + +endif + +CLEAN_DOC_FILES = $(TXT_FILES) $(HTML_FILES) $(PDF_FILES) xorg.css + +# All the files we build depend on the entities +$(BUILT_DOC_FILES): $(XML_ENT_DIR)/xserver.ent + +$(XML_ENT_DIR)/xserver.ent: + (cd $(XML_ENT_DIR) && $(MAKE) $(AM_MAKEFLAGS) $(@F)) diff --git a/xserver/doc/xml/xserver.ent.in b/xserver/doc/xml/xserver.ent.in new file mode 100644 index 000000000..5cb4e23d3 --- /dev/null +++ b/xserver/doc/xml/xserver.ent.in @@ -0,0 +1,3 @@ + + + diff --git a/xserver/exa/Makefile.in b/xserver/exa/Makefile.in index 095511dab..b7f145d0e 100644 --- a/xserver/exa/Makefile.in +++ b/xserver/exa/Makefile.in @@ -121,10 +121,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -212,6 +208,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -226,6 +224,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -243,10 +242,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -302,10 +305,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -323,17 +327,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -360,20 +358,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -468,6 +469,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/exa/exa.c b/xserver/exa/exa.c index 590d9a500..fc15c2471 100644 --- a/xserver/exa/exa.c +++ b/xserver/exa/exa.c @@ -37,12 +37,9 @@ #include "exa_priv.h" #include "exa.h" -static int exaScreenPrivateKeyIndex; -DevPrivateKey exaScreenPrivateKey = &exaScreenPrivateKeyIndex; -static int exaPixmapPrivateKeyIndex; -DevPrivateKey exaPixmapPrivateKey = &exaPixmapPrivateKeyIndex; -static int exaGCPrivateKeyIndex; -DevPrivateKey exaGCPrivateKey = &exaGCPrivateKeyIndex; +DevPrivateKeyRec exaScreenPrivateKeyRec; +DevPrivateKeyRec exaPixmapPrivateKeyRec; +DevPrivateKeyRec exaGCPrivateKeyRec; #ifdef MITSHM static ShmFuncs exaShmFuncs = { NULL, NULL }; @@ -161,10 +158,10 @@ exaPixmapDirty (PixmapPtr pPix, int x1, int y1, int x2, int y2) if (box.x1 >= box.x2 || box.y1 >= box.y2) return; - REGION_INIT(pScreen, ®ion, &box, 1); + RegionInit(®ion, &box, 1); DamageRegionAppend(&pPix->drawable, ®ion); DamageRegionProcessPending(&pPix->drawable); - REGION_UNINIT(pScreen, ®ion); + RegionUninit(®ion); } static int @@ -438,6 +435,29 @@ exaFinishAccess(DrawablePtr pDrawable, int index) (*pExaScr->info->FinishAccess) (pPixmap, i); } + +/** + * Helper for things common to all schemes when a pixmap is destroyed + */ +void +exaDestroyPixmap(PixmapPtr pPixmap) +{ + ExaScreenPriv(pPixmap->drawable.pScreen); + int i; + + /* Finish access if it was prepared (e.g. pixmap created during + * software fallback) + */ + for (i = 0; i < EXA_NUM_PREPARE_INDICES; i++) { + if (pExaScr->access[i].pixmap == pPixmap) { + exaFinishAccess(&pPixmap->drawable, i); + pExaScr->access[i].pixmap = NULL; + break; + } + } +} + + /** * Here begins EXA's GC code. * Do not ever access the fb/mi layer directly. @@ -658,7 +678,7 @@ exaBitmapToRegion(PixmapPtr pPix) exaPrepareAccess(&pPix->drawable, EXA_PREPARE_SRC); swap(pExaScr, pScreen, BitmapToRegion); - ret = pScreen->BitmapToRegion(pPix); + ret = (*pScreen->BitmapToRegion)(pPix); swap(pExaScr, pScreen, BitmapToRegion); exaFinishAccess(&pPix->drawable, EXA_PREPARE_SRC); @@ -753,9 +773,7 @@ static Bool exaCloseScreen(int i, ScreenPtr pScreen) { ExaScreenPriv(pScreen); -#ifdef RENDER PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); -#endif if (ps->Glyphs == exaGlyphs) exaGlyphsFini(pScreen); @@ -778,18 +796,14 @@ exaCloseScreen(int i, ScreenPtr pScreen) unwrap(pExaScr, pScreen, ChangeWindowAttributes); unwrap(pExaScr, pScreen, BitmapToRegion); unwrap(pExaScr, pScreen, CreateScreenResources); -#ifdef RENDER - if (ps) { - unwrap(pExaScr, ps, Composite); - if (pExaScr->SavedGlyphs) - unwrap(pExaScr, ps, Glyphs); - unwrap(pExaScr, ps, Trapezoids); - unwrap(pExaScr, ps, Triangles); - unwrap(pExaScr, ps, AddTraps); - } -#endif + unwrap(pExaScr, ps, Composite); + if (pExaScr->SavedGlyphs) + unwrap(pExaScr, ps, Glyphs); + unwrap(pExaScr, ps, Trapezoids); + unwrap(pExaScr, ps, Triangles); + unwrap(pExaScr, ps, AddTraps); - xfree (pExaScr); + free(pExaScr); return (*pScreen->CloseScreen) (i, pScreen); } @@ -800,14 +814,14 @@ exaCloseScreen(int i, ScreenPtr pScreen) * without breaking ABI between EXA and the drivers. The driver's * responsibility is to check beforehand that the EXA module has a matching * major number and sufficient minor. Drivers are responsible for freeing the - * driver structure using xfree(). + * driver structure using free(). * * @return a newly allocated, zero-filled driver structure */ ExaDriverPtr exaDriverAlloc(void) { - return xcalloc(1, sizeof(ExaDriverRec)); + return calloc(1, sizeof(ExaDriverRec)); } /** @@ -825,9 +839,7 @@ exaDriverInit (ScreenPtr pScreen, ExaDriverPtr pScreenInfo) { ExaScreenPrivPtr pExaScr; -#ifdef RENDER PictureScreenPtr ps; -#endif if (!pScreenInfo) return FALSE; @@ -895,11 +907,15 @@ exaDriverInit (ScreenPtr pScreen, pScreenInfo->maxPitchPixels = pScreenInfo->maxX; } -#ifdef RENDER ps = GetPictureScreenIfSet(pScreen); -#endif - pExaScr = xcalloc (sizeof (ExaScreenPrivRec), 1); + if (!dixRegisterPrivateKey(&exaScreenPrivateKeyRec, PRIVATE_SCREEN, 0)) { + LogMessage(X_WARNING, "EXA(%d): Failed to register screen private\n", + pScreen->myNum); + return FALSE; + } + + pExaScr = calloc (sizeof (ExaScreenPrivRec), 1); if (!pExaScr) { LogMessage(X_WARNING, "EXA(%d): Failed to allocate screen private\n", pScreen->myNum); @@ -914,7 +930,7 @@ exaDriverInit (ScreenPtr pScreen, exaDDXDriverInit(pScreen); - if (!dixRequestPrivate(exaGCPrivateKey, sizeof(ExaGCPrivRec))) { + if (!dixRegisterPrivateKey(&exaGCPrivateKeyRec, PRIVATE_GC, sizeof(ExaGCPrivRec))) { LogMessage(X_WARNING, "EXA(%d): Failed to allocate GC private\n", pScreen->myNum); @@ -940,16 +956,17 @@ exaDriverInit (ScreenPtr pScreen, wrap(pExaScr, pScreen, BitmapToRegion, exaBitmapToRegion); wrap(pExaScr, pScreen, CreateScreenResources, exaCreateScreenResources); -#ifdef RENDER if (ps) { wrap(pExaScr, ps, Composite, exaComposite); - if (pScreenInfo->PrepareComposite) + if (pScreenInfo->PrepareComposite) { wrap(pExaScr, ps, Glyphs, exaGlyphs); + } else { + wrap(pExaScr, ps, Glyphs, ExaCheckGlyphs); + } wrap(pExaScr, ps, Trapezoids, exaTrapezoids); wrap(pExaScr, ps, Triangles, exaTriangles); wrap(pExaScr, ps, AddTraps, ExaCheckAddTraps); } -#endif #ifdef MITSHM /* @@ -962,7 +979,7 @@ exaDriverInit (ScreenPtr pScreen, */ if (pExaScr->info->flags & EXA_OFFSCREEN_PIXMAPS) { - if (!dixRequestPrivate(exaPixmapPrivateKey, sizeof(ExaPixmapPrivRec))) { + if (!dixRegisterPrivateKey(&exaPixmapPrivateKeyRec, PRIVATE_PIXMAP, sizeof(ExaPixmapPrivRec))) { LogMessage(X_WARNING, "EXA(%d): Failed to allocate pixmap private\n", pScreen->myNum); diff --git a/xserver/exa/exa_accel.c b/xserver/exa/exa_accel.c index 57029fdc5..6c677c7a1 100644 --- a/xserver/exa/exa_accel.c +++ b/xserver/exa/exa_accel.c @@ -81,7 +81,7 @@ exaFillSpans(DrawablePtr pDrawable, GCPtr pGC, int n, return; } - pextent = REGION_EXTENTS(pGC->pScreen, pClip); + pextent = RegionExtents(pClip); extentX1 = pextent->x1; extentY1 = pextent->y1; extentX2 = pextent->x2; @@ -106,7 +106,7 @@ exaFillSpans(DrawablePtr pDrawable, GCPtr pGC, int n, if (fullX1 >= fullX2) continue; - nbox = REGION_NUM_RECTS (pClip); + nbox = RegionNumRects (pClip); if (nbox == 1) { (*pExaScr->info->Solid) (pPixmap, @@ -115,7 +115,7 @@ exaFillSpans(DrawablePtr pDrawable, GCPtr pGC, int n, } else { - pbox = REGION_RECTS(pClip); + pbox = RegionRects(pClip); while(nbox--) { if (pbox->y1 <= fullY1 && fullY1 < pbox->y2) @@ -192,8 +192,8 @@ exaDoPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y, y += pDrawable->y; pClip = fbGetCompositeClip(pGC); - for (nbox = REGION_NUM_RECTS(pClip), - pbox = REGION_RECTS(pClip); + for (nbox = RegionNumRects(pClip), + pbox = RegionRects(pClip); nbox--; pbox++) { @@ -394,7 +394,7 @@ exaHWCopyNtoN (DrawablePtr pSrcDrawable, exaGetDrawableDeltas (pSrcDrawable, pSrcPixmap, &src_off_x, &src_off_y); exaGetDrawableDeltas (pDstDrawable, pDstPixmap, &dst_off_x, &dst_off_y); - rects = xalloc(nbox * sizeof(xRectangle)); + rects = malloc(nbox * sizeof(xRectangle)); if (rects) { int i; @@ -407,7 +407,7 @@ exaHWCopyNtoN (DrawablePtr pSrcDrawable, rects[i].height = pbox[i].y2 - pbox[i].y1; } - /* This must match the miRegionCopy() logic for reversing rect order */ + /* This must match the RegionCopy() logic for reversing rect order */ if (nbox == 1 || (dx > 0 && dy > 0) || (pDstDrawable != pSrcDrawable && (pDstDrawable->type != DRAWABLE_WINDOW || @@ -416,15 +416,15 @@ exaHWCopyNtoN (DrawablePtr pSrcDrawable, else ordering = CT_UNSORTED; - srcregion = RECTS_TO_REGION(pScreen, nbox, rects, ordering); - xfree(rects); + srcregion = RegionFromRects(nbox, rects, ordering); + free(rects); if (!pGC || !exaGCReadsDestination(pDstDrawable, pGC->planemask, pGC->fillStyle, pGC->alu, pGC->clientClipType)) { - dstregion = REGION_CREATE(pScreen, NullBox, 0); - REGION_COPY(pScreen, dstregion, srcregion); - REGION_TRANSLATE(pScreen, dstregion, dst_off_x - dx - src_off_x, + dstregion = RegionCreate(NullBox, 0); + RegionCopy(dstregion, srcregion); + RegionTranslate(dstregion, dst_off_x - dx - src_off_x, dst_off_y - dy - src_off_y); } } @@ -551,12 +551,12 @@ fallback: out: if (dstregion) { - REGION_UNINIT(pScreen, dstregion); - REGION_DESTROY(pScreen, dstregion); + RegionUninit(dstregion); + RegionDestroy(dstregion); } if (srcregion) { - REGION_UNINIT(pScreen, srcregion); - REGION_DESTROY(pScreen, srcregion); + RegionUninit(srcregion); + RegionDestroy(srcregion); } return ret; @@ -626,7 +626,7 @@ exaPolyPoint(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, return; } - prect = xalloc(sizeof(xRectangle) * npt); + prect = malloc(sizeof(xRectangle) * npt); for (i = 0; i < npt; i++) { prect[i].x = ppt[i].x; prect[i].y = ppt[i].y; @@ -638,7 +638,7 @@ exaPolyPoint(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, prect[i].height = 1; } pGC->ops->PolyFillRect(pDrawable, pGC, npt, prect); - xfree(prect); + free(prect); } /** @@ -667,7 +667,7 @@ exaPolylines(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, return; } - prect = xalloc(sizeof(xRectangle) * (npt - 1)); + prect = malloc(sizeof(xRectangle) * (npt - 1)); x1 = ppt[0].x; y1 = ppt[0].y; /* If we have any non-horizontal/vertical, fall back. */ @@ -681,7 +681,7 @@ exaPolylines(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, } if (x1 != x2 && y1 != y2) { - xfree(prect); + free(prect); ExaCheckPolylines(pDrawable, pGC, mode, npt, ppt); return; } @@ -705,7 +705,7 @@ exaPolylines(DrawablePtr pDrawable, GCPtr pGC, int mode, int npt, y1 = y2; } pGC->ops->PolyFillRect(pDrawable, pGC, npt - 1, prect); - xfree(prect); + free(prect); } /** @@ -737,7 +737,7 @@ exaPolySegment (DrawablePtr pDrawable, GCPtr pGC, int nseg, } } - prect = xalloc(sizeof(xRectangle) * nseg); + prect = malloc(sizeof(xRectangle) * nseg); for (i = 0; i < nseg; i++) { if (pSeg[i].x1 < pSeg[i].x2) { prect[i].x = pSeg[i].x1; @@ -763,7 +763,7 @@ exaPolySegment (DrawablePtr pDrawable, GCPtr pGC, int nseg, } } pGC->ops->PolyFillRect(pDrawable, pGC, nseg, prect); - xfree(prect); + free(prect); } static Bool exaFillRegionSolid (DrawablePtr pDrawable, RegionPtr pRegion, @@ -788,13 +788,13 @@ exaPolyFillRect(DrawablePtr pDrawable, int xoff, yoff; int xorg, yorg; int n; - RegionPtr pReg = RECTS_TO_REGION(pScreen, nrect, prect, CT_UNSORTED); + RegionPtr pReg = RegionFromRects(nrect, prect, CT_UNSORTED); /* Compute intersection of rects and clip region */ - REGION_TRANSLATE(pScreen, pReg, pDrawable->x, pDrawable->y); - REGION_INTERSECT(pScreen, pReg, pClip, pReg); + RegionTranslate(pReg, pDrawable->x, pDrawable->y); + RegionIntersect(pReg, pClip, pReg); - if (!REGION_NUM_RECTS(pReg)) { + if (!RegionNumRects(pReg)) { goto out; } @@ -856,7 +856,7 @@ fallback: xorg = pDrawable->x; yorg = pDrawable->y; - pextent = REGION_EXTENTS(pGC->pScreen, pClip); + pextent = RegionExtents(pClip); extentX1 = pextent->x1; extentY1 = pextent->y1; extentX2 = pextent->x2; @@ -883,7 +883,7 @@ fallback: if ((fullX1 >= fullX2) || (fullY1 >= fullY2)) continue; - n = REGION_NUM_RECTS (pClip); + n = RegionNumRects (pClip); if (n == 1) { (*pExaScr->info->Solid) (pPixmap, @@ -892,7 +892,7 @@ fallback: } else { - pbox = REGION_RECTS(pClip); + pbox = RegionRects(pClip); /* * clip the rectangle to each box in the clip region * this is logically equivalent to calling Intersect(), @@ -927,8 +927,8 @@ fallback: exaMarkSync(pDrawable->pScreen); out: - REGION_UNINIT(pScreen, pReg); - REGION_DESTROY(pScreen, pReg); + RegionUninit(pReg); + RegionDestroy(pReg); } const GCOps exaOps = { @@ -964,14 +964,14 @@ exaCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) dx = ptOldOrg.x - pWin->drawable.x; dy = ptOldOrg.y - pWin->drawable.y; - REGION_TRANSLATE(pWin->drawable.pScreen, prgnSrc, -dx, -dy); + RegionTranslate(prgnSrc, -dx, -dy); - REGION_INIT (pWin->drawable.pScreen, &rgnDst, NullBox, 0); + RegionInit(&rgnDst, NullBox, 0); - REGION_INTERSECT(pWin->drawable.pScreen, &rgnDst, &pWin->borderClip, prgnSrc); + RegionIntersect(&rgnDst, &pWin->borderClip, prgnSrc); #ifdef COMPOSITE if (pPixmap->screen_x || pPixmap->screen_y) - REGION_TRANSLATE (pWin->drawable.pScreen, &rgnDst, + RegionTranslate(&rgnDst, -pPixmap->screen_x, -pPixmap->screen_y); #endif @@ -987,11 +987,11 @@ exaCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) pExaScr->fallback_flags &= ~EXA_ACCEL_COPYWINDOW; fallback: - REGION_UNINIT(pWin->drawable.pScreen, &rgnDst); + RegionUninit(&rgnDst); if (pExaScr->fallback_flags & EXA_FALLBACK_COPYWINDOW) { pExaScr->fallback_flags &= ~EXA_FALLBACK_COPYWINDOW; - REGION_TRANSLATE(pWin->drawable.pScreen, prgnSrc, dx, dy); + RegionTranslate(prgnSrc, dx, dy); ExaCheckCopyWindow(pWin, ptOldOrg, prgnSrc); } } @@ -1007,7 +1007,7 @@ exaFillRegionSolid (DrawablePtr pDrawable, RegionPtr pRegion, Pixel pixel, Bool ret = FALSE; exaGetDrawableDeltas(pDrawable, pPixmap, &xoff, &yoff); - REGION_TRANSLATE(pScreen, pRegion, xoff, yoff); + RegionTranslate(pRegion, xoff, yoff); if (pExaScr->fallback_counter || pExaPixmap->accel_blocked) goto out; @@ -1030,8 +1030,8 @@ exaFillRegionSolid (DrawablePtr pDrawable, RegionPtr pRegion, Pixel pixel, int nbox; BoxPtr pBox; - nbox = REGION_NUM_RECTS (pRegion); - pBox = REGION_RECTS (pRegion); + nbox = RegionNumRects (pRegion); + pBox = RegionRects (pRegion); while (nbox--) { @@ -1060,18 +1060,18 @@ exaFillRegionSolid (DrawablePtr pDrawable, RegionPtr pRegion, Pixel pixel, *(CARD8*)pExaPixmap->sys_ptr = pixel; } - REGION_UNION(pScreen, &pExaPixmap->validSys, &pExaPixmap->validSys, + RegionUnion(&pExaPixmap->validSys, &pExaPixmap->validSys, pRegion); - REGION_UNION(pScreen, &pExaPixmap->validFB, &pExaPixmap->validFB, + RegionUnion(&pExaPixmap->validFB, &pExaPixmap->validFB, pRegion); - REGION_SUBTRACT(pScreen, pending_damage, pending_damage, pRegion); + RegionSubtract(pending_damage, pending_damage, pRegion); } ret = TRUE; } out: - REGION_TRANSLATE(pScreen, pRegion, -xoff, -yoff); + RegionTranslate(pRegion, -xoff, -yoff); return ret; } @@ -1090,8 +1090,8 @@ exaFillRegionTiled (DrawablePtr pDrawable, RegionPtr pRegion, PixmapPtr pTile, ExaPixmapPrivPtr pTileExaPixmap = ExaGetPixmapPriv(pTile); int xoff, yoff; int tileWidth, tileHeight; - int nbox = REGION_NUM_RECTS (pRegion); - BoxPtr pBox = REGION_RECTS (pRegion); + int nbox = RegionNumRects (pRegion); + BoxPtr pBox = RegionRects (pRegion); Bool ret = FALSE; int i; @@ -1137,7 +1137,7 @@ exaFillRegionTiled (DrawablePtr pDrawable, RegionPtr pRegion, PixmapPtr pTile, if ((*pExaScr->info->PrepareCopy) (pTile, pPixmap, 1, 1, alu, planemask)) { if (xoff || yoff) - REGION_TRANSLATE(pScreen, pRegion, xoff, yoff); + RegionTranslate(pRegion, xoff, yoff); for (i = 0; i < nbox; i++) { @@ -1245,7 +1245,7 @@ exaFillRegionTiled (DrawablePtr pDrawable, RegionPtr pRegion, PixmapPtr pTile, exaMarkSync(pDrawable->pScreen); if (xoff || yoff) - REGION_TRANSLATE(pScreen, pRegion, -xoff, -yoff); + RegionTranslate(pRegion, -xoff, -yoff); } return ret; diff --git a/xserver/exa/exa_classic.c b/xserver/exa/exa_classic.c index 9bc369ec1..169ce3aac 100644 --- a/xserver/exa/exa_classic.c +++ b/xserver/exa/exa_classic.c @@ -131,8 +131,8 @@ exaCreatePixmap_classic(ScreenPtr pScreen, int w, int h, int depth, box.y1 = 0; box.x2 = w; box.y2 = h; - REGION_INIT(pScreen, &pExaPixmap->validSys, &box, 0); - REGION_INIT(pScreen, &pExaPixmap->validFB, &box, 0); + RegionInit(&pExaPixmap->validSys, &box, 0); + RegionInit(&pExaPixmap->validFB, &box, 0); exaSetAccelBlock(pExaScr, pExaPixmap, w, h, bpp); @@ -148,7 +148,7 @@ Bool exaModifyPixmapHeader_classic(PixmapPtr pPixmap, int width, int height, int depth, int bitsPerPixel, int devKind, pointer pPixData) { - ScreenPtr pScreen = pPixmap->drawable.pScreen; + ScreenPtr pScreen; ExaScreenPrivPtr pExaScr; ExaPixmapPrivPtr pExaPixmap; Bool ret; @@ -156,6 +156,7 @@ exaModifyPixmapHeader_classic(PixmapPtr pPixmap, int width, int height, int dept if (!pPixmap) return FALSE; + pScreen = pPixmap->drawable.pScreen; pExaScr = ExaGetScreenPriv(pScreen); pExaPixmap = ExaGetPixmapPriv(pPixmap); @@ -220,9 +221,7 @@ exaDestroyPixmap_classic (PixmapPtr pPixmap) { ExaPixmapPriv (pPixmap); - /* During a fallback we must finish access, but we don't know the index. */ - if (pExaScr->fallback_counter) - exaFinishAccess(&pPixmap->drawable, -1); + exaDestroyPixmap(pPixmap); if (pExaPixmap->area) { @@ -236,8 +235,8 @@ exaDestroyPixmap_classic (PixmapPtr pPixmap) pPixmap->devPrivate.ptr = pExaPixmap->sys_ptr; pPixmap->devKind = pExaPixmap->sys_pitch; } - REGION_UNINIT(pPixmap->drawable.pScreen, &pExaPixmap->validSys); - REGION_UNINIT(pPixmap->drawable.pScreen, &pExaPixmap->validFB); + RegionUninit(&pExaPixmap->validSys); + RegionUninit(&pExaPixmap->validFB); } swap(pExaScr, pScreen, DestroyPixmap); diff --git a/xserver/exa/exa_driver.c b/xserver/exa/exa_driver.c index dcf1a9860..a913cfb02 100644 --- a/xserver/exa/exa_driver.c +++ b/xserver/exa/exa_driver.c @@ -126,7 +126,7 @@ Bool exaModifyPixmapHeader_driver(PixmapPtr pPixmap, int width, int height, int depth, int bitsPerPixel, int devKind, pointer pPixData) { - ScreenPtr pScreen = pPixmap->drawable.pScreen; + ScreenPtr pScreen; ExaScreenPrivPtr pExaScr; ExaPixmapPrivPtr pExaPixmap; Bool ret; @@ -134,6 +134,7 @@ exaModifyPixmapHeader_driver(PixmapPtr pPixmap, int width, int height, int depth if (!pPixmap) return FALSE; + pScreen = pPixmap->drawable.pScreen; pExaScr = ExaGetScreenPriv(pScreen); pExaPixmap = ExaGetPixmapPriv(pPixmap); @@ -192,9 +193,7 @@ exaDestroyPixmap_driver (PixmapPtr pPixmap) { ExaPixmapPriv (pPixmap); - /* During a fallback we must finish access, but we don't know the index. */ - if (pExaScr->fallback_counter) - exaFinishAccess(&pPixmap->drawable, -1); + exaDestroyPixmap(pPixmap); if (pExaPixmap->driverPriv) pExaScr->info->DestroyPixmap(pScreen, pExaPixmap->driverPriv); diff --git a/xserver/exa/exa_glyphs.c b/xserver/exa/exa_glyphs.c index fd14e9b87..5c46ec901 100644 --- a/xserver/exa/exa_glyphs.c +++ b/xserver/exa/exa_glyphs.c @@ -127,15 +127,11 @@ exaUnrealizeGlyphCaches(ScreenPtr pScreen, cache->picture = NULL; } - if (cache->hashEntries) { - xfree(cache->hashEntries); - cache->hashEntries = NULL; - } + free(cache->hashEntries); + cache->hashEntries = NULL; - if (cache->glyphs) { - xfree(cache->glyphs); - cache->glyphs = NULL; - } + free(cache->glyphs); + cache->glyphs = NULL; cache->glyphCount = 0; } } @@ -213,8 +209,8 @@ exaRealizeGlyphCaches(ScreenPtr pScreen, cache->picture = pPicture; cache->picture->refcnt++; - cache->hashEntries = xalloc(sizeof(int) * cache->hashSize); - cache->glyphs = xalloc(sizeof(ExaCachedGlyphRec) * cache->size); + cache->hashEntries = malloc(sizeof(int) * cache->hashSize); + cache->glyphs = malloc(sizeof(ExaCachedGlyphRec) * cache->size); cache->glyphCount = 0; if (!cache->hashEntries || !cache->glyphs) diff --git a/xserver/exa/exa_migration_classic.c b/xserver/exa/exa_migration_classic.c index 871679ffc..6c49fb798 100644 --- a/xserver/exa/exa_migration_classic.c +++ b/xserver/exa/exa_migration_classic.c @@ -78,8 +78,8 @@ exaPixmapIsDirty (PixmapPtr pPix) if (!pExaPixmap->pDamage) return FALSE; - return REGION_NOTEMPTY (pScreen, DamageRegion(pExaPixmap->pDamage)) || - !REGION_EQUAL(pScreen, &pExaPixmap->validSys, &pExaPixmap->validFB); + return RegionNotEmpty(DamageRegion(pExaPixmap->pDamage)) || + !RegionEqual(&pExaPixmap->validSys, &pExaPixmap->validFB); } /** @@ -123,22 +123,22 @@ exaCopyDirty(ExaMigrationPtr migrate, RegionPtr pValidDst, RegionPtr pValidSrc, /* Damaged bits are valid in current copy but invalid in other one */ if (pExaPixmap->use_gpu_copy) { - REGION_UNION(pScreen, &pExaPixmap->validFB, &pExaPixmap->validFB, + RegionUnion(&pExaPixmap->validFB, &pExaPixmap->validFB, damage); - REGION_SUBTRACT(pScreen, &pExaPixmap->validSys, &pExaPixmap->validSys, + RegionSubtract(&pExaPixmap->validSys, &pExaPixmap->validSys, damage); } else { - REGION_UNION(pScreen, &pExaPixmap->validSys, &pExaPixmap->validSys, + RegionUnion(&pExaPixmap->validSys, &pExaPixmap->validSys, damage); - REGION_SUBTRACT(pScreen, &pExaPixmap->validFB, &pExaPixmap->validFB, + RegionSubtract(&pExaPixmap->validFB, &pExaPixmap->validFB, damage); } - REGION_EMPTY(pScreen, damage); + RegionEmpty(damage); /* Copy bits valid in source but not in destination */ - REGION_NULL(pScreen, &CopyReg); - REGION_SUBTRACT(pScreen, &CopyReg, pValidSrc, pValidDst); + RegionNull(&CopyReg); + RegionSubtract(&CopyReg, pValidSrc, pValidDst); if (migrate->as_dst) { ExaScreenPriv (pPixmap->drawable.pScreen); @@ -153,7 +153,7 @@ exaCopyDirty(ExaMigrationPtr migrate, RegionPtr pValidDst, RegionPtr pValidSrc, RegionPtr pending_damage = DamagePendingRegion(pExaPixmap->pDamage); #if DEBUG_MIGRATE - if (REGION_NIL(pending_damage)) { + if (RegionNil(pending_damage)) { static Bool firsttime = TRUE; if (firsttime) { @@ -167,23 +167,23 @@ exaCopyDirty(ExaMigrationPtr migrate, RegionPtr pValidDst, RegionPtr pValidSrc, * rects by filling it up to the extents of the union of the * destination valid region and the pending damage region. */ - if (REGION_NUM_RECTS(pValidDst) > 10) { + if (RegionNumRects(pValidDst) > 10) { BoxRec box; BoxPtr pValidExt, pDamageExt; RegionRec closure; - pValidExt = REGION_EXTENTS(pScreen, pValidDst); - pDamageExt = REGION_EXTENTS(pScreen, pending_damage); + pValidExt = RegionExtents(pValidDst); + pDamageExt = RegionExtents(pending_damage); box.x1 = min(pValidExt->x1, pDamageExt->x1); box.y1 = min(pValidExt->y1, pDamageExt->y1); box.x2 = max(pValidExt->x2, pDamageExt->x2); box.y2 = max(pValidExt->y2, pDamageExt->y2); - REGION_INIT(pScreen, &closure, &box, 0); - REGION_INTERSECT(pScreen, &CopyReg, &CopyReg, &closure); + RegionInit(&closure, &box, 0); + RegionIntersect(&CopyReg, &CopyReg, &closure); } else - REGION_INTERSECT(pScreen, &CopyReg, &CopyReg, pending_damage); + RegionIntersect(&CopyReg, &CopyReg, pending_damage); } /* The caller may provide a region to be subtracted from the calculated @@ -191,17 +191,17 @@ exaCopyDirty(ExaMigrationPtr migrate, RegionPtr pValidDst, RegionPtr pValidSrc, * contribute to the result of the operation. */ if (migrate->pReg) - REGION_SUBTRACT(pScreen, &CopyReg, &CopyReg, migrate->pReg); + RegionSubtract(&CopyReg, &CopyReg, migrate->pReg); } else { /* The caller may restrict the region to be migrated for source pixmaps * to what's relevant for the operation. */ if (migrate->pReg) - REGION_INTERSECT(pScreen, &CopyReg, &CopyReg, migrate->pReg); + RegionIntersect(&CopyReg, &CopyReg, migrate->pReg); } - pBox = REGION_RECTS(&CopyReg); - nbox = REGION_NUM_RECTS(&CopyReg); + pBox = RegionRects(&CopyReg); + nbox = RegionNumRects(&CopyReg); save_use_gpu_copy = pExaPixmap->use_gpu_copy; save_pitch = pPixmap->devKind; @@ -252,13 +252,13 @@ exaCopyDirty(ExaMigrationPtr migrate, RegionPtr pValidDst, RegionPtr pValidSrc, * removing parts of it which are also in the destination valid region. * Removing anything beyond that would lead to data loss. */ - if (REGION_NUM_RECTS(pValidSrc) > 20) - REGION_SUBTRACT(pScreen, pValidSrc, pValidSrc, pValidDst); + if (RegionNumRects(pValidSrc) > 20) + RegionSubtract(pValidSrc, pValidSrc, pValidDst); /* The copied bits are now valid in destination */ - REGION_UNION(pScreen, pValidDst, pValidDst, &CopyReg); + RegionUnion(pValidDst, pValidDst, &CopyReg); - REGION_UNINIT(pScreen, &CopyReg); + RegionUninit(&CopyReg); if (access_prepared) exaFinishAccess(&pPixmap->drawable, fallback_index); @@ -440,7 +440,7 @@ exaPixmapSave (ScreenPtr pScreen, ExaOffscreenArea *area) /* Mark all FB bits as invalid, so all valid system bits get copied to FB * next time */ - REGION_EMPTY(pPixmap->drawable.pScreen, &pExaPixmap->validFB); + RegionEmpty(&pExaPixmap->validFB); } /** @@ -531,15 +531,15 @@ exaAssertNotDirty (PixmapPtr pPixmap) if (exaPixmapIsPinned(pPixmap) || pExaPixmap->area == NULL) return ret; - REGION_NULL(pScreen, &ValidReg); - REGION_INTERSECT(pScreen, &ValidReg, &pExaPixmap->validFB, + RegionNull(&ValidReg); + RegionIntersect(&ValidReg, &pExaPixmap->validFB, &pExaPixmap->validSys); - nbox = REGION_NUM_RECTS(&ValidReg); + nbox = RegionNumRects(&ValidReg); if (!nbox) goto out; - pBox = REGION_RECTS(&ValidReg); + pBox = RegionRects(&ValidReg); dst_pitch = pExaPixmap->sys_pitch; src_pitch = pExaPixmap->fb_pitch; @@ -586,7 +586,7 @@ skip: pPixmap->devKind = save_pitch; out: - REGION_UNINIT(pScreen, &ValidReg); + RegionUninit(&ValidReg); return ret; } diff --git a/xserver/exa/exa_mixed.c b/xserver/exa/exa_mixed.c index 21cc3bd13..ef20eb502 100644 --- a/xserver/exa/exa_mixed.c +++ b/xserver/exa/exa_mixed.c @@ -124,7 +124,7 @@ Bool exaModifyPixmapHeader_mixed(PixmapPtr pPixmap, int width, int height, int depth, int bitsPerPixel, int devKind, pointer pPixData) { - ScreenPtr pScreen = pPixmap->drawable.pScreen; + ScreenPtr pScreen; ExaScreenPrivPtr pExaScr; ExaPixmapPrivPtr pExaPixmap; Bool ret, has_gpu_copy; @@ -132,6 +132,7 @@ exaModifyPixmapHeader_mixed(PixmapPtr pPixmap, int width, int height, int depth, if (!pPixmap) return FALSE; + pScreen = pPixmap->drawable.pScreen; pExaScr = ExaGetScreenPriv(pScreen); pExaPixmap = ExaGetPixmapPriv(pPixmap); @@ -179,7 +180,7 @@ exaModifyPixmapHeader_mixed(PixmapPtr pPixmap, int width, int height, int depth, exaSetAccelBlock(pExaScr, pExaPixmap, width, height, bitsPerPixel); - REGION_EMPTY(pScreen, &pExaPixmap->validFB); + RegionEmpty(&pExaPixmap->validFB); } /* Need to re-create system copy if there's also a GPU copy */ @@ -191,7 +192,7 @@ exaModifyPixmapHeader_mixed(PixmapPtr pPixmap, int width, int height, int depth, DamageUnregister(&pPixmap->drawable, pExaPixmap->pDamage); DamageDestroy(pExaPixmap->pDamage); pExaPixmap->pDamage = NULL; - REGION_EMPTY(pScreen, &pExaPixmap->validSys); + RegionEmpty(&pExaPixmap->validSys); if (pExaScr->deferred_mixed_pixmap == pPixmap) pExaScr->deferred_mixed_pixmap = NULL; @@ -244,9 +245,7 @@ exaDestroyPixmap_mixed(PixmapPtr pPixmap) { ExaPixmapPriv (pPixmap); - /* During a fallback we must finish access, but we don't know the index. */ - if (pExaScr->fallback_counter) - exaFinishAccess(&pPixmap->drawable, -1); + exaDestroyPixmap(pPixmap); if (pExaScr->deferred_mixed_pixmap == pPixmap) pExaScr->deferred_mixed_pixmap = NULL; @@ -256,8 +255,7 @@ exaDestroyPixmap_mixed(PixmapPtr pPixmap) pExaPixmap->driverPriv = NULL; if (pExaPixmap->pDamage) { - if (pExaPixmap->sys_ptr) - free(pExaPixmap->sys_ptr); + free(pExaPixmap->sys_ptr); pExaPixmap->sys_ptr = NULL; pExaPixmap->pDamage = NULL; } diff --git a/xserver/exa/exa_offscreen.c b/xserver/exa/exa_offscreen.c index e3a9ab2f6..5abe3b891 100644 --- a/xserver/exa/exa_offscreen.c +++ b/xserver/exa/exa_offscreen.c @@ -245,7 +245,7 @@ exaOffscreenAlloc (ScreenPtr pScreen, int size, int align, /* save extra space in new area */ if (real_size < area->size) { - ExaOffscreenArea *new_area = xalloc (sizeof (ExaOffscreenArea)); + ExaOffscreenArea *new_area = malloc(sizeof (ExaOffscreenArea)); if (!new_area) return NULL; new_area->base_offset = area->base_offset; @@ -408,7 +408,7 @@ ExaOffscreenMerge (ExaScreenPrivPtr pExaScr, ExaOffscreenArea *area) area->next->prev = area; else pExaScr->info->offScreenAreas->prev = area; - xfree (next); + free(next); pExaScr->numOffscreenAvailable--; } @@ -655,7 +655,7 @@ exaOffscreenInit (ScreenPtr pScreen) ExaOffscreenArea *area; /* Allocate a big free area */ - area = xalloc (sizeof (ExaOffscreenArea)); + area = malloc(sizeof (ExaOffscreenArea)); if (!area) return FALSE; @@ -691,6 +691,6 @@ ExaOffscreenFini (ScreenPtr pScreen) while ((area = pExaScr->info->offScreenAreas)) { pExaScr->info->offScreenAreas = area->next; - xfree (area); + free(area); } } diff --git a/xserver/exa/exa_priv.h b/xserver/exa/exa_priv.h index 21d964683..e5d90d468 100644 --- a/xserver/exa/exa_priv.h +++ b/xserver/exa/exa_priv.h @@ -50,10 +50,8 @@ #include "dix.h" #include "fb.h" #include "fboverlay.h" -#ifdef RENDER #include "fbpict.h" #include "glyphstr.h" -#endif #include "damage.h" #define DEBUG_TRACE_FALL 0 @@ -166,13 +164,11 @@ typedef struct { CreateScreenResourcesProcPtr SavedCreateScreenResources; ModifyPixmapHeaderProcPtr SavedModifyPixmapHeader; SourceValidateProcPtr SavedSourceValidate; -#ifdef RENDER CompositeProcPtr SavedComposite; TrianglesProcPtr SavedTriangles; GlyphsProcPtr SavedGlyphs; TrapezoidsProcPtr SavedTrapezoids; AddTrapsProcPtr SavedAddTraps; -#endif void (*do_migration) (ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel); Bool (*pixmap_has_gpu_copy) (PixmapPtr pPixmap); void (*do_move_in_pixmap) (PixmapPtr pPixmap); @@ -225,9 +221,13 @@ typedef struct { (PixmapWidthPaddingInfo[d].padRoundUp+1))) #endif -extern DevPrivateKey exaScreenPrivateKey; -extern DevPrivateKey exaPixmapPrivateKey; -extern DevPrivateKey exaGCPrivateKey; +extern DevPrivateKeyRec exaScreenPrivateKeyRec; +#define exaScreenPrivateKey (&exaScreenPrivateKeyRec) +extern DevPrivateKeyRec exaPixmapPrivateKeyRec; +#define exaPixmapPrivateKey (&exaPixmapPrivateKeyRec) +extern DevPrivateKeyRec exaGCPrivateKeyRec; +#define exaGCPrivateKey (&exaGCPrivateKeyRec) + #define ExaGetScreenPriv(s) ((ExaScreenPrivPtr)dixLookupPrivate(&(s)->devPrivates, exaScreenPrivateKey)) #define ExaScreenPriv(s) ExaScreenPrivPtr pExaScr = ExaGetScreenPriv(s) @@ -499,7 +499,6 @@ exaCopyNtoN (DrawablePtr pSrcDrawable, extern const GCOps exaOps; -#ifdef RENDER void ExaCheckComposite (CARD8 op, PicturePtr pSrc, @@ -513,7 +512,17 @@ ExaCheckComposite (CARD8 op, INT16 yDst, CARD16 width, CARD16 height); -#endif + +void +ExaCheckGlyphs (CARD8 op, + PicturePtr pSrc, + PicturePtr pDst, + PictFormatPtr maskFormat, + INT16 xSrc, + INT16 ySrc, + int nlist, + GlyphListPtr list, + GlyphPtr *glyphs); /* exa_offscreen.c */ void @@ -541,6 +550,9 @@ exaPrepareAccess(DrawablePtr pDrawable, int index); void exaFinishAccess(DrawablePtr pDrawable, int index); +void +exaDestroyPixmap(PixmapPtr pPixmap); + void exaPixmapDirty(PixmapPtr pPix, int x1, int y1, int x2, int y2); diff --git a/xserver/exa/exa_render.c b/xserver/exa/exa_render.c index 1b68e1cdc..6f2af8a8f 100644 --- a/xserver/exa/exa_render.c +++ b/xserver/exa/exa_render.c @@ -30,7 +30,6 @@ #include "exa_priv.h" -#ifdef RENDER #include "mipict.h" #if DEBUG_TRACE_FALL @@ -293,7 +292,7 @@ exaTryDriverSolidFill(PicturePtr pSrc, exaGetDrawableDeltas (pDst->pDrawable, pDstPix, &dst_off_x, &dst_off_y); - REGION_TRANSLATE(pScreen, ®ion, dst_off_x, dst_off_y); + RegionTranslate(®ion, dst_off_x, dst_off_y); if (pSrc->pDrawable) { pSrcPix = exaGetDrawablePixmap (pSrc->pDrawable); @@ -306,7 +305,7 @@ exaTryDriverSolidFill(PicturePtr pSrc, !exaGetPixelFromRGBA(&pixel, red, green, blue, alpha, pDst->pFormat)) { - REGION_UNINIT(pDst->pDrawable->pScreen, ®ion); + RegionUninit(®ion); return -1; } @@ -321,18 +320,18 @@ exaTryDriverSolidFill(PicturePtr pSrc, } if (!exaPixmapHasGpuCopy(pDstPix)) { - REGION_UNINIT(pDst->pDrawable->pScreen, ®ion); + RegionUninit(®ion); return 0; } if (!(*pExaScr->info->PrepareSolid) (pDstPix, GXcopy, 0xffffffff, pixel)) { - REGION_UNINIT(pDst->pDrawable->pScreen, ®ion); + RegionUninit(®ion); return -1; } - nbox = REGION_NUM_RECTS(®ion); - pbox = REGION_RECTS(®ion); + nbox = RegionNumRects(®ion); + pbox = RegionRects(®ion); while (nbox--) { @@ -343,7 +342,7 @@ exaTryDriverSolidFill(PicturePtr pSrc, (*pExaScr->info->DoneSolid) (pDstPix); exaMarkSync(pDst->pDrawable->pScreen); - REGION_UNINIT(pDst->pDrawable->pScreen, ®ion); + RegionUninit(®ion); return 1; } @@ -470,10 +469,10 @@ exaTryDriverCompositeRects(CARD8 op, rects->width, rects->height)) goto next_rect; - REGION_TRANSLATE(pScreen, ®ion, dst_off_x, dst_off_y); + RegionTranslate(®ion, dst_off_x, dst_off_y); - nbox = REGION_NUM_RECTS(®ion); - pbox = REGION_RECTS(®ion); + nbox = RegionNumRects(®ion); + pbox = RegionRects(®ion); xMask = xMask + mask_off_x - xDst - dst_off_x; yMask = yMask + mask_off_y - yDst - dst_off_y; @@ -495,7 +494,7 @@ exaTryDriverCompositeRects(CARD8 op, } next_rect: - REGION_UNINIT(pDst->pDrawable->pScreen, ®ion); + RegionUninit(®ion); rects++; } @@ -576,11 +575,11 @@ exaCompositeRects(CARD8 op, * (see use of DamagePendingRegion in exaCopyDirty) */ - REGION_INIT(pScreen, ®ion, &box, 1); + RegionInit(®ion, &box, 1); DamageRegionAppend(pDst->pDrawable, ®ion); - REGION_UNINIT(pScreen, ®ion); + RegionUninit(®ion); } /************************************************************/ @@ -704,7 +703,7 @@ exaTryDriverComposite(CARD8 op, exaGetDrawableDeltas (pDst->pDrawable, pDstPix, &dst_off_x, &dst_off_y); - REGION_TRANSLATE(pScreen, ®ion, dst_off_x, dst_off_y); + RegionTranslate(®ion, dst_off_x, dst_off_y); if (pExaScr->do_migration) { ExaMigrationRec pixmaps[3]; @@ -738,7 +737,7 @@ exaTryDriverComposite(CARD8 op, if (pSrcPix) { pSrcPix = exaGetOffscreenPixmap (pSrc->pDrawable, &src_off_x, &src_off_y); if (!pSrcPix) { - REGION_UNINIT(pDst->pDrawable->pScreen, ®ion); + RegionUninit(®ion); return 0; } } @@ -747,25 +746,25 @@ exaTryDriverComposite(CARD8 op, pMaskPix = exaGetOffscreenPixmap (pMask->pDrawable, &mask_off_x, &mask_off_y); if (!pMaskPix) { - REGION_UNINIT(pDst->pDrawable->pScreen, ®ion); + RegionUninit(®ion); return 0; } } if (!exaPixmapHasGpuCopy(pDstPix)) { - REGION_UNINIT(pDst->pDrawable->pScreen, ®ion); + RegionUninit(®ion); return 0; } if (!(*pExaScr->info->PrepareComposite) (op, pSrc, pMask, pDst, pSrcPix, pMaskPix, pDstPix)) { - REGION_UNINIT(pDst->pDrawable->pScreen, ®ion); + RegionUninit(®ion); return -1; } - nbox = REGION_NUM_RECTS(®ion); - pbox = REGION_RECTS(®ion); + nbox = RegionNumRects(®ion); + pbox = RegionRects(®ion); xMask = xMask + mask_off_x - xDst - dst_off_x; yMask = yMask + mask_off_y - yDst - dst_off_y; @@ -789,7 +788,7 @@ exaTryDriverComposite(CARD8 op, (*pExaScr->info->DoneComposite) (pDstPix); exaMarkSync(pDst->pDrawable->pScreen); - REGION_UNINIT(pDst->pDrawable->pScreen, ®ion); + RegionUninit(®ion); return 1; } @@ -954,9 +953,9 @@ exaComposite(CARD8 op, goto done; ret = exaHWCopyNtoN(pSrc->pDrawable, pDst->pDrawable, NULL, - REGION_RECTS(®ion), REGION_NUM_RECTS(®ion), + RegionRects(®ion), RegionNumRects(®ion), xSrc - xDst, ySrc - yDst, FALSE, FALSE); - REGION_UNINIT(pDst->pDrawable->pScreen, ®ion); + RegionUninit(®ion); /* Reset values to their original values. */ xDst -= pDst->pDrawable->x; @@ -1006,7 +1005,7 @@ exaComposite(CARD8 op, (PixmapPtr)pSrc->pDrawable, &patOrg, FB_ALLONES, GXcopy, CT_NONE); - REGION_UNINIT(pDst->pDrawable->pScreen, ®ion); + RegionUninit(®ion); if (ret) goto done; @@ -1072,7 +1071,6 @@ done: if (pMask) pMask->repeat = saveMaskRepeat; } -#endif /** * Same as miCreateAlphaPicture, except it uses ExaCheckPolyFillRect instead diff --git a/xserver/exa/exa_unaccel.c b/xserver/exa/exa_unaccel.c index 8d7009813..a078cc114 100644 --- a/xserver/exa/exa_unaccel.c +++ b/xserver/exa/exa_unaccel.c @@ -23,9 +23,7 @@ #include "exa_priv.h" -#ifdef RENDER #include "mipict.h" -#endif /* * These functions wrap the low-level fb rendering functions and @@ -133,10 +131,10 @@ ExaCheckCopyNtoN (DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, PixmapPtr pPixmap = exaGetDrawablePixmap(pSrc); exaGetDrawableDeltas(pSrc, pPixmap, &xoff, &yoff); - REGION_INIT(pScreen, ®, pbox, nbox); - REGION_TRANSLATE(pScreen, ®, xoff + dx, yoff + dy); + RegionInit(®, pbox, nbox); + RegionTranslate(®, xoff + dx, yoff + dy); pExaScr->prepare_access_reg(pPixmap, EXA_PREPARE_SRC, ®); - REGION_UNINIT(pScreen, ®); + RegionUninit(®); } else exaPrepareAccess (pSrc, EXA_PREPARE_SRC); @@ -146,10 +144,10 @@ ExaCheckCopyNtoN (DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC, PixmapPtr pPixmap = exaGetDrawablePixmap(pDst); exaGetDrawableDeltas(pSrc, pPixmap, &xoff, &yoff); - REGION_INIT(pScreen, ®, pbox, nbox); - REGION_TRANSLATE(pScreen, ®, xoff, yoff); + RegionInit(®, pbox, nbox); + RegionTranslate(®, xoff, yoff); pExaScr->prepare_access_reg(pPixmap, EXA_PREPARE_DEST, ®); - REGION_UNINIT(pScreen, ®); + RegionUninit(®); } else exaPrepareAccess (pDst, EXA_PREPARE_DEST); @@ -190,9 +188,9 @@ ExaFallbackPrepareReg(DrawablePtr pDrawable, box.x2 = box.x1 + width; box.y2 = box.y1 + height; - REGION_INIT(pScreen, ®, &box, 1); + RegionInit(®, &box, 1); pExaScr->prepare_access_reg(pPixmap, index, ®); - REGION_UNINIT(pScreen, ®); + RegionUninit(®); } else exaPrepareAccess(pDrawable, index); } @@ -384,9 +382,9 @@ ExaCheckCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) int xoff, yoff; exaGetDrawableDeltas(&pWin->drawable, pPixmap, &xoff, &yoff); - REGION_TRANSLATE(pScreen, prgnSrc, xoff, yoff); + RegionTranslate(prgnSrc, xoff, yoff); pExaScr->prepare_access_reg(pPixmap, EXA_PREPARE_SRC, prgnSrc); - REGION_TRANSLATE(pScreen, prgnSrc, -xoff, -yoff); + RegionTranslate(prgnSrc, -xoff, -yoff); } else exaPrepareAccess(pDrawable, EXA_PREPARE_SRC); @@ -460,9 +458,9 @@ ExaSrcValidate(DrawablePtr pDrawable, dst = (pExaScr->srcPix == pPix) ? &pExaScr->srcReg : &pExaScr->maskReg; - REGION_INIT(pScreen, ®, &box, 1); - REGION_UNION(pScreen, dst, dst, ®); - REGION_UNINIT(pScreen, ®); + RegionInit(®, &box, 1); + RegionUnion(dst, dst, ®); + RegionUninit(®); if (pExaScr->SavedSourceValidate) { swap(pExaScr, pScreen, SourceValidate); @@ -497,30 +495,30 @@ ExaPrepareCompositeReg(ScreenPtr pScreen, Bool ret; - REGION_NULL(pScreen, ®ion); + RegionNull(®ion); if (pSrc->pDrawable) { pSrcPix = exaGetDrawablePixmap(pSrc->pDrawable); - REGION_NULL(pScreen, &pExaScr->srcReg); + RegionNull(&pExaScr->srcReg); srcReg = &pExaScr->srcReg; pExaScr->srcPix = pSrcPix; if (pSrc != pDst) - REGION_TRANSLATE(pScreen, pSrc->pCompositeClip, + RegionTranslate(pSrc->pCompositeClip, -pSrc->pDrawable->x, -pSrc->pDrawable->y); } if (pMask && pMask->pDrawable) { pMaskPix = exaGetDrawablePixmap(pMask->pDrawable); - REGION_NULL(pScreen, &pExaScr->maskReg); + RegionNull(&pExaScr->maskReg); maskReg = &pExaScr->maskReg; if (pMask != pDst && pMask != pSrc) - REGION_TRANSLATE(pScreen, pMask->pCompositeClip, + RegionTranslate(pMask->pCompositeClip, -pMask->pDrawable->x, -pMask->pDrawable->y); } - REGION_TRANSLATE(pScreen, pDst->pCompositeClip, + RegionTranslate(pDst->pCompositeClip, -pDst->pDrawable->x, -pDst->pDrawable->y); @@ -533,23 +531,23 @@ ExaPrepareCompositeReg(ScreenPtr pScreen, width, height); swap(pExaScr, pScreen, SourceValidate); - REGION_TRANSLATE(pScreen, pDst->pCompositeClip, + RegionTranslate(pDst->pCompositeClip, pDst->pDrawable->x, pDst->pDrawable->y); if (pSrc->pDrawable && pSrc != pDst) - REGION_TRANSLATE(pScreen, pSrc->pCompositeClip, + RegionTranslate(pSrc->pCompositeClip, pSrc->pDrawable->x, pSrc->pDrawable->y); if (pMask && pMask->pDrawable && pMask != pDst && pMask != pSrc) - REGION_TRANSLATE(pScreen, pMask->pCompositeClip, + RegionTranslate(pMask->pCompositeClip, pMask->pDrawable->x, pMask->pDrawable->y); if (!ret) { if (srcReg) - REGION_UNINIT(pScreen, srcReg); + RegionUninit(srcReg); if (maskReg) - REGION_UNINIT(pScreen, maskReg); + RegionUninit(maskReg); return FALSE; } @@ -579,9 +577,9 @@ ExaPrepareCompositeReg(ScreenPtr pScreen, maskReg); if (srcReg) - REGION_UNINIT(pScreen, srcReg); + RegionUninit(srcReg); if (maskReg) - REGION_UNINIT(pScreen, maskReg); + RegionUninit(maskReg); pDstPix = exaGetDrawablePixmap(pDst->pDrawable); if (!exaOpReadsDestination(op)) { @@ -589,7 +587,7 @@ ExaPrepareCompositeReg(ScreenPtr pScreen, int yoff; exaGetDrawableDeltas (pDst->pDrawable, pDstPix, &xoff, &yoff); - REGION_TRANSLATE(pScreen, ®ion, pDst->pDrawable->x + xoff, + RegionTranslate(®ion, pDst->pDrawable->x + xoff, pDst->pDrawable->y + yoff); dstReg = ®ion; } @@ -600,7 +598,7 @@ ExaPrepareCompositeReg(ScreenPtr pScreen, dstReg); pExaScr->prepare_access_reg(pDstPix, EXA_PREPARE_DEST, dstReg); - REGION_UNINIT(pScreen, ®ion); + RegionUninit(®ion); return TRUE; } @@ -619,9 +617,7 @@ ExaCheckComposite (CARD8 op, CARD16 height) { ScreenPtr pScreen = pDst->pDrawable->pScreen; -#ifdef RENDER PictureScreenPtr ps = GetPictureScreen(pScreen); -#endif /* RENDER */ EXA_PRE_FALLBACK(pScreen); if (pExaScr->prepare_access_reg) { @@ -654,7 +650,6 @@ ExaCheckComposite (CARD8 op, exaPrepareAccess (pMask->pDrawable, EXA_PREPARE_MASK); } -#ifdef RENDER swap(pExaScr, ps, Composite); ps->Composite (op, pSrc, @@ -669,7 +664,6 @@ ExaCheckComposite (CARD8 op, width, height); swap(pExaScr, ps, Composite); -#endif /* RENDER */ if (pMask && pMask->pDrawable != NULL) exaFinishAccess (pMask->pDrawable, EXA_PREPARE_MASK); if (pSrc->pDrawable != NULL) @@ -686,6 +680,28 @@ out_no_clip: EXA_POST_FALLBACK(pScreen); } +/** + * Avoid migration ping-pong when using a mask. + */ +void +ExaCheckGlyphs (CARD8 op, + PicturePtr pSrc, + PicturePtr pDst, + PictFormatPtr maskFormat, + INT16 xSrc, + INT16 ySrc, + int nlist, + GlyphListPtr list, + GlyphPtr *glyphs) +{ + ScreenPtr pScreen = pDst->pDrawable->pScreen; + EXA_PRE_FALLBACK(pScreen); + + miGlyphs(op, pSrc, pDst, maskFormat, xSrc, ySrc, nlist, list, glyphs); + + EXA_POST_FALLBACK(pScreen); +} + void ExaCheckAddTraps (PicturePtr pPicture, INT16 x_off, @@ -694,19 +710,15 @@ ExaCheckAddTraps (PicturePtr pPicture, xTrap *traps) { ScreenPtr pScreen = pPicture->pDrawable->pScreen; -#ifdef RENDER PictureScreenPtr ps = GetPictureScreen(pScreen); -#endif /* RENDER */ EXA_PRE_FALLBACK(pScreen); EXA_FALLBACK(("to pict %p (%c)\n", exaDrawableLocation(pPicture->pDrawable))); exaPrepareAccess(pPicture->pDrawable, EXA_PREPARE_DEST); -#ifdef RENDER swap(pExaScr, ps, AddTraps); ps->AddTraps (pPicture, x_off, y_off, ntrap, traps); swap(pExaScr, ps, AddTraps); -#endif /* RENDER */ exaFinishAccess(pPicture->pDrawable, EXA_PREPARE_DEST); EXA_POST_FALLBACK(pScreen); } diff --git a/xserver/fb/Makefile.am b/xserver/fb/Makefile.am index 64e49f345..2f3073da8 100644 --- a/xserver/fb/Makefile.am +++ b/xserver/fb/Makefile.am @@ -11,8 +11,10 @@ sdk_HEADERS = fb.h fbrop.h fboverlay.h wfbrename.h fbpict.h endif libfb_la_CFLAGS = $(AM_CFLAGS) +libfb_la_LIBADD = $(PIXMAN_LIBS) libwfb_la_CFLAGS = $(AM_CFLAGS) -DFB_ACCESS_WRAPPER +libwfb_la_LIBADD = $(PIXMAN_LIBS) libfb_la_SOURCES = \ fb.h \ diff --git a/xserver/fb/Makefile.in b/xserver/fb/Makefile.in index d33e6f91a..8c5a10138 100644 --- a/xserver/fb/Makefile.in +++ b/xserver/fb/Makefile.in @@ -56,7 +56,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) -libfb_la_LIBADD = +am__DEPENDENCIES_1 = +libfb_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am_libfb_la_OBJECTS = libfb_la-fb24_32.lo libfb_la-fballpriv.lo \ libfb_la-fbarc.lo libfb_la-fbbits.lo libfb_la-fbblt.lo \ libfb_la-fbbltone.lo libfb_la-fbcopy.lo libfb_la-fbfill.lo \ @@ -68,7 +69,7 @@ am_libfb_la_OBJECTS = libfb_la-fb24_32.lo libfb_la-fballpriv.lo \ libfb_la-fbsolid.lo libfb_la-fbstipple.lo libfb_la-fbtile.lo \ libfb_la-fbtrap.lo libfb_la-fbutil.lo libfb_la-fbwindow.lo libfb_la_OBJECTS = $(am_libfb_la_OBJECTS) -libwfb_la_LIBADD = +libwfb_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am__objects_1 = libwfb_la-fb24_32.lo libwfb_la-fballpriv.lo \ libwfb_la-fbarc.lo libwfb_la-fbbits.lo libwfb_la-fbblt.lo \ libwfb_la-fbbltone.lo libwfb_la-fbcopy.lo libwfb_la-fbfill.lo \ @@ -143,10 +144,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -234,6 +231,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -248,6 +247,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -265,10 +265,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -324,10 +328,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -345,17 +350,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -382,20 +381,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -487,6 +489,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ @@ -641,7 +644,9 @@ INCLUDES = \ AM_CFLAGS = $(DIX_CFLAGS) @XORG_TRUE@sdk_HEADERS = fb.h fbrop.h fboverlay.h wfbrename.h fbpict.h libfb_la_CFLAGS = $(AM_CFLAGS) +libfb_la_LIBADD = $(PIXMAN_LIBS) libwfb_la_CFLAGS = $(AM_CFLAGS) -DFB_ACCESS_WRAPPER +libwfb_la_LIBADD = $(PIXMAN_LIBS) libfb_la_SOURCES = \ fb.h \ fb24_32.c \ diff --git a/xserver/fb/fb.h b/xserver/fb/fb.h index 02d6c0372..a06f98be2 100644 --- a/xserver/fb/fb.h +++ b/xserver/fb/fb.h @@ -41,11 +41,7 @@ #include "mi.h" #include "migc.h" #include "mibstore.h" -#ifdef RENDER #include "picturestr.h" -#else -#include "picture.h" -#endif #ifdef FB_ACCESS_WRAPPER @@ -607,8 +603,12 @@ extern _X_EXPORT void fbSetBits (FbStip *bits, int stride, FbStip data); } \ } -extern _X_EXPORT DevPrivateKey fbGetGCPrivateKey(void); -extern _X_EXPORT DevPrivateKey fbGetWinPrivateKey(void); +extern _X_EXPORT DevPrivateKey +fbGetGCPrivateKey (void); + +extern _X_EXPORT DevPrivateKey +fbGetWinPrivateKey (void); + extern _X_EXPORT const GCOps fbGCOps; extern _X_EXPORT const GCFuncs fbGCFuncs; @@ -643,7 +643,8 @@ typedef void (*FinishWrapProcPtr)(DrawablePtr pDraw); #ifdef FB_SCREEN_PRIVATE -extern _X_EXPORT DevPrivateKey fbGetScreenPrivateKey(void); +extern _X_EXPORT DevPrivateKey +fbGetScreenPrivateKey(void); /* private field of a screen */ typedef struct { @@ -656,7 +657,7 @@ typedef struct { } FbScreenPrivRec, *FbScreenPrivPtr; #define fbGetScreenPrivate(pScreen) ((FbScreenPrivPtr) \ - dixLookupPrivate(&(pScreen)->devPrivates, fbGetScreenPrivateKey())) + dixLookupPrivate(&(pScreen)->devPrivates, fbGetScreenPrivateKey())) #endif /* private field of GC */ @@ -671,7 +672,7 @@ typedef struct { } FbGCPrivRec, *FbGCPrivPtr; #define fbGetGCPrivate(pGC) ((FbGCPrivPtr)\ - dixLookupPrivate(&(pGC)->devPrivates, fbGetGCPrivateKey())) + dixLookupPrivate(&(pGC)->devPrivates, fbGetGCPrivateKey())) #define fbGetCompositeClip(pGC) ((pGC)->pCompositeClip) #define fbGetExpose(pGC) ((pGC)->fExpose) @@ -680,7 +681,7 @@ typedef struct { #define fbGetScreenPixmap(s) ((PixmapPtr) (s)->devPrivate) #define fbGetWindowPixmap(pWin) ((PixmapPtr)\ - dixLookupPrivate(&((WindowPtr)(pWin))->devPrivates, fbGetWinPrivateKey())) + dixLookupPrivate(&((WindowPtr)(pWin))->devPrivates, fbGetWinPrivateKey())) #ifdef ROOTLESS #define __fbPixDrawableX(pPix) ((pPix)->drawable.x) @@ -743,8 +744,7 @@ typedef struct { */ #define fbWindowEnabled(pWin) \ - REGION_NOTEMPTY((pWin)->drawable.pScreen, \ - &WindowTable[(pWin)->drawable.pScreen->myNum]->borderClip) + RegionNotEmpty(&(pWin)->drawable.pScreen->root->borderClip) #define fbDrawableEnabled(pDrawable) \ ((pDrawable)->type == DRAWABLE_PIXMAP ? \ @@ -834,8 +834,6 @@ fb24_32ModifyPixmapHeader (PixmapPtr pPixmap, /* * fballpriv.c */ -extern _X_EXPORT DevPrivateKey fbGetWinPrivateKey(void); - extern _X_EXPORT Bool fbAllocatePrivates(ScreenPtr pScreen, DevPrivateKey *pGCIndex); diff --git a/xserver/fb/fb24_32.c b/xserver/fb/fb24_32.c index 1ebd598a8..2e600edc0 100644 --- a/xserver/fb/fb24_32.c +++ b/xserver/fb/fb24_32.c @@ -335,8 +335,8 @@ fb24_32SetSpans (DrawablePtr pDrawable, { d = dst + (ppt->y + dstYoff) * dstStride; s = (CARD8 *) src; - n = REGION_NUM_RECTS(pClip); - pbox = REGION_RECTS (pClip); + n = RegionNumRects(pClip); + pbox = RegionRects (pClip); while (n--) { if (pbox->y1 > ppt->y) @@ -399,8 +399,8 @@ fb24_32PutZImage (DrawablePtr pDrawable, dstStride *= sizeof(FbBits); dst = (CARD8 *) dstBits; - for (nbox = REGION_NUM_RECTS (pClip), - pbox = REGION_RECTS(pClip); + for (nbox = RegionNumRects (pClip), + pbox = RegionRects(pClip); nbox--; pbox++) { diff --git a/xserver/fb/fballpriv.c b/xserver/fb/fballpriv.c index c40796c11..efeb26880 100644 --- a/xserver/fb/fballpriv.c +++ b/xserver/fb/fballpriv.c @@ -27,46 +27,34 @@ #include "fb.h" #ifdef FB_SCREEN_PRIVATE -static int fbScreenPrivateKeyIndex; -static DevPrivateKey fbScreenPrivateKey = &fbScreenPrivateKeyIndex; -DevPrivateKey fbGetScreenPrivateKey(void) -{ - return fbScreenPrivateKey; -} +static DevPrivateKeyRec fbScreenPrivateKeyRec; +DevPrivateKey +fbGetScreenPrivateKey(void) { return &fbScreenPrivateKeyRec; } #endif -static int fbGCPrivateKeyIndex; -static DevPrivateKey fbGCPrivateKey = &fbGCPrivateKeyIndex; -DevPrivateKey fbGetGCPrivateKey(void) -{ - return fbGCPrivateKey; -} +static DevPrivateKeyRec fbGCPrivateKeyRec; +DevPrivateKey +fbGetGCPrivateKey (void) { return &fbGCPrivateKeyRec; } -static int fbWinPrivateKeyIndex; -static DevPrivateKey fbWinPrivateKey = &fbWinPrivateKeyIndex; -DevPrivateKey fbGetWinPrivateKey(void) -{ - return fbWinPrivateKey; -} +static DevPrivateKeyRec fbWinPrivateKeyRec; +DevPrivateKey +fbGetWinPrivateKey (void) { return &fbWinPrivateKeyRec; } Bool fbAllocatePrivates(ScreenPtr pScreen, DevPrivateKey *pGCKey) { if (pGCKey) - *pGCKey = fbGCPrivateKey; + *pGCKey = &fbGCPrivateKeyRec; - if (!dixRequestPrivate(fbGCPrivateKey, sizeof(FbGCPrivRec))) + if (!dixRegisterPrivateKey(&fbGCPrivateKeyRec, PRIVATE_GC, sizeof(FbGCPrivRec))) return FALSE; #ifdef FB_SCREEN_PRIVATE - { - FbScreenPrivPtr pScreenPriv; - - pScreenPriv = (FbScreenPrivPtr) xalloc (sizeof (FbScreenPrivRec)); - if (!pScreenPriv) - return FALSE; - dixSetPrivate(&pScreen->devPrivates, fbScreenPrivateKey, pScreenPriv); - } + if (!dixRegisterPrivateKey(&fbScreenPrivateKeyRec, PRIVATE_SCREEN, sizeof (FbScreenPrivRec))) + return FALSE; #endif + if (!dixRegisterPrivateKey(&fbWinPrivateKeyRec, PRIVATE_WINDOW, 0)) + return FALSE; + return TRUE; } diff --git a/xserver/fb/fbarc.c b/xserver/fb/fbarc.c index 3a8a2c56a..33e44b0c6 100644 --- a/xserver/fb/fbarc.c +++ b/xserver/fb/fbarc.c @@ -102,7 +102,7 @@ fbPolyArc (DrawablePtr pDrawable, y2 = box.y1 + (int)parcs->height + 1; box.y2 = y2; if ( (x2 <= SHRT_MAX) && (y2 <= SHRT_MAX) && - (RECT_IN_REGION(pDrawable->pScreen, cclip, &box) == rgnIN) ) { + (RegionContainsRect(cclip, &box) == rgnIN) ) { #ifdef FB_ACCESS_WRAPPER if (!wrapped) { fbPrepareAccess (pDrawable); diff --git a/xserver/fb/fbbits.h b/xserver/fb/fbbits.h index 44991f106..2dec84b42 100644 --- a/xserver/fb/fbbits.h +++ b/xserver/fb/fbbits.h @@ -25,7 +25,7 @@ * underlying datatypes instead of masks */ -#define isClipped(c,ul,lr) ((((c) - (ul)) | ((lr) - (c))) & 0x80008000) +#define isClipped(c,ul,lr) (((c) | ((c) - (ul)) | ((lr) - (c))) & 0x80008000) #ifdef HAVE_DIX_CONFIG_H #include @@ -670,7 +670,7 @@ POLYLINE (DrawablePtr pDrawable, int xoff = pDrawable->x; int yoff = pDrawable->y; unsigned int bias = miGetZeroLineBias(pDrawable->pScreen); - BoxPtr pBox = REGION_EXTENTS (pDrawable->pScreen, fbGetCompositeClip (pGC)); + BoxPtr pBox = RegionExtents(fbGetCompositeClip (pGC)); FbBits *dst; int dstStride; @@ -807,7 +807,7 @@ POLYSEGMENT (DrawablePtr pDrawable, int xoff = pDrawable->x; int yoff = pDrawable->y; unsigned int bias = miGetZeroLineBias(pDrawable->pScreen); - BoxPtr pBox = REGION_EXTENTS (pDrawable->pScreen, fbGetCompositeClip (pGC)); + BoxPtr pBox = RegionExtents(fbGetCompositeClip (pGC)); FbBits *dst; int dstStride; diff --git a/xserver/fb/fbcmap.c b/xserver/fb/fbcmap.c index 2ff3234b5..3251a4caa 100644 --- a/xserver/fb/fbcmap.c +++ b/xserver/fb/fbcmap.c @@ -36,25 +36,26 @@ #error "You should be compiling fbcmap_mi.c instead of fbcmap.c!" #endif +static DevPrivateKeyRec cmapScrPrivateKeyRec; +#define cmapScrPrivateKey (&cmapScrPrivateKeyRec) - -ColormapPtr FbInstalledMaps[MAXSCREENS]; +#define GetInstalledColormap(s) ((ColormapPtr) dixLookupPrivate(&(s)->devPrivates, cmapScrPrivateKey)) +#define SetInstalledColormap(s,c) (dixSetPrivate(&(s)->devPrivates, cmapScrPrivateKey, c)) int fbListInstalledColormaps(ScreenPtr pScreen, Colormap *pmaps) { /* By the time we are processing requests, we can guarantee that there * is always a colormap installed */ - *pmaps = FbInstalledMaps[pScreen->myNum]->mid; - return (1); + *pmaps = GetInstalledColormap(pScreen)->mid; + return 1; } void fbInstallColormap(ColormapPtr pmap) { - int index = pmap->pScreen->myNum; - ColormapPtr oldpmap = FbInstalledMaps[index]; + ColormapPtr oldpmap = GetInstalledColormap(pmap->pScreen); if(pmap != oldpmap) { @@ -63,7 +64,7 @@ fbInstallColormap(ColormapPtr pmap) if(oldpmap != (ColormapPtr)None) WalkTree(pmap->pScreen, TellLostMap, (char *)&oldpmap->mid); /* Install pmap */ - FbInstalledMaps[index] = pmap; + SetInstalledColormap(pmap->pScreen, pmap); WalkTree(pmap->pScreen, TellGainedMap, (char *)&pmap->mid); } } @@ -71,8 +72,7 @@ fbInstallColormap(ColormapPtr pmap) void fbUninstallColormap(ColormapPtr pmap) { - int index = pmap->pScreen->myNum; - ColormapPtr curpmap = FbInstalledMaps[index]; + ColormapPtr curpmap = GetInstalledColormap(pmap->pScreen); if(pmap == curpmap) { @@ -388,7 +388,7 @@ fbSetVisualTypesAndMasks (int depth, int visuals, int bitsPerRGB, { fbVisualsPtr new, *prev, v; - new = (fbVisualsPtr) xalloc (sizeof *new); + new = (fbVisualsPtr) malloc(sizeof *new); if (!new) return FALSE; if (!redMask || !greenMask || !blueMask) @@ -485,12 +485,12 @@ fbInitVisuals (VisualPtr *visualp, ndepth++; nvisual += visuals->count; } - depth = (DepthPtr) xalloc (ndepth * sizeof (DepthRec)); - visual = (VisualPtr) xalloc (nvisual * sizeof (VisualRec)); + depth = (DepthPtr) malloc(ndepth * sizeof (DepthRec)); + visual = (VisualPtr) malloc(nvisual * sizeof (VisualRec)); if (!depth || !visual) { - xfree (depth); - xfree (visual); + free(depth); + free(visual); return FALSE; } *depthp = depth; @@ -506,7 +506,7 @@ fbInitVisuals (VisualPtr *visualp, vid = NULL; if (nvtype) { - vid = (VisualID *) xalloc (nvtype * sizeof (VisualID)); + vid = (VisualID *) malloc(nvtype * sizeof (VisualID)); if (!vid) return FALSE; } @@ -547,7 +547,7 @@ fbInitVisuals (VisualPtr *visualp, vid++; visual++; } - xfree (visuals); + free(visuals); } fbVisuals = NULL; visual = *visualp; diff --git a/xserver/fb/fbcopy.c b/xserver/fb/fbcopy.c index 07eb663c6..9a7c49ac3 100644 --- a/xserver/fb/fbcopy.c +++ b/xserver/fb/fbcopy.c @@ -275,7 +275,7 @@ fbCopyNto1 (DrawablePtr pSrcDrawable, height = pbox->y2 - pbox->y1; tmpStride = ((width + FB_STIP_MASK) >> FB_STIP_SHIFT); - tmp = xalloc (tmpStride * height * sizeof (FbStip)); + tmp = malloc(tmpStride * height * sizeof (FbStip)); if (!tmp) return; @@ -313,7 +313,7 @@ fbCopyNto1 (DrawablePtr pSrcDrawable, pPriv->and, pPriv->xor, pPriv->bgand, pPriv->bgxor); - xfree (tmp); + free(tmp); fbFinishAccess (pDstDrawable); fbFinishAccess (pSrcDrawable); diff --git a/xserver/fb/fbfill.c b/xserver/fb/fbfill.c index 831b1ce76..801a0d0a9 100644 --- a/xserver/fb/fbfill.c +++ b/xserver/fb/fbfill.c @@ -185,7 +185,7 @@ fbSolidBoxClipped (DrawablePtr pDrawable, fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); - for (nbox = REGION_NUM_RECTS(pClip), pbox = REGION_RECTS(pClip); + for (nbox = RegionNumRects(pClip), pbox = RegionRects(pClip); nbox--; pbox++) { diff --git a/xserver/fb/fbfillrect.c b/xserver/fb/fbfillrect.c index 4e4edb3fd..7fc03f9a5 100644 --- a/xserver/fb/fbfillrect.c +++ b/xserver/fb/fbfillrect.c @@ -44,7 +44,7 @@ fbPolyFillRect(DrawablePtr pDrawable, xorg = pDrawable->x; yorg = pDrawable->y; - pextent = REGION_EXTENTS(pGC->pScreen, pClip); + pextent = RegionExtents(pClip); extentX1 = pextent->x1; extentY1 = pextent->y1; extentX2 = pextent->x2; @@ -71,7 +71,7 @@ fbPolyFillRect(DrawablePtr pDrawable, if ((fullX1 >= fullX2) || (fullY1 >= fullY2)) continue; - n = REGION_NUM_RECTS (pClip); + n = RegionNumRects (pClip); if (n == 1) { fbFill (pDrawable, @@ -80,7 +80,7 @@ fbPolyFillRect(DrawablePtr pDrawable, } else { - pbox = REGION_RECTS(pClip); + pbox = RegionRects(pClip); /* * clip the rectangle to each box in the clip region * this is logically equivalent to calling Intersect() diff --git a/xserver/fb/fbfillsp.c b/xserver/fb/fbfillsp.c index 5d2147213..194bfc88b 100644 --- a/xserver/fb/fbfillsp.c +++ b/xserver/fb/fbfillsp.c @@ -41,7 +41,7 @@ fbFillSpans (DrawablePtr pDrawable, int fullX1, fullX2, fullY1; int partX1, partX2; - pextent = REGION_EXTENTS(pGC->pScreen, pClip); + pextent = RegionExtents(pClip); extentX1 = pextent->x1; extentY1 = pextent->y1; extentX2 = pextent->x2; @@ -66,7 +66,7 @@ fbFillSpans (DrawablePtr pDrawable, if (fullX1 >= fullX2) continue; - nbox = REGION_NUM_RECTS (pClip); + nbox = RegionNumRects (pClip); if (nbox == 1) { fbFill (pDrawable, @@ -75,7 +75,7 @@ fbFillSpans (DrawablePtr pDrawable, } else { - pbox = REGION_RECTS(pClip); + pbox = RegionRects(pClip); while(nbox--) { if (pbox->y1 <= fullY1 && fullY1 < pbox->y2) diff --git a/xserver/fb/fbgc.c b/xserver/fb/fbgc.c index fda391b14..e3e923675 100644 --- a/xserver/fb/fbgc.c +++ b/xserver/fb/fbgc.c @@ -213,7 +213,7 @@ fbValidateGC(GCPtr pGC, unsigned long changes, DrawablePtr pDrawable) ) { miComputeCompositeClip (pGC, pDrawable); - pPriv->oneRect = REGION_NUM_RECTS(fbGetCompositeClip(pGC)) == 1; + pPriv->oneRect = RegionNumRects(fbGetCompositeClip(pGC)) == 1; } #ifdef FB_24_32BIT diff --git a/xserver/fb/fbglyph.c b/xserver/fb/fbglyph.c index 2c19b742f..8208081e2 100644 --- a/xserver/fb/fbglyph.c +++ b/xserver/fb/fbglyph.c @@ -29,8 +29,6 @@ #include #include "dixfontstr.h" -#define dummyScreen screenInfo.screens[0] - Bool fbGlyphIn (RegionPtr pRegion, int x, @@ -39,7 +37,7 @@ fbGlyphIn (RegionPtr pRegion, int height) { BoxRec box; - BoxPtr pExtents = REGION_EXTENTS (dummyScreen, pRegion); + BoxPtr pExtents = RegionExtents(pRegion); /* * Check extents by hand to avoid 16 bit overflows @@ -56,7 +54,7 @@ fbGlyphIn (RegionPtr pRegion, box.x2 = x + width; box.y1 = y; box.y2 = y + height; - return RECT_IN_REGION (dummyScreen, pRegion, &box) == rgnIN; + return RegionContainsRect(pRegion, &box) == rgnIN; } #ifdef FB_24BIT diff --git a/xserver/fb/fbimage.c b/xserver/fb/fbimage.c index 2b9ac27c0..da1e8bcc4 100644 --- a/xserver/fb/fbimage.c +++ b/xserver/fb/fbimage.c @@ -134,8 +134,8 @@ fbPutZImage (DrawablePtr pDrawable, fbGetStipDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); - for (nbox = REGION_NUM_RECTS (pClip), - pbox = REGION_RECTS(pClip); + for (nbox = RegionNumRects (pClip), + pbox = RegionRects(pClip); nbox--; pbox++) { @@ -224,8 +224,8 @@ fbPutXYImage (DrawablePtr pDrawable, } } - for (nbox = REGION_NUM_RECTS (pClip), - pbox = REGION_RECTS(pClip); + for (nbox = RegionNumRects (pClip), + pbox = RegionRects(pClip); nbox--; pbox++) { diff --git a/xserver/fb/fbline.c b/xserver/fb/fbline.c index 2cee123ae..fa80573e2 100644 --- a/xserver/fb/fbline.c +++ b/xserver/fb/fbline.c @@ -117,7 +117,7 @@ fbPolyLine (DrawablePtr pDrawable, #ifndef FBNOPIXADDR if (pGC->fillStyle == FillSolid && pGC->lineStyle == LineSolid && - REGION_NUM_RECTS (fbGetCompositeClip(pGC)) == 1) + RegionNumRects (fbGetCompositeClip(pGC)) == 1) { switch (pDrawable->bitsPerPixel) { case 8: line = fbPolyline8; break; @@ -154,7 +154,7 @@ fbPolySegment (DrawablePtr pDrawable, #ifndef FBNOPIXADDR if (pGC->fillStyle == FillSolid && pGC->lineStyle == LineSolid && - REGION_NUM_RECTS (fbGetCompositeClip(pGC)) == 1) + RegionNumRects (fbGetCompositeClip(pGC)) == 1) { switch (pDrawable->bitsPerPixel) { case 8: seg = fbPolySegment8; break; diff --git a/xserver/fb/fboverlay.c b/xserver/fb/fboverlay.c index 99939e8bf..7fca89c44 100644 --- a/xserver/fb/fboverlay.c +++ b/xserver/fb/fboverlay.c @@ -33,8 +33,8 @@ #include "fboverlay.h" #include "shmint.h" -static int fbOverlayScreenPrivateKeyIndex; -static DevPrivateKey fbOverlayScreenPrivateKey = &fbOverlayScreenPrivateKeyIndex; +static DevPrivateKeyRec fbOverlayScreenPrivateKeyRec; +#define fbOverlayScreenPrivateKey (&fbOverlayScreenPrivateKeyRec) DevPrivateKey fbOverlayGetScreenPrivateKey(void) { @@ -75,8 +75,7 @@ fbOverlayCreateWindow(WindowPtr pWin) */ if (!pWin->parent) { - REGION_EMPTY (pWin->drawable.pScreen, - &pScrPriv->layer[i].u.run.region); + RegionEmpty(&pScrPriv->layer[i].u.run.region); } return TRUE; } @@ -93,7 +92,7 @@ fbOverlayCloseScreen (int iScreen, ScreenPtr pScreen) for (i = 0; i < pScrPriv->nlayers; i++) { (*pScreen->DestroyPixmap)(pScrPriv->layer[i].u.run.pixmap); - REGION_UNINIT (pScreen, &pScrPriv->layer[i].u.run.region); + RegionUninit(&pScrPriv->layer[i].u.run.region); } return TRUE; } @@ -147,7 +146,7 @@ fbOverlayCreateScreenResources(ScreenPtr pScreen) pbits)) return FALSE; pScrPriv->layer[i].u.run.pixmap = pPixmap; - REGION_INIT(pScreen, &pScrPriv->layer[i].u.run.region, &box, 0); + RegionInit(&pScrPriv->layer[i].u.run.region, &box, 0); } pScreen->devPrivate = pScrPriv->layer[0].u.run.pixmap; return TRUE; @@ -175,37 +174,32 @@ fbOverlayUpdateLayerRegion (ScreenPtr pScreen, int i; RegionRec rgnNew; - if (!prgn || !REGION_NOTEMPTY(pScreen, prgn)) + if (!prgn || !RegionNotEmpty(prgn)) return; for (i = 0; i < pScrPriv->nlayers; i++) { if (i == layer) { /* add new piece to this fb */ - REGION_UNION (pScreen, - &pScrPriv->layer[i].u.run.region, - &pScrPriv->layer[i].u.run.region, - prgn); + RegionUnion(&pScrPriv->layer[i].u.run.region, + &pScrPriv->layer[i].u.run.region, + prgn); } - else if (REGION_NOTEMPTY (pScreen, - &pScrPriv->layer[i].u.run.region)) + else if (RegionNotEmpty(&pScrPriv->layer[i].u.run.region)) { /* paint new piece with chroma key */ - REGION_NULL (pScreen, &rgnNew); - REGION_INTERSECT (pScreen, - &rgnNew, - prgn, - &pScrPriv->layer[i].u.run.region); + RegionNull(&rgnNew); + RegionIntersect(&rgnNew, prgn, + &pScrPriv->layer[i].u.run.region); (*pScrPriv->PaintKey) (&pScrPriv->layer[i].u.run.pixmap->drawable, &rgnNew, pScrPriv->layer[i].key, i); - REGION_UNINIT(pScreen, &rgnNew); + RegionUninit(&rgnNew); /* remove piece from other fbs */ - REGION_SUBTRACT (pScreen, - &pScrPriv->layer[i].u.run.region, - &pScrPriv->layer[i].u.run.region, - prgn); + RegionSubtract(&pScrPriv->layer[i].u.run.region, + &pScrPriv->layer[i].u.run.region, + prgn); } } } @@ -219,7 +213,7 @@ fbOverlayCopyWindow(WindowPtr pWin, RegionPtr prgnSrc) { ScreenPtr pScreen = pWin->drawable.pScreen; - FbOverlayScrPrivPtr pScrPriv = fbOverlayGetScrPriv(pWin->drawable.pScreen); + FbOverlayScrPrivPtr pScrPriv = fbOverlayGetScrPriv(pScreen); RegionRec rgnDst; int dx, dy; int i; @@ -232,21 +226,21 @@ fbOverlayCopyWindow(WindowPtr pWin, /* * Clip to existing bits */ - REGION_TRANSLATE(pScreen, prgnSrc, -dx, -dy); - REGION_NULL (pScreen, &rgnDst); - REGION_INTERSECT(pScreen, &rgnDst, &pWin->borderClip, prgnSrc); - REGION_TRANSLATE(pScreen, &rgnDst, dx, dy); + RegionTranslate(prgnSrc, -dx, -dy); + RegionNull(&rgnDst); + RegionIntersect(&rgnDst, &pWin->borderClip, prgnSrc); + RegionTranslate(&rgnDst, dx, dy); /* * Compute the portion of each fb affected by this copy */ for (i = 0; i < pScrPriv->nlayers; i++) { - REGION_NULL (pScreen, &layerRgn[i]); - REGION_INTERSECT(pScreen, &layerRgn[i], &rgnDst, + RegionNull(&layerRgn[i]); + RegionIntersect(&layerRgn[i], &rgnDst, &pScrPriv->layer[i].u.run.region); - if (REGION_NOTEMPTY (pScreen, &layerRgn[i])) + if (RegionNotEmpty(&layerRgn[i])) { - REGION_TRANSLATE(pScreen, &layerRgn[i], -dx, -dy); + RegionTranslate(&layerRgn[i], -dx, -dy); pPixmap = pScrPriv->layer[i].u.run.pixmap; miCopyRegion (&pPixmap->drawable, &pPixmap->drawable, 0, @@ -259,12 +253,12 @@ fbOverlayCopyWindow(WindowPtr pWin, */ for (i = 0; i < pScrPriv->nlayers; i++) { - if (REGION_NOTEMPTY (pScreen, &layerRgn[i])) + if (RegionNotEmpty(&layerRgn[i])) fbOverlayUpdateLayerRegion (pScreen, i, &layerRgn[i]); - REGION_UNINIT(pScreen, &layerRgn[i]); + RegionUninit(&layerRgn[i]); } - REGION_UNINIT(pScreen, &rgnDst); + RegionUninit(&rgnDst); } void @@ -348,7 +342,10 @@ fbOverlayFinishScreenInit(ScreenPtr pScreen, VisualID defaultVisual; FbOverlayScrPrivPtr pScrPriv; - pScrPriv = xalloc (sizeof (FbOverlayScrPrivRec)); + if (!dixRegisterPrivateKey(&fbOverlayScreenPrivateKeyRec, PRIVATE_SCREEN, 0)) + return FALSE; + + pScrPriv = malloc(sizeof (FbOverlayScrPrivRec)); if (!pScrPriv) return FALSE; @@ -416,7 +413,6 @@ fbOverlayFinishScreenInit(ScreenPtr pScreen, pScrPriv->layer[1].u.init.pbits = pbits2; pScrPriv->layer[1].u.init.width = width2; pScrPriv->layer[1].u.init.depth = depth2; - dixSetPrivate(&pScreen->devPrivates, fbOverlayScreenPrivateKey, pScrPriv); /* overwrite miCloseScreen with our own */ diff --git a/xserver/fb/fbpict.c b/xserver/fb/fbpict.c index dddfce87f..f7f120002 100644 --- a/xserver/fb/fbpict.c +++ b/xserver/fb/fbpict.c @@ -31,8 +31,6 @@ #include "fb.h" -#ifdef RENDER - #include "picturestr.h" #include "mipict.h" #include "fbpict.h" @@ -79,8 +77,8 @@ fbWalkCompositeRegion (CARD8 op, xMask, yMask, xDst, yDst, width, height)) return; - n = REGION_NUM_RECTS (®ion); - pbox = REGION_RECTS (®ion); + n = RegionNumRects (®ion); + pbox = RegionRects (®ion); while (n--) { h = pbox->y2 - pbox->y1; @@ -140,7 +138,7 @@ fbWalkCompositeRegion (CARD8 op, } pbox++; } - REGION_UNINIT (pDst->pDrawable->pScreen, ®ion); + RegionUninit(®ion); } void @@ -203,8 +201,6 @@ fbCompositeGeneral (CARD8 op, width, height); } -#endif /* RENDER */ - static pixman_image_t * create_solid_fill_image (PicturePtr pict) { @@ -336,8 +332,11 @@ create_bits_picture (PicturePtr pict, return image; } +static pixman_image_t * +image_from_pict_internal (PicturePtr pict, Bool has_clip, int *xoff, int *yoff, Bool is_alpha_map); + static void -set_image_properties (pixman_image_t *image, PicturePtr pict, Bool has_clip, int *xoff, int *yoff) +set_image_properties (pixman_image_t *image, PicturePtr pict, Bool has_clip, int *xoff, int *yoff, Bool is_alpha_map) { pixman_repeat_t repeat; pixman_filter_t filter; @@ -386,10 +385,13 @@ set_image_properties (pixman_image_t *image, PicturePtr pict, Bool has_clip, int pixman_image_set_repeat (image, repeat); - if (pict->alphaMap) + /* Fetch alpha map unless 'pict' is being used + * as the alpha map for this operation + */ + if (pict->alphaMap && !is_alpha_map) { int alpha_xoff, alpha_yoff; - pixman_image_t *alpha_map = image_from_pict (pict->alphaMap, FALSE, &alpha_xoff, &alpha_yoff); + pixman_image_t *alpha_map = image_from_pict_internal (pict->alphaMap, FALSE, &alpha_xoff, &alpha_yoff, TRUE); pixman_image_set_alpha_map ( image, alpha_map, pict->alphaOrigin.x, pict->alphaOrigin.y); @@ -421,8 +423,8 @@ set_image_properties (pixman_image_t *image, PicturePtr pict, Bool has_clip, int pixman_image_set_source_clipping (image, TRUE); } -pixman_image_t * -image_from_pict (PicturePtr pict, Bool has_clip, int *xoff, int *yoff) +static pixman_image_t * +image_from_pict_internal (PicturePtr pict, Bool has_clip, int *xoff, int *yoff, Bool is_alpha_map) { pixman_image_t *image = NULL; @@ -456,11 +458,17 @@ image_from_pict (PicturePtr pict, Bool has_clip, int *xoff, int *yoff) } if (image) - set_image_properties (image, pict, has_clip, xoff, yoff); + set_image_properties (image, pict, has_clip, xoff, yoff, is_alpha_map); return image; } +pixman_image_t * +image_from_pict (PicturePtr pict, Bool has_clip, int *xoff, int *yoff) +{ + return image_from_pict_internal (pict, has_clip, xoff, yoff, FALSE); +} + void free_pixman_pict (PicturePtr pict, pixman_image_t *image) { @@ -472,8 +480,6 @@ Bool fbPictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats) { -#ifdef RENDER - PictureScreenPtr ps; if (!miPictureInit (pScreen, formats, nformats)) @@ -486,7 +492,5 @@ fbPictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats) ps->AddTraps = fbAddTraps; ps->AddTriangles = fbAddTriangles; -#endif /* RENDER */ - return TRUE; } diff --git a/xserver/fb/fbpixmap.c b/xserver/fb/fbpixmap.c index 311da9e62..41b12cea7 100644 --- a/xserver/fb/fbpixmap.c +++ b/xserver/fb/fbpixmap.c @@ -67,6 +67,7 @@ fbCreatePixmapBpp (ScreenPtr pScreen, int width, int height, int depth, int bpp, pPixmap->devKind = paddedWidth; pPixmap->refcnt = 1; pPixmap->devPrivate.ptr = (pointer) ((char *)pPixmap + base + adjust); + #ifdef FB_DEBUG pPixmap->devPrivate.ptr = (void *) ((char *) pPixmap->devPrivate.ptr + paddedWidth); fbInitializeDrawable (&pPixmap->drawable); @@ -100,8 +101,7 @@ fbDestroyPixmap (PixmapPtr pPixmap) { if(--pPixmap->refcnt) return TRUE; - dixFreePrivates(pPixmap->devPrivates); - xfree(pPixmap); + FreePixmap(pPixmap); return TRUE; } @@ -115,8 +115,8 @@ if (((rx1) < (rx2)) && ((ry1) < (ry2)) && \ { \ if ((reg)->data->numRects == (reg)->data->size) \ { \ - miRectAlloc(reg, 1); \ - fr = REGION_BOXPTR(reg); \ + RegionRectAlloc(reg, 1); \ + fr = RegionBoxptr(reg); \ r = fr + (reg)->data->numRects; \ } \ r->x1 = (rx1); \ @@ -153,10 +153,10 @@ fbPixmapToRegion(PixmapPtr pPix) FbBits *pwLine; int nWidth; - pReg = REGION_CREATE(pPix->drawable.pScreen, NULL, 1); + pReg = RegionCreate(NULL, 1); if(!pReg) return NullRegion; - FirstRect = REGION_BOXPTR(pReg); + FirstRect = RegionBoxptr(pReg); rects = FirstRect; fbPrepareAccess(&pPix->drawable); @@ -304,21 +304,21 @@ fbPixmapToRegion(PixmapPtr pPix) pReg->extents.x1 = pReg->extents.x2 = 0; else { - pReg->extents.y1 = REGION_BOXPTR(pReg)->y1; - pReg->extents.y2 = REGION_END(pReg)->y2; + pReg->extents.y1 = RegionBoxptr(pReg)->y1; + pReg->extents.y2 = RegionEnd(pReg)->y2; if (pReg->data->numRects == 1) { - xfree(pReg->data); + free(pReg->data); pReg->data = (RegDataPtr)NULL; } } fbFinishAccess(&pPix->drawable); #ifdef DEBUG - if (!miValidRegion(pReg)) + if (!RegionIsValid(pReg)) FatalError("Assertion failed file %s, line %d: expr\n", __FILE__, __LINE__); #endif - return(pReg); + return pReg; } #ifdef FB_DEBUG diff --git a/xserver/fb/fbpoint.c b/xserver/fb/fbpoint.c index c0ea8ba5b..f260a69ca 100644 --- a/xserver/fb/fbpoint.c +++ b/xserver/fb/fbpoint.c @@ -154,7 +154,7 @@ fbPolyPoint (DrawablePtr pDrawable, case 32: dots = fbDots32; break; } #endif - for (nBox = REGION_NUM_RECTS (pClip), pBox = REGION_RECTS (pClip); + for (nBox = RegionNumRects (pClip), pBox = RegionRects (pClip); nBox--; pBox++) (*dots) (dst, dstStride, dstBpp, pBox, pptInit, nptInit, pDrawable->x, pDrawable->y, dstXoff, dstYoff, and, xor); diff --git a/xserver/fb/fbpush.c b/xserver/fb/fbpush.c index 891572f0d..9d827181d 100644 --- a/xserver/fb/fbpush.c +++ b/xserver/fb/fbpush.c @@ -190,8 +190,8 @@ fbPushImage (DrawablePtr pDrawable, BoxPtr pbox; int x1, y1, x2, y2; - for (nbox = REGION_NUM_RECTS (pClip), - pbox = REGION_RECTS(pClip); + for (nbox = RegionNumRects (pClip), + pbox = RegionRects(pClip); nbox--; pbox++) { diff --git a/xserver/fb/fbscreen.c b/xserver/fb/fbscreen.c index 53e2ada9f..2502efeff 100644 --- a/xserver/fb/fbscreen.c +++ b/xserver/fb/fbscreen.c @@ -33,26 +33,23 @@ fbCloseScreen (int index, ScreenPtr pScreen) DepthPtr depths = pScreen->allowedDepths; for (d = 0; d < pScreen->numDepths; d++) - xfree (depths[d].vids); - xfree (depths); - xfree (pScreen->visuals); - xfree (pScreen->devPrivate); -#ifdef FB_SCREEN_PRIVATE - xfree (dixLookupPrivate(&pScreen->devPrivates, fbGetScreenPrivateKey())); -#endif + free(depths[d].vids); + free(depths); + free(pScreen->visuals); + free(pScreen->devPrivate); return TRUE; } Bool fbRealizeFont(ScreenPtr pScreen, FontPtr pFont) { - return (TRUE); + return TRUE; } Bool fbUnrealizeFont(ScreenPtr pScreen, FontPtr pFont) { - return (TRUE); + return TRUE; } void @@ -229,8 +226,8 @@ fbFinishScreenInit(ScreenPtr pScreen, if (!fbInitVisuals (&visuals, &depths, &nvisuals, &ndepths, &rootdepth, &defaultVisual,((unsigned long)1<<(imagebpp-1)), 8)) { - xfree (visuals); - xfree (depths); + free(visuals); + free(depths); return FALSE; } if (! miScreenInit(pScreen, pbits, xsize, ysize, dpix, dpiy, width, diff --git a/xserver/fb/fbseg.c b/xserver/fb/fbseg.c index 80ce7404e..7cc38a20c 100644 --- a/xserver/fb/fbseg.c +++ b/xserver/fb/fbseg.c @@ -250,7 +250,9 @@ fbSetFg (DrawablePtr pDrawable, { if (fg != pGC->fgPixel) { - DoChangeGC (pGC, GCForeground, (XID *) &fg, FALSE); + ChangeGCVal val; + val.val = fg; + ChangeGC (NullClient, pGC, GCForeground, &val); ValidateGC (pDrawable, pGC); } } @@ -622,8 +624,8 @@ fbSegment (DrawablePtr pDrawable, unsigned int oc1; /* outcode of point 1 */ unsigned int oc2; /* outcode of point 2 */ - nBox = REGION_NUM_RECTS (pClip); - pBox = REGION_RECTS (pClip); + nBox = RegionNumRects (pClip); + pBox = RegionRects (pClip); bres = fbSelectBres (pDrawable, pGC); diff --git a/xserver/fb/fbsetsp.c b/xserver/fb/fbsetsp.c index 227ba4c62..61dc4dc30 100644 --- a/xserver/fb/fbsetsp.c +++ b/xserver/fb/fbsetsp.c @@ -60,8 +60,8 @@ fbSetSpans (DrawablePtr pDrawable, xoff = (int) (((long) src) & (FB_MASK >> 3)); s = (FbBits *) (src - xoff); xoff <<= 3; - n = REGION_NUM_RECTS(pClip); - pbox = REGION_RECTS (pClip); + n = RegionNumRects(pClip); + pbox = RegionRects (pClip); while (n--) { if (pbox->y1 > ppt->y) diff --git a/xserver/fb/fbtrap.c b/xserver/fb/fbtrap.c index 515e2e1c1..9f5c39f65 100644 --- a/xserver/fb/fbtrap.c +++ b/xserver/fb/fbtrap.c @@ -26,8 +26,6 @@ #include "fb.h" -#ifdef RENDER - #include "picturestr.h" #include "mipict.h" #include "renderedge.h" @@ -160,4 +158,3 @@ fbAddTriangles (PicturePtr pPicture, } } -#endif /* RENDER */ diff --git a/xserver/fb/fbwindow.c b/xserver/fb/fbwindow.c index 46c033448..bb0384d91 100644 --- a/xserver/fb/fbwindow.c +++ b/xserver/fb/fbwindow.c @@ -128,15 +128,15 @@ fbCopyWindow(WindowPtr pWin, dx = ptOldOrg.x - pWin->drawable.x; dy = ptOldOrg.y - pWin->drawable.y; - REGION_TRANSLATE(pWin->drawable.pScreen, prgnSrc, -dx, -dy); + RegionTranslate(prgnSrc, -dx, -dy); - REGION_NULL (pWin->drawable.pScreen, &rgnDst); + RegionNull(&rgnDst); - REGION_INTERSECT(pWin->drawable.pScreen, &rgnDst, &pWin->borderClip, prgnSrc); + RegionIntersect(&rgnDst, &pWin->borderClip, prgnSrc); #ifdef COMPOSITE if (pPixmap->screen_x || pPixmap->screen_y) - REGION_TRANSLATE (pWin->drawable.pScreen, &rgnDst, + RegionTranslate(&rgnDst, -pPixmap->screen_x, -pPixmap->screen_y); #endif @@ -144,7 +144,7 @@ fbCopyWindow(WindowPtr pWin, 0, &rgnDst, dx, dy, fbCopyWindowProc, 0, 0); - REGION_UNINIT(pWin->drawable.pScreen, &rgnDst); + RegionUninit(&rgnDst); fbValidateDrawable (&pWin->drawable); } @@ -211,8 +211,8 @@ fbFillRegionSolid (DrawablePtr pDrawable, FbStride dstStride; int dstBpp; int dstXoff, dstYoff; - int n = REGION_NUM_RECTS(pRegion); - BoxPtr pbox = REGION_RECTS(pRegion); + int n = RegionNumRects(pRegion); + BoxPtr pbox = RegionRects(pRegion); #ifndef FB_ACCESS_WRAPPER int try_mmx = 0; diff --git a/xserver/fb/wfbrename.h b/xserver/fb/wfbrename.h index 73ee510b9..433f286e0 100644 --- a/xserver/fb/wfbrename.h +++ b/xserver/fb/wfbrename.h @@ -83,13 +83,14 @@ #define fbFixCoordModePrevious wfbFixCoordModePrevious #define fbGCFuncs wfbGCFuncs #define fbGCOps wfbGCOps -#define fbGCPrivateKey wfbGCPrivateKey +#define fbGCPrivateKeyRec wfbGCPrivateKeyRec #define fbGeneration wfbGeneration #define fbGetGCPrivateKey wfbGetGCPrivateKey #define fbGetImage wfbGetImage #define fbGetScreenPrivateKey wfbGetScreenPrivateKey #define fbGetSpans wfbGetSpans #define _fbGetWindowPixmap _wfbGetWindowPixmap +#define fbWinPrivateKeyRec wfbWinPrivateKeyRec #define fbGetWinPrivateKey wfbGetWinPrivateKey #define fbGlyph16 wfbGlyph16 #define fbGlyph24 wfbGlyph24 @@ -118,7 +119,6 @@ #define fbOverlayGeneration wfbOverlayGeneration #define fbOverlayGetScreenPrivateKey wfbOverlayGetScreenPrivateKey #define fbOverlayPaintKey wfbOverlayPaintKey -#define fbOverlayScreenPrivateKey wfbOverlayScreenPrivateKey #define fbOverlaySetupScreen wfbOverlaySetupScreen #define fbOverlayUpdateLayerRegion wfbOverlayUpdateLayerRegion #define fbOverlayWindowExposures wfbOverlayWindowExposures @@ -157,7 +157,7 @@ #define fbResolveColor wfbResolveColor #define fbRestoreAreas wfbRestoreAreas #define fbSaveAreas wfbSaveAreas -#define fbScreenPrivateKey wfbScreenPrivateKey +#define fbScreenPrivateKeyRec wfbScreenPrivateKeyRec #define fbSegment wfbSegment #define fbSelectBres wfbSelectBres #define fbSetSpans wfbSetSpans @@ -182,7 +182,7 @@ #define fbUnrealizeFont wfbUnrealizeFont #define fbValidateGC wfbValidateGC #define fbWalkCompositeRegion wfbWalkCompositeRegion -#define fbWinPrivateKey wfbWinPrivateKey +#define fbWinPrivateKeyRec wfbWinPrivateKeyRec #define fbZeroLine wfbZeroLine #define fbZeroSegment wfbZeroSegment #define free_pixman_pict wfb_free_pixman_pict diff --git a/xserver/glx/Makefile.in b/xserver/glx/Makefile.in index c0d8bc828..4c51838b9 100644 --- a/xserver/glx/Makefile.in +++ b/xserver/glx/Makefile.in @@ -127,10 +127,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -218,6 +214,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -232,6 +230,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -249,10 +248,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -308,10 +311,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -329,17 +333,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -366,20 +364,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -471,6 +472,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/glx/glxcmds.c b/xserver/glx/glxcmds.c index ec3bbe6a3..8d13c1509 100644 --- a/xserver/glx/glxcmds.c +++ b/xserver/glx/glxcmds.c @@ -196,7 +196,7 @@ __glXContextDestroy(__GLXcontext *context) static void __glXdirectContextDestroy(__GLXcontext *context) { __glXContextDestroy(context); - xfree(context); + free(context); } static __GLXcontext *__glXdirectContextCreate(__GLXscreen *screen, @@ -205,7 +205,7 @@ static __GLXcontext *__glXdirectContextCreate(__GLXscreen *screen, { __GLXcontext *context; - context = xcalloc (1, sizeof (__GLXcontext)); + context = calloc(1, sizeof (__GLXcontext)); if (context == NULL) return NULL; @@ -407,9 +407,9 @@ static int AddCurrentContext(__GLXclientState *cl, __GLXcontext *glxc) ** Didn't find a free slot, so we'll have to grow the table. */ if (!num) { - table = (__GLXcontext **) xalloc(sizeof(__GLXcontext *)); + table = (__GLXcontext **) malloc(sizeof(__GLXcontext *)); } else { - table = (__GLXcontext **) xrealloc(table, + table = (__GLXcontext **) realloc(table, (num+1)*sizeof(__GLXcontext *)); } table[num] = glxc; @@ -491,6 +491,13 @@ __glXGetDrawable(__GLXcontext *glxc, GLXDrawable drawId, ClientPtr client, return pGlxDraw; } + /* No active context and an unknown drawable, bail. */ + if (glxc == NULL) { + client->errorValue = drawId; + *error = BadMatch; + return NULL; + } + /* The drawId wasn't a GLX drawable. Make sure it's a window and * create a GLXWindow for it. Check that the drawable screen * matches the context screen and that the context fbconfig is @@ -1527,7 +1534,7 @@ DoQueryContext(__GLXclientState *cl, GLXContextID gcId) reply.n = nProps; nReplyBytes = reply.length << 2; - sendBuf = (int *)xalloc((size_t)nReplyBytes); + sendBuf = (int *)malloc((size_t)nReplyBytes); if (sendBuf == NULL) { return __glXError(GLXBadContext); /* XXX: Is this correct? */ } @@ -1545,7 +1552,7 @@ DoQueryContext(__GLXclientState *cl, GLXContextID gcId) WriteToClient(client, sz_xGLXQueryContextInfoEXTReply, (char *)&reply); WriteToClient(client, nReplyBytes, (char *)sendBuf); } - xfree((char *)sendBuf); + free((char *)sendBuf); return Success; } @@ -1947,9 +1954,9 @@ int __glXDisp_RenderLarge(__GLXclientState *cl, GLbyte *pc) */ if (cl->largeCmdBufSize < cmdlen) { if (!cl->largeCmdBuf) { - cl->largeCmdBuf = (GLbyte *) xalloc(cmdlen); + cl->largeCmdBuf = (GLbyte *) malloc(cmdlen); } else { - cl->largeCmdBuf = (GLbyte *) xrealloc(cl->largeCmdBuf, cmdlen); + cl->largeCmdBuf = (GLbyte *) realloc(cl->largeCmdBuf, cmdlen); } if (!cl->largeCmdBuf) { return BadAlloc; @@ -2351,7 +2358,7 @@ int __glXDisp_QueryExtensionsString(__GLXclientState *cl, GLbyte *pc) reply.n = n; /* Allocate buffer to make sure it's a multiple of 4 bytes big.*/ - buf = (char *) xalloc(length << 2); + buf = (char *) malloc(length << 2); if (buf == NULL) return BadAlloc; memcpy(buf, pGlxScreen->GLXextensions, n); @@ -2363,7 +2370,7 @@ int __glXDisp_QueryExtensionsString(__GLXclientState *cl, GLbyte *pc) WriteToClient(client, (int)(length << 2), (char *)buf); } - xfree(buf); + free(buf); return Success; } @@ -2407,7 +2414,7 @@ int __glXDisp_QueryServerString(__GLXclientState *cl, GLbyte *pc) reply.length = length; reply.n = n; - buf = (char *) xalloc(length << 2); + buf = (char *) malloc(length << 2); if (buf == NULL) { return BadAlloc; } @@ -2420,7 +2427,7 @@ int __glXDisp_QueryServerString(__GLXclientState *cl, GLbyte *pc) WriteToClient(client, (int)(length << 2), buf); } - xfree(buf); + free(buf); return Success; } @@ -2431,10 +2438,9 @@ int __glXDisp_ClientInfo(__GLXclientState *cl, GLbyte *pc) cl->GLClientmajorVersion = req->major; cl->GLClientminorVersion = req->minor; - if (cl->GLClientextensions) - xfree(cl->GLClientextensions); + free(cl->GLClientextensions); buf = (const char *)(req+1); - cl->GLClientextensions = xstrdup(buf); + cl->GLClientextensions = strdup(buf); return Success; } diff --git a/xserver/glx/glxdri.c b/xserver/glx/glxdri.c index e4870c319..41482c913 100644 --- a/xserver/glx/glxdri.c +++ b/xserver/glx/glxdri.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -241,7 +242,7 @@ __glXDRIdrawableDestroy(__GLXdrawable *drawable) __glXDrawableRelease(drawable); - xfree(private); + free(private); } static GLboolean @@ -298,7 +299,7 @@ __glXDRIcontextDestroy(__GLXcontext *baseContext) __glXleaveServer(GL_FALSE); __glXContextDestroy(&context->base); - xfree(context); + free(context); } static int @@ -467,7 +468,7 @@ nooverride: pRegion = NULL; } else { pRegion = DamageRegion(driDraw->pDamage); - if (REGION_NIL(pRegion)) + if (RegionNil(pRegion)) return Success; } @@ -494,7 +495,7 @@ nooverride: unsigned pitch = PixmapBytePad(pixmap->drawable.width, pixmap->drawable.depth); - data = xalloc(pitch * pixmap->drawable.height); + data = malloc(pitch * pixmap->drawable.height); __glXenterServer(GL_FALSE); pScreen->GetImage(&pixmap->drawable, 0 /*pixmap->drawable.x*/, @@ -525,13 +526,13 @@ nooverride: type, data) ); - xfree(data); + free(data); } else if (!override) { int i, numRects; BoxPtr p; - numRects = REGION_NUM_RECTS (pRegion); - p = REGION_RECTS (pRegion); + numRects = RegionNumRects (pRegion); + p = RegionRects (pRegion); CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_PIXELS, 0) ); CALL_PixelStorei( GET_DISPATCH(), (GL_UNPACK_SKIP_ROWS, 0) ); @@ -540,7 +541,7 @@ nooverride: { unsigned pitch = PixmapBytePad(p[i].x2 - p[i].x1, pixmap->drawable.depth); - void *data = xalloc(pitch * (p[i].y2 - p[i].y1)); + void *data = malloc(pitch * (p[i].y2 - p[i].y1)); __glXenterServer(GL_FALSE); pScreen->GetImage(&pixmap->drawable, /*pixmap->drawable.x +*/ p[i].x1, @@ -566,7 +567,7 @@ nooverride: type, data) ); - xfree(data); + free(data); } } @@ -606,7 +607,7 @@ __glXDRIscreenDestroy(__GLXscreen *baseScreen) __glXScreenDestroy(baseScreen); - xfree(screen); + free(screen); } static __GLXcontext * @@ -633,7 +634,7 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen, if (baseShareContext && baseShareContext->isDirect) return NULL; - context = xcalloc(1, sizeof *context); + context = calloc(1, sizeof *context); if (context == NULL) return NULL; @@ -674,7 +675,7 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen, __glXenterServer(GL_FALSE); retval = DRIDestroyContext(baseScreen->pScreen, context->hwContextID); __glXleaveServer(GL_FALSE); - xfree(context); + free(context); return NULL; } @@ -696,13 +697,13 @@ __glXDRIscreenCreateDrawable(ClientPtr client, GLboolean retval; drm_drawable_t hwDrawable; - private = xcalloc(1, sizeof *private); + private = calloc(1, sizeof *private); if (private == NULL) return NULL; if (!__glXDrawableInit(&private->base, screen, pDraw, type, glxDrawId, glxConfig)) { - xfree(private); + free(private); return NULL; } @@ -718,7 +719,7 @@ __glXDRIscreenCreateDrawable(ClientPtr client, __glXleaveServer(GL_FALSE); if (!retval) { - xfree(private); + free(private); return NULL; } @@ -734,7 +735,7 @@ __glXDRIscreenCreateDrawable(ClientPtr client, __glXenterServer(GL_FALSE); DRIDestroyDrawable(screen->pScreen, serverClient, pDraw); __glXleaveServer(GL_FALSE); - xfree(private); + free(private); return NULL; } @@ -771,7 +772,7 @@ getDrawableInfo(__DRIdrawable *driDrawable, if (retval && *numClipRects > 0) { size = sizeof (drm_clip_rect_t) * *numClipRects; - *ppClipRects = xalloc (size); + *ppClipRects = malloc(size); /* Clip cliprects to screen dimensions (redirected windows) */ if (*ppClipRects != NULL) { @@ -791,7 +792,7 @@ getDrawableInfo(__DRIdrawable *driDrawable, if (*numClipRects != j) { *numClipRects = j; - *ppClipRects = xrealloc (*ppClipRects, + *ppClipRects = realloc(*ppClipRects, sizeof (drm_clip_rect_t) * *numClipRects); } @@ -805,7 +806,7 @@ getDrawableInfo(__DRIdrawable *driDrawable, if (retval && *numBackClipRects > 0) { size = sizeof (drm_clip_rect_t) * *numBackClipRects; - *ppBackClipRects = xalloc (size); + *ppBackClipRects = malloc(size); if (*ppBackClipRects != NULL) memcpy (*ppBackClipRects, pBackClipRects, size); else @@ -831,12 +832,12 @@ static void __glXReportDamage(__DRIdrawable *driDraw, __glXenterServer(GL_FALSE); - REGION_INIT(pDraw->pScreen, ®ion, (BoxPtr) rects, num_rects); - REGION_TRANSLATE(pScreen, ®ion, pDraw->x, pDraw->y); + RegionInit(®ion, (BoxPtr) rects, num_rects); + RegionTranslate(®ion, pDraw->x, pDraw->y); DamageRegionAppend(pDraw, ®ion); /* This is wrong, this needs a seperate function. */ DamageRegionProcessPending(pDraw); - REGION_UNINIT(pDraw->pScreen, ®ion); + RegionUninit(®ion); __glXleaveServer(GL_FALSE); } @@ -865,12 +866,21 @@ static const char dri_driver_path[] = DRI_DRIVER_PATH; static Bool glxDRIEnterVT (int index, int flags) { + ScrnInfoPtr scrn = xf86Screens[index]; + Bool ret; __GLXDRIscreen *screen = (__GLXDRIscreen *) glxGetScreen(screenInfo.screens[index]); LogMessage(X_INFO, "AIGLX: Resuming AIGLX clients after VT switch\n"); - if (!(*screen->enterVT) (index, flags)) + scrn->EnterVT = screen->enterVT; + + ret = scrn->EnterVT (index, flags); + + screen->enterVT = scrn->EnterVT; + scrn->EnterVT = glxDRIEnterVT; + + if (!ret) return FALSE; glxResumeClients(); @@ -881,6 +891,7 @@ glxDRIEnterVT (int index, int flags) static void glxDRILeaveVT (int index, int flags) { + ScrnInfoPtr scrn = xf86Screens[index]; __GLXDRIscreen *screen = (__GLXDRIscreen *) glxGetScreen(screenInfo.screens[index]); @@ -888,7 +899,10 @@ glxDRILeaveVT (int index, int flags) glxSuspendClients(); - return (*screen->leaveVT) (index, flags); + scrn->LeaveVT = screen->leaveVT; + (*screen->leaveVT) (index, flags); + screen->leaveVT = scrn->LeaveVT; + scrn->LeaveVT = glxDRILeaveVT; } static void @@ -941,9 +955,6 @@ initializeExtensions(__GLXDRIscreen *screen) } } -extern __GLXconfig * -glxConvertConfigs(const __DRIcoreExtension *core, const __DRIconfig **configs); - static __GLXscreen * __glXDRIscreenProbe(ScreenPtr pScreen) { @@ -979,7 +990,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen) return NULL; } - screen = xcalloc(1, sizeof *screen); + screen = calloc(1, sizeof *screen); if (screen == NULL) return NULL; @@ -1133,7 +1144,8 @@ __glXDRIscreenProbe(ScreenPtr pScreen) goto handle_error; } - screen->base.fbconfigs = glxConvertConfigs(screen->core, driConfigs); + screen->base.fbconfigs = glxConvertConfigs(screen->core, + driConfigs, GLX_WINDOW_BIT); initializeExtensions(screen); @@ -1149,7 +1161,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen) buffer_size = __glXGetExtensionString(screen->glx_enable_bits, NULL); if (buffer_size > 0) { if (screen->base.GLXextensions != NULL) { - xfree(screen->base.GLXextensions); + free(screen->base.GLXextensions); } screen->base.GLXextensions = xnfalloc(buffer_size); @@ -1184,7 +1196,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen) if (screen->driver) dlclose(screen->driver); - xfree(screen); + free(screen); LogMessage(X_ERROR, "AIGLX: reverting to software rendering\n"); diff --git a/xserver/glx/glxdri2.c b/xserver/glx/glxdri2.c index a580df381..c2305ad90 100644 --- a/xserver/glx/glxdri2.c +++ b/xserver/glx/glxdri2.c @@ -107,7 +107,7 @@ __glXDRIdrawableDestroy(__GLXdrawable *drawable) __glXDrawableRelease(drawable); - xfree(private); + free(private); } static void @@ -122,7 +122,7 @@ __glXDRIdrawableCopySubBuffer(__GLXdrawable *drawable, box.y1 = private->height - y - h; box.x2 = x + w; box.y2 = private->height - y; - REGION_INIT(drawable->pDraw->pScreen, ®ion, &box, 0); + RegionInit(®ion, &box, 0); DRI2CopyRegion(drawable->pDraw, ®ion, DRI2BufferFrontLeft, DRI2BufferBackLeft); @@ -139,7 +139,7 @@ __glXDRIdrawableWaitX(__GLXdrawable *drawable) box.y1 = 0; box.x2 = private->width; box.y2 = private->height; - REGION_INIT(drawable->pDraw->pScreen, ®ion, &box, 0); + RegionInit(®ion, &box, 0); DRI2CopyRegion(drawable->pDraw, ®ion, DRI2BufferFakeFrontLeft, DRI2BufferFrontLeft); @@ -156,7 +156,7 @@ __glXDRIdrawableWaitGL(__GLXdrawable *drawable) box.y1 = 0; box.x2 = private->width; box.y2 = private->height; - REGION_INIT(drawable->pDraw->pScreen, ®ion, &box, 0); + RegionInit(®ion, &box, 0); DRI2CopyRegion(drawable->pDraw, ®ion, DRI2BufferFrontLeft, DRI2BufferFakeFrontLeft); @@ -187,7 +187,6 @@ __glXdriSwapEvent(ClientPtr client, void *data, int type, CARD64 ust, /* unknown swap completion type */ break; } - wire.sequenceNumber = client->sequence; wire.drawable = drawable->drawId; wire.ust_hi = ust >> 32; wire.ust_lo = ust & 0xffffffff; @@ -248,7 +247,7 @@ __glXDRIcontextDestroy(__GLXcontext *baseContext) (*screen->core->destroyContext)(context->driContext); __glXContextDestroy(&context->base); - xfree(context); + free(context); } static int @@ -386,7 +385,7 @@ __glXDRIscreenDestroy(__GLXscreen *baseScreen) __glXScreenDestroy(baseScreen); - xfree(screen); + free(screen); } static __GLXcontext * @@ -405,7 +404,7 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen, else driShare = NULL; - context = xcalloc(1, sizeof *context); + context = calloc(1, sizeof *context); if (context == NULL) return NULL; @@ -422,13 +421,25 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen, config->driConfig, driShare, context); if (context->driContext == NULL) { - xfree(context); + free(context); return NULL; } return &context->base; } +static void +__glXDRIinvalidateBuffers(DrawablePtr pDraw, void *priv) +{ +#if __DRI2_FLUSH_VERSION >= 3 + __GLXDRIdrawable *private = priv; + __GLXDRIscreen *screen = private->screen; + + if (screen->flush) + (*screen->flush->invalidate)(private->driDrawable); +#endif +} + static __GLXdrawable * __glXDRIscreenCreateDrawable(ClientPtr client, __GLXscreen *screen, @@ -442,14 +453,14 @@ __glXDRIscreenCreateDrawable(ClientPtr client, __GLXDRIconfig *config = (__GLXDRIconfig *) glxConfig; __GLXDRIdrawable *private; - private = xcalloc(1, sizeof *private); + private = calloc(1, sizeof *private); if (private == NULL) return NULL; private->screen = driScreen; if (!__glXDrawableInit(&private->base, screen, pDraw, type, glxDrawId, glxConfig)) { - xfree(private); + free(private); return NULL; } @@ -459,8 +470,9 @@ __glXDRIscreenCreateDrawable(ClientPtr client, private->base.waitGL = __glXDRIdrawableWaitGL; private->base.waitX = __glXDRIdrawableWaitX; - if (DRI2CreateDrawable(client, pDraw, drawId)) { - xfree(private); + if (DRI2CreateDrawable(client, pDraw, drawId, + __glXDRIinvalidateBuffers, private)) { + free(private); return NULL; } @@ -573,9 +585,18 @@ static const __DRIdri2LoaderExtension loaderExtension = { dri2GetBuffersWithFormat, }; +#ifdef __DRI_USE_INVALIDATE +static const __DRIuseInvalidateExtension dri2UseInvalidate = { + { __DRI_USE_INVALIDATE, __DRI_USE_INVALIDATE_VERSION } +}; +#endif + static const __DRIextension *loader_extensions[] = { &systemTimeExtension.base, &loaderExtension.base, +#ifdef __DRI_USE_INVALIDATE + &dri2UseInvalidate, +#endif NULL }; @@ -584,12 +605,21 @@ static const char dri_driver_path[] = DRI_DRIVER_PATH; static Bool glxDRIEnterVT (int index, int flags) { + ScrnInfoPtr scrn = xf86Screens[index]; + Bool ret; __GLXDRIscreen *screen = (__GLXDRIscreen *) glxGetScreen(screenInfo.screens[index]); LogMessage(X_INFO, "AIGLX: Resuming AIGLX clients after VT switch\n"); - if (!(*screen->enterVT) (index, flags)) + scrn->EnterVT = screen->enterVT; + + ret = scrn->EnterVT (index, flags); + + screen->enterVT = scrn->EnterVT; + scrn->EnterVT = glxDRIEnterVT; + + if (!ret) return FALSE; glxResumeClients(); @@ -600,6 +630,7 @@ glxDRIEnterVT (int index, int flags) static void glxDRILeaveVT (int index, int flags) { + ScrnInfoPtr scrn = xf86Screens[index]; __GLXDRIscreen *screen = (__GLXDRIscreen *) glxGetScreen(screenInfo.screens[index]); @@ -607,7 +638,10 @@ glxDRILeaveVT (int index, int flags) glxSuspendClients(); - return (*screen->leaveVT) (index, flags); + scrn->LeaveVT = screen->leaveVT; + (*screen->leaveVT) (index, flags); + screen->leaveVT = scrn->LeaveVT; + scrn->LeaveVT = glxDRILeaveVT; } static void @@ -676,7 +710,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen) const __DRIconfig **driConfigs; int i; - screen = xcalloc(1, sizeof *screen); + screen = calloc(1, sizeof *screen); if (screen == NULL) return NULL; @@ -745,7 +779,10 @@ __glXDRIscreenProbe(ScreenPtr pScreen) initializeExtensions(screen); - screen->base.fbconfigs = glxConvertConfigs(screen->core, driConfigs); + screen->base.fbconfigs = glxConvertConfigs(screen->core, driConfigs, + GLX_WINDOW_BIT | + GLX_PIXMAP_BIT | + GLX_PBUFFER_BIT); __glXScreenInit(&screen->base, pScreen); @@ -756,7 +793,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen) buffer_size = __glXGetExtensionString(screen->glx_enable_bits, NULL); if (buffer_size > 0) { if (screen->base.GLXextensions != NULL) { - xfree(screen->base.GLXextensions); + free(screen->base.GLXextensions); } screen->base.GLXextensions = xnfalloc(buffer_size); @@ -790,7 +827,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen) if (screen->driver) dlclose(screen->driver); - xfree(screen); + free(screen); LogMessage(X_ERROR, "AIGLX: reverting to software rendering\n"); diff --git a/xserver/glx/glxdricommon.c b/xserver/glx/glxdricommon.c index faaa3b7ae..86797a0ef 100644 --- a/xserver/glx/glxdricommon.c +++ b/xserver/glx/glxdricommon.c @@ -121,13 +121,13 @@ setScalar(__GLXconfig *config, unsigned int attrib, unsigned int value) static __GLXconfig * createModeFromConfig(const __DRIcoreExtension *core, const __DRIconfig *driConfig, - unsigned int visualType) + unsigned int visualType, unsigned int drawableType) { __GLXDRIconfig *config; unsigned int attrib, value; int i; - config = xalloc(sizeof *config); + config = malloc(sizeof *config); config->driConfig = driConfig; @@ -167,13 +167,14 @@ createModeFromConfig(const __DRIcoreExtension *core, config->config.next = NULL; config->config.xRenderable = GL_TRUE; config->config.visualType = visualType; - config->config.drawableType = GLX_WINDOW_BIT | GLX_PIXMAP_BIT; + config->config.drawableType = drawableType; return &config->config; } __GLXconfig * -glxConvertConfigs(const __DRIcoreExtension *core, const __DRIconfig **configs) +glxConvertConfigs(const __DRIcoreExtension *core, + const __DRIconfig **configs, unsigned int drawableType) { __GLXconfig head, *tail; int i; @@ -183,7 +184,8 @@ glxConvertConfigs(const __DRIcoreExtension *core, const __DRIconfig **configs) for (i = 0; configs[i]; i++) { tail->next = createModeFromConfig(core, - configs[i], GLX_TRUE_COLOR); + configs[i], GLX_TRUE_COLOR, + drawableType); if (tail->next == NULL) break; @@ -192,7 +194,8 @@ glxConvertConfigs(const __DRIcoreExtension *core, const __DRIconfig **configs) for (i = 0; configs[i]; i++) { tail->next = createModeFromConfig(core, - configs[i], GLX_DIRECT_COLOR); + configs[i], GLX_DIRECT_COLOR, + drawableType); if (tail->next == NULL) break; diff --git a/xserver/glx/glxdricommon.h b/xserver/glx/glxdricommon.h index f88964b36..41e2d2770 100644 --- a/xserver/glx/glxdricommon.h +++ b/xserver/glx/glxdricommon.h @@ -33,7 +33,8 @@ struct __GLXDRIconfig { }; __GLXconfig * -glxConvertConfigs(const __DRIcoreExtension *core, const __DRIconfig **configs); +glxConvertConfigs(const __DRIcoreExtension *core, + const __DRIconfig **configs, unsigned int drawableType); extern const __DRIsystemTimeExtension systemTimeExtension; diff --git a/xserver/glx/glxdriswrast.c b/xserver/glx/glxdriswrast.c index 6a34393dd..54f4440a3 100644 --- a/xserver/glx/glxdriswrast.c +++ b/xserver/glx/glxdriswrast.c @@ -104,7 +104,7 @@ __glXDRIdrawableDestroy(__GLXdrawable *drawable) __glXDrawableRelease(drawable); - xfree(private); + free(private); } static GLboolean @@ -138,7 +138,7 @@ __glXDRIcontextDestroy(__GLXcontext *baseContext) (*screen->core->destroyContext)(context->driContext); __glXContextDestroy(&context->base); - xfree(context); + free(context); } static int @@ -254,7 +254,7 @@ __glXDRIscreenDestroy(__GLXscreen *baseScreen) __glXScreenDestroy(baseScreen); - xfree(screen); + free(screen); } static __GLXcontext * @@ -274,7 +274,7 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen, else driShare = NULL; - context = xcalloc(1, sizeof *context); + context = calloc(1, sizeof *context); if (context == NULL) return NULL; @@ -292,14 +292,6 @@ __glXDRIscreenCreateContext(__GLXscreen *baseScreen, return &context->base; } -static void -glxChangeGC(GCPtr gc, BITS32 mask, CARD32 val) -{ - CARD32 v[1]; - v[0] = val; - dixChangeGC(NullClient, gc, mask, v, NULL); -} - static __GLXdrawable * __glXDRIscreenCreateDrawable(ClientPtr client, __GLXscreen *screen, @@ -309,20 +301,21 @@ __glXDRIscreenCreateDrawable(ClientPtr client, XID glxDrawId, __GLXconfig *glxConfig) { + ChangeGCVal gcvals[2]; __GLXDRIscreen *driScreen = (__GLXDRIscreen *) screen; __GLXDRIconfig *config = (__GLXDRIconfig *) glxConfig; __GLXDRIdrawable *private; ScreenPtr pScreen = driScreen->base.pScreen; - private = xcalloc(1, sizeof *private); + private = calloc(1, sizeof *private); if (private == NULL) return NULL; private->screen = driScreen; if (!__glXDrawableInit(&private->base, screen, pDraw, type, glxDrawId, glxConfig)) { - xfree(private); + free(private); return NULL; } @@ -333,9 +326,10 @@ __glXDRIscreenCreateDrawable(ClientPtr client, private->gc = CreateScratchGC(pScreen, pDraw->depth); private->swapgc = CreateScratchGC(pScreen, pDraw->depth); - glxChangeGC(private->gc, GCFunction, GXcopy); - glxChangeGC(private->swapgc, GCFunction, GXcopy); - glxChangeGC(private->swapgc, GCGraphicsExposures, FALSE); + gcvals[0].val = GXcopy; + ChangeGC(NullClient, private->gc, GCFunction, gcvals); + gcvals[1].val = FALSE; + ChangeGC(NullClient, private->swapgc, GCFunction | GCGraphicsExposures, gcvals); private->driDrawable = (*driScreen->swrast->createNewDrawable)(driScreen->driScreen, @@ -450,7 +444,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen) const __DRIconfig **driConfigs; int i; - screen = xcalloc(1, sizeof *screen); + screen = calloc(1, sizeof *screen); if (screen == NULL) return NULL; @@ -508,7 +502,10 @@ __glXDRIscreenProbe(ScreenPtr pScreen) initializeExtensions(screen); - screen->base.fbconfigs = glxConvertConfigs(screen->core, driConfigs); + screen->base.fbconfigs = glxConvertConfigs(screen->core, driConfigs, + GLX_WINDOW_BIT | + GLX_PIXMAP_BIT | + GLX_PBUFFER_BIT); __glXScreenInit(&screen->base, pScreen); @@ -524,7 +521,7 @@ __glXDRIscreenProbe(ScreenPtr pScreen) if (screen->driver) dlclose(screen->driver); - xfree(screen); + free(screen); LogMessage(X_ERROR, "GLX: could not load software renderer\n"); diff --git a/xserver/glx/glxext.c b/xserver/glx/glxext.c index 89e58b0b0..f5ebe4f7e 100644 --- a/xserver/glx/glxext.c +++ b/xserver/glx/glxext.c @@ -65,8 +65,8 @@ RESTYPE __glXSwapBarrierRes; */ xGLXSingleReply __glXReply; -static int glxClientPrivateKeyIndex; -static DevPrivateKey glxClientPrivateKey = &glxClientPrivateKeyIndex; +static DevPrivateKeyRec glxClientPrivateKeyRec; +#define glxClientPrivateKey (&glxClientPrivateKeyRec) /* ** Client that called into GLX dispatch. @@ -124,7 +124,7 @@ static int glxBlockClients; */ static Bool DrawableGone(__GLXdrawable *glxPriv, XID xid) { - __GLXcontext *c; + __GLXcontext *c, *next; /* If this drawable was created using glx 1.3 drawable * constructors, we added it as a glx drawable resource under both @@ -137,7 +137,8 @@ static Bool DrawableGone(__GLXdrawable *glxPriv, XID xid) FreeResourceByType(glxPriv->drawId, __glXDrawableRes, TRUE); } - for (c = glxAllContexts; c; c = c->next) { + for (c = glxAllContexts; c; c = next) { + next = c->next; if (c->isCurrent && (c->drawPriv == glxPriv || c->readPriv == glxPriv)) { int i; @@ -160,15 +161,13 @@ static Bool DrawableGone(__GLXdrawable *glxPriv, XID xid) } } } - - if (!c->idExists) { - __glXFreeContext(c); - } } if (c->drawPriv == glxPriv) c->drawPriv = NULL; if (c->readPriv == glxPriv) c->readPriv = NULL; + if (!c->idExists && !c->isCurrent) + __glXFreeContext(c); } glxPriv->destroy(glxPriv); @@ -205,8 +204,8 @@ GLboolean __glXFreeContext(__GLXcontext *cx) { if (cx->idExists || cx->isCurrent) return GL_FALSE; - if (cx->feedbackBuf) xfree(cx->feedbackBuf); - if (cx->selectBuf) xfree(cx->selectBuf); + free(cx->feedbackBuf); + free(cx->selectBuf); if (cx == __glXLastContext) { __glXFlushContextCache(); } @@ -323,10 +322,10 @@ glxClientCallback (CallbackListPtr *list, } } - if (cl->returnBuf) xfree(cl->returnBuf); - if (cl->largeCmdBuf) xfree(cl->largeCmdBuf); - if (cl->currentContexts) xfree(cl->currentContexts); - if (cl->GLClientextensions) xfree(cl->GLClientextensions); + free(cl->returnBuf); + free(cl->largeCmdBuf); + free(cl->currentContexts); + free(cl->GLClientextensions); break; default: @@ -364,7 +363,7 @@ void GlxExtensionInit(void) if (!__glXContextRes || !__glXDrawableRes || !__glXSwapBarrierRes) return; - if (!dixRequestPrivate(glxClientPrivateKey, sizeof (__GLXclientState))) + if (!dixRegisterPrivateKey(&glxClientPrivateKeyRec, PRIVATE_CLIENT, sizeof (__GLXclientState))) return; if (!AddCallback (&ClientStateCallback, glxClientCallback, 0)) return; @@ -583,7 +582,7 @@ static int __glXDispatch(ClientPtr client) ResetCurrentRequest(client); client->sequence--; IgnoreClient(client); - return(client->noClientException); + return Success; } /* diff --git a/xserver/glx/glxscreens.c b/xserver/glx/glxscreens.c index b75aea6f2..8515e14d5 100644 --- a/xserver/glx/glxscreens.c +++ b/xserver/glx/glxscreens.c @@ -44,8 +44,8 @@ #include "glxext.h" #include "protocol-versions.h" -static int glxScreenPrivateKeyIndex; -static DevPrivateKey glxScreenPrivateKey = &glxScreenPrivateKeyIndex; +static DevPrivateKeyRec glxScreenPrivateKeyRec; +#define glxScreenPrivateKey (&glxScreenPrivateKeyRec) const char GLServerVersion[] = "1.4"; static const char GLServerExtensions[] = @@ -352,10 +352,13 @@ void __glXScreenInit(__GLXscreen *pGlxScreen, ScreenPtr pScreen) __GLXconfig *config; int i; + if (!dixRegisterPrivateKey(&glxScreenPrivateKeyRec, PRIVATE_SCREEN, 0)) + return; + pGlxScreen->pScreen = pScreen; - pGlxScreen->GLextensions = xstrdup(GLServerExtensions); - pGlxScreen->GLXvendor = xstrdup(GLXServerVendorName); - pGlxScreen->GLXextensions = xstrdup(GLXServerExtensions); + pGlxScreen->GLextensions = strdup(GLServerExtensions); + pGlxScreen->GLXvendor = strdup(GLXServerVendorName); + pGlxScreen->GLXextensions = strdup(GLXServerExtensions); /* All GLX providers must support all of the functionality required for at * least GLX 1.2. If the provider supports a higher version, the GLXminor @@ -378,7 +381,7 @@ void __glXScreenInit(__GLXscreen *pGlxScreen, ScreenPtr pScreen) pGlxScreen->numFBConfigs = i; pGlxScreen->visuals = - xcalloc(pGlxScreen->numFBConfigs, sizeof (__GLXconfig *)); + calloc(pGlxScreen->numFBConfigs, sizeof (__GLXconfig *)); /* First, try to choose featureful FBconfigs for the existing X visuals. * Note that if multiple X visuals end up with the same FBconfig being @@ -436,7 +439,7 @@ void __glXScreenInit(__GLXscreen *pGlxScreen, ScreenPtr pScreen) void __glXScreenDestroy(__GLXscreen *screen) { - xfree(screen->GLXvendor); - xfree(screen->GLXextensions); - xfree(screen->GLextensions); + free(screen->GLXvendor); + free(screen->GLXextensions); + free(screen->GLextensions); } diff --git a/xserver/glx/indirect_util.c b/xserver/glx/indirect_util.c index 44309104e..46a270695 100644 --- a/xserver/glx/indirect_util.c +++ b/xserver/glx/indirect_util.c @@ -88,7 +88,7 @@ __glXGetAnswerBuffer( __GLXclientState * cl, size_t required_size, intptr_t temp_buf; if ( cl->returnBufSize < worst_case_size ) { - void * temp = xrealloc( cl->returnBuf, worst_case_size ); + void * temp = realloc( cl->returnBuf, worst_case_size ); if ( temp == NULL ) { return NULL; diff --git a/xserver/glx/single2.c b/xserver/glx/single2.c index 3d662e525..b81abc65c 100644 --- a/xserver/glx/single2.c +++ b/xserver/glx/single2.c @@ -62,7 +62,7 @@ int __glXDisp_FeedbackBuffer(__GLXclientState *cl, GLbyte *pc) size = *(GLsizei *)(pc+0); type = *(GLenum *)(pc+4); if (cx->feedbackBufSize < size) { - cx->feedbackBuf = (GLfloat *) xrealloc(cx->feedbackBuf, + cx->feedbackBuf = (GLfloat *) realloc(cx->feedbackBuf, (size_t)size * __GLX_SIZE_FLOAT32); if (!cx->feedbackBuf) { @@ -90,7 +90,7 @@ int __glXDisp_SelectBuffer(__GLXclientState *cl, GLbyte *pc) pc += __GLX_SINGLE_HDR_SIZE; size = *(GLsizei *)(pc+0); if (cx->selectBufSize < size) { - cx->selectBuf = (GLuint *) xrealloc(cx->selectBuf, + cx->selectBuf = (GLuint *) realloc(cx->selectBuf, (size_t) size * __GLX_SIZE_CARD32); if (!cx->selectBuf) { @@ -261,21 +261,19 @@ char *__glXcombine_strings(const char *cext_string, const char *sext_string) clen = strlen(cext_string); slen = strlen(sext_string); if (clen > slen) { - combo_string = (char *) xalloc(slen + 2); - s1 = (char *) xalloc(slen + 2); + combo_string = (char *) malloc(slen + 2); + s1 = (char *) malloc(slen + 2); if (s1) strcpy(s1, sext_string); s2 = cext_string; } else { - combo_string = (char *) xalloc(clen + 2); - s1 = (char *) xalloc(clen + 2); + combo_string = (char *) malloc(clen + 2); + s1 = (char *) malloc(clen + 2); if (s1) strcpy(s1, cext_string); s2 = sext_string; } if (!combo_string || !s1) { - if (combo_string) - xfree(combo_string); - if (s1) - xfree(s1); + free(combo_string); + free(s1); return NULL; } combo_string[0] = '\0'; @@ -302,7 +300,7 @@ char *__glXcombine_strings(const char *cext_string, const char *sext_string) /* Get next extension token */ token = strtok( NULL, SEPARATOR); } - xfree(s1); + free(s1); return combo_string; } @@ -349,14 +347,14 @@ int DoGetString(__GLXclientState *cl, GLbyte *pc, GLboolean need_swap) buf = __glXcombine_strings(buf1, cx->pGlxScreen->GLextensions); if (buf1 != NULL) { - xfree(buf1); + free(buf1); } string = buf; } else if ( name == GL_VERSION ) { if ( atof( string ) > atof( GLServerVersion ) ) { size_t len = strlen( string ) + strlen( GLServerVersion ) + 4; - buf = xalloc( len ); + buf = malloc( len ); if ( buf == NULL ) { string = GLServerVersion; } @@ -381,7 +379,7 @@ int DoGetString(__GLXclientState *cl, GLbyte *pc, GLboolean need_swap) __GLX_SEND_HEADER(); WriteToClient(client, length, (char *) string); if (buf != NULL) - xfree(buf); + free(buf); return Success; } diff --git a/xserver/glx/single2swap.c b/xserver/glx/single2swap.c index cf83bdc88..04e50b407 100644 --- a/xserver/glx/single2swap.c +++ b/xserver/glx/single2swap.c @@ -62,7 +62,7 @@ int __glXDispSwap_FeedbackBuffer(__GLXclientState *cl, GLbyte *pc) size = *(GLsizei *)(pc+0); type = *(GLenum *)(pc+4); if (cx->feedbackBufSize < size) { - cx->feedbackBuf = (GLfloat *) xrealloc(cx->feedbackBuf, + cx->feedbackBuf = (GLfloat *) realloc(cx->feedbackBuf, (size_t) size * __GLX_SIZE_FLOAT32); if (!cx->feedbackBuf) { @@ -93,7 +93,7 @@ int __glXDispSwap_SelectBuffer(__GLXclientState *cl, GLbyte *pc) __GLX_SWAP_INT(pc+0); size = *(GLsizei *)(pc+0); if (cx->selectBufSize < size) { - cx->selectBuf = (GLuint *) xrealloc(cx->selectBuf, + cx->selectBuf = (GLuint *) realloc(cx->selectBuf, (size_t) size * __GLX_SIZE_CARD32); if (!cx->selectBuf) { diff --git a/xserver/glx/singlesize.c b/xserver/glx/singlesize.c index 9e95dd3d3..6149b614c 100644 --- a/xserver/glx/singlesize.c +++ b/xserver/glx/singlesize.c @@ -77,7 +77,7 @@ GLint __glGetMap_size(GLenum target, GLenum query) /* ** The query above might fail, but then order will be zero anyway. */ - return (order * k); + return order * k; case GL_DOMAIN: return 2; case GL_ORDER: @@ -101,7 +101,7 @@ GLint __glGetMap_size(GLenum target, GLenum query) /* ** The query above might fail, but then majorMinor will be zeroes */ - return (majorMinor[0] * majorMinor[1] * k); + return majorMinor[0] * majorMinor[1] * k; case GL_DOMAIN: return 4; case GL_ORDER: diff --git a/xserver/glx/unpack.h b/xserver/glx/unpack.h index 90cb71bd7..a4e6d7e84 100644 --- a/xserver/glx/unpack.h +++ b/xserver/glx/unpack.h @@ -86,7 +86,7 @@ extern xGLXSingleReply __glXReply; if ((size) > sizeof(answerBuffer)) { \ int bump; \ if ((cl)->returnBufSize < (size)+(align)) { \ - (cl)->returnBuf = (GLbyte*)Xrealloc((cl)->returnBuf, \ + (cl)->returnBuf = (GLbyte*)realloc((cl)->returnBuf, \ (size)+(align)); \ if (!(cl)->returnBuf) { \ return BadAlloc; \ diff --git a/xserver/glx/xfont.c b/xserver/glx/xfont.c index b8b466d87..b4081cfd4 100644 --- a/xserver/glx/xfont.c +++ b/xserver/glx/xfont.c @@ -46,8 +46,6 @@ #include #include -extern XID clientErrorValue; /* imported kludge from dix layer */ - /* ** Make a single GL bitmap from a single X glyph */ @@ -76,7 +74,7 @@ static int __glXMakeBitmapFromGlyph(FontPtr font, CharInfoPtr pci) p = buf; allocbuf = 0; } else { - p = (unsigned char *) xalloc(allocBytes); + p = (unsigned char *) malloc(allocBytes); if (!p) return BadAlloc; allocbuf = p; @@ -99,9 +97,7 @@ static int __glXMakeBitmapFromGlyph(FontPtr font, CharInfoPtr pci) pci->metrics.characterWidth, 0, allocbuf ? allocbuf : buf) ); - if (allocbuf) { - xfree(allocbuf); - } + free(allocbuf); return Success; #undef __GL_CHAR_BUF_SIZE } @@ -155,7 +151,6 @@ int __glXDisp_UseXFont(__GLXclientState *cl, GLbyte *pc) ClientPtr client = cl->client; xGLXUseXFontReq *req; FontPtr pFont; - GC *pGC; GLuint currentListIndex; __GLXcontext *cx; int error; @@ -181,19 +176,9 @@ int __glXDisp_UseXFont(__GLXclientState *cl, GLbyte *pc) ** containing a font. */ - error = dixLookupResourceByType((pointer *)&pFont, - req->font, RT_FONT, - client, DixReadAccess); - if (error != Success) { - error = dixLookupResourceByType((pointer *)&pGC, - req->font, RT_GC, - client, DixReadAccess); - if (error != Success) { - client->errorValue = req->font; - return error == BadGC ? BadFont : error; - } - pFont = pGC->font; - } + error = dixLookupFontable(&pFont, req->font, client, DixReadAccess); + if (error != Success) + return error; return MakeBitmapsFromFont(pFont, req->first, req->count, req->listBase); diff --git a/xserver/hw/Makefile.in b/xserver/hw/Makefile.in index a7fc79b79..56a2189b3 100644 --- a/xserver/hw/Makefile.in +++ b/xserver/hw/Makefile.in @@ -100,10 +100,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -191,6 +187,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -205,6 +203,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -222,10 +221,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -281,10 +284,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -302,17 +306,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -339,20 +337,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -444,6 +445,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/dmx/Makefile.in b/xserver/hw/dmx/Makefile.in index 0b7f75ec8..bcec2c9d9 100644 --- a/xserver/hw/dmx/Makefile.in +++ b/xserver/hw/dmx/Makefile.in @@ -150,10 +150,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -241,6 +237,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -255,6 +253,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -272,10 +271,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -331,10 +334,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -352,10 +356,6 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = \ -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \ -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' @@ -364,8 +364,6 @@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -392,20 +390,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -506,6 +507,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/dmx/config/Makefile.in b/xserver/hw/dmx/config/Makefile.in index 581381ba7..80a7a481b 100644 --- a/xserver/hw/dmx/config/Makefile.in +++ b/xserver/hw/dmx/config/Makefile.in @@ -140,10 +140,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -231,6 +227,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -245,6 +243,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -262,10 +261,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -321,10 +324,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -342,17 +346,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -379,20 +377,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -484,6 +485,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/dmx/config/dmxparse.c b/xserver/hw/dmx/config/dmxparse.c index 28a1835af..35f1c2185 100644 --- a/xserver/hw/dmx/config/dmxparse.c +++ b/xserver/hw/dmx/config/dmxparse.c @@ -98,7 +98,7 @@ const char *dmxConfigCopyString(const char *string, int length) void dmxConfigFree(void *area) { - if (area) free(area); + free(area); } DMXConfigTokenPtr dmxConfigCreateToken(int token, int line, @@ -370,7 +370,7 @@ DMXConfigOptionPtr dmxConfigCreateOption(DMXConfigTokenPtr pStart, void dmxConfigFreeOption(DMXConfigOptionPtr p) { if (!p) return; - if (p->string) free(p->string); + free(p->string); dmxConfigFreeToken(p->start); dmxConfigFreeString(p->option); dmxConfigFreeToken(p->end); diff --git a/xserver/hw/dmx/dmx.c b/xserver/hw/dmx/dmx.c index a1afe76cf..5718b6a59 100644 --- a/xserver/hw/dmx/dmx.c +++ b/xserver/hw/dmx/dmx.c @@ -235,7 +235,7 @@ static int ProcDMXQueryVersion(ClientPtr client) swapl(&rep.patchVersion, n); } WriteToClient(client, sizeof(xDMXQueryVersionReply), (char *)&rep); - return client->noClientException; + return Success; } static int ProcDMXSync(ClientPtr client) @@ -257,7 +257,7 @@ static int ProcDMXSync(ClientPtr client) swapl(&rep.status, n); } WriteToClient(client, sizeof(xDMXSyncReply), (char *)&rep); - return client->noClientException; + return Success; } static int ProcDMXForceWindowCreation(ClientPtr client) @@ -326,7 +326,7 @@ static int ProcDMXGetScreenCount(ClientPtr client) swapl(&rep.screenCount, n); } WriteToClient(client, sizeof(xDMXGetScreenCountReply), (char *)&rep); - return client->noClientException; + return Success; } static int ProcDMXGetScreenAttributes(ClientPtr client) @@ -384,7 +384,7 @@ static int ProcDMXGetScreenAttributes(ClientPtr client) } WriteToClient(client, sizeof(xDMXGetScreenAttributesReply), (char *)&rep); if (length) WriteToClient(client, length, (char *)attr.displayName); - return client->noClientException; + return Success; } static int ProcDMXChangeScreensAttributes(ClientPtr client) @@ -419,7 +419,7 @@ static int ProcDMXChangeScreensAttributes(ClientPtr client) if (!_DMXXineramaActive()) goto noxinerama; - if (!(attribs = xalloc(stuff->screenCount * sizeof(*attribs)))) + if (!(attribs = malloc(stuff->screenCount * sizeof(*attribs)))) return BadAlloc; for (i = 0; i < stuff->screenCount; i++) { @@ -438,7 +438,7 @@ static int ProcDMXChangeScreensAttributes(ClientPtr client) &errorScreen); #endif - xfree(attribs); + free(attribs); if (status == BadValue) return status; @@ -457,7 +457,7 @@ static int ProcDMXChangeScreensAttributes(ClientPtr client) WriteToClient(client, sizeof(xDMXChangeScreensAttributesReply), (char *)&rep); - return client->noClientException; + return Success; } static int ProcDMXAddScreen(ClientPtr client) @@ -484,7 +484,7 @@ static int ProcDMXAddScreen(ClientPtr client) value_list = (CARD32 *)(stuff + 1); count = dmxFetchScreenAttributes(stuff->valueMask, &attr, value_list); - if (!(name = xalloc(stuff->displayNameLength + 1 + 4))) + if (!(name = malloc(stuff->displayNameLength + 1 + 4))) return BadAlloc; memcpy(name, &value_list[count], stuff->displayNameLength); name[stuff->displayNameLength] = '\0'; @@ -492,7 +492,7 @@ static int ProcDMXAddScreen(ClientPtr client) status = dmxAttachScreen(stuff->physicalScreen, &attr); - xfree(name); + free(name); rep.type = X_Reply; rep.sequenceNumber = client->sequence; @@ -508,7 +508,7 @@ static int ProcDMXAddScreen(ClientPtr client) WriteToClient(client, sizeof(xDMXAddScreenReply), (char *)&rep); - return client->noClientException; + return Success; } static int ProcDMXRemoveScreen(ClientPtr client) @@ -534,7 +534,7 @@ static int ProcDMXRemoveScreen(ClientPtr client) WriteToClient(client, sizeof(xDMXRemoveScreenReply), (char *)&rep); - return client->noClientException; + return Success; } @@ -612,30 +612,30 @@ static int ProcDMXGetWindowAttributes(ClientPtr client) REQUEST_SIZE_MATCH(xDMXGetWindowAttributesReq); - if (!(screens = xalloc(count * sizeof(*screens)))) + if (!(screens = malloc(count * sizeof(*screens)))) return BadAlloc; - if (!(windows = xalloc(count * sizeof(*windows)))) { - xfree(screens); + if (!(windows = malloc(count * sizeof(*windows)))) { + free(screens); return BadAlloc; } - if (!(pos = xalloc(count * sizeof(*pos)))) { - xfree(windows); - xfree(screens); + if (!(pos = malloc(count * sizeof(*pos)))) { + free(windows); + free(screens); return BadAlloc; } - if (!(vis = xalloc(count * sizeof(*vis)))) { - xfree(pos); - xfree(windows); - xfree(screens); + if (!(vis = malloc(count * sizeof(*vis)))) { + free(pos); + free(windows); + free(screens); return BadAlloc; } if ((count = dmxPopulate(client, stuff->window, screens, windows, pos, vis)) < 0) { - xfree(vis); - xfree(pos); - xfree(windows); - xfree(screens); + free(vis); + free(pos); + free(windows); + free(screens); return BadWindow; } @@ -673,12 +673,12 @@ static int ProcDMXGetWindowAttributes(ClientPtr client) WriteToClient(client, count * sizeof(*vis), (char *)vis); } - xfree(vis); - xfree(pos); - xfree(windows); - xfree(screens); + free(vis); + free(pos); + free(windows); + free(screens); - return client->noClientException; + return Success; } static int ProcDMXGetDesktopAttributes(ClientPtr client) @@ -709,7 +709,7 @@ static int ProcDMXGetDesktopAttributes(ClientPtr client) swapl(&rep.shiftY, n); } WriteToClient(client, sizeof(xDMXGetDesktopAttributesReply), (char *)&rep); - return client->noClientException; + return Success; } static int ProcDMXChangeDesktopAttributes(ClientPtr client) @@ -752,7 +752,7 @@ static int ProcDMXChangeDesktopAttributes(ClientPtr client) WriteToClient(client, sizeof(xDMXChangeDesktopAttributesReply), (char *)&rep); - return client->noClientException; + return Success; } static int ProcDMXGetInputCount(ClientPtr client) @@ -772,7 +772,7 @@ static int ProcDMXGetInputCount(ClientPtr client) swapl(&rep.inputCount, n); } WriteToClient(client, sizeof(xDMXGetInputCountReply), (char *)&rep); - return client->noClientException; + return Success; } static int ProcDMXGetInputAttributes(ClientPtr client) @@ -810,7 +810,7 @@ static int ProcDMXGetInputAttributes(ClientPtr client) } WriteToClient(client, sizeof(xDMXGetInputAttributesReply), (char *)&rep); if (length) WriteToClient(client, length, (char *)attr.name); - return client->noClientException; + return Success; } static int ProcDMXAddInput(ClientPtr client) @@ -837,7 +837,7 @@ static int ProcDMXAddInput(ClientPtr client) value_list = (CARD32 *)(stuff + 1); count = dmxFetchInputAttributes(stuff->valueMask, &attr, value_list); - if (!(name = xalloc(stuff->displayNameLength + 1 + 4))) + if (!(name = malloc(stuff->displayNameLength + 1 + 4))) return BadAlloc; memcpy(name, &value_list[count], stuff->displayNameLength); name[stuff->displayNameLength] = '\0'; @@ -845,7 +845,7 @@ static int ProcDMXAddInput(ClientPtr client) status = dmxAddInput(&attr, &id); - xfree(name); + free(name); if (status) return status; @@ -861,7 +861,7 @@ static int ProcDMXAddInput(ClientPtr client) swapl(&rep.physicalId, n); } WriteToClient(client, sizeof(xDMXAddInputReply), (char *)&rep); - return client->noClientException; + return Success; } static int ProcDMXRemoveInput(ClientPtr client) @@ -887,7 +887,7 @@ static int ProcDMXRemoveInput(ClientPtr client) swapl(&rep.status, n); } WriteToClient(client, sizeof(xDMXRemoveInputReply), (char *)&rep); - return client->noClientException; + return Success; } static int ProcDMXDispatch(ClientPtr client) diff --git a/xserver/hw/dmx/dmx.h b/xserver/hw/dmx/dmx.h index 6ebd00efd..bf4b92cb2 100644 --- a/xserver/hw/dmx/dmx.h +++ b/xserver/hw/dmx/dmx.h @@ -62,9 +62,7 @@ #include "globals.h" #include "scrnintstr.h" -#ifdef RENDER #include "picturestr.h" -#endif #ifdef GLXEXT #include @@ -233,7 +231,6 @@ typedef struct _DMXScreenInfo { SetShapeProcPtr SetShape; -#ifdef RENDER CreatePictureProcPtr CreatePicture; DestroyPictureProcPtr DestroyPicture; ChangePictureClipProcPtr ChangePictureClip; @@ -254,7 +251,6 @@ typedef struct _DMXScreenInfo { TrianglesProcPtr Triangles; TriStripProcPtr TriStrip; TriFanProcPtr TriFan; -#endif } DMXScreenInfo; /* Global variables available to all Xserver/hw/dmx routines. */ @@ -355,7 +351,7 @@ do { \ #define MAXSCREENSFREE(o) \ do { \ - if (o) free(o); \ + free(o); \ o = NULL; \ } while (0) @@ -368,4 +364,27 @@ do { \ #define MAXSCREENSCALLOC_FATAL(o,m) _MAXSCREENSALLOCF(o,MAXSCREENS*(m),1) #endif +extern DevPrivateKeyRec dmxGCPrivateKeyRec; +#define dmxGCPrivateKey (&dmxGCPrivateKeyRec) /**< Private index for GCs */ + +extern DevPrivateKeyRec dmxWinPrivateKeyRec; +#define dmxWinPrivateKey (&dmxWinPrivateKeyRec) /**< Private index for Windows */ + +extern DevPrivateKeyRec dmxPixPrivateKeyRec; +#define dmxPixPrivateKey (&dmxPixPrivateKeyRec) /**< Private index for Pixmaps */ + +extern int dmxFontPrivateIndex; /**< Private index for Fonts */ + +extern DevPrivateKeyRec dmxScreenPrivateKeyRec; +#define dmxScreenPrivateKey (&dmxScreenPrivateKeyRec) /**< Private index for Screens */ + +extern DevPrivateKeyRec dmxColormapPrivateKeyRec; +#define dmxColormapPrivateKey (&dmxColormapPrivateKeyRec) /**< Private index for Colormaps */ + +extern DevPrivateKeyRec dmxPictPrivateKeyRec; +#define dmxPictPrivateKey (&dmxPictPrivateKeyRec) /**< Private index for Picts */ + +extern DevPrivateKeyRec dmxGlyphSetPrivateKeyRec; +#define dmxGlyphSetPrivateKey (&dmxGlyphSetPrivateKeyRec) /**< Private index for GlyphSets */ + #endif /* DMX_H */ diff --git a/xserver/hw/dmx/dmx_glxvisuals.c b/xserver/hw/dmx/dmx_glxvisuals.c index ec33468be..f0050c283 100644 --- a/xserver/hw/dmx/dmx_glxvisuals.c +++ b/xserver/hw/dmx/dmx_glxvisuals.c @@ -51,7 +51,7 @@ __GLXvisualConfig *GetGLXVisualConfigs(Display *dpy, int screen, int *nconfigs) int num_good_visuals; if (!XQueryExtension(dpy, "GLX", &majorOpcode, &dummy, &dummy)) { - return(NULL); + return NULL; } /* Send the glXGetVisualConfigs request */ @@ -94,7 +94,7 @@ __GLXvisualConfig *GetGLXVisualConfigs(Display *dpy, int screen, int *nconfigs) config = (__GLXvisualConfig*) Xmalloc(nvisuals * sizeof(__GLXvisualConfig)); if (!config) { - Xfree(props); + free(props); UnlockDisplay(dpy); SyncHandle(); return NULL; @@ -228,7 +228,7 @@ __GLXvisualConfig *GetGLXVisualConfigs(Display *dpy, int screen, int *nconfigs) SyncHandle(); *nconfigs = nvisuals; - return( configs ); + return configs; } @@ -284,7 +284,7 @@ __GLXFBConfig *GetGLXFBConfigs(Display *dpy, int glxMajorOpcode, int *nconfigs) config = (__GLXFBConfig*) Xmalloc(numFBConfigs * sizeof(__GLXFBConfig)); if (!config) { - Xfree(attrs); + free(attrs); UnlockDisplay(dpy); SyncHandle(); return NULL; @@ -500,7 +500,7 @@ GetGLXVisualConfigsFromFBConfigs(__GLXFBConfig *fbconfigs, int nfbconfigs, __GLXvisualConfig *configs = NULL; int i; - if (!fbconfigs || !nfbconfigs || !nconfigs) return(NULL); + if (!fbconfigs || !nfbconfigs || !nconfigs) return NULL; *nconfigs = 0; /* Allocate memory for our config structure */ @@ -596,6 +596,6 @@ GetGLXVisualConfigsFromFBConfigs(__GLXFBConfig *fbconfigs, int nfbconfigs, } } - return( configs ); + return configs; } diff --git a/xserver/hw/dmx/dmxclient.h b/xserver/hw/dmx/dmxclient.h index 147d14ed8..c45f71fc0 100644 --- a/xserver/hw/dmx/dmxclient.h +++ b/xserver/hw/dmx/dmxclient.h @@ -86,10 +86,8 @@ typedef XID KeySym64; #include -#ifdef RENDER #include #undef PictFormatType -#endif #include #include "xkbstr.h" diff --git a/xserver/hw/dmx/dmxcmap.c b/xserver/hw/dmx/dmxcmap.c index 4aa586aff..ca9ef1ff9 100644 --- a/xserver/hw/dmx/dmxcmap.c +++ b/xserver/hw/dmx/dmxcmap.c @@ -50,7 +50,7 @@ static Bool dmxAllocateColormapPrivates(ColormapPtr pColormap) { dmxColormapPrivPtr pCmapPriv; - pCmapPriv = (dmxColormapPrivPtr)xalloc(sizeof(*pCmapPriv)); + pCmapPriv = (dmxColormapPrivPtr)malloc(sizeof(*pCmapPriv)); if (!pCmapPriv) return FALSE; pCmapPriv->cmap = (Colormap)0; @@ -75,7 +75,7 @@ Bool dmxBECreateColormap(ColormapPtr pColormap) visual, (pVisual->class & DynamicClass ? AllocAll : AllocNone)); - return (pCmapPriv->cmap != 0); + return pCmapPriv->cmap != 0; } else { dmxLog(dmxWarning, "dmxBECreateColormap: No visual found\n"); @@ -133,7 +133,7 @@ void dmxDestroyColormap(ColormapPtr pColormap) if (dmxScreen->beDisplay) dmxBEFreeColormap(pColormap); - xfree(pCmapPriv); + free(pCmapPriv); DMX_SET_COLORMAP_PRIV(pColormap, NULL); DMX_UNWRAP(DestroyColormap, dmxScreen, pScreen); @@ -170,7 +170,7 @@ void dmxStoreColors(ColormapPtr pColormap, int ndef, xColorItem *pdef) dmxColormapPrivPtr pCmapPriv = DMX_GET_COLORMAP_PRIV(pColormap); if (dmxScreen->beDisplay && (pColormap->pVisual->class & DynamicClass)) { - XColor *color = xalloc(sizeof(*color) * ndef); + XColor *color = malloc(sizeof(*color) * ndef); int i; if (color) { @@ -183,7 +183,7 @@ void dmxStoreColors(ColormapPtr pColormap, int ndef, xColorItem *pdef) color[i].pad = pdef[i].pad; } XStoreColors(dmxScreen->beDisplay, pCmapPriv->cmap, color, ndef); - xfree(color); + free(color); } else { /* xalloc failed, so fallback */ XColor c; for (i = 0; i < ndef; i++) { diff --git a/xserver/hw/dmx/dmxcmap.h b/xserver/hw/dmx/dmxcmap.h index f968f8622..75e0650ce 100644 --- a/xserver/hw/dmx/dmxcmap.h +++ b/xserver/hw/dmx/dmxcmap.h @@ -55,9 +55,6 @@ extern Bool dmxCreateDefColormap(ScreenPtr pScreen); extern Bool dmxBECreateColormap(ColormapPtr pColormap); extern Bool dmxBEFreeColormap(ColormapPtr pColormap); -/** Private index. \see dmxcmap.c \see dmxscrinit.c \see dmxwindow.c */ -extern DevPrivateKey dmxColormapPrivateKey; - /** Set colormap private structure. */ #define DMX_SET_COLORMAP_PRIV(_pCMap, _pCMapPriv) \ dixSetPrivate(&(_pCMap)->devPrivates, dmxColormapPrivateKey, _pCMapPriv) diff --git a/xserver/hw/dmx/dmxcursor.c b/xserver/hw/dmx/dmxcursor.c index 37e66d758..7e0368699 100644 --- a/xserver/hw/dmx/dmxcursor.c +++ b/xserver/hw/dmx/dmxcursor.c @@ -230,7 +230,7 @@ static int dmxSLFindNext(int *list) /** Make one pass over all the screens and return the number updated. */ static int dmxTryComputeScreenOrigins(int *screensLeft) { - ScreenPtr pScreen; + ScreenPtr pScreen, refScreen; DMXScreenInfo *screen; int i, ref; int changed = 0; @@ -239,54 +239,56 @@ static int dmxTryComputeScreenOrigins(int *screensLeft) if (!screensLeft[i]) continue; screen = &dmxScreens[i]; + pScreen = screenInfo.screens[i]; switch (screen->where) { case PosAbsolute: - dixScreenOrigins[i].x = screen->whereX; - dixScreenOrigins[i].y = screen->whereY; + pScreen->x = screen->whereX; + pScreen->y = screen->whereY; ++changed, screensLeft[i] = 0; break; case PosRelative: ref = screen->whereRefScreen; if (screensLeft[ref]) break; - dixScreenOrigins[i].x = dixScreenOrigins[ref].x + screen->whereX; - dixScreenOrigins[i].y = dixScreenOrigins[ref].y + screen->whereY; + refScreen = screenInfo.screens[ref]; + pScreen->x = refScreen->x + screen->whereX; + pScreen->y = refScreen->y + screen->whereY; ++changed, screensLeft[i] = 0; break; case PosRightOf: ref = screen->whereRefScreen; if (screensLeft[ref]) break; - pScreen = screenInfo.screens[ref]; - dixScreenOrigins[i].x = dixScreenOrigins[ref].x + pScreen->width; - dixScreenOrigins[i].y = dixScreenOrigins[ref].y; + refScreen = screenInfo.screens[ref]; + pScreen->x = refScreen->x + refScreen->width; + pScreen->y = refScreen->y; ++changed, screensLeft[i] = 0; break; case PosLeftOf: ref = screen->whereRefScreen; if (screensLeft[ref]) break; - pScreen = screenInfo.screens[i]; - dixScreenOrigins[i].x = dixScreenOrigins[ref].x - pScreen->width; - dixScreenOrigins[i].y = dixScreenOrigins[ref].y; + refScreen = screenInfo.screens[ref]; + pScreen->x = refScreen->x - pScreen->width; + pScreen->y = refScreen->y; ++changed, screensLeft[i] = 0; break; case PosBelow: ref = screen->whereRefScreen; if (screensLeft[ref]) break; - pScreen = screenInfo.screens[ref]; - dixScreenOrigins[i].x = dixScreenOrigins[ref].x; - dixScreenOrigins[i].y = dixScreenOrigins[ref].y + pScreen->height; + refScreen = screenInfo.screens[ref]; + pScreen->x = refScreen->x; + pScreen->y = refScreen->y + refScreen->height; ++changed, screensLeft[i] = 0; break; case PosAbove: ref = screen->whereRefScreen; if (screensLeft[ref]) break; - pScreen = screenInfo.screens[i]; - dixScreenOrigins[i].x = dixScreenOrigins[ref].x; - dixScreenOrigins[i].y = dixScreenOrigins[ref].y - pScreen->height; + refScreen = screenInfo.screens[ref]; + pScreen->x = refScreen->x; + pScreen->y = refScreen->y - pScreen->height; ++changed, screensLeft[i] = 0; break; case PosNone: @@ -298,6 +300,7 @@ static int dmxTryComputeScreenOrigins(int *screensLeft) static void dmxComputeScreenOrigins(void) { + ScreenPtr pScreen; int *screensLeft; int i, ref; int minX, minY; @@ -313,8 +316,9 @@ static void dmxComputeScreenOrigins(void) * guarantees that we will eventually terminate. */ ref = dmxScreens[i].whereRefScreen; - dixScreenOrigins[ref].x = dixScreenOrigins[ref].y = 0; - screensLeft[ref] = 0; + pScreen = screenInfo.screens[ref]; + pScreen->x = pScreen->y = 0; + screensLeft[ref] = 0; } } dmxSLFree(screensLeft); @@ -322,18 +326,18 @@ static void dmxComputeScreenOrigins(void) /* Justify the topmost and leftmost to * (0,0). */ - minX = dixScreenOrigins[0].x; - minY = dixScreenOrigins[0].y; + minX = screenInfo.screens[0]->x; + minY = screenInfo.screens[0]->y; for (i = 1; i < dmxNumScreens; i++) { /* Compute minX, minY */ - if (dixScreenOrigins[i].x < minX) - minX = dixScreenOrigins[i].x; - if (dixScreenOrigins[i].y < minY) - minY = dixScreenOrigins[i].y; + if (screenInfo.screens[i]->x < minX) + minX = screenInfo.screens[i]->x; + if (screenInfo.screens[i]->y < minY) + minY = screenInfo.screens[i]->y; } if (minX || minY) { for (i = 0; i < dmxNumScreens; i++) { - dixScreenOrigins[i].x -= minX; - dixScreenOrigins[i].y -= minY; + screenInfo.screens[i]->x -= minX; + screenInfo.screens[i]->y -= minY; } } } @@ -398,8 +402,8 @@ void dmxInitOrigins(void) for (i = 0; i < dmxNumScreens; i++) { DMXScreenInfo *dmxScreen = &dmxScreens[i]; - dmxScreen->rootXOrigin = dixScreenOrigins[i].x; - dmxScreen->rootYOrigin = dixScreenOrigins[i].y; + dmxScreen->rootXOrigin = screenInfo.screens[i]->x; + dmxScreen->rootYOrigin = screenInfo.screens[i]->y; } dmxReInitOrigins(); @@ -663,7 +667,7 @@ static Bool _dmxRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor) DMXDBG2("_dmxRealizeCursor(%d,%p)\n", pScreen->myNum, pCursor); - DMX_SET_CURSOR_PRIV(pCursor, pScreen, xalloc(sizeof(*pCursorPriv))); + DMX_SET_CURSOR_PRIV(pCursor, pScreen, malloc(sizeof(*pCursorPriv))); if (!DMX_GET_CURSOR_PRIV(pCursor, pScreen)) return FALSE; @@ -701,7 +705,7 @@ static Bool _dmxUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCursor) if (dmxScreen->beDisplay) { if (dmxBEFreeCursor(pScreen, pCursor)) - xfree(DMX_GET_CURSOR_PRIV(pCursor, pScreen)); + free(DMX_GET_CURSOR_PRIV(pCursor, pScreen)); } DMX_SET_CURSOR_PRIV(pCursor, pScreen, NULL); diff --git a/xserver/hw/dmx/dmxextension.c b/xserver/hw/dmx/dmxextension.c index 1a52e8090..009283505 100644 --- a/xserver/hw/dmx/dmxextension.c +++ b/xserver/hw/dmx/dmxextension.c @@ -53,9 +53,7 @@ #include "dmxgc.h" #include "dmxfont.h" #include "dmxcmap.h" -#ifdef RENDER #include "dmxpict.h" -#endif #include "dmxinput.h" #include "dmxsync.h" #include "dmxscrinit.h" @@ -299,7 +297,7 @@ void dmxFlushPendingSyncs(void) void dmxUpdateScreenResources(ScreenPtr pScreen, int x, int y, int w, int h) { DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum]; - WindowPtr pRoot = WindowTable[pScreen->myNum]; + WindowPtr pRoot = pScreen->root; WindowPtr pChild; Bool anyMarked = FALSE; @@ -352,7 +350,7 @@ void dmxUpdateScreenResources(ScreenPtr pScreen, int x, int y, int w, int h) * clipList to be broken since it will be recalculated in * ValidateTree() */ - REGION_BREAK(pScreen, &pRoot->clipList); + RegionBreak(&pRoot->clipList); } else { /* Otherwise, we just set it directly since there are no * windows visible on this screen @@ -404,7 +402,7 @@ static void dmxConfigureScreenWindow(int idx, static void dmxConfigureRootWindow(int idx, int x, int y, int w, int h) { DMXScreenInfo *dmxScreen = &dmxScreens[idx]; - WindowPtr pRoot = WindowTable[idx]; + WindowPtr pRoot = screenInfo.screens[idx]->root; /* NOTE: Either this function or the ones that it calls must handle * the case where w == 0 || h == 0. Currently, the functions that @@ -439,7 +437,7 @@ static void dmxSetRootWindowOrigin(int idx, int x, int y) { DMXScreenInfo *dmxScreen = &dmxScreens[idx]; ScreenPtr pScreen = screenInfo.screens[idx]; - WindowPtr pRoot = WindowTable[idx]; + WindowPtr pRoot = pScreen->root; WindowPtr pChild; int xoff; int yoff; @@ -449,18 +447,18 @@ static void dmxSetRootWindowOrigin(int idx, int x, int y) dmxScreen->rootYOrigin = y; /* Compute offsets here in case has been changed above */ - xoff = x - dixScreenOrigins[idx].x; - yoff = y - dixScreenOrigins[idx].y; + xoff = x - pScreen->x; + yoff = y - pScreen->y; - /* Adjust the root window's position in dixScreenOrigins */ - dixScreenOrigins[idx].x = dmxScreen->rootXOrigin; - dixScreenOrigins[idx].y = dmxScreen->rootYOrigin; + /* Adjust the root window's position */ + pScreen->x = dmxScreen->rootXOrigin; + pScreen->y = dmxScreen->rootYOrigin; /* Recalculate the Xinerama regions and data structs */ XineramaReinitData(pScreen); /* Adjust each of the root window's children */ - if (!idx) ReinitializeRootWindow(WindowTable[0], xoff, yoff); + if (!idx) ReinitializeRootWindow(screenInfo.screens[0]->root, xoff, yoff); pChild = pRoot->firstChild; while (pChild) { /* Adjust child window's position */ @@ -636,7 +634,7 @@ int dmxConfigureDesktop(DMXDesktopAttributesPtr attribs) int i; for (i = 0; i < dmxNumScreens; i++) { ScreenPtr pScreen = screenInfo.screens[i]; - WindowPtr pChild = WindowTable[i]->firstChild; + WindowPtr pChild = pScreen->root->firstChild; while (pChild) { /* Adjust child window's position */ pScreen->MoveWindow(pChild, @@ -896,13 +894,11 @@ static void dmxBECreateResources(pointer value, XID id, RESTYPE type, if (pCmap->pScreen->myNum == scrnNum) (void)dmxBECreateColormap((ColormapPtr)value); #if 0 -#ifdef RENDER /* TODO: Recreate Picture and GlyphSet resources */ } else if ((type & TypeMask) == (PictureType & TypeMask)) { /* Picture resources are created when windows are created */ } else if ((type & TypeMask) == (GlyphSetType & TypeMask)) { dmxBEFreeGlyphSet(pScreen, (GlyphSetPtr)value); -#endif #endif } else { /* Other resource types??? */ @@ -918,7 +914,7 @@ static void dmxBECreateResources(pointer value, XID id, RESTYPE type, static void dmxBECreateWindowTree(int idx) { DMXScreenInfo *dmxScreen = &dmxScreens[idx]; - WindowPtr pRoot = WindowTable[idx]; + WindowPtr pRoot = screenInfo.screens[idx]->root; dmxWinPrivPtr pWinPriv = DMX_GET_WINDOW_PRIV(pRoot); WindowPtr pWin; @@ -986,7 +982,7 @@ static void dmxBECreateWindowTree(int idx) static void dmxForceExposures(int idx) { ScreenPtr pScreen = screenInfo.screens[idx]; - WindowPtr pRoot = WindowTable[idx]; + WindowPtr pRoot = pScreen->root; Bool anyMarked = FALSE; WindowPtr pChild; @@ -998,7 +994,7 @@ static void dmxForceExposures(int idx) * clipList to be broken since it will be recalculated in * ValidateTree() */ - REGION_BREAK(pScreen, &pRoot->clipList); + RegionBreak(&pRoot->clipList); pScreen->ValidateTree(pRoot, NULL, VTBroken); pScreen->HandleExposures(pRoot); if (pScreen->PostValidateTree) @@ -1057,7 +1053,6 @@ static Bool dmxCompareScreens(DMXScreenInfo *new, DMXScreenInfo *old) return TRUE; } -#ifdef RENDER /** Restore Render's picture */ static void dmxBERestoreRenderPict(pointer value, XID id, pointer n) { @@ -1164,7 +1159,6 @@ static void dmxBERestoreRenderGlyph(pointer value, XID id, pointer n) free(gids); free(glyphs); } -#endif /** Reattach previously detached back-end screen. */ int dmxAttachScreen(int idx, DMXScreenAttributesPtr attr) @@ -1284,7 +1278,6 @@ int dmxAttachScreen(int idx, DMXScreenAttributesPtr attr) /* Create window hierarchy (top down) */ dmxBECreateWindowTree(idx); -#ifdef RENDER /* Restore the picture state for RENDER */ for (i = currentMaxClients; --i >= 0; ) if (clients[i]) @@ -1296,7 +1289,6 @@ int dmxAttachScreen(int idx, DMXScreenAttributesPtr attr) if (clients[i]) FindClientResourcesByType(clients[i],GlyphSetType, dmxBERestoreRenderGlyph,(pointer)idx); -#endif /* Refresh screen by generating exposure events for all windows */ dmxForceExposures(idx); @@ -1482,7 +1474,6 @@ static void dmxBEDestroyResources(pointer value, XID id, RESTYPE type, ColormapPtr pCmap = value; if (pCmap->pScreen->myNum == scrnNum) dmxBEFreeColormap((ColormapPtr)value); -#ifdef RENDER } else if ((type & TypeMask) == (PictureType & TypeMask)) { PicturePtr pPict = value; if (pPict->pDrawable->pScreen->myNum == scrnNum) { @@ -1496,7 +1487,6 @@ static void dmxBEDestroyResources(pointer value, XID id, RESTYPE type, } } else if ((type & TypeMask) == (GlyphSetType & TypeMask)) { dmxBEFreeGlyphSet(pScreen, (GlyphSetPtr)value); -#endif } else { /* Other resource types??? */ } @@ -1520,7 +1510,7 @@ static void dmxBEDestroyScratchGCs(int scrnNum) * destroy a window as well as all of it's children. */ static void dmxBEDestroyWindowTree(int idx) { - WindowPtr pWin = WindowTable[idx]; + WindowPtr pWin = screenInfo.screens[idx]->root; WindowPtr pChild = pWin; while (1) { diff --git a/xserver/hw/dmx/dmxfont.c b/xserver/hw/dmx/dmxfont.c index c33aee79a..34161f214 100644 --- a/xserver/hw/dmx/dmxfont.c +++ b/xserver/hw/dmx/dmxfont.c @@ -68,9 +68,9 @@ static char **dmxGetFontPath(int *npaths) GetFontPath(serverClient, npaths, &len, &paths); - newfp = xalloc(*npaths + len); + newfp = malloc(*npaths + len); c = (unsigned char *)newfp; - fp = xalloc(*npaths * sizeof(*fp)); + fp = malloc(*npaths * sizeof(*fp)); memmove(newfp, paths+1, *npaths + len - 1); l = *paths; @@ -91,8 +91,8 @@ static char **dmxGetFontPath(int *npaths) static void dmxFreeFontPath(char **fp) { - xfree(fp[0]); - xfree(fp); + free(fp[0]); + free(fp); } static Bool dmxCheckFontPathElement(DMXScreenInfo *dmxScreen, char *fp) @@ -108,7 +108,7 @@ static Bool dmxCheckFontPathElement(DMXScreenInfo *dmxScreen, char *fp) dmxSync(dmxScreen, TRUE); /* Must complete before removing handler */ XSetErrorHandler(oldErrorHandler); - return (dmxFontLastError == 0); + return dmxFontLastError == 0; } static int dmxSetFontPath(DMXScreenInfo *dmxScreen) @@ -172,7 +172,6 @@ static int dmxProcSetFontPath(ClientPtr client) unsigned long nbytes, total, n; long nfonts; int i, result; - int error; unsigned char *oldFontPath, *tmpFontPath; int nOldPaths; int lenOldPaths; @@ -195,29 +194,24 @@ static int dmxProcSetFontPath(ClientPtr client) return BadLength; GetFontPath(serverClient, &nOldPaths, &lenOldPaths, &tmpFontPath); - oldFontPath = xalloc(nOldPaths + lenOldPaths); + oldFontPath = malloc(nOldPaths + lenOldPaths); memmove(oldFontPath, tmpFontPath, nOldPaths + lenOldPaths); - result = SetFontPath(client, stuff->nFonts, (unsigned char *)&stuff[1], - &error); + result = SetFontPath(client, stuff->nFonts, (unsigned char *)&stuff[1]); if (!result) { + int error = 0; for (i = 0; i < dmxNumScreens; i++) if ((result = dmxCheckFontPath(&dmxScreens[i], &error))) break; if (result) { - int ignoreresult, ignoreerror; - /* Restore old fontpath in the DMX server */ - ignoreresult = SetFontPath(client, nOldPaths, oldFontPath, - &ignoreerror); - } else { - result = client->noClientException; + SetFontPath(client, nOldPaths, oldFontPath); client->errorValue = error; } } - xfree(oldFontPath); + free(oldFontPath); return result; } @@ -300,7 +294,7 @@ Bool dmxBELoadFont(ScreenPtr pScreen, FontPtr pFont) if (!dmxFontPath) dmxLog(dmxWarning, "No default font path is set.\n"); - goodfps = xalloc(npaths * sizeof(*goodfps)); + goodfps = malloc(npaths * sizeof(*goodfps)); dmxLog(dmxError, "The DMX server failed to set the following font paths on " @@ -315,7 +309,6 @@ Bool dmxBELoadFont(ScreenPtr pScreen, FontPtr pFont) int newnpaths = 0; int len = 0; int j = 0; - int error; dmxLog(dmxError, "These font paths will not be used because the " @@ -347,11 +340,11 @@ Bool dmxBELoadFont(ScreenPtr pScreen, FontPtr pFont) "more information on font paths.\n"); dmxFreeFontPath(fp); XFreeFontPath(oldFontPath); - xfree(goodfps); + free(goodfps); return FALSE; } - newfp = xalloc(len * sizeof(*newfp)); + newfp = malloc(len * sizeof(*newfp)); for (i = 0; i < npaths; i++) { if (goodfps[i]) { int n = strlen(fp[i]); @@ -361,8 +354,7 @@ Bool dmxBELoadFont(ScreenPtr pScreen, FontPtr pFont) } } - if (SetFontPath(serverClient, newnpaths, (unsigned char *)newfp, - &error)) { + if (SetFontPath(serverClient, newnpaths, (unsigned char *)newfp)) { /* Note that this should never happen since all of the * FPEs were previously valid. */ dmxLog(dmxError, "Cannot reset the default font path.\n"); @@ -398,7 +390,7 @@ Bool dmxBELoadFont(ScreenPtr pScreen, FontPtr pFont) /* We still have errors so return with error */ dmxFreeFontPath(fp); XFreeFontPath(oldFontPath); - xfree(goodfps); + free(goodfps); return FALSE; } } @@ -440,12 +432,12 @@ Bool dmxRealizeFont(ScreenPtr pScreen, FontPtr pFont) if (!(pFontPriv = FontGetPrivate(pFont, dmxFontPrivateIndex))) { FontSetPrivate(pFont, dmxFontPrivateIndex, NULL); - pFontPriv = xalloc(sizeof(dmxFontPrivRec)); + pFontPriv = malloc(sizeof(dmxFontPrivRec)); if (!pFontPriv) return FALSE; pFontPriv->font = NULL; MAXSCREENSALLOC(pFontPriv->font); if (!pFontPriv->font) { - xfree(pFontPriv); + free(pFontPriv); return FALSE; } pFontPriv->refcnt = 0; @@ -491,7 +483,7 @@ Bool dmxUnrealizeFont(ScreenPtr pScreen, FontPtr pFont) /* In case the font failed to load properly */ if (!pFontPriv->refcnt) { MAXSCREENSFREE(pFontPriv->font); - xfree(pFontPriv); + free(pFontPriv); FontSetPrivate(pFont, dmxFontPrivateIndex, NULL); } else if (pFontPriv->font[pScreen->myNum]) { if (dmxScreen->beDisplay) @@ -549,7 +541,7 @@ Bool dmxUnrealizeFont(ScreenPtr pScreen, FontPtr pFont) #endif ) { MAXSCREENSFREE(pFontPriv->font); - xfree(pFontPriv); + free(pFontPriv); FontSetPrivate(pFont, dmxFontPrivateIndex, NULL); } } diff --git a/xserver/hw/dmx/dmxgc.c b/xserver/hw/dmx/dmxgc.c index eb21d3c60..829200e6a 100644 --- a/xserver/hw/dmx/dmxgc.c +++ b/xserver/hw/dmx/dmxgc.c @@ -85,7 +85,7 @@ static GCOps dmxGCOps = { /** Initialize the GC on \a pScreen */ Bool dmxInitGC(ScreenPtr pScreen) { - if (!dixRequestPrivate(dmxGCPrivateKey, sizeof(dmxGCPrivRec))) + if (!dixRegisterPrivateKey(&dmxGCPrivateKeyRec, PRIVATE_GC, sizeof(dmxGCPrivRec))) return FALSE; return TRUE; } @@ -363,9 +363,9 @@ void dmxChangeClip(GCPtr pGC, int type, pointer pvalue, int nrects) case CT_REGION: if (dmxScreen->beDisplay) { - nRects = REGION_NUM_RECTS((RegionPtr)pGC->clientClip); - pRects = xalloc(nRects * sizeof(*pRects)); - pBox = REGION_RECTS((RegionPtr)pGC->clientClip); + nRects = RegionNumRects((RegionPtr)pGC->clientClip); + pRects = malloc(nRects * sizeof(*pRects)); + pBox = RegionRects((RegionPtr)pGC->clientClip); for (i = 0; i < nRects; i++) { pRects[i].x = pBox[i].x1; @@ -378,7 +378,7 @@ void dmxChangeClip(GCPtr pGC, int type, pointer pvalue, int nrects) pGC->clipOrg.x, pGC->clipOrg.y, pRects, nRects, Unsorted); - xfree(pRects); + free(pRects); } break; diff --git a/xserver/hw/dmx/dmxgc.h b/xserver/hw/dmx/dmxgc.h index 2da3ba85e..4ff3cd800 100644 --- a/xserver/hw/dmx/dmxgc.h +++ b/xserver/hw/dmx/dmxgc.h @@ -63,9 +63,6 @@ extern void dmxCopyClip(GCPtr pGCDst, GCPtr pGCSrc); extern void dmxBECreateGC(ScreenPtr pScreen, GCPtr pGC); extern Bool dmxBEFreeGC(GCPtr pGC); -/** Private index. \see dmxgc.c \see dmxscrinit.c */ -extern DevPrivateKey dmxGCPrivateKey; - /** Get private. */ #define DMX_GET_GC_PRIV(_pGC) \ (dmxGCPrivPtr)dixLookupPrivate(&(_pGC)->devPrivates, dmxGCPrivateKey) diff --git a/xserver/hw/dmx/dmxgcops.c b/xserver/hw/dmx/dmxgcops.c index 267a306db..589c6377b 100644 --- a/xserver/hw/dmx/dmxgcops.c +++ b/xserver/hw/dmx/dmxgcops.c @@ -127,16 +127,16 @@ void dmxPutImage(DrawablePtr pDrawable, GCPtr pGC, box.y1 = y; box.x2 = x + w; box.y2 = y + h; - pSubImages = REGION_CREATE(pGC->pScreen, &box, 1); + pSubImages = RegionCreate(&box, 1); - pClip = REGION_CREATE(pGC->pScreen, NullBox, 1); - REGION_COPY(pGC->pScreen, pClip, pGC->pCompositeClip); - REGION_TRANSLATE(pGC->pScreen, pClip, + pClip = RegionCreate(NullBox, 1); + RegionCopy(pClip, pGC->pCompositeClip); + RegionTranslate(pClip, -pDrawable->x, -pDrawable->y); - REGION_INTERSECT(pGC->pScreen, pSubImages, pSubImages, pClip); + RegionIntersect(pSubImages, pSubImages, pClip); - nBox = REGION_NUM_RECTS(pSubImages); - pBox = REGION_RECTS(pSubImages); + nBox = RegionNumRects(pSubImages); + pBox = RegionRects(pSubImages); while (nBox--) { XPutImage(dmxScreen->beDisplay, draw, pGCPriv->gc, img, @@ -148,8 +148,8 @@ void dmxPutImage(DrawablePtr pDrawable, GCPtr pGC, pBox->y2 - pBox->y1); pBox++; } - REGION_DESTROY(pGC->pScreen, pClip); - REGION_DESTROY(pGC->pScreen, pSubImages); + RegionDestroy(pClip); + RegionDestroy(pSubImages); } else { XPutImage(dmxScreen->beDisplay, draw, pGCPriv->gc, img, 0, 0, x, y, w, h); diff --git a/xserver/hw/dmx/dmxinit.c b/xserver/hw/dmx/dmxinit.c index f481cf5c9..075553208 100644 --- a/xserver/hw/dmx/dmxinit.c +++ b/xserver/hw/dmx/dmxinit.c @@ -53,9 +53,7 @@ #include "dmxcb.h" #include "dmxprop.h" #include "dmxstat.h" -#ifdef RENDER #include "dmxpict.h" -#endif #include /* For gettimeofday */ #include "dixstruct.h" @@ -406,7 +404,7 @@ Bool dmxGetVisualInfo(DMXScreenInfo *dmxScreen) dmxLogVisual(dmxScreen, &dmxScreen->beVisuals[i], (i == dmxScreen->beDefVisualIndex)); - return (dmxScreen->beDefVisualIndex >= 0); + return dmxScreen->beDefVisualIndex >= 0; } void dmxGetColormaps(DMXScreenInfo *dmxScreen) @@ -414,7 +412,7 @@ void dmxGetColormaps(DMXScreenInfo *dmxScreen) int i; dmxScreen->beNumDefColormaps = dmxScreen->beNumVisuals; - dmxScreen->beDefColormaps = xalloc(dmxScreen->beNumDefColormaps * + dmxScreen->beDefColormaps = malloc(dmxScreen->beNumDefColormaps * sizeof(*dmxScreen->beDefColormaps)); for (i = 0; i < dmxScreen->beNumDefColormaps; i++) @@ -608,8 +606,8 @@ void InitOutput(ScreenInfo *pScreenInfo, int argc, char *argv[]) dmxScreens[i].stat = NULL; } for (i = 0; i < dmxNumInputs; i++) dmxInputFree(&dmxInputs[i]); - if (dmxScreens) free(dmxScreens); - if (dmxInputs) free(dmxInputs); + free(dmxScreens); + free(dmxInputs); dmxScreens = NULL; dmxInputs = NULL; dmxNumScreens = 0; @@ -740,7 +738,7 @@ void InitOutput(ScreenInfo *pScreenInfo, int argc, char *argv[]) nconfigs = dmxScreen->numGlxVisuals; } - configprivs = xalloc(nconfigs * sizeof(dmxGlxVisualPrivate*)); + configprivs = malloc(nconfigs * sizeof(dmxGlxVisualPrivate*)); if (configs != NULL && configprivs != NULL) { @@ -750,7 +748,7 @@ void InitOutput(ScreenInfo *pScreenInfo, int argc, char *argv[]) for (i = 0; i < nconfigs; i++) { configprivs[i] = (dmxGlxVisualPrivate *) - xalloc(sizeof(dmxGlxVisualPrivate)); + malloc(sizeof(dmxGlxVisualPrivate)); configprivs[i]->x_visual_depth = 0; configprivs[i]->x_visual_class = 0; @@ -795,11 +793,9 @@ void InitOutput(ScreenInfo *pScreenInfo, int argc, char *argv[]) */ dmxInitFonts(); -#ifdef RENDER /* Initialize the render extension */ if (!noRenderExtension) dmxInitRender(); -#endif /* Initialized things that need timer hooks */ dmxStatInit(); @@ -820,11 +816,11 @@ static void dmxSetDefaultFontPath(char *fp) int len; len = strlen(dmxFontPath); - dmxFontPath = xrealloc(dmxFontPath, len+fplen+1); + dmxFontPath = realloc(dmxFontPath, len+fplen+1); dmxFontPath[len] = ','; strncpy(&dmxFontPath[len+1], fp, fplen); } else { - dmxFontPath = xalloc(fplen); + dmxFontPath = malloc(fplen); strncpy(dmxFontPath, fp, fplen); } diff --git a/xserver/hw/dmx/dmxpict.c b/xserver/hw/dmx/dmxpict.c index 072e3a61a..915e7678a 100644 --- a/xserver/hw/dmx/dmxpict.c +++ b/xserver/hw/dmx/dmxpict.c @@ -145,7 +145,7 @@ Bool dmxPictureInit(ScreenPtr pScreen, PictFormatPtr formats, int nformats) if (!miPictureInit(pScreen, formats, nformats)) return FALSE; - if (!dixRequestPrivate(dmxPictPrivateKey, sizeof(dmxPictPrivRec))) + if (!dixRegisterPrivateKey(&dmxPictPrivateKeyRec, PRIVATE_PICTURE, sizeof(dmxPictPrivRec))) return FALSE; ps = GetPictureScreen(pScreen); @@ -274,7 +274,7 @@ static int dmxProcRenderCreateGlyphSet(ClientPtr client) glyphSet = SecurityLookupIDByType(client, stuff->gsid, GlyphSetType, DixDestroyAccess); - glyphPriv = xalloc(sizeof(dmxGlyphPrivRec)); + glyphPriv = malloc(sizeof(dmxGlyphPrivRec)); if (!glyphPriv) return BadAlloc; glyphPriv->glyphSets = NULL; MAXSCREENSALLOC_RETURN(glyphPriv->glyphSets, BadAlloc); @@ -331,7 +331,7 @@ static int dmxProcRenderFreeGlyphSet(ClientPtr client) } MAXSCREENSFREE(glyphPriv->glyphSets); - xfree(glyphPriv); + free(glyphPriv); DMX_SET_GLYPH_PRIV(glyphSet, NULL); } @@ -369,7 +369,7 @@ static int dmxProcRenderAddGlyphs(ClientPtr client) sizeof(xRenderAddGlyphsReq) - (sizeof(CARD32) + sizeof(xGlyphInfo)) * nglyphs); - gidsCopy = xalloc(sizeof(*gidsCopy) * nglyphs); + gidsCopy = malloc(sizeof(*gidsCopy) * nglyphs); for (i = 0; i < nglyphs; i++) gidsCopy[i] = gids[i]; /* FIXME: Will this ever fail? */ @@ -387,7 +387,7 @@ static int dmxProcRenderAddGlyphs(ClientPtr client) dmxSync(dmxScreen, FALSE); } } - xfree(gidsCopy); + free(gidsCopy); } return ret; @@ -411,7 +411,7 @@ static int dmxProcRenderFreeGlyphs(ClientPtr client) nglyphs = ((client->req_len << 2) - sizeof(xRenderFreeGlyphsReq)) >> 2; if (nglyphs) { - gids = xalloc(sizeof(*gids) * nglyphs); + gids = malloc(sizeof(*gids) * nglyphs); for (i = 0; i < nglyphs; i++) gids[i] = ((CARD32 *)(stuff + 1))[i]; @@ -424,7 +424,7 @@ static int dmxProcRenderFreeGlyphs(ClientPtr client) dmxSync(dmxScreen, FALSE); } } - xfree(gids); + free(gids); } } @@ -531,13 +531,13 @@ static int dmxProcRenderCompositeGlyphs(ClientPtr client) /* The following only works for Render version > 0.2 */ /* All of the XGlyphElt* structure sizes are identical */ - elts = xalloc(nelt * sizeof(XGlyphElt8)); + elts = malloc(nelt * sizeof(XGlyphElt8)); if (!elts) return BadAlloc; - glyphs = xalloc(nglyph * size); + glyphs = malloc(nglyph * size); if (!glyphs) { - xfree(elts); + free(elts); return BadAlloc; } @@ -605,8 +605,8 @@ static int dmxProcRenderCompositeGlyphs(ClientPtr client) dmxSync(dmxScreen, FALSE); - xfree(elts); - xfree(glyphs); + free(elts); + free(glyphs); } return ret; @@ -622,8 +622,7 @@ static int dmxProcRenderSetPictureTransform(ClientPtr client) REQUEST(xRenderSetPictureTransformReq); REQUEST_SIZE_MATCH(xRenderSetPictureTransformReq); - VERIFY_PICTURE(pPicture, stuff->picture, client, DixWriteAccess, - RenderErrBase + BadPicture); + VERIFY_PICTURE(pPicture, stuff->picture, client, DixWriteAccess); /* For the following to work with PanoramiX, it assumes that Render * wraps the ProcRenderVector after dmxRenderInit has been called. @@ -663,8 +662,7 @@ static int dmxProcRenderSetPictureFilter(ClientPtr client) REQUEST(xRenderSetPictureFilterReq); REQUEST_AT_LEAST_SIZE(xRenderSetPictureFilterReq); - VERIFY_PICTURE(pPicture, stuff->picture, client, DixWriteAccess, - RenderErrBase + BadPicture); + VERIFY_PICTURE(pPicture, stuff->picture, client, DixWriteAccess); /* For the following to work with PanoramiX, it assumes that Render * wraps the ProcRenderVector after dmxRenderInit has been called. @@ -873,14 +871,14 @@ int dmxChangePictureClip(PicturePtr pPicture, int clipType, pPictPriv->pict, 0, 0, None); } else if (pPicture->clientClip) { RegionPtr pClip = pPicture->clientClip; - BoxPtr pBox = REGION_RECTS(pClip); - int nBox = REGION_NUM_RECTS(pClip); + BoxPtr pBox = RegionRects(pClip); + int nBox = RegionNumRects(pClip); XRectangle *pRects; XRectangle *pRect; int nRects; nRects = nBox; - pRects = pRect = xalloc(nRects * sizeof(*pRect)); + pRects = pRect = malloc(nRects * sizeof(*pRect)); while (nBox--) { pRect->x = pBox->x1; @@ -896,7 +894,7 @@ int dmxChangePictureClip(PicturePtr pPicture, int clipType, 0, 0, pRects, nRects); - xfree(pRects); + free(pRects); } else { XRenderSetPictureClipRectangles(dmxScreen->beDisplay, pPictPriv->pict, diff --git a/xserver/hw/dmx/dmxpict.h b/xserver/hw/dmx/dmxpict.h index a81eb7d37..3c8a09ce4 100644 --- a/xserver/hw/dmx/dmxpict.h +++ b/xserver/hw/dmx/dmxpict.h @@ -116,10 +116,6 @@ extern Bool dmxBEFreeGlyphSet(ScreenPtr pScreen, GlyphSetPtr glyphSet); extern int dmxBECreatePicture(PicturePtr pPicture); extern Bool dmxBEFreePicture(PicturePtr pPicture); -extern DevPrivateKey dmxPictPrivateKey; /**< Index for picture private data */ -extern DevPrivateKey dmxGlyphSetPrivateKey; /**< Index for glyphset private data */ - - /** Get the picture private data given a picture pointer */ #define DMX_GET_PICT_PRIV(_pPict) \ (dmxPictPrivPtr)dixLookupPrivate(&(_pPict)->devPrivates, dmxPictPrivateKey) diff --git a/xserver/hw/dmx/dmxpixmap.c b/xserver/hw/dmx/dmxpixmap.c index 66224031a..81b71151a 100644 --- a/xserver/hw/dmx/dmxpixmap.c +++ b/xserver/hw/dmx/dmxpixmap.c @@ -49,7 +49,7 @@ /** Initialize a private area in \a pScreen for pixmap information. */ Bool dmxInitPixmap(ScreenPtr pScreen) { - if (!dixRequestPrivate(dmxPixPrivateKey, sizeof(dmxPixPrivRec))) + if (!dixRegisterPrivateKey(&dmxPixPrivateKeyRec, PRIVATE_PIXMAP, sizeof(dmxPixPrivRec))) return FALSE; return TRUE; @@ -174,8 +174,7 @@ Bool dmxDestroyPixmap(PixmapPtr pPixmap) dmxSync(dmxScreen, FALSE); } } - dixFreePrivates(pPixmap->devPrivates); - xfree(pPixmap); + FreePixmap(pPixmap); #if 0 if (pScreen->DestroyPixmap) @@ -190,8 +189,7 @@ Bool dmxDestroyPixmap(PixmapPtr pPixmap) * pPixmap. */ RegionPtr dmxBitmapToRegion(PixmapPtr pPixmap) { - ScreenPtr pScreen = pPixmap->drawable.pScreen; - DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum]; + DMXScreenInfo *dmxScreen = &dmxScreens[pPixmap->drawable.pScreen->myNum]; dmxPixPrivPtr pPixPriv = DMX_GET_PIXMAP_PRIV(pPixmap); XImage *ximage; RegionPtr pReg, pTmpReg; @@ -201,7 +199,7 @@ RegionPtr dmxBitmapToRegion(PixmapPtr pPixmap) Bool overlap; if (!dmxScreen->beDisplay) { - pReg = REGION_CREATE(pScreen, NullBox, 1); + pReg = RegionCreate(NullBox, 1); return pReg; } @@ -209,8 +207,8 @@ RegionPtr dmxBitmapToRegion(PixmapPtr pPixmap) pPixmap->drawable.width, pPixmap->drawable.height, 1, XYPixmap); - pReg = REGION_CREATE(pScreen, NullBox, 1); - pTmpReg = REGION_CREATE(pScreen, NullBox, 1); + pReg = RegionCreate(NullBox, 1); + pTmpReg = RegionCreate(NullBox, 1); if(!pReg || !pTmpReg) { XDestroyImage(ximage); return NullRegion; @@ -229,8 +227,8 @@ RegionPtr dmxBitmapToRegion(PixmapPtr pPixmap) } else if (currentPixel == 0L) { /* right edge */ Box.x2 = x; - REGION_RESET(pScreen, pTmpReg, &Box); - REGION_APPEND(pScreen, pReg, pTmpReg); + RegionReset(pTmpReg, &Box); + RegionAppend(pReg, pTmpReg); } previousPixel = currentPixel; } @@ -238,16 +236,16 @@ RegionPtr dmxBitmapToRegion(PixmapPtr pPixmap) if (previousPixel != 0L) { /* right edge because of the end of pixmap */ Box.x2 = pPixmap->drawable.width; - REGION_RESET(pScreen, pTmpReg, &Box); - REGION_APPEND(pScreen, pReg, pTmpReg); + RegionReset(pTmpReg, &Box); + RegionAppend(pReg, pTmpReg); } } - REGION_DESTROY(pScreen, pTmpReg); + RegionDestroy(pTmpReg); XDestroyImage(ximage); - REGION_VALIDATE(pScreen, pReg, &overlap); + RegionValidate(pReg, &overlap); dmxSync(dmxScreen, FALSE); - return(pReg); + return pReg; } diff --git a/xserver/hw/dmx/dmxpixmap.h b/xserver/hw/dmx/dmxpixmap.h index 64418340c..59da788b3 100644 --- a/xserver/hw/dmx/dmxpixmap.h +++ b/xserver/hw/dmx/dmxpixmap.h @@ -57,9 +57,6 @@ extern RegionPtr dmxBitmapToRegion(PixmapPtr pPixmap); extern void dmxBECreatePixmap(PixmapPtr pPixmap); extern Bool dmxBEFreePixmap(PixmapPtr pPixmap); -/** Private index. \see dmxpicmap.h \see dmxscrinit.c */ -extern DevPrivateKey dmxPixPrivateKey; - /** Get pixmap private pointer. */ #define DMX_GET_PIXMAP_PRIV(_pPix) \ (dmxPixPrivPtr)dixLookupPrivate(&(_pPix)->devPrivates, dmxPixPrivateKey) diff --git a/xserver/hw/dmx/dmxprop.c b/xserver/hw/dmx/dmxprop.c index 376313d8d..d4618e3fa 100644 --- a/xserver/hw/dmx/dmxprop.c +++ b/xserver/hw/dmx/dmxprop.c @@ -157,8 +157,8 @@ static int dmxPropertyCheckOtherServers(DMXScreenInfo *dmxScreen, Atom atom) dmxLogOutputWarning(dmxScreen, "%s also running on %s\n", tp.value, dmxScreen->name); - list = xrealloc(list, ++count * sizeof(*list)); - list[count-1] = xalloc(tp.nitems + 2); + list = realloc(list, ++count * sizeof(*list)); + list[count-1] = malloc(tp.nitems + 2); strncpy(list[count-1], (char *)tp.value, tp.nitems + 1); } XFree(tp.value); @@ -167,8 +167,8 @@ static int dmxPropertyCheckOtherServers(DMXScreenInfo *dmxScreen, Atom atom) } XSetErrorHandler(dmxOldHandler); - for (i = 0; i < count; i++) xfree(list[i]); - xfree(list); + for (i = 0; i < count; i++) free(list[i]); + free(list); XFree(tproot.value); if (!retcode) dmxLogOutput(dmxScreen, "No Xdmx server running on backend\n"); diff --git a/xserver/hw/dmx/dmxscrinit.c b/xserver/hw/dmx/dmxscrinit.c index 09734f56d..6d2f2d3f5 100644 --- a/xserver/hw/dmx/dmxscrinit.c +++ b/xserver/hw/dmx/dmxscrinit.c @@ -53,9 +53,7 @@ #include "dmxprop.h" #include "dmxdpms.h" -#ifdef RENDER #include "dmxpict.h" -#endif #include "fb.h" #include "mipointer.h" @@ -67,23 +65,14 @@ static Bool dmxSaveScreen(ScreenPtr pScreen, int what); static unsigned long dmxGeneration; static unsigned long *dmxCursorGeneration; -static int dmxGCPrivateKeyIndex; -DevPrivateKey dmxGCPrivateKey = &dmxGCPrivateKeyIndex; /**< Private index for GCs */ -static int dmxWinPrivateKeyIndex; -DevPrivateKey dmxWinPrivateKey = &dmxWinPrivateKeyIndex; /**< Private index for Windows */ -static int dmxPixPrivateKeyIndex; -DevPrivateKey dmxPixPrivateKey = &dmxPixPrivateKeyIndex; /**< Private index for Pixmaps */ +DevPrivateKeyRec dmxGCPrivateKeyRec; +DevPrivateKeyRec dmxWinPrivateKeyRec; +DevPrivateKeyRec dmxPixPrivateKeyRec; int dmxFontPrivateIndex; /**< Private index for Fonts */ -static int dmxScreenPrivateKeyIndex; -DevPrivateKey dmxScreenPrivateKey = &dmxScreenPrivateKeyIndex; /**< Private index for Screens */ -static int dmxColormapPrivateKeyIndex; -DevPrivateKey dmxColormapPrivateKey = &dmxColormapPrivateKeyIndex; /**< Private index for Colormaps */ -#ifdef RENDER -static int dmxPictPrivateKeyIndex; -DevPrivateKey dmxPictPrivateKey = &dmxPictPrivateKeyIndex; /**< Private index for Picts */ -static int dmxGlyphSetPrivateKeyIndex; -DevPrivateKey dmxGlyphSetPrivateKey = &dmxGlyphSetPrivateKeyIndex; /**< Private index for GlyphSets */ -#endif +DevPrivateKeyRec dmxScreenPrivateKeyRec; +DevPrivateKeyRec dmxColormapPrivateKeyRec; +DevPrivateKeyRec dmxPictPrivateKeyRec; +DevPrivateKeyRec dmxGlyphSetPrivateKeyRec; /** Initialize the parts of screen \a idx that require access to the * back-end server. */ @@ -214,6 +203,13 @@ Bool dmxScreenInit(int idx, ScreenPtr pScreen, int argc, char *argv[]) DMXScreenInfo *dmxScreen = &dmxScreens[idx]; int i, j; + if (!dixRegisterPrivateKey(&dmxScreenPrivateKeyRec, PRIVATE_SCREEN, 0)) + return FALSE; + if (!dixRegisterPrivateKey(&dmxColormapPrivateKeyRec, PRIVATE_COLORMAP, 0)) + return FALSE; + if (!dixRegisterPrivateKey(&dmxGlyphSetPrivateKeyRec, PRIVATE_GLYPHSET, 0)) + return FALSE; + if (dmxGeneration != serverGeneration) { /* Allocate font private index */ dmxFontPrivateIndex = AllocateFontPrivateIndex(); @@ -278,9 +274,7 @@ Bool dmxScreenInit(int idx, ScreenPtr pScreen, int argc, char *argv[]) dmxScreen->beXDPI, dmxScreen->scrnWidth, dmxScreen->beBPP); -#ifdef RENDER (void)dmxPictureInit(pScreen, 0, 0); -#endif /* Not yet... */ pScreen->GetWindowPixmap = NULL; @@ -399,7 +393,7 @@ void dmxBECloseScreen(ScreenPtr pScreen) /* Free resources allocated during initialization (in dmxinit.c) */ for (i = 0; i < dmxScreen->beNumDefColormaps; i++) XFreeColormap(dmxScreen->beDisplay, dmxScreen->beDefColormaps[i]); - xfree(dmxScreen->beDefColormaps); + free(dmxScreen->beDefColormaps); dmxScreen->beDefColormaps = NULL; #if 0 @@ -435,15 +429,13 @@ Bool dmxCloseScreen(int idx, ScreenPtr pScreen) /* Reset the proc vectors */ if (idx == 0) { -#ifdef RENDER dmxResetRender(); -#endif dmxResetFonts(); } if (dmxShadowFB) { /* Free the shadow framebuffer */ - xfree(dmxScreen->shadow); + free(dmxScreen->shadow); } else { /* Unwrap Shape functions */ diff --git a/xserver/hw/dmx/dmxscrinit.h b/xserver/hw/dmx/dmxscrinit.h index a4642350c..9c9fbc59d 100644 --- a/xserver/hw/dmx/dmxscrinit.h +++ b/xserver/hw/dmx/dmxscrinit.h @@ -40,9 +40,6 @@ #include "scrnintstr.h" -/** Private index. \see dmxscrrinit.c \see input/dmxconcole.c */ -extern DevPrivateKey dmxScreenPrivateKey; - extern Bool dmxScreenInit(int idx, ScreenPtr pScreen, int argc, char *argv[]); extern void dmxBEScreenInit(int idx, ScreenPtr pScreen); diff --git a/xserver/hw/dmx/dmxshadow.c b/xserver/hw/dmx/dmxshadow.c index 461fd085b..a62eb5c52 100644 --- a/xserver/hw/dmx/dmxshadow.c +++ b/xserver/hw/dmx/dmxshadow.c @@ -47,8 +47,8 @@ void dmxShadowUpdateProc(ScreenPtr pScreen, shadowBufPtr pBuf) { RegionPtr damage = &pBuf->damage; - int nbox = REGION_NUM_RECTS(damage); - BoxPtr pbox = REGION_RECTS(damage); + int nbox = RegionNumRects(damage); + BoxPtr pbox = RegionRects(damage); DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum]; if (!dmxScreen->beDisplay) diff --git a/xserver/hw/dmx/dmxstat.c b/xserver/hw/dmx/dmxstat.c index 41b0eb27c..c3f1d3b36 100644 --- a/xserver/hw/dmx/dmxstat.c +++ b/xserver/hw/dmx/dmxstat.c @@ -122,7 +122,7 @@ DMXStatInfo *dmxStatAlloc(void) /** Free the memory used by a \a DMXStatInfo structure. */ void dmxStatFree(DMXStatInfo *pt) { - if (pt) free(pt); + free(pt); } static void dmxStatValue(DMXStatAvg *data, unsigned long value) diff --git a/xserver/hw/dmx/dmxsync.c b/xserver/hw/dmx/dmxsync.c index 2cec1b97c..2c7ccb837 100644 --- a/xserver/hw/dmx/dmxsync.c +++ b/xserver/hw/dmx/dmxsync.c @@ -159,7 +159,7 @@ void dmxSync(DMXScreenInfo *dmxScreen, Bool now) * 2) freed, if it was on a queue (dmxSyncPending != 0), or * 3) allocated, if it wasn't on a queue (dmxSyncPending == 0) */ - if (dmxSyncTimer && !dmxSyncPending) xfree(dmxSyncTimer); + if (dmxSyncTimer && !dmxSyncPending) free(dmxSyncTimer); dmxSyncTimer = NULL; now = TRUE; dmxGeneration = serverGeneration; diff --git a/xserver/hw/dmx/dmxwindow.c b/xserver/hw/dmx/dmxwindow.c index f9e46db1e..44848281f 100644 --- a/xserver/hw/dmx/dmxwindow.c +++ b/xserver/hw/dmx/dmxwindow.c @@ -46,9 +46,7 @@ #include "dmxvisual.h" #include "dmxinput.h" #include "dmxextension.h" -#ifdef RENDER #include "dmxpict.h" -#endif #include "windowstr.h" @@ -62,7 +60,7 @@ static void dmxDoSetShape(WindowPtr pWindow); /** Initialize the private area for the window functions. */ Bool dmxInitWindow(ScreenPtr pScreen) { - if (!dixRequestPrivate(dmxWinPrivateKey, sizeof(dmxWinPrivRec))) + if (!dixRegisterPrivateKey(&dmxWinPrivateKeyRec, PRIVATE_WINDOW, sizeof(dmxWinPrivRec))) return FALSE; return TRUE; @@ -288,9 +286,7 @@ void dmxCreateAndRealizeWindow(WindowPtr pWindow, Bool doSync) pWinPriv->window = dmxCreateNonRootWindow(pWindow); if (pWinPriv->restacked) dmxDoRestackWindow(pWindow); if (pWinPriv->isShaped) dmxDoSetShape(pWindow); -#ifdef RENDER if (pWinPriv->hasPict) dmxCreatePictureList(pWindow); -#endif if (pWinPriv->mapped) XMapWindow(dmxScreen->beDisplay, pWinPriv->window); if (doSync) dmxSync(dmxScreen, False); @@ -320,9 +316,7 @@ Bool dmxCreateWindow(WindowPtr pWindow) pWinPriv->restacked = FALSE; pWinPriv->attribMask = 0; pWinPriv->isShaped = FALSE; -#ifdef RENDER pWinPriv->hasPict = FALSE; -#endif #ifdef GLXEXT pWinPriv->swapGroup = NULL; pWinPriv->barrier = 0; @@ -405,10 +399,8 @@ Bool dmxDestroyWindow(WindowPtr pWindow) DMX_UNWRAP(DestroyWindow, dmxScreen, pScreen); -#ifdef RENDER /* Destroy any picture list associated with this window */ needSync |= dmxDestroyPictureList(pWindow); -#endif /* Destroy window on back-end server */ needSync |= dmxBEDestroyWindow(pWindow); @@ -948,9 +940,9 @@ static void dmxDoSetShape(WindowPtr pWindow) /* First, set the bounding shape */ if (wBoundingShape(pWindow)) { - pBox = REGION_RECTS(wBoundingShape(pWindow)); - nRect = nBox = REGION_NUM_RECTS(wBoundingShape(pWindow)); - pRectFirst = pRect = xalloc(nRect * sizeof(*pRect)); + pBox = RegionRects(wBoundingShape(pWindow)); + nRect = nBox = RegionNumRects(wBoundingShape(pWindow)); + pRectFirst = pRect = malloc(nRect * sizeof(*pRect)); while (nBox--) { pRect->x = pBox->x1; pRect->y = pBox->y1; @@ -963,7 +955,7 @@ static void dmxDoSetShape(WindowPtr pWindow) ShapeBounding, 0, 0, pRectFirst, nRect, ShapeSet, YXBanded); - xfree(pRectFirst); + free(pRectFirst); } else { XShapeCombineMask(dmxScreen->beDisplay, pWinPriv->window, ShapeBounding, 0, 0, None, ShapeSet); @@ -971,9 +963,9 @@ static void dmxDoSetShape(WindowPtr pWindow) /* Next, set the clip shape */ if (wClipShape(pWindow)) { - pBox = REGION_RECTS(wClipShape(pWindow)); - nRect = nBox = REGION_NUM_RECTS(wClipShape(pWindow)); - pRectFirst = pRect = xalloc(nRect * sizeof(*pRect)); + pBox = RegionRects(wClipShape(pWindow)); + nRect = nBox = RegionNumRects(wClipShape(pWindow)); + pRectFirst = pRect = malloc(nRect * sizeof(*pRect)); while (nBox--) { pRect->x = pBox->x1; pRect->y = pBox->y1; @@ -986,7 +978,7 @@ static void dmxDoSetShape(WindowPtr pWindow) ShapeClip, 0, 0, pRectFirst, nRect, ShapeSet, YXBanded); - xfree(pRectFirst); + free(pRectFirst); } else { XShapeCombineMask(dmxScreen->beDisplay, pWinPriv->window, ShapeClip, 0, 0, None, ShapeSet); @@ -999,7 +991,7 @@ static void dmxDoSetShape(WindowPtr pWindow) } /** Set shape of \a pWindow on the back-end server. */ -void dmxSetShape(WindowPtr pWindow) +void dmxSetShape(WindowPtr pWindow, int kind) { ScreenPtr pScreen = pWindow->drawable.pScreen; DMXScreenInfo *dmxScreen = &dmxScreens[pScreen->myNum]; @@ -1008,7 +1000,7 @@ void dmxSetShape(WindowPtr pWindow) DMX_UNWRAP(SetShape, dmxScreen, pScreen); #if 1 if (pScreen->SetShape) - pScreen->SetShape(pWindow); + pScreen->SetShape(pWindow, kind); #endif if (pWinPriv->window) { diff --git a/xserver/hw/dmx/dmxwindow.h b/xserver/hw/dmx/dmxwindow.h index 353d0a3ba..f93121ea2 100644 --- a/xserver/hw/dmx/dmxwindow.h +++ b/xserver/hw/dmx/dmxwindow.h @@ -49,9 +49,7 @@ typedef struct _dmxWinPriv { Colormap cmap; Visual *visual; Bool isShaped; -#ifdef RENDER Bool hasPict; -#endif #ifdef GLXEXT void *swapGroup; int barrier; @@ -96,10 +94,7 @@ extern void dmxResizeRootWindow(WindowPtr pRoot, extern Bool dmxBEDestroyWindow(WindowPtr pWindow); /* Support for shape extension */ -extern void dmxSetShape(WindowPtr pWindow); - -/** Private index. \see dmxwindow.c \see dmxscrinit.c */ -extern DevPrivateKey dmxWinPrivateKey; +extern void dmxSetShape(WindowPtr pWindow, int kind); /** Get window private pointer. */ #define DMX_GET_WINDOW_PRIV(_pWin) ((dmxWinPrivPtr) \ diff --git a/xserver/hw/dmx/doc/DMXSpec-v1.txt b/xserver/hw/dmx/doc/DMXSpec-v1.txt index 139ec7859..dec317737 100644 --- a/xserver/hw/dmx/doc/DMXSpec-v1.txt +++ b/xserver/hw/dmx/doc/DMXSpec-v1.txt @@ -2,7 +2,7 @@ Client-to-Server DMX Extension to the X Protocol - $Date: 2010/07/27 19:02:27 $, $Revision: 1.4 $ + $Date: 2010/12/05 15:36:04 $, $Revision: 1.5 $ Rickard E. (Rik) Faith (faith@redhat.com) Kevin E. Martin (kem@redhat.com) diff --git a/xserver/hw/dmx/doc/DMXSpec.txt b/xserver/hw/dmx/doc/DMXSpec.txt index d50c34ca2..8118ee262 100644 --- a/xserver/hw/dmx/doc/DMXSpec.txt +++ b/xserver/hw/dmx/doc/DMXSpec.txt @@ -2,7 +2,7 @@ Client-to-Server DMX Extension to the X Protocol - $Date: 2010/07/27 19:02:27 $, $Revision: 1.4 $ + $Date: 2010/12/05 15:36:04 $, $Revision: 1.5 $ Rickard E. (Rik) Faith (faith@redhat.com) Kevin E. Martin (kem@redhat.com) diff --git a/xserver/hw/dmx/doc/Makefile.am b/xserver/hw/dmx/doc/Makefile.am index ef7c23da1..58306d24c 100644 --- a/xserver/hw/dmx/doc/Makefile.am +++ b/xserver/hw/dmx/doc/Makefile.am @@ -19,37 +19,14 @@ # NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -SGML_FILES = dmx.sgml scaled.sgml +XML_FILES = dmx.xml scaled.xml -if BUILD_LINUXDOC -TXT_FILES = $(SGML_FILES:%.sgml=%.txt) -PS_FILES = $(SGML_FILES:%.sgml=%.ps) -if BUILD_PDFDOC -PDF_FILES = $(SGML_FILES:%.sgml=%.pdf) -endif -HTML_FILES = $(SGML_FILES:%.sgml=%.html) - -SUFFIXES = .sgml .txt .html .ps .pdf - -.sgml.txt: - @rm -f $@ - $(AM_V_GEN)$(MAKE_TEXT) $< - -.sgml.ps: - @rm -f $@ - $(AM_V_GEN)$(MAKE_PS) $< - -.ps.pdf: - @rm -f $@ - $(AM_V_GEN)$(MAKE_PDF) $< - -.sgml.html: - @rm -f $@ - $(AM_V_GEN)$(MAKE_HTML) $< - -noinst_DATA = $(TXT_FILES) $(PS_FILES) $(PDF_FILES) $(HTML_FILES) -CLEANFILES = $(TXT_FILES) $(PS_FILES) $(PDF_FILES) $(HTML_FILES) +include ../../../doc/xml/xmlrules.in + +if ENABLE_DEVEL_DOCS +noinst_DATA = $(BUILT_DOC_FILES) endif +CLEANFILES = $(CLEAN_DOC_FILES) if HAVE_DOXYGEN @@ -67,7 +44,7 @@ maintainer-clean-local: endif EXTRA_DIST = \ - $(SGML_FILES) \ + $(XML_FILES) \ DMXSpec.txt \ DMXSpec-v1.txt \ dmx.txt \ diff --git a/xserver/hw/dmx/doc/Makefile.in b/xserver/hw/dmx/doc/Makefile.in index 98fea8be4..554dc6e2f 100644 --- a/xserver/hw/dmx/doc/Makefile.in +++ b/xserver/hw/dmx/doc/Makefile.in @@ -35,6 +35,36 @@ # NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +# +# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice (including the next +# paragraph) shall be included in all copies or substantial portions of the +# Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# + +# This file is included by Makefile.am in subdirectories that have +# DocBook XML documentation files. +# +# No files are automatically distributed or installed by this subset of rules +# Any files to be distributed or installed would be listed in the including +# Makefile.am + srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ @@ -57,8 +87,14 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +DIST_COMMON = $(srcdir)/../../../doc/xml/xmlrules.in \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in +@HAVE_STYLESHEETS_TRUE@am__append_1 = -m $(XSL_STYLESHEET) +@HAVE_STYLESHEETS_TRUE@am__append_2 = xorg.css +@HAVE_XMLTO_TEXT_TRUE@@HAVE_XMLTO_TRUE@am__append_3 = $(TXT_FILES) +@HAVE_XMLTO_TRUE@am__append_4 = $(HTML_FILES) +@HAVE_FOP_TRUE@@HAVE_XMLTO_TRUE@am__append_5 = $(PDF_FILES) subdir = hw/dmx/doc -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/configure.ac @@ -115,10 +151,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -206,6 +238,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -220,6 +254,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -237,10 +272,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -296,10 +335,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -317,17 +357,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -354,20 +388,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -459,6 +496,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ @@ -604,17 +642,21 @@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ -SGML_FILES = dmx.sgml scaled.sgml -@BUILD_LINUXDOC_TRUE@TXT_FILES = $(SGML_FILES:%.sgml=%.txt) -@BUILD_LINUXDOC_TRUE@PS_FILES = $(SGML_FILES:%.sgml=%.ps) -@BUILD_LINUXDOC_TRUE@@BUILD_PDFDOC_TRUE@PDF_FILES = $(SGML_FILES:%.sgml=%.pdf) -@BUILD_LINUXDOC_TRUE@HTML_FILES = $(SGML_FILES:%.sgml=%.html) -@BUILD_LINUXDOC_TRUE@SUFFIXES = .sgml .txt .html .ps .pdf -@BUILD_LINUXDOC_TRUE@noinst_DATA = $(TXT_FILES) $(PS_FILES) $(PDF_FILES) $(HTML_FILES) -@BUILD_LINUXDOC_TRUE@CLEANFILES = $(TXT_FILES) $(PS_FILES) $(PDF_FILES) $(HTML_FILES) +XML_FILES = dmx.xml scaled.xml +TXT_FILES = $(XML_FILES:%.xml=%.txt) +HTML_FILES = $(XML_FILES:%.xml=%.html) +PDF_FILES = $(XML_FILES:%.xml=%.pdf) +BUILT_DOC_FILES = $(am__append_2) $(am__append_3) $(am__append_4) \ + $(am__append_5) +SUFFIXES = .xml .txt .html .pdf +XML_ENT_DIR = $(abs_top_builddir)/doc/xml +XMLTO_FLAGS = --searchpath $(XML_ENT_DIR) $(am__append_1) +CLEAN_DOC_FILES = $(TXT_FILES) $(HTML_FILES) $(PDF_FILES) xorg.css +@ENABLE_DEVEL_DOCS_TRUE@noinst_DATA = $(BUILT_DOC_FILES) +CLEANFILES = $(CLEAN_DOC_FILES) @HAVE_DOXYGEN_TRUE@DOXYGEN_SRC = doxygen.head doxygen.foot doxygen.css doxygen.conf EXTRA_DIST = \ - $(SGML_FILES) \ + $(XML_FILES) \ DMXSpec.txt \ DMXSpec-v1.txt \ dmx.txt \ @@ -829,8 +871,8 @@ EXTRA_DIST = \ all: all-am .SUFFIXES: -.SUFFIXES: .sgml .txt .html .ps .pdf -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) +.SUFFIXES: .xml .txt .html .pdf +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../../../doc/xml/xmlrules.in $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -877,7 +919,7 @@ CTAGS: distdir: $(DISTFILES) - $(mkdir_p) $(distdir)/html + $(mkdir_p) $(distdir)/../../../doc/xml $(distdir)/html @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ @@ -994,21 +1036,23 @@ uninstall-am: uninstall-info-am uninstall-info-am -@BUILD_LINUXDOC_TRUE@.sgml.txt: -@BUILD_LINUXDOC_TRUE@ @rm -f $@ -@BUILD_LINUXDOC_TRUE@ $(AM_V_GEN)$(MAKE_TEXT) $< +@HAVE_STYLESHEETS_TRUE@xorg.css: $(STYLESHEET_SRCDIR)/xorg.css +@HAVE_STYLESHEETS_TRUE@ $(AM_V_GEN)cp -pf $(STYLESHEET_SRCDIR)/xorg.css $@ +@HAVE_XMLTO_TEXT_TRUE@@HAVE_XMLTO_TRUE@.xml.txt: +@HAVE_XMLTO_TEXT_TRUE@@HAVE_XMLTO_TRUE@ @rm -f $@ +@HAVE_XMLTO_TEXT_TRUE@@HAVE_XMLTO_TRUE@ $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) txt $< +@HAVE_XMLTO_TRUE@.xml.html: +@HAVE_XMLTO_TRUE@ @rm -f $@ +@HAVE_XMLTO_TRUE@ $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) xhtml-nochunks $< +@HAVE_FOP_TRUE@@HAVE_XMLTO_TRUE@.xml.pdf: +@HAVE_FOP_TRUE@@HAVE_XMLTO_TRUE@ @rm -f $@ +@HAVE_FOP_TRUE@@HAVE_XMLTO_TRUE@ $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) --with-fop pdf $< -@BUILD_LINUXDOC_TRUE@.sgml.ps: -@BUILD_LINUXDOC_TRUE@ @rm -f $@ -@BUILD_LINUXDOC_TRUE@ $(AM_V_GEN)$(MAKE_PS) $< +# All the files we build depend on the entities +$(BUILT_DOC_FILES): $(XML_ENT_DIR)/xserver.ent -@BUILD_LINUXDOC_TRUE@.ps.pdf: -@BUILD_LINUXDOC_TRUE@ @rm -f $@ -@BUILD_LINUXDOC_TRUE@ $(AM_V_GEN)$(MAKE_PDF) $< - -@BUILD_LINUXDOC_TRUE@.sgml.html: -@BUILD_LINUXDOC_TRUE@ @rm -f $@ -@BUILD_LINUXDOC_TRUE@ $(AM_V_GEN)$(MAKE_HTML) $< +$(XML_ENT_DIR)/xserver.ent: + (cd $(XML_ENT_DIR) && $(MAKE) $(AM_MAKEFLAGS) $(@F)) @HAVE_DOXYGEN_TRUE@all-local: html/annotated.html diff --git a/xserver/hw/dmx/doc/dmx.sgml b/xserver/hw/dmx/doc/dmx.xml similarity index 63% rename from xserver/hw/dmx/doc/dmx.sgml rename to xserver/hw/dmx/doc/dmx.xml index ef66d1195..c6dc0ccd4 100644 --- a/xserver/hw/dmx/doc/dmx.sgml +++ b/xserver/hw/dmx/doc/dmx.xml @@ -1,30 +1,39 @@ - -
+ + +
+ + - Distributed Multihead X design - <author>Kevin E. Martin, David H. Dawes, and Rickard E. Faith - <date>29 June 2004 (created 25 July 2001) - <abstract> + <title>Distributed Multihead X design + + Kevin E.Martin + David H.Dawes + Rickard E.Faith + + 29 June 2004 (created 25 July 2001) + This document covers the motivation, background, design, and implementation of the distributed multihead X (DMX) system. It is a living document and describes the current design and implementation details of the DMX system. As the project progresses, this document will be continually updated to reflect - the changes in the code and/or design. Copyright 2001 by VA + the changes in the code and/or design. Copyright 2001 by VA Linux Systems, Inc., Fremont, California. Copyright 2001-2004 - by Red Hat, Inc., Raleigh, North Carolina - - - - + by Red Hat, Inc., Raleigh, North Carolina + + -Introduction + +Introduction -The Distributed Multihead X Server + +The Distributed Multihead X Server -

Current Open Source multihead solutions are limited to a single +Current Open Source multihead solutions are limited to a single physical machine. A single X server controls multiple display devices, which can be arranged as independent heads or unified into a single desktop (with Xinerama). These solutions are limited to the number of @@ -35,8 +44,9 @@ paper will eliminate the requirement that the display devices reside in the same physical machine. This will be accomplished by developing a front-end proxy X server that will control multiple back-end X servers that make up the large display. + -

The overall structure of the distributed multihead X (DMX) project is +The overall structure of the distributed multihead X (DMX) project is as follows: A single front-end X server will act as a proxy to a set of back-end X servers, which handle all of the visible rendering. X clients will connect to the front-end server just as they normally would @@ -47,13 +57,15 @@ standard X clients will continue to operate without modification server). Clients that are DMX-aware will be able to use an extension to obtain information about the back-end servers (e.g., for placement of pop-up windows, window alignments by the window manager, etc.). + -

The architecture of the DMX server is divided into two main sections: +The architecture of the DMX server is divided into two main sections: input (e.g., mouse and keyboard events) and output (e.g., rendering and windowing requests). Each of these are describe briefly below, and the rest of this design document will describe them in greater detail. + -

The DMX server can receive input from three general types of input +The DMX server can receive input from three general types of input devices: "local" devices that are physically attached to the machine on which DMX is running, "backend" devices that are physically attached to one or more of the back-end X servers (and that generate events via the @@ -62,8 +74,9 @@ abstracted from any non-back-end X server. Backend and console devices are treated differently because the pointer device on the back-end X server also controls the location of the hardware X cursor. Full support for XInput extension devices is provided. + -

Rendering requests will be accepted by the front-end server; however, +Rendering requests will be accepted by the front-end server; however, rendering to visible windows will be broken down as needed and sent to the appropriate back-end server(s) via X11 library calls for actual rendering. The basic framework will follow a Xnest-style approach. GC @@ -75,34 +88,44 @@ front-end server. If the request requires a visible change, the windowing operation will be translated into requests for the appropriate back-end server(s). Window state will be mirrored in the back-end server(s) as needed. + + -Layout of Paper + +Layout of Paper -

The next section describes the general development plan that was +The next section describes the general development plan that was actually used for implementation. The final section discusses outstanding issues at the conclusion of development. The first appendix provides low-level technical detail that may be of interest to those intimately familiar with the X server architecture. The final appendix describes the four phases of development that were performed during the first two years of development. + -

The final year of work was divided into 9 tasks that are not +The final year of work was divided into 9 tasks that are not described in specific sections of this document. The major tasks during that time were the enhancement of the reconfiguration ability added in Phase IV, addition of support for a dynamic number of back-end displays (instead of a hard-coded limit), and the support for back-end display and input removal and addition. This work is mentioned in this paper, but is not covered in detail. + + + -Development plan + +Development plan -

This section describes the development plan from approximately June +This section describes the development plan from approximately June 2001 through July 2003. + -Bootstrap code + +Bootstrap code -

To allow for rapid development of the DMX server by multiple +To allow for rapid development of the DMX server by multiple developers during the first development stage, the problem will be broken down into three tasks: the overall DMX framework, back-end rendering services and input device handling services. However, before @@ -112,31 +135,38 @@ framework renders to a single back-end server and provides dummy input devices (i.e., the keyboard and mouse). The simple back-end rendering service was implemented using the shadow framebuffer support currently available in the XFree86 environment. + -

Using this bootstrapping framework, each developer has been able to +Using this bootstrapping framework, each developer has been able to work on each of the tasks listed above independently as follows: the framework will be extended to handle arbitrary back-end server configurations; the back-end rendering services will be transitioned to the more efficient Xnest-style implementation; and, an input device framework to handle various input devices via the input extension will be developed. + -

Status: The boot strap code is complete. +Status: The boot strap code is complete. + + -Input device handling + +Input device handling -

An X server (including the front-end X server) requires two core +An X server (including the front-end X server) requires two core input devices -- a keyboard and a pointer (mouse). These core devices are handled and required by the core X11 protocol. Additional types of input devices may be attached and utilized via the XInput extension. These are usually referred to as ``XInput extension devices'', + -

There are some options as to how the front-end X server gets its core +There are some options as to how the front-end X server gets its core input devices: - - Local Input. The physical input devices (e.g., keyboard and + + + Local Input. The physical input devices (e.g., keyboard and mouse) can be attached directly to the front-end X server. In this case, the keyboard and mouse on the machine running the front-end X server will be used. The front-end will have drivers to read the @@ -152,12 +182,14 @@ input devices: implemented and works for a limited number of Linux-specific devices. Adding additional local input devices for other architectures is expected to be relatively simple. + -

The following options are available for implementing local input + The following options are available for implementing local input devices: - - The XFree86 X server has modular input drivers that could + + + The XFree86 X server has modular input drivers that could be adapted for this purpose. The mouse driver supports a wide range of mouse types and interfaces, as well as a range of Operating System platforms. The keyboard driver in XFree86 is @@ -169,27 +201,37 @@ input devices: devices across multiple architectures; and rely so heavily on XFree86-specific helper-functions, that this option was not pursued. + + - - The + The kdrive X server in XFree86 has built-in drivers that support PS/2 mice and keyboard under Linux. The mouse driver can indirectly handle other mouse types if the Linux utility - gpm is used as to translate the native mouse protocol into PS/2 mouse format. These drivers could be adapted and built in to the front-end X server if this range of hardware and OS support is sufficient. While much simpler than the XFree86 - drivers, the kdrive drivers were not used for the DMX implementation. + + - Reimplementation of keyboard and mouse drivers from + + Reimplementation of keyboard and mouse drivers from scratch for the DMX framework. Because keyboard and mouse drivers are relatively trivial to implement, this pathway was selected. Other drivers in the X source tree were referenced, and significant contributions from other drivers are noted in the DMX source code. - + + + + + - Backend Input. The front-end can make use of the core input + + Backend Input. The front-end can make use of the core input devices attached to one or more of the back-end X servers. Core input events from multiple back-ends are merged into a single input event stream. This can work sanely when only a single set of input @@ -200,8 +242,11 @@ input devices: mouse on that back-end, core pointers cannot be treated as XInput extension devices. However, all back-end XInput extensions devices can be mapped to either DMX core or DMX XInput extension devices. + + - Console Input. The front-end server could create a console + + Console Input. The front-end server could create a console window that is displayed on an X server independent of the back-end X servers. This console window could display things like the physical screen layout, and the front-end could get its core input @@ -209,33 +254,45 @@ input devices: implemented and works well. To help the human navigate, window outlines are also displayed in the console window. Further, console windows can be used as either core or XInput extension devices. + + - Other options were initially explored, but they were all + + Other options were initially explored, but they were all partial subsets of the options listed above and, hence, are irrelevant. + + - + + -

Although extended input devices are not specifically mentioned in the +Although extended input devices are not specifically mentioned in the Distributed X requirements, the options above were all implemented so that XInput extension devices were supported. + -

The bootstrap code (Xdmx) had dummy input devices, and these are +The bootstrap code (Xdmx) had dummy input devices, and these are still supported in the final version. These do the necessary initialization to satisfy the X server's requirements for core pointer and keyboard devices, but no input events are ever generated. + -

Status: The input code is complete. Because of the complexity of the +Status: The input code is complete. Because of the complexity of the XFree86 input device drivers (and their heavy reliance on XFree86 infrastructure), separate low-level device drivers were implemented for Xdmx. The following kinds of drivers are supported (in general, the devices can be treated arbitrarily as "core" input devices or as XInput "extension" devices; and multiple instances of different kinds of devices can be simultaneously available): - - A "dummy" device drive that never generates events. + + + A "dummy" device drive that never generates events. + + - "Local" input is from the low-level hardware on which the + + "Local" input is from the low-level hardware on which the Xdmx binary is running. This is the only area where using the XFree86 driver infrastructure would have been helpful, and then only partially, since good support for generic USB devices does @@ -243,22 +300,28 @@ devices can be simultaneously available): code was used where possible). Currently, the following local devices are supported under Linux (porting to other operating systems should be fairly straightforward): - - Linux keyboard - Linux serial mouse (MS) - Linux PS/2 mouse - USB keyboard - USB mouse - USB generic device (e.g., joystick, gamepad, etc.) - + + Linux keyboard + Linux serial mouse (MS) + Linux PS/2 mouse + USB keyboard + USB mouse + USB generic device (e.g., joystick, gamepad, etc.) + + + - "Backend" input is taken from one or more of the back-end + + "Backend" input is taken from one or more of the back-end displays. In this case, events are taken from the back-end X server and are converted to Xdmx events. Care must be taken so that the sprite moves properly on the display from which input is being taken. + + - "Console" input is taken from an X window that Xdmx + + "Console" input is taken from an X window that Xdmx creates on the operator's display (i.e., on the machine running the Xdmx binary). When the operator's mouse is inside the console window, then those events are converted to Xdmx events. @@ -267,27 +330,36 @@ devices can be simultaneously available): navigation), the cursor can be confined to the console, and a "fine" mode can be activated to allow very precise cursor positioning. - + + + + + + -Output device handling + +Output device handling -

The output of the DMX system displays rendering and windowing +The output of the DMX system displays rendering and windowing requests across multiple screens. The screens are typically arranged in a grid such that together they represent a single large display. + -

The output section of the DMX code consists of two parts. The first +The output section of the DMX code consists of two parts. The first is in the front-end proxy X server (Xdmx), which accepts client connections, manages the windows, and potentially renders primitives but does not actually display any of the drawing primitives. The second part is the back-end X server(s), which accept commands from the front-end server and display the results on their screens. + -Initialization + +Initialization -

The DMX front-end must first initialize its screens by connecting to +The DMX front-end must first initialize its screens by connecting to each of the back-end X servers and collecting information about each of these screens. However, the information collected from the back-end X servers might be inconsistent. Handling these cases can be difficult @@ -301,38 +373,48 @@ these cases (e.g., in PanoramiXConsolidate()) and will be used as a starting point. In general, the best solution is to use homogeneous X servers and display devices. Using back-end servers with the same depth is a requirement of the final DMX implementation. + -

Once this screen consolidation is finished, the relative position of +Once this screen consolidation is finished, the relative position of each back-end X server's screen in the unified screen is initialized. A full-screen window is opened on each of the back-end X servers, and the cursor on each screen is turned off. The final DMX implementation can also make use of a partial-screen window, or multiple windows per back-end screen. + + -Handling rendering requests + +Handling rendering requests -

After initialization, X applications connect to the front-end server. +After initialization, X applications connect to the front-end server. There are two possible implementations of how rendering and windowing requests are handled in the DMX system: - - A shadow framebuffer is used in the front-end server as the + + + A shadow framebuffer is used in the front-end server as the render target. In this option, all protocol requests are completely handled in the front-end server. All state and resources are maintained in the front-end including a shadow copy of the entire framebuffer. The framebuffers attached to the back-end servers are updated by XPutImage() calls with data taken directly from the shadow framebuffer. + -

This solution suffers from two main problems. First, it does not + This solution suffers from two main problems. First, it does not take advantage of any accelerated hardware available in the system. Second, the size of the XPutImage() calls can be quite large and thus will be limited by the bandwidth available. + -

The initial DMX implementation used a shadow framebuffer by + The initial DMX implementation used a shadow framebuffer by default. + + - Rendering requests are sent to each back-end server for + + Rendering requests are sent to each back-end server for handling (as is done in the Xnest server described above). In this option, certain protocol requests are handled in the front-end server and certain requests are repackaged and then sent to the @@ -341,8 +423,9 @@ requests are handled in the DMX system: on each back-end and can take advantage of any acceleration available on the back-end servers' graphics display device. State is maintained both in the front and back-end servers. + -

This solution suffers from two main drawbacks. First, protocol + This solution suffers from two main drawbacks. First, protocol requests are sent to all back-end servers -- even those that will completely clip the rendering primitive -- which wastes bandwidth and processing time. Second, state is maintained both in the front- @@ -350,26 +433,35 @@ requests are handled in the DMX system: option 1 (above) and can either be overcome through optimizations or are acceptable. Therefore, this option will be used in the final implementation. + -

The final DMX implementation defaults to this mechanism, but also + The final DMX implementation defaults to this mechanism, but also supports the shadow framebuffer mechanism. Several optimizations were implemented to eliminate the drawbacks of the default mechanism. These optimizations are described the section below and in Phase II of the Development Results (see appendix). + + - + + -

Status: Both the shadow framebuffer and Xnest-style code is complete. +Status: Both the shadow framebuffer and Xnest-style code is complete. + + + -Optimizing DMX + +Optimizing DMX -

Initially, the Xnest-style solution's performance will be measured +Initially, the Xnest-style solution's performance will be measured and analyzed to determine where the performance bottlenecks exist. There are four main areas that will be addressed. + -

First, to obtain reasonable interactivity with the first development +First, to obtain reasonable interactivity with the first development phase, XSync() was called after each protocol request. The XSync() function flushes any pending protocol requests. It then waits for the back-end to process the request and send a reply that the request has @@ -379,8 +471,9 @@ development phase, the batching that the X11 library performs is effectively defeated. The XSync() call usage will be analyzed and optimized by batching calls and performing them at regular intervals, except where interactivity will suffer (e.g., on cursor movements). + -

Second, the initial Xnest-style solution described above sends the +Second, the initial Xnest-style solution described above sends the repackaged protocol requests to all back-end servers regardless of whether or not they would be completely clipped out. The requests that are trivially rejected on the back-end server wastes the limited @@ -389,26 +482,30 @@ windowing code (e.g., by opening, closing, moving or resizing windows), we can determine whether or not back-end windows are visible so that trivial tests in the front-end server's GC ops drawing functions can eliminate these unnecessary protocol requests. + -

Third, each protocol request will be analyzed to determine if it is +Third, each protocol request will be analyzed to determine if it is possible to break the request into smaller pieces at display boundaries. The initial ones to be analyzed are put and get image requests since they will require the greatest bandwidth to transmit data between the front and back-end servers. Other protocol requests will be analyzed and those that will benefit from breaking them into smaller requests will be implemented. + -

Fourth, an extension is being considered that will allow font glyphs to +Fourth, an extension is being considered that will allow font glyphs to be transferred from the front-end DMX X server to each back-end server. This extension will permit the front-end to handle all font requests and eliminate the requirement that all back-end X servers share the exact same fonts as the front-end server. We are investigating the feasibility of this extension during this development phase. + -

Other potential optimizations will be determined from the performance +Other potential optimizations will be determined from the performance analysis. + -

Please note that in our initial design, we proposed optimizing BLT +Please note that in our initial design, we proposed optimizing BLT operations (e.g., XCopyArea() and window moves) by developing an extension that would allow individual back-end servers to directly copy pixel data to other back-end servers. This potential optimization was @@ -423,22 +520,27 @@ with Xinerama. It also eliminates the potential setup problems and security issues resulting from having each back-end server open connections to all other back-end servers. Therefore, we suggest accepting Xinerama's expose event solution. + -

Also note that the approach proposed in the second and third +Also note that the approach proposed in the second and third optimizations might cause backing store algorithms in the back-end to be defeated, so a DMX X server configuration flag will be added to disable these optimizations. + -

Status: The optimizations proposed above are complete. It was +Status: The optimizations proposed above are complete. It was determined that the using the xfs font server was sufficient and creating a new mechanism to pass glyphs was redundant; therefore, the fourth optimization proposed above was not included in DMX. + + -DMX X extension support + +DMX X extension support -

The DMX X server keeps track of all the windowing information on the +The DMX X server keeps track of all the windowing information on the back-end X servers, but does not currently export this information to any client applications. An extension will be developed to pass the screen information and back-end window IDs to DMX-aware clients. These @@ -448,37 +550,47 @@ clients to break up complex rendering requests on their own and send them directly to the windows on the back-end server's screens. An example of a client that can make effective use of this extension is Chromium. + -

Status: The extension, as implemented, is fully documented in +Status: The extension, as implemented, is fully documented in "Client-to-Server DMX Extension to the X Protocol". Future changes might be required based on feedback and other proposed enhancements to DMX. Currently, the following facilities are supported: - - + + Screen information (clipping rectangle for each screen relative to the virtual screen) - + + Window information (window IDs and clipping information for each back-end window that corresponds to each DMX window) - + + Input device information (mappings from DMX device IDs to back-end device IDs) - + + Force window creation (so that a client can override the server-side lazy window creation optimization) - + + Reconfiguration (so that a client can request that a screen position be changed) - + + Addition and removal of back-end servers and back-end and console inputs. - + + + + -Common X extension support + +Common X extension support -

The XInput, XKeyboard and Shape extensions are commonly used +The XInput, XKeyboard and Shape extensions are commonly used extensions to the base X11 protocol. XInput allows multiple and non-standard input devices to be accessed simultaneously. These input devices can be connected to either the front-end or back-end servers. @@ -486,18 +598,21 @@ XKeyboard allows much better keyboard mappings control. Shape adds support for arbitrarily shaped windows and is used by various window managers. Nearly all potential back-end X servers make these extensions available, and support for each one will be added to the DMX system. + -

In addition to the extensions listed above, support for the X +In addition to the extensions listed above, support for the X Rendering extension (Render) is being developed. Render adds digital image composition to the rendering model used by the X Window System. While this extension is still under development by Keith Packard of HP, support for the current version will be added to the DMX system. + -

Support for the XTest extension was added during the first +Support for the XTest extension was added during the first development phase. + -

Status: The following extensions are supported and are discussed in +Status: The following extensions are supported and are discussed in more detail in Phase IV of the Development Results (see appendix): BIG-REQUESTS, DEC-XTRAP, @@ -520,16 +635,20 @@ more detail in Phase IV of the Development Results (see appendix): XKEYBOARD, and XTEST. + + -OpenGL support + +OpenGL support -

OpenGL support using the Mesa code base exists in XFree86 release 4 +OpenGL support using the Mesa code base exists in XFree86 release 4 and later. Currently, the direct rendering infrastructure (DRI) provides accelerated OpenGL support for local clients and unaccelerated OpenGL support (i.e., software rendering) is provided for non-local clients. + -

The single head OpenGL support in XFree86 4.x will be extended to use +The single head OpenGL support in XFree86 4.x will be extended to use the DMX system. When the front and back-end servers are on the same physical hardware, it is possible to use the DRI to directly render to the back-end servers. First, the existing DRI will be extended to @@ -540,68 +659,88 @@ existing Xinerama extension or a DMX-specific extension). Support for synchronized swap buffers will also be added (on hardware that supports it). Note that a single front-end server with a single back-end server on the same physical machine can emulate accelerated indirect rendering. + -

When the front and back-end servers are on different physical +When the front and back-end servers are on different physical hardware or are using non-XFree86 4.x X servers, a mechanism to render primitives across the back-end servers will be provided. There are several options as to how this can be implemented. + - - The existing OpenGL support in each back-end server can be + + + The existing OpenGL support in each back-end server can be used by repackaging rendering primitives and sending them to each back-end server. This option is similar to the unoptimized Xnest-style approach mentioned above. Optimization of this solution is beyond the scope of this project and is better suited to other distributed rendering systems. + - Rendering to a pixmap in the front-end server using the + + Rendering to a pixmap in the front-end server using the current XFree86 4.x code, and then displaying to the back-ends via calls to XPutImage() is another option. This option is similar to the shadow frame buffer approach mentioned above. It is slower and bandwidth intensive, but has the advantage that the back-end servers are not required to have OpenGL support. - + + -

These, and other, options will be investigated in this phase of the +These, and other, options will be investigated in this phase of the work. + -

Work by others have made Chromium DMX-aware. Chromium will use the +Work by others have made Chromium DMX-aware. Chromium will use the DMX X protocol extension to obtain information about the back-end servers and will render directly to those servers, bypassing DMX. + -

Status: OpenGL support by the glxProxy extension was implemented by +Status: OpenGL support by the glxProxy extension was implemented by SGI and has been integrated into the DMX code base. + + + -Current issues + +Current issues -

In this sections the current issues are outlined that require further +In this sections the current issues are outlined that require further investigation. + -Fonts + +Fonts -

The font path and glyphs need to be the same for the front-end and +The font path and glyphs need to be the same for the front-end and each of the back-end servers. Font glyphs could be sent to the back-end servers as necessary but this would consume a significant amount of available bandwidth during font rendering for clients that use many different fonts (e.g., Netscape). Initially, the font server (xfs) will be used to provide the fonts to both the front-end and back-end servers. Other possibilities will be investigated during development. + + -Zero width rendering primitives + +Zero width rendering primitives -

To allow pixmap and on-screen rendering to be pixel perfect, all +To allow pixmap and on-screen rendering to be pixel perfect, all back-end servers must render zero width primitives exactly the same as the front-end renders the primitives to pixmaps. For those back-end servers that do not exactly match, zero width primitives will be automatically converted to one width primitives. This can be handled in the front-end server via the GC state. + + -Output scaling + +Output scaling -

With very large tiled displays, it might be difficult to read the +With very large tiled displays, it might be difficult to read the information on the standard X desktop. In particular, the cursor can be easily lost and fonts could be difficult to read. Automatic primitive scaling might prove to be very useful. We will investigate the @@ -609,10 +748,13 @@ possibility of scaling the cursor and providing a set of alternate pre-scaled fonts to replace the standard fonts that many applications use (e.g., fixed). Other options for automatic scaling will also be investigated. + + -Per-screen colormaps + +Per-screen colormaps -

Each screen's default colormap in the set of back-end X servers +Each screen's default colormap in the set of back-end X servers should be able to be adjusted via a configuration utility. This support is would allow the back-end screens to be calibrated via custom gamma tables. On 24-bit systems that support a DirectColor visual, this type @@ -620,26 +762,35 @@ of correction can be accommodated. One possible implementation would be to advertise to X client of the DMX server a TrueColor visual while using DirectColor visuals on the back-end servers to implement this type of color correction. Other options will be investigated. + + + +Appendix -Background + +Background -

This section describes the existing Open Source architectures that +This section describes the existing Open Source architectures that can be used to handle multiple screens and upon which this development project is based. This section was written before the implementation was finished, and may not reflect actual details of the implementation. It is left for historical interest only. + -Core input device handling + +Core input device handling -

The following is a description of how core input devices are handled +The following is a description of how core input devices are handled by an X server. + -InitInput() + +InitInput() -

InitInput() is a DDX function that is called at the start of each +InitInput() is a DDX function that is called at the start of each server generation from the X server's main() function. Its purpose is to determine what input devices are connected to the X server, register them with the DIX and MI layers, and initialize the input event queue. @@ -647,19 +798,25 @@ InitInput() does not have a return value, but the X server will abort if either a core keyboard device or a core pointer device are not registered. Extended input (XInput) devices can also be registered in InitInput(). + -

InitInput() usually has implementation specific code to determine +InitInput() usually has implementation specific code to determine which input devices are available. For each input device it will be using, it calls AddInputDevice(): - - + +AddInputDevice() +This DIX function allocates the device structure, registers a callback function (which handles device init, close, on and off), and returns the input handle, which can be treated as opaque. It is called once for each input device. - + + + + -

Once input handles for core keyboard and core pointer devices have +Once input handles for core keyboard and core pointer devices have been obtained from AddInputDevice(), they are registered as core devices by calling RegisterPointerDevice() and RegisterKeyboardDevice(). Each of these should be called once. If both core devices are not @@ -667,24 +824,34 @@ registered, then the X server will exit with a fatal error when it attempts to start the input devices in InitAndStartDevices(), which is called directly after InitInput() (see below). - - + +Register{Pointer,Keyboard}Device() +These DIX functions take a handle returned from AddInputDevice() and initialize the core input device fields in inputInfo, and initialize the input processing and grab functions for each core input device. - + + + -

The core pointer device is then registered with the miPointer code +The core pointer device is then registered with the miPointer code (which does the high level cursor handling). While this registration is not necessary for correct miPointer operation in the current XFree86 code, it is still done mostly for compatibility reasons. + - - + + +miRegisterPointerDevice() +This MI function registers the core pointer's input handle with with the miPointer code. - + + + -

The final part of InitInput() is the initialization of the input +The final part of InitInput() is the initialization of the input event queue handling. In most cases, the event queue handling provided in the MI layer is used. The primary XFree86 X server uses its own event queue handling to support some special cases related to the XInput @@ -692,20 +859,27 @@ extension and the XFree86-specific DGA extension. For our purposes, the MI event queue handling should be suitable. It is initialized by calling mieqInit(): - - + +mieqInit() +This MI function initializes the MI event queue for the core devices, and is passed the public component of the input handles for the two core devices. - + + + -

If a wakeup handler is required to deliver synchronous input +If a wakeup handler is required to deliver synchronous input events, it can be registered here by calling the DIX function RegisterBlockAndWakeupHandlers(). (See the devReadInput() description below.) + + -InitAndStartDevices() + +InitAndStartDevices() -

InitAndStartDevices() is a DIX function that is called immediately +InitAndStartDevices() is a DIX function that is called immediately after InitInput() from the X server's main() function. Its purpose is to initialize each input device that was registered with AddInputDevice(), enable each input device that was successfully @@ -715,50 +889,71 @@ devices is checked to make sure that both a core keyboard device and core pointer device were registered and successfully enabled. If not, InitAndStartDevices() returns failure, and results in the the X server exiting with a fatal error. + -

Each registered device is initialized by calling its callback +Each registered device is initialized by calling its callback (dev->deviceProc) with the DEVICE_INIT argument: - - + +(*dev->deviceProc)(dev, DEVICE_INIT) + +This function initializes the device structs with core information relevant to the device. + -

For pointer devices, this means specifying the number of buttons, +For pointer devices, this means specifying the number of buttons, default button mapping, the function used to get motion events (usually miPointerGetMotionEvents()), the function used to change/control the core pointer motion parameters (acceleration and threshold), and the motion buffer size. + -

For keyboard devices, this means specifying the keycode range, +For keyboard devices, this means specifying the keycode range, default keycode to keysym mapping, default modifier mapping, and the functions used to sound the keyboard bell and modify/control the keyboard parameters (LEDs, bell pitch and duration, key click, which keys are auto-repeating, etc). - + + + -

Each initialized device is enabled by calling EnableDevice(): +Each initialized device is enabled by calling EnableDevice(): - - + +EnableDevice() + +EnableDevice() calls the device callback with DEVICE_ON: - - + + (*dev->deviceProc)(dev, DEVICE_ON) + + This typically opens and initializes the relevant physical device, and when appropriate, registers the device's file descriptor (or equivalent) as a valid input source. - + + + -

EnableDevice() then adds the device handle to the X server's + EnableDevice() then adds the device handle to the X server's global list of enabled devices. - + + + -

InitAndStartDevices() then verifies that a valid core keyboard and +InitAndStartDevices() then verifies that a valid core keyboard and pointer has been initialized and enabled. It returns failure if either are missing. + + -devReadInput() + +devReadInput() -

Each device will have some function that gets called to read its +Each device will have some function that gets called to read its physical input. These may be called in a number of different ways. In the case of synchronous I/O, they will be called from a DDX wakeup-handler that gets called after the server detects that new input is @@ -769,51 +964,80 @@ enqueued, and make sure that the cursor gets moved for motion events (except if these are handled later by the driver's own event queue processing function, which cannot be done when using the MI event queue handling). + -

Events are queued by calling mieqEnqueue(): +Events are queued by calling mieqEnqueue(): - - + +mieqEnqueue() + +This MI function is used to add input events to the event queue. It is simply passed the event to be queued. - + + + -

The cursor position should be updated when motion events are +The cursor position should be updated when motion events are enqueued, by calling either miPointerAbsoluteCursor() or miPointerDeltaCursor(): - - + +miPointerAbsoluteCursor() + +This MI function is used to move the cursor to the absolute coordinates provided. - + +miPointerDeltaCursor() + +This MI function is used to move the cursor relative to its current position. - + + + + -ProcessInputEvents() + +ProcessInputEvents() -

ProcessInputEvents() is a DDX function that is called from the X +ProcessInputEvents() is a DDX function that is called from the X server's main dispatch loop when new events are available in the input event queue. It typically processes the enqueued events, and updates the cursor/pointer position. It may also do other DDX-specific event processing. + -

Enqueued events are processed by mieqProcessInputEvents() and passed +Enqueued events are processed by mieqProcessInputEvents() and passed to the DIX layer for transmission to clients: - - + +mieqProcessInputEvents() + +This function processes each event in the event queue, and passes it to the device's input processing function. The DIX layer provides default functions to do this processing, and they handle the task of getting the events passed back to the relevant clients. - + +miPointerUpdate() + +This function resynchronized the cursor position with the new pointer position. It also takes care of moving the cursor between screens when needed in multi-head configurations. - + + + + -DisableDevice() + +DisableDevice() -

DisableDevice is a DIX function that removes an input device from the +DisableDevice is a DIX function that removes an input device from the list of enabled devices. The result of this is that the device no longer generates input events. The device's data structures are kept in place, and disabling a device like this can be reversed by calling @@ -821,70 +1045,96 @@ EnableDevice(). DisableDevice() may be called from the DDX when it is desirable to do so (e.g., the XFree86 server does this when VT switching). Except for special cases, this is not normally called for core input devices. + -

DisableDevice() calls the device's callback function with -DisableDevice() calls the device's callback function with +DEVICE_OFF: - - + +(*dev->deviceProc)(dev, DEVICE_OFF) + +This typically closes the relevant physical device, and when appropriate, unregisters the device's file descriptor (or equivalent) as a valid input source. - + + + -

DisableDevice() then removes the device handle from the X server's +DisableDevice() then removes the device handle from the X server's global list of enabled devices. + + -CloseDevice() + +CloseDevice() -

CloseDevice is a DIX function that removes an input device from the +CloseDevice is a DIX function that removes an input device from the list of available devices. It disables input from the device and frees all data structures associated with the device. This function is usually called from CloseDownDevices(), which is called from main() at the end of each server generation to close all input devices. + -

CloseDevice() calls the device's callback function with -CloseDevice() calls the device's callback function with +DEVICE_CLOSE: - - + +(*dev->deviceProc)(dev, DEVICE_CLOSE) + +This typically closes the relevant physical device, and when appropriate, unregisters the device's file descriptor (or equivalent) as a valid input source. If any device specific data structures were allocated when the device was initialized, they are freed here. - + + + -

CloseDevice() then frees the data structures that were allocated +CloseDevice() then frees the data structures that were allocated for the device when it was registered/initialized. + + -LegalModifier() - -

LegalModifier() is a required DDX function that can be used to + +LegalModifier() + +LegalModifier() is a required DDX function that can be used to restrict which keys may be modifier keys. This seems to be present for historical reasons, so this function should simply return TRUE unconditionally. + + + -Output handling + +Output handling -

The following sections describe the main functions required to +The following sections describe the main functions required to initialize, use and close the output device(s) for each screen in the X server. + -InitOutput() + +InitOutput() -

This DDX function is called near the start of each server generation +This DDX function is called near the start of each server generation from the X server's main() function. InitOutput()'s main purpose is to initialize each screen and fill in the global screenInfo structure for each screen. It is passed three arguments: a pointer to the screenInfo struct, which it is to initialize, and argc and argv from main(), which can be used to determine additional configuration information. + -

The primary tasks for this function are outlined below: +The primary tasks for this function are outlined below: - - + + Parse configuration info: The first task of InitOutput() is to parses any configuration information from the configuration file. In addition to the XF86Config file, other configuration information can be taken from the command line. The command line @@ -895,92 +1145,132 @@ can be used to determine additional configuration information. server, the XF86Config file specifies the monitor information, the screen resolution, the graphics devices and slots in which they are located, and, for Xinerama, the screens' layout. + + - + Initialize screen info: The next task is to initialize the screen-dependent internal data structures. For example, part of what the XFree86 X server does is to allocate its screen and pixmap private indices, probe for graphics devices, compare the probed devices to the ones listed in the XF86Config file, and add the ones that match to the internal xf86Screens[] structure. + + - + Set pixmap formats: The next task is to initialize the screenInfo's image byte order, bitmap bit order and bitmap scanline unit/pad. The screenInfo's pixmap format's depth, bits per pixel and scanline padding is also initialized at this stage. + + - + Unify screen info: An optional task that might be done at this stage is to compare all of the information from the various screens and determines if they are compatible (i.e., if the set of screens can be unified into a single desktop). This task has potential to be useful to the DMX front-end server, if Xinerama's PanoramiXConsolidate() function is not sufficient. - + + + + -

Once these tasks are complete, the valid screens are known and each +Once these tasks are complete, the valid screens are known and each of these screens can be initialized by calling AddScreen(). + + -AddScreen() + +AddScreen() -

This DIX function is called from InitOutput(), in the DDX layer, to +This DIX function is called from InitOutput(), in the DDX layer, to add each new screen to the screenInfo structure. The DDX screen initialization function and command line arguments (i.e., argc and argv) are passed to it as arguments. + -

This function first allocates a new Screen structure and any privates +This function first allocates a new Screen structure and any privates that are required. It then initializes some of the fields in the Screen struct and sets up the pixmap padding information. Finally, it calls the DDX screen initialization function ScreenInit(), which is described below. It returns the number of the screen that were just added, or -1 if there is insufficient memory to add the screen or if the DDX screen initialization fails. + + -ScreenInit() + +ScreenInit() -

This DDX function initializes the rest of the Screen structure with +This DDX function initializes the rest of the Screen structure with either generic or screen-specific functions (as necessary). It also fills in various screen attributes (e.g., width and height in millimeters, black and white pixel values). + -

The screen init function usually calls several functions to perform +The screen init function usually calls several functions to perform certain screen initialization functions. They are described below: - - + +{mi,*fb}ScreenInit() + +The DDX layer's ScreenInit() function usually calls another layer's ScreenInit() function (e.g., miScreenInit() or fbScreenInit()) to initialize the fallbacks that the DDX driver does not specifically handle. + -

After calling another layer's ScreenInit() function, any +After calling another layer's ScreenInit() function, any screen-specific functions either wrap or replace the other layer's function pointers. If a function is to be wrapped, each of the old function pointers from the other layer are stored in a screen private area. Common functions to wrap are CloseScreen() and SaveScreen(). + - +miInitializeBackingStore() + +This MI function initializes the screen's backing storage functions, which are used to save areas of windows that are currently covered by other windows. + - +miDCInitialize() + +This MI function initializes the MI cursor display structures and function pointers. If a hardware cursor is used, the DDX layer's ScreenInit() function will wrap additional screen and the MI cursor display function pointers. - + + + -

Another common task for ScreenInit() function is to initialize the +Another common task for ScreenInit() function is to initialize the output device state. For example, in the XFree86 X server, the ScreenInit() function saves the original state of the video card and then initializes the video mode of the graphics device. + + -CloseScreen() + +CloseScreen() -

This function restores any wrapped screen functions (and in +This function restores any wrapped screen functions (and in particular the wrapped CloseScreen() function) and restores the state of the output device to its original state. It should also free any private data it created during the screen initialization. + + -GC operations + +GC operations -

When the X server is requested to render drawing primitives, it does +When the X server is requested to render drawing primitives, it does so by calling drawing functions through the graphics context's operation function pointer table (i.e., the GCOps functions). These functions render the basic graphics operations such as drawing rectangles, lines, @@ -988,8 +1278,9 @@ text or copying pixmaps. Default routines are provided either by the MI layer, which draws indirectly through a simple span interface, or by the framebuffer layers (e.g., CFB, MFB, FB), which draw directly to a linearly mapped frame buffer. + -

To take advantage of special hardware on the graphics device, +To take advantage of special hardware on the graphics device, specific GCOps functions can be replaced by device specific code. However, many times the graphics devices can handle only a subset of the possible states of the GC, so during graphics context validation, @@ -998,39 +1289,52 @@ the hardware. For example, some graphics hardware can accelerate single pixel width lines with certain dash patterns. Thus, for dash patterns that are not supported by hardware or for width 2 or greater lines, the default routine is chosen during GC validation. + -

Note that some pointers to functions that draw to the screen are +Note that some pointers to functions that draw to the screen are stored in the Screen structure. They include GetImage(), GetSpans(), -PaintWindowBackground(), PaintWindowBorder(), CopyWindow() and -RestoreAreas(). +CopyWindow() and RestoreAreas(). + + -Xnest + +Xnest -

The Xnest X server is a special proxy X server that relays the X +The Xnest X server is a special proxy X server that relays the X protocol requests that it receives to a ``real'' X server that then processes the requests and displays the results, if applicable. To the X applications, Xnest appears as if it is a regular X server. However, Xnest is both server to the X application and client of the real X server, which will actually handle the requests. + -

The Xnest server implements all of the standard input and output +The Xnest server implements all of the standard input and output initialization steps outlined above. + - - + +InitOutput() + +Xnest takes its configuration information from command line arguments via ddxProcessArguments(). This information includes the real X server display to connect to, its default visual class, the screen depth, the Xnest window's geometry, etc. Xnest then connects to the real X server and gathers visual, colormap, depth and pixmap information about that server's display, creates a window on that server, which will be used as the root window for Xnest. + -

Next, Xnest initializes its internal data structures and uses the +Next, Xnest initializes its internal data structures and uses the data from the real X server's pixmaps to initialize its own pixmap formats. Finally, it calls AddScreen(xnestOpenScreen, argc, argv) to initialize each of its screens. + - +ScreenInit() + +Xnest's ScreenInit() function is called xnestOpenScreen(). This function initializes its screen's depth and visual information, and then calls miScreenInit() to set up the default screen functions. It then calls miInitializeBackingStore() and @@ -1038,13 +1342,21 @@ miDCInitialize() to initialize backing store and the software cursor. Finally, it replaces many of the screen functions with its own functions that repackage and send the requests to the real X server to which Xnest is attached. + - +CloseScreen() + +This function frees its internal data structure allocations. Since it replaces instead of wrapping screen functions, there are no function pointers to unwrap. This can potentially lead to problems during server regeneration. + - +GC operations + +The GC operations in Xnest are very simple since they leave all of the drawing to the real X server to which Xnest is attached. Each of the GCOps takes the request and sends it to the real X server using standard Xlib calls. For example, the X @@ -1055,14 +1367,16 @@ function is only a single line, which calls XDrawLines() using the same arguments that were passed into it. Other GCOps functions are very similar. Two exceptions to the simple GCOps functions described above are the image functions and the BLT operations. + -

The image functions, GetImage() and PutImage(), must use a temporary +The image functions, GetImage() and PutImage(), must use a temporary image to hold the image to be put of the image that was just grabbed from the screen while it is in transit to the real X server or the client. When the image has been transmitted, the temporary image is destroyed. + -

The BLT operations, CopyArea() and CopyPlane(), handle not only the +The BLT operations, CopyArea() and CopyPlane(), handle not only the copy function, which is the same as the simple cases described above, but also the graphics exposures that result when the GC's graphics exposure bit is set to True. Graphics exposures are handled in a helper @@ -1070,32 +1384,45 @@ function, xnestBitBlitHelper(). This function collects the exposure events from the real X server and, if any resulting in regions being exposed, then those regions are passed back to the MI layer so that it can generate exposure events for the X application. - + + + -

The Xnest server takes its input from the X server to which it is +The Xnest server takes its input from the X server to which it is connected. When the mouse is in the Xnest server's window, keyboard and mouse events are received by the Xnest server, repackaged and sent back to any client that requests those events. + + -Shadow framebuffer + +Shadow framebuffer -

The most common type of framebuffer is a linear array memory that +The most common type of framebuffer is a linear array memory that maps to the video memory on the graphics device. However, accessing that video memory over an I/O bus (e.g., ISA or PCI) can be slow. The shadow framebuffer layer allows the developer to keep the entire framebuffer in main memory and copy it back to video memory at regular intervals. It also has been extended to handle planar video memory and rotated framebuffers. + -

There are two main entry points to the shadow framebuffer code: +There are two main entry points to the shadow framebuffer code: - - + +shadowAlloc(width, height, bpp) + +This function allocates the in memory copy of the framebuffer of size width*height*bpp. It returns a pointer to that memory, which will be used by the framebuffer ScreenInit() code during the screen's initialization. + - +shadowInit(pScreen, updateProc, windowProc) + +This function initializes the shadow framebuffer layer. It wraps several screen drawing functions, and registers a block handler that will update the screen. The updateProc is a function that will copy the damaged regions @@ -1103,21 +1430,28 @@ to the screen, and the windowProc is a function that is used when the entire linear video memory range cannot be accessed simultaneously so that only a window into that memory is available (e.g., when using the VGA aperture). - + + + -

The shadow framebuffer code keeps track of the damaged area of each +The shadow framebuffer code keeps track of the damaged area of each screen by calculating the bounding box of all drawing operations that have occurred since the last screen update. Then, when the block handler is next called, only the damaged portion of the screen is updated. + -

Note that since the shadow framebuffer is kept in main memory, all +Note that since the shadow framebuffer is kept in main memory, all drawing operations are performed by the CPU and, thus, no accelerated hardware drawing operations are possible. + + + -Xinerama + +Xinerama -

Xinerama is an X extension that allows multiple physical screens +Xinerama is an X extension that allows multiple physical screens controlled by a single X server to appear as a single screen. Although the extension allows clients to find the physical screen layout via extension requests, it is completely transparent to clients at the core @@ -1127,35 +1461,43 @@ and improving both X11 core protocol compliance and performance. The Xinerama extension will be passing through X.Org's standardization process in the near future, and the sample implementation will be based on this rewritten version. + -

The current implementation of Xinerama is based primarily in the DIX +The current implementation of Xinerama is based primarily in the DIX (device independent) and MI (machine independent) layers of the X server. With few exceptions the DDX layers do not need any changes to support Xinerama. X server extensions often do need modifications to provide full Xinerama functionality. + -

The following is a code-level description of how Xinerama functions. +The following is a code-level description of how Xinerama functions. + -

Note: Because the Xinerama extension was originally called the +Note: Because the Xinerama extension was originally called the PanoramiX extension, many of the Xinerama functions still have the PanoramiX prefix. + - - + +PanoramiXExtensionInit() + + PanoramiXExtensionInit() is a device-independent extension function that is called at the start of each server generation from InitExtensions(), which is called from the X server's main() function after all output devices have been initialized, but before any input devices have been initialized. + -

PanoramiXNumScreens is set to the number of physical screens. If + PanoramiXNumScreens is set to the number of physical screens. If only one physical screen is present, the extension is disabled, and PanoramiXExtensionInit() returns without doing anything else. + -

The Xinerama extension is registered by calling AddExtension(). - -

A local per-screen array of data structures - (panoramiXdataPtr[]) - is allocated for each physical screen, and GC and Screen private + The Xinerama extension is registered by calling AddExtension(). + + + GC and Screen private indexes are allocated, and both GC and Screen private areas are allocated for each physical screen. These hold Xinerama-specific per-GC and per-Screen data. Each screen's CreateGC and CloseScreen @@ -1163,19 +1505,18 @@ PanoramiX prefix. XineramaCloseScreen() respectively. Some new resource classes are created for Xinerama drawables and GCs, and resource types for Xinerama windows, pixmaps and colormaps. + -

A region (XineramaScreenRegions[i]) is initialized for each - physical screen, and single region (PanoramiXScreenRegion) is - initialized to be the union of the screen regions. The - panoramiXdataPtr[] array is also initialized with the size and - origin of each screen. The relative positioning information for the - physical screens is taken from the array - dixScreenOrigins[], which + A region (PanoramiXScreenRegion) is + initialized to be the union of the screen regions. + The relative positioning information for the + physical screens is taken from the ScreenRec x and y members, which the DDX layer must initialize in InitOutput(). The bounds of the combined screen is also calculated (PanoramiXPixWidth and PanoramiXPixHeight). + -

The DIX layer has a list of function pointers + The DIX layer has a list of function pointers (ProcVector[]) that holds the entry points for the functions that process core protocol requests. The requests that Xinerama must intercept and break up @@ -1187,22 +1528,33 @@ PanoramiX prefix. transparently to the DIX layer. Some operations cannot be dealt with in this way and are handled with Xinerama-specific code within the DIX layer. + + - +PanoramiXConsolidate() + + PanoramiXConsolidate() is a device-independent extension function that is called directly from the X server's main() function after extensions and input/output devices have been initialized, and before the root windows are defined and initialized. + -

This function finds the set of depths (PanoramiXDepths[]) and + This function finds the set of depths (PanoramiXDepths[]) and visuals (PanoramiXVisuals[]) common to all of the physical screens. PanoramiXNumDepths is set to the number of common depths, and PanoramiXNumVisuals is set to the number of common visuals. Resources are created for the single root window and the default colormap. Each of these resources has per-physical screen entries. + + - +PanoramiXCreateConnectionBlock() + + PanoramiXConsolidate() is a device-independent extension function that is called directly from the X server's main() function after the per-physical screen root windows are created. It is called instead of the standard DIX @@ -1210,52 +1562,66 @@ PanoramiX prefix. the X server exits with a fatal error. This function will return FALSE if no common depths were found in PanoramiXConsolidate(). With no common depths, Xinerama mode is not possible. + -

The connection block holds the information that clients get when + The connection block holds the information that clients get when they open a connection to the X server. It includes information such as the supported pixmap formats, number of screens and the sizes, depths, visuals, default colormap information, etc, for each - of the screens (much of information that xdpyinfo shows). The connection block is initialized with the combined single screen values that were calculated in the above two functions. + -

The Xinerama extension allows the registration of connection + The Xinerama extension allows the registration of connection block callback functions. The purpose of these is to allow other extensions to do processing at this point. These callbacks can be registered by calling XineramaRegisterConnectionBlockCallback() from the other extension's ExtensionInit() function. Each registered connection block callback is called at the end of PanoramiXCreateConnectionBlock(). - + + + -Xinerama-specific changes to the DIX code + +Xinerama-specific changes to the DIX code -

There are a few types of Xinerama-specific changes within the DIX +There are a few types of Xinerama-specific changes within the DIX code. The main ones are described here. + -

Functions that deal with colormap or GC -related operations outside of +Functions that deal with colormap or GC -related operations outside of the intercepted protocol requests have a test added to only do the -processing for screen numbers > 0. This is because they are handled for +processing for screen numbers > 0. This is because they are handled for the single Xinerama screen and the processing is done once for screen 0. + -

The handling of motion events does some coordinate translation between +The handling of motion events does some coordinate translation between the physical screen's origin and screen zero's origin. Also, motion events must be reported relative to the composite screen origin rather than the physical screen origins. + -

There is some special handling for cursor, window and event processing +There is some special handling for cursor, window and event processing that cannot (either not at all or not conveniently) be done via the intercepted protocol requests. A particular case is the handling of pointers moving between physical screens. + + -Xinerama-specific changes to the MI code + +Xinerama-specific changes to the MI code -

The only Xinerama-specific change to the MI code is in miSendExposures() +The only Xinerama-specific change to the MI code is in miSendExposures() to handle the coordinate (and window ID) translation for expose events. + + -Intercepted DIX core requests + +Intercepted DIX core requests -

Xinerama breaks up drawing requests for dispatch to each physical +Xinerama breaks up drawing requests for dispatch to each physical screen. It also breaks up windows into pieces for each physical screen. GCs are translated into per-screen GCs. Colormaps are replicated on each physical screen. The functions handling the intercepted requests @@ -1267,77 +1633,114 @@ necessary state information for the single composite screen. Requests (usually those with replies) that can be satisfied completely from this stored state information do not call the standard request handling functions. + + + + + + + -Development Results + +Development Results -

In this section the results of each phase of development are +In this section the results of each phase of development are discussed. This development took place between approximately June 2001 and July 2003. + -Phase I + +Phase I -

The initial development phase dealt with the basic implementation +The initial development phase dealt with the basic implementation including the bootstrap code, which used the shadow framebuffer, and the unoptimized implementation, based on an Xnest-style implementation. + -Scope + +Scope -

The goal of Phase I is to provide fundamental functionality that can +The goal of Phase I is to provide fundamental functionality that can act as a foundation for ongoing work: - - Develop the proxy X server - - The proxy X server will operate on the X11 protocol and + + + Develop the proxy X server + + + The proxy X server will operate on the X11 protocol and relay requests as necessary to correctly perform the request. - Work will be based on the existing work for Xinerama and + + + Work will be based on the existing work for Xinerama and Xnest. - Input events and windowing operations are handled in the + + + Input events and windowing operations are handled in the proxy server and rendering requests are repackaged and sent to each of the back-end servers for display. - The multiple screen layout (including support for + + + The multiple screen layout (including support for overlapping screens) will be user configurable via a configuration file or through the configuration tool. - - Develop graphical configuration tool - - There will be potentially a large number of X servers to + + + + + Develop graphical configuration tool + + + There will be potentially a large number of X servers to configure into a single display. The tool will allow the user to specify which servers are involved in the configuration and how they should be laid out. - - Pass the X Test Suite - - The X Test Suite covers the basic X11 operations. All + + + + + Pass the X Test Suite + + + The X Test Suite covers the basic X11 operations. All tests known to succeed must correctly operate in the distributed X environment. - - + + + + -

For this phase, the back-end X servers are assumed to be unmodified X + + +For this phase, the back-end X servers are assumed to be unmodified X servers that do not support any DMX-related protocol extensions; future optimization pathways are considered, but are not implemented; and the configuration tool is assumed to rely only on libraries in the X source tree (e.g., Xt). + + -Results + +Results -

The proxy X server, Xdmx, was developed to distribute X11 protocol +The proxy X server, Xdmx, was developed to distribute X11 protocol requests to the set of back-end X servers. It opens a window on each back-end server, which represents the part of the front-end's root window that is visible on that screen. It mirrors window, pixmap and other state in each back-end server. Drawing requests are sent to either windows or pixmaps on each back-end server. This code is based on Xnest and uses the existing Xinerama extension. + -

Input events can be taken from (1) devices attached to the back-end +Input events can be taken from (1) devices attached to the back-end server, (2) core devices attached directly to the Xdmx server, or (3) from a ``console'' window on another X server. Events for these devices are gathered, processed and delivered to clients attached to the Xdmx server. + -

An intuitive configuration format was developed to help the user +An intuitive configuration format was developed to help the user easily configure the multiple back-end X servers. It was defined (see grammar in Xdmx man page) and a parser was implemented that is used by the Xdmx server and by a standalone xdmxconfig utility. The parsing @@ -1345,83 +1748,103 @@ support was implemented such that it can be easily factored out of the X source tree for use with other tools (e.g., vdl). Support for converting legacy vdl-format configuration files to the DMX format is provided by the vdltodmx utility. + -

Originally, the configuration file was going to be a subsection of +Originally, the configuration file was going to be a subsection of XFree86's XF86Config file, but that was not possible since Xdmx is a completely separate X server. Thus, a separate config file format was developed. In addition, a graphical configuration tool, xdmxconfig, was developed to allow the user to create and arrange -the screens in the configuration file. The -configfile and -config command-line options can be used to start Xdmx using a configuration file. + -

An extension that enables remote input testing is required for the X +An extension that enables remote input testing is required for the X Test Suite to function. During this phase, this extension (XTEST) was implemented in the Xdmx server. The results from running the X Test Suite are described in detail below. + + -X Test Suite + +X Test Suite - Introduction -

+ + Introduction + The X Test Suite contains tests that verify Xlib functions operate correctly. The test suite is designed to run on a single X server; however, since X applications will not be able to tell the difference between the DMX server and a standard X server, the X Test Suite should also run on the DMX server. -

+ + The Xdmx server was tested with the X Test Suite, and the existing failures are noted in this section. To put these results in perspective, we first discuss expected X Test failures and how errors in underlying systems can impact Xdmx test results. + + - Expected Failures for a Single Head -

+ + Expected Failures for a Single Head + A correctly implemented X server with a single screen is expected to fail certain X Test tests. The following well-known errors occur because of rounding error in the X server code: - + XDrawArc: Tests 42, 63, 66, 73 XDrawArcs: Tests 45, 66, 69, 76 - -

+ + + The following failures occur because of the high-level X server implementation: - + XLoadQueryFont: Test 1 XListFontsWithInfo: Tests 3, 4 XQueryFont: Tests 1, 2 - -

+ + + The following test fails when running the X server as root under Linux because of the way directory modes are interpreted: - + XWriteBitmapFile: Test 3 - -

+ + + Depending on the video card used for the back-end, other failures may also occur because of bugs in the low-level driver implementation. Over time, failures of this kind are usually fixed by XFree86, but will show up in Xdmx testing until then. + + - Expected Failures for Xinerama -

+ + Expected Failures for Xinerama + Xinerama fails several X Test Suite tests because of design decisions made for the current implementation of Xinerama. Over time, many of these errors will be corrected by XFree86 and the group working on a new Xinerama implementation. Therefore, Xdmx will also share X Suite Test failures with Xinerama. -

+ + + We may be able to fix or work-around some of these failures at the Xdmx level, but this will require additional exploration that was not part of Phase I. -

+ + + Xinerama is constantly improving, and the list of Xinerama-related failures depends on XFree86 version and the underlying graphics hardware. We tested with a @@ -1431,36 +1854,44 @@ XWriteBitmapFile: Test 3 Xinerama layer, and does not include failures listed in the previous section, or failures that appear to be from the low-level graphics driver itself: -

+ + + These failures were noted with multiple Xinerama configurations: - + XCopyPlane: Tests 13, 22, 31 (well-known Xinerama implementation issue) XSetFontPath: Test 4 XGetDefault: Test 5 XMatchVisualInfo: Test 1 - -

+ + + These failures were noted only when using one dual-head video card with a 4.2.99.x XFree86 server: - + XListPixmapFormats: Test 1 XDrawRectangles: Test 45 - -

+ + + These failures were noted only when using two video cards from different vendors with a 4.1.99.x XFree86 server: - + XChangeWindowAttributes: Test 32 XCreateWindow: Test 30 XDrawLine: Test 22 XFillArc: Test 22 XChangeKeyboardControl: Tests 9, 10 XRebindKeysym: Test 1 - + + + - Additional Failures from Xdmx -

+ + Additional Failures from Xdmx + + When running Xdmx, no unexpected failures were noted. Since the Xdmx server is based on Xinerama, we expect to have most of the Xinerama failures present in the Xdmx @@ -1468,7 +1899,7 @@ XRebindKeysym: Test 1 low-level device drivers on each back-end server, we also expect that Xdmx will exhibit most of the back-end failures. Here is a summary: - + XListPixmapFormats: Test 1 (configuration dependent) XChangeWindowAttributes: Test 32 XCreateWindow: Test 30 @@ -1477,15 +1908,20 @@ XSetFontPath: Test 4 XGetDefault: Test 5 (configuration dependent) XMatchVisualInfo: Test 1 XRebindKeysym: Test 1 (configuration dependent) - -

+ + + Note that this list is shorter than the combined list for Xinerama because Xdmx uses different code paths to perform some Xinerama operations. Further, some Xinerama failures have been fixed in the XFree86 4.2.99.x CVS repository. - - Summary and Future Work -

+ + + + + Summary and Future Work + + Running the X Test Suite on Xdmx does not produce any failures that cannot be accounted for by the underlying Xinerama subsystem used by the front-end or by the @@ -1493,64 +1929,87 @@ XRebindKeysym: Test 1 (configuration dependent) servers. The Xdmx server therefore is as ``correct'' as possible with respect to the standard set of X Test Suite tests. -

+ + + During the following phases, we will continue to verify Xdmx correctness using the X Test Suite. We may also use other tests suites or write additional tests that run under the X Test Suite that specifically verify the expected behavior of DMX. + + + -Fonts + +Fonts -

In Phase I, fonts are handled directly by both the front-end and the +In Phase I, fonts are handled directly by both the front-end and the back-end servers, which is required since we must treat each back-end server during this phase as a ``black box''. What this requires is that -the front- and back-end servers must share the exact same font +path. There are two ways to help make sure that all servers share the same font path: - - First, each server can be configured to use the same font + + + First, each server can be configured to use the same font server. The font server, xfs, can be configured to serve fonts to multiple X servers via TCP. + - Second, each server can be configured to use the same font + + Second, each server can be configured to use the same font path and either those font paths can be copied to each back-end machine or they can be mounted (e.g., via NFS) on each back-end machine. - + + + -

One additional concern is that a client program can set its own font +One additional concern is that a client program can set its own font path, and if it does so, then that font path must be available on each back-end machine. + -

The -fontpath command line option was added to allow users to +The -fontpath command line option was added to allow users to initialize the font path of the front end server. This font path is propagated to each back-end server when the default font is loaded. If there are any problems, an error message is printed, which will describe the problem and list the current font path. For more information about setting the font path, see the -fontpath option description in the man page. + + -Performance + +Performance -

Phase I of development was not intended to optimize performance. Its +Phase I of development was not intended to optimize performance. Its focus was on completely and correctly handling the base X11 protocol in the Xdmx server. However, several insights were gained during Phase I, which are listed here for reference during the next phase of development. + - - Calls to XSync() can slow down rendering since it requires a + + + Calls to XSync() can slow down rendering since it requires a complete round trip to and from a back-end server. This is especially problematic when communicating over long haul networks. - Sending drawing requests to only the screens that they overlap + + + + Sending drawing requests to only the screens that they overlap should improve performance. - + + + -Pixmaps + +Pixmaps -

Pixmaps were originally expected to be handled entirely in the +Pixmaps were originally expected to be handled entirely in the front-end X server; however, it was found that this overly complicated the rendering code and would have required sending potentially large images to each back server that required them when copying from pixmap @@ -1559,86 +2018,105 @@ as it is with regular window state. With this implementation, the same rendering code that draws to windows can be used to draw to pixmaps on the back-end server, and no large image transfers are required to copy from pixmap to window. + + + + + -Phase II + +Phase II -

The second phase of development concentrates on performance +The second phase of development concentrates on performance optimizations. These optimizations are documented here, with -x11perf data to show how the optimizations improve performance. + -

All benchmarks were performed by running Xdmx on a dual processor +All benchmarks were performed by running Xdmx on a dual processor 1.4GHz AMD Athlon machine with 1GB of RAM connecting over 100baseT to two single-processor 1GHz Pentium III machines with 256MB of RAM and ATI Rage 128 (RF) video cards. The front end was running Linux 2.4.20-pre1-ac1 and the back ends were running Linux 2.4.7-10 and version 4.2.99.1 of XFree86 pulled from the XFree86 CVS repository on August 7, 2002. All systems were running Red Hat Linux 7.2. + -Moving from XFree86 4.1.99.1 to 4.2.0.0 + +Moving from XFree86 4.1.99.1 to 4.2.0.0 -

For phase II, the working source tree was moved to the branch tagged +For phase II, the working source tree was moved to the branch tagged with dmx-1-0-branch and was updated from version 4.1.99.1 (20 August 2001) of the XFree86 sources to version 4.2.0.0 (18 January 2002). After this update, the following tests were noted to be more than 10% faster: - -1.13 Fill 300x300 opaque stippled trapezoid (161x145 stipple) -1.16 Fill 1x1 tiled trapezoid (161x145 tile) -1.13 Fill 10x10 tiled trapezoid (161x145 tile) -1.17 Fill 100x100 tiled trapezoid (161x145 tile) -1.16 Fill 1x1 tiled trapezoid (216x208 tile) -1.20 Fill 10x10 tiled trapezoid (216x208 tile) -1.15 Fill 100x100 tiled trapezoid (216x208 tile) -1.37 Circulate Unmapped window (200 kids) - + +1.13 Fill 300x300 opaque stippled trapezoid (161x145 stipple) +1.16 Fill 1x1 tiled trapezoid (161x145 tile) +1.13 Fill 10x10 tiled trapezoid (161x145 tile) +1.17 Fill 100x100 tiled trapezoid (161x145 tile) +1.16 Fill 1x1 tiled trapezoid (216x208 tile) +1.20 Fill 10x10 tiled trapezoid (216x208 tile) +1.15 Fill 100x100 tiled trapezoid (216x208 tile) +1.37 Circulate Unmapped window (200 kids) + And the following tests were noted to be more than 10% slower: - -0.88 Unmap window via parent (25 kids) -0.75 Circulate Unmapped window (4 kids) -0.79 Circulate Unmapped window (16 kids) -0.80 Circulate Unmapped window (25 kids) -0.82 Circulate Unmapped window (50 kids) -0.85 Circulate Unmapped window (75 kids) - -

These changes were not caused by any changes in the DMX system, and + +0.88 Unmap window via parent (25 kids) +0.75 Circulate Unmapped window (4 kids) +0.79 Circulate Unmapped window (16 kids) +0.80 Circulate Unmapped window (25 kids) +0.82 Circulate Unmapped window (50 kids) +0.85 Circulate Unmapped window (75 kids) + + + +These changes were not caused by any changes in the DMX system, and may point to changes in the XFree86 tree or to tests that have more -"jitter" than most other x11perf tests. + + -Global changes + +Global changes -

During the development of the Phase II DMX server, several global +During the development of the Phase II DMX server, several global changes were made. These changes were also compared with the Phase I server. The following tests were noted to be more than 10% faster: - -1.13 Fill 300x300 opaque stippled trapezoid (161x145 stipple) -1.15 Fill 1x1 tiled trapezoid (161x145 tile) -1.13 Fill 10x10 tiled trapezoid (161x145 tile) -1.17 Fill 100x100 tiled trapezoid (161x145 tile) -1.16 Fill 1x1 tiled trapezoid (216x208 tile) -1.19 Fill 10x10 tiled trapezoid (216x208 tile) -1.15 Fill 100x100 tiled trapezoid (216x208 tile) -1.15 Circulate Unmapped window (4 kids) - + +1.13 Fill 300x300 opaque stippled trapezoid (161x145 stipple) +1.15 Fill 1x1 tiled trapezoid (161x145 tile) +1.13 Fill 10x10 tiled trapezoid (161x145 tile) +1.17 Fill 100x100 tiled trapezoid (161x145 tile) +1.16 Fill 1x1 tiled trapezoid (216x208 tile) +1.19 Fill 10x10 tiled trapezoid (216x208 tile) +1.15 Fill 100x100 tiled trapezoid (216x208 tile) +1.15 Circulate Unmapped window (4 kids) + + -

The following tests were noted to be more than 10% slower: - -0.69 Scroll 10x10 pixels -0.68 Scroll 100x100 pixels -0.68 Copy 10x10 from window to window -0.68 Copy 100x100 from window to window -0.76 Circulate Unmapped window (75 kids) -0.83 Circulate Unmapped window (100 kids) - +The following tests were noted to be more than 10% slower: + +0.69 Scroll 10x10 pixels +0.68 Scroll 100x100 pixels +0.68 Copy 10x10 from window to window +0.68 Copy 100x100 from window to window +0.76 Circulate Unmapped window (75 kids) +0.83 Circulate Unmapped window (100 kids) + + -

For the remainder of this analysis, the baseline of comparison will +For the remainder of this analysis, the baseline of comparison will be the Phase II deliverable with all optimizations disabled (unless otherwise noted). This will highlight how the optimizations in isolation impact performance. + + -XSync() Batching + +XSync() Batching -

During the Phase I implementation, XSync() was called after every +During the Phase I implementation, XSync() was called after every protocol request made by the DMX server. This provided the DMX server with an interactive feel, but defeated X11's protocol buffering system and introduced round-trip wire latency into every operation. During @@ -1648,21 +2126,26 @@ noted, and XSync() calls are only made every 100mS or when the DMX server specifically needs to make a call to guarantee interactivity. With this new system, X11 buffers protocol as much as possible during a 100mS interval, and many unnecessary XSync() calls are avoided. + -

Out of more than 300 Out of more than 300 x11perf tests, 8 tests became more than 100 times faster, with 68 more than 50X faster, 114 more than 10X faster, and 181 more than 2X faster. See table below for summary. + -

The following tests were noted to be more than 10% slower with +The following tests were noted to be more than 10% slower with XSync() batching on: - -0.88 500x500 tiled rectangle (161x145 tile) -0.89 Copy 500x500 from window to window - + +0.88 500x500 tiled rectangle (161x145 tile) +0.89 Copy 500x500 from window to window + + + -Offscreen Optimization + +Offscreen Optimization -

Windows span one or more of the back-end servers' screens; however, +Windows span one or more of the back-end servers' screens; however, during Phase I development, windows were created on every back-end server and every rendering request was sent to every window regardless of whether or not that window was visible. With the offscreen @@ -1673,25 +2156,30 @@ between the front and back-end servers, and it reduces the number of XSync() calls. The performance tests were run on a DMX system with only two back-end servers. Greater performance gains will be had as the number of back-end servers increases. + -

Out of more than 300 Out of more than 300 x11perf tests, 3 tests were at least twice as fast, and 146 tests were at least 10% faster. Two tests were more than 10% slower with the offscreen optimization: - -0.88 Hide/expose window via popup (4 kids) -0.89 Resize unmapped window (75 kids) - + +0.88 Hide/expose window via popup (4 kids) +0.89 Resize unmapped window (75 kids) + + + -Lazy Window Creation Optimization + +Lazy Window Creation Optimization -

As mentioned above, during Phase I, windows were created on every +As mentioned above, during Phase I, windows were created on every back-end server even if they were not visible on that back-end. With the lazy window creation optimization, the DMX server does not create windows on a back-end server until they are either visible or they become the parents of a visible window. This optimization builds on the offscreen optimization (described above) and requires it to be enabled. + -

The lazy window creation optimization works by creating the window +The lazy window creation optimization works by creating the window data structures in the front-end server when a client creates a window, but delays creation of the window on the back-end server(s). A private window structure in the DMX server saves the relevant window data and @@ -1704,38 +2192,45 @@ case occurs when a window is mapped or when a visible window is copied, moved or resized and now overlaps the back-end server's screen. The second case occurs when starting a window manager after having created windows to which the window manager needs to add decorations. + -

When either case occurs, a window on the back-end server is created +When either case occurs, a window on the back-end server is created using the data saved in the DMX server's window private data structure. The stacking order is then adjusted to correctly place the window on the back-end and lastly the window is mapped. From this time forward, the window is handled exactly as if the window had been created at the time of the client's request. + -

Note that when a window is no longer visible on a back-end server's +Note that when a window is no longer visible on a back-end server's screen (e.g., it is moved offscreen), the window is not destroyed; rather, it is kept and reused later if the window once again becomes visible on the back-end server's screen. Originally with this optimization, destroying windows was implemented but was later rejected because it increased bandwidth when windows were opaquely moved or resized, which is common in many window managers. + -

The performance tests were run on a DMX system with only two back-end +The performance tests were run on a DMX system with only two back-end servers. Greater performance gains will be had as the number of back-end servers increases. + -

This optimization improved the following This optimization improved the following x11perf tests by more than 10%: - -1.10 500x500 rectangle outline -1.12 Fill 100x100 stippled trapezoid (161x145 stipple) -1.20 Circulate Unmapped window (50 kids) -1.19 Circulate Unmapped window (75 kids) - - -Subdividing Rendering Primitives + +1.10 500x500 rectangle outline +1.12 Fill 100x100 stippled trapezoid (161x145 stipple) +1.20 Circulate Unmapped window (50 kids) +1.19 Circulate Unmapped window (75 kids) + + + -

X11 imaging requests transfer significant data between the client and + +Subdividing Rendering Primitives + +X11 imaging requests transfer significant data between the client and the X server. During Phase I, the DMX server would then transfer the image data to each back-end server. Even with the offscreen optimization (above), these requests still required transferring @@ -1743,58 +2238,67 @@ significant data to each back-end server that contained a visible portion of the window. For example, if the client uses XPutImage() to copy an image to a window that overlaps the entire DMX screen, then the entire image is copied by the DMX server to every back-end server. + -

To reduce the amount of data transferred between the DMX server and +To reduce the amount of data transferred between the DMX server and the back-end servers when XPutImage() is called, the image data is subdivided and only the data that will be visible on a back-end server's screen is sent to that back-end server. Xinerama already implements a subdivision algorithm for XGetImage() and no further optimization was needed. + -

Other rendering primitives were analyzed, but the time required to +Other rendering primitives were analyzed, but the time required to subdivide these primitives was a significant proportion of the time required to send the entire rendering request to the back-end server, so this optimization was rejected for the other rendering primitives. + -

Again, the performance tests were run on a DMX system with only two +Again, the performance tests were run on a DMX system with only two back-end servers. Greater performance gains will be had as the number of back-end servers increases. + -

This optimization improved the following This optimization improved the following x11perf tests by more than 10%: - -1.12 Fill 100x100 stippled trapezoid (161x145 stipple) -1.26 PutImage 10x10 square -1.83 PutImage 100x100 square -1.91 PutImage 500x500 square -1.40 PutImage XY 10x10 square -1.48 PutImage XY 100x100 square -1.50 PutImage XY 500x500 square -1.45 Circulate Unmapped window (75 kids) -1.74 Circulate Unmapped window (100 kids) - + +1.12 Fill 100x100 stippled trapezoid (161x145 stipple) +1.26 PutImage 10x10 square +1.83 PutImage 100x100 square +1.91 PutImage 500x500 square +1.40 PutImage XY 10x10 square +1.48 PutImage XY 100x100 square +1.50 PutImage XY 500x500 square +1.45 Circulate Unmapped window (75 kids) +1.74 Circulate Unmapped window (100 kids) + + -

The following test was noted to be more than 10% slower with this +The following test was noted to be more than 10% slower with this optimization: - -0.88 10-pixel fill chord partial circle - + +0.88 10-pixel fill chord partial circle + + + -Summary of x11perf Data + +Summary of x11perf Data -

With all of the optimizations on, 53 With all of the optimizations on, 53 x11perf tests are more than 100X faster than the unoptimized Phase II deliverable, with 69 more than 50X faster, 73 more than 10X faster, and 199 more than twice as fast. No tests were more than 10% slower than the unoptimized Phase II deliverable. (Compared with the Phase I deliverable, only Circulate Unmapped window (100 kids) was more than 10% slower than the Phase II deliverable. As noted above, this test seems to have wider variability -than other x11perf tests.) + -

The following table summarizes relative The following table summarizes relative x11perf test changes for all optimizations individually and collectively. Note that some of the optimizations have a synergistic effect when used together. - + 1: XSync() batching only 2: Off screen optimizations only @@ -1804,351 +2308,358 @@ optimizations have a synergistic effect when used together. 1 2 3 4 5 Operation ------ ---- ---- ---- ------ --------- - 2.14 1.85 1.00 1.00 4.13 Dot - 1.67 1.80 1.00 1.00 3.31 1x1 rectangle - 2.38 1.43 1.00 1.00 2.44 10x10 rectangle - 1.00 1.00 0.92 0.98 1.00 100x100 rectangle - 1.00 1.00 1.00 1.00 1.00 500x500 rectangle - 1.83 1.85 1.05 1.06 3.54 1x1 stippled rectangle (8x8 stipple) - 2.43 1.43 1.00 1.00 2.41 10x10 stippled rectangle (8x8 stipple) - 0.98 1.00 1.00 1.00 1.00 100x100 stippled rectangle (8x8 stipple) - 1.00 1.00 1.00 1.00 0.98 500x500 stippled rectangle (8x8 stipple) - 1.75 1.75 1.00 1.00 3.40 1x1 opaque stippled rectangle (8x8 stipple) - 2.38 1.42 1.00 1.00 2.34 10x10 opaque stippled rectangle (8x8 stipple) - 1.00 1.00 0.97 0.97 1.00 100x100 opaque stippled rectangle (8x8 stipple) - 1.00 1.00 1.00 1.00 0.99 500x500 opaque stippled rectangle (8x8 stipple) - 1.82 1.82 1.04 1.04 3.56 1x1 tiled rectangle (4x4 tile) - 2.33 1.42 1.00 1.00 2.37 10x10 tiled rectangle (4x4 tile) - 1.00 0.92 1.00 1.00 1.00 100x100 tiled rectangle (4x4 tile) - 1.00 1.00 1.00 1.00 1.00 500x500 tiled rectangle (4x4 tile) - 1.94 1.62 1.00 1.00 3.66 1x1 stippled rectangle (17x15 stipple) - 1.74 1.28 1.00 1.00 1.73 10x10 stippled rectangle (17x15 stipple) - 1.00 1.00 1.00 0.89 0.98 100x100 stippled rectangle (17x15 stipple) - 1.00 1.00 1.00 1.00 0.98 500x500 stippled rectangle (17x15 stipple) - 1.94 1.62 1.00 1.00 3.67 1x1 opaque stippled rectangle (17x15 stipple) - 1.69 1.26 1.00 1.00 1.66 10x10 opaque stippled rectangle (17x15 stipple) - 1.00 0.95 1.00 1.00 1.00 100x100 opaque stippled rectangle (17x15 stipple) - 1.00 1.00 1.00 1.00 0.97 500x500 opaque stippled rectangle (17x15 stipple) - 1.93 1.61 0.99 0.99 3.69 1x1 tiled rectangle (17x15 tile) - 1.73 1.27 1.00 1.00 1.72 10x10 tiled rectangle (17x15 tile) - 1.00 1.00 1.00 1.00 0.98 100x100 tiled rectangle (17x15 tile) - 1.00 1.00 0.97 0.97 1.00 500x500 tiled rectangle (17x15 tile) - 1.95 1.63 1.00 1.00 3.83 1x1 stippled rectangle (161x145 stipple) - 1.80 1.30 1.00 1.00 1.83 10x10 stippled rectangle (161x145 stipple) - 0.97 1.00 1.00 1.00 1.01 100x100 stippled rectangle (161x145 stipple) - 1.00 1.00 1.00 1.00 0.98 500x500 stippled rectangle (161x145 stipple) - 1.95 1.63 1.00 1.00 3.56 1x1 opaque stippled rectangle (161x145 stipple) - 1.65 1.25 1.00 1.00 1.68 10x10 opaque stippled rectangle (161x145 stipple) + 2.14 1.85 1.00 1.00 4.13 Dot + 1.67 1.80 1.00 1.00 3.31 1x1 rectangle + 2.38 1.43 1.00 1.00 2.44 10x10 rectangle + 1.00 1.00 0.92 0.98 1.00 100x100 rectangle + 1.00 1.00 1.00 1.00 1.00 500x500 rectangle + 1.83 1.85 1.05 1.06 3.54 1x1 stippled rectangle (8x8 stipple) + 2.43 1.43 1.00 1.00 2.41 10x10 stippled rectangle (8x8 stipple) + 0.98 1.00 1.00 1.00 1.00 100x100 stippled rectangle (8x8 stipple) + 1.00 1.00 1.00 1.00 0.98 500x500 stippled rectangle (8x8 stipple) + 1.75 1.75 1.00 1.00 3.40 1x1 opaque stippled rectangle (8x8 stipple) + 2.38 1.42 1.00 1.00 2.34 10x10 opaque stippled rectangle (8x8 stipple) + 1.00 1.00 0.97 0.97 1.00 100x100 opaque stippled rectangle (8x8 stipple) + 1.00 1.00 1.00 1.00 0.99 500x500 opaque stippled rectangle (8x8 stipple) + 1.82 1.82 1.04 1.04 3.56 1x1 tiled rectangle (4x4 tile) + 2.33 1.42 1.00 1.00 2.37 10x10 tiled rectangle (4x4 tile) + 1.00 0.92 1.00 1.00 1.00 100x100 tiled rectangle (4x4 tile) + 1.00 1.00 1.00 1.00 1.00 500x500 tiled rectangle (4x4 tile) + 1.94 1.62 1.00 1.00 3.66 1x1 stippled rectangle (17x15 stipple) + 1.74 1.28 1.00 1.00 1.73 10x10 stippled rectangle (17x15 stipple) + 1.00 1.00 1.00 0.89 0.98 100x100 stippled rectangle (17x15 stipple) + 1.00 1.00 1.00 1.00 0.98 500x500 stippled rectangle (17x15 stipple) + 1.94 1.62 1.00 1.00 3.67 1x1 opaque stippled rectangle (17x15 stipple) + 1.69 1.26 1.00 1.00 1.66 10x10 opaque stippled rectangle (17x15 stipple) + 1.00 0.95 1.00 1.00 1.00 100x100 opaque stippled rectangle (17x15 stipple) + 1.00 1.00 1.00 1.00 0.97 500x500 opaque stippled rectangle (17x15 stipple) + 1.93 1.61 0.99 0.99 3.69 1x1 tiled rectangle (17x15 tile) + 1.73 1.27 1.00 1.00 1.72 10x10 tiled rectangle (17x15 tile) + 1.00 1.00 1.00 1.00 0.98 100x100 tiled rectangle (17x15 tile) + 1.00 1.00 0.97 0.97 1.00 500x500 tiled rectangle (17x15 tile) + 1.95 1.63 1.00 1.00 3.83 1x1 stippled rectangle (161x145 stipple) + 1.80 1.30 1.00 1.00 1.83 10x10 stippled rectangle (161x145 stipple) + 0.97 1.00 1.00 1.00 1.01 100x100 stippled rectangle (161x145 stipple) + 1.00 1.00 1.00 1.00 0.98 500x500 stippled rectangle (161x145 stipple) + 1.95 1.63 1.00 1.00 3.56 1x1 opaque stippled rectangle (161x145 stipple) + 1.65 1.25 1.00 1.00 1.68 10x10 opaque stippled rectangle (161x145 stipple) 1.00 1.00 1.00 1.00 1.01 100x100 opaque stippled rectangle (161x145... 1.00 1.00 1.00 1.00 0.97 500x500 opaque stippled rectangle (161x145... - 1.95 1.63 0.98 0.99 3.80 1x1 tiled rectangle (161x145 tile) - 1.67 1.26 1.00 1.00 1.67 10x10 tiled rectangle (161x145 tile) - 1.13 1.14 1.14 1.14 1.14 100x100 tiled rectangle (161x145 tile) - 0.88 1.00 1.00 1.00 0.99 500x500 tiled rectangle (161x145 tile) - 1.93 1.63 1.00 1.00 3.53 1x1 tiled rectangle (216x208 tile) - 1.69 1.26 1.00 1.00 1.66 10x10 tiled rectangle (216x208 tile) - 1.00 1.00 1.00 1.00 1.00 100x100 tiled rectangle (216x208 tile) - 1.00 1.00 1.00 1.00 1.00 500x500 tiled rectangle (216x208 tile) - 1.82 1.70 1.00 1.00 3.38 1-pixel line segment - 2.07 1.56 0.90 1.00 3.31 10-pixel line segment - 1.29 1.10 1.00 1.00 1.27 100-pixel line segment - 1.05 1.06 1.03 1.03 1.09 500-pixel line segment - 1.30 1.13 1.00 1.00 1.29 100-pixel line segment (1 kid) - 1.32 1.15 1.00 1.00 1.32 100-pixel line segment (2 kids) - 1.33 1.16 1.00 1.00 1.33 100-pixel line segment (3 kids) - 1.92 1.64 1.00 1.00 3.73 10-pixel dashed segment - 1.34 1.16 1.00 1.00 1.34 100-pixel dashed segment - 1.24 1.11 0.99 0.97 1.23 100-pixel double-dashed segment - 1.72 1.77 1.00 1.00 3.25 10-pixel horizontal line segment - 1.83 1.66 1.01 1.00 3.54 100-pixel horizontal line segment - 1.86 1.30 1.00 1.00 1.84 500-pixel horizontal line segment - 2.11 1.52 1.00 0.99 3.02 10-pixel vertical line segment - 1.21 1.10 1.00 1.00 1.20 100-pixel vertical line segment - 1.03 1.03 1.00 1.00 1.02 500-pixel vertical line segment - 4.42 1.68 1.00 1.01 4.64 10x1 wide horizontal line segment - 1.83 1.31 1.00 1.00 1.83 100x10 wide horizontal line segment - 1.07 1.00 0.96 1.00 1.07 500x50 wide horizontal line segment - 4.10 1.67 1.00 1.00 4.62 10x1 wide vertical line segment - 1.50 1.24 1.06 1.06 1.48 100x10 wide vertical line segment - 1.06 1.03 1.00 1.00 1.05 500x50 wide vertical line segment - 2.54 1.61 1.00 1.00 3.61 1-pixel line - 2.71 1.48 1.00 1.00 2.67 10-pixel line - 1.19 1.09 1.00 1.00 1.19 100-pixel line - 1.04 1.02 1.00 1.00 1.03 500-pixel line - 2.68 1.51 0.98 1.00 3.17 10-pixel dashed line - 1.23 1.11 0.99 0.99 1.23 100-pixel dashed line - 1.15 1.08 1.00 1.00 1.15 100-pixel double-dashed line - 2.27 1.39 1.00 1.00 2.23 10x1 wide line - 1.20 1.09 1.00 1.00 1.20 100x10 wide line - 1.04 1.02 1.00 1.00 1.04 500x50 wide line - 1.52 1.45 1.00 1.00 1.52 100x10 wide dashed line - 1.54 1.47 1.00 1.00 1.54 100x10 wide double-dashed line - 1.97 1.30 0.96 0.95 1.95 10x10 rectangle outline - 1.44 1.27 1.00 1.00 1.43 100x100 rectangle outline - 3.22 2.16 1.10 1.09 3.61 500x500 rectangle outline - 1.95 1.34 1.00 1.00 1.90 10x10 wide rectangle outline - 1.14 1.14 1.00 1.00 1.13 100x100 wide rectangle outline - 1.00 1.00 1.00 1.00 1.00 500x500 wide rectangle outline - 1.57 1.72 1.00 1.00 3.03 1-pixel circle - 1.96 1.35 1.00 1.00 1.92 10-pixel circle - 1.21 1.07 0.86 0.97 1.20 100-pixel circle - 1.08 1.04 1.00 1.00 1.08 500-pixel circle - 1.39 1.19 1.03 1.03 1.38 100-pixel dashed circle - 1.21 1.11 1.00 1.00 1.23 100-pixel double-dashed circle - 1.59 1.28 1.00 1.00 1.58 10-pixel wide circle - 1.22 1.12 0.99 1.00 1.22 100-pixel wide circle - 1.06 1.04 1.00 1.00 1.05 500-pixel wide circle - 1.87 1.84 1.00 1.00 1.85 100-pixel wide dashed circle - 1.90 1.93 1.01 1.01 1.90 100-pixel wide double-dashed circle - 2.13 1.43 1.00 1.00 2.32 10-pixel partial circle - 1.42 1.18 1.00 1.00 1.42 100-pixel partial circle - 1.92 1.85 1.01 1.01 1.89 10-pixel wide partial circle - 1.73 1.67 1.00 1.00 1.73 100-pixel wide partial circle - 1.36 1.95 1.00 1.00 2.64 1-pixel solid circle - 2.02 1.37 1.00 1.00 2.03 10-pixel solid circle - 1.19 1.09 1.00 1.00 1.19 100-pixel solid circle - 1.02 0.99 1.00 1.00 1.01 500-pixel solid circle - 1.74 1.28 1.00 0.88 1.73 10-pixel fill chord partial circle - 1.31 1.13 1.00 1.00 1.31 100-pixel fill chord partial circle - 1.67 1.31 1.03 1.03 1.72 10-pixel fill slice partial circle - 1.30 1.13 1.00 1.00 1.28 100-pixel fill slice partial circle - 2.45 1.49 1.01 1.00 2.71 10-pixel ellipse - 1.22 1.10 1.00 1.00 1.22 100-pixel ellipse - 1.09 1.04 1.00 1.00 1.09 500-pixel ellipse - 1.90 1.28 1.00 1.00 1.89 100-pixel dashed ellipse - 1.62 1.24 0.96 0.97 1.61 100-pixel double-dashed ellipse - 2.43 1.50 1.00 1.00 2.42 10-pixel wide ellipse - 1.61 1.28 1.03 1.03 1.60 100-pixel wide ellipse - 1.08 1.05 1.00 1.00 1.08 500-pixel wide ellipse - 1.93 1.88 1.00 1.00 1.88 100-pixel wide dashed ellipse - 1.94 1.89 1.01 1.00 1.94 100-pixel wide double-dashed ellipse - 2.31 1.48 1.00 1.00 2.67 10-pixel partial ellipse - 1.38 1.17 1.00 1.00 1.38 100-pixel partial ellipse - 2.00 1.85 0.98 0.97 1.98 10-pixel wide partial ellipse - 1.89 1.86 1.00 1.00 1.89 100-pixel wide partial ellipse - 3.49 1.60 1.00 1.00 3.65 10-pixel filled ellipse - 1.67 1.26 1.00 1.00 1.67 100-pixel filled ellipse - 1.06 1.04 1.00 1.00 1.06 500-pixel filled ellipse - 2.38 1.43 1.01 1.00 2.32 10-pixel fill chord partial ellipse - 2.06 1.30 1.00 1.00 2.05 100-pixel fill chord partial ellipse - 2.27 1.41 1.00 1.00 2.27 10-pixel fill slice partial ellipse - 1.98 1.33 1.00 0.97 1.97 100-pixel fill slice partial ellipse - 57.46 1.99 1.01 1.00 114.92 Fill 1x1 equivalent triangle - 56.94 1.98 1.01 1.00 73.89 Fill 10x10 equivalent triangle - 6.07 1.75 1.00 1.00 6.07 Fill 100x100 equivalent triangle - 51.12 1.98 1.00 1.00 102.81 Fill 1x1 trapezoid - 51.42 1.82 1.01 1.00 94.89 Fill 10x10 trapezoid - 6.47 1.80 1.00 1.00 6.44 Fill 100x100 trapezoid - 1.56 1.28 1.00 0.99 1.56 Fill 300x300 trapezoid - 51.27 1.97 0.96 0.97 102.54 Fill 1x1 stippled trapezoid (8x8 stipple) - 51.73 2.00 1.02 1.02 67.92 Fill 10x10 stippled trapezoid (8x8 stipple) - 5.36 1.72 1.00 1.00 5.36 Fill 100x100 stippled trapezoid (8x8 stipple) - 1.54 1.26 1.00 1.00 1.59 Fill 300x300 stippled trapezoid (8x8 stipple) - 51.41 1.94 1.01 1.00 102.82 Fill 1x1 opaque stippled trapezoid (8x8 stipple) + 1.95 1.63 0.98 0.99 3.80 1x1 tiled rectangle (161x145 tile) + 1.67 1.26 1.00 1.00 1.67 10x10 tiled rectangle (161x145 tile) + 1.13 1.14 1.14 1.14 1.14 100x100 tiled rectangle (161x145 tile) + 0.88 1.00 1.00 1.00 0.99 500x500 tiled rectangle (161x145 tile) + 1.93 1.63 1.00 1.00 3.53 1x1 tiled rectangle (216x208 tile) + 1.69 1.26 1.00 1.00 1.66 10x10 tiled rectangle (216x208 tile) + 1.00 1.00 1.00 1.00 1.00 100x100 tiled rectangle (216x208 tile) + 1.00 1.00 1.00 1.00 1.00 500x500 tiled rectangle (216x208 tile) + 1.82 1.70 1.00 1.00 3.38 1-pixel line segment + 2.07 1.56 0.90 1.00 3.31 10-pixel line segment + 1.29 1.10 1.00 1.00 1.27 100-pixel line segment + 1.05 1.06 1.03 1.03 1.09 500-pixel line segment + 1.30 1.13 1.00 1.00 1.29 100-pixel line segment (1 kid) + 1.32 1.15 1.00 1.00 1.32 100-pixel line segment (2 kids) + 1.33 1.16 1.00 1.00 1.33 100-pixel line segment (3 kids) + 1.92 1.64 1.00 1.00 3.73 10-pixel dashed segment + 1.34 1.16 1.00 1.00 1.34 100-pixel dashed segment + 1.24 1.11 0.99 0.97 1.23 100-pixel double-dashed segment + 1.72 1.77 1.00 1.00 3.25 10-pixel horizontal line segment + 1.83 1.66 1.01 1.00 3.54 100-pixel horizontal line segment + 1.86 1.30 1.00 1.00 1.84 500-pixel horizontal line segment + 2.11 1.52 1.00 0.99 3.02 10-pixel vertical line segment + 1.21 1.10 1.00 1.00 1.20 100-pixel vertical line segment + 1.03 1.03 1.00 1.00 1.02 500-pixel vertical line segment + 4.42 1.68 1.00 1.01 4.64 10x1 wide horizontal line segment + 1.83 1.31 1.00 1.00 1.83 100x10 wide horizontal line segment + 1.07 1.00 0.96 1.00 1.07 500x50 wide horizontal line segment + 4.10 1.67 1.00 1.00 4.62 10x1 wide vertical line segment + 1.50 1.24 1.06 1.06 1.48 100x10 wide vertical line segment + 1.06 1.03 1.00 1.00 1.05 500x50 wide vertical line segment + 2.54 1.61 1.00 1.00 3.61 1-pixel line + 2.71 1.48 1.00 1.00 2.67 10-pixel line + 1.19 1.09 1.00 1.00 1.19 100-pixel line + 1.04 1.02 1.00 1.00 1.03 500-pixel line + 2.68 1.51 0.98 1.00 3.17 10-pixel dashed line + 1.23 1.11 0.99 0.99 1.23 100-pixel dashed line + 1.15 1.08 1.00 1.00 1.15 100-pixel double-dashed line + 2.27 1.39 1.00 1.00 2.23 10x1 wide line + 1.20 1.09 1.00 1.00 1.20 100x10 wide line + 1.04 1.02 1.00 1.00 1.04 500x50 wide line + 1.52 1.45 1.00 1.00 1.52 100x10 wide dashed line + 1.54 1.47 1.00 1.00 1.54 100x10 wide double-dashed line + 1.97 1.30 0.96 0.95 1.95 10x10 rectangle outline + 1.44 1.27 1.00 1.00 1.43 100x100 rectangle outline + 3.22 2.16 1.10 1.09 3.61 500x500 rectangle outline + 1.95 1.34 1.00 1.00 1.90 10x10 wide rectangle outline + 1.14 1.14 1.00 1.00 1.13 100x100 wide rectangle outline + 1.00 1.00 1.00 1.00 1.00 500x500 wide rectangle outline + 1.57 1.72 1.00 1.00 3.03 1-pixel circle + 1.96 1.35 1.00 1.00 1.92 10-pixel circle + 1.21 1.07 0.86 0.97 1.20 100-pixel circle + 1.08 1.04 1.00 1.00 1.08 500-pixel circle + 1.39 1.19 1.03 1.03 1.38 100-pixel dashed circle + 1.21 1.11 1.00 1.00 1.23 100-pixel double-dashed circle + 1.59 1.28 1.00 1.00 1.58 10-pixel wide circle + 1.22 1.12 0.99 1.00 1.22 100-pixel wide circle + 1.06 1.04 1.00 1.00 1.05 500-pixel wide circle + 1.87 1.84 1.00 1.00 1.85 100-pixel wide dashed circle + 1.90 1.93 1.01 1.01 1.90 100-pixel wide double-dashed circle + 2.13 1.43 1.00 1.00 2.32 10-pixel partial circle + 1.42 1.18 1.00 1.00 1.42 100-pixel partial circle + 1.92 1.85 1.01 1.01 1.89 10-pixel wide partial circle + 1.73 1.67 1.00 1.00 1.73 100-pixel wide partial circle + 1.36 1.95 1.00 1.00 2.64 1-pixel solid circle + 2.02 1.37 1.00 1.00 2.03 10-pixel solid circle + 1.19 1.09 1.00 1.00 1.19 100-pixel solid circle + 1.02 0.99 1.00 1.00 1.01 500-pixel solid circle + 1.74 1.28 1.00 0.88 1.73 10-pixel fill chord partial circle + 1.31 1.13 1.00 1.00 1.31 100-pixel fill chord partial circle + 1.67 1.31 1.03 1.03 1.72 10-pixel fill slice partial circle + 1.30 1.13 1.00 1.00 1.28 100-pixel fill slice partial circle + 2.45 1.49 1.01 1.00 2.71 10-pixel ellipse + 1.22 1.10 1.00 1.00 1.22 100-pixel ellipse + 1.09 1.04 1.00 1.00 1.09 500-pixel ellipse + 1.90 1.28 1.00 1.00 1.89 100-pixel dashed ellipse + 1.62 1.24 0.96 0.97 1.61 100-pixel double-dashed ellipse + 2.43 1.50 1.00 1.00 2.42 10-pixel wide ellipse + 1.61 1.28 1.03 1.03 1.60 100-pixel wide ellipse + 1.08 1.05 1.00 1.00 1.08 500-pixel wide ellipse + 1.93 1.88 1.00 1.00 1.88 100-pixel wide dashed ellipse + 1.94 1.89 1.01 1.00 1.94 100-pixel wide double-dashed ellipse + 2.31 1.48 1.00 1.00 2.67 10-pixel partial ellipse + 1.38 1.17 1.00 1.00 1.38 100-pixel partial ellipse + 2.00 1.85 0.98 0.97 1.98 10-pixel wide partial ellipse + 1.89 1.86 1.00 1.00 1.89 100-pixel wide partial ellipse + 3.49 1.60 1.00 1.00 3.65 10-pixel filled ellipse + 1.67 1.26 1.00 1.00 1.67 100-pixel filled ellipse + 1.06 1.04 1.00 1.00 1.06 500-pixel filled ellipse + 2.38 1.43 1.01 1.00 2.32 10-pixel fill chord partial ellipse + 2.06 1.30 1.00 1.00 2.05 100-pixel fill chord partial ellipse + 2.27 1.41 1.00 1.00 2.27 10-pixel fill slice partial ellipse + 1.98 1.33 1.00 0.97 1.97 100-pixel fill slice partial ellipse + 57.46 1.99 1.01 1.00 114.92 Fill 1x1 equivalent triangle + 56.94 1.98 1.01 1.00 73.89 Fill 10x10 equivalent triangle + 6.07 1.75 1.00 1.00 6.07 Fill 100x100 equivalent triangle + 51.12 1.98 1.00 1.00 102.81 Fill 1x1 trapezoid + 51.42 1.82 1.01 1.00 94.89 Fill 10x10 trapezoid + 6.47 1.80 1.00 1.00 6.44 Fill 100x100 trapezoid + 1.56 1.28 1.00 0.99 1.56 Fill 300x300 trapezoid + 51.27 1.97 0.96 0.97 102.54 Fill 1x1 stippled trapezoid (8x8 stipple) + 51.73 2.00 1.02 1.02 67.92 Fill 10x10 stippled trapezoid (8x8 stipple) + 5.36 1.72 1.00 1.00 5.36 Fill 100x100 stippled trapezoid (8x8 stipple) + 1.54 1.26 1.00 1.00 1.59 Fill 300x300 stippled trapezoid (8x8 stipple) + 51.41 1.94 1.01 1.00 102.82 Fill 1x1 opaque stippled trapezoid (8x8 stipple) 50.71 1.95 0.99 1.00 65.44 Fill 10x10 opaque stippled trapezoid (8x8... 5.33 1.73 1.00 1.00 5.36 Fill 100x100 opaque stippled trapezoid (8x8... 1.58 1.25 1.00 1.00 1.58 Fill 300x300 opaque stippled trapezoid (8x8... - 51.56 1.96 0.99 0.90 103.68 Fill 1x1 tiled trapezoid (4x4 tile) - 51.59 1.99 1.01 1.01 62.25 Fill 10x10 tiled trapezoid (4x4 tile) - 5.38 1.72 1.00 1.00 5.38 Fill 100x100 tiled trapezoid (4x4 tile) - 1.54 1.25 1.00 0.99 1.58 Fill 300x300 tiled trapezoid (4x4 tile) - 51.70 1.98 1.01 1.01 103.98 Fill 1x1 stippled trapezoid (17x15 stipple) - 44.86 1.97 1.00 1.00 44.86 Fill 10x10 stippled trapezoid (17x15 stipple) - 2.74 1.56 1.00 1.00 2.73 Fill 100x100 stippled trapezoid (17x15 stipple) - 1.29 1.14 1.00 1.00 1.27 Fill 300x300 stippled trapezoid (17x15 stipple) + 51.56 1.96 0.99 0.90 103.68 Fill 1x1 tiled trapezoid (4x4 tile) + 51.59 1.99 1.01 1.01 62.25 Fill 10x10 tiled trapezoid (4x4 tile) + 5.38 1.72 1.00 1.00 5.38 Fill 100x100 tiled trapezoid (4x4 tile) + 1.54 1.25 1.00 0.99 1.58 Fill 300x300 tiled trapezoid (4x4 tile) + 51.70 1.98 1.01 1.01 103.98 Fill 1x1 stippled trapezoid (17x15 stipple) + 44.86 1.97 1.00 1.00 44.86 Fill 10x10 stippled trapezoid (17x15 stipple) + 2.74 1.56 1.00 1.00 2.73 Fill 100x100 stippled trapezoid (17x15 stipple) + 1.29 1.14 1.00 1.00 1.27 Fill 300x300 stippled trapezoid (17x15 stipple) 51.41 1.96 0.96 0.95 103.39 Fill 1x1 opaque stippled trapezoid (17x15... 45.14 1.96 1.01 1.00 45.14 Fill 10x10 opaque stippled trapezoid (17x15... 2.68 1.56 1.00 1.00 2.68 Fill 100x100 opaque stippled trapezoid (17x15... 1.26 1.10 1.00 1.00 1.28 Fill 300x300 opaque stippled trapezoid (17x15... - 51.13 1.97 1.00 0.99 103.39 Fill 1x1 tiled trapezoid (17x15 tile) - 47.58 1.96 1.00 1.00 47.86 Fill 10x10 tiled trapezoid (17x15 tile) - 2.74 1.56 1.00 1.00 2.74 Fill 100x100 tiled trapezoid (17x15 tile) - 1.29 1.14 1.00 1.00 1.28 Fill 300x300 tiled trapezoid (17x15 tile) - 51.13 1.97 0.99 0.97 103.39 Fill 1x1 stippled trapezoid (161x145 stipple) - 45.14 1.97 1.00 1.00 44.29 Fill 10x10 stippled trapezoid (161x145 stipple) - 3.02 1.77 1.12 1.12 3.38 Fill 100x100 stippled trapezoid (161x145 stipple) - 1.31 1.13 1.00 1.00 1.30 Fill 300x300 stippled trapezoid (161x145 stipple) + 51.13 1.97 1.00 0.99 103.39 Fill 1x1 tiled trapezoid (17x15 tile) + 47.58 1.96 1.00 1.00 47.86 Fill 10x10 tiled trapezoid (17x15 tile) + 2.74 1.56 1.00 1.00 2.74 Fill 100x100 tiled trapezoid (17x15 tile) + 1.29 1.14 1.00 1.00 1.28 Fill 300x300 tiled trapezoid (17x15 tile) + 51.13 1.97 0.99 0.97 103.39 Fill 1x1 stippled trapezoid (161x145 stipple) + 45.14 1.97 1.00 1.00 44.29 Fill 10x10 stippled trapezoid (161x145 stipple) + 3.02 1.77 1.12 1.12 3.38 Fill 100x100 stippled trapezoid (161x145 stipple) + 1.31 1.13 1.00 1.00 1.30 Fill 300x300 stippled trapezoid (161x145 stipple) 51.27 1.97 1.00 1.00 103.10 Fill 1x1 opaque stippled trapezoid (161x145... 45.01 1.97 1.00 1.00 45.01 Fill 10x10 opaque stippled trapezoid (161x145... 2.67 1.56 1.00 1.00 2.69 Fill 100x100 opaque stippled trapezoid (161x145.. 1.29 1.13 1.00 1.01 1.27 Fill 300x300 opaque stippled trapezoid (161x145.. - 51.41 1.96 1.00 0.99 103.39 Fill 1x1 tiled trapezoid (161x145 tile) - 45.01 1.96 0.98 1.00 45.01 Fill 10x10 tiled trapezoid (161x145 tile) - 2.62 1.36 1.00 1.00 2.69 Fill 100x100 tiled trapezoid (161x145 tile) - 1.27 1.13 1.00 1.00 1.22 Fill 300x300 tiled trapezoid (161x145 tile) - 51.13 1.98 1.00 1.00 103.39 Fill 1x1 tiled trapezoid (216x208 tile) - 45.14 1.97 1.01 0.99 45.14 Fill 10x10 tiled trapezoid (216x208 tile) - 2.62 1.55 1.00 1.00 2.71 Fill 100x100 tiled trapezoid (216x208 tile) - 1.28 1.13 1.00 1.00 1.20 Fill 300x300 tiled trapezoid (216x208 tile) - 50.71 1.95 1.00 1.00 54.70 Fill 10x10 equivalent complex polygon - 5.51 1.71 0.96 0.98 5.47 Fill 100x100 equivalent complex polygons - 8.39 1.97 1.00 1.00 16.75 Fill 10x10 64-gon (Convex) - 8.38 1.83 1.00 1.00 8.43 Fill 100x100 64-gon (Convex) - 8.50 1.96 1.00 1.00 16.64 Fill 10x10 64-gon (Complex) - 8.26 1.83 1.00 1.00 8.35 Fill 100x100 64-gon (Complex) - 14.09 1.87 1.00 1.00 14.05 Char in 80-char line (6x13) - 11.91 1.87 1.00 1.00 11.95 Char in 70-char line (8x13) - 11.16 1.85 1.01 1.00 11.10 Char in 60-char line (9x15) - 10.09 1.78 1.00 1.00 10.09 Char16 in 40-char line (k14) - 6.15 1.75 1.00 1.00 6.31 Char16 in 23-char line (k24) - 11.92 1.90 1.03 1.03 11.88 Char in 80-char line (TR 10) - 8.18 1.78 1.00 0.99 8.17 Char in 30-char line (TR 24) - 42.83 1.44 1.01 1.00 42.11 Char in 20/40/20 line (6x13, TR 10) - 27.45 1.43 1.01 1.01 27.45 Char16 in 7/14/7 line (k14, k24) - 12.13 1.85 1.00 1.00 12.05 Char in 80-char image line (6x13) - 10.00 1.84 1.00 1.00 10.00 Char in 70-char image line (8x13) - 9.18 1.83 1.00 1.00 9.12 Char in 60-char image line (9x15) - 9.66 1.82 0.98 0.95 9.66 Char16 in 40-char image line (k14) - 5.82 1.72 1.00 1.00 5.99 Char16 in 23-char image line (k24) - 8.70 1.80 1.00 1.00 8.65 Char in 80-char image line (TR 10) - 4.67 1.66 1.00 1.00 4.67 Char in 30-char image line (TR 24) - 84.43 1.47 1.00 1.00 124.18 Scroll 10x10 pixels - 3.73 1.50 1.00 0.98 3.73 Scroll 100x100 pixels - 1.00 1.00 1.00 1.00 1.00 Scroll 500x500 pixels - 84.43 1.51 1.00 1.00 134.02 Copy 10x10 from window to window - 3.62 1.51 0.98 0.98 3.62 Copy 100x100 from window to window - 0.89 1.00 1.00 1.00 1.00 Copy 500x500 from window to window - 57.06 1.99 1.00 1.00 88.64 Copy 10x10 from pixmap to window - 2.49 2.00 1.00 1.00 2.48 Copy 100x100 from pixmap to window - 1.00 0.91 1.00 1.00 0.98 Copy 500x500 from pixmap to window - 2.04 1.01 1.00 1.00 2.03 Copy 10x10 from window to pixmap - 1.05 1.00 1.00 1.00 1.05 Copy 100x100 from window to pixmap - 1.00 1.00 0.93 1.00 1.04 Copy 500x500 from window to pixmap - 58.52 1.03 1.03 1.02 57.95 Copy 10x10 from pixmap to pixmap - 2.40 1.00 1.00 1.00 2.45 Copy 100x100 from pixmap to pixmap - 1.00 1.00 1.00 1.00 1.00 Copy 500x500 from pixmap to pixmap - 51.57 1.92 1.00 1.00 85.75 Copy 10x10 1-bit deep plane - 6.37 1.75 1.01 1.01 6.37 Copy 100x100 1-bit deep plane - 1.26 1.11 1.00 1.00 1.24 Copy 500x500 1-bit deep plane - 4.23 1.63 0.98 0.97 4.38 Copy 10x10 n-bit deep plane - 1.04 1.02 1.00 1.00 1.04 Copy 100x100 n-bit deep plane - 1.00 1.00 1.00 1.00 1.00 Copy 500x500 n-bit deep plane - 6.45 1.98 1.00 1.26 12.80 PutImage 10x10 square - 1.10 1.87 1.00 1.83 2.11 PutImage 100x100 square - 1.02 1.93 1.00 1.91 1.91 PutImage 500x500 square - 4.17 1.78 1.00 1.40 7.18 PutImage XY 10x10 square - 1.27 1.49 0.97 1.48 2.10 PutImage XY 100x100 square - 1.00 1.50 1.00 1.50 1.52 PutImage XY 500x500 square - 1.07 1.01 1.00 1.00 1.06 GetImage 10x10 square - 1.01 1.00 1.00 1.00 1.01 GetImage 100x100 square - 1.00 1.00 1.00 1.00 1.00 GetImage 500x500 square - 1.56 1.00 0.99 0.97 1.56 GetImage XY 10x10 square - 1.02 1.00 1.00 1.00 1.02 GetImage XY 100x100 square - 1.00 1.00 1.00 1.00 1.00 GetImage XY 500x500 square - 1.00 1.00 1.01 0.98 0.95 X protocol NoOperation - 1.02 1.03 1.04 1.03 1.00 QueryPointer - 1.03 1.02 1.04 1.03 1.00 GetProperty -100.41 1.51 1.00 1.00 198.76 Change graphics context - 45.81 1.00 0.99 0.97 57.10 Create and map subwindows (4 kids) - 78.45 1.01 1.02 1.02 63.07 Create and map subwindows (16 kids) - 73.91 1.01 1.00 1.00 56.37 Create and map subwindows (25 kids) - 73.22 1.00 1.00 1.00 49.07 Create and map subwindows (50 kids) - 72.36 1.01 0.99 1.00 32.14 Create and map subwindows (75 kids) - 70.34 1.00 1.00 1.00 30.12 Create and map subwindows (100 kids) - 55.00 1.00 1.00 0.99 23.75 Create and map subwindows (200 kids) - 55.30 1.01 1.00 1.00 141.03 Create unmapped window (4 kids) - 55.38 1.01 1.01 1.00 163.25 Create unmapped window (16 kids) - 54.75 0.96 1.00 0.99 166.95 Create unmapped window (25 kids) - 54.83 1.00 1.00 0.99 178.81 Create unmapped window (50 kids) - 55.38 1.01 1.01 1.00 181.20 Create unmapped window (75 kids) - 55.38 1.01 1.01 1.00 181.20 Create unmapped window (100 kids) - 54.87 1.01 1.01 1.00 182.05 Create unmapped window (200 kids) - 28.13 1.00 1.00 1.00 30.75 Map window via parent (4 kids) - 36.14 1.01 1.01 1.01 32.58 Map window via parent (16 kids) - 26.13 1.00 0.98 0.95 29.85 Map window via parent (25 kids) - 40.07 1.00 1.01 1.00 27.57 Map window via parent (50 kids) - 23.26 0.99 1.00 1.00 18.23 Map window via parent (75 kids) - 22.91 0.99 1.00 0.99 16.52 Map window via parent (100 kids) - 27.79 1.00 1.00 0.99 12.50 Map window via parent (200 kids) - 22.35 1.00 1.00 1.00 56.19 Unmap window via parent (4 kids) - 9.57 1.00 0.99 1.00 89.78 Unmap window via parent (16 kids) - 80.77 1.01 1.00 1.00 103.85 Unmap window via parent (25 kids) - 96.34 1.00 1.00 1.00 116.06 Unmap window via parent (50 kids) - 99.72 1.00 1.00 1.00 124.93 Unmap window via parent (75 kids) -112.36 1.00 1.00 1.00 125.27 Unmap window via parent (100 kids) -105.41 1.00 1.00 0.99 120.00 Unmap window via parent (200 kids) - 51.29 1.03 1.02 1.02 74.19 Destroy window via parent (4 kids) - 86.75 0.99 0.99 0.99 116.87 Destroy window via parent (16 kids) -106.43 1.01 1.01 1.01 127.49 Destroy window via parent (25 kids) -120.34 1.01 1.01 1.00 140.11 Destroy window via parent (50 kids) -126.67 1.00 0.99 0.99 145.00 Destroy window via parent (75 kids) -126.11 1.01 1.01 1.00 140.56 Destroy window via parent (100 kids) -128.57 1.01 1.00 1.00 137.91 Destroy window via parent (200 kids) - 16.04 0.88 1.00 1.00 20.36 Hide/expose window via popup (4 kids) - 19.04 1.01 1.00 1.00 23.48 Hide/expose window via popup (16 kids) - 19.22 1.00 1.00 1.00 20.44 Hide/expose window via popup (25 kids) - 17.41 1.00 0.91 0.97 17.68 Hide/expose window via popup (50 kids) - 17.29 1.01 1.00 1.01 17.07 Hide/expose window via popup (75 kids) - 16.74 1.00 1.00 1.00 16.17 Hide/expose window via popup (100 kids) - 10.30 1.00 1.00 1.00 10.51 Hide/expose window via popup (200 kids) - 16.48 1.01 1.00 1.00 26.05 Move window (4 kids) - 17.01 0.95 1.00 1.00 23.97 Move window (16 kids) - 16.95 1.00 1.00 1.00 22.90 Move window (25 kids) - 16.05 1.01 1.00 1.00 21.32 Move window (50 kids) - 15.58 1.00 0.98 0.98 19.44 Move window (75 kids) - 14.98 1.02 1.03 1.03 18.17 Move window (100 kids) - 10.90 1.01 1.01 1.00 12.68 Move window (200 kids) - 49.42 1.00 1.00 1.00 198.27 Moved unmapped window (4 kids) - 50.72 0.97 1.00 1.00 193.66 Moved unmapped window (16 kids) - 50.87 1.00 0.99 1.00 195.09 Moved unmapped window (25 kids) - 50.72 1.00 1.00 1.00 189.34 Moved unmapped window (50 kids) - 50.87 1.00 1.00 1.00 191.33 Moved unmapped window (75 kids) - 50.87 1.00 1.00 0.90 186.71 Moved unmapped window (100 kids) - 50.87 1.00 1.00 1.00 179.19 Moved unmapped window (200 kids) - 41.04 1.00 1.00 1.00 56.61 Move window via parent (4 kids) - 69.81 1.00 1.00 1.00 130.82 Move window via parent (16 kids) - 95.81 1.00 1.00 1.00 141.92 Move window via parent (25 kids) - 95.98 1.00 1.00 1.00 149.43 Move window via parent (50 kids) - 96.59 1.01 1.01 1.00 153.98 Move window via parent (75 kids) - 97.19 1.00 1.00 1.00 157.30 Move window via parent (100 kids) - 96.67 1.00 0.99 0.96 159.44 Move window via parent (200 kids) - 17.75 1.01 1.00 1.00 27.61 Resize window (4 kids) - 17.94 1.00 1.00 0.99 25.42 Resize window (16 kids) - 17.92 1.01 1.00 1.00 24.47 Resize window (25 kids) - 17.24 0.97 1.00 1.00 24.14 Resize window (50 kids) - 16.81 1.00 1.00 0.99 22.75 Resize window (75 kids) - 16.08 1.00 1.00 1.00 21.20 Resize window (100 kids) - 12.92 1.00 0.99 1.00 16.26 Resize window (200 kids) - 52.94 1.01 1.00 1.00 327.12 Resize unmapped window (4 kids) - 53.60 1.01 1.01 1.01 333.71 Resize unmapped window (16 kids) - 52.99 1.00 1.00 1.00 337.29 Resize unmapped window (25 kids) - 51.98 1.00 1.00 1.00 329.38 Resize unmapped window (50 kids) - 53.05 0.89 1.00 1.00 322.60 Resize unmapped window (75 kids) - 53.05 1.00 1.00 1.00 318.08 Resize unmapped window (100 kids) - 53.11 1.00 1.00 0.99 306.21 Resize unmapped window (200 kids) - 16.76 1.00 0.96 1.00 19.46 Circulate window (4 kids) - 17.24 1.00 1.00 0.97 16.24 Circulate window (16 kids) - 16.30 1.03 1.03 1.03 15.85 Circulate window (25 kids) - 13.45 1.00 1.00 1.00 14.90 Circulate window (50 kids) - 12.91 1.00 1.00 1.00 13.06 Circulate window (75 kids) - 11.30 0.98 1.00 1.00 11.03 Circulate window (100 kids) - 7.58 1.01 1.01 0.99 7.47 Circulate window (200 kids) - 1.01 1.01 0.98 1.00 0.95 Circulate Unmapped window (4 kids) - 1.07 1.07 1.01 1.07 1.02 Circulate Unmapped window (16 kids) - 1.04 1.09 1.06 1.05 0.97 Circulate Unmapped window (25 kids) - 1.04 1.23 1.20 1.18 1.05 Circulate Unmapped window (50 kids) - 1.18 1.53 1.19 1.45 1.24 Circulate Unmapped window (75 kids) - 1.08 1.02 1.01 1.74 1.01 Circulate Unmapped window (100 kids) - 1.01 1.12 0.98 0.91 0.97 Circulate Unmapped window (200 kids) - + 51.41 1.96 1.00 0.99 103.39 Fill 1x1 tiled trapezoid (161x145 tile) + 45.01 1.96 0.98 1.00 45.01 Fill 10x10 tiled trapezoid (161x145 tile) + 2.62 1.36 1.00 1.00 2.69 Fill 100x100 tiled trapezoid (161x145 tile) + 1.27 1.13 1.00 1.00 1.22 Fill 300x300 tiled trapezoid (161x145 tile) + 51.13 1.98 1.00 1.00 103.39 Fill 1x1 tiled trapezoid (216x208 tile) + 45.14 1.97 1.01 0.99 45.14 Fill 10x10 tiled trapezoid (216x208 tile) + 2.62 1.55 1.00 1.00 2.71 Fill 100x100 tiled trapezoid (216x208 tile) + 1.28 1.13 1.00 1.00 1.20 Fill 300x300 tiled trapezoid (216x208 tile) + 50.71 1.95 1.00 1.00 54.70 Fill 10x10 equivalent complex polygon + 5.51 1.71 0.96 0.98 5.47 Fill 100x100 equivalent complex polygons + 8.39 1.97 1.00 1.00 16.75 Fill 10x10 64-gon (Convex) + 8.38 1.83 1.00 1.00 8.43 Fill 100x100 64-gon (Convex) + 8.50 1.96 1.00 1.00 16.64 Fill 10x10 64-gon (Complex) + 8.26 1.83 1.00 1.00 8.35 Fill 100x100 64-gon (Complex) + 14.09 1.87 1.00 1.00 14.05 Char in 80-char line (6x13) + 11.91 1.87 1.00 1.00 11.95 Char in 70-char line (8x13) + 11.16 1.85 1.01 1.00 11.10 Char in 60-char line (9x15) + 10.09 1.78 1.00 1.00 10.09 Char16 in 40-char line (k14) + 6.15 1.75 1.00 1.00 6.31 Char16 in 23-char line (k24) + 11.92 1.90 1.03 1.03 11.88 Char in 80-char line (TR 10) + 8.18 1.78 1.00 0.99 8.17 Char in 30-char line (TR 24) + 42.83 1.44 1.01 1.00 42.11 Char in 20/40/20 line (6x13, TR 10) + 27.45 1.43 1.01 1.01 27.45 Char16 in 7/14/7 line (k14, k24) + 12.13 1.85 1.00 1.00 12.05 Char in 80-char image line (6x13) + 10.00 1.84 1.00 1.00 10.00 Char in 70-char image line (8x13) + 9.18 1.83 1.00 1.00 9.12 Char in 60-char image line (9x15) + 9.66 1.82 0.98 0.95 9.66 Char16 in 40-char image line (k14) + 5.82 1.72 1.00 1.00 5.99 Char16 in 23-char image line (k24) + 8.70 1.80 1.00 1.00 8.65 Char in 80-char image line (TR 10) + 4.67 1.66 1.00 1.00 4.67 Char in 30-char image line (TR 24) + 84.43 1.47 1.00 1.00 124.18 Scroll 10x10 pixels + 3.73 1.50 1.00 0.98 3.73 Scroll 100x100 pixels + 1.00 1.00 1.00 1.00 1.00 Scroll 500x500 pixels + 84.43 1.51 1.00 1.00 134.02 Copy 10x10 from window to window + 3.62 1.51 0.98 0.98 3.62 Copy 100x100 from window to window + 0.89 1.00 1.00 1.00 1.00 Copy 500x500 from window to window + 57.06 1.99 1.00 1.00 88.64 Copy 10x10 from pixmap to window + 2.49 2.00 1.00 1.00 2.48 Copy 100x100 from pixmap to window + 1.00 0.91 1.00 1.00 0.98 Copy 500x500 from pixmap to window + 2.04 1.01 1.00 1.00 2.03 Copy 10x10 from window to pixmap + 1.05 1.00 1.00 1.00 1.05 Copy 100x100 from window to pixmap + 1.00 1.00 0.93 1.00 1.04 Copy 500x500 from window to pixmap + 58.52 1.03 1.03 1.02 57.95 Copy 10x10 from pixmap to pixmap + 2.40 1.00 1.00 1.00 2.45 Copy 100x100 from pixmap to pixmap + 1.00 1.00 1.00 1.00 1.00 Copy 500x500 from pixmap to pixmap + 51.57 1.92 1.00 1.00 85.75 Copy 10x10 1-bit deep plane + 6.37 1.75 1.01 1.01 6.37 Copy 100x100 1-bit deep plane + 1.26 1.11 1.00 1.00 1.24 Copy 500x500 1-bit deep plane + 4.23 1.63 0.98 0.97 4.38 Copy 10x10 n-bit deep plane + 1.04 1.02 1.00 1.00 1.04 Copy 100x100 n-bit deep plane + 1.00 1.00 1.00 1.00 1.00 Copy 500x500 n-bit deep plane + 6.45 1.98 1.00 1.26 12.80 PutImage 10x10 square + 1.10 1.87 1.00 1.83 2.11 PutImage 100x100 square + 1.02 1.93 1.00 1.91 1.91 PutImage 500x500 square + 4.17 1.78 1.00 1.40 7.18 PutImage XY 10x10 square + 1.27 1.49 0.97 1.48 2.10 PutImage XY 100x100 square + 1.00 1.50 1.00 1.50 1.52 PutImage XY 500x500 square + 1.07 1.01 1.00 1.00 1.06 GetImage 10x10 square + 1.01 1.00 1.00 1.00 1.01 GetImage 100x100 square + 1.00 1.00 1.00 1.00 1.00 GetImage 500x500 square + 1.56 1.00 0.99 0.97 1.56 GetImage XY 10x10 square + 1.02 1.00 1.00 1.00 1.02 GetImage XY 100x100 square + 1.00 1.00 1.00 1.00 1.00 GetImage XY 500x500 square + 1.00 1.00 1.01 0.98 0.95 X protocol NoOperation + 1.02 1.03 1.04 1.03 1.00 QueryPointer + 1.03 1.02 1.04 1.03 1.00 GetProperty +100.41 1.51 1.00 1.00 198.76 Change graphics context + 45.81 1.00 0.99 0.97 57.10 Create and map subwindows (4 kids) + 78.45 1.01 1.02 1.02 63.07 Create and map subwindows (16 kids) + 73.91 1.01 1.00 1.00 56.37 Create and map subwindows (25 kids) + 73.22 1.00 1.00 1.00 49.07 Create and map subwindows (50 kids) + 72.36 1.01 0.99 1.00 32.14 Create and map subwindows (75 kids) + 70.34 1.00 1.00 1.00 30.12 Create and map subwindows (100 kids) + 55.00 1.00 1.00 0.99 23.75 Create and map subwindows (200 kids) + 55.30 1.01 1.00 1.00 141.03 Create unmapped window (4 kids) + 55.38 1.01 1.01 1.00 163.25 Create unmapped window (16 kids) + 54.75 0.96 1.00 0.99 166.95 Create unmapped window (25 kids) + 54.83 1.00 1.00 0.99 178.81 Create unmapped window (50 kids) + 55.38 1.01 1.01 1.00 181.20 Create unmapped window (75 kids) + 55.38 1.01 1.01 1.00 181.20 Create unmapped window (100 kids) + 54.87 1.01 1.01 1.00 182.05 Create unmapped window (200 kids) + 28.13 1.00 1.00 1.00 30.75 Map window via parent (4 kids) + 36.14 1.01 1.01 1.01 32.58 Map window via parent (16 kids) + 26.13 1.00 0.98 0.95 29.85 Map window via parent (25 kids) + 40.07 1.00 1.01 1.00 27.57 Map window via parent (50 kids) + 23.26 0.99 1.00 1.00 18.23 Map window via parent (75 kids) + 22.91 0.99 1.00 0.99 16.52 Map window via parent (100 kids) + 27.79 1.00 1.00 0.99 12.50 Map window via parent (200 kids) + 22.35 1.00 1.00 1.00 56.19 Unmap window via parent (4 kids) + 9.57 1.00 0.99 1.00 89.78 Unmap window via parent (16 kids) + 80.77 1.01 1.00 1.00 103.85 Unmap window via parent (25 kids) + 96.34 1.00 1.00 1.00 116.06 Unmap window via parent (50 kids) + 99.72 1.00 1.00 1.00 124.93 Unmap window via parent (75 kids) +112.36 1.00 1.00 1.00 125.27 Unmap window via parent (100 kids) +105.41 1.00 1.00 0.99 120.00 Unmap window via parent (200 kids) + 51.29 1.03 1.02 1.02 74.19 Destroy window via parent (4 kids) + 86.75 0.99 0.99 0.99 116.87 Destroy window via parent (16 kids) +106.43 1.01 1.01 1.01 127.49 Destroy window via parent (25 kids) +120.34 1.01 1.01 1.00 140.11 Destroy window via parent (50 kids) +126.67 1.00 0.99 0.99 145.00 Destroy window via parent (75 kids) +126.11 1.01 1.01 1.00 140.56 Destroy window via parent (100 kids) +128.57 1.01 1.00 1.00 137.91 Destroy window via parent (200 kids) + 16.04 0.88 1.00 1.00 20.36 Hide/expose window via popup (4 kids) + 19.04 1.01 1.00 1.00 23.48 Hide/expose window via popup (16 kids) + 19.22 1.00 1.00 1.00 20.44 Hide/expose window via popup (25 kids) + 17.41 1.00 0.91 0.97 17.68 Hide/expose window via popup (50 kids) + 17.29 1.01 1.00 1.01 17.07 Hide/expose window via popup (75 kids) + 16.74 1.00 1.00 1.00 16.17 Hide/expose window via popup (100 kids) + 10.30 1.00 1.00 1.00 10.51 Hide/expose window via popup (200 kids) + 16.48 1.01 1.00 1.00 26.05 Move window (4 kids) + 17.01 0.95 1.00 1.00 23.97 Move window (16 kids) + 16.95 1.00 1.00 1.00 22.90 Move window (25 kids) + 16.05 1.01 1.00 1.00 21.32 Move window (50 kids) + 15.58 1.00 0.98 0.98 19.44 Move window (75 kids) + 14.98 1.02 1.03 1.03 18.17 Move window (100 kids) + 10.90 1.01 1.01 1.00 12.68 Move window (200 kids) + 49.42 1.00 1.00 1.00 198.27 Moved unmapped window (4 kids) + 50.72 0.97 1.00 1.00 193.66 Moved unmapped window (16 kids) + 50.87 1.00 0.99 1.00 195.09 Moved unmapped window (25 kids) + 50.72 1.00 1.00 1.00 189.34 Moved unmapped window (50 kids) + 50.87 1.00 1.00 1.00 191.33 Moved unmapped window (75 kids) + 50.87 1.00 1.00 0.90 186.71 Moved unmapped window (100 kids) + 50.87 1.00 1.00 1.00 179.19 Moved unmapped window (200 kids) + 41.04 1.00 1.00 1.00 56.61 Move window via parent (4 kids) + 69.81 1.00 1.00 1.00 130.82 Move window via parent (16 kids) + 95.81 1.00 1.00 1.00 141.92 Move window via parent (25 kids) + 95.98 1.00 1.00 1.00 149.43 Move window via parent (50 kids) + 96.59 1.01 1.01 1.00 153.98 Move window via parent (75 kids) + 97.19 1.00 1.00 1.00 157.30 Move window via parent (100 kids) + 96.67 1.00 0.99 0.96 159.44 Move window via parent (200 kids) + 17.75 1.01 1.00 1.00 27.61 Resize window (4 kids) + 17.94 1.00 1.00 0.99 25.42 Resize window (16 kids) + 17.92 1.01 1.00 1.00 24.47 Resize window (25 kids) + 17.24 0.97 1.00 1.00 24.14 Resize window (50 kids) + 16.81 1.00 1.00 0.99 22.75 Resize window (75 kids) + 16.08 1.00 1.00 1.00 21.20 Resize window (100 kids) + 12.92 1.00 0.99 1.00 16.26 Resize window (200 kids) + 52.94 1.01 1.00 1.00 327.12 Resize unmapped window (4 kids) + 53.60 1.01 1.01 1.01 333.71 Resize unmapped window (16 kids) + 52.99 1.00 1.00 1.00 337.29 Resize unmapped window (25 kids) + 51.98 1.00 1.00 1.00 329.38 Resize unmapped window (50 kids) + 53.05 0.89 1.00 1.00 322.60 Resize unmapped window (75 kids) + 53.05 1.00 1.00 1.00 318.08 Resize unmapped window (100 kids) + 53.11 1.00 1.00 0.99 306.21 Resize unmapped window (200 kids) + 16.76 1.00 0.96 1.00 19.46 Circulate window (4 kids) + 17.24 1.00 1.00 0.97 16.24 Circulate window (16 kids) + 16.30 1.03 1.03 1.03 15.85 Circulate window (25 kids) + 13.45 1.00 1.00 1.00 14.90 Circulate window (50 kids) + 12.91 1.00 1.00 1.00 13.06 Circulate window (75 kids) + 11.30 0.98 1.00 1.00 11.03 Circulate window (100 kids) + 7.58 1.01 1.01 0.99 7.47 Circulate window (200 kids) + 1.01 1.01 0.98 1.00 0.95 Circulate Unmapped window (4 kids) + 1.07 1.07 1.01 1.07 1.02 Circulate Unmapped window (16 kids) + 1.04 1.09 1.06 1.05 0.97 Circulate Unmapped window (25 kids) + 1.04 1.23 1.20 1.18 1.05 Circulate Unmapped window (50 kids) + 1.18 1.53 1.19 1.45 1.24 Circulate Unmapped window (75 kids) + 1.08 1.02 1.01 1.74 1.01 Circulate Unmapped window (100 kids) + 1.01 1.12 0.98 0.91 0.97 Circulate Unmapped window (200 kids) + + + -Profiling with OProfile + +Profiling with OProfile -

OProfile (available from http://oprofile.sourceforge.net/) is a +OProfile (available from http://oprofile.sourceforge.net/) is a system-wide profiler for Linux systems that uses processor-level counters to collect sampling data. OProfile can provide information -that is similar to that provided by gprof, but without the necessity of recompiling the program with special instrumentation (i.e., OProfile can collect statistical profiling information about optimized programs). A test harness was developed to collect OProfile data for -each x11perf test individually. + -

Test runs were performed using the RETIRED_INSNS counter on the AMD +Test runs were performed using the RETIRED_INSNS counter on the AMD Athlon and the CPU_CLK_HALTED counter on the Intel Pentium III (with a test configuration different from the one described above). We have -examined OProfile output and have compared it with gprof output. This investigation has not produced results that yield performance -increases in x11perf numbers. + + + - -X Test Suite + +X Test Suite -

The X Test Suite was run on the fully optimized DMX server using the +The X Test Suite was run on the fully optimized DMX server using the configuration described above. The following failures were noted: - + XListPixmapFormats: Test 1 [1] XChangeWindowAttributes: Test 32 [1] XCreateWindow: Test 30 [1] @@ -2218,23 +2730,34 @@ XChangeKeyboardControl: Test 9, 10 [1] behavior of the Xinerama implementation. [3] Newly noted error that has been verified as a Xinerama implementation bug. - - + + + + + + + -Phase III + +Phase III -

During the third phase of development, support was provided for the +During the third phase of development, support was provided for the following extensions: SHAPE, RENDER, XKEYBOARD, XInput. + -SHAPE + +SHAPE -

The SHAPE extension is supported. Test applications (e.g., xeyes and +The SHAPE extension is supported. Test applications (e.g., xeyes and oclock) and window managers that make use of the SHAPE extension will work as expected. + + -RENDER + +RENDER -

The RENDER extension is supported. The version included in the DMX +The RENDER extension is supported. The version included in the DMX CVS tree is version 0.2, and this version is fully supported by Xdmx. Applications using only version 0.2 functions will work correctly; however, some apps that make use of functions from later versions do not @@ -2243,10 +2766,13 @@ will fail with a Bad Implementation error when using post-version 0.2 functions. This is expected behavior. When the DMX CVS tree is updated to include newer versions of RENDER, support for these newer functions will be added to the DMX X server. + + -XKEYBOARD + +XKEYBOARD -

The XKEYBOARD extension is supported. If present on the back-end X +The XKEYBOARD extension is supported. If present on the back-end X servers, the XKEYBOARD extension will be used to obtain information about the type of the keyboard for initialization. Otherwise, the keyboard will be initialized using defaults. Note that this departs @@ -2254,39 +2780,52 @@ from older behavior: when Xdmx is compiled without XKEYBOARD support, the map from the back-end X server will be preserved. With XKEYBOARD support, the map is not preserved because better information and control of the keyboard is available. + + -XInput + +XInput -

The XInput extension is supported. Any device can be used as a core +The XInput extension is supported. Any device can be used as a core device and be used as an XInput extension device, with the exception of core devices on the back-end servers. This limitation is present because cursor handling on the back-end requires that the back-end cursor sometimes track the Xdmx core cursor -- behavior that is incompatible with using the back-end pointer as a non-core device. + -

Currently, back-end extension devices are not available as Xdmx +Currently, back-end extension devices are not available as Xdmx extension devices, but this limitation should be removed in the future. + -

To demonstrate the XInput extension, and to provide more examples for +To demonstrate the XInput extension, and to provide more examples for low-level input device driver writers, USB device drivers have been written for mice (usb-mou), keyboards (usb-kbd), and non-mouse/non-keyboard USB devices (usb-oth). Please see the man page for information on Linux kernel drivers that are required for using these Xdmx drivers. + + -DPMS + +DPMS -

The DPMS extension is exported but does not do anything at this time. +The DPMS extension is exported but does not do anything at this time. + -Other Extensions + -

The LBX, + +Other Extensions + +The LBX, SECURITY, XC-APPGROUP, and XFree86-Bigfont extensions do not require any special Xdmx support and have been exported. + -

The +The BIG-REQUESTS, DEC-XTRAP, DOUBLE-BUFFER, @@ -2308,74 +2847,99 @@ extensions do not require any special Xdmx support and have been exported. XFree86-Misc, XFree86-VidModeExtension, and XVideo -extensions are See below for additional work -on extensions after Phase III. +extensions are not supported at this time, but will be evaluated +for inclusion in future DMX releases. See below for additional work +on extensions after Phase III. + + + -Phase IV + +Phase IV -Moving to XFree86 4.3.0 + +Moving to XFree86 4.3.0 -

For Phase IV, the recent release of XFree86 4.3.0 (27 February 2003) +For Phase IV, the recent release of XFree86 4.3.0 (27 February 2003) was merged onto the dmx.sourceforge.net CVS trunk and all work is proceeding using this tree. + + -Extensions + +Extensions -XC-MISC (supported) + +XC-MISC (supported) -

XC-MISC is used internally by the X library to recycle XIDs from the +XC-MISC is used internally by the X library to recycle XIDs from the X server. This is important for long-running X server sessions. Xdmx supports this extension. The X Test Suite passed and failed the exact same tests before and after this extension was enabled. + + -Extended-Visual-Information (supported) + +Extended-Visual-Information (supported) -

The Extended-Visual-Information extension provides a method for an X +The Extended-Visual-Information extension provides a method for an X client to obtain detailed visual information. Xdmx supports this -extension. It was tested using the hw/dmx/examples/evi example -program. hw/dmx/examples/evi example +program. Note that this extension is not Xinerama-aware -- it will return visual information for each screen even though Xinerama is causing the X server to export a single logical screen. + + -RES (supported) + +RES (supported) -

The X-Resource extension provides a mechanism for a client to obtain +The X-Resource extension provides a mechanism for a client to obtain detailed information about the resources used by other clients. This -extension was tested with the hw/dmx/examples/res program. The +extension was tested with the hw/dmx/examples/res program. The X Test Suite passed and failed the exact same tests before and after this extension was enabled. + + -BIG-REQUESTS (supported) + +BIG-REQUESTS (supported) -

This extension enables the X11 protocol to handle requests longer +This extension enables the X11 protocol to handle requests longer than 262140 bytes. The X Test Suite passed and failed the exact same tests before and after this extension was enabled. + + -XSYNC (supported) + +XSYNC (supported) -

This extension provides facilities for two different X clients to +This extension provides facilities for two different X clients to synchronize their requests. This extension was minimally tested with -xdpyinfo and the X Test Suite passed and failed the exact same tests before and after this extension was enabled. + + -XTEST, RECORD, DEC-XTRAP (supported) and XTestExtension1 (not supported) + +XTEST, RECORD, DEC-XTRAP (supported) and XTestExtension1 (not supported) -

The XTEST and RECORD extension were developed by the X Consortium for +The XTEST and RECORD extension were developed by the X Consortium for use in the X Test Suite and are supported as a standard in the X11R6 tree. They are also supported in Xdmx. When X Test Suite tests that make use of the XTEST extension are run, Xdmx passes and fails exactly the same tests as does a standard XFree86 X server. When the -rcrdtest test (a part of the X Test Suite that verifies the RECORD extension) is run, Xdmx passes and fails exactly the same tests as does a standard XFree86 X server. + -

There are two older XTEST-like extensions: DEC-XTRAP and +There are two older XTEST-like extensions: DEC-XTRAP and XTestExtension1. The XTestExtension1 extension was developed for use by the X Testing Consortium for use with a test suite that eventually became (part of?) the X Test Suite. Unlike XTEST, which only allows @@ -2383,63 +2947,90 @@ events to be sent to the server, the XTestExtension1 extension also allowed events to be recorded (similar to the RECORD extension). The second is the DEC-XTRAP extension that was developed by the Digital Equipment Corporation. + -

The DEC-XTRAP extension is available from Xdmx and has been tested -with the The DEC-XTRAP extension is available from Xdmx and has been tested +with the xtrap* tools which are distributed as standard X11R6 clients. + -

The XTestExtension1 is The XTestExtension1 is not supported because it does not appear to be used by any modern X clients (the few that support it also support XTEST) and because there are no good methods available for testing that it functions correctly (unlike XTEST and DEC-XTRAP, the code for XTestExtension1 is not part of the standard X server source tree, so additional testing is important). + -

Most of these extensions are documented in the X11R6 source tree. +Most of these extensions are documented in the X11R6 source tree. Further, several original papers exist that this author was unable to locate -- for completeness and historical interest, citations are provide: - - + +XRECORD + +Martha Zimet. Extending X For Recording. 8th Annual X Technical Conference Boston, MA January 24-26, 1994. - + +DEC-XTRAP + +Dick Annicchiarico, Robert Chesler, Alan Jamison. XTrap Architecture. Digital Equipment Corporation, July 1991. - + +XTestExtension1 + +Larry Woestman. X11 Input Synthesis Extension Proposal. Hewlett Packard, November 1991. - + + + + -MIT-MISC (not supported) + +MIT-MISC (not supported) -

The MIT-MISC extension is used to control a bug-compatibility flag +The MIT-MISC extension is used to control a bug-compatibility flag that provides compatibility with xterm programs from X11R1 and X11R2. There does not appear to be a single client available that makes use of this extension and there is not way to verify that it works correctly. -The Xdmx server does not support MIT-MISC. + + -SCREENSAVER (not supported) + +SCREENSAVER (not supported) -

This extension provides special support for the X screen saver. It +This extension provides special support for the X screen saver. It was tested with beforelight, which appears to be the only client that -works with it. When Xinerama was not active, beforelight behaved +as expected. However, when Xinerama was active, beforelight did not behave as expected. Further, when this extension is not active, -xscreensaver (a widely-used X screen saver program) did not behave as expected. Since this extension is not Xinerama-aware and is not commonly used with expected results by clients, we have left this extension disabled at this time. + + -GLX (supported) + +GLX (supported) -

The GLX extension provides OpenGL and GLX windowing support. In +The GLX extension provides OpenGL and GLX windowing support. In Xdmx, the extension is called glxProxy, and it is Xinerama aware. It works by either feeding requests forward through Xdmx to each of the back-end servers or handling them locally. All rendering requests are handled on the back-end X servers. This code was donated to the DMX project by SGI. For the X Test Suite results comparison, see below. + + -RENDER (supported) + +RENDER (supported) -

The X Rendering Extension (RENDER) provides support for digital image +The X Rendering Extension (RENDER) provides support for digital image composition. Geometric and text rendering are supported. RENDER is partially Xinerama-aware, with text and the most basic compositing operator; however, its higher level primitives (triangles, triangle @@ -2447,18 +3038,22 @@ strips, and triangle fans) are not yet Xinerama-aware. The RENDER extension is still under development, and is currently at version 0.8. Additional support will be required in DMX as more primitives and/or requests are added to the extension. + -

There is currently no test suite for the X Rendering Extension; +There is currently no test suite for the X Rendering Extension; however, there has been discussion of developing a test suite as the extension matures. When that test suite becomes available, additional testing can be performed with Xdmx. The X Test Suite passed and failed the exact same tests before and after this extension was enabled. + + -Summary + +Summary -

To summarize, the following extensions are currently supported: +To summarize, the following extensions are currently supported: BIG-REQUESTS, DEC-XTRAP, DMX, @@ -2479,8 +3074,9 @@ support" section --> XInputExtension, XKEYBOARD, and XTEST. + -

The following extensions are The following extensions are not supported at this time: DOUBLE-BUFFER, FontCache, MIT-SCREEN-SAVER, @@ -2492,28 +3088,36 @@ support" section --> XFree86-VidModeExtension, XTestExtensionExt1, and XVideo. + + + -Additional Testing with the X Test Suite + +Additional Testing with the X Test Suite -XFree86 without XTEST + +XFree86 without XTEST -

After the release of XFree86 4.3.0, we retested the XFree86 X server +After the release of XFree86 4.3.0, we retested the XFree86 X server with and without using the XTEST extension. When the XTEST extension -was not used for testing, the XFree86 4.3.0 server running on our usual test system with a Radeon VE card reported unexpected failures in the following tests: - + XListPixmapFormats: Test 1 XChangeKeyboardControl: Tests 9, 10 XGetDefault: Test 5 XRebindKeysym: Test 1 - + + + -XFree86 with XTEST + +XFree86 with XTEST -

When using the XTEST extension, the XFree86 4.3.0 server reported the +When using the XTEST extension, the XFree86 4.3.0 server reported the following errors: - + XListPixmapFormats: Test 1 XChangeKeyboardControl: Tests 9, 10 XGetDefault: Test 5 @@ -2524,19 +3128,23 @@ XGrabButton: Tests 5, 9-12, 14, 16, 19, 21-25 XGrabKey: Test 8 XSetPointerMapping: Test 3 XUngrabButton: Test 4 - + + -

While these errors may be important, they will probably be fixed +While these errors may be important, they will probably be fixed eventually in the XFree86 source tree. We are particularly interested in demonstrating that the Xdmx server does not introduce additional failures that are not known Xinerama failures. + + -Xdmx with XTEST, without Xinerama, without GLX + +Xdmx with XTEST, without Xinerama, without GLX -

Without Xinerama, but using the XTEST extension, the following errors +Without Xinerama, but using the XTEST extension, the following errors were reported from Xdmx (note that these are the same as for the XFree86 4.3.0, except that XGetDefault no longer fails): - + XListPixmapFormats: Test 1 XChangeKeyboardControl: Tests 9, 10 XRebindKeysym: Test 1 @@ -2546,13 +3154,16 @@ XGrabButton: Tests 5, 9-12, 14, 16, 19, 21-25 XGrabKey: Test 8 XSetPointerMapping: Test 3 XUngrabButton: Test 4 - + + + -Xdmx with XTEST, with Xinerama, without GLX + +Xdmx with XTEST, with Xinerama, without GLX -

With Xinerama, using the XTEST extension, the following errors +With Xinerama, using the XTEST extension, the following errors were reported from Xdmx: - + XListPixmapFormats: Test 1 XChangeKeyboardControl: Tests 9, 10 XRebindKeysym: Test 1 @@ -2567,20 +3178,23 @@ XCopyPlane: Tests 13, 22, 31 (well-known XTEST/Xinerama interaction issue) XDrawLine: Test 67 XDrawLines: Test 91 XDrawSegments: Test 68 - + Note that the first two sets of errors are the same as for the XFree86 4.3.0 server, and that the XCopyPlane error is a well-known error resulting from an XTEST/Xinerama interaction when the request crosses a screen boundary. The XDraw* errors are resolved when the tests are run individually and they do not cross a screen boundary. We will investigate these errors further to determine their cause. + + -Xdmx with XTEST, with Xinerama, with GLX + +Xdmx with XTEST, with Xinerama, with GLX -

With GLX enabled, using the XTEST extension, the following errors +With GLX enabled, using the XTEST extension, the following errors were reported from Xdmx (these results are from early during the Phase IV development, but were confirmed with a late Phase IV snapshot): - + XListPixmapFormats: Test 1 XChangeKeyboardControl: Tests 9, 10 XRebindKeysym: Test 1 @@ -2597,7 +3211,7 @@ XCopyPlane: Tests 6, 7, 10, 19, 22, 31 XDrawArcs: Tests 89, 100, 102 XDrawLine: Test 67 XDrawSegments: Test 68 - + Note that the first two sets of errors are the same as for the XFree86 4.3.0 server, and that the third set has different failures than when Xdmx does not include GLX support. Since the GLX extension adds new @@ -2607,26 +3221,34 @@ presumably more of them crossed a screen boundary. This conclusion is supported by the fact that nearly all of the rendering errors reported are resolved when the tests are run individually and they do no cross a screen boundary. + -

Further, when hardware rendering is disabled on the back-end displays, +Further, when hardware rendering is disabled on the back-end displays, many of the errors in the third set are eliminated, leaving only: - + XClearArea: Test 8 XCopyArea: Test 4, 5, 11, 14, 17, 23, 25, 27, 30 XCopyPlane: Test 6, 7, 10, 19, 22, 31 - + + + -Conclusion + +Conclusion -

We conclude that all of the X Test Suite errors reported for Xdmx are +We conclude that all of the X Test Suite errors reported for Xdmx are the result of errors in the back-end X server or the Xinerama implementation. Further, all of these errors that can be reasonably fixed at the Xdmx layer have been. (Where appropriate, we have submitted patches to the XFree86 and Xinerama upstream maintainers.) + + + -Dynamic Reconfiguration + +Dynamic Reconfiguration -

During this development phase, dynamic reconfiguration support was +During this development phase, dynamic reconfiguration support was added to DMX. This support allows an application to change the position and offset of a back-end server's screen. For example, if the application would like to shift a screen slightly to the left, it could @@ -2635,32 +3257,39 @@ reconfigure that screen to be at position <x+10,y>. When a screen is dynamically reconfigured, input handling and a screen's root window dimensions are adjusted as needed. These adjustments are transparent to the user. + -Dynamic reconfiguration extension + +Dynamic reconfiguration extension -

The application interface to DMX's dynamic reconfiguration is through +The application interface to DMX's dynamic reconfiguration is through a function in the DMX extension library: - + Bool DMXReconfigureScreen(Display *dpy, int screen, int x, int y) - -where +where dpy is DMX server's display, screen is the number of the +screen to be reconfigured, and x and y are the new upper, left-hand coordinates of the screen to be reconfigured. + -

The coordinates are not limited other than as required by the X +The coordinates are not limited other than as required by the X protocol, which limits all coordinates to a signed 16 bit number. In addition, all coordinates within a screen must also be legal values. Therefore, setting a screen's upper, left-hand coordinates such that the right or bottom edges of the screen is greater than 32,767 is illegal. + + -Bounding box + +Bounding box -

When the Xdmx server is started, a bounding box is calculated from +When the Xdmx server is started, a bounding box is calculated from the screens' layout given either on the command line or in the configuration file. This bounding box is currently fixed for the lifetime of the Xdmx server. + -

While it is possible to move a screen outside of the bounding box, it +While it is possible to move a screen outside of the bounding box, it is currently not possible to change the dimensions of the bounding box. For example, it is possible to specify coordinates of <-100,-100> for the upper, left-hand corner of the bounding box, which was @@ -2669,66 +3298,84 @@ down and to the right; however, since the bounding box is fixed, the left side and upper portions of the screen exposed by the reconfiguration are no longer accessible on that screen. Those inaccessible regions are filled with black. + -

This fixed bounding box limitation will be addressed in a future +This fixed bounding box limitation will be addressed in a future development phase. + + -Sample applications + +Sample applications -

An example of where this extension is useful is in setting up a video +An example of where this extension is useful is in setting up a video wall. It is not always possible to get everything perfectly aligned, and sometimes the positions are changed (e.g., someone might bump into a projector). Instead of physically moving projectors or monitors, it is now possible to adjust the positions of the back-end server's screens using the dynamic reconfiguration support in DMX. + -

Other applications, such as automatic setup and calibration tools, +Other applications, such as automatic setup and calibration tools, can make use of dynamic reconfiguration to correct for projector alignment problems, as long as the projectors are still arranged rectilinearly. Horizontal and vertical keystone correction could be applied to projectors to correct for non-rectilinear alignment problems; however, this must be done external to Xdmx. + -

A sample test program is included in the DMX server's examples +A sample test program is included in the DMX server's examples directory to demonstrate the interface and how an application might use -dynamic reconfiguration. See dmxreconfig.c for details. + + -Additional notes + +Additional notes -

In the original development plan, Phase IV was primarily devoted to +In the original development plan, Phase IV was primarily devoted to adding OpenGL support to DMX; however, SGI became interested in the DMX project and developed code to support OpenGL/GLX. This code was later donated to the DMX project and integrated into the DMX code base, which freed the DMX developers to concentrate on dynamic reconfiguration (as described above). + + + -Doxygen documentation + +Doxygen documentation -

Doxygen is an open-source (GPL) documentation system for generating +Doxygen is an open-source (GPL) documentation system for generating browseable documentation from stylized comments in the source code. We have placed all of the Xdmx server and DMX protocol source code files under Doxygen so that comprehensive documentation for the Xdmx source code is available in an easily browseable format. + + -Valgrind + +Valgrind -

Valgrind, an open-source (GPL) memory debugger for Linux, was used to +Valgrind, an open-source (GPL) memory debugger for Linux, was used to search for memory management errors. Several memory leaks were detected and repaired. The following errors were not addressed: - - + + When the X11 transport layer sends a reply to the client, only those fields that are required by the protocol are filled in -- unused fields are left as uninitialized memory and are therefore noted by valgrind. These instances are not errors and were not repaired. - + + At each server generation, glxInitVisuals allocates memory that is never freed. The amount of memory lost each generation approximately equal to 128 bytes for each back-end visual. Because the code involved is automatically generated, this bug has not been fixed and will be referred to SGI. - + + At each server generation, dmxRealizeFont calls XLoadQueryFont, which allocates a font structure that is not freed. dmxUnrealizeFont can free the font structure for the first @@ -2738,11 +3385,15 @@ and repaired. The following errors were not addressed: to 80 bytes per font per back-end. When this bug is fixed in the the X server's device-independent (dix) code, DMX will be able to properly free the memory allocated by XLoadQueryFont. - + + + + -RATS + +RATS -

RATS (Rough Auditing Tool for Security) is an open-source (GPL) +RATS (Rough Auditing Tool for Security) is an open-source (GPL) security analysis tool that scans source code for common security-related programming errors (e.g., buffer overflows and TOCTOU races). RATS was used to audit all of the code in the hw/dmx directory @@ -2750,29 +3401,42 @@ and all "High" notations were checked manually. The code was either re-written to eliminate the warning, or a comment containing "RATS" was inserted on the line to indicate that a human had checked the code. Unrepaired warnings are as follows: - - + + Fixed-size buffers are used in many areas, but code has been added to protect against buffer overflows (e.g., XmuSnprint). The only instances that have not yet been fixed are in config/xdmxconfig.c (which is not part of the Xdmx server) and input/usb-common.c. - + + vprintf and vfprintf are used in the logging routines. In general, all uses of these functions (e.g., dmxLog) provide a constant format string from a trusted source, so the use is relatively benign. - + + glxProxy/glxscreens.c uses getenv and strcat. The use of these functions is safe and will remain safe as long as ExtensionsString is longer then GLXServerExtensions (ensuring this may not be ovious to the casual programmer, but this is in automatically generated code, so we hope that the generator enforces this constraint). - + + + + + + + + + + + +

- + diff --git a/xserver/hw/dmx/doc/scaled.sgml b/xserver/hw/dmx/doc/scaled.xml similarity index 73% rename from xserver/hw/dmx/doc/scaled.sgml rename to xserver/hw/dmx/doc/scaled.xml index 6b8ee413f..48c83e076 100644 --- a/xserver/hw/dmx/doc/scaled.sgml +++ b/xserver/hw/dmx/doc/scaled.xml @@ -1,27 +1,34 @@ - + +
+ Scaled Window Support in DMX - Rickard E. Faith and Kevin E. Martin - 15 October 2003 (created 19 September 2003) + + Kevin E.Martin + Rickard E.Faith + + 15 October 2003 (created 19 September 2003) + This document investigates the possibility of adding scaled window support to the DMX X server, thereby allowing a window or some selected part of the logical DMX area to be displayed using a scaling factor. For example, this might allow the contents of a window to be magnified for easier viewing. In particular, scaling - for the VNC client is explored. Copyright 2003 - by Red Hat, Inc., Raleigh, North Carolina + for the VNC client is explored. Copyright 2003 + by Red Hat, Inc., Raleigh, North Carolina + + - - - - Introduction - DMX -

+ Introduction + DMX + The DMX X server (Xdmx) is a proxy server that is designed to allow X servers on multiple machines to be combined into a single multi-headed X server. Combined with Xinerama, @@ -29,86 +36,86 @@ screen. Typical applications include the creation of a video wall with 16 1280x1024 displays arranged in a rectangle, for a total resolution of of 5120x4096. -

-
- Problem Statement -

+ + + Problem Statement + Applications displayed on a physically large video wall that provides high pixel-resolution may be difficult to see, especially if the application is designed for use on a typical desktop computer with a relatively small display located close to the human operator. The goal of this paper is to describe and discuss solutions to this problem. -

-

+ + The original driving problem for this work is to provide - scaling for the vncviewer application when + scaling for the vncviewer application when displayed using DMX (VNC scaling is currently available only with the Windows client, and there is no plan to extend that capability to other clients). While this specific problem will be addressed in this paper, the general solution space will also be explored, since this may lead to a good - solution not only for vncviewer but also for + solution not only for vncviewer but also for other applications. -

-
- Task -

+ + + Task + For reference, here is the original description of the task this paper addresses: - - Scaled window support (for VNC) - - + + Scaled window support (for VNC) + + Investigate possibility of implementing a "scaled window" extension: - - + + Add XCreateScaledWindow call that could be used in place of XCreateWindow - - + + All primitives drawn to scaled window would be scaled by appropriate (integral?) scaling factor - - - - + + + + Alternate approach: special case VNC support - - - - -

-
-
- - Previous Work -

+ + + + + + + + + Previous Work + This section reviews relevant previous work. -

- VNC - Scaling under VNC -

- When using the vncviewer program for Windows, it + + VNC + Scaling under VNC + + When using the vncviewer program for Windows, it is possible to specify a scaling factor (as numerator and denominator). When scaling is in effect, the viewer software uses StretchBlt (instead of BitBlt) to display the pixels for the user. When this call is made, the viewer already has received all of the pixel information (at full unscaled resolution). -

-

+ + The scaling in VNC is primitive. It does not conserve bandwidth, it does not treat textual information differently (i.e., by using a suitably scaled font), and it does not provide any anti-aliasing other than that provided by the underlying (Windows-only) system library. -

-
-
- The X Video Extension -

+ + + + The X Video Extension + The X Video Extension is a widely-available extension to the X11 protocol that provides support for streaming video. Integral to this support is the ability to arbitrarily scale @@ -120,58 +127,58 @@ implemented in XFree86 only support data in various YUV formats. However, several modern video adaptors support RGB as well. -

-

+ + Note, though, that the target output for this scaling is an overlay plane -- so X Video provides functionality that is fundamentally different from that provided by the Windows StrechBlt call. -

-
-
- - Possible Solutions -

+ + + + + Possible Solutions + This section briefly discusses possible solutions, including major advantages and disadvantages from both the implementation and the end-user programmer standpoint. -

- VNC-like Scaling - Software Scaling -

- The vncviewer application could be modified to + + VNC-like Scaling + Software Scaling + + The vncviewer application could be modified to provide software scaling. This is not a general solution, but it does solve one of the goals of this work. -

-

+ + A prototype of this solution was implemented and a patch - against vnc-3.3.7-unixsrc is available in the - dmx/external directory. Because of limited time + against vnc-3.3.7-unixsrc is available in the + dmx/external directory. Because of limited time available for this work, all of the edge cases were not considered and the solution works well mainly for integer scaling. -

-

- Currently, vncviewer writes to the X display + + + Currently, vncviewer writes to the X display with XPutImage, XCopyArea, and XFillRectangle. All instances of these calls have to be aware of scaling and must round correctly. In the prototype solution, rounding is incorrect and can cause artifacts. -

-

+ + A better solution would be to cache all updates to the - desktop image in vncviewer and only send the + desktop image in vncviewer and only send the damaged area to the X display with XPutImage. This would allow the damaged area to be computed so that rounding errors do not create artifacts. This method is probably similar to what is used in the Window client. (The whole VNC suite is being re-written in C++ and the forthcoming version 4 has not been evaluated.) -

-
- Scaling with the X Video Extension -

- The scaling in the Windows vncviewer application + + + Scaling with the X Video Extension + + The scaling in the Windows vncviewer application makes use of a scaled blit that is supplied by the underlying system library. Several video cards currently provide support for a scaled blit, and some X servers @@ -181,38 +188,38 @@ image being drawn to an overlay plane. Most video cards also provide support for a scaled blit into the normal output planes, but this is not exposed via XvPutImage. -

-

- The vncviewer program could be modified to use + + + The vncviewer program could be modified to use the X Video Extension to provide scaling under X11 that is similar to the scaling currently provided under Windows. Unfortunately, Xdmx does not currently export the X Video Extension, so this would not provide an immediate solution usable with DMX. -

-

+ + A very early-stage proof-of-concept prototype was implemented and a preliminary patch against - vnc-3.3.7-unixsrc is available in the - dmx/external directory. This prototype was + vnc-3.3.7-unixsrc is available in the + dmx/external directory. This prototype was implemented to better understand the problems that must be solved to make this solution viable: - - + + As noted under the software scaling section above, - vncviewer writes to the X display with + vncviewer writes to the X display with several different calls. These calls write to the normal output planes and are compatible with XvPutImage, which writes to an overlay plane. To eliminate artifacts caused by this problem, - vncviewer should be modified so that a cached + vncviewer should be modified so that a cached copy of the desktop is available, either as a client-side image or a server-side off-screen pixmap, so that XvPutImage would be the only method for writing to the X display. - - -

+ + + Although several modern graphics adaptors support hardware scaling using an RGB format (e.g., ATI Radeon, nVidia, etc.), XFree86 drivers typically @@ -226,7 +233,8 @@ wire, additional artifacts are introduced (because there may not be enough information from the wire to update a pair of pixels). -

+ + Further, the well-known problem with YUV encoding is even more evident when the image is a desktop instead of a movie. For example, consider a @@ -237,26 +245,28 @@ depending on the algorithm used for RGB to YUV conversion and on how the border pixel is ordered in the pair of pixels used by the algorithm. -

+ + Many of these artifacts could be eliminated if - vncviewer cached a complete RGB image of + vncviewer cached a complete RGB image of the desktop, and only did the conversion to YUV for properly aligned areas of damage. The remaining artifacts could be eliminated if an RGB format was used with X Video (which may require the extension of existing XFree86 drivers to support RGB). - - + + + Most modern video cards support exactly one overlay plane that is suitable for use with X Video. Therefore, only one application can use X Video at any given time. This is a severe limitation in a desktop environment. - - -

- Implementing the X Video Extension for DMX -

+ + + + Implementing the X Video Extension for DMX + The user-level API for X Video is fairly simple, but the underlying support required for the full specification is large. However, since the API provides a method to @@ -264,56 +274,56 @@ Video can be implemented that would support XvPutImage and little else. This would require support for the following: - - + + X Video Extension API calls, including the following: - - XvQueryExtension - XvQueryAdaptors - XvQueryPortAttributes - XvFreeAdaptorInfo - XvListImageFormats - XvGrabPort - XvCreateImage - XvPutImage - XvShmCreateImage - XvShmPutImage - - - + + XvQueryExtension + XvQueryAdaptors + XvQueryPortAttributes + XvFreeAdaptorInfo + XvListImageFormats + XvGrabPort + XvCreateImage + XvPutImage + XvShmCreateImage + XvShmPutImage + + + Support for querying back-end X Video Extension capabilities. - - + + Support for sending the image to the back-ends. Because X Video requires sending full images, there may be a trade-off between bandwidth limitations and additional complexity to divide the image up such that is scales properly. - - + + Possible support for a software fall-back. For example, if all of the back-ends do not support the X Video Extension, software scaling can be implemented such that the image is sent to the back-end with XPutImage. This pathway would have poor performance. - - -

-
- Supporting RGB formats for the X Video Extension -

+ + + + + Supporting RGB formats for the X Video Extension + Assuming an XFree86 driver already supports the X Video Extension, and assuming the target hardware supports an RGB format, then adding support for that format is relatively simple and straightforward. -

-
-
- Scaling with an XPutImageScaled Extension -

+ + + + Scaling with an XPutImageScaled Extension + Instead of (or in addition to) implementing the X Video Extension in DMX, one obvious solution would be to implement a new extension that provides access to @@ -321,59 +331,59 @@ call available under Windows. This call would scale RGB images and would not use the overlay plane (unlike the X Video Extension). -

-

+ + This approach has many of the same advantages and disadvantages as the XCopyAreaScaled Extension, discussed in the next section. Discussion of XPutImageScaled is deferred in favor of XCopyAreaScaled for the following reasons: - - + + XPutImageScaled can be emulated with XCopyAreaScaled by first using XPutImage to copy the image to an off-screen pixmap, and then calling XCopyAreaScaled between that off-screen pixmap and the target drawable. - - + + Since XCopyAreaScaled would copy between two areas of on-screen or off-screen memory, it has additional uses and can be viewed as efficiently providing a superset of XPutImageScaled functionality. - - -

-
- Scaling with an XCopyAreaScaled Extension -

+ + + + + Scaling with an XCopyAreaScaled Extension + As noted in the previous section, because XCopyAreaScaled provides a superset of the functionality provided by XPutImageScaled, we will consider this extension instead. -

-

+ + First, XCopyAreaScaled would provide for RGB scaling between pixmaps (i.e., on-screen or off-screen areas of memory that reside on the video card). Unlike the X Video Extension, which writes into an overlay plane, XCopyAreaScaled would write into the non-overlay areas of the screen. Key points to consider are as follows: - - + + Because different planes are involved, the two scaling operations are usually implemented in hardware differently, so an XCopyAreaScaled extension could be added in a manner that would neither conflict with nor interact with the X Video extension in any way. - - + + The XCopyAreaScaled extension provides new functionality that the X Video Extension does not provide. Based on anecdotal feedback, we believe that many people outside the DMX and VNC communities would be excited about this extension. - - + + The main drawback to this extension is that it is new and needs to be implemented at the driver level in XFree86 for each video card to be supported. At the @@ -384,8 +394,8 @@ XCopyAreaScaled extension to be implemented along with the X Video extension, especially if it becomes popular. - - + + Another drawback is that not all modern cards provide support for a simple scaled blit operation. However, these cards usually do provide a 3D pipeline which @@ -394,12 +404,12 @@ that is using the XCopyAreaScaled extension. However, this implementation pathway would make this extension somewhat more difficult to implement on certain cards. - - -

-
- Scaling with OpenGL -

+ + + + + Scaling with OpenGL + Another general solution to the scaling problem is to use the texture scaling found in all 3D hardware. This ability is already exposed through OpenGL and can be @@ -411,8 +421,8 @@ around the single overlay problem with the X Video Extension as well as the need to implement additional scaled primitive extensions. -

-

+ + The downside is that most OpenGL implementations require power of 2 texture sizes and this can be very wasteful of memory if, for example, the application needs to scale a @@ -422,18 +432,18 @@ implementations have a limited about of texture memory and cannot handle textures that are very large. For example, they might limit the texture size to 1024x1024. -

-
-
- Application-transparent Scaling for DMX - Back-end Scaling Without Disconnect/Reconnect -

+ + + + Application-transparent Scaling for DMX + Back-end Scaling Without Disconnect/Reconnect + VNC does scaling on the client side (in the - vncviewer application). Implementing a similar + vncviewer application). Implementing a similar solution for DMX would require support in the back-end X servers and, therefore, is not a general solution. -

-

+ + XFree86 already implements some support for "scaling" that could be used with DMX: if, in the XF86Config file, multiple Modes are listed in the Display Subsection of the @@ -443,15 +453,15 @@ dimensions in the Modes line, but the logical dimensions of the X server (i.e., the dimensions that Xdmx knows about) will not change. -

-

+ + Further, the dimensions of the XFree86 display are under software control (via the XFree86-VidModeExtension), so the Xdmx server could change the screen dimensions on a per-display basis, thereby scaling the information on part of that display. -

-

+ + However, this scaling appears to have limited use. For example, assume a 4 by 4 display wall consisting of 16 1280x1024 displays. If all of the back-end servers were @@ -461,31 +471,31 @@ display at a time could be usable, but could have limited utility, since the result would still be no larger than a single display. -

-
- Back-end Scaling With Disconnect/Reconnect -

+ + + Back-end Scaling With Disconnect/Reconnect + Disconnect and reconnect features are not currently supported in DMX, but are scheduled to be implemented in the future. These features, combined with the XFree86-VidModeExtension Extension, would allow an application to do the following: - - + + Disconnect a specific back-end server (via the DMX Extension), - - + + reconfigure the XFree86 back-end server resolution, - and - - + and + + reconnect the back-end server to DMX -- at a new origin with the new screen resolution. - - -

-

+ + + + For example, consider a display wall consisting of 16 1280x1024 displays with a total resolution of 5120x4096. All of the screens could be disconnected, repositioned, @@ -498,18 +508,18 @@ the increased resolution was completed, the back-end servers could be disconnected, reconfigured, and reconnected for the original 5120x4096 view. -

-

+ + Support for this type of scaling can be implemented in a DMX-aware X11 client assuming the DMX server support arbitrary disconnect and reconnect semantics. Because this application cannot be written before disconnect/reconnect is implemented, this solution will not be discussed further in this paper. -

-
- Server-side Scaling -

+ + + Server-side Scaling + In earlier versions of DMX, a frame buffer was maintained on the server side, and XPutImage was used to move the information from the server to the client (similar to some @@ -518,14 +528,14 @@ not a recommended solution because of overall performance issues and server-side memory issues (i.e., the frame buffer would be very large for large display walls). -

-

+ + Exploration of this path is not recommended. -

-
-
- XCreateScaledWindow API -

+ + + + XCreateScaledWindow API + The implementation of X Video Extension in DMX, and the use of XvPutImage by applications requiring scaling requires significant changes in DMX Further, XvPutImage is, @@ -533,8 +543,8 @@ applications which are already using (or can be modified to use) XPutImage. Therefore, a more general API will be discussed as another possibility. -

-

+ + X applications typically create windows with the XCreateWindow call. A new extension could provide an XCreateScaledWindow call that could be used in place of the @@ -544,33 +554,33 @@ scaling. In this section we describe how the call would work, what transparency it provides, and how to solve the potential problems that transparency creates. -

- XCreateWindow -

+ + XCreateWindow + The XCreateWindow call takes width and height as parameters. An XCreateScaledWindow call could take all the same parameters, with the addition of a scaling factor. -

-
- XSetWindowAttributes -

+ + + XSetWindowAttributes + An X11 window has several attributes that would have to be scaled: - - Background and border pixmaps - Border width - Cursor - -

-
- XGetWindowAttributes, XGetGeometry -

+ + Background and border pixmaps + Border width + Cursor + + + + XGetWindowAttributes, XGetGeometry + For transparency, calls that query the window attributes should return unscaled information. This suggests that all unscaled pixmaps and window attributes should be cached. -

-

+ + Unfortunately, a window manager requires the scaled geometry to properly decorate the window. The X server can probably determine which client is acting as the @@ -581,26 +591,26 @@ least two additional extension calls should be implemented: XGetScaledWindowAttributes and XGetScaledGeometry. -

-
- Popup and Child window positions -

+ + + Popup and Child window positions + Some applications may position popup and child windows based on an unscaled notion of the main window geometry. In this case, additional modifications to the client would be required. -

-
- Events -

+ + + Events + Most events (e.g., for mouse motion) return information about the coordinates at which the even occurred. These coordinates would have to be modified so that unscaled values were presented to the client. -

-
- Implementation -

+ + + Implementation + There are many implementation issues, some of which are similar to the issues involved in implementing the X Video Extension for DMX. The window contents must be scaled, @@ -610,25 +620,26 @@ various drawing operations to perform scaling. Because of the complexity involved, the frame buffer option is recommended. -

-
-
-
- - Conclusion and Recommendations -

+ + + + + + Conclusion and Recommendations + We recommend a three phase implementation strategy, based on how an application could be written to take advantage of scaling: - - -

+ + + The XCopyAreaScaled extension should be implemented, since this is the ideal solution for applications like VNC, and since making use of this extension will require minimal changes to applications that already use XPutImage or XCopyArea. -

+ + The initial implementation work would include the design of the X protocol extension, writing this up in the usual format for extension documentation, implementation @@ -636,7 +647,8 @@ implementation of a software fall-back in XFree86 and DMX, one example hardware implementation for XFree86, and implementation of support for this extension in DMX. -

+ + We suggest implementing the extension first on the ATI Radeon cards. However, since these cards do not provide a 2D scaled blit primitive, the implementation would @@ -645,62 +657,68 @@ graphics cards also do not provide a simple 2D scaled blit operation and an example of the more difficult implementation pathway would be helpful to others. - - -

+ + + + Until XCopyAreaScaled is widely supported, applications that require scaling will have to fall back to another scaling method. We suggest OpenGL as the first fall-back method because it is widely available and supported by DMX. -

+ + A project centered around OpenGL-based scaling would implement this scaling in VNC as an example. This work - would include re-writing the vncviewer + would include re-writing the vncviewer rendering engine to cache a master copy of the desktop image for all operations. - - -

+ + + + Since OpenGL is not implemented everywhere, and may not provide hardware-assisted performance in every implementation, an application that requires scaling should also fall back to using the X Video Extension. -

+ + This project would add support for the X Video Extension to DMX and would add support to VNC to take advantage of this extension without introducing artifacts. This - would require modifying the vncviewer rendering + would require modifying the vncviewer rendering engine to cache a master copy of the desktop image for all operations. This project should also add support for the RGB format to at least one XFree86 driver (e.g., ATI Radeon). -

+ + The X Video Extension is one of the few popular extensions that DMX does not support. We recommend implementing the X Video Extension even if scaling is the specific goal of that work. - - -

-

- We do not recommend implementation of the + + + + + + We do not recommend implementation of the XCreateScaledWindow extension because of the complexity - involved. We do not recommend implementation of the + involved. We do not recommend implementation of the XPutImageScaled extension because it requires the same amount of work as the XCopyAreaScaled extension, but provides less functionality. Further, server-side scaling with a large - frame buffer is not recommended because of the + frame buffer is not recommended because of the performance implications. -

-

+ + The back-end scaling, especially with disconnect/reconnect support should be explored in the future after disconnect/reconnect is implemented, but not at the present time. -

-
- + + +
diff --git a/xserver/hw/dmx/examples/Makefile.in b/xserver/hw/dmx/examples/Makefile.in index 47ed017ce..ede9f24f3 100644 --- a/xserver/hw/dmx/examples/Makefile.in +++ b/xserver/hw/dmx/examples/Makefile.in @@ -167,10 +167,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -258,6 +254,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -272,6 +270,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -289,10 +288,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -348,10 +351,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -369,17 +373,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -406,20 +404,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -511,6 +512,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/dmx/glxProxy/Makefile.in b/xserver/hw/dmx/glxProxy/Makefile.in index 643a9dadf..59e958784 100644 --- a/xserver/hw/dmx/glxProxy/Makefile.in +++ b/xserver/hw/dmx/glxProxy/Makefile.in @@ -115,10 +115,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -206,6 +202,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -220,6 +218,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -237,10 +236,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -296,10 +299,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -317,17 +321,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -354,20 +352,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -459,6 +460,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/dmx/glxProxy/compsize.c b/xserver/hw/dmx/glxProxy/compsize.c index cae8fea3c..9a40d65b0 100644 --- a/xserver/hw/dmx/glxProxy/compsize.c +++ b/xserver/hw/dmx/glxProxy/compsize.c @@ -145,7 +145,7 @@ GLint __glDrawPixels_size(GLenum format, GLenum type, GLsizei w, GLsizei h) default: return 0; } - return (elements * esize * w * h); + return elements * esize * w * h; } GLint __glBitmap_size(GLsizei w, GLsizei h) @@ -294,7 +294,7 @@ GLint __glTexImage1D_size(GLenum format, GLenum type, GLsizei w) default: return 0; } - return (elements * esize * w); + return elements * esize * w; } GLint __glTexImage2D_size(GLenum format, GLenum type, GLsizei w, GLsizei h) @@ -371,7 +371,7 @@ GLint __glTexImage2D_size(GLenum format, GLenum type, GLsizei w, GLsizei h) default: return 0; } - return (elements * esize * w * h); + return elements * esize * w * h; } GLint __glTexImage3D_size(GLenum format, GLenum type, GLsizei w, GLsizei h, @@ -450,7 +450,7 @@ GLint __glTexImage3D_size(GLenum format, GLenum type, GLsizei w, GLsizei h, default: return 0; } - return (elements * esize * w * h * d); + return elements * esize * w * h * d; } GLint __glLightfv_size(GLenum pname) diff --git a/xserver/hw/dmx/glxProxy/g_renderswap.c b/xserver/hw/dmx/glxProxy/g_renderswap.c index b92821d0a..e67569605 100644 --- a/xserver/hw/dmx/glxProxy/g_renderswap.c +++ b/xserver/hw/dmx/glxProxy/g_renderswap.c @@ -64,6 +64,7 @@ void __glXDispSwap_Color3bv(GLbyte *pc) void __glXDispSwap_Color3dv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; #ifdef __GLX_ALIGN64 @@ -79,6 +80,7 @@ void __glXDispSwap_Color3dv(GLbyte *pc) void __glXDispSwap_Color3fv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_FLOAT_ARRAY(pc + 0, 3); } @@ -86,6 +88,7 @@ void __glXDispSwap_Color3fv(GLbyte *pc) void __glXDispSwap_Color3iv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT_ARRAY(pc + 0, 3); @@ -94,6 +97,7 @@ void __glXDispSwap_Color3iv(GLbyte *pc) void __glXDispSwap_Color3sv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT_ARRAY(pc + 0, 3); @@ -101,12 +105,12 @@ void __glXDispSwap_Color3sv(GLbyte *pc) void __glXDispSwap_Color3ubv(GLbyte *pc) { - __GLX_DECLARE_SWAP_VARIABLES; } void __glXDispSwap_Color3uiv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT_ARRAY(pc + 0, 3); } @@ -114,18 +118,19 @@ void __glXDispSwap_Color3uiv(GLbyte *pc) void __glXDispSwap_Color3usv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT_ARRAY(pc + 0, 3); } void __glXDispSwap_Color4bv(GLbyte *pc) { - __GLX_DECLARE_SWAP_VARIABLES; } void __glXDispSwap_Color4dv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; #ifdef __GLX_ALIGN64 @@ -140,6 +145,7 @@ void __glXDispSwap_Color4dv(GLbyte *pc) void __glXDispSwap_Color4fv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_FLOAT_ARRAY(pc + 0, 4); @@ -148,6 +154,7 @@ void __glXDispSwap_Color4fv(GLbyte *pc) void __glXDispSwap_Color4iv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT_ARRAY(pc + 0, 4); @@ -156,6 +163,7 @@ void __glXDispSwap_Color4iv(GLbyte *pc) void __glXDispSwap_Color4sv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT_ARRAY(pc + 0, 4); @@ -163,13 +171,13 @@ void __glXDispSwap_Color4sv(GLbyte *pc) void __glXDispSwap_Color4ubv(GLbyte *pc) { - __GLX_DECLARE_SWAP_VARIABLES; } void __glXDispSwap_Color4uiv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT_ARRAY(pc + 0, 4); @@ -178,6 +186,7 @@ void __glXDispSwap_Color4uiv(GLbyte *pc) void __glXDispSwap_Color4usv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT_ARRAY(pc + 0, 4); @@ -185,21 +194,16 @@ void __glXDispSwap_Color4usv(GLbyte *pc) void __glXDispSwap_EdgeFlagv(GLbyte *pc) { - __GLX_DECLARE_SWAP_VARIABLES; - - } void __glXDispSwap_End(GLbyte *pc) { - __GLX_DECLARE_SWAP_VARIABLES; - - } void __glXDispSwap_Indexdv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; #ifdef __GLX_ALIGN64 @@ -215,6 +219,7 @@ void __glXDispSwap_Indexdv(GLbyte *pc) void __glXDispSwap_Indexfv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_FLOAT_ARRAY(pc + 0, 1); @@ -223,6 +228,7 @@ void __glXDispSwap_Indexfv(GLbyte *pc) void __glXDispSwap_Indexiv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT_ARRAY(pc + 0, 1); @@ -231,6 +237,7 @@ void __glXDispSwap_Indexiv(GLbyte *pc) void __glXDispSwap_Indexsv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT_ARRAY(pc + 0, 1); @@ -238,14 +245,12 @@ void __glXDispSwap_Indexsv(GLbyte *pc) void __glXDispSwap_Normal3bv(GLbyte *pc) { - __GLX_DECLARE_SWAP_VARIABLES; - - } void __glXDispSwap_Normal3dv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; #ifdef __GLX_ALIGN64 @@ -261,6 +266,7 @@ void __glXDispSwap_Normal3dv(GLbyte *pc) void __glXDispSwap_Normal3fv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_FLOAT_ARRAY(pc + 0, 3); @@ -269,6 +275,7 @@ void __glXDispSwap_Normal3fv(GLbyte *pc) void __glXDispSwap_Normal3iv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT_ARRAY(pc + 0, 3); @@ -277,6 +284,7 @@ void __glXDispSwap_Normal3iv(GLbyte *pc) void __glXDispSwap_Normal3sv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT_ARRAY(pc + 0, 3); @@ -285,6 +293,7 @@ void __glXDispSwap_Normal3sv(GLbyte *pc) void __glXDispSwap_RasterPos2dv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; #ifdef __GLX_ALIGN64 @@ -300,6 +309,7 @@ void __glXDispSwap_RasterPos2dv(GLbyte *pc) void __glXDispSwap_RasterPos2fv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_FLOAT_ARRAY(pc + 0, 2); @@ -308,6 +318,7 @@ void __glXDispSwap_RasterPos2fv(GLbyte *pc) void __glXDispSwap_RasterPos2iv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT_ARRAY(pc + 0, 2); @@ -316,6 +327,7 @@ void __glXDispSwap_RasterPos2iv(GLbyte *pc) void __glXDispSwap_RasterPos2sv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT_ARRAY(pc + 0, 2); @@ -324,6 +336,7 @@ void __glXDispSwap_RasterPos2sv(GLbyte *pc) void __glXDispSwap_RasterPos3dv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; #ifdef __GLX_ALIGN64 @@ -339,6 +352,7 @@ void __glXDispSwap_RasterPos3dv(GLbyte *pc) void __glXDispSwap_RasterPos3fv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_FLOAT_ARRAY(pc + 0, 3); @@ -347,6 +361,7 @@ void __glXDispSwap_RasterPos3fv(GLbyte *pc) void __glXDispSwap_RasterPos3iv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT_ARRAY(pc + 0, 3); @@ -355,6 +370,7 @@ void __glXDispSwap_RasterPos3iv(GLbyte *pc) void __glXDispSwap_RasterPos3sv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT_ARRAY(pc + 0, 3); @@ -363,6 +379,7 @@ void __glXDispSwap_RasterPos3sv(GLbyte *pc) void __glXDispSwap_RasterPos4dv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; #ifdef __GLX_ALIGN64 @@ -378,6 +395,7 @@ void __glXDispSwap_RasterPos4dv(GLbyte *pc) void __glXDispSwap_RasterPos4fv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_FLOAT_ARRAY(pc + 0, 4); @@ -386,6 +404,7 @@ void __glXDispSwap_RasterPos4fv(GLbyte *pc) void __glXDispSwap_RasterPos4iv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT_ARRAY(pc + 0, 4); @@ -394,6 +413,7 @@ void __glXDispSwap_RasterPos4iv(GLbyte *pc) void __glXDispSwap_RasterPos4sv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT_ARRAY(pc + 0, 4); @@ -402,6 +422,7 @@ void __glXDispSwap_RasterPos4sv(GLbyte *pc) void __glXDispSwap_Rectdv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; #ifdef __GLX_ALIGN64 @@ -418,6 +439,7 @@ void __glXDispSwap_Rectdv(GLbyte *pc) void __glXDispSwap_Rectfv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_FLOAT_ARRAY(pc + 0, 2); __GLX_SWAP_FLOAT_ARRAY(pc + 8, 2); @@ -427,6 +449,7 @@ void __glXDispSwap_Rectfv(GLbyte *pc) void __glXDispSwap_Rectiv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT_ARRAY(pc + 0, 2); __GLX_SWAP_INT_ARRAY(pc + 8, 2); @@ -436,6 +459,7 @@ void __glXDispSwap_Rectiv(GLbyte *pc) void __glXDispSwap_Rectsv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT_ARRAY(pc + 0, 2); __GLX_SWAP_SHORT_ARRAY(pc + 4, 2); @@ -445,6 +469,7 @@ void __glXDispSwap_Rectsv(GLbyte *pc) void __glXDispSwap_TexCoord1dv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; #ifdef __GLX_ALIGN64 @@ -460,6 +485,7 @@ void __glXDispSwap_TexCoord1dv(GLbyte *pc) void __glXDispSwap_TexCoord1fv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_FLOAT_ARRAY(pc + 0, 1); @@ -468,6 +494,7 @@ void __glXDispSwap_TexCoord1fv(GLbyte *pc) void __glXDispSwap_TexCoord1iv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT_ARRAY(pc + 0, 1); @@ -476,6 +503,7 @@ void __glXDispSwap_TexCoord1iv(GLbyte *pc) void __glXDispSwap_TexCoord1sv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT_ARRAY(pc + 0, 1); @@ -484,6 +512,7 @@ void __glXDispSwap_TexCoord1sv(GLbyte *pc) void __glXDispSwap_TexCoord2dv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; #ifdef __GLX_ALIGN64 @@ -499,6 +528,7 @@ void __glXDispSwap_TexCoord2dv(GLbyte *pc) void __glXDispSwap_TexCoord2fv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_FLOAT_ARRAY(pc + 0, 2); @@ -507,6 +537,7 @@ void __glXDispSwap_TexCoord2fv(GLbyte *pc) void __glXDispSwap_TexCoord2iv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT_ARRAY(pc + 0, 2); @@ -515,6 +546,7 @@ void __glXDispSwap_TexCoord2iv(GLbyte *pc) void __glXDispSwap_TexCoord2sv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT_ARRAY(pc + 0, 2); @@ -523,6 +555,7 @@ void __glXDispSwap_TexCoord2sv(GLbyte *pc) void __glXDispSwap_TexCoord3dv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; #ifdef __GLX_ALIGN64 @@ -538,6 +571,7 @@ void __glXDispSwap_TexCoord3dv(GLbyte *pc) void __glXDispSwap_TexCoord3fv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_FLOAT_ARRAY(pc + 0, 3); @@ -546,6 +580,7 @@ void __glXDispSwap_TexCoord3fv(GLbyte *pc) void __glXDispSwap_TexCoord3iv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT_ARRAY(pc + 0, 3); @@ -554,6 +589,7 @@ void __glXDispSwap_TexCoord3iv(GLbyte *pc) void __glXDispSwap_TexCoord3sv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT_ARRAY(pc + 0, 3); @@ -562,6 +598,7 @@ void __glXDispSwap_TexCoord3sv(GLbyte *pc) void __glXDispSwap_TexCoord4dv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; #ifdef __GLX_ALIGN64 @@ -577,6 +614,7 @@ void __glXDispSwap_TexCoord4dv(GLbyte *pc) void __glXDispSwap_TexCoord4fv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_FLOAT_ARRAY(pc + 0, 4); @@ -585,6 +623,7 @@ void __glXDispSwap_TexCoord4fv(GLbyte *pc) void __glXDispSwap_TexCoord4iv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT_ARRAY(pc + 0, 4); @@ -593,6 +632,7 @@ void __glXDispSwap_TexCoord4iv(GLbyte *pc) void __glXDispSwap_TexCoord4sv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT_ARRAY(pc + 0, 4); @@ -601,6 +641,7 @@ void __glXDispSwap_TexCoord4sv(GLbyte *pc) void __glXDispSwap_Vertex2dv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; #ifdef __GLX_ALIGN64 @@ -616,6 +657,7 @@ void __glXDispSwap_Vertex2dv(GLbyte *pc) void __glXDispSwap_Vertex2fv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_FLOAT_ARRAY(pc + 0, 2); @@ -624,6 +666,7 @@ void __glXDispSwap_Vertex2fv(GLbyte *pc) void __glXDispSwap_Vertex2iv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT_ARRAY(pc + 0, 2); @@ -632,6 +675,7 @@ void __glXDispSwap_Vertex2iv(GLbyte *pc) void __glXDispSwap_Vertex2sv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT_ARRAY(pc + 0, 2); @@ -640,6 +684,7 @@ void __glXDispSwap_Vertex2sv(GLbyte *pc) void __glXDispSwap_Vertex3dv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; #ifdef __GLX_ALIGN64 @@ -655,6 +700,7 @@ void __glXDispSwap_Vertex3dv(GLbyte *pc) void __glXDispSwap_Vertex3fv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_FLOAT_ARRAY(pc + 0, 3); @@ -663,6 +709,7 @@ void __glXDispSwap_Vertex3fv(GLbyte *pc) void __glXDispSwap_Vertex3iv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT_ARRAY(pc + 0, 3); @@ -671,6 +718,7 @@ void __glXDispSwap_Vertex3iv(GLbyte *pc) void __glXDispSwap_Vertex3sv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT_ARRAY(pc + 0, 3); @@ -679,6 +727,7 @@ void __glXDispSwap_Vertex3sv(GLbyte *pc) void __glXDispSwap_Vertex4dv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; #ifdef __GLX_ALIGN64 @@ -694,6 +743,7 @@ void __glXDispSwap_Vertex4dv(GLbyte *pc) void __glXDispSwap_Vertex4fv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_FLOAT_ARRAY(pc + 0, 4); @@ -702,6 +752,7 @@ void __glXDispSwap_Vertex4fv(GLbyte *pc) void __glXDispSwap_Vertex4iv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT_ARRAY(pc + 0, 4); @@ -710,6 +761,7 @@ void __glXDispSwap_Vertex4iv(GLbyte *pc) void __glXDispSwap_Vertex4sv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT_ARRAY(pc + 0, 4); @@ -718,6 +770,7 @@ void __glXDispSwap_Vertex4sv(GLbyte *pc) void __glXDispSwap_ClipPlane(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; #ifdef __GLX_ALIGN64 @@ -762,6 +815,7 @@ void __glXDispSwap_Fogfv(GLbyte *pc) GLenum pname; GLint compsize; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 0); pname = *(GLenum *)(pc + 0); @@ -785,6 +839,7 @@ void __glXDispSwap_Fogiv(GLbyte *pc) GLenum pname; GLint compsize; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 0); pname = *(GLenum *)(pc + 0); @@ -826,6 +881,7 @@ void __glXDispSwap_Lightfv(GLbyte *pc) GLenum pname; GLint compsize; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 4); pname = *(GLenum *)(pc + 4); @@ -851,6 +907,7 @@ void __glXDispSwap_Lightiv(GLbyte *pc) GLenum pname; GLint compsize; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 4); pname = *(GLenum *)(pc + 4); @@ -875,6 +932,7 @@ void __glXDispSwap_LightModelfv(GLbyte *pc) GLenum pname; GLint compsize; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 0); pname = *(GLenum *)(pc + 0); @@ -898,6 +956,7 @@ void __glXDispSwap_LightModeliv(GLbyte *pc) GLenum pname; GLint compsize; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 0); pname = *(GLenum *)(pc + 0); @@ -939,6 +998,7 @@ void __glXDispSwap_Materialfv(GLbyte *pc) GLenum pname; GLint compsize; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 4); pname = *(GLenum *)(pc + 4); @@ -964,6 +1024,7 @@ void __glXDispSwap_Materialiv(GLbyte *pc) GLenum pname; GLint compsize; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 4); pname = *(GLenum *)(pc + 4); @@ -1025,6 +1086,7 @@ void __glXDispSwap_TexParameterfv(GLbyte *pc) GLenum pname; GLint compsize; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 4); pname = *(GLenum *)(pc + 4); @@ -1050,6 +1112,7 @@ void __glXDispSwap_TexParameteriv(GLbyte *pc) GLenum pname; GLint compsize; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 4); pname = *(GLenum *)(pc + 4); @@ -1075,6 +1138,7 @@ void __glXDispSwap_TexEnvfv(GLbyte *pc) GLenum pname; GLint compsize; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 4); pname = *(GLenum *)(pc + 4); @@ -1100,6 +1164,7 @@ void __glXDispSwap_TexEnviv(GLbyte *pc) GLenum pname; GLint compsize; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 4); pname = *(GLenum *)(pc + 4); @@ -1133,6 +1198,7 @@ void __glXDispSwap_TexGendv(GLbyte *pc) GLint cmdlen; GLint compsize; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 4); pname = *(GLenum *)(pc + 4); @@ -1166,6 +1232,7 @@ void __glXDispSwap_TexGenfv(GLbyte *pc) GLenum pname; GLint compsize; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 4); pname = *(GLenum *)(pc + 4); @@ -1191,6 +1258,7 @@ void __glXDispSwap_TexGeniv(GLbyte *pc) GLenum pname; GLint compsize; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 4); pname = *(GLenum *)(pc + 4); @@ -1203,9 +1271,6 @@ void __glXDispSwap_TexGeniv(GLbyte *pc) void __glXDispSwap_InitNames(GLbyte *pc) { - __GLX_DECLARE_SWAP_VARIABLES; - - } void __glXDispSwap_LoadName(GLbyte *pc) @@ -1226,9 +1291,6 @@ void __glXDispSwap_PassThrough(GLbyte *pc) void __glXDispSwap_PopName(GLbyte *pc) { - __GLX_DECLARE_SWAP_VARIABLES; - - } void __glXDispSwap_PushName(GLbyte *pc) @@ -1318,16 +1380,10 @@ void __glXDispSwap_StencilMask(GLbyte *pc) void __glXDispSwap_ColorMask(GLbyte *pc) { - __GLX_DECLARE_SWAP_VARIABLES; - - } void __glXDispSwap_DepthMask(GLbyte *pc) { - __GLX_DECLARE_SWAP_VARIABLES; - - } void __glXDispSwap_IndexMask(GLbyte *pc) @@ -1365,9 +1421,6 @@ void __glXDispSwap_Enable(GLbyte *pc) void __glXDispSwap_PopAttrib(GLbyte *pc) { - __GLX_DECLARE_SWAP_VARIABLES; - - } void __glXDispSwap_PushAttrib(GLbyte *pc) @@ -1441,6 +1494,7 @@ void __glXDispSwap_MapGrid2f(GLbyte *pc) void __glXDispSwap_EvalCoord1dv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; #ifdef __GLX_ALIGN64 @@ -1456,6 +1510,7 @@ void __glXDispSwap_EvalCoord1dv(GLbyte *pc) void __glXDispSwap_EvalCoord1fv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_FLOAT_ARRAY(pc + 0, 1); @@ -1464,6 +1519,7 @@ void __glXDispSwap_EvalCoord1fv(GLbyte *pc) void __glXDispSwap_EvalCoord2dv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; #ifdef __GLX_ALIGN64 @@ -1479,6 +1535,7 @@ void __glXDispSwap_EvalCoord2dv(GLbyte *pc) void __glXDispSwap_EvalCoord2fv(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_FLOAT_ARRAY(pc + 0, 2); @@ -1608,6 +1665,7 @@ void __glXDispSwap_PixelMapfv(GLbyte *pc) { GLint mapsize; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 4); mapsize = *(GLint *)(pc + 4); @@ -1620,6 +1678,7 @@ void __glXDispSwap_PixelMapuiv(GLbyte *pc) { GLint mapsize; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 4); mapsize = *(GLint *)(pc + 4); @@ -1632,6 +1691,7 @@ void __glXDispSwap_PixelMapusv(GLbyte *pc) { GLint mapsize; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 4); mapsize = *(GLint *)(pc + 4); @@ -1698,14 +1758,12 @@ void __glXDispSwap_Frustum(GLbyte *pc) void __glXDispSwap_LoadIdentity(GLbyte *pc) { - __GLX_DECLARE_SWAP_VARIABLES; - - } void __glXDispSwap_LoadMatrixf(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_FLOAT_ARRAY(pc + 0, 16); @@ -1714,6 +1772,7 @@ void __glXDispSwap_LoadMatrixf(GLbyte *pc) void __glXDispSwap_LoadMatrixd(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; #ifdef __GLX_ALIGN64 @@ -1737,6 +1796,7 @@ void __glXDispSwap_MatrixMode(GLbyte *pc) void __glXDispSwap_MultMatrixf(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_FLOAT_ARRAY(pc + 0, 16); @@ -1745,6 +1805,7 @@ void __glXDispSwap_MultMatrixf(GLbyte *pc) void __glXDispSwap_MultMatrixd(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; #ifdef __GLX_ALIGN64 @@ -1779,16 +1840,10 @@ void __glXDispSwap_Ortho(GLbyte *pc) void __glXDispSwap_PopMatrix(GLbyte *pc) { - __GLX_DECLARE_SWAP_VARIABLES; - - } void __glXDispSwap_PushMatrix(GLbyte *pc) { - __GLX_DECLARE_SWAP_VARIABLES; - - } void __glXDispSwap_Rotated(GLbyte *pc) @@ -1964,6 +2019,7 @@ void __glXDispSwap_PrioritizeTextures(GLbyte *pc) { GLsizei n; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 0); n = *(GLsizei *)(pc + 0); @@ -1974,9 +2030,6 @@ void __glXDispSwap_PrioritizeTextures(GLbyte *pc) void __glXDispSwap_Indexubv(GLbyte *pc) { - __GLX_DECLARE_SWAP_VARIABLES; - - } void __glXDispSwap_BlendColor(GLbyte *pc) @@ -2003,6 +2056,7 @@ void __glXDispSwap_ColorTableParameterfv(GLbyte *pc) GLenum pname; GLint compsize; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 4); pname = *(GLenum *)(pc + 4); @@ -2018,6 +2072,7 @@ void __glXDispSwap_ColorTableParameteriv(GLbyte *pc) GLenum pname; GLint compsize; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 4); pname = *(GLenum *)(pc + 4); @@ -2067,6 +2122,7 @@ void __glXDispSwap_ConvolutionParameterfv(GLbyte *pc) GLenum pname; GLint compsize; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 4); pname = *(GLenum *)(pc + 4); @@ -2092,6 +2148,7 @@ void __glXDispSwap_ConvolutionParameteriv(GLbyte *pc) GLenum pname; GLint compsize; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 4); pname = *(GLenum *)(pc + 4); @@ -2189,6 +2246,7 @@ void __glXDispSwap_ActiveTextureARB(GLbyte *pc) void __glXDispSwap_MultiTexCoord1dvARB(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; #ifdef __GLX_ALIGN64 @@ -2205,6 +2263,7 @@ void __glXDispSwap_MultiTexCoord1dvARB(GLbyte *pc) void __glXDispSwap_MultiTexCoord1fvARB(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 0); __GLX_SWAP_FLOAT_ARRAY(pc + 4, 1); @@ -2214,6 +2273,7 @@ void __glXDispSwap_MultiTexCoord1fvARB(GLbyte *pc) void __glXDispSwap_MultiTexCoord1ivARB(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 0); __GLX_SWAP_INT_ARRAY(pc + 4, 1); @@ -2223,6 +2283,7 @@ void __glXDispSwap_MultiTexCoord1ivARB(GLbyte *pc) void __glXDispSwap_MultiTexCoord1svARB(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 0); __GLX_SWAP_SHORT_ARRAY(pc + 4, 1); @@ -2232,6 +2293,7 @@ void __glXDispSwap_MultiTexCoord1svARB(GLbyte *pc) void __glXDispSwap_MultiTexCoord2dvARB(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; #ifdef __GLX_ALIGN64 @@ -2248,6 +2310,7 @@ void __glXDispSwap_MultiTexCoord2dvARB(GLbyte *pc) void __glXDispSwap_MultiTexCoord2fvARB(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 0); __GLX_SWAP_FLOAT_ARRAY(pc + 4, 2); @@ -2257,6 +2320,7 @@ void __glXDispSwap_MultiTexCoord2fvARB(GLbyte *pc) void __glXDispSwap_MultiTexCoord2ivARB(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 0); __GLX_SWAP_INT_ARRAY(pc + 4, 2); @@ -2266,6 +2330,7 @@ void __glXDispSwap_MultiTexCoord2ivARB(GLbyte *pc) void __glXDispSwap_MultiTexCoord2svARB(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 0); __GLX_SWAP_SHORT_ARRAY(pc + 4, 2); @@ -2275,6 +2340,7 @@ void __glXDispSwap_MultiTexCoord2svARB(GLbyte *pc) void __glXDispSwap_MultiTexCoord3dvARB(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; #ifdef __GLX_ALIGN64 @@ -2291,6 +2357,7 @@ void __glXDispSwap_MultiTexCoord3dvARB(GLbyte *pc) void __glXDispSwap_MultiTexCoord3fvARB(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 0); __GLX_SWAP_FLOAT_ARRAY(pc + 4, 3); @@ -2300,6 +2367,7 @@ void __glXDispSwap_MultiTexCoord3fvARB(GLbyte *pc) void __glXDispSwap_MultiTexCoord3ivARB(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 0); __GLX_SWAP_INT_ARRAY(pc + 4, 3); @@ -2309,6 +2377,7 @@ void __glXDispSwap_MultiTexCoord3ivARB(GLbyte *pc) void __glXDispSwap_MultiTexCoord3svARB(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 0); __GLX_SWAP_SHORT_ARRAY(pc + 4, 3); @@ -2318,6 +2387,7 @@ void __glXDispSwap_MultiTexCoord3svARB(GLbyte *pc) void __glXDispSwap_MultiTexCoord4dvARB(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; #ifdef __GLX_ALIGN64 @@ -2334,6 +2404,7 @@ void __glXDispSwap_MultiTexCoord4dvARB(GLbyte *pc) void __glXDispSwap_MultiTexCoord4fvARB(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 0); __GLX_SWAP_FLOAT_ARRAY(pc + 4, 4); @@ -2343,6 +2414,7 @@ void __glXDispSwap_MultiTexCoord4fvARB(GLbyte *pc) void __glXDispSwap_MultiTexCoord4ivARB(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 0); __GLX_SWAP_INT_ARRAY(pc + 4, 4); @@ -2352,6 +2424,7 @@ void __glXDispSwap_MultiTexCoord4ivARB(GLbyte *pc) void __glXDispSwap_MultiTexCoord4svARB(GLbyte *pc) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 0); __GLX_SWAP_SHORT_ARRAY(pc + 4, 4); diff --git a/xserver/hw/dmx/glxProxy/glxcmds.c b/xserver/hw/dmx/glxProxy/glxcmds.c index 31fd431e7..88cf901f7 100644 --- a/xserver/hw/dmx/glxProxy/glxcmds.c +++ b/xserver/hw/dmx/glxProxy/glxcmds.c @@ -80,7 +80,7 @@ Display *GetBackEndDisplay( __GLXclientState *cl, int s ) if (! cl->be_displays[s] ) { cl->be_displays[s] = XOpenDisplay( DisplayString(dmxScreens[s].beDisplay) ); } - return( cl->be_displays[s] ); + return cl->be_displays[s]; } /* @@ -628,7 +628,7 @@ int GetCurrentBackEndTag(__GLXclientState *cl, GLXContextTag tag, int s) return( cl->be_currentCTag[ (tag-1)*screenInfo.numScreens + s ] ); } else { - return( 0 ); + return 0; } } @@ -2448,7 +2448,7 @@ int __glXQueryExtensionsString(__GLXclientState *cl, GLbyte *pc) len = (int)be_reply.length; numbytes = (int)be_reply.n; slop = numbytes * __GLX_SIZE_INT8 & 3; - be_buf = (char *)Xalloc(numbytes); + be_buf = (char *)malloc(numbytes); if (!be_buf) { /* Throw data on the floor */ _XEatData(dpy, len); @@ -2526,7 +2526,7 @@ int __glXQueryServerString(__GLXclientState *cl, GLbyte *pc) len = (int)be_reply.length; numbytes = (int)be_reply.n; slop = numbytes * __GLX_SIZE_INT8 & 3; - be_buf = (char *)Xalloc(numbytes); + be_buf = (char *)malloc(numbytes); if (!be_buf) { /* Throw data on the floor */ _XEatData(dpy, len); @@ -2841,6 +2841,7 @@ int __glXGetFBConfigs(__GLXclientState *cl, GLbyte *pc) if (client->swapped) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT_ARRAY((int *)buf, 2*numAttribs); } WriteToClient(client, 2*numAttribs * __GLX_SIZE_CARD32, (char *)buf); @@ -2947,7 +2948,7 @@ int __glXCreateWindow(__GLXclientState *cl, GLbyte *pc) return BadAlloc; } - pGlxWindow = (__glXWindow *) xalloc(sizeof(__glXWindow)); + pGlxWindow = (__glXWindow *) malloc(sizeof(__glXWindow)); if (!pGlxWindow) { return BadAlloc; } @@ -3016,7 +3017,7 @@ int __glXQueryContext(__GLXclientState *cl, GLbyte *pc) reply.n = nProps; nReplyBytes = reply.length << 2; - sendBuf = (int *)xalloc(nReplyBytes); + sendBuf = (int *)malloc(nReplyBytes); pSendBuf = sendBuf; *pSendBuf++ = GLX_FBCONFIG_ID; *pSendBuf++ = (int)(ctx->pFBConfig->id); @@ -3031,7 +3032,7 @@ int __glXQueryContext(__GLXclientState *cl, GLbyte *pc) WriteToClient(client, sz_xGLXQueryContextReply, (char *)&reply); WriteToClient(client, nReplyBytes, (char *)sendBuf); } - xfree((char *)sendBuf); + free((char *)sendBuf); return Success; } @@ -3061,7 +3062,7 @@ int __glXQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc) reply.n = nProps; nReplyBytes = reply.length << 2; - sendBuf = (int *)xalloc(nReplyBytes); + sendBuf = (int *)malloc(nReplyBytes); pSendBuf = sendBuf; *pSendBuf++ = GLX_SHARE_CONTEXT_EXT; *pSendBuf++ = (int)(ctx->share_id); @@ -3078,7 +3079,7 @@ int __glXQueryContextInfoEXT(__GLXclientState *cl, GLbyte *pc) WriteToClient(client, sz_xGLXQueryContextInfoEXTReply, (char *)&reply); WriteToClient(client, nReplyBytes, (char *)sendBuf); } - xfree((char *)sendBuf); + free((char *)sendBuf); return Success; } @@ -3124,14 +3125,14 @@ int __glXCreatePbuffer(__GLXclientState *cl, GLbyte *pc) /* ** Create the GLX part of the Pbuffer. */ - pGlxPbuffer = (__glXPbuffer *) xalloc(sizeof(__glXPbuffer)); + pGlxPbuffer = (__glXPbuffer *) malloc(sizeof(__glXPbuffer)); if (!pGlxPbuffer) { return BadAlloc; } - pGlxPbuffer->be_xids = (XID *) xalloc( sizeof(XID) * screenInfo.numScreens ); + pGlxPbuffer->be_xids = (XID *) malloc( sizeof(XID) * screenInfo.numScreens ); if (!pGlxPbuffer->be_xids) { - xfree(pGlxPbuffer); + free(pGlxPbuffer); return BadAlloc; } @@ -3380,7 +3381,7 @@ int __glXGetDrawableAttributes(__GLXclientState *cl, GLbyte *pc) if (reply.numAttribs) { attribs_size = 2 * reply.numAttribs * __GLX_SIZE_CARD32; - attribs = (CARD32 *) Xalloc(attribs_size); + attribs = (CARD32 *) malloc(attribs_size); if (attribs == NULL) { UnlockDisplay(dpy); SyncHandle(); @@ -3404,7 +3405,7 @@ int __glXGetDrawableAttributes(__GLXclientState *cl, GLbyte *pc) WriteToClient(client, attribs_size, (char *)attribs); } - Xfree(attribs); + free(attribs); return Success; } @@ -3420,11 +3421,6 @@ int __glXChangeDrawableAttributes(__GLXclientState *cl, GLbyte *pc) Display *dpy; int screen, rc; DMXScreenInfo *dmxScreen; - char *attrbuf; -#ifdef PANORAMIX - PanoramiXRes *pXinDraw = NULL; - PanoramiXRes *pXinReadDraw = NULL; -#endif if (drawId != None) { rc = dixLookupDrawable(&pDraw, drawId, client, 0, DixSetAttrAccess); @@ -3491,7 +3487,7 @@ int __glXChangeDrawableAttributes(__GLXclientState *cl, GLbyte *pc) #ifdef PANORAMIX if (!noPanoramiXExtension) { - pXinDraw = (PanoramiXRes *) + PanoramiXRes *pXinDraw = (PanoramiXRes *) SecurityLookupIDByClass(client, pDraw->id, XRC_DRAWABLE, DixReadAccess); if (!pXinDraw) { client->errorValue = drawId; diff --git a/xserver/hw/dmx/glxProxy/glxcmdsswap.c b/xserver/hw/dmx/glxProxy/glxcmdsswap.c index b3720f6f6..960c60d81 100644 --- a/xserver/hw/dmx/glxProxy/glxcmdsswap.c +++ b/xserver/hw/dmx/glxProxy/glxcmdsswap.c @@ -248,6 +248,7 @@ int __glXSwapGetVisualConfigs(__GLXclientState *cl, GLbyte *pc) unsigned int screen; int i, p; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(&req->screen); screen = req->screen; @@ -481,6 +482,7 @@ void glxSwapQueryExtensionsStringReply(ClientPtr client, { int length = reply->length; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT(&reply->sequenceNumber); __GLX_SWAP_INT(&reply->length); __GLX_SWAP_INT(&reply->n); @@ -507,6 +509,7 @@ void __glXSwapQueryContextInfoEXTReply(ClientPtr client, xGLXQueryContextInfoEXT { int length = reply->length; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT(&reply->sequenceNumber); __GLX_SWAP_INT(&reply->length); __GLX_SWAP_INT(&reply->n); @@ -521,6 +524,7 @@ void __glXSwapQueryContextReply(ClientPtr client, { int length = reply->length; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT(&reply->sequenceNumber); __GLX_SWAP_INT(&reply->length); __GLX_SWAP_INT(&reply->n); @@ -533,6 +537,7 @@ void __glXSwapGetDrawableAttributesReply(ClientPtr client, xGLXGetDrawableAttributesReply *reply, int *buf) { __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT(&reply->sequenceNumber); __GLX_SWAP_INT(&reply->length); __GLX_SWAP_INT(&reply->numAttribs); @@ -564,6 +569,7 @@ int __glXSwapRender(__GLXclientState *cl, GLbyte *pc) __GLXrenderHeader *hdr; ClientPtr client = cl->client; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; /* ** NOTE: much of this code also appears in the nonswapping version of this @@ -647,6 +653,7 @@ int __glXSwapRenderLarge(__GLXclientState *cl, GLbyte *pc) xGLXRenderLargeReq *req; __GLXrenderLargeHeader *hdr; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; req = (xGLXRenderLargeReq *) pc; __GLX_SWAP_SHORT(&req->length); @@ -1003,6 +1010,7 @@ int __glXSwapCreatePbuffer(__GLXclientState *cl, GLbyte *pc) xGLXCreatePbufferReq *req = (xGLXCreatePbufferReq *)pc; int nattr = req->numAttribs; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->screen); @@ -1040,6 +1048,7 @@ int __glXSwapChangeDrawableAttributes(__GLXclientState *cl, GLbyte *pc) { xGLXChangeDrawableAttributesReq *req = (xGLXChangeDrawableAttributesReq *)pc; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->drawable); diff --git a/xserver/hw/dmx/glxProxy/glxext.c b/xserver/hw/dmx/glxProxy/glxext.c index 6cd8bb41a..4adfbff88 100644 --- a/xserver/hw/dmx/glxProxy/glxext.c +++ b/xserver/hw/dmx/glxProxy/glxext.c @@ -191,7 +191,7 @@ void __glXFreeGLXWindow(__glXWindow *pGlxWindow) (*pGlxWindow->pScreen->DestroyWindow)(pWindow); } - xfree(pGlxWindow); + free(pGlxWindow); } } @@ -204,8 +204,8 @@ static void WindowGone(__glXWindow *pGlxWindow, XID id) void __glXFreeGLXPbuffer(__glXPbuffer *pGlxPbuffer) { if (!pGlxPbuffer->idExists && !pGlxPbuffer->refcnt) { - xfree(pGlxPbuffer->be_xids); - xfree(pGlxPbuffer); + free(pGlxPbuffer->be_xids); + free(pGlxPbuffer); } } diff --git a/xserver/hw/dmx/glxProxy/glxfbconfig.c b/xserver/hw/dmx/glxProxy/glxfbconfig.c index c721fdd24..a7741ff59 100644 --- a/xserver/hw/dmx/glxProxy/glxfbconfig.c +++ b/xserver/hw/dmx/glxProxy/glxfbconfig.c @@ -90,7 +90,7 @@ int AreFBConfigsMatch( __GLXFBConfig *c1, __GLXFBConfig *c2 ) (c1->maxAlpha == c2->maxAlpha) ); - return( match ); + return match; } __GLXFBConfig *FindMatchingFBConfig( __GLXFBConfig *c, __GLXFBConfig *configs, int nconfigs ) @@ -99,8 +99,8 @@ __GLXFBConfig *FindMatchingFBConfig( __GLXFBConfig *c, __GLXFBConfig *configs, i for (i=0; inumFBConfigs * + __glXFBConfigs = (__GLXFBConfig **)malloc( dmxScreen0->numFBConfigs * (numscreens+1) * sizeof(__GLXFBConfig *) ); __glXNumFBConfigs = 0; @@ -254,7 +254,6 @@ void __glXScreenInit(GLint numscreens) if (numscreens > 1) { for (s=1; sfbconfigs[c], dmxScreen->fbconfigs, @@ -282,7 +281,7 @@ void __glXScreenInit(GLint numscreens) __glXFBConfigs[ __glXNumFBConfigs * (numscreens+1) + 1 ] = &dmxScreen0->fbconfigs[c]; - proxy_cfg = Xalloc( sizeof(__GLXFBConfig) ); + proxy_cfg = malloc( sizeof(__GLXFBConfig) ); memcpy( proxy_cfg, cfg, sizeof(__GLXFBConfig) ); proxy_cfg->id = FakeClientID(0); /* visual will be associated later in __glXGetFBConfigs */ @@ -328,7 +327,7 @@ char *__glXGetServerString( unsigned int name ) break; } - return( ret ); + return ret; } @@ -339,10 +338,10 @@ __GLXFBConfig *glxLookupFBConfig( GLXFBConfigID id ) for (i=0, j=0; i<__glXNumFBConfigs; i++,j+=(__glXNumActiveScreens+1) ) { if ( __glXFBConfigs[j]->id == id) - return( __glXFBConfigs[j] ); + return __glXFBConfigs[j]; } - return(NULL); + return NULL; } __GLXFBConfig *glxLookupFBConfigByVID( VisualID vid ) @@ -351,10 +350,10 @@ __GLXFBConfig *glxLookupFBConfigByVID( VisualID vid ) for (i=0, j=0; i<__glXNumFBConfigs; i++,j+=(__glXNumActiveScreens+1) ) { if ( __glXFBConfigs[j]->associatedVisualId == vid) - return( __glXFBConfigs[j] ); + return __glXFBConfigs[j]; } - return(NULL); + return NULL; } __GLXFBConfig *glxLookupBackEndFBConfig( GLXFBConfigID id, int screen ) @@ -364,10 +363,10 @@ __GLXFBConfig *glxLookupBackEndFBConfig( GLXFBConfigID id, int screen ) for (i=0, j=0; i<__glXNumFBConfigs; i++,j+=(__glXNumActiveScreens+1) ) { if ( __glXFBConfigs[j]->id == id) - return( __glXFBConfigs[j+screen+1] ); + return __glXFBConfigs[j+screen+1]; } - return(NULL); + return NULL; } diff --git a/xserver/hw/dmx/glxProxy/glxsingle.c b/xserver/hw/dmx/glxProxy/glxsingle.c index dcc604052..a7ed57427 100644 --- a/xserver/hw/dmx/glxProxy/glxsingle.c +++ b/xserver/hw/dmx/glxProxy/glxsingle.c @@ -254,7 +254,7 @@ int __glXForwardPipe0WithReply( __GLXclientState *cl, GLbyte *pc ) _XReply(dpy, (xReply*) &be_reply, 0, False); be_buf_size = be_reply.length << 2; if (be_buf_size > 0) { - be_buf = (char *)Xalloc( be_buf_size ); + be_buf = (char *)malloc( be_buf_size ); if (be_buf) { _XRead(dpy, be_buf, be_buf_size); } @@ -288,7 +288,7 @@ int __glXForwardPipe0WithReply( __GLXclientState *cl, GLbyte *pc ) WriteToClient(client, be_buf_size, (char *)be_buf); } - if (be_buf_size > 0) Xfree(be_buf); + if (be_buf_size > 0) free(be_buf); return Success; } @@ -349,7 +349,7 @@ int __glXForwardAllWithReply( __GLXclientState *cl, GLbyte *pc ) _XReply(dpy, (xReply*) &be_reply, 0, False); be_buf_size = be_reply.length << 2; if (be_buf_size > 0) { - be_buf = (char *)Xalloc( be_buf_size ); + be_buf = (char *)malloc( be_buf_size ); if (be_buf) { _XRead(dpy, be_buf, be_buf_size); } @@ -364,7 +364,7 @@ int __glXForwardAllWithReply( __GLXclientState *cl, GLbyte *pc ) SyncHandle(); if (s > from_screen && be_buf_size > 0) { - Xfree(be_buf); + free(be_buf); } } @@ -388,7 +388,7 @@ int __glXForwardAllWithReply( __GLXclientState *cl, GLbyte *pc ) WriteToClient(client, be_buf_size, (char *)be_buf); } - if (be_buf_size > 0) Xfree(be_buf); + if (be_buf_size > 0) free(be_buf); return Success; } @@ -397,6 +397,7 @@ int __glXForwardSingleReqSwap( __GLXclientState *cl, GLbyte *pc ) { xGLXSingleReq *req = (xGLXSingleReq *)pc; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->contextTag); @@ -420,6 +421,7 @@ int __glXForwardPipe0WithReplySwap( __GLXclientState *cl, GLbyte *pc ) { xGLXSingleReq *req = (xGLXSingleReq *)pc; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->contextTag); @@ -443,6 +445,7 @@ int __glXForwardPipe0WithReplySwapsv( __GLXclientState *cl, GLbyte *pc ) { xGLXSingleReq *req = (xGLXSingleReq *)pc; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->contextTag); @@ -467,6 +470,7 @@ int __glXForwardPipe0WithReplySwapiv( __GLXclientState *cl, GLbyte *pc ) { xGLXSingleReq *req = (xGLXSingleReq *)pc; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->contextTag); @@ -491,6 +495,7 @@ int __glXForwardPipe0WithReplySwapdv( __GLXclientState *cl, GLbyte *pc ) { xGLXSingleReq *req = (xGLXSingleReq *)pc; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->contextTag); @@ -515,6 +520,7 @@ int __glXForwardAllWithReplySwap( __GLXclientState *cl, GLbyte *pc ) { xGLXSingleReq *req = (xGLXSingleReq *)pc; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->contextTag); @@ -539,6 +545,7 @@ int __glXForwardAllWithReplySwapsv( __GLXclientState *cl, GLbyte *pc ) { xGLXSingleReq *req = (xGLXSingleReq *)pc; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->contextTag); @@ -563,6 +570,7 @@ int __glXForwardAllWithReplySwapiv( __GLXclientState *cl, GLbyte *pc ) { xGLXSingleReq *req = (xGLXSingleReq *)pc; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->contextTag); @@ -587,6 +595,7 @@ int __glXForwardAllWithReplySwapdv( __GLXclientState *cl, GLbyte *pc ) { xGLXSingleReq *req = (xGLXSingleReq *)pc; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->contextTag); @@ -659,7 +668,7 @@ static GLint __glReadPixels_size(GLenum format, GLenum type, GLint w, GLint h, } if (elementbits_return) *elementbits_return = elements; if (rowbytes_return) *rowbytes_return = rowsize; - return (rowsize * h); + return rowsize * h; } else { return -1; } @@ -709,7 +718,7 @@ static GLint __glReadPixels_size(GLenum format, GLenum type, GLint w, GLint h, if (elementbits_return) *elementbits_return = esize*elements*8; if (rowbytes_return) *rowbytes_return = rowsize; - return (rowsize * h); + return rowsize * h; } static int intersectRect( int x1, int x2, int y1, int y2, @@ -725,14 +734,14 @@ static int intersectRect( int x1, int x2, int y1, int y2, if ( (width <= 0) || (height <= 0) ) { *ix1 = *ix2 = *iy1 = *iy2 = 0; - return(0); + return 0; } else { *ix1 = left; *ix2 = right; *iy1 = top; *iy2 = bottom; - return( width * height ); + return width * height; } } @@ -750,7 +759,6 @@ int __glXDisp_ReadPixels(__GLXclientState *cl, GLbyte *pc) GLboolean swapBytes, lsbFirst; ClientPtr client = cl->client; DrawablePtr pDraw; - int error; __GLXcontext *glxc; int from_screen = 0; int to_screen = 0; @@ -801,9 +809,9 @@ int __glXDisp_ReadPixels(__GLXclientState *cl, GLbyte *pc) buf_size = __glReadPixels_size(format,type,width,height, &ebits, &rowsize); if (buf_size > 0) { - buf = (char *) Xalloc( buf_size ); + buf = (char *) malloc( buf_size ); if ( !buf ) { - return( BadAlloc ); + return BadAlloc; } } else { @@ -880,7 +888,7 @@ int __glXDisp_ReadPixels(__GLXclientState *cl, GLbyte *pc) char *be_buf; int be_buf_size = be_reply.length << 2; - be_buf = (char *) Xalloc( be_buf_size ); + be_buf = (char *) malloc( be_buf_size ); if (be_buf) { _XRead(dpy, be_buf, be_buf_size); @@ -939,12 +947,12 @@ int __glXDisp_ReadPixels(__GLXclientState *cl, GLbyte *pc) } - Xfree( be_buf ); + free( be_buf ); } else { /* Throw data on the floor */ _XEatData(dpy, be_buf_size); - Xfree( buf ); + free( buf ); return BadAlloc; } } @@ -970,7 +978,7 @@ int __glXDisp_ReadPixels(__GLXclientState *cl, GLbyte *pc) WriteToClient(client, sizeof(xGLXReadPixelsReply),(char *)&reply); if (buf_size > 0) { WriteToClient(client, buf_size, (char *)buf); - Xfree( buf ); + free( buf ); } return Success; diff --git a/xserver/hw/dmx/glxProxy/glxswap.c b/xserver/hw/dmx/glxProxy/glxswap.c index 1e184f914..6d9b4fc55 100644 --- a/xserver/hw/dmx/glxProxy/glxswap.c +++ b/xserver/hw/dmx/glxProxy/glxswap.c @@ -183,7 +183,7 @@ static SwapGroupPtr CreateSwapEntry(WindowPtr pWin) SwapGroupPtr pEntry; /* Allocate new swap group */ - pEntry = xalloc(sizeof(*pEntry)); + pEntry = malloc(sizeof(*pEntry)); if (!pEntry) return NULL; /* Initialize swap group */ @@ -223,7 +223,7 @@ static void FreeSwapEntry(SwapGroupPtr pEntry) /* We can free the pEntry entry since it has already been removed * from the swap group list and it won't be needed any longer */ - xfree(pEntry); + free(pEntry); } int JoinSwapGroupSGIX(DrawablePtr pDraw, DrawablePtr pMember) @@ -407,7 +407,7 @@ void SwapBarrierReset(void) pBarrier; pBarrier = pNextBarrier) { pNextBarrier = pBarrier->pNext; - xfree(pBarrier); + free(pBarrier); } SwapBarrierList[i] = NULL; } @@ -422,7 +422,7 @@ static Bool BindSwapGroupToBarrier(GLuint barrier, SwapGroupPtr pSwapGroup) { SwapBarrierPtr pBarrier; - pBarrier = xalloc(sizeof(*pBarrier)); + pBarrier = malloc(sizeof(*pBarrier)); if (!pBarrier) return FALSE; /* Add the swap group to barrier's list */ @@ -448,7 +448,7 @@ static Bool UnbindSwapGroupFromBarrier(GLuint barrier, SwapGroupPtr pSwapGroup) else SwapBarrierList[barrier] = pBarrier->pNext; /* Free memory */ - xfree(pBarrier); + free(pBarrier); return TRUE; } diff --git a/xserver/hw/dmx/glxProxy/glxutil.c b/xserver/hw/dmx/glxProxy/glxutil.c index d0ce50486..18fd43ac4 100644 --- a/xserver/hw/dmx/glxProxy/glxutil.c +++ b/xserver/hw/dmx/glxProxy/glxutil.c @@ -83,7 +83,7 @@ __glXRealloc(void *addr, size_t newSize) if (addr) { if (newSize == 0) { - xfree(addr); + free(addr); return NULL; } else { newAddr = realloc(addr, newSize); @@ -105,7 +105,5 @@ __glXRealloc(void *addr, size_t newSize) void __glXFree(void *addr) { - if (addr) { - free(addr); - } + free(addr); } diff --git a/xserver/hw/dmx/glxProxy/glxvendor.c b/xserver/hw/dmx/glxProxy/glxvendor.c index 6b1f9a820..5e0fb8899 100644 --- a/xserver/hw/dmx/glxProxy/glxvendor.c +++ b/xserver/hw/dmx/glxProxy/glxvendor.c @@ -242,7 +242,7 @@ int __glXVForwardPipe0WithReply( __GLXclientState *cl, GLbyte *pc ) _XReply(dpy, (xReply*) &be_reply, 0, False); be_buf_size = be_reply.length << 2; if (be_buf_size > 0) { - be_buf = (char *)Xalloc( be_buf_size ); + be_buf = (char *)malloc( be_buf_size ); if (be_buf) { _XRead(dpy, be_buf, be_buf_size); } @@ -272,7 +272,7 @@ int __glXVForwardPipe0WithReply( __GLXclientState *cl, GLbyte *pc ) WriteToClient(client, be_buf_size, (char *)be_buf); } - if (be_buf_size > 0) Xfree(be_buf); + if (be_buf_size > 0) free(be_buf); return Success; } @@ -334,7 +334,7 @@ int __glXVForwardAllWithReply( __GLXclientState *cl, GLbyte *pc ) _XReply(dpy, (xReply*) &be_reply, 0, False); be_buf_size = be_reply.length << 2; if (be_buf_size > 0) { - be_buf = (char *)Xalloc( be_buf_size ); + be_buf = (char *)malloc( be_buf_size ); if (be_buf) { _XRead(dpy, be_buf, be_buf_size); } @@ -349,7 +349,7 @@ int __glXVForwardAllWithReply( __GLXclientState *cl, GLbyte *pc ) SyncHandle(); if (s > from_screen && be_buf_size > 0) { - Xfree(be_buf); + free(be_buf); } } @@ -369,7 +369,7 @@ int __glXVForwardAllWithReply( __GLXclientState *cl, GLbyte *pc ) WriteToClient(client, be_buf_size, (char *)be_buf); } - if (be_buf_size > 0) Xfree(be_buf); + if (be_buf_size > 0) free(be_buf); return Success; } @@ -392,6 +392,7 @@ int __glXVForwardPipe0WithReplySwap( __GLXclientState *cl, GLbyte *pc ) { xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *)pc; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->vendorCode); @@ -416,6 +417,7 @@ int __glXVForwardPipe0WithReplySwapsv( __GLXclientState *cl, GLbyte *pc ) { xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *)pc; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->vendorCode); @@ -440,6 +442,7 @@ int __glXVForwardPipe0WithReplySwapiv( __GLXclientState *cl, GLbyte *pc ) { xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *)pc; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->vendorCode); @@ -464,6 +467,7 @@ int __glXVForwardPipe0WithReplySwapdv( __GLXclientState *cl, GLbyte *pc ) { xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *)pc; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->vendorCode); @@ -488,6 +492,7 @@ int __glXVForwardAllWithReplySwap( __GLXclientState *cl, GLbyte *pc ) { xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *)pc; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->vendorCode); @@ -512,6 +517,7 @@ int __glXVForwardAllWithReplySwapsv( __GLXclientState *cl, GLbyte *pc ) { xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *)pc; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->vendorCode); @@ -536,6 +542,7 @@ int __glXVForwardAllWithReplySwapiv( __GLXclientState *cl, GLbyte *pc ) { xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *)pc; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->vendorCode); @@ -560,6 +567,7 @@ int __glXVForwardAllWithReplySwapdv( __GLXclientState *cl, GLbyte *pc ) { xGLXVendorPrivateReq *req = (xGLXVendorPrivateReq *)pc; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_SHORT(&req->length); __GLX_SWAP_INT(&req->vendorCode); diff --git a/xserver/hw/dmx/glxProxy/glxvisuals.c b/xserver/hw/dmx/glxProxy/glxvisuals.c index 898c6be7b..d738ec293 100644 --- a/xserver/hw/dmx/glxProxy/glxvisuals.c +++ b/xserver/hw/dmx/glxProxy/glxvisuals.c @@ -77,11 +77,11 @@ int glxVisualsMatch( __GLXvisualConfig *v1, __GLXvisualConfig *v2 ) (v1->nMultiSampleBuffers == v2->nMultiSampleBuffers) && (v1->visualSelectGroup == v2->visualSelectGroup) ) { - return(1); + return 1; } - return(0); + return 0; } @@ -93,12 +93,12 @@ VisualID glxMatchGLXVisualInConfigList( __GLXvisualConfig *pGlxVisual, __GLXvisu if (glxVisualsMatch( pGlxVisual, &configs[i] )) { - return( configs[i].vid ); + return configs[i].vid; } } - return(0); + return 0; } VisualID glxMatchVisualInConfigList( ScreenPtr pScreen, VisualPtr pVisual, __GLXvisualConfig *configs, int nconfigs ) @@ -109,7 +109,7 @@ VisualID glxMatchVisualInConfigList( ScreenPtr pScreen, VisualPtr pVisual, __GLX /* check that the glx extension has been initialized */ if ( !__glXActiveScreens ) - return(0); + return 0; pGlxScreen = &__glXActiveScreens[pScreen->myNum]; pGlxVisual = pGlxScreen->pGlxVisual; @@ -124,7 +124,7 @@ VisualID glxMatchVisualInConfigList( ScreenPtr pScreen, VisualPtr pVisual, __GLX /* * the visual is not supported by glx */ - return(0); + return 0; } return( glxMatchGLXVisualInConfigList(pGlxVisual, configs, nconfigs) ); @@ -151,12 +151,12 @@ VisualPtr glxMatchVisual( ScreenPtr pScreen, VisualPtr pVisual, ScreenPtr pMatch */ for (j=0; jnumVisuals; j++) { if (vid == pMatchScreen->visuals[j].vid) { - return( &pMatchScreen->visuals[j] ); + return &pMatchScreen->visuals[j]; } } } - return(0); + return 0; } void glxSetVisualConfigs(int nconfigs, __GLXvisualConfig *configs, @@ -198,7 +198,7 @@ static VisualID FindClosestVisual( VisualPtr pVisual, int rootDepth, while( pdepth[d].vids[v] != vis->vid ) vis++; if (vis->class == pVisual->class) { - return( pdepth[d].vids[v] ); + return pdepth[d].vids[v]; } } } @@ -216,7 +216,7 @@ static VisualID FindClosestVisual( VisualPtr pVisual, int rootDepth, while( pdepth[d].vids[v] != vis->vid ) vis++; if (vis->class == pVisual->class) { - return( pdepth[d].vids[v] ); + return pdepth[d].vids[v]; } } } @@ -224,7 +224,7 @@ static VisualID FindClosestVisual( VisualPtr pVisual, int rootDepth, /* * if not found - just take the first visual */ - return( pdepth[0].vids[0] ); + return pdepth[0].vids[0]; } Bool glxInitVisuals(int *nvisualp, VisualPtr *visualp, @@ -531,8 +531,7 @@ Bool glxInitVisuals(int *nvisualp, VisualPtr *visualp, __glXFree(pNewVisualConfigs); /* Free the private list created by DDX HW driver */ - if (visualPrivates) - xfree(visualPrivates); + free(visualPrivates); visualPrivates = NULL; return TRUE; diff --git a/xserver/hw/dmx/glxProxy/render2swap.c b/xserver/hw/dmx/glxProxy/render2swap.c index 37e43d8fa..5754ff472 100644 --- a/xserver/hw/dmx/glxProxy/render2swap.c +++ b/xserver/hw/dmx/glxProxy/render2swap.c @@ -69,6 +69,7 @@ void __glXDispSwap_Map1f(GLbyte *pc) GLenum target; GLint compsize; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 0); __GLX_SWAP_INT(pc + 12); @@ -99,6 +100,7 @@ void __glXDispSwap_Map2f(GLbyte *pc) GLenum target; GLint compsize; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 0); __GLX_SWAP_INT(pc + 12); @@ -137,6 +139,7 @@ void __glXDispSwap_Map1d(GLbyte *pc) GLenum target; GLdouble u1, u2, *points; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_DOUBLE(pc + 0); __GLX_SWAP_DOUBLE(pc + 8); @@ -179,6 +182,7 @@ void __glXDispSwap_Map2d(GLbyte *pc) GLint uorder, vorder, ustride, vstride, k, compsize; GLenum target; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_DOUBLE(pc + 0); __GLX_SWAP_DOUBLE(pc + 8); @@ -228,6 +232,7 @@ void __glXDispSwap_CallLists(GLbyte *pc) GLenum type; GLsizei n; __GLX_DECLARE_SWAP_VARIABLES; + __GLX_DECLARE_SWAP_ARRAY_VARIABLES; __GLX_SWAP_INT(pc + 4); __GLX_SWAP_INT(pc + 0); @@ -333,9 +338,3 @@ void __glXDispSwap_DrawArrays(GLbyte *pc) } } - -void __glXDispSwap_DrawArraysEXT(GLbyte *pc) -{ -#ifdef XXX_STUB -#endif /*XXX_STUB*/ -} diff --git a/xserver/hw/dmx/glxProxy/renderpixswap.c b/xserver/hw/dmx/glxProxy/renderpixswap.c index 462feeeb1..9deb30d4b 100644 --- a/xserver/hw/dmx/glxProxy/renderpixswap.c +++ b/xserver/hw/dmx/glxProxy/renderpixswap.c @@ -358,7 +358,7 @@ void __glXDispSwap_SeparableFilter2D(GLbyte *pc) { __GLXdispatchConvolutionFilterHeader *hdr = (__GLXdispatchConvolutionFilterHeader *) pc; - GLint hdrlen, image1len; + GLint hdrlen; __GLX_DECLARE_SWAP_VARIABLES; hdrlen = __GLX_PAD(__GLX_CONV_FILT_CMD_HDR_SIZE); diff --git a/xserver/hw/dmx/glxProxy/unpack.h b/xserver/hw/dmx/glxProxy/unpack.h index 98fa10ee7..f34b6fd51 100644 --- a/xserver/hw/dmx/glxProxy/unpack.h +++ b/xserver/hw/dmx/glxProxy/unpack.h @@ -82,7 +82,7 @@ extern xGLXSingleReply __glXReply; if ((size) > sizeof(answerBuffer)) { \ int bump; \ if ((cl)->returnBufSize < (size)+(align)) { \ - (cl)->returnBuf = (GLbyte*)Xrealloc((cl)->returnBuf, \ + (cl)->returnBuf = (GLbyte*)realloc((cl)->returnBuf, \ (size)+(align)); \ if (!(cl)->returnBuf) { \ return BadAlloc; \ @@ -138,7 +138,9 @@ extern xGLXSingleReply __glXReply; ** conceivably be replaced with routines that do the job faster. */ #define __GLX_DECLARE_SWAP_VARIABLES \ - GLbyte sw; \ + GLbyte sw + +#define __GLX_DECLARE_SWAP_ARRAY_VARIABLES \ GLbyte *swapPC; \ GLbyte *swapEnd diff --git a/xserver/hw/dmx/input/Makefile.in b/xserver/hw/dmx/input/Makefile.in index f6d1509bb..2cbe22d7f 100644 --- a/xserver/hw/dmx/input/Makefile.in +++ b/xserver/hw/dmx/input/Makefile.in @@ -129,10 +129,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -220,6 +216,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -234,6 +232,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -251,10 +250,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -310,10 +313,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -331,17 +335,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -368,20 +366,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -473,6 +474,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/dmx/input/atKeynames.h b/xserver/hw/dmx/input/atKeynames.h index e632ca27c..6aea1edec 100644 --- a/xserver/hw/dmx/input/atKeynames.h +++ b/xserver/hw/dmx/input/atKeynames.h @@ -66,8 +66,6 @@ #define KanaMask Mod4Mask #define ScrollLockMask Mod5Mask -#define KeyPressed(k) (keyc->postdown[k >> 3] & (1 << (k & 7))) - /* * NOTE: The AT/MF keyboards can generate (via the 8042) two (MF: three) * sets of scancodes. Set3 can only be generated by a MF keyboard. diff --git a/xserver/hw/dmx/input/dmxbackend.c b/xserver/hw/dmx/input/dmxbackend.c index 55615cf39..e917a5c42 100644 --- a/xserver/hw/dmx/input/dmxbackend.c +++ b/xserver/hw/dmx/input/dmxbackend.c @@ -114,7 +114,7 @@ pointer dmxBackendCreatePrivate(DeviceIntPtr pDevice) * #dmxBackendCreatePrivate. */ void dmxBackendDestroyPrivate(pointer private) { - if (private) free(private); + free(private); } static void *dmxBackendTestScreen(DMXScreenInfo *dmxScreen, void *closure) diff --git a/xserver/hw/dmx/input/dmxcommon.c b/xserver/hw/dmx/input/dmxcommon.c index da5b77893..c665dad90 100644 --- a/xserver/hw/dmx/input/dmxcommon.c +++ b/xserver/hw/dmx/input/dmxcommon.c @@ -370,7 +370,7 @@ void dmxCommonOthGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info) Display *display = priv->display; int num; int i, j, k; - int (*handler)(Display *, char *, char *); + XextErrorHandler handler; if (!display && !(display = XOpenDisplay(dmxInput->name))) return; @@ -526,10 +526,9 @@ int dmxFindPointerScreen(int x, int y) int i; for (i = 0; i < dmxNumScreens; i++) { - if (x >= dixScreenOrigins[i].x - && x < dixScreenOrigins[i].x + screenInfo.screens[i]->width - && y >= dixScreenOrigins[i].y - && y < dixScreenOrigins[i].y + screenInfo.screens[i]->height) + ScreenPtr pScreen = screenInfo.screens[i]; + if (x >= pScreen->x && x < pScreen->x + pScreen->width && + y >= pScreen->y && y < pScreen->y + pScreen->height) return i; } return -1; diff --git a/xserver/hw/dmx/input/dmxconsole.c b/xserver/hw/dmx/input/dmxconsole.c index 9542efacd..7ec209df0 100644 --- a/xserver/hw/dmx/input/dmxconsole.c +++ b/xserver/hw/dmx/input/dmxconsole.c @@ -148,7 +148,7 @@ pointer dmxConsoleCreatePrivate(DeviceIntPtr pDevice) /** If \a private is non-NULL, free its associated memory. */ void dmxConsoleDestroyPrivate(pointer private) { - if (private) free(private); + free(private); } static void dmxConsoleDrawFineCursor(myPrivate *priv, XRectangle *rect) @@ -204,7 +204,8 @@ static void dmxConsoleDrawWindows(pointer private) XUnionRectWithRegion(&rect, whole, whole); for (i = 0; i < dmxNumScreens; i++) { - WindowPtr pRoot = WindowTable[i]; + ScreenPtr pScreen = screenInfo.screens[i]; + WindowPtr pRoot = pScreen->root; WindowPtr pChild; #if DMX_WINDOW_DEBUG @@ -225,12 +226,10 @@ static void dmxConsoleDrawWindows(pointer private) pChild->drawable.height, pChild->visibility, pChild->overrideRedirect, - REGION_NUM_RECTS(&pChild->clipList)); + RegionNumRects(&pChild->clipList)); #endif - rect.x = scalex(priv, pChild->drawable.x - + dixScreenOrigins[i].x); - rect.y = scaley(priv, pChild->drawable.y - + dixScreenOrigins[i].y); + rect.x = scalex(priv, pChild->drawable.x + pScreen->x); + rect.y = scaley(priv, pChild->drawable.y + pScreen->y); rect.width = scalex(priv, pChild->drawable.width); rect.height = scaley(priv, pChild->drawable.height); XDrawRectangle(dpy, priv->pixmap, priv->gc, @@ -263,15 +262,15 @@ static void dmxConsoleDraw(myPrivate *priv, int updateCursor, int update) DMXScreenInfo *dmxScreen = &dmxScreens[i]; XFillRectangle(dpy, priv->pixmap, dmxScreen->beDisplay ? priv->gcRev : priv->gcDet, - scalex(priv, dixScreenOrigins[i].x), - scaley(priv, dixScreenOrigins[i].y), + scalex(priv, screenInfo.screens[i]->x), + scaley(priv, screenInfo.screens[i]->y), scalex(priv, screenInfo.screens[i]->width), scaley(priv, screenInfo.screens[i]->height)); } for (i = 0; i < dmxNumScreens; i++) { XDrawRectangle(dpy, priv->pixmap, priv->gc, - scalex(priv, dixScreenOrigins[i].x), - scaley(priv, dixScreenOrigins[i].y), + scalex(priv, screenInfo.screens[i]->x), + scaley(priv, screenInfo.screens[i]->y), scalex(priv, screenInfo.screens[i]->width), scaley(priv, screenInfo.screens[i]->height)); } @@ -671,11 +670,11 @@ static void dmxConsoleComputeWidthHeight(myPrivate *priv, * possible by computing the visible * bounding box. */ for (i = 0; i < dmxNumScreens; i++) { - if (dixScreenOrigins[i].x+screenInfo.screens[i]->width > *width) - *width = dixScreenOrigins[i].x+screenInfo.screens[i]->width; + if (screenInfo.screens[i]->x+screenInfo.screens[i]->width > *width) + *width = screenInfo.screens[i]->x+screenInfo.screens[i]->width; - if (dixScreenOrigins[i].y+screenInfo.screens[i]->height > *height) - *height = dixScreenOrigins[i].y+screenInfo.screens[i]->height; + if (screenInfo.screens[i]->y+screenInfo.screens[i]->height > *height) + *height = screenInfo.screens[i]->y+screenInfo.screens[i]->height; } #endif diff --git a/xserver/hw/dmx/input/dmxinputinit.c b/xserver/hw/dmx/input/dmxinputinit.c index 5a486a464..83a2abbb8 100644 --- a/xserver/hw/dmx/input/dmxinputinit.c +++ b/xserver/hw/dmx/input/dmxinputinit.c @@ -570,7 +570,7 @@ static void dmxUpdateWindowInformation(DMXInputInfo *dmxInput, int i; #ifdef PANORAMIX - if (!noPanoramiXExtension && pWindow && pWindow->parent != WindowTable[0]) + if (!noPanoramiXExtension && pWindow && pWindow->parent != screenInfo.screens[0]->root) return; #endif #if DMX_WINDOW_DEBUG @@ -672,7 +672,7 @@ static char *dmxMakeUniqueDeviceName(DMXLocalInputInfoPtr dmxLocal) static int o = 0; static unsigned long dmxGeneration = 0; #define LEN 32 - char * buf = xalloc(LEN); + char * buf = malloc(LEN); if (dmxGeneration != serverGeneration) { k = m = o = 0; @@ -776,7 +776,7 @@ static DMXLocalInputInfoPtr dmxLookupLocal(const char *name) DMXLocalInputInfoPtr dmxInputCopyLocal(DMXInputInfo *dmxInput, DMXLocalInputInfoPtr s) { - DMXLocalInputInfoPtr dmxLocal = xalloc(sizeof(*dmxLocal)); + DMXLocalInputInfoPtr dmxLocal = malloc(sizeof(*dmxLocal)); if (!dmxLocal) dmxLog(dmxFatal, "DMXLocalInputInfoPtr: out of memory\n"); @@ -788,7 +788,7 @@ DMXLocalInputInfoPtr dmxInputCopyLocal(DMXInputInfo *dmxInput, dmxLocal->deviceId = -1; ++dmxInput->numDevs; - dmxInput->devs = xrealloc(dmxInput->devs, + dmxInput->devs = realloc(dmxInput->devs, dmxInput->numDevs * sizeof(*dmxInput->devs)); dmxInput->devs[dmxInput->numDevs-1] = dmxLocal; @@ -827,7 +827,7 @@ static void dmxPopulateLocal(DMXInputInfo *dmxInput, dmxArg a) } } -int dmxInputExtensionErrorHandler(Display *dsp, char *name, char *reason) +int dmxInputExtensionErrorHandler(Display *dsp, _Xconst char *name, _Xconst char *reason) { return 0; } @@ -839,8 +839,7 @@ static void dmxInputScanForExtensions(DMXInputInfo *dmxInput, int doXI) Display *display; int num; int i, j; - DMXLocalInputInfoPtr dmxLocal; - int (*handler)(Display *, char *, char *); + XextErrorHandler handler; if (!(display = XOpenDisplay(dmxInput->name))) return; @@ -886,7 +885,7 @@ static void dmxInputScanForExtensions(DMXInputInfo *dmxInput, int doXI) && dmxL->deviceId < 0) { dmxL->deviceId = devices[i].id; dmxL->deviceName = (devices[i].name - ? xstrdup(devices[i].name) + ? strdup(devices[i].name) : NULL); } } @@ -919,7 +918,7 @@ static void dmxInputScanForExtensions(DMXInputInfo *dmxInput, int doXI) dmxLocal->sendsCore = FALSE; dmxLocal->deviceId = devices[i].id; dmxLocal->deviceName = (devices[i].name - ? xstrdup(devices[i].name) + ? strdup(devices[i].name) : NULL); } } @@ -1085,13 +1084,13 @@ static void dmxInputFreeLocal(DMXLocalInputInfoRec *local) if (local->isCore && local->type == DMX_LOCAL_KEYBOARD) dmxLocalCoreKeyboard = NULL; if (local->destroy_private) local->destroy_private(local->private); - if (local->history) xfree(local->history); - if (local->valuators) xfree(local->valuators); - if (local->deviceName) xfree(local->deviceName); + free(local->history); + free(local->valuators); + free(local->deviceName); local->private = NULL; local->history = NULL; local->deviceName = NULL; - xfree(local); + free(local); } /** Free all of the memory associated with \a dmxInput */ @@ -1101,18 +1100,18 @@ void dmxInputFree(DMXInputInfo *dmxInput) if (!dmxInput) return; - if (dmxInput->keycodes) xfree(dmxInput->keycodes); - if (dmxInput->symbols) xfree(dmxInput->symbols); - if (dmxInput->geometry) xfree(dmxInput->geometry); + free(dmxInput->keycodes); + free(dmxInput->symbols); + free(dmxInput->geometry); for (i = 0; i < dmxInput->numDevs; i++) { dmxInputFreeLocal(dmxInput->devs[i]); dmxInput->devs[i] = NULL; } - xfree(dmxInput->devs); + free(dmxInput->devs); dmxInput->devs = NULL; dmxInput->numDevs = 0; - if (dmxInput->freename) xfree(dmxInput->name); + if (dmxInput->freename) free(dmxInput->name); dmxInput->name = NULL; } diff --git a/xserver/hw/dmx/input/dmxinputinit.h b/xserver/hw/dmx/input/dmxinputinit.h index 2e625cfd4..5a4a4106c 100644 --- a/xserver/hw/dmx/input/dmxinputinit.h +++ b/xserver/hw/dmx/input/dmxinputinit.h @@ -276,8 +276,8 @@ extern void dmxKeyboardKbdCtrlProc(DeviceIntPtr pDevice, KeybdCtrl *ctrl); extern void dmxKeyboardBellProc(int percent, DeviceIntPtr pDevice, pointer ctrl, int unknown); -extern int dmxInputExtensionErrorHandler(Display *dsp, char *name, - char *reason); +extern int dmxInputExtensionErrorHandler(Display *dsp, _Xconst char *name, + _Xconst char *reason); extern int dmxInputDetach(DMXInputInfo *dmxInput); extern void dmxInputDetachAll(DMXScreenInfo *dmxScreen); diff --git a/xserver/hw/dmx/input/dmxmotion.c b/xserver/hw/dmx/input/dmxmotion.c index 73580a215..a86b62e5c 100644 --- a/xserver/hw/dmx/input/dmxmotion.c +++ b/xserver/hw/dmx/input/dmxmotion.c @@ -108,7 +108,7 @@ void dmxPointerPutMotionEvent(DeviceIntPtr pDevice, int i; if (!dmxLocal->history) { - dmxLocal->history = xalloc(sizeof(*dmxLocal->history) + dmxLocal->history = malloc(sizeof(*dmxLocal->history) * (numAxes + 1) * DMX_MOTION_SIZE); dmxLocal->head = 0; diff --git a/xserver/hw/dmx/input/dmxxinput.c b/xserver/hw/dmx/input/dmxxinput.c index a2a4156ab..8b58eeb69 100644 --- a/xserver/hw/dmx/input/dmxxinput.c +++ b/xserver/hw/dmx/input/dmxxinput.c @@ -51,63 +51,6 @@ #include "dmxinputinit.h" #include "exevents.h" -/** Change the core keyboard from \a old_dev to \a new_dev. Currently - * this is not implemented. */ -int ChangeKeyboardDevice(DeviceIntPtr old_dev, DeviceIntPtr new_dev) -{ -#if 0 - DMXLocalInputInfoPtr dmxLocalOld = old_dev->public.devicePrivate; - DMXLocalInputInfoPtr dmxLocalNew = new_dev->public.devicePrivate; - - /* Switch our notion of core keyboard */ - dmxLocalOld->isCore = 0; - dmxLocalOld->sendsCore = dmxLocalOld->savedSendsCore; - - dmxLocalNew->isCore = 1; - dmxLocalNew->savedSendsCore = dmxLocalNew->sendsCore; - dmxLocalNew->sendsCore = 1; - dmxLocalCorePointer = dmxLocalNew; - - RegisterKeyboardDevice(new_dev); - RegisterOtherDevice(old_dev); - - return Success; -#endif - return BadMatch; -} - -/** Change the core pointer from \a old_dev to \a new_dev. */ -int ChangePointerDevice(DeviceIntPtr old_dev, - DeviceIntPtr new_dev, - unsigned char x, - unsigned char y) -{ - DMXLocalInputInfoPtr dmxLocalOld = old_dev->public.devicePrivate; - DMXLocalInputInfoPtr dmxLocalNew = new_dev->public.devicePrivate; - - if (x != 0 || y != 1) return BadMatch; - - /* Make sure the new device can focus */ - InitFocusClassDeviceStruct(old_dev); - - /* Switch the motion history buffers */ - if (dmxLocalOld->savedMotionProc) { - old_dev->valuator->numMotionEvents = dmxLocalOld->savedMotionEvents; - } - dmxLocalNew->savedMotionEvents = new_dev->valuator->numMotionEvents; - new_dev->valuator->numMotionEvents = GetMaximumEventsNum(); - /* Switch our notion of core pointer */ - dmxLocalOld->isCore = 0; - dmxLocalOld->sendsCore = dmxLocalOld->savedSendsCore; - - dmxLocalNew->isCore = 1; - dmxLocalNew->savedSendsCore = dmxLocalNew->sendsCore; - dmxLocalNew->sendsCore = 1; - dmxLocalCorePointer = dmxLocalNew; - - return Success; -} - /** Close the input device. This is not required by the XINPUT model * that DMX uses. */ void CloseInputDevice (DeviceIntPtr d, ClientPtr client) diff --git a/xserver/hw/dmx/input/lnx-keyboard.c b/xserver/hw/dmx/input/lnx-keyboard.c index 939a32f07..5bfb8813c 100644 --- a/xserver/hw/dmx/input/lnx-keyboard.c +++ b/xserver/hw/dmx/input/lnx-keyboard.c @@ -368,7 +368,7 @@ pointer kbdLinuxCreatePrivate(DeviceIntPtr pKeyboard) /** Destroy a private structure. */ void kbdLinuxDestroyPrivate(pointer priv) { - if (priv) free(priv); + free(priv); } /** Ring the bell. @@ -938,7 +938,7 @@ static void kbdLinuxGetMap(DevicePtr pDev, KeySymsPtr pKeySyms, CARD8 *pModMap) int i; #if 00/*BP*/ - mapCopy = xalloc(sizeof(map)); + mapCopy = malloc(sizeof(map)); memcpy(mapCopy, map, sizeof(map)); #else ErrorF("kbdLinuxGetMap() is broken/no-op'd\n"); diff --git a/xserver/hw/dmx/input/lnx-ms.c b/xserver/hw/dmx/input/lnx-ms.c index 549df46e2..ee187072c 100644 --- a/xserver/hw/dmx/input/lnx-ms.c +++ b/xserver/hw/dmx/input/lnx-ms.c @@ -301,7 +301,7 @@ pointer msLinuxCreatePrivate(DeviceIntPtr pMouse) /** Destroy a private structure. */ void msLinuxDestroyPrivate(pointer priv) { - if (priv) free(priv); + free(priv); } /** Fill the \a info structure with information needed to initialize \a diff --git a/xserver/hw/dmx/input/lnx-ps2.c b/xserver/hw/dmx/input/lnx-ps2.c index 70918eef4..3a220cf01 100644 --- a/xserver/hw/dmx/input/lnx-ps2.c +++ b/xserver/hw/dmx/input/lnx-ps2.c @@ -269,7 +269,7 @@ pointer ps2LinuxCreatePrivate(DeviceIntPtr pMouse) /** Destroy a private structure. */ void ps2LinuxDestroyPrivate(pointer priv) { - if (priv) free(priv); + free(priv); } /** Fill the \a info structure with information needed to initialize \a diff --git a/xserver/hw/dmx/input/usb-common.c b/xserver/hw/dmx/input/usb-common.c index 95c00b839..25479aea6 100644 --- a/xserver/hw/dmx/input/usb-common.c +++ b/xserver/hw/dmx/input/usb-common.c @@ -377,5 +377,5 @@ pointer usbCreatePrivate(DeviceIntPtr pDevice) /** Destroy a private structure. */ void usbDestroyPrivate(pointer priv) { - if (priv) free(priv); + free(priv); } diff --git a/xserver/hw/dmx/input/usb-keyboard.c b/xserver/hw/dmx/input/usb-keyboard.c index c4667a3c3..9db1adbfc 100644 --- a/xserver/hw/dmx/input/usb-keyboard.c +++ b/xserver/hw/dmx/input/usb-keyboard.c @@ -398,7 +398,7 @@ static void kbdUSBGetMap(DevicePtr pDev, KeySymsPtr pKeySyms, CARD8 *pModMap) KeySym *k, *mapCopy; int i; - mapCopy = xalloc(sizeof(map)); + mapCopy = malloc(sizeof(map)); memcpy(mapCopy, map, sizeof(map)); /* compute the modifier map */ @@ -439,6 +439,6 @@ void kbdUSBGetInfo(DevicePtr pDev, DMXLocalInitInfoPtr info) kbdUSBGetMap(pDev, &info->keySyms, info->modMap); info->focusClass = 1; info->kbdFeedbackClass = 1; - info->names.keycodes = xstrdup("powerpcps2"); + info->names.keycodes = strdup("powerpcps2"); info->force = 1; } diff --git a/xserver/hw/kdrive/Makefile.in b/xserver/hw/kdrive/Makefile.in index 0bb31f2d1..a9bbabdf8 100644 --- a/xserver/hw/kdrive/Makefile.in +++ b/xserver/hw/kdrive/Makefile.in @@ -100,10 +100,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -191,6 +187,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -205,6 +203,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -222,10 +221,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -281,10 +284,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -302,17 +306,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -339,20 +337,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -444,6 +445,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/kdrive/ephyr/Makefile.in b/xserver/hw/kdrive/ephyr/Makefile.in index 82cb214be..836211259 100644 --- a/xserver/hw/kdrive/ephyr/Makefile.in +++ b/xserver/hw/kdrive/ephyr/Makefile.in @@ -156,10 +156,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -247,6 +243,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -261,6 +259,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -278,10 +277,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -337,10 +340,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -358,17 +362,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -395,20 +393,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -500,6 +501,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/kdrive/ephyr/XF86dri.c b/xserver/hw/kdrive/ephyr/XF86dri.c index 08123d35c..e7c88b335 100644 --- a/xserver/hw/kdrive/ephyr/XF86dri.c +++ b/xserver/hw/kdrive/ephyr/XF86dri.c @@ -221,7 +221,7 @@ XF86DRIOpenConnection (Display *dpy, int screen, } if (rep.length) { - if (!(*busIdString = (char *)Xcalloc(rep.busIdStringLength + 1, 1))) { + if (!(*busIdString = (char *)calloc(rep.busIdStringLength + 1, 1))) { _XEatData(dpy, ((rep.busIdStringLength+3) & ~3)); UnlockDisplay(dpy); SyncHandle(); @@ -316,7 +316,7 @@ Bool XF86DRIGetClientDriverName(Display *dpy, int screen, *ddxDriverPatchVersion = rep.ddxDriverPatchVersion; if (rep.length) { - if (!(*clientDriverName = (char *)Xcalloc(rep.clientDriverNameLength + 1, 1))) { + if (!(*clientDriverName = (char *)calloc(rep.clientDriverNameLength + 1, 1))) { _XEatData(dpy, ((rep.clientDriverNameLength+3) & ~3)); UnlockDisplay(dpy); SyncHandle(); @@ -528,7 +528,7 @@ Bool XF86DRIGetDrawableInfo(Display* dpy, int screen, Drawable drawable, if (*numClipRects) { int len = sizeof(drm_clip_rect_t) * (*numClipRects); - *pClipRects = (drm_clip_rect_t *)Xcalloc(len, 1); + *pClipRects = (drm_clip_rect_t *)calloc(len, 1); if (*pClipRects) _XRead(dpy, (char*)*pClipRects, len); } else { @@ -538,7 +538,7 @@ Bool XF86DRIGetDrawableInfo(Display* dpy, int screen, Drawable drawable, if (*numBackClipRects) { int len = sizeof(drm_clip_rect_t) * (*numBackClipRects); - *pBackClipRects = (drm_clip_rect_t *)Xcalloc(len, 1); + *pBackClipRects = (drm_clip_rect_t *)calloc(len, 1); if (*pBackClipRects) _XRead(dpy, (char*)*pBackClipRects, len); } else { @@ -587,7 +587,7 @@ XF86DRIGetDeviceInfo (Display *dpy, int screen, drm_handle_t *hFrameBuffer, *devPrivateSize = rep.devPrivateSize; if (rep.length) { - if (!(*pDevPrivate = (void *)Xcalloc(rep.devPrivateSize, 1))) { + if (!(*pDevPrivate = (void *)calloc(rep.devPrivateSize, 1))) { _XEatData(dpy, ((rep.devPrivateSize+3) & ~3)); UnlockDisplay(dpy); SyncHandle(); diff --git a/xserver/hw/kdrive/ephyr/ephyr.c b/xserver/hw/kdrive/ephyr/ephyr.c index b21559bba..8096a24cc 100644 --- a/xserver/hw/kdrive/ephyr/ephyr.c +++ b/xserver/hw/kdrive/ephyr/ephyr.c @@ -38,6 +38,8 @@ #include "ephyrglxext.h" #endif /* XF86DRI */ +#include "xkbsrv.h" + extern int KdTsPhyScreen; #ifdef GLXEXT extern Bool noGlxVisualInit; @@ -73,13 +75,13 @@ ephyrCardInit (KdCardInfo *card) { EphyrPriv *priv; - priv = (EphyrPriv *) xalloc (sizeof (EphyrPriv)); + priv = (EphyrPriv *) malloc(sizeof (EphyrPriv)); if (!priv) return FALSE; if (!ephyrInitialize (card, priv)) { - xfree (priv); + free(priv); return FALSE; } card->driver = priv; @@ -185,7 +187,7 @@ ephyrScreenInit (KdScreenInfo *screen) { EphyrScrPriv *scrpriv; - scrpriv = xcalloc (1, sizeof (EphyrScrPriv)); + scrpriv = calloc(1, sizeof (EphyrScrPriv)); if (!scrpriv) return FALSE; @@ -195,7 +197,7 @@ ephyrScreenInit (KdScreenInfo *screen) if (!ephyrScreenInitialize (screen, scrpriv)) { screen->driver = 0; - xfree (scrpriv); + free(scrpriv); return FALSE; } @@ -343,13 +345,13 @@ ephyrInternalDamageRedisplay (ScreenPtr pScreen) pRegion = DamageRegion (scrpriv->pDamage); - if (REGION_NOTEMPTY (pScreen, pRegion)) + if (RegionNotEmpty(pRegion)) { int nbox; BoxPtr pbox; - nbox = REGION_NUM_RECTS (pRegion); - pbox = REGION_RECTS (pRegion); + nbox = RegionNumRects (pRegion); + pbox = RegionRects (pRegion); while (nbox--) { @@ -737,7 +739,7 @@ ephyrScreenFini (KdScreenInfo *screen) if (scrpriv->shadow) { KdShadowFbFree (screen); } - xfree(screen->driver); + free(screen->driver); screen->driver = NULL; } @@ -748,75 +750,49 @@ ephyrScreenFini (KdScreenInfo *screen) void ephyrUpdateModifierState(unsigned int state) { -#if 0 - DeviceIntPtr pkeydev; - KeyClassPtr keyc; - int i; - CARD8 mask; - pkeydev = inputInfo.keyboard; - - if (!pkeydev) - return; + DeviceIntPtr pDev = inputInfo.keyboard; + KeyClassPtr keyc = pDev->key; + int i; + CARD8 mask; + int xkb_state; -/* This is pretty broken. - * - * What should happen is that focus out should do as a VT switch does in - * traditional servers: fake releases for all keys (and buttons too, come - * to think of it) currently down. Then, on focus in, get the state from - * the host, and fake keypresses for everything currently down. - * - * So I'm leaving this broken for a little while. Sorry, folks. - * - * -daniels - */ + if (!pDev) + return; - keyc = pkeydev->key; - + xkb_state = XkbStateFieldFromRec(&pDev->key->xkbInfo->state); state = state & 0xff; - - if (keyc->state == state) + + if (xkb_state == state) return; - - for (i = 0, mask = 1; i < 8; i++, mask <<= 1) - { - int key; - /* Modifier is down, but shouldn't be */ - if ((keyc->state & mask) && !(state & mask)) - { - int count = keyc->modifierKeyCount[i]; - - for (key = 0; key < MAP_LENGTH; key++) - if (keyc->xkbInfo->desc->map->modmap[key] & mask) - { - int bit; - BYTE *kptr; - - kptr = &keyc->down[key >> 3]; - bit = 1 << (key & 7); - - if (*kptr & bit && ephyrKbd && - ((EphyrKbdPrivate *)ephyrKbd->driverPrivate)->enabled) - KdEnqueueKeyboardEvent(ephyrKbd, key, TRUE); /* release */ - - if (--count == 0) - break; - } - } - - /* Modifier shoud be down, but isn't */ - if (!(keyc->state & mask) && (state & mask)) - for (key = 0; key < MAP_LENGTH; key++) - if (keyc->xkbInfo->desc->map->modmap[key] & mask) - { - if (keyc->xkbInfo->desc->map->modmap[key] & mask && ephyrKbd && - ((EphyrKbdPrivate *)ephyrKbd->driverPrivate)->enabled) - KdEnqueueKeyboardEvent(ephyrKbd, key, FALSE); /* press */ - break; - } + for (i = 0, mask = 1; i < 8; i++, mask <<= 1) { + int key; + + /* Modifier is down, but shouldn't be + */ + if ((xkb_state & mask) && !(state & mask)) { + int count = keyc->modifierKeyCount[i]; + + for (key = 0; key < MAP_LENGTH; key++) + if (keyc->xkbInfo->desc->map->modmap[key] & mask) { + if (key_is_down(pDev, key, KEY_PROCESSED)) + KdEnqueueKeyboardEvent (ephyrKbd, key, TRUE); + + if (--count == 0) + break; + } } -#endif + + /* Modifier shoud be down, but isn't + */ + if (!(xkb_state & mask) && (state & mask)) + for (key = 0; key < MAP_LENGTH; key++) + if (keyc->xkbInfo->desc->map->modmap[key] & mask) { + KdEnqueueKeyboardEvent (ephyrKbd, key, FALSE); + break; + } + } } static void @@ -897,10 +873,10 @@ ephyrExposePairedWindow (int a_remote) return; } screen = pair->local->drawable.pScreen; - REGION_NULL (screen, ®); - REGION_COPY (screen, ®, &pair->local->clipList); + RegionNull(®); + RegionCopy(®, &pair->local->clipList); screen->WindowExposures (pair->local, ®, NullRegion); - REGION_UNINIT (screen, ®); + RegionUninit(®); } #endif /* XF86DRI */ @@ -998,6 +974,7 @@ ephyrPoll(void) if (!ephyrKbd || !((EphyrKbdPrivate *)ephyrKbd->driverPrivate)->enabled) continue; + ephyrUpdateModifierState(ev.key_state); KdEnqueueKeyboardEvent (ephyrKbd, ev.data.key_up.scancode, TRUE); break; @@ -1023,7 +1000,7 @@ void ephyrCardFini (KdCardInfo *card) { EphyrPriv *priv = card->driver; - xfree (priv); + free(priv); } void @@ -1075,11 +1052,11 @@ static Status MouseInit (KdPointerInfo *pi) { pi->driverPrivate = (EphyrPointerPrivate *) - xcalloc(sizeof(EphyrPointerPrivate), 1); + calloc(sizeof(EphyrPointerPrivate), 1); ((EphyrPointerPrivate *)pi->driverPrivate)->enabled = FALSE; pi->nAxes = 3; pi->nButtons = 32; - xfree(pi->name); + free(pi->name); pi->name = strdup("Xephyr virtual mouse"); ephyrMouse = pi; return Success; @@ -1121,7 +1098,7 @@ static Status EphyrKeyboardInit (KdKeyboardInfo *ki) { ki->driverPrivate = (EphyrKbdPrivate *) - xcalloc(sizeof(EphyrKbdPrivate), 1); + calloc(sizeof(EphyrKbdPrivate), 1); hostx_load_keymap(); if (!ephyrKeySyms.map) { ErrorF("Couldn't load keymap from host\n"); @@ -1129,7 +1106,7 @@ EphyrKeyboardInit (KdKeyboardInfo *ki) } ki->minScanCode = ephyrKeySyms.minKeyCode; ki->maxScanCode = ephyrKeySyms.maxKeyCode; - xfree(ki->name); + free(ki->name); ki->name = strdup("Xephyr virtual keyboard"); ephyrKbd = ki; return Success; diff --git a/xserver/hw/kdrive/ephyr/ephyr_draw.c b/xserver/hw/kdrive/ephyr/ephyr_draw.c index f9fac8007..b1982a5e6 100644 --- a/xserver/hw/kdrive/ephyr/ephyr_draw.c +++ b/xserver/hw/kdrive/ephyr/ephyr_draw.c @@ -97,18 +97,17 @@ ephyrPrepareSolid(PixmapPtr pPix, int alu, Pixel pm, Pixel fg) KdScreenInfo *screen = pScreenPriv->screen; EphyrScrPriv *scrpriv = screen->driver; EphyrFakexaPriv *fakexa = scrpriv->fakexa; - CARD32 tmpval[3]; + ChangeGCVal tmpval[3]; ephyrPreparePipelinedAccess(pPix, EXA_PREPARE_DEST); fakexa->pDst = pPix; fakexa->pGC = GetScratchGC(pPix->drawable.depth, pScreen); - tmpval[0] = alu; - tmpval[1] = pm; - tmpval[2] = fg; - ChangeGC(fakexa->pGC, GCFunction | GCPlaneMask | GCForeground, - tmpval); + tmpval[0].val = alu; + tmpval[1].val = pm; + tmpval[2].val = fg; + ChangeGC(NullClient, fakexa->pGC, GCFunction | GCPlaneMask | GCForeground, tmpval); ValidateGC(&pPix->drawable, fakexa->pGC); @@ -162,7 +161,7 @@ ephyrPrepareCopy(PixmapPtr pSrc, PixmapPtr pDst, int dx, int dy, int alu, KdScreenInfo *screen = pScreenPriv->screen; EphyrScrPriv *scrpriv = screen->driver; EphyrFakexaPriv *fakexa = scrpriv->fakexa; - CARD32 tmpval[2]; + ChangeGCVal tmpval[2]; ephyrPreparePipelinedAccess(pDst, EXA_PREPARE_DEST); ephyrPreparePipelinedAccess(pSrc, EXA_PREPARE_SRC); @@ -171,9 +170,9 @@ ephyrPrepareCopy(PixmapPtr pSrc, PixmapPtr pDst, int dx, int dy, int alu, fakexa->pDst = pDst; fakexa->pGC = GetScratchGC(pDst->drawable.depth, pScreen); - tmpval[0] = alu; - tmpval[1] = pm; - ChangeGC (fakexa->pGC, GCFunction | GCPlaneMask, tmpval); + tmpval[0].val = alu; + tmpval[1].val = pm; + ChangeGC (NullClient, fakexa->pGC, GCFunction | GCPlaneMask, tmpval); ValidateGC(&pDst->drawable, fakexa->pGC); @@ -432,13 +431,13 @@ ephyrDrawInit(ScreenPtr pScreen) EphyrFakexaPriv *fakexa; Bool success; - fakexa = xcalloc(1, sizeof(*fakexa)); + fakexa = calloc(1, sizeof(*fakexa)); if (fakexa == NULL) return FALSE; fakexa->exa = exaDriverAlloc(); if (fakexa->exa == NULL) { - xfree(fakexa); + free(fakexa); return FALSE; } @@ -487,8 +486,8 @@ ephyrDrawInit(ScreenPtr pScreen) scrpriv->fakexa = fakexa; } else { ErrorF("Failed to initialize EXA\n"); - xfree(fakexa->exa); - xfree(fakexa); + free(fakexa->exa); + free(fakexa); } return success; diff --git a/xserver/hw/kdrive/ephyr/ephyrdriext.c b/xserver/hw/kdrive/ephyr/ephyrdriext.c index 5f5fd3bff..ce584b051 100644 --- a/xserver/hw/kdrive/ephyr/ephyrdriext.c +++ b/xserver/hw/kdrive/ephyr/ephyrdriext.c @@ -109,10 +109,10 @@ static Bool findWindowPairFromLocal (WindowPtr a_local, static unsigned char DRIReqCode = 0; -static int ephyrDRIWindowKeyIndex; -static DevPrivateKey ephyrDRIWindowKey = &ephyrDRIWindowKeyIndex; -static int ephyrDRIScreenKeyIndex; -static DevPrivateKey ephyrDRIScreenKey = &ephyrDRIScreenKeyIndex; +static DevPrivateKeyRec ephyrDRIWindowKeyRec; +#define ephyrDRIWindowKey (&ephyrDRIWindowKeyRec) +static DevPrivateKeyRec ephyrDRIScreenKeyRec; +#define ephyrDRIScreenKey (&ephyrDRIScreenKeyRec) #define GET_EPHYR_DRI_WINDOW_PRIV(win) ((EphyrDRIWindowPrivPtr) \ dixLookupPrivate(&(win)->devPrivates, ephyrDRIWindowKey)) @@ -160,7 +160,7 @@ ephyrDRIExtensionInit (ScreenPtr a_screen) EPHYR_LOG_ERROR ("failed to register DRI extension\n") ; goto out ; } - screen_priv = xcalloc (1, sizeof (EphyrDRIScreenPrivRec)) ; + screen_priv = calloc(1, sizeof (EphyrDRIScreenPrivRec)) ; if (!screen_priv) { EPHYR_LOG_ERROR ("failed to allocate screen_priv\n") ; goto out ; @@ -258,7 +258,7 @@ ephyrDRIDestroyWindow (WindowPtr a_win) EphyrDRIWindowPrivPtr win_priv=GET_EPHYR_DRI_WINDOW_PRIV (a_win) ; if (win_priv) { destroyHostPeerWindow (a_win) ; - xfree (win_priv) ; + free(win_priv) ; dixSetPrivate(&a_win->devPrivates, ephyrDRIWindowKey, NULL); EPHYR_LOG ("destroyed the remote peer window\n") ; } @@ -418,11 +418,11 @@ ephyrDRIClipNotify (WindowPtr a_win, EPHYR_LOG_ERROR ("failed to get window pair\n") ; goto out ; } - rects = xcalloc (REGION_NUM_RECTS (&a_win->clipList), + rects = calloc(RegionNumRects (&a_win->clipList), sizeof (EphyrRect)) ; - for (i=0; i < REGION_NUM_RECTS (&a_win->clipList); i++) { + for (i=0; i < RegionNumRects (&a_win->clipList); i++) { memmove (&rects[i], - ®ION_RECTS (&a_win->clipList)[i], + &RegionRects (&a_win->clipList)[i], sizeof (EphyrRect)) ; rects[i].x1 -= a_win->drawable.x; rects[i].x2 -= a_win->drawable.x; @@ -436,11 +436,11 @@ ephyrDRIClipNotify (WindowPtr a_win, is_ok = hostx_set_window_bounding_rectangles (pair->remote, rects, - REGION_NUM_RECTS (&a_win->clipList)) ; + RegionNumRects (&a_win->clipList)) ; is_ok = TRUE ; out: - xfree (rects) ; + free(rects) ; rects = NULL ; EPHYR_LOG ("leave. is_ok:%d\n", is_ok) ; @@ -511,7 +511,7 @@ EphyrDuplicateVisual (unsigned int a_screen, /* * be prepare to extend screen->visuals to add new_visual to it */ - new_visuals = xcalloc (screen->numVisuals+1, sizeof (VisualRec)) ; + new_visuals = calloc(screen->numVisuals+1, sizeof (VisualRec)) ; memmove (new_visuals, screen->visuals, screen->numVisuals*sizeof (VisualRec)) ; @@ -535,7 +535,7 @@ EphyrDuplicateVisual (unsigned int a_screen, * extend the list of visual IDs in that entry, * so to add a_new_id in there. */ - vids = xrealloc (cur_depth->vids, + vids = realloc(cur_depth->vids, (cur_depth->numVids+1)*sizeof (VisualID)); if (!vids) { EPHYR_LOG_ERROR ("failed to realloc numids\n") ; @@ -558,14 +558,14 @@ EphyrDuplicateVisual (unsigned int a_screen, /* * Commit our change to screen->visuals */ - xfree (screen->visuals) ; + free(screen->visuals) ; screen->visuals = new_visuals ; screen->numVisuals++ ; new_visuals = NULL ; is_ok = TRUE ; out: - xfree (new_visuals) ; + free(new_visuals) ; new_visuals = NULL ; EPHYR_LOG ("leave\n") ; @@ -636,7 +636,7 @@ ProcXF86DRIQueryVersion (register ClientPtr client) } WriteToClient(client, sizeof(xXF86DRIQueryVersionReply), (char *)&rep); EPHYR_LOG ("leave\n") ; - return (client->noClientException); + return Success; } static int @@ -674,7 +674,7 @@ ProcXF86DRIQueryDirectRenderingCapable (register ClientPtr client) WriteToClient(client, sizeof(xXF86DRIQueryDirectRenderingCapableReply), (char *)&rep); EPHYR_LOG ("leave\n") ; - return (client->noClientException); + return Success; } static int @@ -682,7 +682,7 @@ ProcXF86DRIOpenConnection (register ClientPtr client) { xXF86DRIOpenConnectionReply rep; drm_handle_t hSAREA; - char* busIdString; + char* busIdString = NULL; REQUEST(xXF86DRIOpenConnectionReq); REQUEST_SIZE_MATCH(xXF86DRIOpenConnectionReq); @@ -716,8 +716,9 @@ ProcXF86DRIOpenConnection (register ClientPtr client) WriteToClient(client, sizeof(xXF86DRIOpenConnectionReply), (char *)&rep); if (rep.busIdStringLength) WriteToClient(client, rep.busIdStringLength, busIdString); + free(busIdString); EPHYR_LOG ("leave\n") ; - return (client->noClientException); + return Success; } static int @@ -744,7 +745,7 @@ ProcXF86DRIAuthConnection (register ClientPtr client) } WriteToClient(client, sizeof(xXF86DRIAuthConnectionReply), (char *)&rep); EPHYR_LOG ("leave\n") ; - return (client->noClientException); + return Success; } static int @@ -763,7 +764,7 @@ ProcXF86DRICloseConnection (register ClientPtr client) */ EPHYR_LOG ("leave\n") ; - return (client->noClientException); + return Success; } static int @@ -802,7 +803,7 @@ ProcXF86DRIGetClientDriverName (register ClientPtr client) rep.clientDriverNameLength, clientDriverName); EPHYR_LOG ("leave\n") ; - return (client->noClientException); + return Success; } static int @@ -848,7 +849,7 @@ ProcXF86DRICreateContext (register ClientPtr client) WriteToClient(client, sizeof(xXF86DRICreateContextReply), (char *)&rep); EPHYR_LOG ("leave\n") ; - return (client->noClientException); + return Success; } static int @@ -868,7 +869,7 @@ ProcXF86DRIDestroyContext (register ClientPtr client) } EPHYR_LOG ("leave\n") ; - return (client->noClientException); + return Success; } static Bool @@ -1067,7 +1068,7 @@ ProcXF86DRICreateDrawable (ClientPtr client) win_priv = GET_EPHYR_DRI_WINDOW_PRIV (window) ; if (!win_priv) { - win_priv = xcalloc (1, sizeof (EphyrDRIWindowPrivRec)) ; + win_priv = calloc(1, sizeof (EphyrDRIWindowPrivRec)) ; if (!win_priv) { EPHYR_LOG_ERROR ("failed to allocate window private\n") ; return BadAlloc ; @@ -1079,7 +1080,7 @@ ProcXF86DRICreateDrawable (ClientPtr client) WriteToClient(client, sizeof(xXF86DRICreateDrawableReply), (char *)&rep); EPHYR_LOG ("leave\n") ; - return (client->noClientException); + return Success; } static int @@ -1123,7 +1124,7 @@ ProcXF86DRIDestroyDrawable (register ClientPtr client) pair->remote=0; EPHYR_LOG ("leave\n") ; - return (client->noClientException); + return Success; } static int @@ -1168,12 +1169,12 @@ ProcXF86DRIGetDrawableInfo (register ClientPtr client) return BadMatch ; } EPHYR_LOG ("clip list of xephyr gl drawable:\n") ; - for (i=0; i < REGION_NUM_RECTS (&window->clipList); i++) { + for (i=0; i < RegionNumRects (&window->clipList); i++) { EPHYR_LOG ("x1:%d, y1:%d, x2:%d, y2:%d\n", - REGION_RECTS (&window->clipList)[i].x1, - REGION_RECTS (&window->clipList)[i].y1, - REGION_RECTS (&window->clipList)[i].x2, - REGION_RECTS (&window->clipList)[i].y2) ; + RegionRects (&window->clipList)[i].x1, + RegionRects (&window->clipList)[i].y1, + RegionRects (&window->clipList)[i].x2, + RegionRects (&window->clipList)[i].y2) ; } if (!ephyrDRIGetDrawableInfo (stuff->screen, @@ -1252,12 +1253,12 @@ ProcXF86DRIGetDrawableInfo (register ClientPtr client) sizeof(drm_clip_rect_t) * rep.numBackClipRects, (char *)backClipRects); } - xfree(clipRects); + free(clipRects); clipRects = NULL ; EPHYR_LOG ("leave\n") ; - return (client->noClientException); + return Success; } static int @@ -1308,7 +1309,7 @@ ProcXF86DRIGetDeviceInfo (register ClientPtr client) WriteToClient(client, rep.devPrivateSize, (char *)pDevPrivate); } EPHYR_LOG ("leave\n") ; - return (client->noClientException); + return Success; } static int diff --git a/xserver/hw/kdrive/ephyr/ephyrglxext.c b/xserver/hw/kdrive/ephyr/ephyrglxext.c index a0278cc2b..dfc43e1d1 100644 --- a/xserver/hw/kdrive/ephyr/ephyrglxext.c +++ b/xserver/hw/kdrive/ephyr/ephyrglxext.c @@ -243,7 +243,7 @@ ephyrGLXGetVisualConfigsReal (__GLXclientState *a_cl, out: EPHYR_LOG ("leave\n") ; - xfree (props_buf) ; + free(props_buf) ; props_buf = NULL ; return res ; @@ -300,7 +300,7 @@ ephyrGLXGetFBConfigsSGIXReal (__GLXclientState *a_cl, out: EPHYR_LOG ("leave\n") ; - xfree (props_buf) ; + free(props_buf) ; props_buf = NULL ; return res ; @@ -375,7 +375,7 @@ ephyrGLXQueryServerString(__GLXclientState *a_cl, GLbyte *a_pc) reply.sequenceNumber = client->sequence ; reply.length = __GLX_PAD (length) >> 2 ; reply.n = length ; - buf = xcalloc (reply.length << 2, 1); + buf = calloc(reply.length << 2, 1); if (!buf) { EPHYR_LOG_ERROR ("failed to allocate string\n;"); return BadAlloc; @@ -389,10 +389,10 @@ ephyrGLXQueryServerString(__GLXclientState *a_cl, GLbyte *a_pc) out: EPHYR_LOG ("leave\n") ; - xfree (server_string) ; + free(server_string) ; server_string = NULL; - xfree (buf); + free(buf); buf = NULL; return res ; diff --git a/xserver/hw/kdrive/ephyr/ephyrhostvideo.c b/xserver/hw/kdrive/ephyr/ephyrhostvideo.c index f4a1b9d17..600b50f74 100644 --- a/xserver/hw/kdrive/ephyr/ephyrhostvideo.c +++ b/xserver/hw/kdrive/ephyr/ephyrhostvideo.c @@ -262,7 +262,7 @@ ephyrHostXVQueryAdaptors (EphyrHostXVAdaptorArray **a_adaptors) EPHYR_LOG ("enter\n") ; - result = Xcalloc (1, sizeof (EphyrHostXVAdaptorArray)) ; + result = calloc (1, sizeof (EphyrHostXVAdaptorArray)) ; if (!result) goto out ; @@ -340,7 +340,7 @@ ephyrHostXVAdaptorGetVideoFormats (const EphyrHostXVAdaptor *a_this, EPHYR_RETURN_VAL_IF_FAIL (a_this, NULL) ; nb_formats = ((XvAdaptorInfo*)a_this)->num_formats ; - formats = Xcalloc (nb_formats, sizeof (EphyrHostVideoFormat)) ; + formats = calloc (nb_formats, sizeof (EphyrHostVideoFormat)) ; for (i=0; i < nb_formats; i++) { memset (&visual_info_template, 0, sizeof (visual_info_template)) ; visual_info_template.visualid = @@ -380,7 +380,8 @@ ephyrHostXVAdaptorHasPutVideo (const EphyrHostXVAdaptor *a_this, { EPHYR_RETURN_VAL_IF_FAIL (a_this && a_result, FALSE) ; - if (((XvAdaptorInfo*)a_this)->type & XvVideoMask & XvInputMask) + if ((((XvAdaptorInfo*)a_this)->type & (XvVideoMask | XvInputMask)) == + (XvVideoMask | XvInputMask)) *a_result = TRUE ; else *a_result = FALSE ; @@ -391,7 +392,8 @@ Bool ephyrHostXVAdaptorHasGetVideo (const EphyrHostXVAdaptor *a_this, Bool *a_result) { - if (((XvAdaptorInfo*)a_this)->type & XvVideoMask & XvOutputMask) + if ((((XvAdaptorInfo*)a_this)->type & (XvVideoMask | XvOutputMask)) == + (XvVideoMask | XvOutputMask)) *a_result = TRUE ; else *a_result = FALSE ; @@ -404,7 +406,8 @@ ephyrHostXVAdaptorHasPutStill (const EphyrHostXVAdaptor *a_this, { EPHYR_RETURN_VAL_IF_FAIL (a_this && a_result, FALSE) ; - if (((XvAdaptorInfo*)a_this)->type & XvStillMask && XvInputMask) + if ((((XvAdaptorInfo*)a_this)->type & (XvStillMask | XvInputMask)) == + (XvStillMask | XvInputMask)) *a_result = TRUE ; else *a_result = FALSE ; @@ -417,7 +420,8 @@ ephyrHostXVAdaptorHasGetStill (const EphyrHostXVAdaptor *a_this, { EPHYR_RETURN_VAL_IF_FAIL (a_this && a_result, FALSE) ; - if (((XvAdaptorInfo*)a_this)->type & XvStillMask && XvOutputMask) + if ((((XvAdaptorInfo*)a_this)->type & (XvStillMask | XvOutputMask)) == + (XvStillMask | XvOutputMask)) *a_result = TRUE ; else *a_result = FALSE ; @@ -430,7 +434,8 @@ ephyrHostXVAdaptorHasPutImage (const EphyrHostXVAdaptor *a_this, { EPHYR_RETURN_VAL_IF_FAIL (a_this && a_result, FALSE) ; - if (((XvAdaptorInfo*)a_this)->type & XvImageMask && XvInputMask) + if ((((XvAdaptorInfo*)a_this)->type & (XvImageMask | XvInputMask)) == + (XvImageMask | XvInputMask)) *a_result = TRUE ; else *a_result = FALSE ; @@ -454,7 +459,7 @@ ephyrHostXVQueryEncodings (int a_port_id, &num_encodings, &encoding_info) ; if (num_encodings && encoding_info) { - encodings = Xcalloc (num_encodings, sizeof (EphyrHostEncoding)) ; + encodings = calloc (num_encodings, sizeof (EphyrHostEncoding)) ; for (i=0; ihost_adaptors) ; a_this->host_adaptors = NULL ; } - xfree (a_this->adaptors) ; + free(a_this->adaptors) ; a_this->adaptors = NULL ; - xfree (a_this) ; + free(a_this) ; EPHYR_LOG ("leave\n") ; } @@ -386,7 +386,7 @@ videoEncodingDup (EphyrHostEncoding *a_encodings, EPHYR_RETURN_VAL_IF_FAIL (a_encodings && a_num_encodings, NULL) ; - result = xcalloc (a_num_encodings, sizeof (KdVideoEncodingRec)) ; + result = calloc(a_num_encodings, sizeof (KdVideoEncodingRec)) ; for (i=0 ; i < a_num_encodings; i++) { result[i].id = a_encodings[i].id ; result[i].name = strdup (a_encodings[i].name) ; @@ -407,7 +407,7 @@ portAttributesDup (EphyrHostAttribute *a_encodings, EPHYR_RETURN_VAL_IF_FAIL (a_encodings && a_num_encodings, NULL) ; - result = xcalloc (a_num_encodings, sizeof (KdAttributeRec)) ; + result = calloc(a_num_encodings, sizeof (KdAttributeRec)) ; if (!result) { EPHYR_LOG_ERROR ("failed to allocate attributes\n") ; return NULL ; @@ -455,7 +455,7 @@ ephyrXVPrivQueryHostAdaptors (EphyrXVPriv *a_this) * copy what we can from adaptors into a_this->adaptors */ if (a_this->num_adaptors) { - a_this->adaptors = xcalloc (a_this->num_adaptors, + a_this->adaptors = calloc(a_this->num_adaptors, sizeof (KdVideoAdaptorRec)) ; if (!a_this->adaptors) { EPHYR_LOG_ERROR ("failed to create internal adaptors\n") ; @@ -513,7 +513,7 @@ ephyrXVPrivQueryHostAdaptors (EphyrXVPriv *a_this) ephyrHostXVAdaptorGetNbPorts (cur_host_adaptor) ; */ a_this->adaptors[i].pPortPrivates = - xcalloc (a_this->adaptors[i].nPorts, + calloc(a_this->adaptors[i].nPorts, sizeof (DevUnion) + sizeof (EphyrPortPriv)) ; port_priv_offset = a_this->adaptors[i].nPorts; for (j=0; j < a_this->adaptors[i].nPorts; j++) { @@ -656,7 +656,7 @@ ephyrXVPrivRegisterAdaptors (EphyrXVPriv *a_this, KdXVListGenericAdaptors (screen, ®istered_adaptors); num_adaptors = num_registered_adaptors + a_this->num_adaptors ; - adaptors = xcalloc (num_adaptors, sizeof (KdVideoAdaptorPtr)) ; + adaptors = calloc(num_adaptors, sizeof (KdVideoAdaptorPtr)) ; if (!adaptors) { EPHYR_LOG_ERROR ("failed to allocate adaptors tab\n") ; goto out ; @@ -673,9 +673,9 @@ ephyrXVPrivRegisterAdaptors (EphyrXVPriv *a_this, is_ok = TRUE ; out: - xfree (registered_adaptors) ; + free(registered_adaptors) ; registered_adaptors = NULL ; - xfree (adaptors) ; + free(adaptors) ; adaptors = NULL ; EPHYR_LOG ("leave\n") ; @@ -946,8 +946,8 @@ ephyrPutImage (KdScreenInfo *a_info, a_drw_x, a_drw_y, a_drw_w, a_drw_h, a_src_x, a_src_y, a_src_w, a_src_h, a_width, a_height, a_buf, - (EphyrHostBox*)REGION_RECTS (a_clipping_region), - REGION_NUM_RECTS (a_clipping_region))) { + (EphyrHostBox*)RegionRects (a_clipping_region), + RegionNumRects (a_clipping_region))) { EPHYR_LOG_ERROR ("EphyrHostXVPutImage() failed\n") ; goto out ; } @@ -1025,8 +1025,8 @@ ephyrReputImage (KdScreenInfo *a_info, port_priv->src_w, port_priv->src_h, port_priv->image_width, port_priv->image_height, port_priv->image_buf, - (EphyrHostBox*)REGION_RECTS (a_clipping_region), - REGION_NUM_RECTS (a_clipping_region))) { + (EphyrHostBox*)RegionRects (a_clipping_region), + RegionNumRects (a_clipping_region))) { EPHYR_LOG_ERROR ("ephyrHostXVPutImage() failed\n") ; goto out ; } @@ -1064,7 +1064,7 @@ ephyrPutVideo (KdScreenInfo *a_info, dst_box.y2 = a_drw_y + a_drw_h; if (!DoSimpleClip (&dst_box, - REGION_EXTENTS (pScreen->pScreen, a_clipping_region), + RegionExtents(a_clipping_region), &clipped_area)) { EPHYR_LOG_ERROR ("failed to simple clip\n") ; goto out ; @@ -1115,7 +1115,7 @@ ephyrGetVideo (KdScreenInfo *a_info, dst_box.y2 = a_drw_y + a_drw_h; if (!DoSimpleClip (&dst_box, - REGION_EXTENTS (pScreen->pScreen, a_clipping_region), + RegionExtents(a_clipping_region), &clipped_area)) { EPHYR_LOG_ERROR ("failed to simple clip\n") ; goto out ; @@ -1166,7 +1166,7 @@ ephyrPutStill (KdScreenInfo *a_info, dst_box.y2 = a_drw_y + a_drw_h; if (!DoSimpleClip (&dst_box, - REGION_EXTENTS (pScreen->pScreen, a_clipping_region), + RegionExtents(a_clipping_region), &clipped_area)) { EPHYR_LOG_ERROR ("failed to simple clip\n") ; goto out ; @@ -1217,7 +1217,7 @@ ephyrGetStill (KdScreenInfo *a_info, dst_box.y2 = a_drw_y + a_drw_h; if (!DoSimpleClip (&dst_box, - REGION_EXTENTS (pScreen->pScreen, a_clipping_region), + RegionExtents(a_clipping_region), &clipped_area)) { EPHYR_LOG_ERROR ("failed to simple clip\n") ; goto out ; diff --git a/xserver/hw/kdrive/ephyr/hostx.c b/xserver/hw/kdrive/ephyr/hostx.c index d546370ba..2ebeca958 100644 --- a/xserver/hw/kdrive/ephyr/hostx.c +++ b/xserver/hw/kdrive/ephyr/hostx.c @@ -532,7 +532,7 @@ hostx_get_server_depth (EphyrScreenInfo screen) { struct EphyrHostScreen *host_screen = host_screen_from_screen_info (screen); - return (host_screen ? host_screen->server_depth : 0); + return host_screen ? host_screen->server_depth : 0; } void @@ -669,11 +669,8 @@ hostx_screen_init (EphyrScreenInfo screen, } else { - if (host_screen->ximg->data) - { - free(host_screen->ximg->data); - host_screen->ximg->data = NULL; - } + free(host_screen->ximg->data); + host_screen->ximg->data = NULL; XDestroyImage(host_screen->ximg); } @@ -1160,10 +1157,8 @@ out: XFree (visuals) ; visuals = NULL; } - if (host_visuals) { - free (host_visuals) ; - host_visuals = NULL; - } + free(host_visuals); + host_visuals = NULL; EPHYR_LOG ("leave\n") ; return is_ok ; @@ -1292,10 +1287,8 @@ hostx_set_window_bounding_rectangles (int a_window, rects, a_num_rects, ShapeSet, YXBanded) ; is_ok = TRUE ; - if (rects) { - free (rects) ; - rects = NULL ; - } + free(rects); + rects = NULL; EPHYR_LOG ("leave\n") ; return is_ok; } @@ -1329,10 +1322,8 @@ hostx_set_window_clipping_rectangles (int a_window, rects, a_num_rects, ShapeSet, YXBanded) ; is_ok = TRUE ; - if (rects) { - free (rects) ; - rects = NULL ; - } + free(rects); + rects = NULL; EPHYR_LOG ("leave\n") ; return is_ok; } diff --git a/xserver/hw/kdrive/fake/Makefile.in b/xserver/hw/kdrive/fake/Makefile.in index eb1df4be7..8bde9143c 100644 --- a/xserver/hw/kdrive/fake/Makefile.in +++ b/xserver/hw/kdrive/fake/Makefile.in @@ -114,10 +114,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -205,6 +201,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -219,6 +217,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -236,10 +235,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -295,10 +298,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -316,17 +320,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -353,20 +351,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -458,6 +459,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/kdrive/fake/fake.c b/xserver/hw/kdrive/fake/fake.c index 809e309a6..b8306db0a 100644 --- a/xserver/hw/kdrive/fake/fake.c +++ b/xserver/hw/kdrive/fake/fake.c @@ -40,13 +40,13 @@ fakeCardInit (KdCardInfo *card) { FakePriv *priv; - priv = (FakePriv *) xalloc (sizeof (FakePriv)); + priv = (FakePriv *) malloc(sizeof (FakePriv)); if (!priv) return FALSE; if (!fakeInitialize (card, priv)) { - xfree (priv); + free(priv); return FALSE; } card->driver = priv; @@ -121,14 +121,14 @@ fakeScreenInit (KdScreenInfo *screen) { FakeScrPriv *scrpriv; - scrpriv = xcalloc (1, sizeof (FakeScrPriv)); + scrpriv = calloc(1, sizeof (FakeScrPriv)); if (!scrpriv) return FALSE; screen->driver = scrpriv; if (!fakeScreenInitialize (screen, scrpriv)) { screen->driver = 0; - xfree (scrpriv); + free(scrpriv); return FALSE; } return TRUE; @@ -168,8 +168,7 @@ fakeMapFramebuffer (KdScreenInfo *screen) KdSetPointerMatrix (&m); priv->bytes_per_line = ((screen->width * screen->fb.bitsPerPixel + 31) >> 5) << 2; - if (priv->base) - free (priv->base); + free(priv->base); priv->base = malloc (priv->bytes_per_line * screen->height); if (scrpriv->shadow) @@ -455,7 +454,7 @@ fakeCardFini (KdCardInfo *card) FakePriv *priv = card->driver; free (priv->base); - xfree (priv); + free(priv); } void diff --git a/xserver/hw/kdrive/fbdev/Makefile.in b/xserver/hw/kdrive/fbdev/Makefile.in index e0e21cfa7..d28db0995 100644 --- a/xserver/hw/kdrive/fbdev/Makefile.in +++ b/xserver/hw/kdrive/fbdev/Makefile.in @@ -115,10 +115,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -206,6 +202,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -220,6 +218,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -237,10 +236,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -296,10 +299,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -317,17 +321,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -354,20 +352,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -459,6 +460,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/kdrive/fbdev/fbdev.c b/xserver/hw/kdrive/fbdev/fbdev.c index d4604ad29..2c7fa91ad 100644 --- a/xserver/hw/kdrive/fbdev/fbdev.c +++ b/xserver/hw/kdrive/fbdev/fbdev.c @@ -84,13 +84,13 @@ fbdevCardInit (KdCardInfo *card) { FbdevPriv *priv; - priv = (FbdevPriv *) xalloc (sizeof (FbdevPriv)); + priv = (FbdevPriv *) malloc(sizeof (FbdevPriv)); if (!priv) return FALSE; if (!fbdevInitialize (card, priv)) { - xfree (priv); + free(priv); return FALSE; } card->driver = priv; @@ -296,14 +296,14 @@ fbdevScreenInit (KdScreenInfo *screen) { FbdevScrPriv *scrpriv; - scrpriv = xcalloc (1, sizeof (FbdevScrPriv)); + scrpriv = calloc(1, sizeof (FbdevScrPriv)); if (!scrpriv) return FALSE; screen->driver = scrpriv; if (!fbdevScreenInitialize (screen, scrpriv)) { screen->driver = 0; - xfree (scrpriv); + free(scrpriv); return FALSE; } return TRUE; @@ -594,7 +594,7 @@ fbdevCreateColormap (ColormapPtr pmap) case FB_VISUAL_STATIC_PSEUDOCOLOR: pVisual = pmap->pVisual; nent = pVisual->ColormapEntries; - pdefs = xalloc (nent * sizeof (xColorItem)); + pdefs = malloc(nent * sizeof (xColorItem)); if (!pdefs) return FALSE; for (i = 0; i < nent; i++) @@ -606,7 +606,7 @@ fbdevCreateColormap (ColormapPtr pmap) pmap->red[i].co.local.green = pdefs[i].green; pmap->red[i].co.local.blue = pdefs[i].blue; } - xfree (pdefs); + free(pdefs); return TRUE; default: return fbInitializeColormap (pmap); @@ -749,7 +749,7 @@ fbdevCardFini (KdCardInfo *card) munmap (priv->fb_base, priv->fix.smem_len); close (priv->fd); - xfree (priv); + free(priv); } /* diff --git a/xserver/hw/kdrive/linux/Makefile.in b/xserver/hw/kdrive/linux/Makefile.in index fba4bc3a0..75ae40df6 100644 --- a/xserver/hw/kdrive/linux/Makefile.in +++ b/xserver/hw/kdrive/linux/Makefile.in @@ -118,10 +118,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -209,6 +205,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -223,6 +221,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -240,10 +239,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -299,10 +302,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -320,17 +324,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -357,20 +355,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -462,6 +463,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/kdrive/linux/evdev.c b/xserver/hw/kdrive/linux/evdev.c index 0e4c9f735..3797f0926 100644 --- a/xserver/hw/kdrive/linux/evdev.c +++ b/xserver/hw/kdrive/linux/evdev.c @@ -252,7 +252,7 @@ EvdevPtrEnable (KdPointerInfo *pi) close (fd); return BadMatch; } - ke = xcalloc (1, sizeof (Kevdev)); + ke = calloc(1, sizeof (Kevdev)); if (!ke) { close (fd); @@ -264,7 +264,7 @@ EvdevPtrEnable (KdPointerInfo *pi) ke->keybits) < 0) { perror ("EVIOCGBIT EV_KEY"); - xfree (ke); + free(ke); close (fd); return BadMatch; } @@ -275,7 +275,7 @@ EvdevPtrEnable (KdPointerInfo *pi) ke->relbits) < 0) { perror ("EVIOCGBIT EV_REL"); - xfree (ke); + free(ke); close (fd); return BadMatch; } @@ -291,7 +291,7 @@ EvdevPtrEnable (KdPointerInfo *pi) ke->absbits) < 0) { perror ("EVIOCGBIT EV_ABS"); - xfree (ke); + free(ke); close (fd); return BadMatch; } @@ -310,13 +310,13 @@ EvdevPtrEnable (KdPointerInfo *pi) } if (i <= ke->max_abs) { - xfree (ke); + free(ke); close (fd); return BadValue; } } if (!KdRegisterFd (fd, EvdevPtrRead, pi)) { - xfree (ke); + free(ke); close (fd); return BadAlloc; } @@ -341,7 +341,7 @@ EvdevPtrDisable (KdPointerInfo *pi) if (ioctl (ke->fd, EVIOCGRAB, 0) < 0) perror ("Ungrabbing evdev mouse device failed"); - xfree (ke); + free(ke); pi->driverPrivate = 0; } @@ -440,14 +440,14 @@ EvdevKbdEnable (KdKeyboardInfo *ki) return BadMatch; } - ke = xcalloc (1, sizeof (Kevdev)); + ke = calloc(1, sizeof (Kevdev)); if (!ke) { close (fd); return BadAlloc; } if (!KdRegisterFd (fd, EvdevKbdRead, ki)) { - xfree (ke); + free(ke); close (fd); return BadAlloc; } @@ -509,7 +509,7 @@ EvdevKbdDisable (KdKeyboardInfo *ki) if (ioctl (ke->fd, EVIOCGRAB, 0) < 0) perror ("Ungrabbing evdev keyboard device failed"); - xfree (ke); + free(ke); ki->driverPrivate = 0; } diff --git a/xserver/hw/kdrive/linux/keyboard.c b/xserver/hw/kdrive/linux/keyboard.c index 6eed7aed3..e05c5abad 100644 --- a/xserver/hw/kdrive/linux/keyboard.c +++ b/xserver/hw/kdrive/linux/keyboard.c @@ -737,9 +737,9 @@ LinuxKeyboardInit (KdKeyboardInfo *ki) if (!ki) return !Success; - xfree(ki->path); + free(ki->path); ki->path = strdup("console"); - xfree(ki->name); + free(ki->name); ki->name = strdup("Linux console keyboard"); readKernelMapping (ki); diff --git a/xserver/hw/kdrive/linux/mouse.c b/xserver/hw/kdrive/linux/mouse.c index 007263e4b..1db534863 100644 --- a/xserver/hw/kdrive/linux/mouse.c +++ b/xserver/hw/kdrive/linux/mouse.c @@ -958,7 +958,7 @@ MouseInit (KdPointerInfo *pi) close(fd); - km = (Kmouse *) xalloc (sizeof (Kmouse)); + km = (Kmouse *) malloc(sizeof (Kmouse)); if (km) { km->iob.avail = km->iob.used = 0; MouseFirstProtocol(km, pi->protocol ? pi->protocol : "exps/2"); @@ -1016,7 +1016,7 @@ MouseDisable (KdPointerInfo *pi) static void MouseFini (KdPointerInfo *pi) { - xfree (pi->driverPrivate); + free(pi->driverPrivate); pi->driverPrivate = NULL; } diff --git a/xserver/hw/kdrive/linux/tslib.c b/xserver/hw/kdrive/linux/tslib.c index 322ccc7d5..48a084220 100644 --- a/xserver/hw/kdrive/linux/tslib.c +++ b/xserver/hw/kdrive/linux/tslib.c @@ -157,7 +157,7 @@ TslibInit (KdPointerInfo *pi) return !Success; pi->driverPrivate = (struct TslibPrivate *) - xcalloc(sizeof(struct TslibPrivate), 1); + calloc(sizeof(struct TslibPrivate), 1); if (!pi->driverPrivate) return !Success; @@ -175,7 +175,7 @@ TslibInit (KdPointerInfo *pi) static void TslibFini (KdPointerInfo *pi) { - xfree(pi->driverPrivate); + free(pi->driverPrivate); pi->driverPrivate = NULL; } diff --git a/xserver/hw/kdrive/openbsd/Makefile.in b/xserver/hw/kdrive/openbsd/Makefile.in index 38f56c6de..65b5befd3 100644 --- a/xserver/hw/kdrive/openbsd/Makefile.in +++ b/xserver/hw/kdrive/openbsd/Makefile.in @@ -109,10 +109,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -200,6 +196,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -214,6 +212,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -231,10 +230,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -290,10 +293,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -311,17 +315,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -348,20 +346,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -453,6 +454,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/kdrive/openbsd/openbsd.c b/xserver/hw/kdrive/openbsd/openbsd.c index 6fb627bfb..5ba2f3c30 100644 --- a/xserver/hw/kdrive/openbsd/openbsd.c +++ b/xserver/hw/kdrive/openbsd/openbsd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: openbsd.c,v 1.5 2010/07/27 19:02:30 matthieu Exp $ */ +/* $OpenBSD: openbsd.c,v 1.6 2010/12/05 15:36:06 matthieu Exp $ */ /* * Copyright (c) 2007 Matthieu Herrb * diff --git a/xserver/hw/kdrive/sdl/Makefile.in b/xserver/hw/kdrive/sdl/Makefile.in new file mode 100644 index 000000000..2fd6677ba --- /dev/null +++ b/xserver/hw/kdrive/sdl/Makefile.in @@ -0,0 +1,854 @@ +# Makefile.in generated by automake 1.9.6 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005 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@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = ../../.. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +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 = Xsdl$(EXEEXT) +subdir = hw/kdrive/sdl +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ + $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/m4/shave.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ + $(top_builddir)/include/xorg-server.h \ + $(top_builddir)/include/dix-config.h \ + $(top_builddir)/include/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 = +am__installdirs = "$(DESTDIR)$(bindir)" +binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) +PROGRAMS = $(bin_PROGRAMS) +am_Xsdl_OBJECTS = sdl.$(OBJEXT) +Xsdl_OBJECTS = $(am_Xsdl_OBJECTS) +DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include +depcomp = $(SHELL) $(top_srcdir)/depcomp +am__depfiles_maybe = depfiles +COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ + $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ + $(AM_LDFLAGS) $(LDFLAGS) -o $@ +SOURCES = $(Xsdl_SOURCES) +DIST_SOURCES = $(Xsdl_SOURCES) +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@ +AGP_FALSE = @AGP_FALSE@ +AGP_TRUE = @AGP_TRUE@ +AIGLX_FALSE = @AIGLX_FALSE@ +AIGLX_TRUE = @AIGLX_TRUE@ +ALLOCA = @ALLOCA@ +ALPHA_VIDEO_FALSE = @ALPHA_VIDEO_FALSE@ +ALPHA_VIDEO_TRUE = @ALPHA_VIDEO_TRUE@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AM_MAKEFLAGS = @AM_MAKEFLAGS@ +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@ +ARM_VIDEO_FALSE = @ARM_VIDEO_FALSE@ +ARM_VIDEO_TRUE = @ARM_VIDEO_TRUE@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +BASE_FONT_PATH = @BASE_FONT_PATH@ +BSD_APM_FALSE = @BSD_APM_FALSE@ +BSD_APM_TRUE = @BSD_APM_TRUE@ +BSD_KQUEUE_APM_FALSE = @BSD_KQUEUE_APM_FALSE@ +BSD_KQUEUE_APM_TRUE = @BSD_KQUEUE_APM_TRUE@ +BUILDDOCS_FALSE = @BUILDDOCS_FALSE@ +BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ +BUILD_DATE = @BUILD_DATE@ +BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ +BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ +BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ +BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ +BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ +BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ +BUILD_TIME = @BUILD_TIME@ +CC = @CC@ +CCAS = @CCAS@ +CCASFLAGS = @CCASFLAGS@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CHANGELOG_CMD = @CHANGELOG_CMD@ +COMPILEDDEFAULTFONTPATH = @COMPILEDDEFAULTFONTPATH@ +COMPOSITE_FALSE = @COMPOSITE_FALSE@ +COMPOSITE_TRUE = @COMPOSITE_TRUE@ +CONFIG_DBUS_API_FALSE = @CONFIG_DBUS_API_FALSE@ +CONFIG_DBUS_API_TRUE = @CONFIG_DBUS_API_TRUE@ +CONFIG_HAL_FALSE = @CONFIG_HAL_FALSE@ +CONFIG_HAL_TRUE = @CONFIG_HAL_TRUE@ +CONFIG_NEED_DBUS_FALSE = @CONFIG_NEED_DBUS_FALSE@ +CONFIG_NEED_DBUS_TRUE = @CONFIG_NEED_DBUS_TRUE@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CWARNFLAGS = @CWARNFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DARWIN_LIBS = @DARWIN_LIBS@ +DBE_FALSE = @DBE_FALSE@ +DBE_TRUE = @DBE_TRUE@ +DBUS_CFLAGS = @DBUS_CFLAGS@ +DBUS_LIBS = @DBUS_LIBS@ +DEBUG_FALSE = @DEBUG_FALSE@ +DEBUG_TRUE = @DEBUG_TRUE@ +DEFAULT_LIBRARY_PATH = @DEFAULT_LIBRARY_PATH@ +DEFAULT_LOGPREFIX = @DEFAULT_LOGPREFIX@ +DEFAULT_MODULE_PATH = @DEFAULT_MODULE_PATH@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DGA_CFLAGS = @DGA_CFLAGS@ +DGA_FALSE = @DGA_FALSE@ +DGA_LIBS = @DGA_LIBS@ +DGA_TRUE = @DGA_TRUE@ +DIX_CFLAGS = @DIX_CFLAGS@ +DIX_LIB = @DIX_LIB@ +DLLTOOL = @DLLTOOL@ +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@ +DMX_BUILD_LNX_FALSE = @DMX_BUILD_LNX_FALSE@ +DMX_BUILD_LNX_TRUE = @DMX_BUILD_LNX_TRUE@ +DMX_BUILD_USB_FALSE = @DMX_BUILD_USB_FALSE@ +DMX_BUILD_USB_TRUE = @DMX_BUILD_USB_TRUE@ +DMX_FALSE = @DMX_FALSE@ +DMX_TRUE = @DMX_TRUE@ +DOLT_BASH = @DOLT_BASH@ +DPMSExtension_FALSE = @DPMSExtension_FALSE@ +DPMSExtension_TRUE = @DPMSExtension_TRUE@ +DRI2PROTO_CFLAGS = @DRI2PROTO_CFLAGS@ +DRI2PROTO_LIBS = @DRI2PROTO_LIBS@ +DRI2_AIGLX_FALSE = @DRI2_AIGLX_FALSE@ +DRI2_AIGLX_TRUE = @DRI2_AIGLX_TRUE@ +DRI2_FALSE = @DRI2_FALSE@ +DRI2_TRUE = @DRI2_TRUE@ +DRIPROTO_CFLAGS = @DRIPROTO_CFLAGS@ +DRIPROTO_LIBS = @DRIPROTO_LIBS@ +DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ +DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ +DRI_CFLAGS = @DRI_CFLAGS@ +DRI_DRIVER_PATH = @DRI_DRIVER_PATH@ +DRI_FALSE = @DRI_FALSE@ +DRI_LIBS = @DRI_LIBS@ +DRI_TRUE = @DRI_TRUE@ +DSYMUTIL = @DSYMUTIL@ +DTRACE = @DTRACE@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FBDEVHW_FALSE = @FBDEVHW_FALSE@ +FBDEVHW_TRUE = @FBDEVHW_TRUE@ +FC = @FC@ +FFLAGS = @FFLAGS@ +FILE_MAN_DIR = @FILE_MAN_DIR@ +FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ +FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ +FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ +GLIB_CFLAGS = @GLIB_CFLAGS@ +GLIB_LIBS = @GLIB_LIBS@ +GLX_ARCH_DEFINES = @GLX_ARCH_DEFINES@ +GLX_DEFINES = @GLX_DEFINES@ +GLX_FALSE = @GLX_FALSE@ +GLX_TRUE = @GLX_TRUE@ +GL_CFLAGS = @GL_CFLAGS@ +GL_LIBS = @GL_LIBS@ +GREP = @GREP@ +HAL_CFLAGS = @HAL_CFLAGS@ +HAL_LIBS = @HAL_LIBS@ +HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ +HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ +HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ +HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +I386_VIDEO_FALSE = @I386_VIDEO_FALSE@ +I386_VIDEO_TRUE = @I386_VIDEO_TRUE@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_LIBXF86CONFIG_FALSE = @INSTALL_LIBXF86CONFIG_FALSE@ +INSTALL_LIBXF86CONFIG_TRUE = @INSTALL_LIBXF86CONFIG_TRUE@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_SETUID_FALSE = @INSTALL_SETUID_FALSE@ +INSTALL_SETUID_TRUE = @INSTALL_SETUID_TRUE@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +INT10MODULE_FALSE = @INT10MODULE_FALSE@ +INT10MODULE_TRUE = @INT10MODULE_TRUE@ +INT10_STUB_FALSE = @INT10_STUB_FALSE@ +INT10_STUB_TRUE = @INT10_STUB_TRUE@ +INT10_VM86_FALSE = @INT10_VM86_FALSE@ +INT10_VM86_TRUE = @INT10_VM86_TRUE@ +INT10_X86EMU_FALSE = @INT10_X86EMU_FALSE@ +INT10_X86EMU_TRUE = @INT10_X86EMU_TRUE@ +KDRIVEFBDEV_FALSE = @KDRIVEFBDEV_FALSE@ +KDRIVEFBDEV_TRUE = @KDRIVEFBDEV_TRUE@ +KDRIVELINUX_FALSE = @KDRIVELINUX_FALSE@ +KDRIVELINUX_TRUE = @KDRIVELINUX_TRUE@ +KDRIVEVESA_FALSE = @KDRIVEVESA_FALSE@ +KDRIVEVESA_TRUE = @KDRIVEVESA_TRUE@ +KDRIVE_CFLAGS = @KDRIVE_CFLAGS@ +KDRIVE_FALSE = @KDRIVE_FALSE@ +KDRIVE_INCS = @KDRIVE_INCS@ +KDRIVE_LIBS = @KDRIVE_LIBS@ +KDRIVE_LOCAL_LIBS = @KDRIVE_LOCAL_LIBS@ +KDRIVE_PURE_INCS = @KDRIVE_PURE_INCS@ +KDRIVE_PURE_LIBS = @KDRIVE_PURE_LIBS@ +KDRIVE_TRUE = @KDRIVE_TRUE@ +LAUNCHD_ID_PREFIX = @LAUNCHD_ID_PREFIX@ +LDFLAGS = @LDFLAGS@ +LD_EXPORT_SYMBOLS_FLAG = @LD_EXPORT_SYMBOLS_FLAG@ +LEX = @LEX@ +LEXLIB = @LEXLIB@ +LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ +LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ +LIBDRM_LIBS = @LIBDRM_LIBS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIB_MAN_DIR = @LIB_MAN_DIR@ +LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ +LINUXDOC = @LINUXDOC@ +LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ +LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ +LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ +LINUX_IA64_TRUE = @LINUX_IA64_TRUE@ +LNXACPI_FALSE = @LNXACPI_FALSE@ +LNXACPI_TRUE = @LNXACPI_TRUE@ +LNXAPM_FALSE = @LNXAPM_FALSE@ +LNXAPM_TRUE = @LNXAPM_TRUE@ +LN_S = @LN_S@ +LTCOMPILE = @LTCOMPILE@ +LTCXXCOMPILE = @LTCXXCOMPILE@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAIN_LIB = @MAIN_LIB@ +MAKEFLAGS = @MAKEFLAGS@ +MAKEINFO = @MAKEINFO@ +MAKE_HTML = @MAKE_HTML@ +MAKE_PDF = @MAKE_PDF@ +MAKE_PS = @MAKE_PS@ +MAKE_TEXT = @MAKE_TEXT@ +MAN_SUBSTS = @MAN_SUBSTS@ +MISC_MAN_DIR = @MISC_MAN_DIR@ +MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ +MITSHM_FALSE = @MITSHM_FALSE@ +MITSHM_TRUE = @MITSHM_TRUE@ +MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ +MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ +NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ +NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ +NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ +NEED_VSNPRINTF_TRUE = @NEED_VSNPRINTF_TRUE@ +NMEDIT = @NMEDIT@ +OBJC = @OBJC@ +OBJCCLD = @OBJCCLD@ +OBJCDEPMODE = @OBJCDEPMODE@ +OBJCFLAGS = @OBJCFLAGS@ +OBJCLINK = @OBJCLINK@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OS_LIB = @OS_LIB@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ +PCIACCESS_LIBS = @PCIACCESS_LIBS@ +PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ +PERL = @PERL@ +PKG_CONFIG = @PKG_CONFIG@ +PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ +PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ +PROJECTROOT = @PROJECTROOT@ +PS2PDF = @PS2PDF@ +Q = @Q@ +RANLIB = @RANLIB@ +RAWCPP = @RAWCPP@ +RAWCPPFLAGS = @RAWCPPFLAGS@ +RECORD_FALSE = @RECORD_FALSE@ +RECORD_TRUE = @RECORD_TRUE@ +RES_FALSE = @RES_FALSE@ +RES_TRUE = @RES_TRUE@ +SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ +SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ +SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ +SED = @SED@ +SELINUX_CFLAGS = @SELINUX_CFLAGS@ +SELINUX_LIBS = @SELINUX_LIBS@ +SERVER_MISC_CONFIG_PATH = @SERVER_MISC_CONFIG_PATH@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +SOLARIS_ASM_CFLAGS = @SOLARIS_ASM_CFLAGS@ +SOLARIS_ASM_INLINE_FALSE = @SOLARIS_ASM_INLINE_FALSE@ +SOLARIS_ASM_INLINE_TRUE = @SOLARIS_ASM_INLINE_TRUE@ +SOLARIS_INOUT_ARCH = @SOLARIS_INOUT_ARCH@ +SOLARIS_VT_FALSE = @SOLARIS_VT_FALSE@ +SOLARIS_VT_TRUE = @SOLARIS_VT_TRUE@ +SPARC64_VIDEO_FALSE = @SPARC64_VIDEO_FALSE@ +SPARC64_VIDEO_TRUE = @SPARC64_VIDEO_TRUE@ +SPECIAL_DTRACE_OBJECTS_FALSE = @SPECIAL_DTRACE_OBJECTS_FALSE@ +SPECIAL_DTRACE_OBJECTS_TRUE = @SPECIAL_DTRACE_OBJECTS_TRUE@ +STANDALONE_XPBPROXY_FALSE = @STANDALONE_XPBPROXY_FALSE@ +STANDALONE_XPBPROXY_TRUE = @STANDALONE_XPBPROXY_TRUE@ +STRIP = @STRIP@ +TSLIB_CFLAGS = @TSLIB_CFLAGS@ +TSLIB_FALSE = @TSLIB_FALSE@ +TSLIB_LIBS = @TSLIB_LIBS@ +TSLIB_TRUE = @TSLIB_TRUE@ +UNITTESTS_FALSE = @UNITTESTS_FALSE@ +UNITTESTS_TRUE = @UNITTESTS_TRUE@ +UTILS_SYS_LIBS = @UTILS_SYS_LIBS@ +V = @V@ +VBE_FALSE = @VBE_FALSE@ +VBE_TRUE = @VBE_TRUE@ +VENDOR_NAME_SHORT = @VENDOR_NAME_SHORT@ +VERSION = @VERSION@ +VGAHW_FALSE = @VGAHW_FALSE@ +VGAHW_TRUE = @VGAHW_TRUE@ +WINDRES = @WINDRES@ +X11EXAMPLES_DEP_CFLAGS = @X11EXAMPLES_DEP_CFLAGS@ +X11EXAMPLES_DEP_LIBS = @X11EXAMPLES_DEP_LIBS@ +XAA_FALSE = @XAA_FALSE@ +XAA_TRUE = @XAA_TRUE@ +XACE_FALSE = @XACE_FALSE@ +XACE_TRUE = @XACE_TRUE@ +XCALIBRATE_FALSE = @XCALIBRATE_FALSE@ +XCALIBRATE_TRUE = @XCALIBRATE_TRUE@ +XCSECURITY_FALSE = @XCSECURITY_FALSE@ +XCSECURITY_TRUE = @XCSECURITY_TRUE@ +XDMAUTH_FALSE = @XDMAUTH_FALSE@ +XDMAUTH_TRUE = @XDMAUTH_TRUE@ +XDMCP_CFLAGS = @XDMCP_CFLAGS@ +XDMCP_FALSE = @XDMCP_FALSE@ +XDMCP_LIBS = @XDMCP_LIBS@ +XDMCP_TRUE = @XDMCP_TRUE@ +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_FALSE = @XEPHYR_FALSE@ +XEPHYR_INCS = @XEPHYR_INCS@ +XEPHYR_LIBS = @XEPHYR_LIBS@ +XEPHYR_TRUE = @XEPHYR_TRUE@ +XF86BIGFONT_FALSE = @XF86BIGFONT_FALSE@ +XF86BIGFONT_TRUE = @XF86BIGFONT_TRUE@ +XF86CONFIGFILE = @XF86CONFIGFILE@ +XF86UTILS_FALSE = @XF86UTILS_FALSE@ +XF86UTILS_TRUE = @XF86UTILS_TRUE@ +XF86VIDMODE_CFLAGS = @XF86VIDMODE_CFLAGS@ +XF86VIDMODE_FALSE = @XF86VIDMODE_FALSE@ +XF86VIDMODE_LIBS = @XF86VIDMODE_LIBS@ +XF86VIDMODE_TRUE = @XF86VIDMODE_TRUE@ +XFAKESERVER_FALSE = @XFAKESERVER_FALSE@ +XFAKESERVER_TRUE = @XFAKESERVER_TRUE@ +XINERAMA_FALSE = @XINERAMA_FALSE@ +XINERAMA_TRUE = @XINERAMA_TRUE@ +XKB_BASE_DIRECTORY = @XKB_BASE_DIRECTORY@ +XKB_BIN_DIRECTORY = @XKB_BIN_DIRECTORY@ +XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ +XKM_OUTPUT_DIR = @XKM_OUTPUT_DIR@ +XLIB_CFLAGS = @XLIB_CFLAGS@ +XLIB_LIBS = @XLIB_LIBS@ +XNESTMODULES_CFLAGS = @XNESTMODULES_CFLAGS@ +XNESTMODULES_LIBS = @XNESTMODULES_LIBS@ +XNEST_FALSE = @XNEST_FALSE@ +XNEST_LIBS = @XNEST_LIBS@ +XNEST_SYS_LIBS = @XNEST_SYS_LIBS@ +XNEST_TRUE = @XNEST_TRUE@ +XORG_BUS_BSDPCI_FALSE = @XORG_BUS_BSDPCI_FALSE@ +XORG_BUS_BSDPCI_TRUE = @XORG_BUS_BSDPCI_TRUE@ +XORG_BUS_LINUXPCI_FALSE = @XORG_BUS_LINUXPCI_FALSE@ +XORG_BUS_LINUXPCI_TRUE = @XORG_BUS_LINUXPCI_TRUE@ +XORG_BUS_SPARC_FALSE = @XORG_BUS_SPARC_FALSE@ +XORG_BUS_SPARC_TRUE = @XORG_BUS_SPARC_TRUE@ +XORG_CFLAGS = @XORG_CFLAGS@ +XORG_FALSE = @XORG_FALSE@ +XORG_INCS = @XORG_INCS@ +XORG_LIBS = @XORG_LIBS@ +XORG_MAN_PAGE = @XORG_MAN_PAGE@ +XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ +XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ +XORG_OS = @XORG_OS@ +XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XORG_SGML_PATH = @XORG_SGML_PATH@ +XORG_SYS_LIBS = @XORG_SYS_LIBS@ +XORG_TRUE = @XORG_TRUE@ +XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ +XPBPROXY_LIBS = @XPBPROXY_LIBS@ +XQUARTZ_FALSE = @XQUARTZ_FALSE@ +XQUARTZ_SPARKLE = @XQUARTZ_SPARKLE@ +XQUARTZ_SPARKLE_FALSE = @XQUARTZ_SPARKLE_FALSE@ +XQUARTZ_SPARKLE_TRUE = @XQUARTZ_SPARKLE_TRUE@ +XQUARTZ_TRUE = @XQUARTZ_TRUE@ +XREGISTRY_FALSE = @XREGISTRY_FALSE@ +XREGISTRY_TRUE = @XREGISTRY_TRUE@ +XRESEXAMPLES_DEP_CFLAGS = @XRESEXAMPLES_DEP_CFLAGS@ +XRESEXAMPLES_DEP_LIBS = @XRESEXAMPLES_DEP_LIBS@ +XSDLSERVER_FALSE = @XSDLSERVER_FALSE@ +XSDLSERVER_TRUE = @XSDLSERVER_TRUE@ +XSDL_INCS = @XSDL_INCS@ +XSDL_LIBS = @XSDL_LIBS@ +XSELINUX_FALSE = @XSELINUX_FALSE@ +XSELINUX_TRUE = @XSELINUX_TRUE@ +XSERVERCFLAGS_CFLAGS = @XSERVERCFLAGS_CFLAGS@ +XSERVERCFLAGS_LIBS = @XSERVERCFLAGS_LIBS@ +XSERVERLIBS_CFLAGS = @XSERVERLIBS_CFLAGS@ +XSERVERLIBS_LIBS = @XSERVERLIBS_LIBS@ +XSERVER_DTRACE_FALSE = @XSERVER_DTRACE_FALSE@ +XSERVER_DTRACE_TRUE = @XSERVER_DTRACE_TRUE@ +XSERVER_LIBS = @XSERVER_LIBS@ +XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ +XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ +XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ +XVFB_FALSE = @XVFB_FALSE@ +XVFB_LIBS = @XVFB_LIBS@ +XVFB_SYS_LIBS = @XVFB_SYS_LIBS@ +XVFB_TRUE = @XVFB_TRUE@ +XVMC_FALSE = @XVMC_FALSE@ +XVMC_TRUE = @XVMC_TRUE@ +XV_FALSE = @XV_FALSE@ +XV_TRUE = @XV_TRUE@ +XWINMODULES_CFLAGS = @XWINMODULES_CFLAGS@ +XWINMODULES_LIBS = @XWINMODULES_LIBS@ +XWIN_CLIPBOARD_FALSE = @XWIN_CLIPBOARD_FALSE@ +XWIN_CLIPBOARD_TRUE = @XWIN_CLIPBOARD_TRUE@ +XWIN_FALSE = @XWIN_FALSE@ +XWIN_GLX_WINDOWS_FALSE = @XWIN_GLX_WINDOWS_FALSE@ +XWIN_GLX_WINDOWS_TRUE = @XWIN_GLX_WINDOWS_TRUE@ +XWIN_LIBS = @XWIN_LIBS@ +XWIN_MULTIWINDOWEXTWM_FALSE = @XWIN_MULTIWINDOWEXTWM_FALSE@ +XWIN_MULTIWINDOWEXTWM_TRUE = @XWIN_MULTIWINDOWEXTWM_TRUE@ +XWIN_MULTIWINDOW_FALSE = @XWIN_MULTIWINDOW_FALSE@ +XWIN_MULTIWINDOW_TRUE = @XWIN_MULTIWINDOW_TRUE@ +XWIN_NATIVEGDI_FALSE = @XWIN_NATIVEGDI_FALSE@ +XWIN_NATIVEGDI_TRUE = @XWIN_NATIVEGDI_TRUE@ +XWIN_PRIMARYFB_FALSE = @XWIN_PRIMARYFB_FALSE@ +XWIN_PRIMARYFB_TRUE = @XWIN_PRIMARYFB_TRUE@ +XWIN_RANDR_FALSE = @XWIN_RANDR_FALSE@ +XWIN_RANDR_TRUE = @XWIN_RANDR_TRUE@ +XWIN_SERVER_NAME = @XWIN_SERVER_NAME@ +XWIN_SYS_LIBS = @XWIN_SYS_LIBS@ +XWIN_TRUE = @XWIN_TRUE@ +XWIN_XV_FALSE = @XWIN_XV_FALSE@ +XWIN_XV_TRUE = @XWIN_XV_TRUE@ +X_PRIVSEP_FALSE = @X_PRIVSEP_FALSE@ +X_PRIVSEP_TRUE = @X_PRIVSEP_TRUE@ +YACC = @YACC@ +YFLAGS = @YFLAGS@ +__XCONFIGFILE__ = @__XCONFIGFILE__@ +abi_ansic = @abi_ansic@ +abi_extension = @abi_extension@ +abi_videodrv = @abi_videodrv@ +abi_xinput = @abi_xinput@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_F77 = @ac_ct_F77@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__fastdepOBJC_FALSE = @am__fastdepOBJC_FALSE@ +am__fastdepOBJC_TRUE = @am__fastdepOBJC_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +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@ +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@ +shavedir = @shavedir@ +symbol_visibility = @symbol_visibility@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +INCLUDES = \ + @KDRIVE_PURE_INCS@ \ + @KDRIVE_CFLAGS@ \ + @XSDL_INCS@ + +Xsdl_SOURCES = sdl.c +Xsdl_LDADD = \ + @KDRIVE_LIBS@ \ + @XSDL_LIBS@ + +Xsdl_DEPENDENCIES = @KDRIVE_LOCAL_LIBS@ +Xsdl_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG) +all: all-am + +.SUFFIXES: +.SUFFIXES: .c .lo .o .obj +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign hw/kdrive/sdl/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign hw/kdrive/sdl/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: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +install-binPROGRAMS: $(bin_PROGRAMS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + if test -f $$p \ + || test -f $$p1 \ + ; then \ + f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) '$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(INSTALL_PROGRAM_ENV) $(LIBTOOL) --mode=install $(binPROGRAMS_INSTALL) "$$p" "$(DESTDIR)$(bindir)/$$f" || exit 1; \ + else :; fi; \ + done + +uninstall-binPROGRAMS: + @$(NORMAL_UNINSTALL) + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +clean-binPROGRAMS: + @list='$(bin_PROGRAMS)'; for p in $$list; do \ + f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ + echo " rm -f $$p $$f"; \ + rm -f $$p $$f ; \ + done +Xsdl$(EXEEXT): $(Xsdl_OBJECTS) $(Xsdl_DEPENDENCIES) + @rm -f Xsdl$(EXEEXT) + $(LINK) $(Xsdl_LDFLAGS) $(Xsdl_OBJECTS) $(Xsdl_LDADD) $(LIBS) + +mostlyclean-compile: + -rm -f *.$(OBJEXT) + +distclean-compile: + -rm -f *.tab.c + +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sdl.Po@am__quote@ + +.c.o: +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c $< + +.c.obj: +@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` + +.c.lo: +@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \ +@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi +@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: + +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; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + 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; } \ + END { for (i in files) print i; }'`; \ + if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique; \ + fi +ctags: CTAGS +CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + 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; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +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)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$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: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_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-libtool distclean-tags + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-exec-am: install-binPROGRAMS + +install-info: install-info-am + +install-man: + +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 uninstall-info-am + +.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ + clean-generic clean-libtool 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-exec \ + install-exec-am install-info install-info-am install-man \ + 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 uninstall-info-am + + +relink: + rm -f $(bin_PROGRAMS) && make $(bin_PROGRAMS) +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/xserver/hw/kdrive/src/Makefile.in b/xserver/hw/kdrive/src/Makefile.in index d7ea0e41b..d17c3831e 100644 --- a/xserver/hw/kdrive/src/Makefile.in +++ b/xserver/hw/kdrive/src/Makefile.in @@ -116,10 +116,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -207,6 +203,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -221,6 +219,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -238,10 +237,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -297,10 +300,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -318,17 +322,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -355,20 +353,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -460,6 +461,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/kdrive/src/kcmap.c b/xserver/hw/kdrive/src/kcmap.c index 40697e091..9bfdd78b6 100644 --- a/xserver/hw/kdrive/src/kcmap.c +++ b/xserver/hw/kdrive/src/kcmap.c @@ -58,7 +58,7 @@ KdSetColormap (ScreenPtr pScreen) for (i = 0; i < (1 << pScreenPriv->screen->fb.depth); i++) pixels[i] = i; - QueryColors (pCmap, (1 << pScreenPriv->screen->fb.depth), pixels, colors); + QueryColors (pCmap, (1 << pScreenPriv->screen->fb.depth), pixels, colors, serverClient); for (i = 0; i < (1 << pScreenPriv->screen->fb.depth); i++) { diff --git a/xserver/hw/kdrive/src/kdrive.c b/xserver/hw/kdrive/src/kdrive.c index 1902ab885..06c3661da 100644 --- a/xserver/hw/kdrive/src/kdrive.c +++ b/xserver/hw/kdrive/src/kdrive.c @@ -64,8 +64,7 @@ KdDepths kdDepths[] = { #define KD_DEFAULT_BUTTONS 5 -static int kdScreenPrivateKeyIndex; -DevPrivateKey kdScreenPrivateKey = &kdScreenPrivateKeyIndex; +DevPrivateKeyRec kdScreenPrivateKeyRec; unsigned long kdGeneration; Bool kdVideoTest; @@ -95,7 +94,7 @@ KdOsFuncs *kdOsFuncs; void KdSetRootClip (ScreenPtr pScreen, BOOL enable) { - WindowPtr pWin = WindowTable[pScreen->myNum]; + WindowPtr pWin = pScreen->root; WindowPtr pChild; Bool WasViewable; Bool anyMarked = FALSE; @@ -121,8 +120,8 @@ KdSetRootClip (ScreenPtr pScreen, BOOL enable) { RegionPtr borderVisible; - borderVisible = REGION_CREATE(pScreen, NullBox, 1); - REGION_SUBTRACT(pScreen, borderVisible, + borderVisible = RegionCreate(NullBox, 1); + RegionSubtract(borderVisible, &pWin->borderClip, &pWin->winSize); pWin->valdata->before.borderVisible = borderVisible; } @@ -138,15 +137,15 @@ KdSetRootClip (ScreenPtr pScreen, BOOL enable) box.y2 = pScreen->height; pWin->drawable.width = pScreen->width; pWin->drawable.height = pScreen->height; - REGION_INIT (pScreen, &pWin->winSize, &box, 1); - REGION_INIT (pScreen, &pWin->borderSize, &box, 1); - REGION_RESET(pScreen, &pWin->borderClip, &box); - REGION_BREAK (pWin->drawable.pScreen, &pWin->clipList); + RegionInit(&pWin->winSize, &box, 1); + RegionInit(&pWin->borderSize, &box, 1); + RegionReset(&pWin->borderClip, &box); + RegionBreak(&pWin->clipList); } else { - REGION_EMPTY(pScreen, &pWin->borderClip); - REGION_BREAK (pWin->drawable.pScreen, &pWin->clipList); + RegionEmpty(&pWin->borderClip); + RegionBreak(&pWin->clipList); } ResizeChildrenWinSize (pWin, 0, 0, 0, 0); @@ -207,7 +206,7 @@ KdDoSwitchCmd (char *reason) { if (kdSwitchCmd) { - char *command = xalloc (strlen (kdSwitchCmd) + + char *command = malloc(strlen (kdSwitchCmd) + 1 + strlen (reason) + 1); @@ -217,7 +216,7 @@ KdDoSwitchCmd (char *reason) strcat (command, " "); strcat (command, reason); system (command); - xfree (command); + free(command); } } @@ -699,7 +698,10 @@ KdAllocatePrivates (ScreenPtr pScreen) if (kdGeneration != serverGeneration) kdGeneration = serverGeneration; - pScreenPriv = xcalloc(1, sizeof (*pScreenPriv)); + if (!dixRegisterPrivateKey(&kdScreenPrivateKeyRec, PRIVATE_SCREEN, 0)) + return FALSE; + + pScreenPriv = calloc(1, sizeof (*pScreenPriv)); if (!pScreenPriv) return FALSE; KdSetScreenPriv (pScreen, pScreenPriv); @@ -788,7 +790,7 @@ KdCloseScreen (int index, ScreenPtr pScreen) pScreenPriv->screen->pScreen = 0; - xfree ((pointer) pScreenPriv); + free((pointer) pScreenPriv); return ret; } @@ -836,8 +838,8 @@ KdCreateWindow (WindowPtr pWin) if (!pScreenPriv->enabled) { - REGION_EMPTY (pWin->drawable.pScreen, &pWin->borderClip); - REGION_BREAK (pWin->drawable.pScreen, &pWin->clipList); + RegionEmpty(&pWin->borderClip); + RegionBreak(&pWin->clipList); } } #endif @@ -941,9 +943,8 @@ KdScreenInit(int index, ScreenPtr pScreen, int argc, char **argv) pScreenPriv->card = card; pScreenPriv->bytesPerPixel = screen->fb.bitsPerPixel >> 3; pScreenPriv->dpmsState = KD_DPMS_NORMAL; -#ifdef PANORAMIX - dixScreenOrigins[pScreen->myNum] = screen->origin; -#endif + pScreen->x = screen->origin.x; + pScreen->y = screen->origin.y; if (!monitorResolution) monitorResolution = 75; @@ -1003,10 +1004,8 @@ KdScreenInit(int index, ScreenPtr pScreen, int argc, char **argv) pScreen->BlockHandler = KdBlockHandler; pScreen->WakeupHandler = KdWakeupHandler; -#ifdef RENDER if (!fbPictureInit (pScreen, 0, 0)) return FALSE; -#endif if (card->cfuncs->initScreen) if (!(*card->cfuncs->initScreen) (pScreen)) return FALSE; diff --git a/xserver/hw/kdrive/src/kdrive.h b/xserver/hw/kdrive/src/kdrive.h index 35ce03660..3ca98146b 100644 --- a/xserver/hw/kdrive/src/kdrive.h +++ b/xserver/hw/kdrive/src/kdrive.h @@ -342,7 +342,9 @@ typedef struct _KdPointerMatrix { (PixmapWidthPaddingInfo[d].padRoundUp+1))) #endif -extern DevPrivateKey kdScreenPrivateKey; +extern DevPrivateKeyRec kdScreenPrivateKeyRec; +#define kdScreenPrivateKey (&kdScreenPrivateKeyRec) + extern unsigned long kdGeneration; extern Bool kdEnabled; extern Bool kdSwitchPending; diff --git a/xserver/hw/kdrive/src/kinfo.c b/xserver/hw/kdrive/src/kinfo.c index 0825ee24f..8193215ba 100644 --- a/xserver/hw/kdrive/src/kinfo.c +++ b/xserver/hw/kdrive/src/kinfo.c @@ -33,7 +33,7 @@ KdCardInfoAdd (KdCardFuncs *funcs, { KdCardInfo *ci, **prev; - ci = xcalloc (1, sizeof (KdCardInfo)); + ci = calloc(1, sizeof (KdCardInfo)); if (!ci) return 0; for (prev = &kdCardInfo; *prev; prev = &(*prev)->next); @@ -66,7 +66,7 @@ KdCardInfoDispose (KdCardInfo *ci) if (*prev == ci) { *prev = ci->next; - xfree (ci); + free(ci); break; } } @@ -77,7 +77,7 @@ KdScreenInfoAdd (KdCardInfo *ci) KdScreenInfo *si, **prev; int n; - si = xcalloc (1, sizeof (KdScreenInfo)); + si = calloc(1, sizeof (KdScreenInfo)); if (!si) return 0; for (prev = &ci->screenList, n = 0; *prev; prev = &(*prev)->next, n++); @@ -98,7 +98,7 @@ KdScreenInfoDispose (KdScreenInfo *si) if (*prev == si) { *prev = si->next; - xfree (si); + free(si); if (!ci->screenList) KdCardInfoDispose (ci); break; @@ -112,7 +112,7 @@ KdNewPointer (void) KdPointerInfo *pi; int i; - pi = (KdPointerInfo *)xcalloc(1, sizeof(KdPointerInfo)); + pi = (KdPointerInfo *)calloc(1, sizeof(KdPointerInfo)); if (!pi) return NULL; @@ -136,28 +136,28 @@ KdFreePointer(KdPointerInfo *pi) { InputOption *option, *prev = NULL; - xfree(pi->name); - xfree(pi->path); + free(pi->name); + free(pi->path); for (option = pi->options; option; option = option->next) { - xfree(prev); - xfree(option->key); - xfree(option->value); + free(prev); + free(option->key); + free(option->value); prev = option; } - xfree(prev); - xfree(pi); + free(prev); + free(pi); } void KdFreeKeyboard(KdKeyboardInfo *ki) { - xfree(ki->name); - xfree(ki->path); - xfree(ki->xkbRules); - xfree(ki->xkbModel); - xfree(ki->xkbLayout); + free(ki->name); + free(ki->path); + free(ki->xkbRules); + free(ki->xkbModel); + free(ki->xkbLayout); ki->next = NULL; - xfree(ki); + free(ki); } diff --git a/xserver/hw/kdrive/src/kinput.c b/xserver/hw/kdrive/src/kinput.c index a88f2dc61..80a1458b1 100644 --- a/xserver/hw/kdrive/src/kinput.c +++ b/xserver/hw/kdrive/src/kinput.c @@ -420,7 +420,7 @@ KdPointerProc(DeviceIntPtr pDevice, int onoff) "(unnamed)"); return !Success; } - xfree(pi->driverPrivate); + free(pi->driverPrivate); pi->driverPrivate = NULL; } @@ -433,12 +433,12 @@ KdPointerProc(DeviceIntPtr pDevice, int onoff) return !Success; } - btn_labels = xcalloc(pi->nButtons, sizeof(Atom)); + btn_labels = calloc(pi->nButtons, sizeof(Atom)); if (!btn_labels) return BadAlloc; - axes_labels = xcalloc(pi->nAxes, sizeof(Atom)); + axes_labels = calloc(pi->nAxes, sizeof(Atom)); if (!axes_labels) { - xfree(btn_labels); + free(btn_labels); return BadAlloc; } @@ -472,8 +472,8 @@ KdPointerProc(DeviceIntPtr pDevice, int onoff) (PtrCtrlProcPtr)NoopDDA, GetMotionHistorySize(), pi->nAxes, axes_labels); - xfree(btn_labels); - xfree(axes_labels); + free(btn_labels); + free(axes_labels); if (pi->inputClass == KD_TOUCHSCREEN) { InitAbsoluteClassDeviceStruct(pDevice); @@ -736,7 +736,7 @@ KdKeyboardProc(DeviceIntPtr pDevice, int onoff) "(unnamed)"); return !Success; } - xfree(ki->driverPrivate); + free(ki->driverPrivate); ki->driverPrivate = NULL; } @@ -887,7 +887,7 @@ KdRemoveKeyboardDriver (KdKeyboardDriver *driver) KdKeyboardInfo * KdNewKeyboard (void) { - KdKeyboardInfo *ki = xcalloc(sizeof(KdKeyboardInfo), 1); + KdKeyboardInfo *ki = calloc(sizeof(KdKeyboardInfo), 1); if (!ki) return NULL; @@ -915,11 +915,11 @@ KdAddConfigKeyboard (char *keyboard) if (!keyboard) return Success; - new = (struct KdConfigDevice *) xcalloc(sizeof(struct KdConfigDevice), 1); + new = (struct KdConfigDevice *) calloc(sizeof(struct KdConfigDevice), 1); if (!new) return BadAlloc; - new->line = xstrdup(keyboard); + new->line = strdup(keyboard); new->next = NULL; for (prev = &kdConfigKeyboards; *prev; prev = &(*prev)->next); @@ -983,11 +983,11 @@ KdAddConfigPointer (char *pointer) if (!pointer) return Success; - new = (struct KdConfigDevice *) xcalloc(sizeof(struct KdConfigDevice), 1); + new = (struct KdConfigDevice *) calloc(sizeof(struct KdConfigDevice), 1); if (!new) return BadAlloc; - new->line = xstrdup(pointer); + new->line = strdup(pointer); new->next = NULL; for (prev = &kdConfigPointers; *prev; prev = &(*prev)->next); @@ -1053,7 +1053,7 @@ KdGetOptions (InputOption **options, char *string) InputOption *newopt = NULL, **tmpo = NULL; int tam_key = 0; - newopt = xcalloc(1, sizeof (InputOption)); + newopt = calloc(1, sizeof (InputOption)); if (!newopt) return FALSE; @@ -1064,14 +1064,14 @@ KdGetOptions (InputOption **options, char *string) if (strchr(string, '=')) { tam_key = (strchr(string, '=') - string); - newopt->key = (char *)xalloc(tam_key); + newopt->key = (char *)malloc(tam_key); strncpy(newopt->key, string, tam_key); newopt->key[tam_key] = '\0'; - newopt->value = xstrdup(strchr(string, '=') + 1); + newopt->value = strdup(strchr(string, '=') + 1); } else { - newopt->key = xstrdup(string); + newopt->key = strdup(string); newopt->value = NULL; } newopt->next = NULL; @@ -1147,7 +1147,7 @@ KdParseKeyboard (char *arg) if (strcmp (save, "auto") == 0) ki->driverPrivate = NULL; else - ki->driverPrivate = xstrdup(save); + ki->driverPrivate = strdup(save); if (delim != ',') { @@ -1243,7 +1243,7 @@ KdParsePointer (char *arg) if (strcmp(save, "auto") == 0) pi->driverPrivate = NULL; else - pi->driverPrivate = xstrdup(save); + pi->driverPrivate = strdup(save); if (delim != ',') { diff --git a/xserver/hw/kdrive/src/kshadow.c b/xserver/hw/kdrive/src/kshadow.c index cf3391dba..6f5a2f346 100644 --- a/xserver/hw/kdrive/src/kshadow.c +++ b/xserver/hw/kdrive/src/kshadow.c @@ -36,11 +36,11 @@ KdShadowFbAlloc (KdScreenInfo *screen, Bool rotate) /* use fb computation for width */ paddedWidth = ((width * bpp + FB_MASK) >> FB_SHIFT) * sizeof (FbBits); - buf = xalloc (paddedWidth * height); + buf = malloc(paddedWidth * height); if (!buf) return FALSE; if (screen->fb.shadow) - xfree (screen->fb.frameBuffer); + free(screen->fb.frameBuffer); screen->fb.shadow = TRUE; screen->fb.frameBuffer = buf; screen->fb.byteStride = paddedWidth; @@ -53,7 +53,7 @@ KdShadowFbFree (KdScreenInfo *screen) { if (screen->fb.shadow) { - xfree (screen->fb.frameBuffer); + free(screen->fb.frameBuffer); screen->fb.frameBuffer = 0; screen->fb.shadow = FALSE; } diff --git a/xserver/hw/kdrive/src/kxv.c b/xserver/hw/kdrive/src/kxv.c index 27ecc5d6c..c07829a5f 100644 --- a/xserver/hw/kdrive/src/kxv.c +++ b/xserver/hw/kdrive/src/kxv.c @@ -103,10 +103,9 @@ static void KdXVClipNotify(WindowPtr pWin, int dx, int dy); /* misc */ static Bool KdXVInitAdaptors(ScreenPtr, KdVideoAdaptorPtr*, int); -static int KdXVWindowKeyIndex; -DevPrivateKey KdXVWindowKey = &KdXVWindowKeyIndex; -static int KdXvScreenKeyIndex; -DevPrivateKey KdXvScreenKey = &KdXvScreenKeyIndex; +static DevPrivateKeyRec KdXVWindowKeyRec; +#define KdXVWindowKey (&KdXVWindowKeyRec) +static DevPrivateKey KdXvScreenKey; static unsigned long KdXVGeneration = 0; static unsigned long PortResource = 0; @@ -134,7 +133,7 @@ KdXVRegisterGenericAdaptorDriver( /* fprintf(stderr,"KdXVRegisterGenericAdaptorDriver\n"); */ - newdrivers = xrealloc(GenDrivers, sizeof(KdXVInitGenericAdaptorPtr) * + newdrivers = realloc(GenDrivers, sizeof(KdXVInitGenericAdaptorPtr) * (1 + NumGenDrivers)); if (!newdrivers) return 0; @@ -159,7 +158,7 @@ KdXVListGenericAdaptors( n = GenDrivers[i](screen,&DrivAdap); if (0 == n) continue; - new = xrealloc(*adaptors, sizeof(KdVideoAdaptorPtr) * (num+n)); + new = realloc(*adaptors, sizeof(KdVideoAdaptorPtr) * (num+n)); if (NULL == new) continue; *adaptors = new; @@ -172,13 +171,13 @@ KdXVListGenericAdaptors( KdVideoAdaptorPtr KdXVAllocateVideoAdaptorRec(KdScreenInfo * screen) { - return xcalloc(1, sizeof(KdVideoAdaptorRec)); + return calloc(1, sizeof(KdVideoAdaptorRec)); } void KdXVFreeVideoAdaptorRec(KdVideoAdaptorPtr ptr) { - xfree(ptr); + free(ptr); } @@ -199,6 +198,9 @@ KdXVScreenInit( if(!XvGetScreenKeyProc || !XvGetRTPortProc || !XvScreenInitProc) return FALSE; + if (!dixRegisterPrivateKey(&KdXVWindowKeyRec, PRIVATE_WINDOW, 0)) + return FALSE; + if(Success != (*XvScreenInitProc)(pScreen)) return FALSE; KdXvScreenKey = (*XvGetScreenKeyProc)(); @@ -218,7 +220,7 @@ KdXVScreenInit( a CloseScreen hook so that we don't have to wrap it. I'm not sure that I appreciate that. */ - ScreenPriv = xalloc(sizeof(KdXVScreenRec)); + ScreenPriv = malloc(sizeof(KdXVScreenRec)); pxvs->devPriv.ptr = (pointer)ScreenPriv; if(!ScreenPriv) return FALSE; @@ -247,18 +249,18 @@ KdXVFreeAdaptor(XvAdaptorPtr pAdaptor) { int i; - xfree(pAdaptor->name); + free(pAdaptor->name); if(pAdaptor->pEncodings) { XvEncodingPtr pEncode = pAdaptor->pEncodings; for(i = 0; i < pAdaptor->nEncodings; i++, pEncode++) { - xfree(pEncode->name); + free(pEncode->name); } - xfree(pAdaptor->pEncodings); + free(pAdaptor->pEncodings); } - xfree(pAdaptor->pFormats); + free(pAdaptor->pFormats); if(pAdaptor->pPorts) { XvPortPtr pPort = pAdaptor->pPorts; @@ -268,28 +270,28 @@ KdXVFreeAdaptor(XvAdaptorPtr pAdaptor) pPriv = (XvPortRecPrivatePtr)pPort->devPriv.ptr; if(pPriv) { if(pPriv->clientClip) - REGION_DESTROY(pAdaptor->pScreen, pPriv->clientClip); + RegionDestroy(pPriv->clientClip); if(pPriv->pCompositeClip && pPriv->FreeCompositeClip) - REGION_DESTROY(pAdaptor->pScreen, pPriv->pCompositeClip); - xfree(pPriv); + RegionDestroy(pPriv->pCompositeClip); + free(pPriv); } } - xfree(pAdaptor->pPorts); + free(pAdaptor->pPorts); } if(pAdaptor->nAttributes) { XvAttributePtr pAttribute = pAdaptor->pAttributes; for(i = 0; i < pAdaptor->nAttributes; i++, pAttribute++) { - xfree(pAttribute->name); + free(pAttribute->name); } - xfree(pAdaptor->pAttributes); + free(pAdaptor->pAttributes); } - xfree(pAdaptor->pImages); + free(pAdaptor->pImages); - xfree(pAdaptor->devPriv.ptr); + free(pAdaptor->devPriv.ptr); } static Bool @@ -325,7 +327,7 @@ KdXVInitAdaptors( pxvs->nAdaptors = 0; pxvs->pAdaptors = NULL; - if(!(pAdaptor = xcalloc(number, sizeof(XvAdaptorRec)))) + if(!(pAdaptor = calloc(number, sizeof(XvAdaptorRec)))) return FALSE; for(pa = pAdaptor, na = 0, numAdaptor = 0; na < number; na++, adaptorPtr++) { @@ -375,18 +377,18 @@ KdXVInitAdaptors( pa->ddGetPortAttribute = KdXVGetPortAttribute; pa->ddQueryBestSize = KdXVQueryBestSize; pa->ddQueryImageAttributes = KdXVQueryImageAttributes; - if((pa->name = xalloc(strlen(adaptorPtr->name) + 1))) + if((pa->name = malloc(strlen(adaptorPtr->name) + 1))) strcpy(pa->name, adaptorPtr->name); if(adaptorPtr->nEncodings && - (pEncode = xcalloc(adaptorPtr->nEncodings, sizeof(XvEncodingRec)))) { + (pEncode = calloc(adaptorPtr->nEncodings, sizeof(XvEncodingRec)))) { for(pe = pEncode, encodingPtr = adaptorPtr->pEncodings, i = 0; i < adaptorPtr->nEncodings; pe++, i++, encodingPtr++) { pe->id = encodingPtr->id; pe->pScreen = pScreen; - if((pe->name = xalloc(strlen(encodingPtr->name) + 1))) + if((pe->name = malloc(strlen(encodingPtr->name) + 1))) strcpy(pe->name, encodingPtr->name); pe->width = encodingPtr->width; pe->height = encodingPtr->height; @@ -398,7 +400,7 @@ KdXVInitAdaptors( } if(adaptorPtr->nImages && - (pImage = xcalloc(adaptorPtr->nImages, sizeof(XvImageRec)))) { + (pImage = calloc(adaptorPtr->nImages, sizeof(XvImageRec)))) { for(i = 0, pi = pImage, imagePtr = adaptorPtr->pImages; i < adaptorPtr->nImages; i++, pi++, imagePtr++) @@ -431,7 +433,7 @@ KdXVInitAdaptors( } if(adaptorPtr->nAttributes && - (pAttribute = xcalloc(adaptorPtr->nAttributes, sizeof(XvAttributeRec)))) + (pAttribute = calloc(adaptorPtr->nAttributes, sizeof(XvAttributeRec)))) { for(pat = pAttribute, attributePtr = adaptorPtr->pAttributes, i = 0; i < adaptorPtr->nAttributes; pat++, i++, attributePtr++) @@ -439,7 +441,7 @@ KdXVInitAdaptors( pat->flags = attributePtr->flags; pat->min_value = attributePtr->min_value; pat->max_value = attributePtr->max_value; - if((pat->name = xalloc(strlen(attributePtr->name) + 1))) + if((pat->name = malloc(strlen(attributePtr->name) + 1))) strcpy(pat->name, attributePtr->name); } pa->nAttributes = adaptorPtr->nAttributes; @@ -449,7 +451,7 @@ KdXVInitAdaptors( totFormat = adaptorPtr->nFormats; - if(!(pFormat = xcalloc(totFormat, sizeof(XvFormatRec)))) { + if(!(pFormat = calloc(totFormat, sizeof(XvFormatRec)))) { KdXVFreeAdaptor(pa); continue; } @@ -466,7 +468,7 @@ KdXVInitAdaptors( if(numFormat >= totFormat) { void *moreSpace; totFormat *= 2; - moreSpace = xrealloc(pFormat, + moreSpace = realloc(pFormat, totFormat * sizeof(XvFormatRec)); if(!moreSpace) break; pFormat = moreSpace; @@ -489,7 +491,7 @@ KdXVInitAdaptors( continue; } - if(!(adaptorPriv = xcalloc(1, sizeof(XvAdaptorRecPrivate)))) { + if(!(adaptorPriv = calloc(1, sizeof(XvAdaptorRecPrivate)))) { KdXVFreeAdaptor(pa); continue; } @@ -509,7 +511,7 @@ KdXVInitAdaptors( pa->devPriv.ptr = (pointer)adaptorPriv; - if(!(pPort = xcalloc(adaptorPtr->nPorts, sizeof(XvPortRec)))) { + if(!(pPort = calloc(adaptorPtr->nPorts, sizeof(XvPortRec)))) { KdXVFreeAdaptor(pa); continue; } @@ -519,11 +521,11 @@ KdXVInitAdaptors( if(!(pp->id = FakeClientID(0))) continue; - if(!(portPriv = xcalloc(1, sizeof(XvPortRecPrivate)))) + if(!(portPriv = calloc(1, sizeof(XvPortRecPrivate)))) continue; if(!AddResource(pp->id, PortResource, pp)) { - xfree(portPriv); + free(portPriv); continue; } @@ -559,7 +561,7 @@ KdXVInitAdaptors( pxvs->nAdaptors = numAdaptor; pxvs->pAdaptors = pAdaptor; } else { - xfree(pAdaptor); + free(pAdaptor); return FALSE; } @@ -607,18 +609,18 @@ KdXVUpdateCompositeClip(XvPortRecPrivatePtr portPriv) return; } - pCompositeClip = REGION_CREATE(pWin->pScreen, NullBox, 1); - REGION_COPY(pWin->pScreen, pCompositeClip, portPriv->clientClip); - REGION_TRANSLATE(pWin->pScreen, pCompositeClip, + pCompositeClip = RegionCreate(NullBox, 1); + RegionCopy(pCompositeClip, portPriv->clientClip); + RegionTranslate(pCompositeClip, portPriv->pDraw->x + portPriv->clipOrg.x, portPriv->pDraw->y + portPriv->clipOrg.y); - REGION_INTERSECT(pWin->pScreen, pCompositeClip, pregWin, pCompositeClip); + RegionIntersect(pCompositeClip, pregWin, pCompositeClip); portPriv->pCompositeClip = pCompositeClip; portPriv->FreeCompositeClip = TRUE; if(freeCompClip) { - REGION_DESTROY(pWin->pScreen, pregWin); + RegionDestroy(pregWin); } } @@ -633,17 +635,17 @@ KdXVCopyClip( /* copy the new clip if it exists */ if((pGC->clientClipType == CT_REGION) && pGC->clientClip) { if(!portPriv->clientClip) - portPriv->clientClip = REGION_CREATE(pGC->pScreen, NullBox, 1); + portPriv->clientClip = RegionCreate(NullBox, 1); /* Note: this is in window coordinates */ - REGION_COPY(pGC->pScreen, portPriv->clientClip, pGC->clientClip); + RegionCopy(portPriv->clientClip, pGC->clientClip); } else if(portPriv->clientClip) { /* free the old clientClip */ - REGION_DESTROY(pGC->pScreen, portPriv->clientClip); + RegionDestroy(portPriv->clientClip); portPriv->clientClip = NULL; } /* get rid of the old clip list */ if(portPriv->pCompositeClip && portPriv->FreeCompositeClip) { - REGION_DESTROY(pWin->pScreen, portPriv->pCompositeClip); + RegionDestroy(portPriv->pCompositeClip); } portPriv->clipOrg = pGC->clipOrg; @@ -670,18 +672,18 @@ KdXVRegetVideo(XvPortRecPrivatePtr portPriv) WinBox.y2 = WinBox.y1 + portPriv->drw_h; /* clip to the window composite clip */ - REGION_INIT(portPriv->pDraw->pScreen, &WinRegion, &WinBox, 1); - REGION_INIT(portPriv->pDraw->pScreen, &ClipRegion, NullBox, 1); - REGION_INTERSECT(portPriv->pDraw->pScreen, &ClipRegion, &WinRegion, portPriv->pCompositeClip); + RegionInit(&WinRegion, &WinBox, 1); + RegionInit(&ClipRegion, NullBox, 1); + RegionIntersect(&ClipRegion, &WinRegion, portPriv->pCompositeClip); /* that's all if it's totally obscured */ - if(!REGION_NOTEMPTY(portPriv->pDraw->pScreen, &ClipRegion)) { + if(!RegionNotEmpty(&ClipRegion)) { clippedAway = TRUE; goto CLIP_VIDEO_BAILOUT; } if(portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) { - REGION_SUBTRACT(portPriv->pDraw->pScreen, &ClipRegion, &WinRegion, &ClipRegion); + RegionSubtract(&ClipRegion, &WinRegion, &ClipRegion); } ret = (*portPriv->AdaptorRec->GetVideo)(portPriv->screen, portPriv->pDraw, @@ -706,8 +708,8 @@ CLIP_VIDEO_BAILOUT: if(!portPriv->FreeCompositeClip) portPriv->pCompositeClip = NULL; - REGION_UNINIT(portPriv->pDraw->pScreen, &WinRegion); - REGION_UNINIT(portPriv->pDraw->pScreen, &ClipRegion); + RegionUninit(&WinRegion); + RegionUninit(&ClipRegion); return ret; } @@ -734,9 +736,9 @@ KdXVReputVideo(XvPortRecPrivatePtr portPriv) WinBox.y2 = WinBox.y1 + portPriv->drw_h; /* clip to the window composite clip */ - REGION_INIT(pScreen, &WinRegion, &WinBox, 1); - REGION_INIT(pScreen, &ClipRegion, NullBox, 1); - REGION_INTERSECT(Screen, &ClipRegion, &WinRegion, portPriv->pCompositeClip); + RegionInit(&WinRegion, &WinBox, 1); + RegionInit(&ClipRegion, NullBox, 1); + RegionIntersect(&ClipRegion, &WinRegion, portPriv->pCompositeClip); /* clip and translate to the viewport */ if(portPriv->AdaptorRec->flags & VIDEO_CLIP_TO_VIEWPORT) { @@ -748,21 +750,21 @@ KdXVReputVideo(XvPortRecPrivatePtr portPriv) VPBox.x2 = screen->width; VPBox.y2 = screen->height; - REGION_INIT(pScreen, &VPReg, &VPBox, 1); - REGION_INTERSECT(Screen, &ClipRegion, &ClipRegion, &VPReg); - REGION_UNINIT(pScreen, &VPReg); + RegionInit(&VPReg, &VPBox, 1); + RegionIntersect(&ClipRegion, &ClipRegion, &VPReg); + RegionUninit(&VPReg); } /* that's all if it's totally obscured */ - if(!REGION_NOTEMPTY(pScreen, &ClipRegion)) { + if(!RegionNotEmpty(&ClipRegion)) { clippedAway = TRUE; goto CLIP_VIDEO_BAILOUT; } /* bailout if we have to clip but the hardware doesn't support it */ if(portPriv->AdaptorRec->flags & VIDEO_NO_CLIPPING) { - BoxPtr clipBox = REGION_RECTS(&ClipRegion); - if( (REGION_NUM_RECTS(&ClipRegion) != 1) || + BoxPtr clipBox = RegionRects(&ClipRegion); + if( (RegionNumRects(&ClipRegion) != 1) || (clipBox->x1 != WinBox.x1) || (clipBox->x2 != WinBox.x2) || (clipBox->y1 != WinBox.y1) || (clipBox->y2 != WinBox.y2)) { @@ -772,7 +774,7 @@ KdXVReputVideo(XvPortRecPrivatePtr portPriv) } if(portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) { - REGION_SUBTRACT(pScreen, &ClipRegion, &WinRegion, &ClipRegion); + RegionSubtract(&ClipRegion, &WinRegion, &ClipRegion); } ret = (*portPriv->AdaptorRec->PutVideo)(portPriv->screen, portPriv->pDraw, @@ -796,8 +798,8 @@ CLIP_VIDEO_BAILOUT: if(!portPriv->FreeCompositeClip) portPriv->pCompositeClip = NULL; - REGION_UNINIT(pScreen, &WinRegion); - REGION_UNINIT(pScreen, &ClipRegion); + RegionUninit(&WinRegion); + RegionUninit(&ClipRegion); return ret; } @@ -823,9 +825,9 @@ KdXVReputImage(XvPortRecPrivatePtr portPriv) WinBox.y2 = WinBox.y1 + portPriv->drw_h; /* clip to the window composite clip */ - REGION_INIT(pScreen, &WinRegion, &WinBox, 1); - REGION_INIT(pScreen, &ClipRegion, NullBox, 1); - REGION_INTERSECT(Screen, &ClipRegion, &WinRegion, portPriv->pCompositeClip); + RegionInit(&WinRegion, &WinBox, 1); + RegionInit(&ClipRegion, NullBox, 1); + RegionIntersect(&ClipRegion, &WinRegion, portPriv->pCompositeClip); /* clip and translate to the viewport */ if(portPriv->AdaptorRec->flags & VIDEO_CLIP_TO_VIEWPORT) { @@ -837,21 +839,21 @@ KdXVReputImage(XvPortRecPrivatePtr portPriv) VPBox.x2 = screen->width; VPBox.y2 = screen->height; - REGION_INIT(pScreen, &VPReg, &VPBox, 1); - REGION_INTERSECT(Screen, &ClipRegion, &ClipRegion, &VPReg); - REGION_UNINIT(pScreen, &VPReg); + RegionInit(&VPReg, &VPBox, 1); + RegionIntersect(&ClipRegion, &ClipRegion, &VPReg); + RegionUninit(&VPReg); } /* that's all if it's totally obscured */ - if(!REGION_NOTEMPTY(pScreen, &ClipRegion)) { + if(!RegionNotEmpty(&ClipRegion)) { clippedAway = TRUE; goto CLIP_VIDEO_BAILOUT; } /* bailout if we have to clip but the hardware doesn't support it */ if(portPriv->AdaptorRec->flags & VIDEO_NO_CLIPPING) { - BoxPtr clipBox = REGION_RECTS(&ClipRegion); - if( (REGION_NUM_RECTS(&ClipRegion) != 1) || + BoxPtr clipBox = RegionRects(&ClipRegion); + if( (RegionNumRects(&ClipRegion) != 1) || (clipBox->x1 != WinBox.x1) || (clipBox->x2 != WinBox.x2) || (clipBox->y1 != WinBox.y1) || (clipBox->y2 != WinBox.y2)) { @@ -861,7 +863,7 @@ KdXVReputImage(XvPortRecPrivatePtr portPriv) } if(portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) { - REGION_SUBTRACT(pScreen, &ClipRegion, &WinRegion, &ClipRegion); + RegionSubtract(&ClipRegion, &WinRegion, &ClipRegion); } ret = (*portPriv->AdaptorRec->ReputImage)(portPriv->screen, portPriv->pDraw, @@ -882,8 +884,8 @@ CLIP_VIDEO_BAILOUT: if(!portPriv->FreeCompositeClip) portPriv->pCompositeClip = NULL; - REGION_UNINIT(pScreen, &WinRegion); - REGION_UNINIT(pScreen, &ClipRegion); + RegionUninit(&WinRegion); + RegionUninit(&ClipRegion); return ret; } @@ -925,7 +927,7 @@ KdXVEnlistPortInWindow(WindowPtr pWin, XvPortRecPrivatePtr portPriv) } if(!winPriv) { - winPriv = xalloc(sizeof(KdXVWindowRec)); + winPriv = malloc(sizeof(KdXVWindowRec)); if(!winPriv) return BadAlloc; winPriv->PortRec = portPriv; winPriv->next = PrivRoot; @@ -948,7 +950,7 @@ KdXVRemovePortFromWindow(WindowPtr pWin, XvPortRecPrivatePtr portPriv) prevPriv->next = winPriv->next; else dixSetPrivate(&pWin->devPrivates, KdXVWindowKey, winPriv->next); - xfree(winPriv); + free(winPriv); break; } prevPriv = winPriv; @@ -998,7 +1000,7 @@ KdXVDestroyWindow(WindowPtr pWin) pPriv->pDraw = NULL; tmp = WinPriv; WinPriv = WinPriv->next; - xfree(tmp); + free(tmp); } dixSetPrivate(&pWin->devPrivates, KdXVWindowKey, NULL); @@ -1021,7 +1023,7 @@ KdXVWindowExposures(WindowPtr pWin, RegionPtr reg1, RegionPtr reg2) XvPortRecPrivatePtr pPriv; Bool AreasExposed; - AreasExposed = (WinPriv && reg1 && REGION_NOTEMPTY(pScreen, reg1)); + AreasExposed = (WinPriv && reg1 && RegionNotEmpty(reg1)); pScreen->WindowExposures = ScreenPriv->WindowExposures; (*pScreen->WindowExposures)(pWin, reg1, reg2); @@ -1063,7 +1065,7 @@ KdXVWindowExposures(WindowPtr pWin, RegionPtr reg1, RegionPtr reg2) pPrev->next = WinPriv->next; tmp = WinPriv; WinPriv = WinPriv->next; - xfree(tmp); + free(tmp); continue; } break; @@ -1089,7 +1091,7 @@ KdXVClipNotify(WindowPtr pWin, int dx, int dy) pPriv = WinPriv->PortRec; if(pPriv->pCompositeClip && pPriv->FreeCompositeClip) - REGION_DESTROY(pScreen, pPriv->pCompositeClip); + RegionDestroy(pPriv->pCompositeClip); pPriv->pCompositeClip = NULL; @@ -1112,7 +1114,7 @@ KdXVClipNotify(WindowPtr pWin, int dx, int dy) pPrev->next = WinPriv->next; tmp = WinPriv; WinPriv = WinPriv->next; - xfree(tmp); + free(tmp); continue; } } @@ -1153,8 +1155,8 @@ KdXVCloseScreen(int i, ScreenPtr pScreen) KdXVFreeAdaptor(pa); } - xfree(pxvs->pAdaptors); - xfree(ScreenPriv); + free(pxvs->pAdaptors); + free(ScreenPriv); return TRUE; } @@ -1171,7 +1173,7 @@ KdXVQueryAdaptors( *p_nAdaptors = pxvs->nAdaptors; *p_pAdaptors = pxvs->pAdaptors; - return (Success); + return Success; } static Bool @@ -1220,7 +1222,7 @@ KdXVDisable(ScreenPtr pScreen) pPriv->isOn = XV_OFF; if(pPriv->pCompositeClip && pPriv->FreeCompositeClip) - REGION_DESTROY(pScreen, pPriv->pCompositeClip); + RegionDestroy(pPriv->pCompositeClip); pPriv->pCompositeClip = NULL; @@ -1330,9 +1332,9 @@ KdXVPutStill( WinBox.x2 = WinBox.x1 + drw_w; WinBox.y2 = WinBox.y1 + drw_h; - REGION_INIT(pScreen, &WinRegion, &WinBox, 1); - REGION_INIT(pScreen, &ClipRegion, NullBox, 1); - REGION_INTERSECT(pScreen, &ClipRegion, &WinRegion, pGC->pCompositeClip); + RegionInit(&WinRegion, &WinBox, 1); + RegionInit(&ClipRegion, NullBox, 1); + RegionIntersect(&ClipRegion, &WinRegion, pGC->pCompositeClip); if(portPriv->AdaptorRec->flags & VIDEO_CLIP_TO_VIEWPORT) { RegionRec VPReg; @@ -1343,23 +1345,23 @@ KdXVPutStill( VPBox.x2 = screen->width; VPBox.y2 = screen->height; - REGION_INIT(pScreen, &VPReg, &VPBox, 1); - REGION_INTERSECT(Screen, &ClipRegion, &ClipRegion, &VPReg); - REGION_UNINIT(pScreen, &VPReg); + RegionInit(&VPReg, &VPBox, 1); + RegionIntersect(&ClipRegion, &ClipRegion, &VPReg); + RegionUninit(&VPReg); } if(portPriv->pDraw) { KdXVRemovePortFromWindow((WindowPtr)(portPriv->pDraw), portPriv); } - if(!REGION_NOTEMPTY(pScreen, &ClipRegion)) { + if(!RegionNotEmpty(&ClipRegion)) { clippedAway = TRUE; goto PUT_STILL_BAILOUT; } if(portPriv->AdaptorRec->flags & VIDEO_NO_CLIPPING) { - BoxPtr clipBox = REGION_RECTS(&ClipRegion); - if( (REGION_NUM_RECTS(&ClipRegion) != 1) || + BoxPtr clipBox = RegionRects(&ClipRegion); + if( (RegionNumRects(&ClipRegion) != 1) || (clipBox->x1 != WinBox.x1) || (clipBox->x2 != WinBox.x2) || (clipBox->y1 != WinBox.y1) || (clipBox->y2 != WinBox.y2)) { @@ -1369,7 +1371,7 @@ KdXVPutStill( } if(portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) { - REGION_SUBTRACT(pScreen, &ClipRegion, &WinRegion, &ClipRegion); + RegionSubtract(&ClipRegion, &WinRegion, &ClipRegion); } ret = (*portPriv->AdaptorRec->PutStill)(portPriv->screen, pDraw, @@ -1398,8 +1400,8 @@ PUT_STILL_BAILOUT: portPriv->isOn = XV_PENDING; } - REGION_UNINIT(pScreen, &WinRegion); - REGION_UNINIT(pScreen, &ClipRegion); + RegionUninit(&WinRegion); + RegionUninit(&ClipRegion); return ret; } @@ -1483,21 +1485,21 @@ KdXVGetStill( WinBox.x2 = WinBox.x1 + drw_w; WinBox.y2 = WinBox.y1 + drw_h; - REGION_INIT(pScreen, &WinRegion, &WinBox, 1); - REGION_INIT(pScreen, &ClipRegion, NullBox, 1); - REGION_INTERSECT(pScreen, &ClipRegion, &WinRegion, pGC->pCompositeClip); + RegionInit(&WinRegion, &WinBox, 1); + RegionInit(&ClipRegion, NullBox, 1); + RegionIntersect(&ClipRegion, &WinRegion, pGC->pCompositeClip); if(portPriv->pDraw) { KdXVRemovePortFromWindow((WindowPtr)(portPriv->pDraw), portPriv); } - if(!REGION_NOTEMPTY(pScreen, &ClipRegion)) { + if(!RegionNotEmpty(&ClipRegion)) { clippedAway = TRUE; goto GET_STILL_BAILOUT; } if(portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) { - REGION_SUBTRACT(pScreen, &ClipRegion, &WinRegion, &ClipRegion); + RegionSubtract(&ClipRegion, &WinRegion, &ClipRegion); } ret = (*portPriv->AdaptorRec->GetStill)(portPriv->screen, pDraw, @@ -1513,8 +1515,8 @@ GET_STILL_BAILOUT: portPriv->isOn = XV_PENDING; } - REGION_UNINIT(pScreen, &WinRegion); - REGION_UNINIT(pScreen, &ClipRegion); + RegionUninit(&WinRegion); + RegionUninit(&ClipRegion); return ret; } @@ -1630,9 +1632,9 @@ KdXVPutImage( WinBox.x2 = WinBox.x1 + drw_w; WinBox.y2 = WinBox.y1 + drw_h; - REGION_INIT(pScreen, &WinRegion, &WinBox, 1); - REGION_INIT(pScreen, &ClipRegion, NullBox, 1); - REGION_INTERSECT(pScreen, &ClipRegion, &WinRegion, pGC->pCompositeClip); + RegionInit(&WinRegion, &WinBox, 1); + RegionInit(&ClipRegion, NullBox, 1); + RegionIntersect(&ClipRegion, &WinRegion, pGC->pCompositeClip); if(portPriv->AdaptorRec->flags & VIDEO_CLIP_TO_VIEWPORT) { RegionRec VPReg; @@ -1643,23 +1645,23 @@ KdXVPutImage( VPBox.x2 = pScreen->width; VPBox.y2 = pScreen->height; - REGION_INIT(pScreen, &VPReg, &VPBox, 1); - REGION_INTERSECT(Screen, &ClipRegion, &ClipRegion, &VPReg); - REGION_UNINIT(pScreen, &VPReg); + RegionInit(&VPReg, &VPBox, 1); + RegionIntersect(&ClipRegion, &ClipRegion, &VPReg); + RegionUninit(&VPReg); } if(portPriv->pDraw) { KdXVRemovePortFromWindow((WindowPtr)(portPriv->pDraw), portPriv); } - if(!REGION_NOTEMPTY(pScreen, &ClipRegion)) { + if(!RegionNotEmpty(&ClipRegion)) { clippedAway = TRUE; goto PUT_IMAGE_BAILOUT; } if(portPriv->AdaptorRec->flags & VIDEO_NO_CLIPPING) { - BoxPtr clipBox = REGION_RECTS(&ClipRegion); - if( (REGION_NUM_RECTS(&ClipRegion) != 1) || + BoxPtr clipBox = RegionRects(&ClipRegion); + if( (RegionNumRects(&ClipRegion) != 1) || (clipBox->x1 != WinBox.x1) || (clipBox->x2 != WinBox.x2) || (clipBox->y1 != WinBox.y1) || (clipBox->y2 != WinBox.y2)) { @@ -1669,7 +1671,7 @@ KdXVPutImage( } if(portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) { - REGION_SUBTRACT(pScreen, &ClipRegion, &WinRegion, &ClipRegion); + RegionSubtract(&ClipRegion, &WinRegion, &ClipRegion); } ret = (*portPriv->AdaptorRec->PutImage)(portPriv->screen, pDraw, @@ -1698,8 +1700,8 @@ PUT_IMAGE_BAILOUT: portPriv->isOn = XV_PENDING; } - REGION_UNINIT(pScreen, &WinRegion); - REGION_UNINIT(pScreen, &ClipRegion); + RegionUninit(&WinRegion); + RegionUninit(&ClipRegion); return ret; } @@ -1867,12 +1869,12 @@ void KXVPaintRegion (DrawablePtr pDraw, RegionPtr pRgn, Pixel fg) { GCPtr pGC; - CARD32 val[2]; + ChangeGCVal val[2]; xRectangle *rects, *r; - BoxPtr pBox = REGION_RECTS (pRgn); - int nBox = REGION_NUM_RECTS (pRgn); + BoxPtr pBox = RegionRects (pRgn); + int nBox = RegionNumRects (pRgn); - rects = xalloc (nBox * sizeof (xRectangle)); + rects = malloc(nBox * sizeof (xRectangle)); if (!rects) goto bail0; r = rects; @@ -1890,18 +1892,18 @@ KXVPaintRegion (DrawablePtr pDraw, RegionPtr pRgn, Pixel fg) if (!pGC) goto bail1; - val[0] = fg; - val[1] = IncludeInferiors; - ChangeGC (pGC, GCForeground|GCSubwindowMode, val); + val[0].val = fg; + val[1].val = IncludeInferiors; + ChangeGC (NullClient, pGC, GCForeground|GCSubwindowMode, val); ValidateGC (pDraw, pGC); (*pGC->ops->PolyFillRect) (pDraw, pGC, - REGION_NUM_RECTS (pRgn), rects); + RegionNumRects (pRgn), rects); FreeScratchGC (pGC); bail1: - xfree (rects); + free(rects); bail0: ; } diff --git a/xserver/hw/kdrive/wscons/Makefile.in b/xserver/hw/kdrive/wscons/Makefile.in index d2cde0a6b..f7f2ba507 100644 --- a/xserver/hw/kdrive/wscons/Makefile.in +++ b/xserver/hw/kdrive/wscons/Makefile.in @@ -119,10 +119,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -210,6 +206,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -224,6 +222,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -241,10 +240,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -300,10 +303,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -321,17 +325,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -358,20 +356,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -463,6 +464,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/vfb/InitInput.c b/xserver/hw/vfb/InitInput.c index 10bb6a599..801aaa0b4 100644 --- a/xserver/hw/vfb/InitInput.c +++ b/xserver/hw/vfb/InitInput.c @@ -38,7 +38,6 @@ from The Open Group. #include #include "mibstore.h" #include "mipointer.h" -#include "lk201kbd.h" #include "xkbsrv.h" #include #include "xserver-properties.h" @@ -63,7 +62,6 @@ void DDXRingBell(int volume, int pitch, int duration) #define VFB_MIN_KEY 8 #define VFB_MAX_KEY 255 -KeySym map[MAP_LENGTH * LK201_GLYPHS_PER_KEY]; static int vfbKeybdProc(DeviceIntPtr pDevice, int onoff) diff --git a/xserver/hw/vfb/InitOutput.c b/xserver/hw/vfb/InitOutput.c index 841d762e2..e10973480 100644 --- a/xserver/hw/vfb/InitOutput.c +++ b/xserver/hw/vfb/InitOutput.c @@ -77,7 +77,6 @@ from The Open Group. typedef struct { - int scrnum; int width; int paddedBytesWidth; int paddedWidth; @@ -105,7 +104,15 @@ typedef struct } vfbScreenInfo, *vfbScreenInfoPtr; static int vfbNumScreens; -static vfbScreenInfo vfbScreens[MAXSCREENS]; +static vfbScreenInfo *vfbScreens; +static vfbScreenInfo defaultScreenInfo = { + .width = VFB_DEFAULT_WIDTH, + .height = VFB_DEFAULT_HEIGHT, + .depth = VFB_DEFAULT_DEPTH, + .blackPixel = VFB_DEFAULT_BLACKPIXEL, + .whitePixel = VFB_DEFAULT_WHITEPIXEL, + .lineBias = VFB_DEFAULT_LINEBIAS, +}; static Bool vfbPixmapDepths[33]; #ifdef HAS_MMAP static char *pfbdir = NULL; @@ -113,7 +120,6 @@ static char *pfbdir = NULL; typedef enum { NORMAL_MEMORY_FB, SHARED_MEMORY_FB, MMAPPED_FILE_FB } fbMemType; static fbMemType fbmemtype = NORMAL_MEMORY_FB; static char needswap = 0; -static int lastScreen = -1; static Bool Render = TRUE; #define swapcopy16(_dst, _src) \ @@ -134,25 +140,6 @@ vfbInitializePixmapDepths(void) vfbPixmapDepths[i] = FALSE; } -static void -vfbInitializeDefaultScreens(void) -{ - int i; - - for (i = 0; i < MAXSCREENS; i++) - { - vfbScreens[i].scrnum = i; - vfbScreens[i].width = VFB_DEFAULT_WIDTH; - vfbScreens[i].height = VFB_DEFAULT_HEIGHT; - vfbScreens[i].depth = VFB_DEFAULT_DEPTH; - vfbScreens[i].blackPixel = VFB_DEFAULT_BLACKPIXEL; - vfbScreens[i].whitePixel = VFB_DEFAULT_WHITEPIXEL; - vfbScreens[i].lineBias = VFB_DEFAULT_LINEBIAS; - vfbScreens[i].pfbMemory = NULL; - } - vfbNumScreens = 1; -} - static int vfbBitsPerPixel(int depth) { @@ -207,7 +194,7 @@ ddxGiveUp(void) case NORMAL_MEMORY_FB: for (i = 0; i < vfbNumScreens; i++) { - Xfree(vfbScreens[i].pXWDHeader); + free(vfbScreens[i].pXWDHeader); } break; } @@ -248,10 +235,8 @@ ddxUseMsg(void) { ErrorF("-screen scrn WxHxD set screen's width, height, depth\n"); ErrorF("-pixdepths list-of-int support given pixmap depths\n"); -#ifdef RENDER ErrorF("+/-render turn on/off RENDER extension support" "(default on)\n"); -#endif ErrorF("-linebias n adjust thin line pixelization\n"); ErrorF("-blackpixel n pixel value for black\n"); ErrorF("-whitepixel n pixel value for white\n"); @@ -269,14 +254,20 @@ int ddxProcessArgument(int argc, char *argv[], int i) { static Bool firstTime = TRUE; + static int lastScreen = -1; + vfbScreenInfo *currentScreen; if (firstTime) { - vfbInitializeDefaultScreens(); vfbInitializePixmapDepths(); firstTime = FALSE; } + if (lastScreen == -1) + currentScreen = &defaultScreenInfo; + else + currentScreen = &vfbScreens[lastScreen]; + #define CHECK_FOR_REQUIRED_ARGUMENTS(num) \ if (((i + num) >= argc) || (!argv[i + num])) { \ ErrorF("Required argument to %s not specified\n", argv[i]); \ @@ -289,13 +280,23 @@ ddxProcessArgument(int argc, char *argv[], int i) int screenNum; CHECK_FOR_REQUIRED_ARGUMENTS(2); screenNum = atoi(argv[i+1]); - if (screenNum < 0 || screenNum >= MAXSCREENS) + if (screenNum < 0) { ErrorF("Invalid screen number %d\n", screenNum); UseMsg(); FatalError("Invalid screen number %d passed to -screen\n", screenNum); } + + if (vfbNumScreens <= screenNum) + { + vfbScreens = realloc(vfbScreens, sizeof(*vfbScreens) * (screenNum + 1)); + if (!vfbScreens) + FatalError("Not enough memory for screen %d\n", screenNum); + for (; vfbNumScreens <= screenNum; ++vfbNumScreens) + vfbScreens[vfbNumScreens] = defaultScreenInfo; + } + if (3 != sscanf(argv[i+2], "%dx%dx%d", &vfbScreens[screenNum].width, &vfbScreens[screenNum].height, @@ -307,8 +308,6 @@ ddxProcessArgument(int argc, char *argv[], int i) argv[i+2], screenNum); } - if (screenNum >= vfbNumScreens) - vfbNumScreens = screenNum + 1; lastScreen = screenNum; return 3; } @@ -350,61 +349,22 @@ ddxProcessArgument(int argc, char *argv[], int i) if (strcmp (argv[i], "-blackpixel") == 0) /* -blackpixel n */ { - Pixel pix; CHECK_FOR_REQUIRED_ARGUMENTS(1); - pix = atoi(argv[++i]); - if (-1 == lastScreen) - { - int i; - for (i = 0; i < MAXSCREENS; i++) - { - vfbScreens[i].blackPixel = pix; - } - } - else - { - vfbScreens[lastScreen].blackPixel = pix; - } + currentScreen->blackPixel = atoi(argv[++i]); return 2; } if (strcmp (argv[i], "-whitepixel") == 0) /* -whitepixel n */ { - Pixel pix; CHECK_FOR_REQUIRED_ARGUMENTS(1); - pix = atoi(argv[++i]); - if (-1 == lastScreen) - { - int i; - for (i = 0; i < MAXSCREENS; i++) - { - vfbScreens[i].whitePixel = pix; - } - } - else - { - vfbScreens[lastScreen].whitePixel = pix; - } + currentScreen->whitePixel = atoi(argv[++i]); return 2; } if (strcmp (argv[i], "-linebias") == 0) /* -linebias n */ { - unsigned int linebias; CHECK_FOR_REQUIRED_ARGUMENTS(1); - linebias = atoi(argv[++i]); - if (-1 == lastScreen) - { - int i; - for (i = 0; i < MAXSCREENS; i++) - { - vfbScreens[i].lineBias = linebias; - } - } - else - { - vfbScreens[lastScreen].lineBias = linebias; - } + currentScreen->lineBias = atoi(argv[++i]); return 2; } @@ -429,23 +389,26 @@ ddxProcessArgument(int argc, char *argv[], int i) return 0; } -static ColormapPtr InstalledMaps[MAXSCREENS]; +static DevPrivateKeyRec cmapScrPrivateKeyRec; +#define cmapScrPrivateKey (&cmapScrPrivateKeyRec) + +#define GetInstalledColormap(s) ((ColormapPtr) dixLookupPrivate(&(s)->devPrivates, cmapScrPrivateKey)) +#define SetInstalledColormap(s,c) (dixSetPrivate(&(s)->devPrivates, cmapScrPrivateKey, c)) static int vfbListInstalledColormaps(ScreenPtr pScreen, Colormap *pmaps) { /* By the time we are processing requests, we can guarantee that there * is always a colormap installed */ - *pmaps = InstalledMaps[pScreen->myNum]->mid; - return (1); + *pmaps = GetInstalledColormap(pScreen)->mid; + return 1; } static void vfbInstallColormap(ColormapPtr pmap) { - int index = pmap->pScreen->myNum; - ColormapPtr oldpmap = InstalledMaps[index]; + ColormapPtr oldpmap = GetInstalledColormap(pmap->pScreen); if (pmap != oldpmap) { @@ -461,7 +424,7 @@ vfbInstallColormap(ColormapPtr pmap) if(oldpmap != (ColormapPtr)None) WalkTree(pmap->pScreen, TellLostMap, (char *)&oldpmap->mid); /* Install pmap */ - InstalledMaps[index] = pmap; + SetInstalledColormap(pmap->pScreen, pmap); WalkTree(pmap->pScreen, TellGainedMap, (char *)&pmap->mid); entries = pmap->pVisual->ColormapEntries; @@ -476,13 +439,13 @@ vfbInstallColormap(ColormapPtr pmap) swapcopy32(pXWDHeader->bits_per_rgb, pVisual->bitsPerRGBValue); swapcopy32(pXWDHeader->colormap_entries, pVisual->ColormapEntries); - ppix = (Pixel *)xalloc(entries * sizeof(Pixel)); - prgb = (xrgb *)xalloc(entries * sizeof(xrgb)); - defs = (xColorItem *)xalloc(entries * sizeof(xColorItem)); + ppix = (Pixel *)malloc(entries * sizeof(Pixel)); + prgb = (xrgb *)malloc(entries * sizeof(xrgb)); + defs = (xColorItem *)malloc(entries * sizeof(xColorItem)); for (i = 0; i < entries; i++) ppix[i] = i; /* XXX truecolor */ - QueryColors(pmap, entries, ppix, prgb); + QueryColors(pmap, entries, ppix, prgb, serverClient); for (i = 0; i < entries; i++) { /* convert xrgbs to xColorItems */ defs[i].pixel = ppix[i] & 0xff; /* change pixel to index */ @@ -493,16 +456,16 @@ vfbInstallColormap(ColormapPtr pmap) } (*pmap->pScreen->StoreColors)(pmap, entries, defs); - xfree(ppix); - xfree(prgb); - xfree(defs); + free(ppix); + free(prgb); + free(defs); } } static void vfbUninstallColormap(ColormapPtr pmap) { - ColormapPtr curpmap = InstalledMaps[pmap->pScreen->myNum]; + ColormapPtr curpmap = GetInstalledColormap(pmap->pScreen); if(pmap == curpmap) { @@ -523,7 +486,7 @@ vfbStoreColors(ColormapPtr pmap, int ndef, xColorItem *pdefs) XWDColor *pXWDCmap; int i; - if (pmap != InstalledMaps[pmap->pScreen->myNum]) + if (pmap != GetInstalledColormap(pmap->pScreen)) { return; } @@ -597,7 +560,7 @@ vfbAllocateMmappedFramebuffer(vfbScreenInfoPtr pvfb) char dummyBuffer[DUMMY_BUFFER_SIZE]; int currentFileSize, writeThisTime; - sprintf(pvfb->mmap_file, "%s/Xvfb_screen%d", pfbdir, pvfb->scrnum); + sprintf(pvfb->mmap_file, "%s/Xvfb_screen%d", pfbdir, (int) (pvfb - vfbScreens)); if (-1 == (pvfb->mmap_fd = open(pvfb->mmap_file, O_CREAT|O_RDWR, 0666))) { perror("open"); @@ -607,7 +570,7 @@ vfbAllocateMmappedFramebuffer(vfbScreenInfoPtr pvfb) /* Extend the file to be the proper size */ - bzero(dummyBuffer, DUMMY_BUFFER_SIZE); + memset(dummyBuffer, 0, DUMMY_BUFFER_SIZE); for (currentFileSize = 0; currentFileSize < pvfb->sizeInBytes; currentFileSize += writeThisTime) @@ -670,7 +633,7 @@ vfbAllocateSharedMemoryFramebuffer(vfbScreenInfoPtr pvfb) return; } - ErrorF("screen %d shmid %d\n", pvfb->scrnum, pvfb->shmid); + ErrorF("screen %d shmid %d\n", (int) (pvfb - vfbScreens), pvfb->shmid); } #endif /* HAS_SHM */ @@ -719,7 +682,7 @@ vfbAllocateFramebufferMemory(vfbScreenInfoPtr pvfb) #endif case NORMAL_MEMORY_FB: - pvfb->pXWDHeader = (XWDFileHeader *)Xalloc(pvfb->sizeInBytes); + pvfb->pXWDHeader = (XWDFileHeader *)malloc(pvfb->sizeInBytes); break; } @@ -832,10 +795,10 @@ vfbCloseScreen(int index, ScreenPtr pScreen) /* * XXX probably lots of stuff to clean. For now, - * clear InstalledMaps[] so that server reset works correctly. + * clear installed colormaps so that server reset works correctly. */ - for (i = 0; i < MAXSCREENS; i++) - InstalledMaps[i] = NULL; + for (i = 0; i < screenInfo.numScreens; i++) + SetInstalledColormap(screenInfo.screens[i], NULL); return pScreen->CloseScreen(index, pScreen); } @@ -848,6 +811,9 @@ vfbScreenInit(int index, ScreenPtr pScreen, int argc, char **argv) int ret; char *pbits; + if (!dixRegisterPrivateKey(&cmapScrPrivateKeyRec, PRIVATE_SCREEN, 0)) + return FALSE; + if (dpix == 0) dpix = 100; @@ -904,10 +870,8 @@ vfbScreenInit(int index, ScreenPtr pScreen, int argc, char **argv) ret = fbScreenInit(pScreen, pbits, pvfb->width, pvfb->height, dpix, dpiy, pvfb->paddedWidth,pvfb->bitsPerPixel); -#ifdef RENDER if (ret && Render) fbPictureInit (pScreen, 0, 0); -#endif if (!ret) return FALSE; @@ -996,6 +960,11 @@ InitOutput(ScreenInfo *screenInfo, int argc, char **argv) /* initialize screens */ + if (vfbNumScreens < 1) + { + vfbScreens = &defaultScreenInfo; + vfbNumScreens = 1; + } for (i = 0; i < vfbNumScreens; i++) { if (-1 == AddScreen(vfbScreenInit, argc, argv)) diff --git a/xserver/hw/vfb/Makefile.am b/xserver/hw/vfb/Makefile.am index 4ac0c8f89..de5e1c5c9 100644 --- a/xserver/hw/vfb/Makefile.am +++ b/xserver/hw/vfb/Makefile.am @@ -9,7 +9,6 @@ AM_CFLAGS = -DHAVE_DIX_CONFIG_H \ SRCS = InitInput.c \ InitOutput.c \ - lk201kbd.h \ $(top_srcdir)/Xext/dpmsstubs.c \ $(top_srcdir)/Xi/stubs.c \ $(top_srcdir)/mi/miinitext.c diff --git a/xserver/hw/vfb/Makefile.in b/xserver/hw/vfb/Makefile.in index ffedb4b0f..180a741c2 100644 --- a/xserver/hw/vfb/Makefile.in +++ b/xserver/hw/vfb/Makefile.in @@ -135,10 +135,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -226,6 +222,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -240,6 +238,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -257,10 +256,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -316,10 +319,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -337,17 +341,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -374,20 +372,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -479,6 +480,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ @@ -638,7 +640,6 @@ AM_CFLAGS = -DHAVE_DIX_CONFIG_H \ SRCS = InitInput.c \ InitOutput.c \ - lk201kbd.h \ $(top_srcdir)/Xext/dpmsstubs.c \ $(top_srcdir)/Xi/stubs.c \ $(top_srcdir)/mi/miinitext.c diff --git a/xserver/hw/vfb/lk201kbd.h b/xserver/hw/vfb/lk201kbd.h deleted file mode 100644 index d0198d06b..000000000 --- a/xserver/hw/vfb/lk201kbd.h +++ /dev/null @@ -1,158 +0,0 @@ -/*********************************************************** - -Copyright 1987, 1998 The Open Group - -Permission to use, copy, modify, distribute, and sell this software and its -documentation for any purpose is hereby granted without fee, provided that -the above copyright notice appear in all copies and that both that -copyright notice and this permission notice appear in supporting -documentation. - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -Except as contained in this notice, the name of The Open Group shall not be -used in advertising or otherwise to promote the sale, use or other dealings -in this Software without prior written authorization from The Open Group. - - -Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. - - All Rights Reserved - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and that -both that copyright notice and this permission notice appear in -supporting documentation, and that the name of Digital not be -used in advertising or publicity pertaining to distribution of the -software without specific, written prior permission. - -DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING -ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL -DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR -ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, -WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, -ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS -SOFTWARE. - -******************************************************************/ - - -#define MIN_LK201_KEY 86 -#define MAX_LK201_KEY 251 -#define LK201_GLYPHS_PER_KEY 2 - -#define KEY_F1 86 -#define KEY_F2 87 -#define KEY_F3 88 -#define KEY_F4 89 -#define KEY_F5 90 -#define KEY_F6 100 -#define KEY_F7 101 -#define KEY_F8 102 -#define KEY_F9 103 -#define KEY_F10 104 -#define KEY_F11 113 -#define KEY_F12 114 -#define KEY_F13 115 -#define KEY_F14 116 -#define KEY_HELP 124 -#define KEY_MENU 125 -#define KEY_F17 128 -#define KEY_F18 129 -#define KEY_F19 130 -#define KEY_F20 131 -#define KEY_FIND 138 -#define KEY_INSERT_HERE 139 -#define KEY_REMOVE 140 -#define KEY_SELECT 141 -#define KEY_PREV_SCREEN 142 -#define KEY_NEXT_SCREEN 143 -#define KEY_KP_0 146 /* key pad */ -#define KEY_KP_PERIOD 148 /* key pad */ -#define KEY_KP_ENTER 149 /* key pad */ -#define KEY_KP_1 150 /* key pad */ -#define KEY_KP_2 151 /* key pad */ -#define KEY_KP_3 152 /* key pad */ -#define KEY_KP_4 153 /* key pad */ -#define KEY_KP_5 154 /* key pad */ -#define KEY_KP_6 155 /* key pad */ -#define KEY_KP_COMMA 156 /* key pad */ -#define KEY_KP_7 157 /* key pad */ -#define KEY_KP_8 158 /* key pad */ -#define KEY_KP_9 159 /* key pad */ -#define KEY_KP_HYPHEN 160 -#define KEY_KP_PF1 161 -#define KEY_KP_PF2 162 -#define KEY_KP_PF3 163 -#define KEY_KP_PF4 164 -#define KEY_LEFT 167 -#define KEY_RIGHT 168 -#define KEY_DOWN 169 -#define KEY_UP 170 -#define KEY_SHIFT 174 -#define KEY_CTRL 175 -#define KEY_LOCK 176 -#define KEY_COMPOSE 177 -#define KEY_APPLE 177 -#define KEY_META 177 -#define KEY_DELETE 188 -#define KEY_RETURN 189 -#define KEY_TAB 190 -#define KEY_TILDE 191 -#define KEY_TR_1 192 /* Top Row */ -#define KEY_Q 193 -#define KEY_A 194 -#define KEY_Z 195 -#define KEY_TR_2 197 -#define KEY_W 198 -#define KEY_S 199 -#define KEY_X 200 -#define KEY_LANGLE_RANGLE 201 /* xxx */ -#define KEY_TR_3 203 -#define KEY_E 204 -#define KEY_D 205 -#define KEY_C 206 -#define KEY_TR_4 208 -#define KEY_R 209 -#define KEY_F 210 -#define KEY_V 211 -#define KEY_SPACE 212 -#define KEY_TR_5 214 -#define KEY_T 215 -#define KEY_G 216 -#define KEY_B 217 -#define KEY_TR_6 219 -#define KEY_Y 220 -#define KEY_H 221 -#define KEY_N 222 -#define KEY_TR_7 224 -#define KEY_U 225 -#define KEY_J 226 -#define KEY_M 227 -#define KEY_TR_8 229 -#define KEY_I 230 -#define KEY_K 231 -#define KEY_COMMA 232 /* xxx */ -#define KEY_TR_9 234 -#define KEY_O 235 -#define KEY_L 236 -#define KEY_PERIOD 237 /* xxx */ -#define KEY_TR_0 239 -#define KEY_P 240 -#define KEY_SEMICOLON 242 /* xxx */ -#define KEY_QMARK 243 -#define KEY_PLUS 245 /* xxx */ -#define KEY_RBRACE 246 -#define KEY_VBAR 247 /* xxx */ -#define KEY_UBAR 249 /* xxx */ -#define KEY_LBRACE 250 -#define KEY_QUOTE 251 diff --git a/xserver/hw/xfree86/Makefile.in b/xserver/hw/xfree86/Makefile.in index d8d411d84..a1ef86c31 100644 --- a/xserver/hw/xfree86/Makefile.in +++ b/xserver/hw/xfree86/Makefile.in @@ -134,10 +134,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -225,6 +221,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -239,6 +237,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -256,10 +255,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -315,10 +318,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -336,17 +340,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -373,20 +371,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -478,6 +479,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/xfree86/common/Makefile.am b/xserver/hw/xfree86/common/Makefile.am index ad27210cd..821a2b500 100644 --- a/xserver/hw/xfree86/common/Makefile.am +++ b/xserver/hw/xfree86/common/Makefile.am @@ -41,6 +41,7 @@ libcommon_la_SOURCES = xf86Configure.c xf86ShowOpts.c xf86Bus.c xf86Config.c \ xf86Mode.c xorgHelper.c \ $(XVSOURCES) $(BUSSOURCES) $(RANDRSOURCES) nodist_libcommon_la_SOURCES = xf86DefModeSet.c xf86Build.h +libcommon_la_LIBADD = $(top_builddir)/config/libconfig.la INCLUDES = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c \ -I$(srcdir)/../loader -I$(srcdir)/../parser \ diff --git a/xserver/hw/xfree86/common/Makefile.in b/xserver/hw/xfree86/common/Makefile.in index 7159e05d3..541593e86 100644 --- a/xserver/hw/xfree86/common/Makefile.in +++ b/xserver/hw/xfree86/common/Makefile.in @@ -57,7 +57,7 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ $(top_builddir)/include/version-config.h CONFIG_CLEAN_FILES = xf86Build.h LTLIBRARIES = $(noinst_LTLIBRARIES) -libcommon_la_LIBADD = +libcommon_la_DEPENDENCIES = $(top_builddir)/config/libconfig.la am__libcommon_la_SOURCES_DIST = xf86Configure.c xf86ShowOpts.c \ xf86Bus.c xf86Config.c xf86Cursor.c xf86DGA.c xf86DPMS.c \ xf86Events.c xf86Globals.c xf86AutoConfig.c xf86Option.c \ @@ -145,10 +145,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -236,6 +232,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -250,6 +248,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -267,10 +266,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -326,10 +329,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -347,17 +351,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -384,20 +382,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -489,6 +490,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ @@ -657,6 +659,7 @@ libcommon_la_SOURCES = xf86Configure.c xf86ShowOpts.c xf86Bus.c xf86Config.c \ $(XVSOURCES) $(BUSSOURCES) $(RANDRSOURCES) nodist_libcommon_la_SOURCES = xf86DefModeSet.c xf86Build.h +libcommon_la_LIBADD = $(top_builddir)/config/libconfig.la INCLUDES = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c \ -I$(srcdir)/../loader -I$(srcdir)/../parser \ -I$(srcdir)/../vbe -I$(srcdir)/../int10 \ diff --git a/xserver/hw/xfree86/common/compiler.h b/xserver/hw/xfree86/common/compiler.h index ded71ee22..958f8d027 100644 --- a/xserver/hw/xfree86/common/compiler.h +++ b/xserver/hw/xfree86/common/compiler.h @@ -103,7 +103,7 @@ # if defined(NO_INLINE) || defined(DO_PROTOTYPES) # if !defined(__arm__) -# if !defined(__sparc__) && !defined(__sparc) && !defined(__arm32__) \ +# if !defined(__sparc__) && !defined(__sparc) && !defined(__arm32__) && !defined(__nds32__) \ && !(defined(__alpha__) && defined(linux)) \ && !(defined(__ia64__) && defined(linux)) \ @@ -114,7 +114,7 @@ extern _X_EXPORT unsigned int inb(unsigned short); extern _X_EXPORT unsigned int inw(unsigned short); extern _X_EXPORT unsigned int inl(unsigned short); -# else /* __sparc__, __arm32__, __alpha__*/ +# else /* __sparc__, __arm32__, __alpha__, __nds32__ */ extern _X_EXPORT void outb(unsigned long, unsigned char); extern _X_EXPORT void outw(unsigned long, unsigned short); @@ -123,7 +123,7 @@ extern _X_EXPORT unsigned int inb(unsigned long); extern _X_EXPORT unsigned int inw(unsigned long); extern _X_EXPORT unsigned int inl(unsigned long); -# endif /* __sparc__, __arm32__, __alpha__ */ +# endif /* __sparc__, __arm32__, __alpha__, __nds32__ */ # endif /* __arm__ */ # if defined(__powerpc__) && !defined(__OpenBSD__) @@ -1018,6 +1018,355 @@ xf_outl(unsigned short port, unsigned int val) #define outw xf_outw #define outl xf_outl +# elif defined(__nds32__) + +/* + * Assume all port access are aligned. We need to revise this implementation + * if there is unaligned port access. For ldq_u, ldl_u, ldw_u, stq_u, stl_u and + * stw_u, they are assumed unaligned. + */ + +#define barrier() /* no barrier */ + +#define PORT_SIZE long + +static __inline__ unsigned char +xf86ReadMmio8(__volatile__ void *base, const unsigned long offset) +{ + return *(volatile unsigned char *)((unsigned char *)base + offset) ; +} + +static __inline__ void +xf86WriteMmio8(__volatile__ void *base, const unsigned long offset, + const unsigned int val) +{ + *(volatile unsigned char *)((unsigned char *)base + offset) = val ; + barrier(); +} + +static __inline__ void +xf86WriteMmio8NB(__volatile__ void *base, const unsigned long offset, + const unsigned int val) +{ + *(volatile unsigned char *)((unsigned char *)base + offset) = val ; +} + +static __inline__ unsigned short +xf86ReadMmio16Swap(__volatile__ void *base, const unsigned long offset) +{ + unsigned long addr = ((unsigned long)base) + offset; + unsigned short ret; + + __asm__ __volatile__( + "lhi %0, [%1];\n\t" + "wsbh %0, %0;\n\t" + : "=r" (ret) + : "r" (addr)); + return ret; +} + +static __inline__ unsigned short +xf86ReadMmio16(__volatile__ void *base, const unsigned long offset) +{ + return *(volatile unsigned short *)((char *)base + offset) ; +} + +static __inline__ void +xf86WriteMmio16Swap(__volatile__ void *base, const unsigned long offset, + const unsigned int val) +{ + unsigned long addr = ((unsigned long)base) + offset; + + __asm__ __volatile__( + "wsbh %0, %0;\n\t" + "shi %0, [%1];\n\t" + : /* No outputs */ + : "r" (val), "r" (addr)); + barrier(); +} + +static __inline__ void +xf86WriteMmio16(__volatile__ void *base, const unsigned long offset, + const unsigned int val) +{ + *(volatile unsigned short *)((unsigned char *)base + offset) = val ; + barrier(); +} + +static __inline__ void +xf86WriteMmio16SwapNB(__volatile__ void *base, const unsigned long offset, + const unsigned int val) +{ + unsigned long addr = ((unsigned long)base) + offset; + + __asm__ __volatile__( + "wsbh %0, %0;\n\t" + "shi %0, [%1];\n\t" + : /* No outputs */ + : "r" (val), "r" (addr)); +} + +static __inline__ void +xf86WriteMmio16NB(__volatile__ void *base, const unsigned long offset, + const unsigned int val) +{ + *(volatile unsigned short *)((unsigned char *)base + offset) = val ; +} + +static __inline__ unsigned int +xf86ReadMmio32Swap(__volatile__ void *base, const unsigned long offset) +{ + unsigned long addr = ((unsigned long)base) + offset; + unsigned int ret; + + __asm__ __volatile__( + "lwi %0, [%1];\n\t" + "wsbh %0, %0;\n\t" + "rotri %0, %0, 16;\n\t" + : "=r" (ret) + : "r" (addr)); + return ret; +} + +static __inline__ unsigned int +xf86ReadMmio32(__volatile__ void *base, const unsigned long offset) +{ + return *(volatile unsigned int *)((unsigned char *)base + offset) ; +} + +static __inline__ void +xf86WriteMmio32Swap(__volatile__ void *base, const unsigned long offset, + const unsigned int val) +{ + unsigned long addr = ((unsigned long)base) + offset; + + __asm__ __volatile__( + "wsbh %0, %0;\n\t" + "rotri %0, %0, 16;\n\t" + "swi %0, [%1];\n\t" + : /* No outputs */ + : "r" (val), "r" (addr)); + barrier(); +} + +static __inline__ void +xf86WriteMmio32(__volatile__ void *base, const unsigned long offset, + const unsigned int val) +{ + *(volatile unsigned int *)((unsigned char *)base + offset) = val ; + barrier(); +} + +static __inline__ void +xf86WriteMmio32SwapNB(__volatile__ void *base, const unsigned long offset, + const unsigned int val) +{ + unsigned long addr = ((unsigned long)base) + offset; + + __asm__ __volatile__( + "wsbh %0, %0;\n\t" + "rotri %0, %0, 16;\n\t" + "swi %0, [%1];\n\t" + : /* No outputs */ + : "r" (val), "r" (addr)); +} + +static __inline__ void +xf86WriteMmio32NB(__volatile__ void *base, const unsigned long offset, + const unsigned int val) +{ + *(volatile unsigned int *)((unsigned char *)base + offset) = val ; +} + +# if defined(NDS32_MMIO_SWAP) +static __inline__ void +outb(unsigned PORT_SIZE port, unsigned char val) +{ + xf86WriteMmio8(IOPortBase, port, val); +} + +static __inline__ void +outw(unsigned PORT_SIZE port, unsigned short val) +{ + xf86WriteMmio16Swap(IOPortBase, port, val); +} + +static __inline__ void +outl(unsigned PORT_SIZE port, unsigned int val) +{ + xf86WriteMmio32Swap(IOPortBase, port, val); +} + +static __inline__ unsigned int +inb(unsigned PORT_SIZE port) +{ + return xf86ReadMmio8(IOPortBase, port); +} + +static __inline__ unsigned int +inw(unsigned PORT_SIZE port) +{ + return xf86ReadMmio16Swap(IOPortBase, port); +} + +static __inline__ unsigned int +inl(unsigned PORT_SIZE port) +{ + return xf86ReadMmio32Swap(IOPortBase, port); +} + +static __inline__ unsigned long ldq_u(unsigned long *p) +{ + unsigned long addr = (unsigned long)p; + unsigned int ret; + + __asm__ __volatile__( + "lmw.bi %0, [%1], %0, 0;\n\t" + "wsbh %0, %0;\n\t" + "rotri %0, %0, 16;\n\t" + : "=r" (ret) + : "r" (addr)); + return ret; +} + +static __inline__ unsigned long ldl_u(unsigned int *p) +{ + unsigned long addr = (unsigned long)p; + unsigned int ret; + + __asm__ __volatile__( + "lmw.bi %0, [%1], %0, 0;\n\t" + "wsbh %0, %0;\n\t" + "rotri %0, %0, 16;\n\t" + : "=r" (ret) + : "r" (addr)); + return ret; +} + +static __inline__ void stq_u(unsigned long val, unsigned long *p) +{ + unsigned long addr = (unsigned long)p; + + __asm__ __volatile__( + "wsbh %0, %0;\n\t" + "rotri %0, %0, 16;\n\t" + "smw.bi %0, [%1], %0, 0;\n\t" + : /* No outputs */ + : "r" (val), "r" (addr)); +} + +static __inline__ void stl_u(unsigned long val, unsigned int *p) +{ + unsigned long addr = (unsigned long)p; + + __asm__ __volatile__( + "wsbh %0, %0;\n\t" + "rotri %0, %0, 16;\n\t" + "smw.bi %0, [%1], %0, 0;\n\t" + : /* No outputs */ + : "r" (val), "r" (addr)); +} + +# else /* !NDS32_MMIO_SWAP */ +static __inline__ void +outb(unsigned PORT_SIZE port, unsigned char val) +{ + *(volatile unsigned char*)(((unsigned PORT_SIZE)(port))) = val; + barrier(); +} + +static __inline__ void +outw(unsigned PORT_SIZE port, unsigned short val) +{ + *(volatile unsigned short*)(((unsigned PORT_SIZE)(port))) = val; + barrier(); +} + +static __inline__ void +outl(unsigned PORT_SIZE port, unsigned int val) +{ + *(volatile unsigned int*)(((unsigned PORT_SIZE)(port))) = val; + barrier(); +} +static __inline__ unsigned int +inb(unsigned PORT_SIZE port) +{ + return *(volatile unsigned char*)(((unsigned PORT_SIZE)(port))); +} + +static __inline__ unsigned int +inw(unsigned PORT_SIZE port) +{ + return *(volatile unsigned short*)(((unsigned PORT_SIZE)(port))); +} + +static __inline__ unsigned int +inl(unsigned PORT_SIZE port) +{ + return *(volatile unsigned int*)(((unsigned PORT_SIZE)(port))); +} + +static __inline__ unsigned long ldq_u(unsigned long *p) +{ + unsigned long addr = (unsigned long)p; + unsigned int ret; + + __asm__ __volatile__( + "lmw.bi %0, [%1], %0, 0;\n\t" + : "=r" (ret) + : "r" (addr)); + return ret; +} + +static __inline__ unsigned long ldl_u(unsigned int *p) +{ + unsigned long addr = (unsigned long)p; + unsigned int ret; + + __asm__ __volatile__( + "lmw.bi %0, [%1], %0, 0;\n\t" + : "=r" (ret) + : "r" (addr)); + return ret; +} + + +static __inline__ void stq_u(unsigned long val, unsigned long *p) +{ + unsigned long addr = (unsigned long)p; + + __asm__ __volatile__( + "smw.bi %0, [%1], %0, 0;\n\t" + : /* No outputs */ + : "r" (val), "r" (addr)); +} + +static __inline__ void stl_u(unsigned long val, unsigned int *p) +{ + unsigned long addr = (unsigned long)p; + + __asm__ __volatile__( + "smw.bi %0, [%1], %0, 0;\n\t" + : /* No outputs */ + : "r" (val), "r" (addr)); +} +# endif /* NDS32_MMIO_SWAP */ + +# if (((X_BYTE_ORDER == X_BIG_ENDIAN) && !defined(NDS32_MMIO_SWAP)) || ((X_BYTE_ORDER != X_BIG_ENDIAN) && defined(NDS32_MMIO_SWAP))) +# define ldw_u(p) ((*(unsigned char *)(p)) << 8 | \ + (*((unsigned char *)(p)+1))) +# define stw_u(v,p) (*(unsigned char *)(p)) = ((v) >> 8); \ + (*((unsigned char *)(p)+1)) = (v) +# else +# define ldw_u(p) ((*(unsigned char *)(p)) | \ + (*((unsigned char *)(p)+1)<<8)) +# define stw_u(v,p) (*(unsigned char *)(p)) = (v); \ + (*((unsigned char *)(p)+1)) = ((v) >> 8) +# endif + +# define mem_barrier() /* XXX: nop for now */ +# define write_mem_barrier() /* XXX: nop for now */ + # else /* ix86 */ # if !defined(__SUNPRO_C) @@ -1338,6 +1687,67 @@ extern _X_EXPORT void xf86SlowBCopyToBus(unsigned char *, unsigned char *, int); # define MMIO_MOVE32(base, offset, val) \ xf86WriteMmio32Be(base, offset, (CARD32)(val)) +# elif defined(__nds32__) + /* + * we provide byteswapping and no byteswapping functions here + * with no byteswapping as default; when endianness of CPU core + * and I/O devices don't match, byte swapping is necessary + * drivers that need byteswapping should define NDS32_MMIO_SWAP + */ +# define MMIO_IN8(base, offset) xf86ReadMmio8(base, offset) +# define MMIO_OUT8(base, offset, val) \ + xf86WriteMmio8(base, offset, (CARD8)(val)) +# define MMIO_ONB8(base, offset, val) \ + xf86WriteMmioNB8(base, offset, (CARD8)(val)) + +# if defined(NDS32_MMIO_SWAP) /* byteswapping */ +# define MMIO_IN16(base, offset) xf86ReadMmio16Swap(base, offset) +# define MMIO_IN32(base, offset) xf86ReadMmio32Swap(base, offset) +# define MMIO_OUT16(base, offset, val) \ + xf86WriteMmio16Swap(base, offset, (CARD16)(val)) +# define MMIO_OUT32(base, offset, val) \ + xf86WriteMmio32Swap(base, offset, (CARD32)(val)) +# define MMIO_ONB16(base, offset, val) \ + xf86WriteMmioNB16Swap(base, offset, (CARD16)(val)) +# define MMIO_ONB32(base, offset, val) \ + xf86WriteMmioNB32Swap(base, offset, (CARD32)(val)) +# else /* no byteswapping is the default */ +# define MMIO_IN16(base, offset) xf86ReadMmio16(base, offset) +# define MMIO_IN32(base, offset) xf86ReadMmio32(base, offset) +# define MMIO_OUT16(base, offset, val) \ + xf86WriteMmio16(base, offset, (CARD16)(val)) +# define MMIO_OUT32(base, offset, val) \ + xf86WriteMmio32(base, offset, (CARD32)(val)) +# define MMIO_ONB16(base, offset, val) \ + xf86WriteMmioNB16(base, offset, (CARD16)(val)) +# define MMIO_ONB32(base, offset, val) \ + xf86WriteMmioNB32(base, offset, (CARD32)(val)) +# endif + +# define MMIO_MOVE32(base, offset, val) \ + xf86WriteMmio32(base, offset, (CARD32)(val)) + +#ifdef N1213_HC /* for NDS32 N1213 hardcore */ +static __inline__ void nds32_flush_icache(char *addr) +{ + __asm__ volatile ( + "isync %0;" + "msync;" + "isb;" + "cctl %0,L1I_VA_INVAL;" + "isb;" + : : "r"(addr) : "memory"); +} +#else +static __inline__ void nds32_flush_icache(char *addr) +{ + __asm__ volatile ( + "isync %0;" + "isb;" + : : "r"(addr) : "memory"); +} +#endif + # else /* !__alpha__ && !__powerpc__ && !__sparc__ */ # define MMIO_IN8(base, offset) \ diff --git a/xserver/hw/xfree86/common/xf86.h b/xserver/hw/xfree86/common/xf86.h index 1e7bc90e1..886c25b13 100644 --- a/xserver/hw/xfree86/common/xf86.h +++ b/xserver/hw/xfree86/common/xf86.h @@ -41,8 +41,6 @@ #include #endif -#include - #include "xf86str.h" #include "xf86Opt.h" #include @@ -57,12 +55,18 @@ extern _X_EXPORT int xf86DoConfigure; extern _X_EXPORT int xf86DoShowOptions; extern _X_EXPORT Bool xf86DoConfigurePass1; -extern _X_EXPORT DevPrivateKey xf86ScreenKey; -extern _X_EXPORT DevPrivateKey xf86CreateRootWindowKey; -extern _X_EXPORT DevPrivateKey xf86PixmapKey; + +extern _X_EXPORT DevPrivateKeyRec xf86ScreenKeyRec; +#define xf86ScreenKey (&xf86ScreenKeyRec) + +extern _X_EXPORT DevPrivateKeyRec xf86CreateRootWindowKeyRec; +#define xf86CreateRootWindowKey (&xf86CreateRootWindowKeyRec) + +extern _X_EXPORT DevPrivateKeyRec xf86PixmapKeyRec; +#define xf86PixmapKey (&xf86PixmapKeyRec) + extern _X_EXPORT ScrnInfoPtr *xf86Screens; /* List of pointers to ScrnInfoRecs */ extern _X_EXPORT const unsigned char byte_reversed[256]; -extern _X_EXPORT Bool pciSlotClaimed; extern _X_EXPORT Bool fbSlotClaimed; #if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__) extern _X_EXPORT Bool sbusSlotClaimed; @@ -91,22 +95,39 @@ extern _X_EXPORT Bool VTSwitchEnabled; /* kbd driver */ /* Function Prototypes */ #ifndef _NO_XF86_PROTOTYPES +/* PCI related */ +#include +extern _X_EXPORT Bool pciSlotClaimed; + +extern _X_EXPORT Bool xf86CheckPciSlot(const struct pci_device *); +extern _X_EXPORT int xf86ClaimPciSlot(struct pci_device *, DriverPtr drvp, + int chipset, GDevPtr dev, Bool active); +extern _X_EXPORT void xf86UnclaimPciSlot(struct pci_device *); +extern _X_EXPORT Bool xf86ParsePciBusString(const char *busID, int *bus, + int *device, int *func); +extern _X_EXPORT Bool xf86ComparePciBusString(const char *busID, int bus, + int device, int func); +extern _X_EXPORT void xf86FormatPciBusNumber(int busnum, char *buffer); +extern _X_EXPORT Bool xf86IsPrimaryPci(struct pci_device * pPci); +extern _X_EXPORT Bool xf86CheckPciMemBase(struct pci_device * pPci, + memType base); +extern _X_EXPORT struct pci_device * xf86GetPciInfoForEntity(int entityIndex); +extern _X_EXPORT int xf86MatchPciInstances(const char *driverName, + int vendorID, SymTabPtr chipsets, PciChipsets *PCIchipsets, + GDevPtr *devList, int numDevs, DriverPtr drvp, int **foundEntities); +extern _X_EXPORT ScrnInfoPtr xf86ConfigPciEntity(ScrnInfoPtr pScrn, + int scrnFlag, int entityIndex,PciChipsets *p_chip, void *dummy, + EntityProc init, EntityProc enter, EntityProc leave, pointer private); +/* Obsolete! don't use */ +extern _X_EXPORT Bool xf86ConfigActivePciEntity(ScrnInfoPtr pScrn, + int entityIndex,PciChipsets *p_chip, void *dummy, EntityProc init, + EntityProc enter, EntityProc leave, pointer private); + /* xf86Bus.c */ -extern _X_EXPORT Bool xf86CheckPciSlot( const struct pci_device * ); -extern _X_EXPORT int xf86ClaimPciSlot( struct pci_device *, DriverPtr drvp, - int chipset, GDevPtr dev, Bool active); -extern _X_EXPORT void xf86UnclaimPciSlot(struct pci_device *); -extern _X_EXPORT Bool xf86ParsePciBusString(const char *busID, int *bus, int *device, - int *func); -extern _X_EXPORT Bool xf86ComparePciBusString(const char *busID, int bus, int device, int func); -extern _X_EXPORT void xf86FormatPciBusNumber(int busnum, char *buffer); extern _X_EXPORT int xf86GetFbInfoForScreen(int scrnIndex); extern _X_EXPORT int xf86ClaimFbSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active); extern _X_EXPORT int xf86ClaimNoSlot(DriverPtr drvp, int chipset, GDevPtr dev, Bool active); -extern _X_EXPORT void xf86EnableAccess(ScrnInfoPtr pScrn); -extern _X_EXPORT Bool xf86IsPrimaryPci(struct pci_device * pPci); -/* new RAC */ extern _X_EXPORT Bool xf86DriverHasEntities(DriverPtr drvp); extern _X_EXPORT void xf86AddEntityToScreen(ScrnInfoPtr pScrn, int entityIndex); extern _X_EXPORT void xf86SetEntityInstanceForScreen(ScrnInfoPtr pScrn, int entityIndex, @@ -115,10 +136,8 @@ extern _X_EXPORT int xf86GetNumEntityInstances(int entityIndex); extern _X_EXPORT GDevPtr xf86GetDevFromEntity(int entityIndex, int instance); extern _X_EXPORT void xf86RemoveEntityFromScreen(ScrnInfoPtr pScrn, int entityIndex); extern _X_EXPORT EntityInfoPtr xf86GetEntityInfo(int entityIndex); -extern _X_EXPORT struct pci_device * xf86GetPciInfoForEntity(int entityIndex); extern _X_EXPORT Bool xf86SetEntityFuncs(int entityIndex, EntityProc init, EntityProc enter, EntityProc leave, pointer); -extern _X_EXPORT Bool xf86CheckPciMemBase(struct pci_device * pPci, memType base); extern _X_EXPORT Bool xf86IsEntityPrimary(int entityIndex); extern _X_EXPORT void xf86EnterServerState(xf86State state); extern _X_EXPORT ScrnInfoPtr xf86FindScreenForEntity(int entityIndex); @@ -210,24 +229,20 @@ extern _X_EXPORT void xf86EnableDisableFBAccess(int scrnIndex, Bool enable); extern _X_EXPORT void xf86VDrvMsgVerb(int scrnIndex, MessageType type, int verb, const char *format, va_list args); extern _X_EXPORT void xf86DrvMsgVerb(int scrnIndex, MessageType type, int verb, - const char *format, ...) _printf_attribute(4,5); + const char *format, ...) _X_ATTRIBUTE_PRINTF(4,5); extern _X_EXPORT void xf86DrvMsg(int scrnIndex, MessageType type, const char *format, ...) - _printf_attribute(3,4); + _X_ATTRIBUTE_PRINTF(3,4); extern _X_EXPORT void xf86MsgVerb(MessageType type, int verb, const char *format, ...) - _printf_attribute(3,4); -extern _X_EXPORT void xf86Msg(MessageType type, const char *format, ...) _printf_attribute(2,3); -extern _X_EXPORT void xf86ErrorFVerb(int verb, const char *format, ...) _printf_attribute(2,3); -extern _X_EXPORT void xf86ErrorF(const char *format, ...) _printf_attribute(1,2); + _X_ATTRIBUTE_PRINTF(3,4); +extern _X_EXPORT void xf86Msg(MessageType type, const char *format, ...) _X_ATTRIBUTE_PRINTF(2,3); +extern _X_EXPORT void xf86ErrorFVerb(int verb, const char *format, ...) _X_ATTRIBUTE_PRINTF(2,3); +extern _X_EXPORT void xf86ErrorF(const char *format, ...) _X_ATTRIBUTE_PRINTF(1,2); extern _X_EXPORT const char *xf86TokenToString(SymTabPtr table, int token); extern _X_EXPORT int xf86StringToToken(SymTabPtr table, const char *string); extern _X_EXPORT void xf86ShowClocks(ScrnInfoPtr scrp, MessageType from); extern _X_EXPORT void xf86PrintChipsets(const char *drvname, const char *drvmsg, SymTabPtr chips); extern _X_EXPORT int xf86MatchDevice(const char *drivername, GDevPtr **driversectlist); -extern _X_EXPORT int xf86MatchPciInstances(const char *driverName, int vendorID, - SymTabPtr chipsets, PciChipsets *PCIchipsets, - GDevPtr *devList, int numDevs, DriverPtr drvp, - int **foundEntities); extern _X_EXPORT void xf86GetClocks(ScrnInfoPtr pScrn, int num, Bool (*ClockFunc)(ScrnInfoPtr, int), void (*ProtectRegs)(ScrnInfoPtr, Bool), @@ -266,23 +281,11 @@ extern _X_EXPORT void xf86SetSilkenMouse(ScreenPtr pScreen); extern _X_EXPORT pointer xf86FindXvOptions(int scrnIndex, int adapt_index, char *port_name, char **adaptor_name, pointer *adaptor_options); extern _X_EXPORT void xf86GetOS(const char **name, int *major, int *minor, int *teeny); -extern _X_EXPORT ScrnInfoPtr xf86ConfigPciEntity(ScrnInfoPtr pScrn, int scrnFlag, - int entityIndex,PciChipsets *p_chip, - void *dummy, EntityProc init, - EntityProc enter, EntityProc leave, - pointer private); extern _X_EXPORT ScrnInfoPtr xf86ConfigFbEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex, EntityProc init, EntityProc enter, EntityProc leave, pointer private); -/* Obsolete! don't use */ -extern _X_EXPORT Bool xf86ConfigActivePciEntity(ScrnInfoPtr pScrn, - int entityIndex,PciChipsets *p_chip, - void *dummy, EntityProc init, - EntityProc enter, EntityProc leave, - pointer private); - extern _X_EXPORT Bool xf86IsScreenPrimary(int scrnIndex); extern _X_EXPORT int xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type, int format, unsigned long len, diff --git a/xserver/hw/xfree86/common/xf86AutoConfig.c b/xserver/hw/xfree86/common/xf86AutoConfig.c index c15a6fd21..90802d444 100644 --- a/xserver/hw/xfree86/common/xf86AutoConfig.c +++ b/xserver/hw/xfree86/common/xf86AutoConfig.c @@ -39,10 +39,10 @@ #include "xf86Config.h" #include "xf86Priv.h" #include "xf86_OSlib.h" +#include "xf86pciBus.h" #if defined(__sparc__) && !defined(__OpenBSD__) # include "xf86sbusBus.h" #endif -#include "dirent.h" #ifdef sun # include @@ -111,7 +111,7 @@ AppendToList(const char *s, const char ***list, int *lines) (*list)[*lines - 1] = newstr; (*list)[*lines] = NULL; } - xfree(str); + free(str); } static void @@ -120,10 +120,9 @@ FreeList(const char ***list, int *lines) int i; for (i = 0; i < *lines; i++) { - if ((*list)[i]) - xfree((*list)[i]); + free((*list)[i]); } - xfree(*list); + free(*list); *list = NULL; *lines = 0; } @@ -140,102 +139,6 @@ AppendToConfig(const char *s) AppendToList(s, &builtinConfig, &builtinLines); } -static int -videoPtrToDriverList(struct pci_device *dev, - char *returnList[], int returnListMax) -{ - int i; - /* Add more entries here if we ever return more than 4 drivers for - any device */ - char *driverList[5] = { NULL, NULL, NULL, NULL, NULL }; - - switch (dev->vendor_id) - { - /* AMD Geode LX */ - case 0x1022: - if (dev->device_id == 0x2081) - driverList[0] = "geode"; - break; - /* older Geode products acquired by AMD still carry an NSC vendor_id */ - case 0x100b: - if (dev->device_id == 0x0030) { - /* NSC Geode GX2 specifically */ - driverList[0] = "geode"; - /* GX2 support started its life in the NSC tree and was later - forked by AMD for GEODE so we keep it as a backup */ - driverList[1] = "nsc"; - } else - /* other NSC variant e.g. 0x0104 (SC1400), 0x0504 (SCx200) */ - driverList[0] = "nsc"; - break; - /* Cyrix Geode GX1 */ - case 0x1078: - if (dev->device_id == 0x0104) - driverList[0] = "cyrix"; - break; - case 0x1142: driverList[0] = "apm"; break; - case 0xedd8: driverList[0] = "ark"; break; - case 0x1a03: driverList[0] = "ast"; break; - case 0x1002: driverList[0] = "ati"; break; - case 0x102c: driverList[0] = "chips"; break; - case 0x1013: driverList[0] = "cirrus"; break; - case 0x3d3d: driverList[0] = "glint"; break; - case 0x105d: driverList[0] = "i128"; break; - case 0x8086: - if ((dev->device_id == 0x00d1) || (dev->device_id == 0x7800)) { - driverList[0] = "i740"; - } else if (dev->device_id == 0x8108) { - break; /* "hooray" for poulsbo */ - } else { - driverList[0] = "intel"; - } - break; - case 0x102b: driverList[0] = "mga"; break; - case 0x10c8: driverList[0] = "neomagic"; break; - case 0x10de: case 0x12d2: driverList[0] = "nv"; break; - case 0x1106: driverList[0] = "openchrome"; break; - case 0x1b36: driverList[0] = "qxl"; break; - case 0x1163: driverList[0] = "rendition"; break; - case 0x5333: - switch (dev->device_id) - { - case 0x88d0: case 0x88d1: case 0x88f0: case 0x8811: - case 0x8812: case 0x8814: case 0x8901: - driverList[0] = "s3"; break; - case 0x5631: case 0x883d: case 0x8a01: case 0x8a10: - case 0x8c01: case 0x8c03: case 0x8904: case 0x8a13: - driverList[0] = "s3virge"; break; - default: - driverList[0] = "savage"; break; - } - break; - case 0x1039: driverList[0] = "sis"; break; - case 0x126f: driverList[0] = "siliconmotion"; break; - case 0x121a: - if (dev->device_id < 0x0003) - driverList[0] = "voodoo"; - else - driverList[0] = "tdfx"; - break; - case 0x1011: driverList[0] = "tga"; break; - case 0x1023: driverList[0] = "trident"; break; - case 0x100c: driverList[0] = "tseng"; break; - case 0x80ee: driverList[0] = "vboxvideo"; break; - case 0x15ad: driverList[0] = "vmware"; break; - case 0x18ca: - if (dev->device_id == 0x47) - driverList[0] = "xgixp"; - else - driverList[0] = "xgi"; - break; - default: break; - } - for (i = 0; (i < returnListMax) && (driverList[i] != NULL); i++) { - returnList[i] = xnfstrdup(driverList[i]); - } - return i; /* Number of entries added */ -} - Bool xf86AutoConfig(void) { @@ -262,7 +165,7 @@ xf86AutoConfig(void) AppendToConfig(BUILTIN_LAYOUT_SECTION_POST); for (p = deviceList; *p; p++) { - xfree(*p); + free(*p); } xf86MsgVerb(X_DEFAULT, 0, @@ -282,135 +185,12 @@ xf86AutoConfig(void) if (ret != CONFIG_OK) xf86Msg(X_ERROR, "Error parsing the built-in default configuration.\n"); - return (ret == CONFIG_OK); + return ret == CONFIG_OK; } -static int -xchomp(char *line) -{ - size_t len = 0; - - if (!line) { - return 1; - } - - len = strlen(line); - if (line[len - 1] == '\n' && len > 0) { - line[len - 1] = '\0'; - } - return 0; -} - -#ifdef __linux__ -/* This function is used to provide a workaround for binary drivers that - * don't export their PCI ID's properly. If distros don't end up using this - * feature it can and should be removed because the symbol-based resolution - * scheme should be the primary one */ -static void -matchDriverFromFiles (char** matches, uint16_t match_vendor, uint16_t match_chip) -{ - DIR *idsdir; - FILE *fp; - struct dirent *direntry; - char *line = NULL; - size_t len; - ssize_t read; - char path_name[256], vendor_str[5], chip_str[5]; - uint16_t vendor, chip; - int i, j; - - idsdir = opendir(PCI_TXT_IDS_PATH); - if (!idsdir) - return; - - xf86Msg(X_INFO, "Scanning %s directory for additional PCI ID's supported by the drivers\n", PCI_TXT_IDS_PATH); - direntry = readdir(idsdir); - /* Read the directory */ - while (direntry) { - if (direntry->d_name[0] == '.') { - direntry = readdir(idsdir); - continue; - } - len = strlen(direntry->d_name); - /* A tiny bit of sanity checking. We should probably do better */ - if (strncmp(&(direntry->d_name[len-4]), ".ids", 4) == 0) { - /* We need the full path name to open the file */ - strncpy(path_name, PCI_TXT_IDS_PATH, 256); - strncat(path_name, "/", 1); - strncat(path_name, direntry->d_name, (256 - strlen(path_name) - 1)); - fp = fopen(path_name, "r"); - if (fp == NULL) { - xf86Msg(X_ERROR, "Could not open %s for reading. Exiting.\n", path_name); - goto end; - } - /* Read the file */ -#ifdef __GLIBC__ - while ((read = getline(&line, &len, fp)) != -1) { -#else - while ((line = fgetln(fp, &len)) != (char *)NULL) { -#endif /* __GLIBC __ */ - xchomp(line); - if (isdigit(line[0])) { - strncpy(vendor_str, line, 4); - vendor_str[4] = '\0'; - vendor = (int)strtol(vendor_str, NULL, 16); - if ((strlen(&line[4])) == 0) { - chip_str[0] = '\0'; - chip = -1; - } else { - /* Handle trailing whitespace */ - if (isspace(line[4])) { - chip_str[0] = '\0'; - chip = -1; - } else { - /* Ok, it's a real ID */ - strncpy(chip_str, &line[4], 4); - chip_str[4] = '\0'; - chip = (int)strtol(chip_str, NULL, 16); - } - } - if (vendor == match_vendor && chip == match_chip ) { - i = 0; - while (matches[i]) { - i++; - } - matches[i] = (char*)xalloc(sizeof(char) * strlen(direntry->d_name) - 3); - if (!matches[i]) { - xf86Msg(X_ERROR, "Could not allocate space for the module name. Exiting.\n"); - goto end; - } - /* hack off the .ids suffix. This should guard - * against other problems, but it will end up - * taking off anything after the first '.' */ - for (j = 0; j < (strlen(direntry->d_name) - 3) ; j++) { - if (direntry->d_name[j] == '.') { - matches[i][j] = '\0'; - break; - } else { - matches[i][j] = direntry->d_name[j]; - } - } - xf86Msg(X_INFO, "Matched %s from file name %s\n", matches[i], direntry->d_name); - } - } else { - /* TODO Handle driver overrides here */ - } - } - fclose(fp); - } - direntry = readdir(idsdir); - } - end: - xfree(line); - closedir(idsdir); -} -#endif /* __linux__ */ - static void listPossibleVideoDrivers(char *matches[], int nmatches) { - struct pci_device * info = NULL; - struct pci_device_iterator *iter; int i; for (i = 0 ; i < nmatches ; i++) { @@ -476,32 +256,7 @@ listPossibleVideoDrivers(char *matches[], int nmatches) } #endif - /* Find the primary device, and get some information about it. */ - iter = pci_slot_match_iterator_create(NULL); - while ((info = pci_device_next(iter)) != NULL) { - if (xf86IsPrimaryPci(info)) { - break; - } - } - - pci_iterator_destroy(iter); - - if (!info) { - ErrorF("Primary device is not PCI\n"); - } -#ifdef __linux__ - else { - matchDriverFromFiles(matches, info->vendor_id, info->device_id); - } -#endif /* __linux__ */ - - for (i = 0; (i < nmatches) && (matches[i]); i++) { - /* find end of matches list */ - } - - if ((info != NULL) && (i < nmatches)) { - i += videoPtrToDriverList(info, &(matches[i]), nmatches - i); - } + i = xf86PciMatchDriver(matches, nmatches); /* Fallback to platform default hardware */ if (i < (nmatches - 1)) { @@ -540,7 +295,7 @@ copyScreen(confScreenPtr oscreen, GDevPtr odev, int i, char *driver) return FALSE; memcpy(xf86ConfigLayout.screens[i].screen, oscreen, sizeof(confScreenRec)); - cptr = xcalloc(1, sizeof(GDevRec)); + cptr = calloc(1, sizeof(GDevRec)); if (!cptr) return FALSE; memcpy(cptr, odev, sizeof(GDevRec)); @@ -571,7 +326,7 @@ autoConfigDevice(GDevPtr preconf_device) if (preconf_device) { ptr = preconf_device; } else { - ptr = xcalloc(1, sizeof(GDevRec)); + ptr = calloc(1, sizeof(GDevRec)); if (!ptr) { return NULL; } @@ -626,13 +381,13 @@ autoConfigDevice(GDevPtr preconf_device) xf86ConfigLayout.screens[i+num_matches] = slp[i]; } xf86ConfigLayout.screens[num_screens+num_matches-1].screen = NULL; - xfree(slp); + free(slp); } else { /* layout does not have any screens, not much to do */ ptr->driver = matches[0]; for (i = 1; matches[i] ; i++) { if (matches[i] != matches[0]) { - xfree(matches[i]); + free(matches[i]); } } } diff --git a/xserver/hw/xfree86/common/xf86Bus.c b/xserver/hw/xfree86/common/xf86Bus.c index e36411c7b..74d824b67 100644 --- a/xserver/hw/xfree86/common/xf86Bus.c +++ b/xserver/hw/xfree86/common/xf86Bus.c @@ -49,8 +49,6 @@ #include "xf86_OSproc.h" #include "xf86VGAarbiter.h" -#include "Pci.h" - /* Entity data */ EntityPtr *xf86Entities = NULL; /* Bus slots claimed by drivers */ int xf86NumEntities = 0; @@ -58,9 +56,135 @@ static int xf86EntityPrivateCount = 0; BusRec primaryBus = { BUS_NONE, { 0 } }; -static Bool xf86ResAccessEnter = FALSE; +/** + * Call the driver's correct probe function. + * + * If the driver implements the \c DriverRec::PciProbe entry-point and an + * appropriate PCI device (with matching Device section in the xorg.conf file) + * is found, it is called. If \c DriverRec::PciProbe or no devices can be + * successfully probed with it (e.g., only non-PCI devices are available), + * the driver's \c DriverRec::Probe function is called. + * + * \param drv Driver to probe + * + * \return + * If a device can be successfully probed by the driver, \c TRUE is + * returned. Otherwise, \c FALSE is returned. + */ +Bool +xf86CallDriverProbe( DriverPtr drv, Bool detect_only ) +{ + Bool foundScreen = FALSE; -static Bool doFramebufferMode = FALSE; + if (drv->PciProbe != NULL) { + if (xf86DoConfigure && xf86DoConfigurePass1) { + assert(detect_only); + foundScreen = xf86PciAddMatchingDev(drv); + } + else { + assert(! detect_only); + foundScreen = xf86PciProbeDev(drv); + } + } + + if (!foundScreen && (drv->Probe != NULL)) { + xf86Msg( X_WARNING, "Falling back to old probe method for %s\n", + drv->driverName); + foundScreen = (*drv->Probe)(drv, (detect_only) ? PROBE_DETECT + : PROBE_DEFAULT); + } + + return foundScreen; +} + +/** + * @return TRUE if all buses are configured and set up correctly and FALSE + * otherwise. + */ +Bool +xf86BusConfig(void) +{ + screenLayoutPtr layout; + int i, j; + + /* Enable full I/O access */ + if (xorgHWAccess) + xorgHWAccess = xf86EnableIO(); + + /* + * Now call each of the Probe functions. Each successful probe will + * result in an extra entry added to the xf86Screens[] list for each + * instance of the hardware found. + */ + for (i = 0; i < xf86NumDrivers; i++) { + xorgHWFlags flags; + if (!xorgHWAccess) { + if (!xf86DriverList[i]->driverFunc + || !xf86DriverList[i]->driverFunc(NULL, + GET_REQUIRED_HW_INTERFACES, + &flags) + || NEED_IO_ENABLED(flags)) + continue; + } + + xf86CallDriverProbe(xf86DriverList[i], FALSE); + } + + /* If nothing was detected, return now */ + if (xf86NumScreens == 0) { + xf86Msg(X_ERROR, "No devices detected.\n"); + return FALSE; + } + + xf86VGAarbiterInit(); + + /* + * Match up the screens found by the probes against those specified + * in the config file. Remove the ones that won't be used. Sort + * them in the order specified. + * + * What is the best way to do this? + * + * For now, go through the screens allocated by the probes, and + * look for screen config entry which refers to the same device + * section as picked out by the probe. + * + */ + for (i = 0; i < xf86NumScreens; i++) { + for (layout = xf86ConfigLayout.screens; layout->screen != NULL; + layout++) { + Bool found = FALSE; + for (j = 0; j < xf86Screens[i]->numEntities; j++) { + + GDevPtr dev = xf86GetDevFromEntity( + xf86Screens[i]->entityList[j], + xf86Screens[i]->entityInstanceList[j]); + if (dev == layout->screen->device) { + /* A match has been found */ + xf86Screens[i]->confScreen = layout->screen; + found = TRUE; + break; + } + } + if (found) break; + } + if (layout->screen == NULL) { + /* No match found */ + xf86Msg(X_ERROR, + "Screen %d deleted because of no matching config section.\n", i); + xf86DeleteScreen(i--, 0); + } + } + + /* If no screens left, return now. */ + if (xf86NumScreens == 0) { + xf86Msg(X_ERROR, + "Device(s) detected, but none match those in the config file.\n"); + return FALSE; + } + + return TRUE; +} /* * Call the bus probes relevant to the architecture. @@ -98,7 +222,7 @@ StringToBusType(const char* busID, const char **retID) s = xstrdup(busID); p = strtok(s, ":"); if (p == NULL || *p == 0) { - xfree(s); + free(s); return BUS_NONE; } if (!xf86NameCmp(p, "pci") || !xf86NameCmp(p, "agp")) @@ -108,25 +232,10 @@ StringToBusType(const char* busID, const char **retID) if (ret != BUS_NONE) if (retID) *retID = busID + strlen(p) + 1; - xfree(s); + free(s); return ret; } -/* - * Entity related code. - */ - -void -xf86EntityInit(void) -{ - int i; - - for (i = 0; i < xf86NumEntities; i++) - if (xf86Entities[i]->entityInit) { - xf86Entities[i]->entityInit(i,xf86Entities[i]->private); - } -} - int xf86AllocateEntity(void) { @@ -136,29 +245,7 @@ xf86AllocateEntity(void) xf86Entities[xf86NumEntities - 1] = xnfcalloc(1,sizeof(EntityRec)); xf86Entities[xf86NumEntities - 1]->entityPrivates = xnfcalloc(sizeof(DevUnion) * xf86EntityPrivateCount, 1); - return (xf86NumEntities - 1); -} - -static void -EntityEnter(void) -{ - int i; - - for (i = 0; i < xf86NumEntities; i++) - if (xf86Entities[i]->entityEnter) { - xf86Entities[i]->entityEnter(i,xf86Entities[i]->private); - } -} - -static void -EntityLeave(void) -{ - int i; - - for (i = 0; i < xf86NumEntities; i++) - if (xf86Entities[i]->entityLeave) { - xf86Entities[i]->entityLeave(i,xf86Entities[i]->private); - } + return xf86NumEntities - 1; } Bool @@ -170,9 +257,9 @@ xf86IsEntityPrimary(int entityIndex) switch (pEnt->bus.type) { case BUS_PCI: - return (pEnt->bus.id.pci == primaryBus.id.pci); + return pEnt->bus.id.pci == primaryBus.id.pci; case BUS_SBUS: - return (pEnt->bus.id.sbus.fbNum == primaryBus.id.sbus.fbNum); + return pEnt->bus.id.sbus.fbNum == primaryBus.id.sbus.fbNum; default: return FALSE; } @@ -255,7 +342,7 @@ xf86FindScreenForEntity(int entityIndex) for (i = 0; i < xf86NumScreens; i++) { for (j = 0; j < xf86Screens[i]->numEntities; j++) { if ( xf86Screens[i]->entityList[j] == entityIndex ) - return (xf86Screens[i]); + return xf86Screens[i]; } } } @@ -295,8 +382,8 @@ xf86ClearEntityListForScreen(int scrnIndex) xf86Entities[entityIndex]->inUse = FALSE; /* disable resource: call the disable function */ } - xfree(pScrn->entityList); - xfree(pScrn->entityInstanceList); + free(pScrn->entityList); + free(pScrn->entityInstanceList); pScrn->entityList = NULL; pScrn->entityInstanceList = NULL; } @@ -385,16 +472,6 @@ xf86GetDevFromEntity(int entityIndex, int instance) return xf86Entities[entityIndex]->devices[i]; } -/* - * xf86AccessInit() - set up everything needed for access control - * called only once on first server generation. - */ -void -xf86AccessInit(void) -{ - xf86ResAccessEnter = TRUE; -} - /* * xf86AccessEnter() -- gets called to save the text mode VGA IO * resources when reentering the server after a VT switch. @@ -402,56 +479,23 @@ xf86AccessInit(void) void xf86AccessEnter(void) { - if (xf86ResAccessEnter) - return; + int i; + + for (i = 0; i < xf86NumEntities; i++) + if (xf86Entities[i]->entityEnter) + xf86Entities[i]->entityEnter(i,xf86Entities[i]->private); - /* - * on enter we simply disable routing of special resources - * to any bus and let the RAC code to "open" the right bridges. - */ - EntityEnter(); xf86EnterServerState(SETUP); - xf86ResAccessEnter = TRUE; } -/* - * xf86AccessLeave() -- prepares access for and calls the - * entityLeave() functions. - * xf86AccessLeaveState() --- gets called to restore the - * access to the VGA IO resources when switching VT or on - * server exit. - * This was split to call xf86AccessLeaveState() from - * ddxGiveUp(). - */ void xf86AccessLeave(void) { - if (!xf86ResAccessEnter) - return; - EntityLeave(); -} + int i; -/* - * xf86EnableAccess() -- enable access to controlled resources. - * To reduce latency when switching access the ScrnInfoRec has - * a linked list of the EntityAccPtr of all screen entities. - */ -/* - * switching access needs to be done in te following oder: - * disable - * 1. disable old entity - * 2. reroute bus - * 3. enable new entity - * Otherwise resources needed for access control might be shadowed - * by other resources! - */ - -void -xf86EnableAccess(ScrnInfoPtr pScrn) -{ - DebugF("Enable access %i\n",pScrn->scrnIndex); - - return; + for (i = 0; i < xf86NumEntities; i++) + if (xf86Entities[i]->entityLeave) + xf86Entities[i]->entityLeave(i,xf86Entities[i]->private); } /* @@ -460,12 +504,17 @@ xf86EnableAccess(ScrnInfoPtr pScrn) typedef enum { TRI_UNSET, TRI_TRUE, TRI_FALSE } TriState; -static void -SetSIGIOForState(xf86State state) +void +xf86EnterServerState(xf86State state) { static int sigio_state; static TriState sigio_blocked = TRI_UNSET; + /* + * This is a good place to block SIGIO during SETUP state. SIGIO should be + * blocked in SETUP state otherwise (u)sleep() might get interrupted + * early. We take care not to call xf86BlockSIGIO() twice. + */ if ((state == SETUP) && (sigio_blocked != TRI_TRUE)) { sigio_state = xf86BlockSIGIO(); sigio_blocked = TRI_TRUE; @@ -475,24 +524,6 @@ SetSIGIOForState(xf86State state) } } -void -xf86EnterServerState(xf86State state) -{ - /* - * This is a good place to block SIGIO during SETUP state. - * SIGIO should be blocked in SETUP state otherwise (u)sleep() - * might get interrupted early. - * We take care not to call xf86BlockSIGIO() twice. - */ - SetSIGIOForState(state); - if (state == SETUP) - DebugF("Entering SETUP state\n"); - else - DebugF("Entering OPERATING state\n"); - - return; -} - /* * xf86PostProbe() -- Allocate all non conflicting resources * This function gets called by xf86Init(). @@ -500,76 +531,33 @@ xf86EnterServerState(xf86State state) void xf86PostProbe(void) { - if (fbSlotClaimed) { - if (pciSlotClaimed + int i; + + if (fbSlotClaimed && (pciSlotClaimed #if (defined(__sparc__) || defined(__sparc)) && !defined(__OpenBSD__) || sbusSlotClaimed #endif - ) { + )) FatalError("Cannot run in framebuffer mode. Please specify busIDs " " for all framebuffer devices\n"); - return; - } else { - xf86Msg(X_INFO,"Running in FRAMEBUFFER Mode\n"); - doFramebufferMode = TRUE; - return; - } - } + for (i = 0; i < xf86NumEntities; i++) + if (xf86Entities[i]->entityInit) + xf86Entities[i]->entityInit(i,xf86Entities[i]->private); } void xf86PostScreenInit(void) { - if (doFramebufferMode) { - SetSIGIOForState(OPERATING); - return; - } - xf86VGAarbiterWrapFunctions(); - - DebugF("PostScreenInit generation: %i\n",serverGeneration); xf86EnterServerState(OPERATING); } -/* - * xf86FindPrimaryDevice() - Find the display device which - * was active when the server was started. - */ -void -xf86FindPrimaryDevice(void) -{ - if (primaryBus.type != BUS_NONE) { - char *bus; - char loc[16]; - - switch (primaryBus.type) { - case BUS_PCI: - bus = "PCI"; - snprintf(loc, sizeof(loc), " %2.2x@%2.2x:%2.2x:%1.1x", - primaryBus.id.pci->bus, - primaryBus.id.pci->domain, - primaryBus.id.pci->dev, - primaryBus.id.pci->func); - break; - case BUS_SBUS: - bus = "SBUS"; - snprintf(loc, sizeof(loc), " %2.2x", primaryBus.id.sbus.fbNum); - break; - default: - bus = ""; - loc[0] = '\0'; - } - - xf86MsgVerb(X_INFO, 2, "Primary Device is: %s%s\n",bus,loc); - } -} - int xf86GetLastScrnFlag(int entityIndex) { if(entityIndex < xf86NumEntities) { - return(xf86Entities[entityIndex]->lastScrnFlag); + return xf86Entities[entityIndex]->lastScrnFlag; } else { return -1; } @@ -666,7 +654,7 @@ xf86AllocateEntityPrivateIndex(void) nprivs = xnfrealloc(pEnt->entityPrivates, xf86EntityPrivateCount * sizeof(DevUnion)); /* Zero the new private */ - bzero(&nprivs[idx], sizeof(DevUnion)); + memset(&nprivs[idx], 0, sizeof(DevUnion)); pEnt->entityPrivates = nprivs; } return idx; diff --git a/xserver/hw/xfree86/common/xf86Bus.h b/xserver/hw/xfree86/common/xf86Bus.h index b22e2e772..e161c7f4c 100644 --- a/xserver/hw/xfree86/common/xf86Bus.h +++ b/xserver/hw/xfree86/common/xf86Bus.h @@ -54,7 +54,6 @@ typedef struct { Bool active; Bool inUse; BusRec bus; - pointer busAcc; int lastScrnFlag; DevUnion * entityPrivates; int numInstances; diff --git a/xserver/hw/xfree86/common/xf86Config.c b/xserver/hw/xfree86/common/xf86Config.c index ed54587a7..6fb73e5a9 100644 --- a/xserver/hw/xfree86/common/xf86Config.c +++ b/xserver/hw/xfree86/common/xf86Config.c @@ -67,9 +67,7 @@ extern DeviceAssocRec mouse_assoc; #include "xkbsrv.h" -#ifdef RENDER #include "picture.h" -#endif /* * These paths define the way the config file search is done. The escape @@ -165,7 +163,7 @@ xf86GetPathElem(char **pnt) **pnt = '\0'; *pnt += 1; } - return(p1); + return p1; } /* @@ -186,7 +184,7 @@ xf86ValidateFontPath(char *path) int flag; int dirlen; - tmp_path = xcalloc(1,strlen(path)+1); + tmp_path = calloc(1,strlen(path)+1); out_pnt = tmp_path; path_elem = NULL; next = path; @@ -207,7 +205,7 @@ xf86ValidateFontPath(char *path) if (flag != 0) { xf86Msg(X_WARNING, "The directory \"%s\" does not exist.\n", dir_elem); xf86ErrorF("\tEntry deleted from font path.\n"); - xfree(dir_elem); + free(dir_elem); continue; } else { @@ -218,18 +216,18 @@ xf86ValidateFontPath(char *path) if (flag == 0) if (!S_ISREG(stat_buf.st_mode)) flag = -1; - xfree(p1); + free(p1); if (flag != 0) { xf86Msg(X_WARNING, "`fonts.dir' not found (or not valid) in \"%s\".\n", dir_elem); xf86ErrorF("\tEntry deleted from font path.\n"); xf86ErrorF("\t(Run 'mkfontdir' on \"%s\").\n", dir_elem); - xfree(dir_elem); + free(dir_elem); continue; } } - xfree(dir_elem); + free(dir_elem); } /* @@ -241,7 +239,7 @@ xf86ValidateFontPath(char *path) strcat(out_pnt, path_elem); out_pnt += strlen(path_elem); } - return(tmp_path); + return tmp_path; } @@ -365,7 +363,7 @@ xf86ModulelistFromConfig(pointer **optlist) if (optlist) *optlist = optarray; else - xfree(optarray); + free(optarray); return modulearray; } @@ -624,7 +622,7 @@ configFiles(XF86ConfFilesPtr fileconf) /* xf86ValidateFontPath modifies its argument, but returns a copy of it. */ temp_path = must_copy ? xnfstrdup(defaultFontPath) : defaultFontPath; defaultFontPath = xf86ValidateFontPath(temp_path); - xfree(temp_path); + free(temp_path); /* make fontpath more readable in the logfiles */ countDirs = 1; @@ -649,7 +647,7 @@ configFiles(XF86ConfFilesPtr fileconf) *(temp_path++) = '\t'; strcpy(temp_path, start); xf86Msg(pathFrom, "FontPath set to:\n%s\n", log_buf); - xfree(log_buf); + free(log_buf); /* ModulePath */ @@ -925,7 +923,6 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) } } -#ifdef RENDER { if ((s = xf86GetOptValString(FlagOptions, FLAG_RENDER_COLORMAP_MODE))){ int policy = PictureParseCmapPolicy (s); @@ -938,7 +935,6 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts) } } } -#endif #ifdef RANDR xf86Info.disableRandR = FALSE; @@ -1203,7 +1199,7 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout) for (devs = servlayoutp->inputs; devs && *devs; devs++) if (*devs == corePointer) { - xfree(*devs); + free(*devs); *devs = (IDevPtr)0x1; /* ensure we dont skip next loop*/ break; } @@ -1256,7 +1252,7 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout) /* 5. Built-in default. */ if (!foundPointer && !xf86Info.allowEmptyInput) { - bzero(&defPtr, sizeof(defPtr)); + memset(&defPtr, 0, sizeof(defPtr)); defPtr.inp_identifier = strdup(""); defPtr.inp_driver = strdup("mouse"); confInput = &defPtr; @@ -1307,7 +1303,7 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout) } if (!found && !xf86Info.allowEmptyInput) { xf86Msg(X_INFO, "No default mouse found, adding one\n"); - bzero(&defPtr, sizeof(defPtr)); + memset(&defPtr, 0, sizeof(defPtr)); defPtr.inp_identifier = strdup(""); defPtr.inp_driver = strdup("mouse"); confInput = &defPtr; @@ -1345,7 +1341,7 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout) for (devs = servlayoutp->inputs; devs && *devs; devs++) if (*devs == coreKeyboard) { - xfree(*devs); + free(*devs); *devs = (IDevPtr)0x1; /* ensure we dont skip next loop */ break; } @@ -1396,7 +1392,7 @@ checkCoreInputDevices(serverLayoutPtr servlayoutp, Bool implicitLayout) /* 5. Built-in default. */ if (!foundKeyboard && !xf86Info.allowEmptyInput) { - bzero(&defKbd, sizeof(defKbd)); + memset(&defKbd, 0, sizeof(defKbd)); defKbd.inp_identifier = strdup(""); defKbd.inp_driver = strdup("kbd"); confInput = &defKbd; @@ -1507,8 +1503,8 @@ configInputDevices(XF86ConfLayoutPtr layout, serverLayoutPtr servlayoutp) indp[count] = xnfalloc(sizeof(IDevRec)); if (!configInput(indp[count], irp->iref_inputdev, X_CONFIG)) { while(count--) - xfree(indp[count]); - xfree(indp); + free(indp[count]); + free(indp); return FALSE; } indp[count]->extraOptions = irp->iref_option_lst; @@ -1599,7 +1595,7 @@ configLayout(serverLayoutPtr servlayoutp, XF86ConfLayoutPtr conf_layout, scrnum = adjp->adj_scrnum; if (!configScreen(slp[count].screen, adjp->adj_screen, scrnum, X_CONFIG)) { - xfree(slp); + free(slp); return FALSE; } slp[count].x = adjp->adj_x; @@ -1644,8 +1640,8 @@ configLayout(serverLayoutPtr servlayoutp, XF86ConfLayoutPtr conf_layout, slp[0].screen = xnfcalloc(1, sizeof(confScreenRec)); if (!configScreen(slp[0].screen, xf86configptr->conf_screen_lst, 0, X_CONFIG)) { - xfree(slp[0].screen); - xfree(slp); + free(slp[0].screen); + free(slp); return FALSE; } } @@ -1704,7 +1700,7 @@ configLayout(serverLayoutPtr servlayoutp, XF86ConfLayoutPtr conf_layout, count = 0; while (idp) { if (!configDevice(&gdp[count], idp->inactive_device, FALSE)) { - xfree(gdp); + free(gdp); return FALSE; } count++; @@ -1764,7 +1760,7 @@ configImpliedLayout(serverLayoutPtr servlayoutp, XF86ConfScreenPtr conf_screen, slp[0].screen = xnfcalloc(1, sizeof(confScreenRec)); slp[1].screen = NULL; if (!configScreen(slp[0].screen, conf_screen, 0, from)) { - xfree(slp); + free(slp); return FALSE; } servlayoutp->id = "(implicit)"; @@ -1855,7 +1851,7 @@ configScreen(confScreenPtr screenp, XF86ConfScreenPtr conf_screen, int scrnum, if (!conf_screen->scrn_monitor) { XF86ConfMonitorRec defMon; - bzero(&defMon, sizeof(defMon)); + memset(&defMon, 0, sizeof(defMon)); defMon.mon_identifier = ""; if (!configMonitor(screenp->monitor, &defMon)) return FALSE; @@ -2310,7 +2306,7 @@ configExtensions(XF86ConfExtensionsPtr conf_ext) enable = !enable; } else { xf86Msg(X_WARNING, "Ignoring unrecognized value \"%s\"\n", val); - xfree(n); + free(n); continue; } @@ -2321,7 +2317,7 @@ configExtensions(XF86ConfExtensionsPtr conf_ext) xf86Msg(X_WARNING, "Ignoring unrecognized extension \"%s\"\n", name); } - xfree(n); + free(n); } } } @@ -2334,6 +2330,7 @@ configInput(IDevPtr inputp, XF86ConfInputPtr conf_input, MessageType from) inputp->driver = conf_input->inp_driver; inputp->commonOptions = conf_input->inp_option_lst; inputp->extraOptions = NULL; + inputp->attrs = NULL; return TRUE; } @@ -2369,7 +2366,7 @@ addDefaultModes(MonPtr monitorp) monitorp->Modes = xf86ModesAdd(monitorp->Modes, mode); last = mode; } else { - xfree(mode); + free(mode); } } monitorp->Last = last; @@ -2406,7 +2403,7 @@ checkInput(serverLayoutPtr layout, Bool implicit_layout) { xf86Msg(X_WARNING, "Disabling %s\n", (*dev)->identifier); current = dev; - xfree(*dev); + free(*dev); do { *current = *(current + 1); diff --git a/xserver/hw/xfree86/common/xf86Configure.c b/xserver/hw/xfree86/common/xf86Configure.c index be2512052..68d6641da 100644 --- a/xserver/hw/xfree86/common/xf86Configure.c +++ b/xserver/hw/xfree86/common/xf86Configure.c @@ -107,37 +107,13 @@ bus_sbus_configure(void *busData) static void bus_pci_newdev_configure(void *busData, int i, int *chipset) { - const char *VendorName; - const char *CardName; char busnum[8]; - struct pci_device * pVideo = NULL; - size_t len; - - pVideo = (struct pci_device *) busData; + struct pci_device * pVideo = NULL; + pVideo = (struct pci_device *) busData; + DevToConfig[i].pVideo = pVideo; - VendorName = pci_device_get_vendor_name( pVideo ); - CardName = pci_device_get_device_name( pVideo ); - - if (!VendorName) { - VendorName = xnfalloc(15); - snprintf((char*)VendorName, 15, "Unknown Vendor"); - } - - if (!CardName) { - CardName = xnfalloc(14); - snprintf((char*)CardName, 14, "Unknown Board"); - } - - len = strlen(VendorName) + strlen(CardName) + 2; - DevToConfig[i].GDev.identifier = xnfalloc(len); - snprintf(DevToConfig[i].GDev.identifier, len, "%s %s", - VendorName, CardName); - - DevToConfig[i].GDev.vendor = (char *)VendorName; - DevToConfig[i].GDev.board = (char *)CardName; - DevToConfig[i].GDev.busID = xnfalloc(16); xf86FormatPciBusNumber(pVideo->bus, busnum); snprintf(DevToConfig[i].GDev.busID, 16, "PCI:%s:%d:%d", @@ -168,7 +144,7 @@ bus_sbus_newdev_configure(void *busData, int i) len = strlen(promPath) + 6; DevToConfig[i].GDev.busID = xnfalloc(len); snprintf(DevToConfig[i].GDev.busID, len, "SBUS:%s", promPath); - xfree(promPath); + free(promPath); } else { NewDevice.GDev.busID = xnfalloc(12); snprintf(DevToConfig[i].GDev.busID, 12, "SBUS:fb%d", NewDevice.sVideo->fbNum); @@ -281,16 +257,16 @@ configureInputSection (void) mouse->inp_identifier = "Mouse0"; mouse->inp_driver = "mouse"; mouse->inp_option_lst = - xf86addNewOption(mouse->inp_option_lst, xstrdup("Protocol"), - xstrdup(DFLT_MOUSE_PROTO)); + xf86addNewOption(mouse->inp_option_lst, strdup("Protocol"), + strdup(DFLT_MOUSE_PROTO)); #ifndef __SCO__ mouse->inp_option_lst = - xf86addNewOption(mouse->inp_option_lst, xstrdup("Device"), - xstrdup(DFLT_MOUSE_DEV)); + xf86addNewOption(mouse->inp_option_lst, strdup("Device"), + strdup(DFLT_MOUSE_DEV)); #endif mouse->inp_option_lst = - xf86addNewOption(mouse->inp_option_lst, xstrdup("ZAxisMapping"), - xstrdup("4 5 6 7")); + xf86addNewOption(mouse->inp_option_lst, strdup("ZAxisMapping"), + strdup("4 5 6 7")); ptr = (XF86ConfInputPtr)xf86addListItem((glp)ptr, (glp)mouse); return ptr; } @@ -326,7 +302,7 @@ configureScreenSection (int screennum) } static const char* -optionTypeToSting(OptionValueType type) +optionTypeToString(OptionValueType type) { switch (type) { case OPTV_NONE: @@ -343,6 +319,8 @@ optionTypeToSting(OptionValueType type) return "[]"; case OPTV_FREQ: return ""; + case OPTV_PERCENT: + return ""; default: return ""; } @@ -359,9 +337,6 @@ configureDeviceSection (int screennum) /* Move device info to parser structure */ snprintf(identifier, sizeof(identifier), "Card%d", screennum); ptr->dev_identifier = strdup(identifier); -/* ptr->dev_identifier = DevToConfig[screennum].GDev.identifier;*/ - ptr->dev_vendor = DevToConfig[screennum].GDev.vendor; - ptr->dev_board = DevToConfig[screennum].GDev.board; ptr->dev_chipset = DevToConfig[screennum].GDev.chipset; ptr->dev_busid = DevToConfig[screennum].GDev.busID; ptr->dev_driver = DevToConfig[screennum].GDev.driver; @@ -388,9 +363,10 @@ configureDeviceSection (int screennum) " ### Available Driver options are:-\n" " ### Values: : integer, : float, " ": \"True\"/\"False\",\n" - " ### : \"String\", : \" Hz/kHz/MHz\"\n" + " ### : \"String\", : \" Hz/kHz/MHz\",\n" + " ### : \"%\"\n" " ### [arg]: arg optional\n"; - ptr->dev_comment = xstrdup(descrip); + ptr->dev_comment = strdup(descrip); if (ptr->dev_comment) { for (p = DevToConfig[screennum].GDev.options; p->name != NULL; p++) { @@ -398,13 +374,13 @@ configureDeviceSection (int screennum) const char *prefix = " #Option "; const char *middle = " \t# "; const char *suffix = "\n"; - const char *opttype = optionTypeToSting(p->type); + const char *opttype = optionTypeToString(p->type); char *optname; int len = strlen(ptr->dev_comment) + strlen(prefix) + strlen(middle) + strlen(suffix) + 1; int optlen = strlen(p->name) + 2 + 1; - optname = xalloc(optlen); + optname = malloc(optlen); if (!optname) break; snprintf(optname, optlen, "\"%s\"", p->name); @@ -412,14 +388,14 @@ configureDeviceSection (int screennum) len += max(20, strlen(optname)); len += strlen(opttype); - ptr->dev_comment = xrealloc(ptr->dev_comment, len); + ptr->dev_comment = realloc(ptr->dev_comment, len); if (!ptr->dev_comment) break; p_e = ptr->dev_comment + strlen(ptr->dev_comment); snprintf(p_e, len - (ptr->dev_comment - p_e), "%s%-20s%s%s%s", prefix, optname, middle, opttype, suffix); - xfree(optname); + free(optname); } } } @@ -443,7 +419,7 @@ configureLayoutSection (void) iptr->iref_option_lst = NULL; iptr->iref_inputdev_str = "Mouse0"; iptr->iref_option_lst = - xf86addNewOption (iptr->iref_option_lst, xstrdup("CorePointer"), NULL); + xf86addNewOption (iptr->iref_option_lst, strdup("CorePointer"), NULL); ptr->lay_input_lst = (XF86ConfInputrefPtr) xf86addListItem ((glp) ptr->lay_input_lst, (glp) iptr); } @@ -456,7 +432,7 @@ configureLayoutSection (void) iptr->iref_option_lst = NULL; iptr->iref_inputdev_str = "Keyboard0"; iptr->iref_option_lst = - xf86addNewOption (iptr->iref_option_lst, xstrdup("CoreKeyboard"), NULL); + xf86addNewOption (iptr->iref_option_lst, strdup("CoreKeyboard"), NULL); ptr->lay_input_lst = (XF86ConfInputrefPtr) xf86addListItem ((glp) ptr->lay_input_lst, (glp) iptr); } @@ -518,7 +494,7 @@ configureModuleSection (void) ptr->mod_load_lst = (XF86LoadPtr)xf86addListItem( (glp)ptr->mod_load_lst, (glp)module); } - xfree(elist); + free(elist); } return ptr; @@ -629,7 +605,7 @@ configureDDCMonitorSection (int screennum) ptr); if (ConfiguredMonitor->features.dpms) { - ptr->mon_option_lst = xf86addNewOption(ptr->mon_option_lst, xstrdup("DPMS"), NULL); + ptr->mon_option_lst = xf86addNewOption(ptr->mon_option_lst, strdup("DPMS"), NULL); } return ptr; @@ -643,7 +619,6 @@ void DoConfigure(void) { int i,j, screennum = -1; - size_t len; char *home = NULL; char filename[PATH_MAX]; char *addslash = ""; @@ -665,7 +640,7 @@ DoConfigure(void) /* Load all the drivers that were found. */ xf86LoadModules(vlist, NULL); - xfree(vlist); + free(vlist); for (i = 0; i < xf86NumDrivers; i++) { xorgHWFlags flags; @@ -685,8 +660,6 @@ DoConfigure(void) xorgHWAccess = FALSE; } - xf86FindPrimaryDevice(); - /* Create XF86Config file structure */ xf86config = calloc(1, sizeof(XF86ConfigRec)); @@ -814,7 +787,7 @@ DoConfigure(void) } } } - xfree(driverProbed); + free(driverProbed); } @@ -825,7 +798,6 @@ DoConfigure(void) } xf86PostProbe(); - xf86EntityInit(); for (j = 0; j < xf86NumScreens; j++) { xf86Screens[j]->scrnIndex = j; @@ -841,7 +813,6 @@ DoConfigure(void) ConfiguredMonitor = NULL; - xf86EnableAccess(xf86Screens[dev2screen[j]]); if ((*xf86Screens[dev2screen[j]]->PreInit)(xf86Screens[dev2screen[j]], PROBE_DETECT) && ConfiguredMonitor) { diff --git a/xserver/hw/xfree86/common/xf86Cursor.c b/xserver/hw/xfree86/common/xf86Cursor.c index 6740faf65..0d27fd585 100644 --- a/xserver/hw/xfree86/common/xf86Cursor.c +++ b/xserver/hw/xfree86/common/xf86Cursor.c @@ -502,7 +502,7 @@ AddEdge( } if(!pEdge) { - if(!(pNew = xalloc(sizeof(xf86EdgeRec)))) + if(!(pNew = malloc(sizeof(xf86EdgeRec)))) break; pNew->screen = screen; @@ -519,7 +519,7 @@ AddEdge( break; } else if (min < pEdge->start) { - if(!(pNew = xalloc(sizeof(xf86EdgeRec)))) + if(!(pNew = malloc(sizeof(xf86EdgeRec)))) break; pNew->screen = screen; @@ -581,7 +581,7 @@ xf86InitOrigins(void) { unsigned long screensLeft, prevScreensLeft, mask; screenLayoutPtr screen; - ScreenPtr pScreen; + ScreenPtr pScreen, refScreen; int x1, x2, y1, y2, left, right, top, bottom; int i, j, ref, minX, minY, min, max; xf86ScreenLayoutPtr pLayout; @@ -590,7 +590,7 @@ xf86InitOrigins(void) /* need to have this set up with a config file option */ HardEdges = FALSE; - bzero(xf86ScreenLayout, MAXSCREENS * sizeof(xf86ScreenLayoutRec)); + memset(xf86ScreenLayout, 0, MAXSCREENS * sizeof(xf86ScreenLayoutRec)); screensLeft = prevScreensLeft = (1 << xf86NumScreens) - 1; @@ -608,6 +608,7 @@ xf86InitOrigins(void) continue; } + pScreen = xf86Screens[i]->pScreen; switch(screen->where) { case PosObsolete: OldStyleConfig = TRUE; @@ -620,7 +621,7 @@ xf86InitOrigins(void) break; } pLayout->left = AddEdge(pLayout->left, - 0, xf86Screens[i]->pScreen->height, + 0, pScreen->height, xf86Screens[ref]->pScreen->width, 0, ref); } if(screen->right) { @@ -629,7 +630,6 @@ xf86InitOrigins(void) ErrorF("Referenced uninitialized screen in Layout!\n"); break; } - pScreen = xf86Screens[i]->pScreen; pLayout->right = AddEdge(pLayout->right, 0, pScreen->height, -pScreen->width, 0, ref); } @@ -640,7 +640,7 @@ xf86InitOrigins(void) break; } pLayout->up = AddEdge(pLayout->up, - 0, xf86Screens[i]->pScreen->width, + 0, pScreen->width, 0, xf86Screens[ref]->pScreen->height, ref); } if(screen->bottom) { @@ -649,7 +649,6 @@ xf86InitOrigins(void) ErrorF("Referenced uninitialized screen in Layout!\n"); break; } - pScreen = xf86Screens[i]->pScreen; pLayout->down = AddEdge(pLayout->down, 0, pScreen->width, 0, -pScreen->height, ref); } @@ -658,8 +657,8 @@ xf86InitOrigins(void) screen->x = screen->y = 0; /* FALLTHROUGH */ case PosAbsolute: - dixScreenOrigins[i].x = screen->x; - dixScreenOrigins[i].y = screen->y; + pScreen->x = screen->x; + pScreen->y = screen->y; screensLeft &= ~(1 << i); break; case PosRelative: @@ -669,8 +668,9 @@ xf86InitOrigins(void) break; } if(screensLeft & (1 << ref)) break; - dixScreenOrigins[i].x = dixScreenOrigins[ref].x + screen->x; - dixScreenOrigins[i].y = dixScreenOrigins[ref].y + screen->y; + refScreen = xf86Screens[ref]->pScreen; + pScreen->x = refScreen->x + screen->x; + pScreen->y = refScreen->y + screen->y; screensLeft &= ~(1 << i); break; case PosRightOf: @@ -680,10 +680,9 @@ xf86InitOrigins(void) break; } if(screensLeft & (1 << ref)) break; - pScreen = xf86Screens[ref]->pScreen; - dixScreenOrigins[i].x = - dixScreenOrigins[ref].x + pScreen->width; - dixScreenOrigins[i].y = dixScreenOrigins[ref].y; + refScreen = xf86Screens[ref]->pScreen; + pScreen->x = refScreen->x + refScreen->width; + pScreen->y = refScreen->y; screensLeft &= ~(1 << i); break; case PosLeftOf: @@ -693,10 +692,9 @@ xf86InitOrigins(void) break; } if(screensLeft & (1 << ref)) break; - pScreen = xf86Screens[i]->pScreen; - dixScreenOrigins[i].x = - dixScreenOrigins[ref].x - pScreen->width; - dixScreenOrigins[i].y = dixScreenOrigins[ref].y; + refScreen = xf86Screens[ref]->pScreen; + pScreen->x = refScreen->x - pScreen->width; + pScreen->y = refScreen->y; screensLeft &= ~(1 << i); break; case PosBelow: @@ -706,10 +704,9 @@ xf86InitOrigins(void) break; } if(screensLeft & (1 << ref)) break; - pScreen = xf86Screens[ref]->pScreen; - dixScreenOrigins[i].x = dixScreenOrigins[ref].x; - dixScreenOrigins[i].y = - dixScreenOrigins[ref].y + pScreen->height; + refScreen = xf86Screens[ref]->pScreen; + pScreen->x = refScreen->x; + pScreen->y = refScreen->y + refScreen->height; screensLeft &= ~(1 << i); break; case PosAbove: @@ -719,10 +716,9 @@ xf86InitOrigins(void) break; } if(screensLeft & (1 << ref)) break; - pScreen = xf86Screens[i]->pScreen; - dixScreenOrigins[i].x = dixScreenOrigins[ref].x; - dixScreenOrigins[i].y = - dixScreenOrigins[ref].y - pScreen->height; + refScreen = xf86Screens[ref]->pScreen; + pScreen->x = refScreen->x; + pScreen->y = refScreen->y - pScreen->height; screensLeft &= ~(1 << i); break; default: @@ -741,7 +737,7 @@ xf86InitOrigins(void) while(!((1 << i) & screensLeft)){ i++; } ref = xf86ConfigLayout.screens[i].refscreen->screennum; - dixScreenOrigins[ref].x = dixScreenOrigins[ref].y = 0; + xf86Screens[ref]->pScreen->x = xf86Screens[ref]->pScreen->y = 0; screensLeft &= ~(1 << ref); } @@ -749,20 +745,20 @@ xf86InitOrigins(void) } /* justify the topmost and leftmost to (0,0) */ - minX = dixScreenOrigins[0].x; - minY = dixScreenOrigins[0].y; + minX = xf86Screens[0]->pScreen->x; + minY = xf86Screens[0]->pScreen->y; for(i = 1; i < xf86NumScreens; i++) { - if(dixScreenOrigins[i].x < minX) - minX = dixScreenOrigins[i].x; - if(dixScreenOrigins[i].y < minY) - minY = dixScreenOrigins[i].y; + if(xf86Screens[i]->pScreen->x < minX) + minX = xf86Screens[i]->pScreen->x; + if(xf86Screens[i]->pScreen->y < minY) + minY = xf86Screens[i]->pScreen->y; } if (minX || minY) { for(i = 0; i < xf86NumScreens; i++) { - dixScreenOrigins[i].x -= minX; - dixScreenOrigins[i].y -= minY; + xf86Screens[i]->pScreen->x -= minX; + xf86Screens[i]->pScreen->y -= minY; } } @@ -775,18 +771,20 @@ xf86InitOrigins(void) pScreen = xf86Screens[i]->pScreen; - left = dixScreenOrigins[i].x; + left = pScreen->x; right = left + pScreen->width; - top = dixScreenOrigins[i].y; + top = pScreen->y; bottom = top + pScreen->height; for(j = 0; j < xf86NumScreens; j++) { if(i == j) continue; - x1 = dixScreenOrigins[j].x; - x2 = x1 + xf86Screens[j]->pScreen->width; - y1 = dixScreenOrigins[j].y; - y2 = y1 + xf86Screens[j]->pScreen->height; + refScreen = xf86Screens[j]->pScreen; + + x1 = refScreen->x; + x2 = x1 + refScreen->width; + y1 = refScreen->y; + y2 = y1 + refScreen->height; if((bottom > y1) && (top < y2)) { min = y1 - top; @@ -796,13 +794,13 @@ xf86InitOrigins(void) if(((left - 1) >= x1) && ((left - 1) < x2)) pLayout->left = AddEdge(pLayout->left, min, max, - dixScreenOrigins[i].x - dixScreenOrigins[j].x, - dixScreenOrigins[i].y - dixScreenOrigins[j].y, j); + pScreen->x - refScreen->x, + pScreen->y - refScreen->y, j); if((right >= x1) && (right < x2)) pLayout->right = AddEdge(pLayout->right, min, max, - dixScreenOrigins[i].x - dixScreenOrigins[j].x, - dixScreenOrigins[i].y - dixScreenOrigins[j].y, j); + pScreen->x - refScreen->x, + pScreen->y - refScreen->y, j); } @@ -814,13 +812,13 @@ xf86InitOrigins(void) if(((top - 1) >= y1) && ((top - 1) < y2)) pLayout->up = AddEdge(pLayout->up, min, max, - dixScreenOrigins[i].x - dixScreenOrigins[j].x, - dixScreenOrigins[i].y - dixScreenOrigins[j].y, j); + pScreen->x - refScreen->x, + pScreen->y - refScreen->y, j); if((bottom >= y1) && (bottom < y2)) pLayout->down = AddEdge(pLayout->down, min, max, - dixScreenOrigins[i].x - dixScreenOrigins[j].x, - dixScreenOrigins[i].y - dixScreenOrigins[j].y, j); + pScreen->x - refScreen->x, + pScreen->y - refScreen->y, j); } } } @@ -850,10 +848,10 @@ xf86ReconfigureLayout(void) for (i = 0; i < MAXSCREENS; i++) { xf86ScreenLayoutPtr sl = &xf86ScreenLayout[i]; /* we don't have to zero these, xf86InitOrigins() takes care of that */ - if (sl->left) xfree(sl->left); - if (sl->right) xfree(sl->right); - if (sl->up) xfree(sl->up); - if (sl->down) xfree(sl->down); + free(sl->left); + free(sl->right); + free(sl->up); + free(sl->down); } xf86InitOrigins(); diff --git a/xserver/hw/xfree86/common/xf86DGA.c b/xserver/hw/xfree86/common/xf86DGA.c index 5d8addbed..c468c6038 100644 --- a/xserver/hw/xfree86/common/xf86DGA.c +++ b/xserver/hw/xfree86/common/xf86DGA.c @@ -51,8 +51,8 @@ #include "mi.h" -static int DGAScreenKeyIndex; -static DevPrivateKey DGAScreenKey; +static DevPrivateKeyRec DGAScreenKeyRec; +#define DGAScreenKeyRegistered dixPrivateKeyRegistered(&DGAScreenKeyRec) static int mieq_installed = 0; static Bool DGACloseScreen(int i, ScreenPtr pScreen); @@ -71,7 +71,7 @@ DGACopyModeInfo( int *XDGAEventBase = NULL; #define DGA_GET_SCREEN_PRIV(pScreen) ((DGAScreenPtr) \ - dixLookupPrivate(&(pScreen)->devPrivates, DGAScreenKey)) + dixLookupPrivate(&(pScreen)->devPrivates, &DGAScreenKeyRec)) typedef struct _FakedVisualList{ @@ -118,15 +118,16 @@ DGAInit( if(!modes || num <= 0) return FALSE; - DGAScreenKey = &DGAScreenKeyIndex; + if (!dixRegisterPrivateKey(&DGAScreenKeyRec, PRIVATE_SCREEN, 0)) + return FALSE; pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen); if (!pScreenPriv) { - if(!(pScreenPriv = (DGAScreenPtr)xalloc(sizeof(DGAScreenRec)))) + if(!(pScreenPriv = (DGAScreenPtr)malloc(sizeof(DGAScreenRec)))) return FALSE; - dixSetPrivate(&pScreen->devPrivates, DGAScreenKey, pScreenPriv); + dixSetPrivate(&pScreen->devPrivates, &DGAScreenKeyRec, pScreenPriv); pScreenPriv->CloseScreen = pScreen->CloseScreen; pScreen->CloseScreen = DGACloseScreen; pScreenPriv->DestroyColormap = pScreen->DestroyColormap; @@ -177,7 +178,7 @@ DGAReInitModes( int i; /* No DGA? Ignore call (but don't make it look like it failed) */ - if(DGAScreenKey == NULL) + if(!DGAScreenKeyRegistered) return TRUE; pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen); @@ -235,8 +236,8 @@ FreeMarkedVisuals(ScreenPtr pScreen) prev->next = curr; else pScreenPriv->fakedVisuals = curr; - xfree(tmp->pVisual); - xfree(tmp); + free(tmp->pVisual); + free(tmp); } else { prev = curr; curr = curr->next; @@ -263,7 +264,7 @@ DGACloseScreen(int i, ScreenPtr pScreen) /* DGAShutdown() should have ensured that no DGA screen were active by here */ - xfree(pScreenPriv); + free(pScreenPriv); return((*pScreen->CloseScreen)(i, pScreen)); } @@ -347,7 +348,7 @@ xf86SetDGAMode( DGAModePtr pMode = NULL; /* First check if DGAInit was successful on this screen */ - if (DGAScreenKey == NULL) + if (!DGAScreenKeyRegistered) return BadValue; pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen); if (!pScreenPriv) @@ -363,7 +364,7 @@ xf86SetDGAMode( else (*pScreen->DestroyPixmap)(oldPix); } - xfree(pScreenPriv->current); + free(pScreenPriv->current); pScreenPriv->current = NULL; pScrn->vtSema = TRUE; (*pScreenPriv->funcs->SetMode)(pScrn, NULL); @@ -391,7 +392,7 @@ xf86SetDGAMode( else return BadValue; - if(!(device = (DGADevicePtr)xalloc(sizeof(DGADeviceRec)))) + if(!(device = (DGADevicePtr)malloc(sizeof(DGADeviceRec)))) return BadAlloc; if(!pScreenPriv->current) { @@ -403,7 +404,7 @@ xf86SetDGAMode( } if(!(*pScreenPriv->funcs->SetMode)(pScrn, pMode)) { - xfree(device); + free(device); return BadAlloc; } @@ -424,7 +425,7 @@ xf86SetDGAMode( else (*pScreen->DestroyPixmap)(oldPix); } - xfree(pScreenPriv->current); + free(pScreenPriv->current); pScreenPriv->current = NULL; } @@ -478,7 +479,7 @@ DGAChangePixmapMode(int index, int *x, int *y, int mode) DGAModePtr pMode; PixmapPtr pPix; - if(DGAScreenKey == NULL) + if(!DGAScreenKeyRegistered) return FALSE; pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]); @@ -528,7 +529,7 @@ DGAChangePixmapMode(int index, int *x, int *y, int mode) Bool DGAAvailable(int index) { - if(DGAScreenKey == NULL) + if(!DGAScreenKeyRegistered) return FALSE; if(DGA_GET_SCREEN_PRIV(screenInfo.screens[index])) @@ -542,7 +543,7 @@ DGAActive(int index) { DGAScreenPtr pScreenPriv; - if(DGAScreenKey == NULL) + if(!DGAScreenKeyRegistered) return FALSE; pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]); @@ -563,7 +564,7 @@ DGAShutdown(void) ScrnInfoPtr pScrn; int i; - if(DGAScreenKey == NULL) + if(!DGAScreenKeyRegistered) return; for(i = 0; i < screenInfo.numScreens; i++) { @@ -671,7 +672,7 @@ DGACreateColormap(int index, ClientPtr client, int id, int mode, int alloc) pMode = &(pScreenPriv->modes[mode - 1]); - if(!(pVisual = xalloc(sizeof(VisualRec)))) + if(!(pVisual = malloc(sizeof(VisualRec)))) return BadAlloc; pVisual->vid = FakeClientID(0); @@ -705,8 +706,8 @@ DGACreateColormap(int index, ClientPtr client, int id, int mode, int alloc) pVisual->offsetBlue = BitsClear(pVisual->blueMask); } - if(!(fvlp = xalloc(sizeof(FakedVisualList)))) { - xfree(pVisual); + if(!(fvlp = malloc(sizeof(FakedVisualList)))) { + free(pVisual); return BadAlloc; } @@ -731,7 +732,7 @@ DGAInstallCmap(ColormapPtr cmap) /* We rely on the extension to check that DGA is active */ if(!pScreenPriv->dgaColormap) - pScreenPriv->savedColormap = miInstalledMaps[pScreen->myNum]; + pScreenPriv->savedColormap = GetInstalledmiColormap(pScreen); pScreenPriv->dgaColormap = cmap; @@ -893,7 +894,7 @@ DGAVTSwitch(void) /* Alternatively, this could send events to DGA clients */ - if(DGAScreenKey) { + if(DGAScreenKeyRegistered) { DGAScreenPtr pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen); if(pScreenPriv && pScreenPriv->current) @@ -910,7 +911,7 @@ DGAStealKeyEvent(DeviceIntPtr dev, int index, int key_code, int is_down) DGAScreenPtr pScreenPriv; DGAEvent event; - if(DGAScreenKey == NULL) /* no DGA */ + if(!DGAScreenKeyRegistered) /* no DGA */ return FALSE; if (key_code < 8 || key_code > 255) @@ -943,7 +944,7 @@ DGAStealMotionEvent(DeviceIntPtr dev, int index, int dx, int dy) DGAScreenPtr pScreenPriv; DGAEvent event; - if(DGAScreenKey == NULL) /* no DGA */ + if(!DGAScreenKeyRegistered) /* no DGA */ return FALSE; pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]); @@ -981,7 +982,7 @@ DGAStealButtonEvent(DeviceIntPtr dev, int index, int button, int is_down) DGAScreenPtr pScreenPriv; DGAEvent event; - if (DGAScreenKey == NULL) + if(!DGAScreenKeyRegistered) /* no DGA */ return FALSE; pScreenPriv = DGA_GET_SCREEN_PRIV(screenInfo.screens[index]); @@ -1009,7 +1010,7 @@ Bool DGAIsDgaEvent (xEvent *e) { int coreEquiv; - if (DGAScreenKey == NULL || XDGAEventBase == 0) + if (!DGAScreenKeyRegistered || XDGAEventBase == 0) return FALSE; coreEquiv = e->u.u.type - *XDGAEventBase; if (KeyPress <= coreEquiv && coreEquiv <= MotionNotify) @@ -1094,7 +1095,7 @@ DGAProcessPointerEvent (ScreenPtr pScreen, DGAEvent *event, DeviceIntPtr mouse) ev.header = ET_Internal; ev.length = sizeof(ev); ev.type = event->subtype; - ev.corestate = butc->state; + ev.corestate = butc ? butc->state : 0; if (master && master->key) ev.corestate |= XkbStateFieldFromRec(&master->key->xkbInfo->state); @@ -1203,7 +1204,7 @@ DGAHandleEvent(int screen_num, InternalEvent *ev, DeviceIntPtr device) DGAScreenPtr pScreenPriv; /* no DGA */ - if (DGAScreenKey == NULL || XDGAEventBase == 0) + if (!DGAScreenKeyRegistered || XDGAEventBase == 0) return; pScreenPriv = DGA_GET_SCREEN_PRIV(pScreen); diff --git a/xserver/hw/xfree86/common/xf86DPMS.c b/xserver/hw/xfree86/common/xf86DPMS.c index 22174c74e..cd025dca4 100644 --- a/xserver/hw/xfree86/common/xf86DPMS.c +++ b/xserver/hw/xfree86/common/xf86DPMS.c @@ -46,7 +46,7 @@ #ifdef DPMSExtension -static int DPMSKeyIndex; +static DevPrivateKeyRec DPMSKeyRec; static DevPrivateKey DPMSKey; static Bool DPMSClose(int i, ScreenPtr pScreen); static int DPMSCount = 0; @@ -62,10 +62,9 @@ xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags) pointer DPMSOpt; MessageType enabled_from; - DPMSKey = &DPMSKeyIndex; + DPMSKey = &DPMSKeyRec; - if (!dixSetPrivate(&pScreen->devPrivates, DPMSKey, - xcalloc(sizeof(DPMSRec), 1))) + if (!dixRegisterPrivateKey(&DPMSKeyRec, PRIVATE_SCREEN, sizeof (DPMSRec))) return FALSE; pDPMS = dixLookupPrivate(&pScreen->devPrivates, DPMSKey); @@ -127,8 +126,6 @@ DPMSClose(int i, ScreenPtr pScreen) xf86Screens[i]->DPMSSet(xf86Screens[i],DPMSModeOn,0); } - xfree(pDPMS); - dixSetPrivate(&pScreen->devPrivates, DPMSKey, NULL); if (--DPMSCount == 0) DPMSKey = NULL; return pScreen->CloseScreen(i, pScreen); diff --git a/xserver/hw/xfree86/common/xf86Events.c b/xserver/hw/xfree86/common/xf86Events.c index ebf03bfe7..2e82848ce 100644 --- a/xserver/hw/xfree86/common/xf86Events.c +++ b/xserver/hw/xfree86/common/xf86Events.c @@ -372,8 +372,6 @@ xf86PrintBacktrace(void) xorg_backtrace(); } -#define KeyPressed(k) (keyc->postdown[k >> 3] & (1 << (k & 7))) - static void xf86ReleaseKeys(DeviceIntPtr pDev) { @@ -399,7 +397,7 @@ xf86ReleaseKeys(DeviceIntPtr pDev) for (i = keyc->xkbInfo->desc->min_key_code; i < keyc->xkbInfo->desc->max_key_code; i++) { - if (KeyPressed(i)) { + if (key_is_down(pDev, i, KEY_POSTED)) { sigstate = xf86BlockSIGIO (); nevents = GetKeyboardEvents(xf86Events, pDev, KeyRelease, i); for (j = 0; j < nevents; j++) @@ -567,7 +565,7 @@ addInputHandler(int fd, InputHandlerProc proc, pointer data) if (fd < 0 || !proc) return NULL; - ih = xcalloc(sizeof(*ih), 1); + ih = calloc(sizeof(*ih), 1); if (!ih) return NULL; @@ -616,7 +614,7 @@ removeInputHandler(IHPtr ih) if (ih) p->next = ih->next; } - xfree(ih); + free(ih); } int diff --git a/xserver/hw/xfree86/common/xf86Globals.c b/xserver/hw/xfree86/common/xf86Globals.c index 8b483f35c..43665d1b6 100644 --- a/xserver/hw/xfree86/common/xf86Globals.c +++ b/xserver/hw/xfree86/common/xf86Globals.c @@ -47,14 +47,10 @@ /* Globals that video drivers may access */ -/* Index into pScreen.devPrivates */ -static int xf86CreateRootWindowKeyIndex; -DevPrivateKey xf86CreateRootWindowKey = &xf86CreateRootWindowKeyIndex; -/* Index of ScrnInfo in pScreen.devPrivates */ -static int xf86ScreenKeyIndex; -DevPrivateKey xf86ScreenKey = &xf86ScreenKeyIndex; -static int xf86PixmapKeyIndex; -DevPrivateKey xf86PixmapKey = &xf86PixmapKeyIndex; +DevPrivateKeyRec xf86CreateRootWindowKeyRec; +DevPrivateKeyRec xf86ScreenKeyRec; +DevPrivateKeyRec xf86PixmapKeyRec; + ScrnInfoPtr *xf86Screens = NULL; /* List of ScrnInfos */ const unsigned char byte_reversed[256] = { diff --git a/xserver/hw/xfree86/common/xf86Helper.c b/xserver/hw/xfree86/common/xf86Helper.c index 1cc1526c9..724c1a1fd 100644 --- a/xserver/hw/xfree86/common/xf86Helper.c +++ b/xserver/hw/xfree86/common/xf86Helper.c @@ -38,9 +38,6 @@ #include #endif -#include -#include "Pci.h" - #include #include "os.h" #include "servermd.h" @@ -57,7 +54,6 @@ #include "xf86Xinput.h" #include "xf86InPriv.h" #include "mivalidate.h" -#include "xf86Bus.h" #include "xf86Crtc.h" /* For xf86GetClocks */ @@ -105,7 +101,7 @@ xf86DeleteDriver(int drvIndex) && (!xf86DriverHasEntities(xf86DriverList[drvIndex]))) { if (xf86DriverList[drvIndex]->module) UnloadModule(xf86DriverList[drvIndex]->module); - xfree(xf86DriverList[drvIndex]); + free(xf86DriverList[drvIndex]); xf86DriverList[drvIndex] = NULL; } } @@ -137,7 +133,7 @@ xf86DeleteInputDriver(int drvIndex) { if (xf86InputDriverList[drvIndex] && xf86InputDriverList[drvIndex]->module) UnloadModule(xf86InputDriverList[drvIndex]->module); - xfree(xf86InputDriverList[drvIndex]); + free(xf86InputDriverList[drvIndex]); xf86InputDriverList[drvIndex] = NULL; } @@ -238,12 +234,11 @@ xf86DeleteScreen(int scrnIndex, int flags) if (pScrn->drv) pScrn->drv->refCount--; - if (pScrn->privates) - xfree(pScrn->privates); + free(pScrn->privates); xf86ClearEntityListForScreen(scrnIndex); - xfree(pScrn); + free(pScrn); /* Move the other entries down, updating their scrnIndex fields */ @@ -273,7 +268,7 @@ xf86AllocateScrnInfoPrivateIndex(void) nprivs = xnfrealloc(pScr->privates, xf86ScrnInfoPrivateCount * sizeof(DevUnion)); /* Zero the new private */ - bzero(&nprivs[idx], sizeof(DevUnion)); + memset(&nprivs[idx], 0, sizeof(DevUnion)); pScr->privates = nprivs; } return idx; @@ -285,7 +280,7 @@ xf86AllocateInput(InputDriverPtr drv, int flags) { InputInfoPtr new, *prev = NULL; - if (!(new = xcalloc(sizeof(InputInfoRec), 1))) + if (!(new = calloc(sizeof(InputInfoRec), 1))) return NULL; new->drv = drv; @@ -331,8 +326,9 @@ xf86DeleteInput(InputInfoPtr pInp, int flags) /* This should *really* be handled in drv->UnInit(dev) call instead, but * if the driver forgets about it make sure we free it or at least crash * with flying colors */ - if (pInp->private) - xfree(pInp->private); + free(pInp->private); + + FreeInputAttributes(pInp->attrs); /* Remove the entry from the list. */ if (pInp == xf86InputDevs) @@ -345,7 +341,7 @@ xf86DeleteInput(InputInfoPtr pInp, int flags) p->next = pInp->next; /* Else the entry wasn't in the xf86InputDevs list (ignore this). */ } - xfree(pInp); + free(pInp); } Bool @@ -780,6 +776,9 @@ xf86SetWeight(ScrnInfoPtr scrp, rgb weight, rgb mask) scrp->weight.red = scrp->weight.blue = 5; scrp->weight.green = 6; break; + case 18: + scrp->weight.red = scrp->weight.green = scrp->weight.blue = 6; + break; case 24: scrp->weight.red = scrp->weight.green = scrp->weight.blue = 8; break; @@ -1064,7 +1063,7 @@ xf86SetBlackWhitePixels(ScreenPtr pScreen) static void xf86SetRootClip (ScreenPtr pScreen, Bool enable) { - WindowPtr pWin = WindowTable[pScreen->myNum]; + WindowPtr pWin = pScreen->root; WindowPtr pChild; Bool WasViewable = (Bool)(pWin->viewable); Bool anyMarked = FALSE; @@ -1087,8 +1086,8 @@ xf86SetRootClip (ScreenPtr pScreen, Bool enable) { RegionPtr borderVisible; - borderVisible = REGION_CREATE(pScreen, NullBox, 1); - REGION_SUBTRACT(pScreen, borderVisible, + borderVisible = RegionCreate(NullBox, 1); + RegionSubtract(borderVisible, &pWin->borderClip, &pWin->winSize); pWin->valdata->before.borderVisible = borderVisible; } @@ -1107,18 +1106,18 @@ xf86SetRootClip (ScreenPtr pScreen, Bool enable) box.y1 = 0; box.x2 = pScreen->width; box.y2 = pScreen->height; - REGION_INIT (pScreen, &pWin->winSize, &box, 1); - REGION_INIT (pScreen, &pWin->borderSize, &box, 1); + RegionInit(&pWin->winSize, &box, 1); + RegionInit(&pWin->borderSize, &box, 1); if (WasViewable) - REGION_RESET(pScreen, &pWin->borderClip, &box); + RegionReset(&pWin->borderClip, &box); pWin->drawable.width = pScreen->width; pWin->drawable.height = pScreen->height; - REGION_BREAK (pWin->drawable.pScreen, &pWin->clipList); + RegionBreak(&pWin->clipList); } else { - REGION_EMPTY(pScreen, &pWin->borderClip); - REGION_BREAK (pWin->drawable.pScreen, &pWin->clipList); + RegionEmpty(&pWin->borderClip); + RegionBreak(&pWin->clipList); } ResizeChildrenWinSize (pWin, 0, 0, 0, 0); @@ -1224,7 +1223,7 @@ xf86VDrvMsgVerb(int scrnIndex, MessageType type, int verb, const char *format, /* Prefix the scrnIndex name to the format string. */ if (scrnIndex >= 0 && scrnIndex < xf86NumScreens && xf86Screens[scrnIndex]->name) { - tmpFormat = xalloc(strlen(format) + + tmpFormat = malloc(strlen(format) + strlen(xf86Screens[scrnIndex]->name) + PREFIX_SIZE + 1); if (!tmpFormat) @@ -1235,7 +1234,7 @@ xf86VDrvMsgVerb(int scrnIndex, MessageType type, int verb, const char *format, strcat(tmpFormat, format); LogVMessageVerb(type, verb, tmpFormat, args); - xfree(tmpFormat); + free(tmpFormat); } else LogVMessageVerb(type, verb, format, args); } @@ -1364,7 +1363,7 @@ xf86TokenToString(SymTabPtr table, int token) if (table[i].token < 0) return NULL; else - return(table[i].name); + return table[i].name; } int @@ -1378,7 +1377,7 @@ xf86StringToToken(SymTabPtr table, const char *string) for (i = 0; table[i].token >= 0 && xf86NameCmp(string, table[i].name); i++) ; - return(table[i].token); + return table[i].token; } /* @@ -1444,7 +1443,12 @@ xf86MatchDevice(const char *drivername, GDevPtr **sectlist) if (sectlist) *sectlist = NULL; - if (xf86DoConfigure && xf86DoConfigurePass1) return 1; + /* + * This can happen when running Xorg -showopts and a module like ati + * or vmware tries to load its submodules when xf86ConfigLayout is empty + */ + if (!xf86ConfigLayout.screens) + return 0; /* * This is a very important function that matches the device sections @@ -1502,424 +1506,10 @@ xf86MatchDevice(const char *drivername, GDevPtr **sectlist) if (sectlist) *sectlist = pgdp; else - xfree(pgdp); + free(pgdp); return i; } -static Bool -pciDeviceHasBars(struct pci_device *pci) -{ - int i; - - for (i = 0; i < 6; i++) - if (pci->regions[i].size) - return TRUE; - - if (pci->rom_size) - return TRUE; - - return FALSE; -} - -struct Inst { - struct pci_device * pci; - GDevPtr dev; - Bool foundHW; /* PCIid in list of supported chipsets */ - Bool claimed; /* BusID matches with a device section */ - int chip; - int screen; -}; - - -/** - * Find set of unclaimed devices matching a given vendor ID. - * - * Used by drivers to find as yet unclaimed devices matching the specified - * vendor ID. - * - * \param driverName Name of the driver. This is used to find Device - * sections in the config file. - * \param vendorID PCI vendor ID of associated devices. If zero, then - * the true vendor ID must be encoded in the \c PCIid - * fields of the \c PCIchipsets entries. - * \param chipsets Symbol table used to associate chipset names with - * PCI IDs. - * \param devList List of Device sections parsed from the config file. - * \param numDevs Number of entries in \c devList. - * \param drvp Pointer the driver's control structure. - * \param foundEntities Returned list of entity indicies associated with the - * driver. - * - * \returns - * The number of elements in returned in \c foundEntities on success or zero - * on failure. - * - * \todo - * This function does a bit more than short description says. Fill in some - * more of the details of its operation. - * - * \todo - * The \c driverName parameter is redundant. It is the same as - * \c DriverRec::driverName. In a future version of this function, remove - * that parameter. - */ -int -xf86MatchPciInstances(const char *driverName, int vendorID, - SymTabPtr chipsets, PciChipsets *PCIchipsets, - GDevPtr *devList, int numDevs, DriverPtr drvp, - int **foundEntities) -{ - int i,j; - struct pci_device * pPci; - struct pci_device_iterator *iter; - struct Inst *instances = NULL; - int numClaimedInstances = 0; - int allocatedInstances = 0; - int numFound = 0; - SymTabRec *c; - PciChipsets *id; - int *retEntities = NULL; - - *foundEntities = NULL; - - - /* Each PCI device will contribute at least one entry. Each device - * section can contribute at most one entry. The sum of the two is - * guaranteed to be larger than the maximum possible number of entries. - * Do this calculation and memory allocation once now to eliminate the - * need for realloc calls inside the loop. - */ - if (!(xf86DoConfigure && xf86DoConfigurePass1)) { - unsigned max_entries = numDevs; - - iter = pci_slot_match_iterator_create(NULL); - while ((pPci = pci_device_next(iter)) != NULL) { - max_entries++; - } - - pci_iterator_destroy(iter); - instances = xnfalloc(max_entries * sizeof(struct Inst)); - } - - iter = pci_slot_match_iterator_create(NULL); - while ((pPci = pci_device_next(iter)) != NULL) { - unsigned device_class = pPci->device_class; - Bool foundVendor = FALSE; - - - /* Convert the pre-PCI 2.0 device class for a VGA adapter to the - * 2.0 version of the same class. - */ - if ( device_class == 0x00000101 ) { - device_class = 0x00030000; - } - - - /* Find PCI devices that match the given vendor ID. The vendor ID is - * either specified explicitly as a parameter to the function or - * implicitly encoded in the high bits of id->PCIid. - * - * The first device with a matching vendor is recorded, even if the - * device ID doesn't match. This is done because the Device section - * in the xorg.conf file can over-ride the device ID. A matching PCI - * ID might not be found now, but after the device ID over-ride is - * applied there /might/ be a match. - */ - for (id = PCIchipsets; id->PCIid != -1; id++) { - const unsigned vendor_id = ((id->PCIid & 0xFFFF0000) >> 16) - | vendorID; - const unsigned device_id = (id->PCIid & 0x0000FFFF); - const unsigned match_class = 0x00030000 | id->PCIid; - - if ((vendor_id == pPci->vendor_id) - || ((vendorID == PCI_VENDOR_GENERIC) && (match_class == device_class))) { - if (!foundVendor && (instances != NULL)) { - ++allocatedInstances; - instances[allocatedInstances - 1].pci = pPci; - instances[allocatedInstances - 1].dev = NULL; - instances[allocatedInstances - 1].claimed = FALSE; - instances[allocatedInstances - 1].foundHW = FALSE; - instances[allocatedInstances - 1].screen = 0; - } - - foundVendor = TRUE; - - if ( (device_id == pPci->device_id) - || ((vendorID == PCI_VENDOR_GENERIC) - && (match_class == device_class)) ) { - if ( instances != NULL ) { - instances[allocatedInstances - 1].foundHW = TRUE; - instances[allocatedInstances - 1].chip = id->numChipset; - } - - - if ( xf86DoConfigure && xf86DoConfigurePass1 ) { - if (xf86CheckPciSlot(pPci)) { - GDevPtr pGDev = - xf86AddBusDeviceToConfigure(drvp->driverName, - BUS_PCI, pPci, -1); - if (pGDev) { - /* After configure pass 1, chipID and chipRev - * are treated as over-rides, so clobber them - * here. - */ - pGDev->chipID = -1; - pGDev->chipRev = -1; - } - - numFound++; - } - } - else { - numFound++; - } - - break; - } - } - } - } - - pci_iterator_destroy(iter); - - - /* In "probe only" or "configure" mode (signaled by instances being NULL), - * our work is done. Return the number of detected devices. - */ - if ( instances == NULL ) { - return numFound; - } - - - /* - * This may be debatable, but if no PCI devices with a matching vendor - * type is found, return zero now. It is probably not desirable to - * allow the config file to override this. - */ - if (allocatedInstances <= 0) { - xfree(instances); - return 0; - } - - - DebugF("%s instances found: %d\n", driverName, allocatedInstances); - - /* - * Check for devices that need duplicated instances. This is required - * when there is more than one screen per entity. - * - * XXX This currently doesn't work for cases where the BusID isn't - * specified explicitly in the config file. - */ - - for (j = 0; j < numDevs; j++) { - if (devList[j]->screen > 0 && devList[j]->busID - && *devList[j]->busID) { - for (i = 0; i < allocatedInstances; i++) { - pPci = instances[i].pci; - if (xf86ComparePciBusString(devList[j]->busID, - PCI_MAKE_BUS( pPci->domain, pPci->bus ), - pPci->dev, - pPci->func)) { - allocatedInstances++; - instances[allocatedInstances - 1] = instances[i]; - instances[allocatedInstances - 1].screen = - devList[j]->screen; - numFound++; - break; - } - } - } - } - - for (i = 0; i < allocatedInstances; i++) { - GDevPtr dev = NULL; - GDevPtr devBus = NULL; - - pPci = instances[i].pci; - for (j = 0; j < numDevs; j++) { - if (devList[j]->busID && *devList[j]->busID) { - if (xf86ComparePciBusString(devList[j]->busID, - PCI_MAKE_BUS( pPci->domain, pPci->bus ), - pPci->dev, - pPci->func) && - devList[j]->screen == instances[i].screen) { - - if (devBus) - xf86MsgVerb(X_WARNING,0, - "%s: More than one matching Device section for " - "instances\n\t(BusID: %s) found: %s\n", - driverName, devList[j]->busID, - devList[j]->identifier); - else - devBus = devList[j]; - } - } else { - /* - * if device section without BusID is found - * only assign to it to the primary device. - */ - if (xf86IsPrimaryPci(pPci)) { - xf86Msg(X_PROBED, "Assigning device section with no busID" - " to primary device\n"); - if (dev || devBus) - xf86MsgVerb(X_WARNING, 0, - "%s: More than one matching Device section " - "found: %s\n", driverName, devList[j]->identifier); - else - dev = devList[j]; - } - } - } - if (devBus) dev = devBus; /* busID preferred */ - if (!dev) { - if (xf86CheckPciSlot(pPci) && pciDeviceHasBars(pPci)) { - xf86MsgVerb(X_WARNING, 0, "%s: No matching Device section " - "for instance (BusID PCI:%u@%u:%u:%u) found\n", - driverName, pPci->domain, pPci->bus, pPci->dev, - pPci->func); - } - } else { - numClaimedInstances++; - instances[i].claimed = TRUE; - instances[i].dev = dev; - } - } - DebugF("%s instances found: %d\n", driverName, numClaimedInstances); - /* - * Now check that a chipset or chipID override in the device section - * is valid. Chipset has precedence over chipID. - * If chipset is not valid ignore BusSlot completely. - */ - for (i = 0; i < allocatedInstances && numClaimedInstances > 0; i++) { - MessageType from = X_PROBED; - - if (!instances[i].claimed) { - continue; - } - if (instances[i].dev->chipset) { - for (c = chipsets; c->token >= 0; c++) { - if (xf86NameCmp(c->name, instances[i].dev->chipset) == 0) - break; - } - if (c->token == -1) { - instances[i].claimed = FALSE; - numClaimedInstances--; - xf86MsgVerb(X_WARNING, 0, "%s: Chipset \"%s\" in Device " - "section \"%s\" isn't valid for this driver\n", - driverName, instances[i].dev->chipset, - instances[i].dev->identifier); - } else { - instances[i].chip = c->token; - - for (id = PCIchipsets; id->numChipset >= 0; id++) { - if (id->numChipset == instances[i].chip) - break; - } - if(id->numChipset >=0){ - xf86Msg(X_CONFIG,"Chipset override: %s\n", - instances[i].dev->chipset); - from = X_CONFIG; - } else { - instances[i].claimed = FALSE; - numClaimedInstances--; - xf86MsgVerb(X_WARNING, 0, "%s: Chipset \"%s\" in Device " - "section \"%s\" isn't a valid PCI chipset\n", - driverName, instances[i].dev->chipset, - instances[i].dev->identifier); - } - } - } else if (instances[i].dev->chipID > 0) { - for (id = PCIchipsets; id->numChipset >= 0; id++) { - if (id->PCIid == instances[i].dev->chipID) - break; - } - if (id->numChipset == -1) { - instances[i].claimed = FALSE; - numClaimedInstances--; - xf86MsgVerb(X_WARNING, 0, "%s: ChipID 0x%04X in Device " - "section \"%s\" isn't valid for this driver\n", - driverName, instances[i].dev->chipID, - instances[i].dev->identifier); - } else { - instances[i].chip = id->numChipset; - - xf86Msg( X_CONFIG,"ChipID override: 0x%04X\n", - instances[i].dev->chipID); - from = X_CONFIG; - } - } else if (!instances[i].foundHW) { - /* - * This means that there was no override and the PCI chipType - * doesn't match one that is supported - */ - instances[i].claimed = FALSE; - numClaimedInstances--; - } - if (instances[i].claimed == TRUE){ - for (c = chipsets; c->token >= 0; c++) { - if (c->token == instances[i].chip) - break; - } - xf86Msg(from,"Chipset %s found\n", - c->name); - } - } - - /* - * Of the claimed instances, check that another driver hasn't already - * claimed its slot. - */ - numFound = 0; - for (i = 0; i < allocatedInstances && numClaimedInstances > 0; i++) { - - if (!instances[i].claimed) - continue; - pPci = instances[i].pci; - - - /* - * Allow the same entity to be used more than once for devices with - * multiple screens per entity. This assumes implicitly that there - * will be a screen == 0 instance. - * - * XXX Need to make sure that two different drivers don't claim - * the same screen > 0 instance. - */ - if (instances[i].screen == 0 && !xf86CheckPciSlot( pPci )) - continue; - - DebugF("%s: card at %d:%d:%d is claimed by a Device section\n", - driverName, pPci->bus, pPci->dev, pPci->func); - - /* Allocate an entry in the lists to be returned */ - numFound++; - retEntities = xnfrealloc(retEntities, numFound * sizeof(int)); - retEntities[numFound - 1] = xf86ClaimPciSlot( pPci, drvp, - instances[i].chip, - instances[i].dev, - instances[i].dev->active); - if (retEntities[numFound - 1] == -1 && instances[i].screen > 0) { - for (j = 0; j < xf86NumEntities; j++) { - EntityPtr pEnt = xf86Entities[j]; - if (pEnt->bus.type != BUS_PCI) - continue; - if (pEnt->bus.id.pci == pPci) { - retEntities[numFound - 1] = j; - xf86AddDevToEntity(j, instances[i].dev); - break; - } - } - } - } - xfree(instances); - if (numFound > 0) { - *foundEntities = retEntities; - } - - return numFound; -} - /* * xf86GetClocks -- get the dot-clocks via a BIG BAD hack ... */ @@ -2206,14 +1796,14 @@ xf86LoadOneModule(char *name, pointer opt) if (Name == NULL) return NULL; if (*Name == '\0') { - xfree(Name); + free(Name); return NULL; } mod = LoadModule(Name, NULL, NULL, NULL, opt, NULL, &errmaj, &errmin); if (!mod) LoaderErrorMsg(NULL, Name, errmaj, errmin); - xfree(Name); + free(Name); return mod; } @@ -2267,7 +1857,7 @@ xf86SetBackingStore(ScreenPtr pScreen) if (xf86GetOptValBool(options, OPTION_BACKING_STORE, &useBS)) from = X_CONFIG; } - xfree(options); + free(options); pScreen->backingStoreSupport = useBS ? Always : NotUseful; if (serverGeneration == 1) xf86DrvMsg(pScreen->myNum, from, "Backing store %s\n", @@ -2306,7 +1896,7 @@ xf86SetSilkenMouse (ScreenPtr pScreen) if (xf86GetOptValBool(options, OPTION_SILKEN_MOUSE, &useSM)) from = X_CONFIG; } - xfree(options); + free(options); /* * XXX quick hack to report correctly for OSs that can't do SilkenMouse * yet. Should handle this differently so that alternate async methods @@ -2349,28 +1939,6 @@ xf86FindXvOptions(int scrnIndex, int adaptor_index, char *port_name, #define LoaderGetOS xf86GetOS #include "loader/os.c" -/* new RAC */ -/* - * xf86ConfigPciEntityInactive() -- This function can be used - * to configure an inactive entity as well as to reconfigure an - * previously active entity inactive. If the entity has been - * assigned to a screen before it will be removed. If p_chip is - * non-NULL all static resources listed there will be registered. - */ -static void -xf86ConfigPciEntityInactive(EntityInfoPtr pEnt, PciChipsets *p_chip, - EntityProc init, EntityProc enter, - EntityProc leave, pointer private) -{ - ScrnInfoPtr pScrn; - - if ((pScrn = xf86FindScreenForEntity(pEnt->index))) - xf86RemoveEntityFromScreen(pScrn,pEnt->index); - - /* shared resources are only needed when entity is active: remove */ - xf86SetEntityFuncs(pEnt->index,init,enter,leave,private); -} - static void xf86ConfigFbEntityInactive(EntityInfoPtr pEnt, EntityProc init, EntityProc enter, EntityProc leave, pointer private) @@ -2382,42 +1950,6 @@ xf86ConfigFbEntityInactive(EntityInfoPtr pEnt, EntityProc init, xf86SetEntityFuncs(pEnt->index,init,enter,leave,private); } -ScrnInfoPtr -xf86ConfigPciEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex, - PciChipsets *p_chip, void *dummy, EntityProc init, - EntityProc enter, EntityProc leave, pointer private) -{ - EntityInfoPtr pEnt = xf86GetEntityInfo(entityIndex); - if (!pEnt) return pScrn; - - if (!(pEnt->location.type == BUS_PCI) - || !xf86GetPciInfoForEntity(entityIndex)) { - xfree(pEnt); - return pScrn; - } - if (!pEnt->active) { - xf86ConfigPciEntityInactive(pEnt, p_chip, init, enter, - leave, private); - xfree(pEnt); - return pScrn; - } - - if (!pScrn) - pScrn = xf86AllocateScreen(pEnt->driver,scrnFlag); - if (xf86IsEntitySharable(entityIndex)) { - xf86SetEntityShared(entityIndex); - } - xf86AddEntityToScreen(pScrn,entityIndex); - if (xf86IsEntityShared(entityIndex)) { - return pScrn; - } - xfree(pEnt); - - xf86SetEntityFuncs(entityIndex,init,enter,leave,private); - - return pScrn; -} - ScrnInfoPtr xf86ConfigFbEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex, EntityProc init, EntityProc enter, EntityProc leave, @@ -2427,13 +1959,13 @@ xf86ConfigFbEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex, if (!pEnt) return pScrn; if (!(pEnt->location.type == BUS_NONE)) { - xfree(pEnt); + free(pEnt); return pScrn; } if (!pEnt->active) { xf86ConfigFbEntityInactive(pEnt, init, enter, leave, private); - xfree(pEnt); + free(pEnt); return pScrn; } @@ -2446,33 +1978,6 @@ xf86ConfigFbEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex, return pScrn; } -/* - * - * OBSOLETE ! xf86ConfigActivePciEntity() is an obsolete function. - * It is likely to be removed. Don't use! - */ - -Bool -xf86ConfigActivePciEntity(ScrnInfoPtr pScrn, int entityIndex, - PciChipsets *p_chip, void *dummy, EntityProc init, - EntityProc enter, EntityProc leave, pointer private) -{ - EntityInfoPtr pEnt = xf86GetEntityInfo(entityIndex); - if (!pEnt) return FALSE; - - if (!pEnt->active || !(pEnt->location.type == BUS_PCI)) { - xfree(pEnt); - return FALSE; - } - xf86AddEntityToScreen(pScrn,entityIndex); - - xfree(pEnt); - if (!xf86SetEntityFuncs(entityIndex,init,enter,leave,private)) - return FALSE; - - return TRUE; -} - Bool xf86IsScreenPrimary(int scrnIndex) { @@ -2498,7 +2003,7 @@ xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type, ScrnIndex, property, type, format, len, value); if (ScrnIndex<0 || ScrnIndex>=xf86NumScreens) { - return(BadMatch); + return BadMatch; } if (xf86RegisteredPropertiesTable && @@ -2511,8 +2016,8 @@ xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type, } if (!pNewProp) { - if ((pNewProp = (RootWinPropPtr)xalloc(sizeof(RootWinProp))) == NULL) { - return(BadAlloc); + if ((pNewProp = (RootWinPropPtr)malloc(sizeof(RootWinProp))) == NULL) { + return BadAlloc; } /* * We will put this property at the end of the list so that @@ -2520,8 +2025,7 @@ xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type, */ pNewProp->next = NULL; } else { - if (pNewProp->name) - xfree(pNewProp->name); + free(pNewProp->name); existing = TRUE; } @@ -2537,7 +2041,7 @@ xf86RegisterRootWindowProperty(int ScrnIndex, Atom property, Atom type, DebugF("creating xf86RegisteredPropertiesTable[] size %d\n", xf86NumScreens); if ( NULL==(xf86RegisteredPropertiesTable=(RootWinPropPtr*)xnfcalloc(sizeof(RootWinProp),xf86NumScreens) )) { - return(BadAlloc); + return BadAlloc; } for (i=0; i #include "dpmsproc.h" #endif - -#include -#include "Pci.h" -#include "xf86Bus.h" - #include -/* forward declarations */ -static Bool probe_devices_from_device_sections(DriverPtr drvp); -static Bool add_matching_devices_to_configure_list(DriverPtr drvp); #ifdef XF86PM void (*xf86OSPMClose)(void) = NULL; @@ -110,15 +102,9 @@ static PixmapFormatRec formats[MAXFORMATS] = { { 15, 16, BITMAP_SCANLINE_PAD }, { 16, 16, BITMAP_SCANLINE_PAD }, { 24, 32, BITMAP_SCANLINE_PAD }, -#ifdef RENDER { 32, 32, BITMAP_SCANLINE_PAD }, -#endif }; -#ifdef RENDER static int numFormats = 7; -#else -static int numFormats = 6; -#endif static Bool formatsDone = FALSE; #ifdef X_PRIVSEP @@ -221,8 +207,8 @@ xf86PrintBanner(void) struct tm t; char buf[100]; - bzero(&t, sizeof(t)); - bzero(buf, sizeof(buf)); + memset(&t, 0, sizeof(t)); + memset(buf, 0, sizeof(buf)); t.tm_mday = BUILD_DATE % 100; t.tm_mon = (BUILD_DATE / 100) % 100 - 1; t.tm_year = BUILD_DATE / 10000 - 1900; @@ -312,7 +298,7 @@ xf86CreateRootWindow(WindowPtr pWin) } DebugF("xf86CreateRootWindow() returns %d\n", ret); - return (ret); + return ret; } @@ -347,201 +333,6 @@ InstallSignalHandlers(void) } } - -#define END_OF_MATCHES(m) \ - (((m).vendor_id == 0) && ((m).device_id == 0) && ((m).subvendor_id == 0)) - -Bool -probe_devices_from_device_sections(DriverPtr drvp) -{ - int i, j; - struct pci_device * pPci; - Bool foundScreen = FALSE; - const struct pci_id_match * const devices = drvp->supported_devices; - GDevPtr *devList; - const unsigned numDevs = xf86MatchDevice(drvp->driverName, & devList); - - - for ( i = 0 ; i < numDevs ; i++ ) { - struct pci_device_iterator *iter; - unsigned device_id; - - - /* Find the pciVideoRec associated with this device section. - */ - iter = pci_id_match_iterator_create(NULL); - while ((pPci = pci_device_next(iter)) != NULL) { - if (devList[i]->busID && *devList[i]->busID) { - if (xf86ComparePciBusString(devList[i]->busID, - ((pPci->domain << 8) - | pPci->bus), - pPci->dev, - pPci->func)) { - break; - } - } - else if (xf86IsPrimaryPci(pPci)) { - break; - } - } - - pci_iterator_destroy(iter); - - if (pPci == NULL) { - continue; - } - - device_id = (devList[i]->chipID > 0) - ? devList[i]->chipID : pPci->device_id; - - - /* Once the pciVideoRec is found, determine if the device is supported - * by the driver. If it is, probe it! - */ - for ( j = 0 ; ! END_OF_MATCHES( devices[j] ) ; j++ ) { - if ( PCI_ID_COMPARE( devices[j].vendor_id, pPci->vendor_id ) - && PCI_ID_COMPARE( devices[j].device_id, device_id ) - && ((devices[j].device_class_mask & pPci->device_class) - == devices[j].device_class) ) { - int entry; - - /* Allow the same entity to be used more than once for - * devices with multiple screens per entity. This assumes - * implicitly that there will be a screen == 0 instance. - * - * FIXME Need to make sure that two different drivers don't - * FIXME claim the same screen > 0 instance. - */ - if ( (devList[i]->screen == 0) && !xf86CheckPciSlot( pPci ) ) - continue; - - DebugF("%s: card at %d:%d:%d is claimed by a Device section\n", - drvp->driverName, pPci->bus, pPci->dev, pPci->func); - - /* Allocate an entry in the lists to be returned */ - entry = xf86ClaimPciSlot(pPci, drvp, device_id, - devList[i], devList[i]->active); - - if ((entry == -1) && (devList[i]->screen > 0)) { - unsigned k; - - for ( k = 0; k < xf86NumEntities; k++ ) { - EntityPtr pEnt = xf86Entities[k]; - if (pEnt->bus.type != BUS_PCI) - continue; - - if (pEnt->bus.id.pci == pPci) { - entry = k; - xf86AddDevToEntity(k, devList[i]); - break; - } - } - } - - if (entry != -1) { - if ((*drvp->PciProbe)(drvp, entry, pPci, - devices[j].match_data)) { - foundScreen = TRUE; - } else - xf86UnclaimPciSlot(pPci); - } - - break; - } - } - } - xfree(devList); - - return foundScreen; -} - - -Bool -add_matching_devices_to_configure_list(DriverPtr drvp) -{ - const struct pci_id_match * const devices = drvp->supported_devices; - int j; - struct pci_device *pPci; - struct pci_device_iterator *iter; - int numFound = 0; - - - iter = pci_id_match_iterator_create(NULL); - while ((pPci = pci_device_next(iter)) != NULL) { - /* Determine if this device is supported by the driver. If it is, - * add it to the list of devices to configure. - */ - for (j = 0 ; ! END_OF_MATCHES(devices[j]) ; j++) { - if ( PCI_ID_COMPARE( devices[j].vendor_id, pPci->vendor_id ) - && PCI_ID_COMPARE( devices[j].device_id, pPci->device_id ) - && ((devices[j].device_class_mask & pPci->device_class) - == devices[j].device_class) ) { - if (xf86CheckPciSlot(pPci)) { - GDevPtr pGDev = xf86AddBusDeviceToConfigure( - drvp->driverName, BUS_PCI, pPci, -1); - if (pGDev != NULL) { - /* After configure pass 1, chipID and chipRev are - * treated as over-rides, so clobber them here. - */ - pGDev->chipID = -1; - pGDev->chipRev = -1; - } - - numFound++; - } - - break; - } - } - } - - pci_iterator_destroy(iter); - - - return (numFound != 0); -} - -/** - * Call the driver's correct probe function. - * - * If the driver implements the \c DriverRec::PciProbe entry-point and an - * appropriate PCI device (with matching Device section in the xorg.conf file) - * is found, it is called. If \c DriverRec::PciProbe or no devices can be - * successfully probed with it (e.g., only non-PCI devices are available), - * the driver's \c DriverRec::Probe function is called. - * - * \param drv Driver to probe - * - * \return - * If a device can be successfully probed by the driver, \c TRUE is - * returned. Otherwise, \c FALSE is returned. - */ -Bool -xf86CallDriverProbe( DriverPtr drv, Bool detect_only ) -{ - Bool foundScreen = FALSE; - - if ( drv->PciProbe != NULL ) { - if ( xf86DoConfigure && xf86DoConfigurePass1 ) { - assert( detect_only ); - foundScreen = add_matching_devices_to_configure_list( drv ); - } - else { - assert( ! detect_only ); - foundScreen = probe_devices_from_device_sections( drv ); - } - } - - if ( ! foundScreen && (drv->Probe != NULL) ) { - xf86Msg( X_WARNING, "Falling back to old probe method for %s\n", - drv->driverName ); - foundScreen = (*drv->Probe)( drv, (detect_only) ? PROBE_DETECT - : PROBE_DEFAULT ); - } - - return foundScreen; -} - /* * InitOutput -- * Initialize screenInfo for all actually accessible framebuffers. @@ -554,7 +345,6 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) int i, j, k, scr_index; char **modulelist; pointer *optionlist; - screenLayoutPtr layout; Pix24Flags screenpix24, pix24; MessageType pix24From = X_DEFAULT; Bool pix24Fail = FALSE; @@ -564,9 +354,6 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) xf86Initialising = TRUE; if (serverGeneration == 1) { - - pScreenInfo->numScreens = 0; - if ((xf86ServerName = strrchr(argv[0], '/')) != 0) xf86ServerName++; else @@ -632,8 +419,8 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) /* Load all modules specified explicitly in the config file */ if ((modulelist = xf86ModulelistFromConfig(&optionlist))) { xf86LoadModules(modulelist, optionlist); - xfree(modulelist); - xfree(optionlist); + free(modulelist); + free(optionlist); } /* Load all driver modules specified in the config file */ @@ -649,13 +436,13 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) } if ((modulelist = xf86DriverlistFromConfig())) { xf86LoadModules(modulelist, NULL); - xfree(modulelist); + free(modulelist); } /* Load all input driver modules specified in the config file. */ if ((modulelist = xf86InputDriverlistFromConfig())) { xf86LoadModules(modulelist, NULL); - xfree(modulelist); + free(modulelist); } /* @@ -708,102 +495,10 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) else xf86Info.dontVTSwitch = TRUE; - /* Enable full I/O access */ - if (xorgHWAccess) - xorgHWAccess = xf86EnableIO(); - - /* - * Locate bus slot that had register IO enabled at server startup - */ - if (xorgHWAccess) { - xf86AccessInit(); - xf86FindPrimaryDevice(); - } - /* - * Now call each of the Probe functions. Each successful probe will - * result in an extra entry added to the xf86Screens[] list for each - * instance of the hardware found. - */ - - for (i = 0; i < xf86NumDrivers; i++) { - xorgHWFlags flags; - if (!xorgHWAccess) { - if (!xf86DriverList[i]->driverFunc - || !xf86DriverList[i]->driverFunc(NULL, - GET_REQUIRED_HW_INTERFACES, - &flags) - || NEED_IO_ENABLED(flags)) - continue; - } - - xf86CallDriverProbe( xf86DriverList[i], FALSE ); - } - - /* - * If nothing was detected, return now. - */ - - if (xf86NumScreens == 0) { - xf86Msg(X_ERROR, "No devices detected.\n"); - return; - } - - xf86VGAarbiterInit(); - - /* - * Match up the screens found by the probes against those specified - * in the config file. Remove the ones that won't be used. Sort - * them in the order specified. - */ - - /* - * What is the best way to do this? - * - * For now, go through the screens allocated by the probes, and - * look for screen config entry which refers to the same device - * section as picked out by the probe. - * - */ - - for (i = 0; i < xf86NumScreens; i++) { - for (layout = xf86ConfigLayout.screens; layout->screen != NULL; - layout++) { - Bool found = FALSE; - for (j = 0; j < xf86Screens[i]->numEntities; j++) { - - GDevPtr dev = - xf86GetDevFromEntity(xf86Screens[i]->entityList[j], - xf86Screens[i]->entityInstanceList[j]); - - if (dev == layout->screen->device) { - /* A match has been found */ - xf86Screens[i]->confScreen = layout->screen; - found = TRUE; - break; - } - } - if (found) break; - } - if (layout->screen == NULL) { - /* No match found */ - xf86Msg(X_ERROR, - "Screen %d deleted because of no matching config section.\n", i); - xf86DeleteScreen(i--, 0); - } - } - - /* - * If no screens left, return now. - */ - - if (xf86NumScreens == 0) { - xf86Msg(X_ERROR, - "Device(s) detected, but none match those in the config file.\n"); - return; - } + if (xf86BusConfig() == FALSE) + return; xf86PostProbe(); - xf86EntityInit(); /* * Sort the drivers to match the requested ording. Using a slow @@ -956,7 +651,7 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) /* This memory needs to stay available until the screen has been initialized, and we can create the property for real. */ - if ( (VT = xalloc(sizeof(CARD32)))==NULL ) { + if ( (VT = malloc(sizeof(CARD32)))==NULL ) { FatalError("Unable to make VT property - out of memory. Exiting...\n"); } *VT = xf86Info.vtno; @@ -1045,6 +740,15 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) } #endif /* SCO325 */ + for (i = 0; i < xf86NumScreens; i++) + if (!xf86ColormapAllocatePrivates(xf86Screens[i])) + FatalError("Cannot register DDX private keys"); + + if (!dixRegisterPrivateKey(&xf86ScreenKeyRec, PRIVATE_SCREEN, 0) || + !dixRegisterPrivateKey(&xf86CreateRootWindowKeyRec, PRIVATE_SCREEN, 0) || + !dixRegisterPrivateKey(&xf86PixmapKeyRec, PRIVATE_PIXMAP, 0)) + FatalError("Cannot register DDX private keys"); + for (i = 0; i < xf86NumScreens; i++) { xf86VGAarbiterLock(xf86Screens[i]); /* @@ -1087,7 +791,6 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) xf86Screens[i]->pScreen->CreateWindow); xf86Screens[i]->pScreen->CreateWindow = xf86CreateRootWindow; -#ifdef RENDER if (PictureGetSubpixelOrder (xf86Screens[i]->pScreen) == SubPixelUnknown) { xf86MonPtr DDC = (xf86MonPtr)(xf86Screens[i]->monitor->DDC); @@ -1097,7 +800,6 @@ InitOutput(ScreenInfo *pScreenInfo, int argc, char **argv) SubPixelHorizontalRGB : SubPixelNone) : SubPixelUnknown); } -#endif #ifdef RANDR if (!xf86Info.disableRandR) xf86RandRInit (screenInfo.screens[scr_index]); @@ -1683,20 +1385,12 @@ ddxProcessArgument(int argc, char **argv, int i) } if (!strcmp(argv[i], "-isolateDevice")) { - int bus, device, func; CHECK_FOR_REQUIRED_ARGUMENT(); if (strncmp(argv[++i], "PCI:", 4)) { FatalError("Bus types other than PCI not yet isolable\n"); } - if (sscanf(argv[i], "PCI:%d:%d:%d", &bus, &device, &func) == 3) { - xf86IsolateDevice.domain = PCI_DOM_FROM_BUS(bus); - xf86IsolateDevice.bus = PCI_BUS_NO_DOMAIN(bus); - xf86IsolateDevice.dev = device; - xf86IsolateDevice.func = func; - return 2; - } else { - FatalError("Invalid isolated device specification\n"); - } + xf86PciIsolateDevice(argv[i]); + return 2; } /* Notice cmdline xkbdir, but pass to dix as well */ if (!strcmp(argv[i], "-xkbdir")) @@ -1807,7 +1501,7 @@ xf86LoadModules(char **list, pointer *optlist) LoaderErrorMsg(NULL, name, errmaj, errmin); failed = TRUE; } - xfree(name); + free(name); } return !failed; } diff --git a/xserver/hw/xfree86/common/xf86Mode.c b/xserver/hw/xfree86/common/xf86Mode.c index 949d4fcfa..7bdf79a68 100644 --- a/xserver/hw/xfree86/common/xf86Mode.c +++ b/xserver/hw/xfree86/common/xf86Mode.c @@ -25,6 +25,52 @@ * authorization from the copyright holder(s) and author(s). */ +/* + * LCM() and scanLineWidth() are: + * + * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that copyright + * notice and this permission notice appear in supporting documentation, and + * that the name of Marc Aurele La France not be used in advertising or + * publicity pertaining to distribution of the software without specific, + * written prior permission. Marc Aurele La France makes no representations + * about the suitability of this software for any purpose. It is provided + * "as-is" without express or implied warranty. + * + * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO + * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + * + * Copyright 1990,91,92,93 by Thomas Roell, Germany. + * Copyright 1991,92,93 by SGCS (Snitily Graphics Consulting Services), USA. + * + * Permission to use, copy, modify, distribute, and sell this software + * and its documentation for any purpose is hereby granted without fee, + * provided that the above copyright notice appear in all copies and + * that both that copyright notice and this permission notice appear + * in supporting documentation, and that the name of Thomas Roell nor + * SGCS be used in advertising or publicity pertaining to distribution + * of the software without specific, written prior permission. + * Thomas Roell nor SGCS makes no representations about the suitability + * of this software for any purpose. It is provided "as is" without + * express or implied warranty. + * + * THOMAS ROELL AND SGCS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS + * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS, IN NO EVENT SHALL THOMAS ROELL OR SGCS BE LIABLE FOR ANY + * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER + * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF + * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN + * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + /* * Authors: Dirk Hohndel * David Dawes @@ -42,7 +88,6 @@ #include "xf86Modes.h" #include "os.h" #include "servermd.h" -#include "mibank.h" #include "globals.h" #include "xf86.h" #include "xf86Priv.h" @@ -1126,6 +1171,131 @@ found: return 1; } +/* Least common multiple */ +static unsigned int +LCM(unsigned int x, unsigned int y) +{ + unsigned int m = x, n = y, o; + + while ((o = m % n)) + { + m = n; + n = o; + } + + return (x / n) * y; +} + +/* + * Given various screen attributes, determine the minimum scanline width such + * that each scanline is server and DDX padded and any pixels with imbedded + * bank boundaries are off-screen. This function returns -1 if such a width + * cannot exist. + */ +static int +scanLineWidth( + unsigned int xsize, /* pixels */ + unsigned int ysize, /* pixels */ + unsigned int width, /* pixels */ + unsigned long BankSize, /* char's */ + PixmapFormatRec *pBankFormat, + unsigned int nWidthUnit /* bits */ +) +{ + unsigned long nBitsPerBank, nBitsPerScanline, nBitsPerScanlinePadUnit; + unsigned long minBitsPerScanline, maxBitsPerScanline; + + /* Sanity checks */ + + if (!nWidthUnit || !pBankFormat) + return -1; + + nBitsPerBank = BankSize * 8; + if (nBitsPerBank % pBankFormat->scanlinePad) + return -1; + + if (xsize > width) + width = xsize; + nBitsPerScanlinePadUnit = LCM(pBankFormat->scanlinePad, nWidthUnit); + nBitsPerScanline = + (((width * pBankFormat->bitsPerPixel) + nBitsPerScanlinePadUnit - 1) / + nBitsPerScanlinePadUnit) * nBitsPerScanlinePadUnit; + width = nBitsPerScanline / pBankFormat->bitsPerPixel; + + if (!xsize || !(nBitsPerBank % pBankFormat->bitsPerPixel)) + return (int)width; + + /* + * Scanlines will be server-pad aligned at this point. They will also be + * a multiple of nWidthUnit bits long. Ensure that pixels with imbedded + * bank boundaries are off-screen. + * + * It seems reasonable to limit total frame buffer size to 1/16 of the + * theoretical maximum address space size. On a machine with 32-bit + * addresses (to 8-bit quantities) this turns out to be 256MB. Not only + * does this provide a simple limiting condition for the loops below, but + * it also prevents unsigned long wraparounds. + */ + if (!ysize) + return -1; + + minBitsPerScanline = xsize * pBankFormat->bitsPerPixel; + if (minBitsPerScanline > nBitsPerBank) + return -1; + + if (ysize == 1) + return (int)width; + + maxBitsPerScanline = + (((unsigned long)(-1) >> 1) - minBitsPerScanline) / (ysize - 1); + while (nBitsPerScanline <= maxBitsPerScanline) + { + unsigned long BankBase, BankUnit; + + BankUnit = ((nBitsPerBank + nBitsPerScanline - 1) / nBitsPerBank) * + nBitsPerBank; + if (!(BankUnit % nBitsPerScanline)) + return (int)width; + + for (BankBase = BankUnit; ; BankBase += nBitsPerBank) + { + unsigned long x, y; + + y = BankBase / nBitsPerScanline; + if (y >= ysize) + return (int)width; + + x = BankBase % nBitsPerScanline; + if (!(x % pBankFormat->bitsPerPixel)) + continue; + + if (x < minBitsPerScanline) + { + /* + * Skip ahead certain widths by dividing the excess scanline + * amongst the y's. + */ + y *= nBitsPerScanlinePadUnit; + nBitsPerScanline += + ((x + y - 1) / y) * nBitsPerScanlinePadUnit; + width = nBitsPerScanline / pBankFormat->bitsPerPixel; + break; + } + + if (BankBase != BankUnit) + continue; + + if (!(nBitsPerScanline % x)) + return (int)width; + + BankBase = ((nBitsPerScanline - minBitsPerScanline) / + (nBitsPerScanline - x)) * BankUnit; + } + } + + return -1; +} + /* * xf86ValidateModes * @@ -1312,7 +1482,7 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes, memcpy(storeClockRanges, cp, sizeof(ClockRange)); } - /* Determine which pixmap format to pass to miScanLineWidth() */ + /* Determine which pixmap format to pass to scanLineWidth() */ if (scrp->depth > 4) BankFormat = &scrp->fbFormat; else @@ -1363,15 +1533,15 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes, for (i = 0; linePitches[i] != 0; i++) { if ((linePitches[i] >= virtualX) && (linePitches[i] == - miScanLineWidth(virtualX, virtualY, linePitches[i], - apertureSize, BankFormat, pitchInc))) { + scanLineWidth(virtualX, virtualY, linePitches[i], + apertureSize, BankFormat, pitchInc))) { linePitch = linePitches[i]; break; } } } else { - linePitch = miScanLineWidth(virtualX, virtualY, minPitch, - apertureSize, BankFormat, pitchInc); + linePitch = scanLineWidth(virtualX, virtualY, minPitch, + apertureSize, BankFormat, pitchInc); } if ((linePitch < minPitch) || (linePitch > maxPitch)) { @@ -1396,8 +1566,8 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes, /* XXX this doesn't take m{in,ax}Pitch into account; oh well */ inferred_virtual = inferVirtualSize(scrp, availModes, &virtX, &virtY); if (inferred_virtual) - linePitch = miScanLineWidth(virtX, virtY, minPitch, apertureSize, - BankFormat, pitchInc); + linePitch = scanLineWidth(virtX, virtY, minPitch, apertureSize, + BankFormat, pitchInc); } /* Print clock ranges and scaled clocks */ @@ -1609,8 +1779,8 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes, if ((linePitches[i] >= newVirtX) && (linePitches[i] >= linePitch) && (linePitches[i] == - miScanLineWidth(newVirtX, newVirtY, linePitches[i], - apertureSize, BankFormat, pitchInc))) { + scanLineWidth(newVirtX, newVirtY, linePitches[i], + apertureSize, BankFormat, pitchInc))) { newLinePitch = linePitches[i]; break; } @@ -1618,9 +1788,9 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes, } else { if (linePitch < minPitch) linePitch = minPitch; - newLinePitch = miScanLineWidth(newVirtX, newVirtY, linePitch, - apertureSize, BankFormat, - pitchInc); + newLinePitch = scanLineWidth(newVirtX, newVirtY, linePitch, + apertureSize, BankFormat, + pitchInc); } if ((newLinePitch < minPitch) || (newLinePitch > maxPitch)) { p->status = MODE_BAD_WIDTH; @@ -1682,8 +1852,8 @@ xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes, virtX, virtY, vx, vy); virtX = vx; virtY = vy; - linePitch = miScanLineWidth(vx, vy, minPitch, apertureSize, - BankFormat, pitchInc); + linePitch = scanLineWidth(vx, vy, minPitch, apertureSize, + BankFormat, pitchInc); } } @@ -1748,8 +1918,8 @@ xf86DeleteMode(DisplayModePtr *modeList, DisplayModePtr mode) mode->next->prev = mode->prev; } - xfree(mode->name); - xfree(mode); + free(mode->name); + free(mode); } /* diff --git a/xserver/hw/xfree86/common/xf86Module.h b/xserver/hw/xfree86/common/xf86Module.h index bbf5786c9..51b9b16a3 100644 --- a/xserver/hw/xfree86/common/xf86Module.h +++ b/xserver/hw/xfree86/common/xf86Module.h @@ -82,9 +82,9 @@ typedef enum { * mask is 0xFFFF0000. */ #define ABI_ANSIC_VERSION SET_ABI_VERSION(0, 4) -#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(7, 0) -#define ABI_XINPUT_VERSION SET_ABI_VERSION(9, 0) -#define ABI_EXTENSION_VERSION SET_ABI_VERSION(3, 0) +#define ABI_VIDEODRV_VERSION SET_ABI_VERSION(8, 0) +#define ABI_XINPUT_VERSION SET_ABI_VERSION(11, 0) +#define ABI_EXTENSION_VERSION SET_ABI_VERSION(4, 0) #define ABI_FONT_VERSION SET_ABI_VERSION(0, 6) #define MODINFOSTRING1 0xef23fdc5 diff --git a/xserver/hw/xfree86/common/xf86Opt.h b/xserver/hw/xfree86/common/xf86Opt.h index ce3d76724..d75d3bf87 100644 --- a/xserver/hw/xfree86/common/xf86Opt.h +++ b/xserver/hw/xfree86/common/xf86Opt.h @@ -51,6 +51,7 @@ typedef enum { OPTV_ANYSTR, /* Any string, including an empty one */ OPTV_REAL, OPTV_BOOLEAN, + OPTV_PERCENT, OPTV_FREQ } OptionValueType; @@ -72,10 +73,12 @@ extern _X_EXPORT int xf86SetIntOption(pointer optlist, const char *name, int def extern _X_EXPORT double xf86SetRealOption(pointer optlist, const char *name, double deflt); extern _X_EXPORT char *xf86SetStrOption(pointer optlist, const char *name, char *deflt); extern _X_EXPORT int xf86SetBoolOption(pointer list, const char *name, int deflt ); +extern _X_EXPORT double xf86SetPercentOption(pointer list, const char *name, double deflt ); extern _X_EXPORT int xf86CheckIntOption(pointer optlist, const char *name, int deflt); extern _X_EXPORT double xf86CheckRealOption(pointer optlist, const char *name, double deflt); extern _X_EXPORT char *xf86CheckStrOption(pointer optlist, const char *name, char *deflt); extern _X_EXPORT int xf86CheckBoolOption(pointer list, const char *name, int deflt ); +extern _X_EXPORT double xf86CheckPercentOption(pointer list, const char *name, double deflt ); extern _X_EXPORT pointer xf86AddNewOption(pointer head, const char *name, const char *val ); extern _X_EXPORT pointer xf86NewOption(char *name, char *value ); extern _X_EXPORT pointer xf86NextOption(pointer list ); @@ -109,5 +112,6 @@ extern _X_EXPORT char *xf86NormalizeName(const char *s); extern _X_EXPORT pointer xf86ReplaceIntOption(pointer optlist, const char *name, const int val); extern _X_EXPORT pointer xf86ReplaceRealOption(pointer optlist, const char *name, const double val); extern _X_EXPORT pointer xf86ReplaceBoolOption(pointer optlist, const char *name, const Bool val); +extern _X_EXPORT pointer xf86ReplacePercentOption(pointer optlist, const char *name, const double val); extern _X_EXPORT pointer xf86ReplaceStrOption(pointer optlist, const char *name, const char* val); #endif diff --git a/xserver/hw/xfree86/common/xf86Option.c b/xserver/hw/xfree86/common/xf86Option.c index a2868bf21..aa6ea3011 100644 --- a/xserver/hw/xfree86/common/xf86Option.c +++ b/xserver/hw/xfree86/common/xf86Option.c @@ -164,6 +164,10 @@ xf86CollectInputOptions(InputInfoPtr pInfo, const char **defaultOpts, else pInfo->options = tmp; } + + if (pInfo->conf_idev && pInfo->conf_idev->attrs) { + pInfo->attrs = pInfo->conf_idev->attrs; + } } /* Created for new XInput stuff -- essentially extensions to the parser */ @@ -205,7 +209,7 @@ LookupStrOption(pointer optlist, const char *name, char *deflt, Bool markUsed) if (ParseOptionValue(-1, optlist, &o, markUsed)) deflt = o.value.str; if (deflt) - return xstrdup(deflt); + return strdup(deflt); else return NULL; } @@ -223,6 +227,18 @@ LookupBoolOption(pointer optlist, const char *name, int deflt, Bool markUsed) return deflt; } +static int +LookupPercentOption(pointer optlist, const char *name, double deflt, Bool markUsed) +{ + OptionInfoRec o; + + o.name = name; + o.type = OPTV_PERCENT; + if (ParseOptionValue(-1, optlist, &o, markUsed)) + deflt = o.value.realnum; + return deflt; +} + /* These xf86Set* functions are intended for use by non-screen specific code */ int @@ -252,6 +268,12 @@ xf86SetBoolOption(pointer optlist, const char *name, int deflt) return LookupBoolOption(optlist, name, deflt, TRUE); } +double +xf86SetPercentOption(pointer optlist, const char *name, double deflt) +{ + return LookupPercentOption(optlist, name, deflt, TRUE); +} + /* * These are like the Set*Option functions, but they don't mark the options * as used. @@ -283,6 +305,12 @@ xf86CheckBoolOption(pointer optlist, const char *name, int deflt) return LookupBoolOption(optlist, name, deflt, FALSE); } + +double +xf86CheckPercentOption(pointer optlist, const char *name, double deflt) +{ + return LookupPercentOption(optlist, name, deflt, FALSE); +} /* * addNewOption() has the required property of replacing the option value * if the option is already present. @@ -309,6 +337,14 @@ xf86ReplaceBoolOption(pointer optlist, const char *name, const Bool val) return xf86AddNewOption(optlist,name,val?"True":"False"); } +pointer +xf86ReplacePercentOption(pointer optlist, const char *name, const double val) +{ + char tmp[16]; + sprintf(tmp, "%lf%%", val); + return xf86AddNewOption(optlist,name,tmp); +} + pointer xf86ReplaceStrOption(pointer optlist, const char *name, const char* val) { @@ -533,6 +569,21 @@ ParseOptionValue(int scrnIndex, pointer options, OptionInfoPtr p, p->found = FALSE; } break; + case OPTV_PERCENT: + { + char tmp = 0; + /* awkward match, but %% doesn't increase the match counter, + * hence 100 looks the same as 100% to the caller of sccanf + */ + if (sscanf(s, "%lf%c", &p->value.realnum, &tmp) != 2 || tmp != '%') { + xf86DrvMsg(scrnIndex, X_WARNING, + "Option \"%s\" requires a percent value\n", p->name); + p->found = FALSE; + } else { + p->found = TRUE; + } + } + break; case OPTV_FREQ: if (*s == '\0') { xf86DrvMsg(scrnIndex, X_WARNING, @@ -601,8 +652,8 @@ ParseOptionValue(int scrnIndex, pointer options, OptionInfoPtr p, if (strncmp(n, "no", 2) == 0) { newn = n + 2; } else { - xfree(n); - n = xalloc(strlen(p->name) + 2 + 1); + free(n); + n = malloc(strlen(p->name) + 2 + 1); if (!n) { p->found = FALSE; return FALSE; @@ -632,7 +683,7 @@ ParseOptionValue(int scrnIndex, pointer options, OptionInfoPtr p, } xf86ErrorFVerb(2, "\n"); } - xfree(n); + free(n); } else { p->found = FALSE; } @@ -694,7 +745,7 @@ xf86IsOptionSet(const OptionInfoRec *table, int token) OptionInfoPtr p; p = xf86TokenToOptinfo(table, token); - return (p && p->found); + return p && p->found; } @@ -843,7 +894,7 @@ xf86NormalizeName(const char *s) if (s == NULL) return NULL; - ret = xalloc(strlen(s) + 1); + ret = malloc(strlen(s) + 1); for (p = s, q = ret; *p != 0; p++) { switch (*p) { case '_': diff --git a/xserver/hw/xfree86/common/xf86Priv.h b/xserver/hw/xfree86/common/xf86Priv.h index 0612c9c4e..b5e7a45e5 100644 --- a/xserver/hw/xfree86/common/xf86Priv.h +++ b/xserver/hw/xfree86/common/xf86Priv.h @@ -110,15 +110,10 @@ extern _X_EXPORT RootWinPropPtr *xf86RegisteredPropertiesTable; #ifndef _NO_XF86_PROTOTYPES /* xf86Bus.c */ - +extern _X_EXPORT Bool xf86BusConfig(void); extern _X_EXPORT void xf86BusProbe(void); -extern _X_EXPORT void xf86AccessInit(void); extern _X_EXPORT void xf86AccessEnter(void); extern _X_EXPORT void xf86AccessLeave(void); -extern _X_EXPORT void xf86EntityInit(void); - -extern _X_EXPORT void xf86FindPrimaryDevice(void); -/* new RAC */ extern _X_EXPORT void xf86PostProbe(void); extern _X_EXPORT void xf86ClearEntityListForScreen(int scrnIndex); extern _X_EXPORT void xf86AddDevToEntity(int entityIndex, GDevPtr dev); diff --git a/xserver/hw/xfree86/common/xf86Privstr.h b/xserver/hw/xfree86/common/xf86Privstr.h index b2095aab1..39cd23074 100644 --- a/xserver/hw/xfree86/common/xf86Privstr.h +++ b/xserver/hw/xfree86/common/xf86Privstr.h @@ -147,9 +147,6 @@ typedef struct _RootWinProp { pointer data; } RootWinProp, *RootWinPropPtr; -/* private resource types */ -#define ResNoAvoid ResBios - /* ISC's cc can't handle ~ of UL constants, so explicitly type cast them. */ #define XLED1 ((unsigned long) 0x00000001) #define XLED2 ((unsigned long) 0x00000002) diff --git a/xserver/hw/xfree86/common/xf86RandR.c b/xserver/hw/xfree86/common/xf86RandR.c index d4beb2ce2..d7ffff4ca 100644 --- a/xserver/hw/xfree86/common/xf86RandR.c +++ b/xserver/hw/xfree86/common/xf86RandR.c @@ -27,7 +27,6 @@ #include #include "os.h" -#include "mibank.h" #include "globals.h" #include "xf86.h" #include "xf86str.h" @@ -47,7 +46,7 @@ typedef struct _xf86RandRInfo { Rotation rotation; } XF86RandRInfoRec, *XF86RandRInfoPtr; -static int xf86RandRKeyIndex; +static DevPrivateKeyRec xf86RandRKeyRec; static DevPrivateKey xf86RandRKey; #define XF86RANDRINFO(p) ((XF86RandRInfoPtr)dixLookupPrivate(&(p)->devPrivates, xf86RandRKey)) @@ -160,7 +159,7 @@ xf86RandRSetMode (ScreenPtr pScreen, int oldmmHeight = pScreen->mmHeight; int oldVirtualX = scrp->virtualX; int oldVirtualY = scrp->virtualY; - WindowPtr pRoot = WindowTable[pScreen->myNum]; + WindowPtr pRoot = pScreen->root; Bool ret = TRUE; if (pRoot && scrp->vtSema) @@ -360,7 +359,7 @@ xf86RandRCloseScreen (int index, ScreenPtr pScreen) scrp->virtualY = pScreen->height = randrp->virtualY; scrp->currentMode = scrp->modes; pScreen->CloseScreen = randrp->CloseScreen; - xfree (randrp); + free(randrp); dixSetPrivate(&pScreen->devPrivates, xf86RandRKey, NULL); return (*pScreen->CloseScreen) (index, pScreen); } @@ -425,15 +424,18 @@ xf86RandRInit (ScreenPtr pScreen) return TRUE; #endif - xf86RandRKey = &xf86RandRKeyIndex; + xf86RandRKey = &xf86RandRKeyRec; - randrp = xalloc (sizeof (XF86RandRInfoRec)); + if (!dixRegisterPrivateKey(&xf86RandRKeyRec, PRIVATE_SCREEN, 0)) + return FALSE; + + randrp = malloc(sizeof (XF86RandRInfoRec)); if (!randrp) return FALSE; if (!RRScreenInit (pScreen)) { - xfree (randrp); + free(randrp); return FALSE; } rp = rrGetScrPriv(pScreen); diff --git a/xserver/hw/xfree86/common/xf86ShowOpts.c b/xserver/hw/xfree86/common/xf86ShowOpts.c index 04a9a8b1c..eac25d701 100644 --- a/xserver/hw/xfree86/common/xf86ShowOpts.c +++ b/xserver/hw/xfree86/common/xf86ShowOpts.c @@ -70,6 +70,8 @@ optionTypeToSting(OptionValueType type) return ""; case OPTV_FREQ: return ""; + case OPTV_PERCENT: + return ""; default: return ""; } @@ -85,7 +87,7 @@ void DoShowOptions (void) { goto bail; } xf86LoadModules (vlist,0); - xfree (vlist); + free(vlist); for (i = 0; i < xf86NumDrivers; i++) { if (xf86DriverList[i]->AvailableOptions) { OptionInfoPtr pOption = (OptionInfoPtr)(*xf86DriverList[i]->AvailableOptions)(0,0); @@ -95,7 +97,7 @@ void DoShowOptions (void) { ); continue; } - pSymbol = xalloc ( + pSymbol = malloc( strlen(xf86DriverList[i]->driverName) + strlen("ModuleData") + 1 ); strcpy (pSymbol, xf86DriverList[i]->driverName); @@ -109,7 +111,7 @@ void DoShowOptions (void) { ); for (p = pOption; p->name != NULL; p++) { const char *opttype = optionTypeToSting(p->type); - char *optname = xalloc(strlen(p->name) + 2 + 1); + char *optname = malloc(strlen(p->name) + 2 + 1); if (!optname) { continue; } diff --git a/xserver/hw/xfree86/common/xf86VGAarbiter.c b/xserver/hw/xfree86/common/xf86VGAarbiter.c index cd45cd187..05cf24502 100644 --- a/xserver/hw/xfree86/common/xf86VGAarbiter.c +++ b/xserver/hw/xfree86/common/xf86VGAarbiter.c @@ -62,10 +62,10 @@ static miPointerSpriteFuncRec VGAarbiterSpriteFuncs = { VGAarbiterDeviceCursorInitialize, VGAarbiterDeviceCursorCleanup }; -static int VGAarbiterKeyIndex; -static DevPrivateKey VGAarbiterScreenKey = &VGAarbiterKeyIndex; -static int VGAarbiterGCIndex; -static DevPrivateKey VGAarbiterGCKey = &VGAarbiterGCIndex; +static DevPrivateKeyRec VGAarbiterScreenKeyRec; +#define VGAarbiterScreenKey (&VGAarbiterScreenKeyRec) +static DevPrivateKeyRec VGAarbiterGCKeyRec; +#define VGAarbiterGCKey (&VGAarbiterGCKeyRec) static int vga_no_arb = 0; void @@ -151,9 +151,7 @@ xf86VGAarbiterWrapFunctions(void) ScrnInfoPtr pScrn; VGAarbiterScreenPtr pScreenPriv; miPointerScreenPtr PointPriv; -#ifdef RENDER PictureScreenPtr ps; -#endif ScreenPtr pScreen; int vga_count, i; @@ -173,16 +171,17 @@ xf86VGAarbiterWrapFunctions(void) for (i = 0; i < xf86NumScreens; i++) { pScreen = xf86Screens[i]->pScreen; -#ifdef RENDER ps = GetPictureScreenIfSet(pScreen); -#endif pScrn = xf86Screens[pScreen->myNum]; PointPriv = dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey); - if (!dixRequestPrivate(VGAarbiterGCKey, sizeof(VGAarbiterGCRec))) + if (!dixRegisterPrivateKey(&VGAarbiterGCKeyRec, PRIVATE_GC, sizeof(VGAarbiterGCRec))) return FALSE; - if (!(pScreenPriv = xalloc(sizeof(VGAarbiterScreenRec)))) + if (!dixRegisterPrivateKey(&VGAarbiterScreenKeyRec, PRIVATE_SCREEN, 0)) + return FALSE; + + if (!(pScreenPriv = malloc(sizeof(VGAarbiterScreenRec)))) return FALSE; dixSetPrivate(&pScreen->devPrivates, VGAarbiterScreenKey, pScreenPriv); @@ -204,11 +203,9 @@ xf86VGAarbiterWrapFunctions(void) WRAP_SCREEN(UnrealizeCursor, VGAarbiterUnrealizeCursor); WRAP_SCREEN(RecolorCursor, VGAarbiterRecolorCursor); WRAP_SCREEN(SetCursorPosition, VGAarbiterSetCursorPosition); -#ifdef RENDER WRAP_PICT(Composite,VGAarbiterComposite); WRAP_PICT(Glyphs,VGAarbiterGlyphs); WRAP_PICT(CompositeRects,VGAarbiterCompositeRects); -#endif WRAP_SCREEN_INFO(AdjustFrame, VGAarbiterAdjustFrame); WRAP_SCREEN_INFO(SwitchMode, VGAarbiterSwitchMode); WRAP_SCREEN_INFO(EnterVT, VGAarbiterEnterVT); @@ -230,9 +227,7 @@ VGAarbiterCloseScreen (int i, ScreenPtr pScreen) &pScreen->devPrivates, VGAarbiterScreenKey); miPointerScreenPtr PointPriv = (miPointerScreenPtr)dixLookupPrivate( &pScreen->devPrivates, miPointerScreenKey); -#ifdef RENDER PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); -#endif UNWRAP_SCREEN(CreateGC); UNWRAP_SCREEN(CloseScreen); @@ -248,11 +243,9 @@ VGAarbiterCloseScreen (int i, ScreenPtr pScreen) UNWRAP_SCREEN(UnrealizeCursor); UNWRAP_SCREEN(RecolorCursor); UNWRAP_SCREEN(SetCursorPosition); -#ifdef RENDER UNWRAP_PICT(Composite); UNWRAP_PICT(Glyphs); UNWRAP_PICT(CompositeRects); -#endif UNWRAP_SCREEN_INFO(AdjustFrame); UNWRAP_SCREEN_INFO(SwitchMode); UNWRAP_SCREEN_INFO(EnterVT); @@ -260,7 +253,7 @@ VGAarbiterCloseScreen (int i, ScreenPtr pScreen) UNWRAP_SCREEN_INFO(FreeScreen); UNWRAP_SPRITE; - xfree ((pointer) pScreenPriv); + free((pointer) pScreenPriv); xf86VGAarbiterLock(xf86Screens[i]); val = (*pScreen->CloseScreen) (i, pScreen); xf86VGAarbiterUnlock(xf86Screens[i]); @@ -530,12 +523,16 @@ static Bool VGAarbiterEnterVT(int index, int flags) { Bool val; + ScrnInfoPtr pScrn = xf86Screens[index]; ScreenPtr pScreen = screenInfo.screens[index]; VGAarbiterScreenPtr pScreenPriv = (VGAarbiterScreenPtr)dixLookupPrivate( &pScreen->devPrivates, VGAarbiterScreenKey); VGAGet(); - val = (*pScreenPriv->EnterVT)(index, flags); + pScrn->EnterVT = pScreenPriv->EnterVT; + val = (*pScrn->EnterVT)(index, flags); + pScreenPriv->EnterVT = pScrn->EnterVT; + pScrn->EnterVT = VGAarbiterEnterVT; VGAPut(); return val; } @@ -543,12 +540,16 @@ VGAarbiterEnterVT(int index, int flags) static void VGAarbiterLeaveVT(int index, int flags) { + ScrnInfoPtr pScrn = xf86Screens[index]; ScreenPtr pScreen = screenInfo.screens[index]; VGAarbiterScreenPtr pScreenPriv = (VGAarbiterScreenPtr)dixLookupPrivate( &pScreen->devPrivates, VGAarbiterScreenKey); VGAGet(); + pScrn->LeaveVT = pScreenPriv->LeaveVT; (*pScreenPriv->LeaveVT)(index, flags); + pScreenPriv->LeaveVT = pScrn->LeaveVT; + pScrn->LeaveVT = VGAarbiterLeaveVT; VGAPut(); } @@ -1048,7 +1049,6 @@ VGAarbiterDeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScreen) SPRITE_EPILOG; } -#ifdef RENDER static void VGAarbiterComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, @@ -1097,7 +1097,6 @@ VGAarbiterCompositeRects(CARD8 op, PicturePtr pDst, xRenderColor *color, int nRe VGAPut(); PICTURE_EPILOGUE (CompositeRects, VGAarbiterCompositeRects); } -#endif #else /* dummy functions */ void xf86VGAarbiterInit(void) {} diff --git a/xserver/hw/xfree86/common/xf86VGAarbiterPriv.h b/xserver/hw/xfree86/common/xf86VGAarbiterPriv.h index fbca9beb9..33d1d6473 100644 --- a/xserver/hw/xfree86/common/xf86VGAarbiterPriv.h +++ b/xserver/hw/xfree86/common/xf86VGAarbiterPriv.h @@ -43,9 +43,7 @@ #include "xf86str.h" #include "mipointer.h" #include "mipointrst.h" -#ifdef RENDER # include "picturestr.h" -#endif #define WRAP_SCREEN(x,y) {pScreenPriv->x = pScreen->x; pScreen->x = y;} @@ -55,7 +53,7 @@ #define SCREEN_PROLOG(x) pScreen->x = ((VGAarbiterScreenPtr) \ dixLookupPrivate(&(pScreen)->devPrivates, VGAarbiterScreenKey))->x -#define SCREEN_EPILOG(x,y) pScreen->x = y +#define SCREEN_EPILOG(x,y) pScreen->x = y; #define WRAP_PICT(x,y) if (ps) {pScreenPriv->x = ps->x;\ ps->x = y;} @@ -76,10 +74,10 @@ (miPointerScreenPtr)dixLookupPrivate(&pScreen->devPrivates, \ miPointerScreenKey); VGAarbiterScreenPtr pScreenPriv = \ ((VGAarbiterScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, \ - VGAarbiterScreenKey)); PointPriv->spriteFuncs = pScreenPriv->miSprite + VGAarbiterScreenKey)); PointPriv->spriteFuncs = pScreenPriv->miSprite; #define SPRITE_EPILOG pScreenPriv->miSprite = PointPriv->spriteFuncs;\ - PointPriv->spriteFuncs = &VGAarbiterSpriteFuncs + PointPriv->spriteFuncs = &VGAarbiterSpriteFuncs; #define WRAP_SPRITE do { pScreenPriv->miSprite = PointPriv->spriteFuncs;\ PointPriv->spriteFuncs = &VGAarbiterSpriteFuncs; \ @@ -89,11 +87,11 @@ #define GC_WRAP(x) pGCPriv->wrapOps = (x)->ops;\ pGCPriv->wrapFuncs = (x)->funcs; (x)->ops = &VGAarbiterGCOps;\ - (x)->funcs = &VGAarbiterGCFuncs + (x)->funcs = &VGAarbiterGCFuncs; #define GC_UNWRAP(x) VGAarbiterGCPtr pGCPriv = \ (VGAarbiterGCPtr)dixLookupPrivate(&(x)->devPrivates, VGAarbiterGCKey);\ - (x)->ops = pGCPriv->wrapOps; (x)->funcs = pGCPriv->wrapFuncs + (x)->ops = pGCPriv->wrapOps; (x)->funcs = pGCPriv->wrapFuncs; #define GC_SCREEN register ScrnInfoPtr pScrn = \ xf86Screens[pGC->pScreen->myNum] @@ -141,11 +139,9 @@ typedef struct _VGAarbiterScreen { void (*LeaveVT)(int, int); void (*FreeScreen)(int, int); miPointerSpriteFuncPtr miSprite; -#ifdef RENDER CompositeProcPtr Composite; GlyphsProcPtr Glyphs; CompositeRectsProcPtr CompositeRects; -#endif } VGAarbiterScreenRec, *VGAarbiterScreenPtr; typedef struct _VGAarbiterGC { @@ -256,7 +252,6 @@ static Bool VGAarbiterDeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScree static void VGAarbiterDeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScreen); -#ifdef RENDER static void VGAarbiterComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst, INT16 yDst, CARD16 width, CARD16 height); @@ -265,4 +260,3 @@ static void VGAarbiterGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, list, GlyphPtr *glyphs); static void VGAarbiterCompositeRects(CARD8 op, PicturePtr pDst, xRenderColor *color, int nRect, xRectangle *rects); -#endif diff --git a/xserver/hw/xfree86/common/xf86VidMode.c b/xserver/hw/xfree86/common/xf86VidMode.c index 49b86e73a..1788fa192 100644 --- a/xserver/hw/xfree86/common/xf86VidMode.c +++ b/xserver/hw/xfree86/common/xf86VidMode.c @@ -47,7 +47,7 @@ #include "vidmodeproc.h" #include "xf86cmap.h" -static int VidModeKeyIndex; +static DevPrivateKeyRec VidModeKeyRec; static DevPrivateKey VidModeKey; static int VidModeCount = 0; static Bool VidModeClose(int i, ScreenPtr pScreen); @@ -67,15 +67,17 @@ VidModeExtensionInit(ScreenPtr pScreen) return FALSE; } - VidModeKey = &VidModeKeyIndex; + VidModeKey = &VidModeKeyRec; - if (!dixSetPrivate(&pScreen->devPrivates, VidModeKey, - xcalloc(sizeof(VidModeRec), 1))) { - DebugF("xcalloc failed\n"); + if (!dixRegisterPrivateKey(&VidModeKeyRec, PRIVATE_SCREEN, 0)) return FALSE; - } - pVidMode = VMPTR(pScreen); + pVidMode = calloc(sizeof(VidModeRec), 1); + if (!pVidMode) + return FALSE; + + dixSetPrivate(&pScreen->devPrivates, VidModeKey, pVidMode); + pVidMode->Flags = 0; pVidMode->Next = NULL; pVidMode->CloseScreen = pScreen->CloseScreen; @@ -103,7 +105,7 @@ VidModeClose(int i, ScreenPtr pScreen) pScreen->CloseScreen = pVidMode->CloseScreen; if (--VidModeCount == 0) { - xfree(dixLookupPrivate(&pScreen->devPrivates, VidModeKey)); + free(dixLookupPrivate(&pScreen->devPrivates, VidModeKey)); dixSetPrivate(&pScreen->devPrivates, VidModeKey, NULL); VidModeKey = NULL; } @@ -527,7 +529,7 @@ VidModeCreateMode(void) { DisplayModePtr mode; - mode = xalloc(sizeof(DisplayModeRec)); + mode = malloc(sizeof(DisplayModeRec)); if (mode != NULL) { mode->name = ""; mode->VScan = 1; /* divides refresh rate. default = 1 */ diff --git a/xserver/hw/xfree86/common/xf86Xinput.c b/xserver/hw/xfree86/common/xf86Xinput.c index bfa8dc0d4..877eb0382 100644 --- a/xserver/hw/xfree86/common/xf86Xinput.c +++ b/xserver/hw/xfree86/common/xf86Xinput.c @@ -66,6 +66,7 @@ #include "xf86InPriv.h" #include "compiler.h" #include "extinit.h" +#include "loaderProcs.h" #ifdef DPMSExtension #include @@ -80,6 +81,9 @@ #ifdef HAVE_FNMATCH_H #include #endif +#ifdef HAVE_SYS_UTSNAME_H +#include +#endif #include "extnsionst.h" @@ -235,7 +239,7 @@ ApplyAccelerationSettings(DeviceIntPtr dev){ local->name, scheme); } - xfree(schemeStr); + free(schemeStr); /* process special configuration */ switch (scheme) { @@ -261,9 +265,6 @@ ApplyAccelerationSettings(DeviceIntPtr dev){ if (i >= 0) dev->ptrfeed->ctrl.threshold = i; - /* mostly a no-op anyway */ - (*dev->ptrfeed->CtrlProc)(dev, &dev->ptrfeed->ctrl); - xf86Msg(X_CONFIG, "%s: (accel) acceleration factor: %.3f\n", local->name, ((float)dev->ptrfeed->ctrl.num)/ ((float)dev->ptrfeed->ctrl.den)); @@ -278,9 +279,9 @@ xf86SendDragEvents(DeviceIntPtr device) LocalDevicePtr local = (LocalDevicePtr) device->public.devicePrivate; if (device->button && device->button->buttonsDown > 0) - return (local->flags & XI86_SEND_DRAG_EVENTS); + return local->flags & XI86_SEND_DRAG_EVENTS; else - return (TRUE); + return TRUE; } /*********************************************************************** @@ -496,74 +497,153 @@ AddOtherInputDevices(void) { } +/* + * Get the operating system name from uname and store it statically to avoid + * repeating the system call each time MatchOS is checked. + */ +static const char * +HostOS(void) +{ +#ifdef HAVE_SYS_UTSNAME_H + struct utsname name; + static char host_os[sizeof(name.sysname)] = ""; + + if (*host_os == '\0') { + if (uname(&name) >= 0) + strcpy(host_os, name.sysname); + else { + strncpy(host_os, "unknown", sizeof(host_os)); + host_os[sizeof(host_os)-1] = '\0'; + } + } + return host_os; +#else + return ""; +#endif +} + +static int +match_substring(const char *attr, const char *pattern) +{ + return (strstr(attr, pattern)) ? 0 : -1; +} + +#ifdef HAVE_FNMATCH_H +static int +match_pattern(const char *attr, const char *pattern) +{ + return fnmatch(pattern, attr, 0); +} +#else +#define match_pattern match_substring +#endif + +#ifdef HAVE_FNMATCH_H +static int +match_path_pattern(const char *attr, const char *pattern) +{ + return fnmatch(pattern, attr, FNM_PATHNAME); +} +#else +#define match_path_pattern match_substring +#endif + +/* + * Match an attribute against a list of NULL terminated arrays of patterns. + * If a pattern in each list entry is matched, return TRUE. + */ +static Bool +MatchAttrToken(const char *attr, struct list *patterns, + int (*compare)(const char *attr, const char *pattern)) +{ + const xf86MatchGroup *group; + + /* If there are no patterns, accept the match */ + if (list_is_empty(patterns)) + return TRUE; + + /* If there are patterns but no attribute, reject the match */ + if (!attr) + 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. + */ + list_for_each_entry(group, patterns, entry) { + char * const *cur; + Bool match = FALSE; + + for (cur = group->values; *cur; cur++) + if ((*compare)(attr, *cur) == 0) { + match = TRUE; + break; + } + if (!match) + return FALSE; + } + + /* All the entries in the list matched the attribute */ + return TRUE; +} + /* * Classes without any Match statements match all devices. Otherwise, all * statements must match. */ static Bool -InputClassMatches(XF86ConfInputClassPtr iclass, InputAttributes *attrs) +InputClassMatches(const XF86ConfInputClassPtr iclass, const IDevPtr idev, + const InputAttributes *attrs) { - char **cur; - Bool match; + /* MatchProduct substring */ + if (!MatchAttrToken(attrs->product, &iclass->match_product, match_substring)) + return FALSE; + + /* MatchVendor substring */ + if (!MatchAttrToken(attrs->vendor, &iclass->match_vendor, match_substring)) + return FALSE; + + /* MatchDevicePath pattern */ + if (!MatchAttrToken(attrs->device, &iclass->match_device, match_path_pattern)) + return FALSE; + + /* MatchOS case-insensitive string */ + if (!MatchAttrToken(HostOS(), &iclass->match_os, strcasecmp)) + return FALSE; + + /* MatchPnPID pattern */ + if (!MatchAttrToken(attrs->pnp_id, &iclass->match_pnpid, match_pattern)) + return FALSE; + + /* MatchUSBID pattern */ + if (!MatchAttrToken(attrs->usb_id, &iclass->match_usbid, match_pattern)) + return FALSE; + + /* MatchDriver string */ + if (!MatchAttrToken(idev->driver, &iclass->match_driver, strcmp)) + return FALSE; + + /* + * MatchTag string + * See if any of the device's tags match any of the MatchTag tokens. + */ + if (!list_is_empty(&iclass->match_tag)) { + char * const *tag; + Bool match; - if (iclass->match_product) { - if (!attrs->product) - return FALSE; - /* see if any of the values match */ - for (cur = iclass->match_product, match = FALSE; *cur; cur++) - if (strstr(attrs->product, *cur)) { - match = TRUE; - break; - } - if (!match) - return FALSE; - } - if (iclass->match_vendor) { - if (!attrs->vendor) - return FALSE; - /* see if any of the values match */ - for (cur = iclass->match_vendor, match = FALSE; *cur; cur++) - if (strstr(attrs->vendor, *cur)) { - match = TRUE; - break; - } - if (!match) - return FALSE; - } - if (iclass->match_device) { - if (!attrs->device) - return FALSE; - /* see if any of the values match */ - for (cur = iclass->match_device, match = FALSE; *cur; cur++) -#ifdef HAVE_FNMATCH_H - if (fnmatch(*cur, attrs->device, FNM_PATHNAME) == 0) { -#else - if (strstr(attrs->device, *cur)) { -#endif - match = TRUE; - break; - } - if (!match) - return FALSE; - } - if (iclass->match_tag) { if (!attrs->tags) return FALSE; - - for (cur = iclass->match_tag, match = FALSE; *cur && !match; cur++) { - char * const *tag; - for(tag = attrs->tags; *tag; tag++) { - if (!strcmp(*tag, *cur)) { - match = TRUE; - break; - } + for (tag = attrs->tags, match = FALSE; *tag; tag++) { + if (MatchAttrToken(*tag, &iclass->match_tag, strcmp)) { + match = TRUE; + break; } } - if (!match) return FALSE; } + /* MatchIs* booleans */ if (iclass->is_keyboard.set && iclass->is_keyboard.val != !!(attrs->flags & ATTR_KEYBOARD)) return FALSE; @@ -582,6 +662,7 @@ InputClassMatches(XF86ConfInputClassPtr iclass, InputAttributes *attrs) if (iclass->is_touchscreen.set && iclass->is_touchscreen.val != !!(attrs->flags & ATTR_TOUCHSCREEN)) return FALSE; + return TRUE; } @@ -591,38 +672,36 @@ InputClassMatches(XF86ConfInputClassPtr iclass, InputAttributes *attrs) * well as any previous InputClass sections. */ static int -MergeInputClasses(IDevPtr idev, InputAttributes *attrs) +MergeInputClasses(const IDevPtr idev, const InputAttributes *attrs) { XF86ConfInputClassPtr cl; - XF86OptionPtr classopts, mergedopts = NULL; - char *classdriver = NULL; + XF86OptionPtr classopts; for (cl = xf86configptr->conf_inputclass_lst; cl; cl = cl->list.next) { - if (!InputClassMatches(cl, attrs)) + if (!InputClassMatches(cl, idev, attrs)) continue; - /* Collect class options and merge over previous classes */ + /* Collect class options and driver settings */ + classopts = xf86optionListDup(cl->option_lst); + if (cl->driver) { + free(idev->driver); + idev->driver = xstrdup(cl->driver); + if (!idev->driver) { + xf86Msg(X_ERROR, "Failed to allocate memory while merging " + "InputClass configuration"); + return BadAlloc; + } + classopts = xf86ReplaceStrOption(classopts, "driver", + idev->driver); + } + + /* Apply options to device with InputClass settings preferred. */ xf86Msg(X_CONFIG, "%s: Applying InputClass \"%s\"\n", idev->identifier, cl->identifier); - if (cl->driver) - classdriver = cl->driver; - classopts = xf86optionListDup(cl->option_lst); - mergedopts = xf86optionListMerge(mergedopts, classopts); + idev->commonOptions = xf86optionListMerge(idev->commonOptions, + classopts); } - /* Apply options to device with InputClass settings preferred. */ - if (classdriver) { - xfree(idev->driver); - idev->driver = xstrdup(classdriver); - if (!idev->driver) { - xf86Msg(X_ERROR, "Failed to allocate memory while merging " - "InputClass configuration"); - return BadAlloc; - } - mergedopts = xf86ReplaceStrOption(mergedopts, "driver", idev->driver); - } - idev->commonOptions = xf86optionListMerge(idev->commonOptions, mergedopts); - return Success; } @@ -631,14 +710,14 @@ MergeInputClasses(IDevPtr idev, InputAttributes *attrs) * value of the last matching class and holler when returning TRUE. */ static Bool -IgnoreInputClass(IDevPtr idev, InputAttributes *attrs) +IgnoreInputClass(const IDevPtr idev, const InputAttributes *attrs) { XF86ConfInputClassPtr cl; Bool ignore = FALSE; const char *ignore_class; for (cl = xf86configptr->conf_inputclass_lst; cl; cl = cl->list.next) { - if (!InputClassMatches(cl, attrs)) + if (!InputClassMatches(cl, idev, attrs)) continue; if (xf86findOption(cl->option_lst, "Ignore")) { ignore = xf86CheckBoolOption(cl->option_lst, "Ignore", FALSE); @@ -762,7 +841,7 @@ NewInputDeviceRequest (InputOption *options, InputAttributes *attrs, int rval = Success; int is_auto = 0; - idev = xcalloc(sizeof(*idev), 1); + idev = calloc(sizeof(*idev), 1); if (!idev) return BadAlloc; @@ -822,6 +901,8 @@ NewInputDeviceRequest (InputOption *options, InputAttributes *attrs, rval = MergeInputClasses(idev, attrs); if (rval != Success) goto unwind; + + idev->attrs = DuplicateInputAttributes(attrs); } if (!idev->driver || !idev->identifier) { @@ -843,12 +924,10 @@ NewInputDeviceRequest (InputOption *options, InputAttributes *attrs, unwind: if (is_auto && !xf86Info.autoAddDevices) xf86Msg(X_INFO, "AutoAddDevices is off - not adding device.\n"); - if(idev->driver) - xfree(idev->driver); - if(idev->identifier) - xfree(idev->identifier); + free(idev->driver); + free(idev->identifier); xf86optionListFree(idev->commonOptions); - xfree(idev); + free(idev); return rval; } @@ -884,10 +963,10 @@ DeleteInputDeviceRequest(DeviceIntPtr pDev) if (!(*it)) /* end of list, not in the layout */ { - xfree(idev->driver); - xfree(idev->identifier); + free(idev->driver); + free(idev->identifier); xf86optionListFree(idev->commonOptions); - xfree(idev); + free(idev); } } OsReleaseSignals(); @@ -1194,7 +1273,7 @@ xf86ScaleAxis(int Cx, if (X < Sxlow) X = Sxlow; - return (X); + return X; } /* diff --git a/xserver/hw/xfree86/common/xf86Xinput.h b/xserver/hw/xfree86/common/xf86Xinput.h index aa9e9d507..20a3f1bab 100644 --- a/xserver/hw/xfree86/common/xf86Xinput.h +++ b/xserver/hw/xfree86/common/xf86Xinput.h @@ -148,6 +148,7 @@ typedef struct _LocalDeviceRec { pointer module; pointer options; unsigned int history_size; + InputAttributes *attrs; } LocalDeviceRec, *LocalDevicePtr, InputInfoRec, *InputInfoPtr; typedef struct _DeviceAssocRec diff --git a/xserver/hw/xfree86/common/xf86cmap.c b/xserver/hw/xfree86/common/xf86cmap.c index f60d96e7d..8b27b8418 100644 --- a/xserver/hw/xfree86/common/xf86cmap.c +++ b/xserver/hw/xfree86/common/xf86cmap.c @@ -63,10 +63,10 @@ #define SCREEN_EPILOGUE(pScreen, field, wrapper)\ ((pScreen)->field = wrapper) -#define LOAD_PALETTE(pmap, index) \ - ((pmap == miInstalledMaps[index]) && \ +#define LOAD_PALETTE(pmap) \ + ((pmap == GetInstalledmiColormap(pmap->pScreen)) && \ ((pScreenPriv->flags & CMAP_LOAD_EVEN_IF_OFFSCREEN) || \ - xf86Screens[index]->vtSema || pScreenPriv->isDGAmode)) + xf86Screens[pmap->pScreen->myNum]->vtSema || pScreenPriv->isDGAmode)) typedef struct _CMapLink { @@ -102,10 +102,11 @@ typedef struct { int overscan; } CMapColormapRec, *CMapColormapPtr; -static int CMapScreenKeyIndex; -static DevPrivateKey CMapScreenKey; -static int CMapColormapKeyIndex; -static DevPrivateKey CMapColormapKey = &CMapColormapKeyIndex; +static DevPrivateKeyRec CMapScreenKeyRec; +#define CMapScreenKeyRegistered dixPrivateKeyRegistered(&CMapScreenKeyRec) +#define CMapScreenKey (&CMapScreenKeyRec) +static DevPrivateKeyRec CMapColormapKeyRec; +#define CMapColormapKey (&CMapColormapKeyRec) static void CMapInstallColormap(ColormapPtr); static void CMapStoreColors(ColormapPtr, int, xColorItem *); @@ -128,6 +129,18 @@ static void CMapReinstallMap(ColormapPtr); static void CMapUnwrapScreen(ScreenPtr pScreen); +Bool xf86ColormapAllocatePrivates(ScrnInfoPtr pScrn) +{ + /* If we support a better colormap system, then pretend we succeeded. */ + if (xf86_crtc_supports_gamma(pScrn)) + return TRUE; + if (!dixRegisterPrivateKey(&CMapScreenKeyRec, PRIVATE_SCREEN, 0)) + return FALSE; + + if (!dixRegisterPrivateKey(&CMapColormapKeyRec, PRIVATE_COLORMAP, 0)) + return FALSE; + return TRUE; +} Bool xf86HandleColormaps( ScreenPtr pScreen, @@ -151,25 +164,23 @@ Bool xf86HandleColormaps( if(!maxColors || !sigRGBbits || !loadPalette) return FALSE; - CMapScreenKey = &CMapScreenKeyIndex; - elements = 1 << sigRGBbits; - if(!(gamma = xalloc(elements * sizeof(LOCO)))) + if(!(gamma = malloc(elements * sizeof(LOCO)))) return FALSE; - if(!(indices = xalloc(maxColors * sizeof(int)))) { - xfree(gamma); + if(!(indices = malloc(maxColors * sizeof(int)))) { + free(gamma); return FALSE; } - if(!(pScreenPriv = xalloc(sizeof(CMapScreenRec)))) { - xfree(gamma); - xfree(indices); + if(!(pScreenPriv = malloc(sizeof(CMapScreenRec)))) { + free(gamma); + free(indices); return FALSE; } - dixSetPrivate(&pScreen->devPrivates, CMapScreenKey, pScreenPriv); + dixSetPrivate(&pScreen->devPrivates, &CMapScreenKeyRec, pScreenPriv); pScreenPriv->CloseScreen = pScreen->CloseScreen; pScreenPriv->CreateColormap = pScreen->CreateColormap; @@ -221,7 +232,7 @@ Bool xf86HandleColormaps( } /* Force the initial map to be loaded */ - miInstalledMaps[pScreen->myNum] = NULL; + SetInstalledmiColormap(pScreen, NULL); CMapInstallColormap(pDefMap); return TRUE; } @@ -261,11 +272,11 @@ CMapAllocateColormapPrivate(ColormapPtr pmap) else numColors = 1 << pmap->pVisual->nplanes; - if(!(colors = xalloc(numColors * sizeof(LOCO)))) + if(!(colors = malloc(numColors * sizeof(LOCO)))) return FALSE; - if(!(pColPriv = xalloc(sizeof(CMapColormapRec)))) { - xfree(colors); + if(!(pColPriv = malloc(sizeof(CMapColormapRec)))) { + free(colors); return FALSE; } @@ -277,7 +288,7 @@ CMapAllocateColormapPrivate(ColormapPtr pmap) pColPriv->overscan = -1; /* add map to list */ - pLink = xalloc(sizeof(CMapLink)); + pLink = malloc(sizeof(CMapLink)); if(pLink) { pLink->cmap = pmap; pLink->next = pScreenPriv->maps; @@ -316,8 +327,8 @@ CMapDestroyColormap (ColormapPtr cmap) CMapLinkPtr prevLink = NULL, pLink = pScreenPriv->maps; if(pColPriv) { - if(pColPriv->colors) xfree(pColPriv->colors); - xfree(pColPriv); + free(pColPriv->colors); + free(pColPriv); } /* remove map from list */ @@ -327,7 +338,7 @@ CMapDestroyColormap (ColormapPtr cmap) prevLink->next = pLink->next; else pScreenPriv->maps = pLink->next; - xfree(pLink); + free(pLink); break; } prevLink = pLink; @@ -425,11 +436,10 @@ static void CMapInstallColormap(ColormapPtr pmap) { ScreenPtr pScreen = pmap->pScreen; - int index = pScreen->myNum; CMapScreenPtr pScreenPriv = (CMapScreenPtr)dixLookupPrivate( &pScreen->devPrivates, CMapScreenKey); - if (pmap == miInstalledMaps[index]) + if (pmap == GetInstalledmiColormap(pmap->pScreen)) return; pScreen->InstallColormap = pScreenPriv->InstallColormap; @@ -438,15 +448,15 @@ CMapInstallColormap(ColormapPtr pmap) /* Important. We let the lower layers, namely DGA, overwrite the choice of Colormap to install */ - if (miInstalledMaps[index]) - pmap = miInstalledMaps[index]; + if (GetInstalledmiColormap(pmap->pScreen)) + pmap = GetInstalledmiColormap(pmap->pScreen); if (!(pScreenPriv->flags & CMAP_PALETTED_TRUECOLOR) && (pmap->pVisual->class == TrueColor) && CMapColormapUseMax(pmap->pVisual, pScreenPriv)) return; - if(LOAD_PALETTE(pmap, index)) + if(LOAD_PALETTE(pmap)) CMapReinstallMap(pmap); } @@ -456,13 +466,19 @@ CMapInstallColormap(ColormapPtr pmap) static Bool CMapEnterVT(int index, int flags) { + ScrnInfoPtr pScrn = xf86Screens[index]; ScreenPtr pScreen = screenInfo.screens[index]; + Bool ret; CMapScreenPtr pScreenPriv = (CMapScreenPtr)dixLookupPrivate( &pScreen->devPrivates, CMapScreenKey); - if((*pScreenPriv->EnterVT)(index, flags)) { - if(miInstalledMaps[index]) - CMapReinstallMap(miInstalledMaps[index]); + pScrn->EnterVT = pScreenPriv->EnterVT; + ret = (*pScreenPriv->EnterVT)(index, flags); + pScreenPriv->EnterVT = pScrn->EnterVT; + pScrn->EnterVT = CMapEnterVT; + if(ret) { + if(GetInstalledmiColormap(pScreen)) + CMapReinstallMap(GetInstalledmiColormap(pScreen)); return TRUE; } return FALSE; @@ -477,8 +493,8 @@ CMapSwitchMode(int index, DisplayModePtr mode, int flags) &pScreen->devPrivates, CMapScreenKey); if((*pScreenPriv->SwitchMode)(index, mode, flags)) { - if(miInstalledMaps[index]) - CMapReinstallMap(miInstalledMaps[index]); + if(GetInstalledmiColormap(pScreen)) + CMapReinstallMap(GetInstalledmiColormap(pScreen)); return TRUE; } return FALSE; @@ -497,9 +513,9 @@ CMapSetDGAMode(int index, int num, DGADevicePtr dev) pScreenPriv->isDGAmode = DGAActive(index); - if(!pScreenPriv->isDGAmode && miInstalledMaps[index] + if(!pScreenPriv->isDGAmode && GetInstalledmiColormap(pScreen) && xf86Screens[pScreen->myNum]->vtSema) - CMapReinstallMap(miInstalledMaps[index]); + CMapReinstallMap(GetInstalledmiColormap(pScreen)); return ret; } @@ -649,7 +665,7 @@ CMapRefreshColors(ColormapPtr pmap, int defs, int* indices) } - if(LOAD_PALETTE(pmap, pmap->pScreen->myNum)) + if(LOAD_PALETTE(pmap)) (*pScrn->LoadPalette)(pScreenPriv->pScrn, defs, indices, colors, pmap->pVisual); @@ -802,7 +818,7 @@ CMapSetOverscan(ColormapPtr pmap, int defs, int *indices) } if (newOverscan) { pColPriv->overscan = overscan; - if (LOAD_PALETTE(pmap, pmap->pScreen->myNum)) { + if (LOAD_PALETTE(pmap)) { #ifdef DEBUGOVERSCAN ErrorF("SetOverscan() called from CmapSetOverscan\n"); #endif @@ -829,9 +845,9 @@ CMapUnwrapScreen(ScreenPtr pScreen) pScrn->SetDGAMode = pScreenPriv->SetDGAMode; pScrn->ChangeGamma = pScreenPriv->ChangeGamma; - xfree(pScreenPriv->gamma); - xfree(pScreenPriv->PreAllocIndices); - xfree(pScreenPriv); + free(pScreenPriv->gamma); + free(pScreenPriv->PreAllocIndices); + free(pScreenPriv); } @@ -901,7 +917,7 @@ CMapChangeGamma( CMapLinkPtr pLink; /* Is this sufficient checking ? */ - if(CMapScreenKey == NULL) + if(!CMapScreenKeyRegistered) return BadImplementation; pScreenPriv = (CMapScreenPtr)dixLookupPrivate(&pScreen->devPrivates, @@ -929,10 +945,10 @@ CMapChangeGamma( pLink = pLink->next; } - if(miInstalledMaps[pScreen->myNum] && + if(GetInstalledmiColormap(pScreen) && ((pScreenPriv->flags & CMAP_LOAD_EVEN_IF_OFFSCREEN) || pScrn->vtSema || pScreenPriv->isDGAmode)) { - ColormapPtr pMap = miInstalledMaps[pScreen->myNum]; + ColormapPtr pMap = GetInstalledmiColormap(pScreen); if (!(pScreenPriv->flags & CMAP_PALETTED_TRUECOLOR) && (pMap->pVisual->class == TrueColor) && @@ -951,9 +967,9 @@ CMapChangeGamma( if(pLink) { /* need to trick CMapRefreshColors() into thinking this is the currently installed map */ - miInstalledMaps[pScreen->myNum] = pLink->cmap; + SetInstalledmiColormap(pScreen, pLink->cmap); CMapReinstallMap(pLink->cmap); - miInstalledMaps[pScreen->myNum] = pMap; + SetInstalledmiColormap(pScreen, pMap); } } else CMapReinstallMap(pMap); @@ -1013,7 +1029,7 @@ xf86ChangeGammaRamp( } } - if(CMapScreenKey == NULL) + if(!CMapScreenKeyRegistered) return BadImplementation; pScreenPriv = (CMapScreenPtr)dixLookupPrivate(&pScreen->devPrivates, @@ -1035,10 +1051,10 @@ xf86ChangeGammaRamp( pLink = pLink->next; } - if(miInstalledMaps[pScreen->myNum] && + if(GetInstalledmiColormap(pScreen) && ((pScreenPriv->flags & CMAP_LOAD_EVEN_IF_OFFSCREEN) || pScrn->vtSema || pScreenPriv->isDGAmode)) { - ColormapPtr pMap = miInstalledMaps[pScreen->myNum]; + ColormapPtr pMap = GetInstalledmiColormap(pScreen); if (!(pScreenPriv->flags & CMAP_PALETTED_TRUECOLOR) && (pMap->pVisual->class == TrueColor) && @@ -1057,9 +1073,9 @@ xf86ChangeGammaRamp( if(pLink) { /* need to trick CMapRefreshColors() into thinking this is the currently installed map */ - miInstalledMaps[pScreen->myNum] = pLink->cmap; + SetInstalledmiColormap(pScreen, pLink->cmap); CMapReinstallMap(pLink->cmap); - miInstalledMaps[pScreen->myNum] = pMap; + SetInstalledmiColormap(pScreen, pMap); } } else CMapReinstallMap(pMap); @@ -1081,7 +1097,7 @@ xf86GetGammaRampSize(ScreenPtr pScreen) return crtc->gammaSize; } - if(CMapScreenKey == NULL) return 0; + if(!CMapScreenKeyRegistered) return 0; pScreenPriv = (CMapScreenPtr)dixLookupPrivate(&pScreen->devPrivates, CMapScreenKey); @@ -1121,7 +1137,7 @@ xf86GetGammaRamp( } } - if(CMapScreenKey == NULL) + if(!CMapScreenKeyRegistered) return BadImplementation; pScreenPriv = (CMapScreenPtr)dixLookupPrivate(&pScreen->devPrivates, diff --git a/xserver/hw/xfree86/common/xf86cmap.h b/xserver/hw/xfree86/common/xf86cmap.h index f15844e59..649f07808 100644 --- a/xserver/hw/xfree86/common/xf86cmap.h +++ b/xserver/hw/xfree86/common/xf86cmap.h @@ -45,6 +45,10 @@ extern _X_EXPORT Bool xf86HandleColormaps( unsigned int flags ); +extern _X_EXPORT Bool xf86ColormapAllocatePrivates( + ScrnInfoPtr pScrn +); + extern _X_EXPORT int xf86ChangeGamma( ScreenPtr pScreen, diff --git a/xserver/hw/xfree86/common/xf86fbman.c b/xserver/hw/xfree86/common/xf86fbman.c index 5b8871723..e60e5c405 100644 --- a/xserver/hw/xfree86/common/xf86fbman.c +++ b/xserver/hw/xfree86/common/xf86fbman.c @@ -42,7 +42,7 @@ #define DEBUG */ -static int xf86FBManagerKeyIndex; +static DevPrivateKeyRec xf86FBManagerKeyRec; static DevPrivateKey xf86FBManagerKey; Bool xf86RegisterOffscreenManager( @@ -50,7 +50,11 @@ Bool xf86RegisterOffscreenManager( FBManagerFuncsPtr funcs ){ - xf86FBManagerKey = &xf86FBManagerKeyIndex; + xf86FBManagerKey = &xf86FBManagerKeyRec; + + if (!dixRegisterPrivateKey(&xf86FBManagerKeyRec, PRIVATE_SCREEN, 0)) + return FALSE; + dixSetPrivate(&pScreen->devPrivates, xf86FBManagerKey, funcs); return TRUE; @@ -60,8 +64,9 @@ Bool xf86RegisterOffscreenManager( Bool xf86FBManagerRunning(ScreenPtr pScreen) { - if(xf86FBManagerKey == NULL) + if (xf86FBManagerKey == NULL) return FALSE; + if(!dixLookupPrivate(&pScreen->devPrivates, xf86FBManagerKey)) return FALSE; @@ -270,8 +275,8 @@ xf86PurgeUnlockedOffscreenAreas(ScreenPtr pScreen) \************************************************************/ -static int xf86FBScreenKeyIndex; -static DevPrivateKey xf86FBScreenKey = &xf86FBScreenKeyIndex; +static DevPrivateKeyRec xf86FBScreenKeyRec; +#define xf86FBScreenKey (&xf86FBScreenKeyRec) typedef struct _FBLink { FBArea area; @@ -323,10 +328,10 @@ localRegisterFreeBoxCallback( offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates, xf86FBScreenKey); - newCallbacks = xrealloc( offman->FreeBoxesUpdateCallback, + newCallbacks = realloc( offman->FreeBoxesUpdateCallback, sizeof(FreeBoxCallbackProcPtr) * (offman->NumCallbacks + 1)); - newPrivates = xrealloc(offman->devPrivates, + newPrivates = realloc(offman->devPrivates, sizeof(DevUnion) * (offman->NumCallbacks + 1)); if(!newCallbacks || !newPrivates) @@ -363,8 +368,8 @@ AllocateArea( if(granularity <= 1) granularity = 0; - boxp = REGION_RECTS(offman->FreeBoxes); - num = REGION_NUM_RECTS(offman->FreeBoxes); + boxp = RegionRects(offman->FreeBoxes); + num = RegionNumRects(offman->FreeBoxes); /* look through the free boxes */ for(i = 0; i < num; i++, boxp++) { @@ -375,7 +380,7 @@ AllocateArea( if(((boxp->y2 - boxp->y1) < h) || ((boxp->x2 - x) < w)) continue; - link = xalloc(sizeof(FBLink)); + link = malloc(sizeof(FBLink)); if(!link) return NULL; area = &(link->area); @@ -407,9 +412,9 @@ AllocateArea( /* bye, bye */ (*link->area.RemoveAreaCallback)(&link->area); - REGION_INIT(pScreen, &NewReg, &(link->area.box), 1); - REGION_UNION(pScreen, offman->FreeBoxes, offman->FreeBoxes, &NewReg); - REGION_UNINIT(pScreen, &NewReg); + RegionInit(&NewReg, &(link->area.box), 1); + RegionUnion(offman->FreeBoxes, offman->FreeBoxes, &NewReg); + RegionUninit(&NewReg); area = &(link->area); break; @@ -427,9 +432,9 @@ AllocateArea( area->RemoveAreaCallback = removeCB; area->devPrivate.ptr = privData; - REGION_INIT(pScreen, &NewReg, &(area->box), 1); - REGION_SUBTRACT(pScreen, offman->FreeBoxes, offman->FreeBoxes, &NewReg); - REGION_UNINIT(pScreen, &NewReg); + RegionInit(&NewReg, &(area->box), 1); + RegionSubtract(offman->FreeBoxes, offman->FreeBoxes, &NewReg); + RegionUninit(&NewReg); } return area; @@ -477,15 +482,15 @@ localFreeOffscreenArea(FBAreaPtr area) } /* put the area back into the pool */ - REGION_INIT(pScreen, &FreedRegion, &(pLink->area.box), 1); - REGION_UNION(pScreen, offman->FreeBoxes, offman->FreeBoxes, &FreedRegion); - REGION_UNINIT(pScreen, &FreedRegion); + RegionInit(&FreedRegion, &(pLink->area.box), 1); + RegionUnion(offman->FreeBoxes, offman->FreeBoxes, &FreedRegion); + RegionUninit(&FreedRegion); if(pLinkPrev) pLinkPrev->next = pLink->next; else offman->UsedAreas = pLink->next; - xfree(pLink); + free(pLink); offman->NumUsedAreas--; SendCallFreeBoxCallbacks(offman); @@ -536,12 +541,12 @@ localResizeOffscreenArea( (resize->box.x2 == OrigArea.x2)) return TRUE; - REGION_INIT(pScreen, &FreedReg, &OrigArea, 1); - REGION_INIT(pScreen, &NewReg, &(resize->box), 1); - REGION_SUBTRACT(pScreen, &FreedReg, &FreedReg, &NewReg); - REGION_UNION(pScreen, offman->FreeBoxes, offman->FreeBoxes, &FreedReg); - REGION_UNINIT(pScreen, &FreedReg); - REGION_UNINIT(pScreen, &NewReg); + RegionInit(&FreedReg, &OrigArea, 1); + RegionInit(&NewReg, &(resize->box), 1); + RegionSubtract(&FreedReg, &FreedReg, &NewReg); + RegionUnion(offman->FreeBoxes, offman->FreeBoxes, &FreedReg); + RegionUninit(&FreedReg); + RegionUninit(&NewReg); SendCallFreeBoxCallbacks(offman); @@ -551,8 +556,8 @@ localResizeOffscreenArea( /* otherwise we remove the old region */ - REGION_INIT(pScreen, &FreedReg, &OrigArea, 1); - REGION_UNION(pScreen, offman->FreeBoxes, offman->FreeBoxes, &FreedReg); + RegionInit(&FreedReg, &OrigArea, 1); + RegionUnion(offman->FreeBoxes, offman->FreeBoxes, &FreedReg); /* remove the old link */ if(pLinkPrev) @@ -583,14 +588,14 @@ localResizeOffscreenArea( pLink->next = offman->UsedAreas; offman->UsedAreas = pLink; - xfree(newLink); + free(newLink); /* AllocateArea added one but we really only exchanged one */ offman->NumUsedAreas--; } else { /* reinstate the old region */ - REGION_SUBTRACT(pScreen, offman->FreeBoxes, offman->FreeBoxes, &FreedReg); - REGION_UNINIT(pScreen, &FreedReg); + RegionSubtract(offman->FreeBoxes, offman->FreeBoxes, &FreedReg); + RegionUninit(&FreedReg); pLink->next = offman->UsedAreas; offman->UsedAreas = pLink; @@ -598,7 +603,7 @@ localResizeOffscreenArea( } - REGION_UNINIT(pScreen, &FreedReg); + RegionUninit(&FreedReg); SendCallFreeBoxCallbacks(offman); @@ -636,47 +641,47 @@ localQueryLargestOffscreenArea( if(offman->NumUsedAreas) { FBLinkPtr pLink; RegionRec tmpRegion; - newRegion = REGION_CREATE(pScreen, NULL, 1); - REGION_COPY(pScreen, newRegion, offman->InitialBoxes); + newRegion = RegionCreate(NULL, 1); + RegionCopy(newRegion, offman->InitialBoxes); pLink = offman->UsedAreas; while(pLink) { if(!pLink->area.RemoveAreaCallback) { - REGION_INIT(pScreen, &tmpRegion, &(pLink->area.box), 1); - REGION_SUBTRACT(pScreen, newRegion, newRegion, &tmpRegion); - REGION_UNINIT(pScreen, &tmpRegion); + RegionInit(&tmpRegion, &(pLink->area.box), 1); + RegionSubtract(newRegion, newRegion, &tmpRegion); + RegionUninit(&tmpRegion); } pLink = pLink->next; } - nbox = REGION_NUM_RECTS(newRegion); - pbox = REGION_RECTS(newRegion); + nbox = RegionNumRects(newRegion); + pbox = RegionRects(newRegion); break; } case 1: if(offman->NumUsedAreas) { FBLinkPtr pLink; RegionRec tmpRegion; - newRegion = REGION_CREATE(pScreen, NULL, 1); - REGION_COPY(pScreen, newRegion, offman->FreeBoxes); + newRegion = RegionCreate(NULL, 1); + RegionCopy(newRegion, offman->FreeBoxes); pLink = offman->UsedAreas; while(pLink) { if(pLink->area.RemoveAreaCallback) { - REGION_INIT(pScreen, &tmpRegion, &(pLink->area.box), 1); - REGION_APPEND(pScreen, newRegion, &tmpRegion); - REGION_UNINIT(pScreen, &tmpRegion); + RegionInit(&tmpRegion, &(pLink->area.box), 1); + RegionAppend(newRegion, &tmpRegion); + RegionUninit(&tmpRegion); } pLink = pLink->next; } - nbox = REGION_NUM_RECTS(newRegion); - pbox = REGION_RECTS(newRegion); + nbox = RegionNumRects(newRegion); + pbox = RegionRects(newRegion); break; } default: - nbox = REGION_NUM_RECTS(offman->FreeBoxes); - pbox = REGION_RECTS(offman->FreeBoxes); + nbox = RegionNumRects(offman->FreeBoxes); + pbox = RegionRects(offman->FreeBoxes); break; } @@ -719,7 +724,7 @@ localQueryLargestOffscreenArea( } if(newRegion) - REGION_DESTROY(pScreen, newRegion); + RegionDestroy(newRegion); return TRUE; } @@ -741,9 +746,9 @@ localPurgeUnlockedOffscreenAreas(ScreenPtr pScreen) if(pLink->area.RemoveAreaCallback) { (*pLink->area.RemoveAreaCallback)(&pLink->area); - REGION_INIT(pScreen, &FreedRegion, &(pLink->area.box), 1); - REGION_APPEND(pScreen, offman->FreeBoxes, &FreedRegion); - REGION_UNINIT(pScreen, &FreedRegion); + RegionInit(&FreedRegion, &(pLink->area.box), 1); + RegionAppend(offman->FreeBoxes, &FreedRegion); + RegionUninit(&FreedRegion); if(pPrev) pPrev->next = pLink->next; @@ -751,7 +756,7 @@ localPurgeUnlockedOffscreenAreas(ScreenPtr pScreen) tmp = pLink; pLink = pLink->next; - xfree(tmp); + free(tmp); offman->NumUsedAreas--; anyUsed = TRUE; } else { @@ -761,7 +766,7 @@ localPurgeUnlockedOffscreenAreas(ScreenPtr pScreen) } if(anyUsed) { - REGION_VALIDATE(pScreen, offman->FreeBoxes, &anyUsed); + RegionValidate(offman->FreeBoxes, &anyUsed); SendCallFreeBoxCallbacks(offman); } @@ -799,7 +804,7 @@ LinearRemoveCBWrapper(FBAreaPtr area) pLinkPrev->next = pLink->next; else offman->LinearAreas = pLink->next; - xfree(pLink); + free(pLink); } static void @@ -854,7 +859,7 @@ AllocateLinear( /* break left */ if (offset > linear->linear.offset) { - newlink = xalloc(sizeof(FBLinearLink)); + newlink = malloc(sizeof(FBLinearLink)); if (!newlink) return NULL; newlink->area = NULL; @@ -869,7 +874,7 @@ AllocateLinear( /* break right */ if (size < linear->linear.size) { - newlink = xalloc(sizeof(FBLinearLink)); + newlink = malloc(sizeof(FBLinearLink)); if (!newlink) return NULL; newlink->area = NULL; @@ -920,17 +925,17 @@ localAllocateOffscreenLinear( DebugF("NOPE, ALLOCATING AREA\n"); - if(!(link = xalloc(sizeof(FBLinearLink)))) + if(!(link = malloc(sizeof(FBLinearLink)))) return NULL; /* No linear available, so try and pinch some from the XY areas */ - extents = REGION_EXTENTS(pScreen, offman->InitialBoxes); + extents = RegionExtents(offman->InitialBoxes); pitch = extents->x2 - extents->x1; if (gran > 1) { if (gran > pitch) { /* we can't match the specified alignment with XY allocations */ - xfree(link); + free(link); return NULL; } @@ -970,7 +975,7 @@ localAllocateOffscreenLinear( linear->RemoveLinearCallback = removeCB; linear->devPrivate.ptr = privData; } else - xfree(link); + free(link); DumpDebug(offman->LinearAreas); @@ -1002,7 +1007,7 @@ localFreeOffscreenLinear(FBLinearPtr linear) if(pLinkPrev) pLinkPrev->next = pLink->next; else offman->LinearAreas = pLink->next; - xfree(pLink); + free(pLink); DumpDebug(offman->LinearAreas); return; } @@ -1055,7 +1060,7 @@ localResizeOffscreenLinear(FBLinearPtr resize, int length) BoxPtr extents; int pitch, w, h; - extents = REGION_EXTENTS(pScreen, offman->InitialBoxes); + extents = RegionExtents(offman->InitialBoxes); pitch = extents->x2 - extents->x1; if(length < pitch) { /* special case */ @@ -1121,7 +1126,7 @@ localQueryLargestOffscreenLinear( offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates, xf86FBScreenKey); - extents = REGION_EXTENTS(pScreen, offman->InitialBoxes); + extents = RegionExtents(offman->InitialBoxes); if((extents->x2 - extents->x1) == w) *size = w * h; return TRUE; @@ -1161,22 +1166,22 @@ xf86FBCloseScreen (int i, ScreenPtr pScreen) while(pLink) { tmp = pLink; pLink = pLink->next; - xfree(tmp); + free(tmp); } pLinearLink = offman->LinearAreas; while(pLinearLink) { tmp2 = pLinearLink; pLinearLink = pLinearLink->next; - xfree(tmp2); + free(tmp2); } - REGION_DESTROY(pScreen, offman->InitialBoxes); - REGION_DESTROY(pScreen, offman->FreeBoxes); + RegionDestroy(offman->InitialBoxes); + RegionDestroy(offman->FreeBoxes); - xfree(offman->FreeBoxesUpdateCallback); - xfree(offman->devPrivates); - xfree(offman); + free(offman->FreeBoxesUpdateCallback); + free(offman->devPrivates); + free(offman); dixSetPrivate(&pScreen->devPrivates, xf86FBScreenKey, NULL); return (*pScreen->CloseScreen) (i, pScreen); @@ -1206,15 +1211,15 @@ xf86InitFBManager( if (FullBox->y2 < FullBox->y1) return FALSE; if (FullBox->x2 < FullBox->x1) return FALSE; - REGION_INIT(pScreen, &ScreenRegion, &ScreenBox, 1); - REGION_INIT(pScreen, &FullRegion, FullBox, 1); + RegionInit(&ScreenRegion, &ScreenBox, 1); + RegionInit(&FullRegion, FullBox, 1); - REGION_SUBTRACT(pScreen, &FullRegion, &FullRegion, &ScreenRegion); + RegionSubtract(&FullRegion, &FullRegion, &ScreenRegion); ret = xf86InitFBManagerRegion(pScreen, &FullRegion); - REGION_UNINIT(pScreen, &ScreenRegion); - REGION_UNINIT(pScreen, &FullRegion); + RegionUninit(&ScreenRegion); + RegionUninit(&FullRegion); return ret; } @@ -1249,17 +1254,17 @@ xf86InitFBManagerArea( } /* Factor out virtual resolution */ - pRegion = RECTS_TO_REGION(pScreen, nRect, Rect, 0); + pRegion = RegionFromRects(nRect, Rect, 0); if (pRegion) { - if (!REGION_NAR(pRegion)) { + if (!RegionNar(pRegion)) { Rect[2].x = Rect[2].y = 0; Rect[2].width = pScrn->virtualX; Rect[2].height = pScrn->virtualY; - pScreenRegion = RECTS_TO_REGION(pScreen, 1, &Rect[2], 0); + pScreenRegion = RegionFromRects(1, &Rect[2], 0); if (pScreenRegion) { - if (!REGION_NAR(pScreenRegion)) { - REGION_SUBTRACT(pScreen, pRegion, pRegion, pScreenRegion); + if (!RegionNar(pScreenRegion)) { + RegionSubtract(pRegion, pRegion, pScreenRegion); ret = xf86InitFBManagerRegion(pScreen, pRegion); @@ -1301,11 +1306,11 @@ xf86InitFBManagerArea( } } - REGION_DESTROY(pScreen, pScreenRegion); + RegionDestroy(pScreenRegion); } } - REGION_DESTROY(pScreen, pRegion); + RegionDestroy(pRegion); } return ret; @@ -1318,13 +1323,16 @@ xf86InitFBManagerRegion( ){ FBManagerPtr offman; - if(REGION_NIL(FullRegion)) + if(RegionNil(FullRegion)) return FALSE; + if (!dixRegisterPrivateKey(&xf86FBScreenKeyRec, PRIVATE_SCREEN, 0)) + return FALSE; + if(!xf86RegisterOffscreenManager(pScreen, &xf86FBManFuncs)) return FALSE; - offman = xalloc(sizeof(FBManager)); + offman = malloc(sizeof(FBManager)); if(!offman) return FALSE; dixSetPrivate(&pScreen->devPrivates, xf86FBScreenKey, offman); @@ -1332,11 +1340,11 @@ xf86InitFBManagerRegion( offman->CloseScreen = pScreen->CloseScreen; pScreen->CloseScreen = xf86FBCloseScreen; - offman->InitialBoxes = REGION_CREATE(pScreen, NULL, 1); - offman->FreeBoxes = REGION_CREATE(pScreen, NULL, 1); + offman->InitialBoxes = RegionCreate(NULL, 1); + offman->FreeBoxes = RegionCreate(NULL, 1); - REGION_COPY(pScreen, offman->InitialBoxes, FullRegion); - REGION_COPY(pScreen, offman->FreeBoxes, FullRegion); + RegionCopy(offman->InitialBoxes, FullRegion); + RegionCopy(offman->FreeBoxes, FullRegion); offman->pScreen = pScreen; offman->UsedAreas = NULL; @@ -1368,7 +1376,7 @@ xf86InitFBManagerLinear( offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates, xf86FBScreenKey); - offman->LinearAreas = xalloc(sizeof(FBLinearLink)); + offman->LinearAreas = malloc(sizeof(FBLinearLink)); if (!offman->LinearAreas) return FALSE; @@ -1415,7 +1423,7 @@ xf86AllocateLinearOffscreenArea ( offman = (FBManagerPtr)dixLookupPrivate(&pScreen->devPrivates, xf86FBScreenKey); - extents = REGION_EXTENTS(pScreen, offman->InitialBoxes); + extents = RegionExtents(offman->InitialBoxes); w = extents->x2 - extents->x1; if (gran > 1) { diff --git a/xserver/hw/xfree86/common/xf86pciBus.c b/xserver/hw/xfree86/common/xf86pciBus.c index ac018e739..74016af8a 100644 --- a/xserver/hw/xfree86/common/xf86pciBus.c +++ b/xserver/hw/xfree86/common/xf86pciBus.c @@ -41,6 +41,7 @@ #include "Pci.h" #include "xf86.h" #include "xf86Priv.h" +#include "dirent.h" /* DIR, FILE type definitions */ /* Bus-specific headers */ #include "xf86Bus.h" @@ -150,18 +151,13 @@ xf86PciProbe(void) /* Print a summary of the video devices found */ for (k = 0; k < num; k++) { - const char *vendorname = NULL, *chipname = NULL; const char *prim = " "; Bool memdone = FALSE, iodone = FALSE; info = xf86PciVideoInfo[k]; - vendorname = pci_device_get_vendor_name( info ); - chipname = pci_device_get_device_name( info ); - - if ((!vendorname || !chipname) && - !PCIALWAYSPRINTCLASSES(info->device_class)) + if (!PCIALWAYSPRINTCLASSES(info->device_class)) continue; if (xf86IsPrimaryPci(info)) @@ -172,12 +168,6 @@ xf86PciProbe(void) info->vendor_id, info->device_id, info->subvendor_id, info->subdevice_id); - if (vendorname) - xf86ErrorF("%s ", vendorname); - - if (chipname) - xf86ErrorF("%s ", chipname); - xf86ErrorF("rev %d", info->revision); for (i = 0; i < 6; i++) { @@ -212,7 +202,7 @@ xf86PciProbe(void) xf86ErrorF("\n"); } - xfree(xf86PciVideoInfo); + free(xf86PciVideoInfo); } /* @@ -293,7 +283,7 @@ xf86ParsePciBusString(const char *busID, int *bus, int *device, int *func) s = xstrdup(id); p = strtok(s, ":"); if (p == NULL || *p == 0) { - xfree(s); + free(s); return FALSE; } d = strpbrk(p, "@"); @@ -301,14 +291,14 @@ xf86ParsePciBusString(const char *busID, int *bus, int *device, int *func) *(d++) = 0; for (i = 0; d[i] != 0; i++) { if (!isdigit(d[i])) { - xfree(s); + free(s); return FALSE; } } } for (i = 0; p[i] != 0; i++) { if (!isdigit(p[i])) { - xfree(s); + free(s); return FALSE; } } @@ -317,12 +307,12 @@ xf86ParsePciBusString(const char *busID, int *bus, int *device, int *func) *bus += atoi(d) << 8; p = strtok(NULL, ":"); if (p == NULL || *p == 0) { - xfree(s); + free(s); return FALSE; } for (i = 0; p[i] != 0; i++) { if (!isdigit(p[i])) { - xfree(s); + free(s); return FALSE; } } @@ -330,17 +320,17 @@ xf86ParsePciBusString(const char *busID, int *bus, int *device, int *func) *func = 0; p = strtok(NULL, ":"); if (p == NULL || *p == 0) { - xfree(s); + free(s); return TRUE; } for (i = 0; p[i] != 0; i++) { if (!isdigit(p[i])) { - xfree(s); + free(s); return FALSE; } } *func = atoi(p); - xfree(s); + free(s); return TRUE; } @@ -420,4 +410,915 @@ xf86CheckPciSlot(const struct pci_device *d) return TRUE; } +#define END_OF_MATCHES(m) \ + (((m).vendor_id == 0) && ((m).device_id == 0) && ((m).subvendor_id == 0)) +Bool +xf86PciAddMatchingDev(DriverPtr drvp) +{ + const struct pci_id_match * const devices = drvp->supported_devices; + int j; + struct pci_device *pPci; + struct pci_device_iterator *iter; + int numFound = 0; + + + iter = pci_id_match_iterator_create(NULL); + while ((pPci = pci_device_next(iter)) != NULL) { + /* Determine if this device is supported by the driver. If it is, + * add it to the list of devices to configure. + */ + for (j = 0 ; ! END_OF_MATCHES(devices[j]) ; j++) { + if ( PCI_ID_COMPARE( devices[j].vendor_id, pPci->vendor_id ) + && PCI_ID_COMPARE( devices[j].device_id, pPci->device_id ) + && ((devices[j].device_class_mask & pPci->device_class) + == devices[j].device_class) ) { + if (xf86CheckPciSlot(pPci)) { + GDevPtr pGDev = xf86AddBusDeviceToConfigure( + drvp->driverName, BUS_PCI, pPci, -1); + if (pGDev != NULL) { + /* After configure pass 1, chipID and chipRev are + * treated as over-rides, so clobber them here. + */ + pGDev->chipID = -1; + pGDev->chipRev = -1; + } + + numFound++; + } + + break; + } + } + } + + pci_iterator_destroy(iter); + + return numFound != 0; +} + +Bool +xf86PciProbeDev(DriverPtr drvp) +{ + int i, j; + struct pci_device * pPci; + Bool foundScreen = FALSE; + const struct pci_id_match * const devices = drvp->supported_devices; + GDevPtr *devList; + const unsigned numDevs = xf86MatchDevice(drvp->driverName, & devList); + + for ( i = 0 ; i < numDevs ; i++ ) { + struct pci_device_iterator *iter; + unsigned device_id; + + + /* Find the pciVideoRec associated with this device section. + */ + iter = pci_id_match_iterator_create(NULL); + while ((pPci = pci_device_next(iter)) != NULL) { + if (devList[i]->busID && *devList[i]->busID) { + if (xf86ComparePciBusString(devList[i]->busID, + ((pPci->domain << 8) + | pPci->bus), + pPci->dev, + pPci->func)) { + break; + } + } + else if (xf86IsPrimaryPci(pPci)) { + break; + } + } + + pci_iterator_destroy(iter); + + if (pPci == NULL) { + continue; + } + device_id = (devList[i]->chipID > 0) + ? devList[i]->chipID : pPci->device_id; + + + /* Once the pciVideoRec is found, determine if the device is supported + * by the driver. If it is, probe it! + */ + for ( j = 0 ; ! END_OF_MATCHES( devices[j] ) ; j++ ) { + if ( PCI_ID_COMPARE( devices[j].vendor_id, pPci->vendor_id ) + && PCI_ID_COMPARE( devices[j].device_id, device_id ) + && ((devices[j].device_class_mask & pPci->device_class) + == devices[j].device_class) ) { + int entry; + + /* Allow the same entity to be used more than once for + * devices with multiple screens per entity. This assumes + * implicitly that there will be a screen == 0 instance. + * + * FIXME Need to make sure that two different drivers don't + * FIXME claim the same screen > 0 instance. + */ + if ((devList[i]->screen == 0) && !xf86CheckPciSlot(pPci)) + continue; + + DebugF("%s: card at %d:%d:%d is claimed by a Device section\n", + drvp->driverName, pPci->bus, pPci->dev, pPci->func); + + /* Allocate an entry in the lists to be returned */ + entry = xf86ClaimPciSlot(pPci, drvp, device_id, + devList[i], devList[i]->active); + + if ((entry == -1) && (devList[i]->screen > 0)) { + unsigned k; + + for (k = 0; k < xf86NumEntities; k++ ) { + EntityPtr pEnt = xf86Entities[k]; + if (pEnt->bus.type != BUS_PCI) + continue; + if (pEnt->bus.id.pci == pPci) { + entry = k; + xf86AddDevToEntity(k, devList[i]); + break; + } + } + } + + if (entry != -1) { + if ((*drvp->PciProbe)(drvp, entry, pPci, + devices[j].match_data)) { + foundScreen = TRUE; + } else + xf86UnclaimPciSlot(pPci); + } + + break; + } + } + } + free(devList); + + return foundScreen; +} + +void +xf86PciIsolateDevice(char *argument) +{ + int bus, device, func; + + if (sscanf(argument, "PCI:%d:%d:%d", &bus, &device, &func) == 3) { + xf86IsolateDevice.domain = PCI_DOM_FROM_BUS(bus); + xf86IsolateDevice.bus = PCI_BUS_NO_DOMAIN(bus); + xf86IsolateDevice.dev = device; + xf86IsolateDevice.func = func; + } else + FatalError("Invalid isolated device specification\n"); +} + +static Bool +pciDeviceHasBars(struct pci_device *pci) +{ + int i; + + for (i = 0; i < 6; i++) + if (pci->regions[i].size) + return TRUE; + + if (pci->rom_size) + return TRUE; + + return FALSE; +} + +struct Inst { + struct pci_device * pci; + GDevPtr dev; + Bool foundHW; /* PCIid in list of supported chipsets */ + Bool claimed; /* BusID matches with a device section */ + int chip; + int screen; +}; + + +/** + * Find set of unclaimed devices matching a given vendor ID. + * + * Used by drivers to find as yet unclaimed devices matching the specified + * vendor ID. + * + * \param driverName Name of the driver. This is used to find Device + * sections in the config file. + * \param vendorID PCI vendor ID of associated devices. If zero, then + * the true vendor ID must be encoded in the \c PCIid + * fields of the \c PCIchipsets entries. + * \param chipsets Symbol table used to associate chipset names with + * PCI IDs. + * \param devList List of Device sections parsed from the config file. + * \param numDevs Number of entries in \c devList. + * \param drvp Pointer the driver's control structure. + * \param foundEntities Returned list of entity indicies associated with the + * driver. + * + * \returns + * The number of elements in returned in \c foundEntities on success or zero + * on failure. + * + * \todo + * This function does a bit more than short description says. Fill in some + * more of the details of its operation. + * + * \todo + * The \c driverName parameter is redundant. It is the same as + * \c DriverRec::driverName. In a future version of this function, remove + * that parameter. + */ +int +xf86MatchPciInstances(const char *driverName, int vendorID, + SymTabPtr chipsets, PciChipsets *PCIchipsets, + GDevPtr *devList, int numDevs, DriverPtr drvp, + int **foundEntities) +{ + int i,j; + struct pci_device * pPci; + struct pci_device_iterator *iter; + struct Inst *instances = NULL; + int numClaimedInstances = 0; + int allocatedInstances = 0; + int numFound = 0; + SymTabRec *c; + PciChipsets *id; + int *retEntities = NULL; + + *foundEntities = NULL; + + + /* Each PCI device will contribute at least one entry. Each device + * section can contribute at most one entry. The sum of the two is + * guaranteed to be larger than the maximum possible number of entries. + * Do this calculation and memory allocation once now to eliminate the + * need for realloc calls inside the loop. + */ + if (!(xf86DoConfigure && xf86DoConfigurePass1)) { + unsigned max_entries = numDevs; + + iter = pci_slot_match_iterator_create(NULL); + while ((pPci = pci_device_next(iter)) != NULL) { + max_entries++; + } + + pci_iterator_destroy(iter); + instances = xnfalloc(max_entries * sizeof(struct Inst)); + } + + iter = pci_slot_match_iterator_create(NULL); + while ((pPci = pci_device_next(iter)) != NULL) { + unsigned device_class = pPci->device_class; + Bool foundVendor = FALSE; + + + /* Convert the pre-PCI 2.0 device class for a VGA adapter to the + * 2.0 version of the same class. + */ + if ( device_class == 0x00000101 ) { + device_class = 0x00030000; + } + + + /* Find PCI devices that match the given vendor ID. The vendor ID is + * either specified explicitly as a parameter to the function or + * implicitly encoded in the high bits of id->PCIid. + * + * The first device with a matching vendor is recorded, even if the + * device ID doesn't match. This is done because the Device section + * in the xorg.conf file can over-ride the device ID. A matching PCI + * ID might not be found now, but after the device ID over-ride is + * applied there /might/ be a match. + */ + for (id = PCIchipsets; id->PCIid != -1; id++) { + const unsigned vendor_id = ((id->PCIid & 0xFFFF0000) >> 16) + | vendorID; + const unsigned device_id = (id->PCIid & 0x0000FFFF); + const unsigned match_class = 0x00030000 | id->PCIid; + + if ((vendor_id == pPci->vendor_id) + || ((vendorID == PCI_VENDOR_GENERIC) && (match_class == device_class))) { + if (!foundVendor && (instances != NULL)) { + ++allocatedInstances; + instances[allocatedInstances - 1].pci = pPci; + instances[allocatedInstances - 1].dev = NULL; + instances[allocatedInstances - 1].claimed = FALSE; + instances[allocatedInstances - 1].foundHW = FALSE; + instances[allocatedInstances - 1].screen = 0; + } + + foundVendor = TRUE; + + if ( (device_id == pPci->device_id) + || ((vendorID == PCI_VENDOR_GENERIC) + && (match_class == device_class)) ) { + if ( instances != NULL ) { + instances[allocatedInstances - 1].foundHW = TRUE; + instances[allocatedInstances - 1].chip = id->numChipset; + } + + + if ( xf86DoConfigure && xf86DoConfigurePass1 ) { + if (xf86CheckPciSlot(pPci)) { + GDevPtr pGDev = + xf86AddBusDeviceToConfigure(drvp->driverName, + BUS_PCI, pPci, -1); + if (pGDev) { + /* After configure pass 1, chipID and chipRev + * are treated as over-rides, so clobber them + * here. + */ + pGDev->chipID = -1; + pGDev->chipRev = -1; + } + + numFound++; + } + } + else { + numFound++; + } + + break; + } + } + } + } + + pci_iterator_destroy(iter); + + + /* In "probe only" or "configure" mode (signaled by instances being NULL), + * our work is done. Return the number of detected devices. + */ + if ( instances == NULL ) { + return numFound; + } + + + /* + * This may be debatable, but if no PCI devices with a matching vendor + * type is found, return zero now. It is probably not desirable to + * allow the config file to override this. + */ + if (allocatedInstances <= 0) { + free(instances); + return 0; + } + + + DebugF("%s instances found: %d\n", driverName, allocatedInstances); + + /* + * Check for devices that need duplicated instances. This is required + * when there is more than one screen per entity. + * + * XXX This currently doesn't work for cases where the BusID isn't + * specified explicitly in the config file. + */ + + for (j = 0; j < numDevs; j++) { + if (devList[j]->screen > 0 && devList[j]->busID + && *devList[j]->busID) { + for (i = 0; i < allocatedInstances; i++) { + pPci = instances[i].pci; + if (xf86ComparePciBusString(devList[j]->busID, + PCI_MAKE_BUS( pPci->domain, pPci->bus ), + pPci->dev, + pPci->func)) { + allocatedInstances++; + instances[allocatedInstances - 1] = instances[i]; + instances[allocatedInstances - 1].screen = devList[j]->screen; + numFound++; + break; + } + } + } + } + + for (i = 0; i < allocatedInstances; i++) { + GDevPtr dev = NULL; + GDevPtr devBus = NULL; + + pPci = instances[i].pci; + for (j = 0; j < numDevs; j++) { + if (devList[j]->busID && *devList[j]->busID) { + if (xf86ComparePciBusString(devList[j]->busID, + PCI_MAKE_BUS( pPci->domain, pPci->bus ), + pPci->dev, + pPci->func) && + devList[j]->screen == instances[i].screen) { + + if (devBus) + xf86MsgVerb(X_WARNING,0, + "%s: More than one matching Device section for " + "instances\n\t(BusID: %s) found: %s\n", + driverName, devList[j]->busID, + devList[j]->identifier); + else + devBus = devList[j]; + } + } else { + /* + * if device section without BusID is found + * only assign to it to the primary device. + */ + if (xf86IsPrimaryPci(pPci)) { + xf86Msg(X_PROBED, "Assigning device section with no busID" + " to primary device\n"); + if (dev || devBus) + xf86MsgVerb(X_WARNING, 0, + "%s: More than one matching Device section " + "found: %s\n", driverName, devList[j]->identifier); + else + dev = devList[j]; + } + } + } + if (devBus) dev = devBus; /* busID preferred */ + if (!dev) { + if (xf86CheckPciSlot(pPci) && pciDeviceHasBars(pPci)) { + xf86MsgVerb(X_WARNING, 0, "%s: No matching Device section " + "for instance (BusID PCI:%u@%u:%u:%u) found\n", + driverName, pPci->domain, pPci->bus, pPci->dev, + pPci->func); + } + } else { + numClaimedInstances++; + instances[i].claimed = TRUE; + instances[i].dev = dev; + } + } + DebugF("%s instances found: %d\n", driverName, numClaimedInstances); + /* + * Now check that a chipset or chipID override in the device section + * is valid. Chipset has precedence over chipID. + * If chipset is not valid ignore BusSlot completely. + */ + for (i = 0; i < allocatedInstances && numClaimedInstances > 0; i++) { + MessageType from = X_PROBED; + + if (!instances[i].claimed) { + continue; + } + if (instances[i].dev->chipset) { + for (c = chipsets; c->token >= 0; c++) { + if (xf86NameCmp(c->name, instances[i].dev->chipset) == 0) + break; + } + if (c->token == -1) { + instances[i].claimed = FALSE; + numClaimedInstances--; + xf86MsgVerb(X_WARNING, 0, "%s: Chipset \"%s\" in Device " + "section \"%s\" isn't valid for this driver\n", + driverName, instances[i].dev->chipset, + instances[i].dev->identifier); + } else { + instances[i].chip = c->token; + + for (id = PCIchipsets; id->numChipset >= 0; id++) { + if (id->numChipset == instances[i].chip) + break; + } + if(id->numChipset >=0){ + xf86Msg(X_CONFIG,"Chipset override: %s\n", + instances[i].dev->chipset); + from = X_CONFIG; + } else { + instances[i].claimed = FALSE; + numClaimedInstances--; + xf86MsgVerb(X_WARNING, 0, "%s: Chipset \"%s\" in Device " + "section \"%s\" isn't a valid PCI chipset\n", + driverName, instances[i].dev->chipset, + instances[i].dev->identifier); + } + } + } else if (instances[i].dev->chipID > 0) { + for (id = PCIchipsets; id->numChipset >= 0; id++) { + if (id->PCIid == instances[i].dev->chipID) + break; + } + if (id->numChipset == -1) { + instances[i].claimed = FALSE; + numClaimedInstances--; + xf86MsgVerb(X_WARNING, 0, "%s: ChipID 0x%04X in Device " + "section \"%s\" isn't valid for this driver\n", + driverName, instances[i].dev->chipID, + instances[i].dev->identifier); + } else { + instances[i].chip = id->numChipset; + + xf86Msg( X_CONFIG,"ChipID override: 0x%04X\n", + instances[i].dev->chipID); + from = X_CONFIG; + } + } else if (!instances[i].foundHW) { + /* + * This means that there was no override and the PCI chipType + * doesn't match one that is supported + */ + instances[i].claimed = FALSE; + numClaimedInstances--; + } + if (instances[i].claimed == TRUE){ + for (c = chipsets; c->token >= 0; c++) { + if (c->token == instances[i].chip) + break; + } + xf86Msg(from,"Chipset %s found\n", + c->name); + } + } + + /* + * Of the claimed instances, check that another driver hasn't already + * claimed its slot. + */ + numFound = 0; + for (i = 0; i < allocatedInstances && numClaimedInstances > 0; i++) { + if (!instances[i].claimed) + continue; + pPci = instances[i].pci; + + + /* + * Allow the same entity to be used more than once for devices with + * multiple screens per entity. This assumes implicitly that there + * will be a screen == 0 instance. + * + * XXX Need to make sure that two different drivers don't claim + * the same screen > 0 instance. + */ + if (instances[i].screen == 0 && !xf86CheckPciSlot( pPci )) + continue; + + DebugF("%s: card at %d:%d:%d is claimed by a Device section\n", + driverName, pPci->bus, pPci->dev, pPci->func); + + /* Allocate an entry in the lists to be returned */ + numFound++; + retEntities = xnfrealloc(retEntities, numFound * sizeof(int)); + retEntities[numFound - 1] = xf86ClaimPciSlot( pPci, drvp, + instances[i].chip, + instances[i].dev, + instances[i].dev->active); + if (retEntities[numFound - 1] == -1 && instances[i].screen > 0) { + for (j = 0; j < xf86NumEntities; j++) { + EntityPtr pEnt = xf86Entities[j]; + if (pEnt->bus.type != BUS_PCI) + continue; + if (pEnt->bus.id.pci == pPci) { + retEntities[numFound - 1] = j; + xf86AddDevToEntity(j, instances[i].dev); + break; + } + } + } + } + free(instances); + if (numFound > 0) { + *foundEntities = retEntities; + } + + return numFound; +} + +/* + * xf86ConfigPciEntityInactive() -- This function can be used + * to configure an inactive entity as well as to reconfigure an + * previously active entity inactive. If the entity has been + * assigned to a screen before it will be removed. If p_chip is + * non-NULL all static resources listed there will be registered. + */ +static void +xf86ConfigPciEntityInactive(EntityInfoPtr pEnt, PciChipsets *p_chip, + EntityProc init, EntityProc enter, + EntityProc leave, pointer private) +{ + ScrnInfoPtr pScrn; + + if ((pScrn = xf86FindScreenForEntity(pEnt->index))) + xf86RemoveEntityFromScreen(pScrn,pEnt->index); + + /* shared resources are only needed when entity is active: remove */ + xf86SetEntityFuncs(pEnt->index,init,enter,leave,private); +} + +ScrnInfoPtr +xf86ConfigPciEntity(ScrnInfoPtr pScrn, int scrnFlag, int entityIndex, + PciChipsets *p_chip, void *dummy, EntityProc init, + EntityProc enter, EntityProc leave, pointer private) +{ + EntityInfoPtr pEnt = xf86GetEntityInfo(entityIndex); + if (!pEnt) return pScrn; + + if (!(pEnt->location.type == BUS_PCI) + || !xf86GetPciInfoForEntity(entityIndex)) { + free(pEnt); + return pScrn; + } + if (!pEnt->active) { + xf86ConfigPciEntityInactive(pEnt, p_chip, init, enter, + leave, private); + free(pEnt); + return pScrn; + } + + if (!pScrn) + pScrn = xf86AllocateScreen(pEnt->driver,scrnFlag); + if (xf86IsEntitySharable(entityIndex)) { + xf86SetEntityShared(entityIndex); + } + xf86AddEntityToScreen(pScrn,entityIndex); + if (xf86IsEntityShared(entityIndex)) { + return pScrn; + } + free(pEnt); + + xf86SetEntityFuncs(entityIndex,init,enter,leave,private); + + return pScrn; +} + +/* + * OBSOLETE ! xf86ConfigActivePciEntity() is an obsolete function. + * It is likely to be removed. Don't use! + */ +Bool +xf86ConfigActivePciEntity(ScrnInfoPtr pScrn, int entityIndex, + PciChipsets *p_chip, void *dummy, EntityProc init, + EntityProc enter, EntityProc leave, pointer private) +{ + EntityInfoPtr pEnt = xf86GetEntityInfo(entityIndex); + if (!pEnt) return FALSE; + + if (!pEnt->active || !(pEnt->location.type == BUS_PCI)) { + free(pEnt); + return FALSE; + } + xf86AddEntityToScreen(pScrn,entityIndex); + + free(pEnt); + if (!xf86SetEntityFuncs(entityIndex,init,enter,leave,private)) + return FALSE; + + return TRUE; +} + +static int +videoPtrToDriverList(struct pci_device *dev, + char *returnList[], int returnListMax) +{ + int i; + /* Add more entries here if we ever return more than 4 drivers for + any device */ + char *driverList[5] = { NULL, NULL, NULL, NULL, NULL }; + + switch (dev->vendor_id) + { + /* AMD Geode LX */ + case 0x1022: + if (dev->device_id == 0x2081) + driverList[0] = "geode"; + break; + /* older Geode products acquired by AMD still carry an NSC vendor_id */ + case 0x100b: + if (dev->device_id == 0x0030) { + /* NSC Geode GX2 specifically */ + driverList[0] = "geode"; + /* GX2 support started its life in the NSC tree and was later + forked by AMD for GEODE so we keep it as a backup */ + driverList[1] = "nsc"; + } else + /* other NSC variant e.g. 0x0104 (SC1400), 0x0504 (SCx200) */ + driverList[0] = "nsc"; + break; + /* Cyrix Geode GX1 */ + case 0x1078: + if (dev->device_id == 0x0104) + driverList[0] = "cyrix"; + break; + case 0x1142: driverList[0] = "apm"; break; + case 0xedd8: driverList[0] = "ark"; break; + case 0x1a03: driverList[0] = "ast"; break; + case 0x1002: driverList[0] = "ati"; break; + case 0x102c: driverList[0] = "chips"; break; + case 0x1013: driverList[0] = "cirrus"; break; + case 0x3d3d: driverList[0] = "glint"; break; + case 0x105d: driverList[0] = "i128"; break; + case 0x8086: + if ((dev->device_id == 0x00d1) || (dev->device_id == 0x7800)) { + driverList[0] = "i740"; + } else if (dev->device_id == 0x8108) { + break; /* "hooray" for poulsbo */ + } else { + driverList[0] = "intel"; + } + break; + case 0x102b: driverList[0] = "mga"; break; + case 0x10c8: driverList[0] = "neomagic"; break; + case 0x10de: case 0x12d2: driverList[0] = "nv"; break; + case 0x1106: driverList[0] = "openchrome"; break; + case 0x1b36: driverList[0] = "qxl"; break; + case 0x1163: driverList[0] = "rendition"; break; + case 0x5333: + switch (dev->device_id) + { + case 0x88d0: case 0x88d1: case 0x88f0: case 0x8811: + case 0x8812: case 0x8814: case 0x8901: + driverList[0] = "s3"; break; + case 0x5631: case 0x883d: case 0x8a01: case 0x8a10: + case 0x8c01: case 0x8c03: case 0x8904: case 0x8a13: + driverList[0] = "s3virge"; break; + default: + driverList[0] = "savage"; break; + } + break; + case 0x1039: driverList[0] = "sis"; break; + case 0x126f: driverList[0] = "siliconmotion"; break; + case 0x121a: + if (dev->device_id < 0x0003) + driverList[0] = "voodoo"; + else + driverList[0] = "tdfx"; + break; + case 0x1011: driverList[0] = "tga"; break; + case 0x1023: driverList[0] = "trident"; break; + case 0x100c: driverList[0] = "tseng"; break; + case 0x80ee: driverList[0] = "vboxvideo"; break; + case 0x15ad: driverList[0] = "vmware"; break; + case 0x18ca: + if (dev->device_id == 0x47) + driverList[0] = "xgixp"; + else + driverList[0] = "xgi"; + break; + default: break; + } + for (i = 0; (i < returnListMax) && (driverList[i] != NULL); i++) { + returnList[i] = xnfstrdup(driverList[i]); + } + return i; /* Number of entries added */ +} + +static int +xchomp(char *line) +{ + size_t len = 0; + + if (!line) { + return 1; + } + + len = strlen(line); + if (line[len - 1] == '\n' && len > 0) { + line[len - 1] = '\0'; + } + return 0; +} + +#ifdef __linux__ +/* This function is used to provide a workaround for binary drivers that + * don't export their PCI ID's properly. If distros don't end up using this + * feature it can and should be removed because the symbol-based resolution + * scheme should be the primary one */ +static void +matchDriverFromFiles (char** matches, uint16_t match_vendor, uint16_t match_chip) +{ + DIR *idsdir; + FILE *fp; + struct dirent *direntry; + char *line = NULL; + size_t len; + ssize_t read; + char path_name[256], vendor_str[5], chip_str[5]; + uint16_t vendor, chip; + int i, j; + + idsdir = opendir(PCI_TXT_IDS_PATH); + if (!idsdir) + return; + + xf86Msg(X_INFO, "Scanning %s directory for additional PCI ID's supported by the drivers\n", PCI_TXT_IDS_PATH); + direntry = readdir(idsdir); + /* Read the directory */ + while (direntry) { + if (direntry->d_name[0] == '.') { + direntry = readdir(idsdir); + continue; + } + len = strlen(direntry->d_name); + /* A tiny bit of sanity checking. We should probably do better */ + if (strncmp(&(direntry->d_name[len-4]), ".ids", 4) == 0) { + /* We need the full path name to open the file */ + strncpy(path_name, PCI_TXT_IDS_PATH, 256); + strncat(path_name, "/", 1); + strncat(path_name, direntry->d_name, (256 - strlen(path_name) - 1)); + fp = fopen(path_name, "r"); + if (fp == NULL) { + xf86Msg(X_ERROR, "Could not open %s for reading. Exiting.\n", path_name); + goto end; + } + /* Read the file */ +#ifdef __GLIBC__ + while ((read = getline(&line, &len, fp)) != -1) { +#else + while ((line = fgetln(fp, &len)) != (char *)NULL) { +#endif /* __GLIBC __ */ + xchomp(line); + if (isdigit(line[0])) { + strncpy(vendor_str, line, 4); + vendor_str[4] = '\0'; + vendor = (int)strtol(vendor_str, NULL, 16); + if ((strlen(&line[4])) == 0) { + chip_str[0] = '\0'; + chip = -1; + } else { + /* Handle trailing whitespace */ + if (isspace(line[4])) { + chip_str[0] = '\0'; + chip = -1; + } else { + /* Ok, it's a real ID */ + strncpy(chip_str, &line[4], 4); + chip_str[4] = '\0'; + chip = (int)strtol(chip_str, NULL, 16); + } + } + if (vendor == match_vendor && chip == match_chip ) { + i = 0; + while (matches[i]) { + i++; + } + matches[i] = (char*)malloc(sizeof(char) * strlen(direntry->d_name) - 3); + if (!matches[i]) { + xf86Msg(X_ERROR, "Could not allocate space for the module name. Exiting.\n"); + goto end; + } + /* hack off the .ids suffix. This should guard + * against other problems, but it will end up + * taking off anything after the first '.' */ + for (j = 0; j < (strlen(direntry->d_name) - 3) ; j++) { + if (direntry->d_name[j] == '.') { + matches[i][j] = '\0'; + break; + } else { + matches[i][j] = direntry->d_name[j]; + } + } + xf86Msg(X_INFO, "Matched %s from file name %s\n", matches[i], direntry->d_name); + } + } else { + /* TODO Handle driver overrides here */ + } + } + fclose(fp); + } + direntry = readdir(idsdir); + } + end: + free(line); + closedir(idsdir); +} +#endif /* __linux__ */ + +/** + * @return The numbers of found devices that match with the current system + * drivers. + */ +int +xf86PciMatchDriver(char* matches[], int nmatches) { + int i; + struct pci_device * info = NULL; + struct pci_device_iterator *iter; + + /* Find the primary device, and get some information about it. */ + iter = pci_slot_match_iterator_create(NULL); + while ((info = pci_device_next(iter)) != NULL) { + if (xf86IsPrimaryPci(info)) { + break; + } + } + + pci_iterator_destroy(iter); + + if (!info) { + ErrorF("Primary device is not PCI\n"); + } +#ifdef __linux__ + else { + matchDriverFromFiles(matches, info->vendor_id, info->device_id); + } +#endif /* __linux__ */ + + for (i = 0; (i < nmatches) && (matches[i]); i++) { + /* find end of matches list */ + } + + if ((info != NULL) && (i < nmatches)) { + i += videoPtrToDriverList(info, &(matches[i]), nmatches - i); + } + + return i; +} diff --git a/xserver/hw/xfree86/common/xf86pciBus.h b/xserver/hw/xfree86/common/xf86pciBus.h index 3125e0db8..3f02b9330 100644 --- a/xserver/hw/xfree86/common/xf86pciBus.h +++ b/xserver/hw/xfree86/common/xf86pciBus.h @@ -34,5 +34,9 @@ #define _XF86_PCI_BUS_H void xf86PciProbe(void); +Bool xf86PciAddMatchingDev(DriverPtr drvp); +Bool xf86PciProbeDev(DriverPtr drvp); +void xf86PciIsolateDevice(char *argument); +int xf86PciMatchDriver(char* matches[], int nmatches); #endif /* _XF86_PCI_BUS_H */ diff --git a/xserver/hw/xfree86/common/xf86sbusBus.c b/xserver/hw/xfree86/common/xf86sbusBus.c index 7b23233aa..fe3f0a84a 100644 --- a/xserver/hw/xfree86/common/xf86sbusBus.c +++ b/xserver/hw/xfree86/common/xf86sbusBus.c @@ -85,7 +85,7 @@ xf86SbusProbe(void) char fbDevName[32]; sbusDevicePtr psdp, *psdpp; - xf86SbusInfo = xalloc(sizeof(psdp)); + xf86SbusInfo = malloc(sizeof(psdp)); *xf86SbusInfo = NULL; for (i = 0; i < 32; i++) { sprintf(fbDevName, "/dev/fb%d", i); @@ -210,7 +210,7 @@ xf86SbusProbe(void) promPath = sparcPromNode2Pathname (&psdp->node); if (promPath) { xf86ErrorF(" at %s", promPath); - xfree(promPath); + free(promPath); } } else xf86Msg(X_PROBED, "SBUS: %s", psdp->descr); @@ -397,7 +397,7 @@ xf86MatchSbusInstances(const char *driverName, int sbusDevId, * allow the config file to override this. */ if (allocatedInstances <= 0) { - xfree(instances); + free(instances); return 0; } @@ -419,7 +419,7 @@ xf86MatchSbusInstances(const char *driverName, int sbusDevId, pGDev->chipID = pGDev->chipRev = -1; } } - xfree(instances); + free(instances); if (useProm) sparcPromClose(); return actualcards; @@ -478,8 +478,7 @@ xf86MatchSbusInstances(const char *driverName, int sbusDevId, instances[i].claimed = TRUE; instances[i].dev = dev; } - if (promPath) - xfree(promPath); + free(promPath); } DebugF("%s instances found: %d\n", driverName, numClaimedInstances); @@ -506,7 +505,7 @@ xf86MatchSbusInstances(const char *driverName, int sbusDevId, = xf86ClaimSbusSlot(psdp, drvp, instances[i].dev,instances[i].dev->active ? TRUE : FALSE); } - xfree(instances); + free(instances); if (numFound > 0) { *foundEntities = retEntities; } @@ -531,7 +530,7 @@ xf86GetSbusInfoForEntity(int entityIndex) for (psdpp = xf86SbusInfo; *psdpp != NULL; psdpp++) { if (p->bus.id.sbus.fbNum == (*psdpp)->fbNum) - return (*psdpp); + return *psdpp; } return NULL; } @@ -607,7 +606,7 @@ xf86SbusCmapLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices, int i, index; sbusCmapPtr cmap; struct fbcmap fbcmap; - unsigned char *data = xalloc(numColors*3); + unsigned char *data = malloc(numColors*3); cmap = SBUSCMAPPTR(pScrn->pScreen); if (!cmap) return; @@ -628,7 +627,7 @@ xf86SbusCmapLoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices, fbcmap.blue[fbcmap.count++] = colors[index].blue; } ioctl (cmap->psdp->fd, FBIOPUTCMAP, &fbcmap); - xfree(data); + free(data); } static Bool @@ -647,7 +646,7 @@ xf86SbusCmapCloseScreen(int i, ScreenPtr pScreen) ioctl (cmap->psdp->fd, FBIOPUTCMAP, &fbcmap); } pScreen->CloseScreen = cmap->CloseScreen; - xfree (cmap); + free(cmap); return (*pScreen->CloseScreen) (i, pScreen); } diff --git a/xserver/hw/xfree86/common/xf86str.h b/xserver/hw/xfree86/common/xf86str.h index de1f1b60a..c9b261d66 100644 --- a/xserver/hw/xfree86/common/xf86str.h +++ b/xserver/hw/xfree86/common/xf86str.h @@ -338,7 +338,6 @@ typedef struct _DriverRec { /* Tolerate prior #include */ #if defined(linux) && defined(_INPUT_H) #undef BUS_NONE -#undef BUS_ISA #undef BUS_PCI #undef BUS_SBUS #undef BUS_last @@ -346,7 +345,6 @@ typedef struct _DriverRec { typedef enum { BUS_NONE, - BUS_ISA, BUS_PCI, BUS_SBUS, BUS_last /* Keep last */ @@ -408,6 +406,7 @@ typedef struct { char * driver; pointer commonOptions; pointer extraOptions; + InputAttributes *attrs; } IDevRec, *IDevPtr; typedef struct { diff --git a/xserver/hw/xfree86/common/xf86xv.c b/xserver/hw/xfree86/common/xf86xv.c index bdcc4fc2b..c1d319976 100644 --- a/xserver/hw/xfree86/common/xf86xv.c +++ b/xserver/hw/xfree86/common/xf86xv.c @@ -110,10 +110,11 @@ static void xf86XVAdjustFrame(int index, int x, int y, int flags); static Bool xf86XVInitAdaptors(ScreenPtr, XF86VideoAdaptorPtr*, int); -static int XF86XVWindowKeyIndex; -static DevPrivateKey XF86XVWindowKey = &XF86XVWindowKeyIndex; -static int XF86XvScreenKeyIndex; -DevPrivateKey XF86XvScreenKey = &XF86XvScreenKeyIndex; +static DevPrivateKeyRec XF86XVWindowKeyRec; +#define XF86XVWindowKey (&XF86XVWindowKeyRec) + +DevPrivateKey XF86XvScreenKey; + static unsigned long PortResource = 0; DevPrivateKey (*XvGetScreenKeyProc)(void) = NULL; @@ -138,7 +139,7 @@ xf86XVRegisterGenericAdaptorDriver( ){ xf86XVInitGenericAdaptorPtr *newdrivers; - newdrivers = xrealloc(GenDrivers, sizeof(xf86XVInitGenericAdaptorPtr) * + newdrivers = realloc(GenDrivers, sizeof(xf86XVInitGenericAdaptorPtr) * (1 + NumGenDrivers)); if (!newdrivers) return 0; @@ -168,7 +169,7 @@ xf86XVListGenericAdaptors( n = (*GenDrivers[i])(pScrn, &DrivAdap); if (0 == n) continue; - new = xrealloc(*adaptors, sizeof(XF86VideoAdaptorPtr) * (num+n)); + new = realloc(*adaptors, sizeof(XF86VideoAdaptorPtr) * (num+n)); if (NULL == new) continue; *adaptors = new; @@ -186,7 +187,9 @@ typedef struct { int num; } OffscreenImageRec; -static OffscreenImageRec OffscreenImages[MAXSCREENS]; +static DevPrivateKeyRec OffscreenPrivateKeyRec; +#define OffscreenPrivateKey (&OffscreenPrivateKeyRec) +#define GetOffscreenImage(pScreen) ((OffscreenImageRec *) dixLookupPrivate(&(pScreen)->devPrivates, OffscreenPrivateKey)) Bool xf86XVRegisterOffscreenImages( @@ -194,9 +197,18 @@ xf86XVRegisterOffscreenImages( XF86OffscreenImagePtr images, int num ){ - OffscreenImages[pScreen->myNum].num = num; - OffscreenImages[pScreen->myNum].images = images; + OffscreenImageRec *OffscreenImage; + /* This function may be called before xf86XVScreenInit, so there's + * no better place than this to call dixRegisterPrivateKey to ensure we + * have space reserved. After the first call it is a no-op. */ + if(!dixRegisterPrivateKey(OffscreenPrivateKey, PRIVATE_SCREEN, sizeof(OffscreenImageRec)) || + !(OffscreenImage = GetOffscreenImage(pScreen))) + /* Every X.org driver assumes this function always succeeds, so + * just die on allocation failure. */ + FatalError("Could not allocate private storage for XV offscreen images.\n"); + OffscreenImage->num = num; + OffscreenImage->images = images; return TRUE; } @@ -205,21 +217,22 @@ xf86XVQueryOffscreenImages( ScreenPtr pScreen, int *num ){ - *num = OffscreenImages[pScreen->myNum].num; - return OffscreenImages[pScreen->myNum].images; + OffscreenImageRec *OffscreenImage = GetOffscreenImage(pScreen); + *num = OffscreenImage->num; + return OffscreenImage->images; } XF86VideoAdaptorPtr xf86XVAllocateVideoAdaptorRec(ScrnInfoPtr pScrn) { - return xcalloc(1, sizeof(XF86VideoAdaptorRec)); + return calloc(1, sizeof(XF86VideoAdaptorRec)); } void xf86XVFreeVideoAdaptorRec(XF86VideoAdaptorPtr ptr) { - xfree(ptr); + free(ptr); } @@ -239,7 +252,11 @@ xf86XVScreenInit( if(Success != (*XvScreenInitProc)(pScreen)) return FALSE; + if (!dixRegisterPrivateKey(&XF86XVWindowKeyRec, PRIVATE_WINDOW, 0)) + return FALSE; + XF86XvScreenKey = (*XvGetScreenKeyProc)(); + PortResource = (*XvGetRTPortProc)(); pxvs = GET_XV_SCREEN(pScreen); @@ -255,7 +272,7 @@ xf86XVScreenInit( a CloseScreen hook so that we don't have to wrap it. I'm not sure that I appreciate that. */ - ScreenPriv = xalloc(sizeof(XF86XVScreenRec)); + ScreenPriv = malloc(sizeof(XF86XVScreenRec)); pxvs->devPriv.ptr = (pointer)ScreenPriv; if(!ScreenPriv) return FALSE; @@ -290,17 +307,17 @@ xf86XVFreeAdaptor(XvAdaptorPtr pAdaptor) { int i; - xfree(pAdaptor->name); + free(pAdaptor->name); if(pAdaptor->pEncodings) { XvEncodingPtr pEncode = pAdaptor->pEncodings; for(i = 0; i < pAdaptor->nEncodings; i++, pEncode++) - xfree(pEncode->name); - xfree(pAdaptor->pEncodings); + free(pEncode->name); + free(pAdaptor->pEncodings); } - xfree(pAdaptor->pFormats); + free(pAdaptor->pFormats); if(pAdaptor->pPorts) { XvPortPtr pPort = pAdaptor->pPorts; @@ -310,25 +327,25 @@ xf86XVFreeAdaptor(XvAdaptorPtr pAdaptor) pPriv = (XvPortRecPrivatePtr)pPort->devPriv.ptr; if(pPriv) { if(pPriv->clientClip) - REGION_DESTROY(pAdaptor->pScreen, pPriv->clientClip); + RegionDestroy(pPriv->clientClip); if(pPriv->pCompositeClip && pPriv->FreeCompositeClip) - REGION_DESTROY(pAdaptor->pScreen, pPriv->pCompositeClip); - xfree(pPriv); + RegionDestroy(pPriv->pCompositeClip); + free(pPriv); } } - xfree(pAdaptor->pPorts); + free(pAdaptor->pPorts); } if(pAdaptor->nAttributes) { XvAttributePtr pAttribute = pAdaptor->pAttributes; for(i = 0; i < pAdaptor->nAttributes; i++, pAttribute++) - xfree(pAttribute->name); - xfree(pAdaptor->pAttributes); + free(pAttribute->name); + free(pAdaptor->pAttributes); } - xfree(pAdaptor->pImages); - xfree(pAdaptor->devPriv.ptr); + free(pAdaptor->pImages); + free(pAdaptor->devPriv.ptr); } static Bool @@ -362,7 +379,7 @@ xf86XVInitAdaptors( pxvs->nAdaptors = 0; pxvs->pAdaptors = NULL; - if(!(pAdaptor = xcalloc(number, sizeof(XvAdaptorRec)))) + if(!(pAdaptor = calloc(number, sizeof(XvAdaptorRec)))) return FALSE; for(pa = pAdaptor, na = 0, numAdaptor = 0; na < number; na++, adaptorPtr++) { @@ -412,18 +429,18 @@ xf86XVInitAdaptors( pa->ddGetPortAttribute = xf86XVGetPortAttribute; pa->ddQueryBestSize = xf86XVQueryBestSize; pa->ddQueryImageAttributes = xf86XVQueryImageAttributes; - if((pa->name = xalloc(strlen(adaptorPtr->name) + 1))) + if((pa->name = malloc(strlen(adaptorPtr->name) + 1))) strcpy(pa->name, adaptorPtr->name); if(adaptorPtr->nEncodings && - (pEncode = xcalloc(adaptorPtr->nEncodings, sizeof(XvEncodingRec)))) { + (pEncode = calloc(adaptorPtr->nEncodings, sizeof(XvEncodingRec)))) { for(pe = pEncode, encodingPtr = adaptorPtr->pEncodings, i = 0; i < adaptorPtr->nEncodings; pe++, i++, encodingPtr++) { pe->id = encodingPtr->id; pe->pScreen = pScreen; - if((pe->name = xalloc(strlen(encodingPtr->name) + 1))) + if((pe->name = malloc(strlen(encodingPtr->name) + 1))) strcpy(pe->name, encodingPtr->name); pe->width = encodingPtr->width; pe->height = encodingPtr->height; @@ -435,7 +452,7 @@ xf86XVInitAdaptors( } if(adaptorPtr->nImages && - (pImage = xcalloc(adaptorPtr->nImages, sizeof(XvImageRec)))) { + (pImage = calloc(adaptorPtr->nImages, sizeof(XvImageRec)))) { for(i = 0, pi = pImage, imagePtr = adaptorPtr->pImages; i < adaptorPtr->nImages; i++, pi++, imagePtr++) @@ -468,7 +485,7 @@ xf86XVInitAdaptors( } if(adaptorPtr->nAttributes && - (pAttribute = xcalloc(adaptorPtr->nAttributes, sizeof(XvAttributeRec)))) + (pAttribute = calloc(adaptorPtr->nAttributes, sizeof(XvAttributeRec)))) { for(pat = pAttribute, attributePtr = adaptorPtr->pAttributes, i = 0; i < adaptorPtr->nAttributes; pat++, i++, attributePtr++) @@ -476,7 +493,7 @@ xf86XVInitAdaptors( pat->flags = attributePtr->flags; pat->min_value = attributePtr->min_value; pat->max_value = attributePtr->max_value; - if((pat->name = xalloc(strlen(attributePtr->name) + 1))) + if((pat->name = malloc(strlen(attributePtr->name) + 1))) strcpy(pat->name, attributePtr->name); } pa->nAttributes = adaptorPtr->nAttributes; @@ -486,7 +503,7 @@ xf86XVInitAdaptors( totFormat = adaptorPtr->nFormats; - if(!(pFormat = xcalloc(totFormat, sizeof(XvFormatRec)))) { + if(!(pFormat = calloc(totFormat, sizeof(XvFormatRec)))) { xf86XVFreeAdaptor(pa); continue; } @@ -503,7 +520,7 @@ xf86XVInitAdaptors( if(numFormat >= totFormat) { void *moreSpace; totFormat *= 2; - moreSpace = xrealloc(pFormat, + moreSpace = realloc(pFormat, totFormat * sizeof(XvFormatRec)); if(!moreSpace) break; pFormat = moreSpace; @@ -526,7 +543,7 @@ xf86XVInitAdaptors( continue; } - if(!(adaptorPriv = xcalloc(1, sizeof(XvAdaptorRecPrivate)))) { + if(!(adaptorPriv = calloc(1, sizeof(XvAdaptorRecPrivate)))) { xf86XVFreeAdaptor(pa); continue; } @@ -546,7 +563,7 @@ xf86XVInitAdaptors( pa->devPriv.ptr = (pointer)adaptorPriv; - if(!(pPort = xcalloc(adaptorPtr->nPorts, sizeof(XvPortRec)))) { + if(!(pPort = calloc(adaptorPtr->nPorts, sizeof(XvPortRec)))) { xf86XVFreeAdaptor(pa); continue; } @@ -556,11 +573,11 @@ xf86XVInitAdaptors( if(!(pp->id = FakeClientID(0))) continue; - if(!(portPriv = xcalloc(1, sizeof(XvPortRecPrivate)))) + if(!(portPriv = calloc(1, sizeof(XvPortRecPrivate)))) continue; if(!AddResource(pp->id, PortResource, pp)) { - xfree(portPriv); + free(portPriv); continue; } @@ -596,7 +613,7 @@ xf86XVInitAdaptors( pxvs->nAdaptors = numAdaptor; pxvs->pAdaptors = pAdaptor; } else { - xfree(pAdaptor); + free(pAdaptor); return FALSE; } @@ -624,14 +641,12 @@ xf86XVUpdateCompositeClip(XvPortRecPrivatePtr portPriv) { RegionPtr pregWin, pCompositeClip; WindowPtr pWin; - ScreenPtr pScreen; Bool freeCompClip = FALSE; if(portPriv->pCompositeClip) return; pWin = (WindowPtr)portPriv->pDraw; - pScreen = pWin->drawable.pScreen; /* get window clip list */ if(portPriv->subWindowMode == IncludeInferiors) { @@ -646,18 +661,18 @@ xf86XVUpdateCompositeClip(XvPortRecPrivatePtr portPriv) return; } - pCompositeClip = REGION_CREATE(pScreen, NullBox, 1); - REGION_COPY(pScreen, pCompositeClip, portPriv->clientClip); - REGION_TRANSLATE(pScreen, pCompositeClip, + pCompositeClip = RegionCreate(NullBox, 1); + RegionCopy(pCompositeClip, portPriv->clientClip); + RegionTranslate(pCompositeClip, portPriv->pDraw->x + portPriv->clipOrg.x, portPriv->pDraw->y + portPriv->clipOrg.y); - REGION_INTERSECT(pScreen, pCompositeClip, pregWin, pCompositeClip); + RegionIntersect(pCompositeClip, pregWin, pCompositeClip); portPriv->pCompositeClip = pCompositeClip; portPriv->FreeCompositeClip = TRUE; if(freeCompClip) { - REGION_DESTROY(pScreen, pregWin); + RegionDestroy(pregWin); } } @@ -672,17 +687,17 @@ xf86XVCopyClip( /* copy the new clip if it exists */ if((pGC->clientClipType == CT_REGION) && pGC->clientClip) { if(!portPriv->clientClip) - portPriv->clientClip = REGION_CREATE(pScreen, NullBox, 1); + portPriv->clientClip = RegionCreate(NullBox, 1); /* Note: this is in window coordinates */ - REGION_COPY(pScreen, portPriv->clientClip, pGC->clientClip); + RegionCopy(portPriv->clientClip, pGC->clientClip); } else if(portPriv->clientClip) { /* free the old clientClip */ - REGION_DESTROY(pScreen, portPriv->clientClip); + RegionDestroy(portPriv->clientClip); portPriv->clientClip = NULL; } /* get rid of the old clip list */ if(portPriv->pCompositeClip && portPriv->FreeCompositeClip) { - REGION_DESTROY(pScreen, portPriv->pCompositeClip); + RegionDestroy(portPriv->pCompositeClip); } portPriv->clipOrg = pGC->clipOrg; @@ -697,11 +712,9 @@ xf86XVRegetVideo(XvPortRecPrivatePtr portPriv) RegionRec WinRegion; RegionRec ClipRegion; BoxRec WinBox; - ScreenPtr pScreen; int ret = Success; Bool clippedAway = FALSE; - pScreen = portPriv->pDraw->pScreen; xf86XVUpdateCompositeClip(portPriv); /* translate the video region to the screen */ @@ -711,18 +724,18 @@ xf86XVRegetVideo(XvPortRecPrivatePtr portPriv) WinBox.y2 = WinBox.y1 + portPriv->drw_h; /* clip to the window composite clip */ - REGION_INIT(pScreen, &WinRegion, &WinBox, 1); - REGION_NULL(pScreen, &ClipRegion); - REGION_INTERSECT(pScreen, &ClipRegion, &WinRegion, portPriv->pCompositeClip); + RegionInit(&WinRegion, &WinBox, 1); + RegionNull(&ClipRegion); + RegionIntersect(&ClipRegion, &WinRegion, portPriv->pCompositeClip); /* that's all if it's totally obscured */ - if(!REGION_NOTEMPTY(pScreen, &ClipRegion)) { + if(!RegionNotEmpty(&ClipRegion)) { clippedAway = TRUE; goto CLIP_VIDEO_BAILOUT; } if(portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) { - REGION_SUBTRACT(pScreen, &ClipRegion, &WinRegion, &ClipRegion); + RegionSubtract(&ClipRegion, &WinRegion, &ClipRegion); } ret = (*portPriv->AdaptorRec->GetVideo)(portPriv->pScrn, @@ -748,8 +761,8 @@ CLIP_VIDEO_BAILOUT: if(!portPriv->FreeCompositeClip) portPriv->pCompositeClip = NULL; - REGION_UNINIT(pScreen, &WinRegion); - REGION_UNINIT(pScreen, &ClipRegion); + RegionUninit(&WinRegion); + RegionUninit(&ClipRegion); return ret; } @@ -761,12 +774,9 @@ xf86XVReputVideo(XvPortRecPrivatePtr portPriv) RegionRec WinRegion; RegionRec ClipRegion; BoxRec WinBox; - ScreenPtr pScreen; int ret = Success; Bool clippedAway = FALSE; - pScreen = portPriv->pDraw->pScreen; - xf86XVUpdateCompositeClip(portPriv); /* translate the video region to the screen */ @@ -776,9 +786,9 @@ xf86XVReputVideo(XvPortRecPrivatePtr portPriv) WinBox.y2 = WinBox.y1 + portPriv->drw_h; /* clip to the window composite clip */ - REGION_INIT(pScreen, &WinRegion, &WinBox, 1); - REGION_NULL(pScreen, &ClipRegion); - REGION_INTERSECT(pScreen, &ClipRegion, &WinRegion, portPriv->pCompositeClip); + RegionInit(&WinRegion, &WinBox, 1); + RegionNull(&ClipRegion); + RegionIntersect(&ClipRegion, &WinRegion, portPriv->pCompositeClip); /* clip and translate to the viewport */ if(portPriv->AdaptorRec->flags & VIDEO_CLIP_TO_VIEWPORT) { @@ -790,21 +800,21 @@ xf86XVReputVideo(XvPortRecPrivatePtr portPriv) VPBox.x2 = portPriv->pScrn->frameX1 + 1; VPBox.y2 = portPriv->pScrn->frameY1 + 1; - REGION_INIT(pScreen, &VPReg, &VPBox, 1); - REGION_INTERSECT(pScreen, &ClipRegion, &ClipRegion, &VPReg); - REGION_UNINIT(pScreen, &VPReg); + RegionInit(&VPReg, &VPBox, 1); + RegionIntersect(&ClipRegion, &ClipRegion, &VPReg); + RegionUninit(&VPReg); } /* that's all if it's totally obscured */ - if(!REGION_NOTEMPTY(pScreen, &ClipRegion)) { + if(!RegionNotEmpty(&ClipRegion)) { clippedAway = TRUE; goto CLIP_VIDEO_BAILOUT; } /* bailout if we have to clip but the hardware doesn't support it */ if(portPriv->AdaptorRec->flags & VIDEO_NO_CLIPPING) { - BoxPtr clipBox = REGION_RECTS(&ClipRegion); - if( (REGION_NUM_RECTS(&ClipRegion) != 1) || + BoxPtr clipBox = RegionRects(&ClipRegion); + if( (RegionNumRects(&ClipRegion) != 1) || (clipBox->x1 != WinBox.x1) || (clipBox->x2 != WinBox.x2) || (clipBox->y1 != WinBox.y1) || (clipBox->y2 != WinBox.y2)) { @@ -814,7 +824,7 @@ xf86XVReputVideo(XvPortRecPrivatePtr portPriv) } if(portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) { - REGION_SUBTRACT(pScreen, &ClipRegion, &WinRegion, &ClipRegion); + RegionSubtract(&ClipRegion, &WinRegion, &ClipRegion); } ret = (*portPriv->AdaptorRec->PutVideo)(portPriv->pScrn, @@ -839,8 +849,8 @@ CLIP_VIDEO_BAILOUT: if(!portPriv->FreeCompositeClip) portPriv->pCompositeClip = NULL; - REGION_UNINIT(pScreen, &WinRegion); - REGION_UNINIT(pScreen, &ClipRegion); + RegionUninit(&WinRegion); + RegionUninit(&ClipRegion); return ret; } @@ -851,12 +861,9 @@ xf86XVReputImage(XvPortRecPrivatePtr portPriv) RegionRec WinRegion; RegionRec ClipRegion; BoxRec WinBox; - ScreenPtr pScreen; int ret = Success; Bool clippedAway = FALSE; - pScreen = portPriv->pDraw->pScreen; - xf86XVUpdateCompositeClip(portPriv); /* translate the video region to the screen */ @@ -866,9 +873,9 @@ xf86XVReputImage(XvPortRecPrivatePtr portPriv) WinBox.y2 = WinBox.y1 + portPriv->drw_h; /* clip to the window composite clip */ - REGION_INIT(pScreen, &WinRegion, &WinBox, 1); - REGION_NULL(pScreen, &ClipRegion); - REGION_INTERSECT(pScreen, &ClipRegion, &WinRegion, portPriv->pCompositeClip); + RegionInit(&WinRegion, &WinBox, 1); + RegionNull(&ClipRegion); + RegionIntersect(&ClipRegion, &WinRegion, portPriv->pCompositeClip); /* clip and translate to the viewport */ if(portPriv->AdaptorRec->flags & VIDEO_CLIP_TO_VIEWPORT) { @@ -880,21 +887,21 @@ xf86XVReputImage(XvPortRecPrivatePtr portPriv) VPBox.x2 = portPriv->pScrn->frameX1 + 1; VPBox.y2 = portPriv->pScrn->frameY1 + 1; - REGION_INIT(pScreen, &VPReg, &VPBox, 1); - REGION_INTERSECT(pScreen, &ClipRegion, &ClipRegion, &VPReg); - REGION_UNINIT(pScreen, &VPReg); + RegionInit(&VPReg, &VPBox, 1); + RegionIntersect(&ClipRegion, &ClipRegion, &VPReg); + RegionUninit(&VPReg); } /* that's all if it's totally obscured */ - if(!REGION_NOTEMPTY(pScreen, &ClipRegion)) { + if(!RegionNotEmpty(&ClipRegion)) { clippedAway = TRUE; goto CLIP_VIDEO_BAILOUT; } /* bailout if we have to clip but the hardware doesn't support it */ if(portPriv->AdaptorRec->flags & VIDEO_NO_CLIPPING) { - BoxPtr clipBox = REGION_RECTS(&ClipRegion); - if( (REGION_NUM_RECTS(&ClipRegion) != 1) || + BoxPtr clipBox = RegionRects(&ClipRegion); + if( (RegionNumRects(&ClipRegion) != 1) || (clipBox->x1 != WinBox.x1) || (clipBox->x2 != WinBox.x2) || (clipBox->y1 != WinBox.y1) || (clipBox->y2 != WinBox.y2)) { @@ -904,7 +911,7 @@ xf86XVReputImage(XvPortRecPrivatePtr portPriv) } if(portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) { - REGION_SUBTRACT(pScreen, &ClipRegion, &WinRegion, &ClipRegion); + RegionSubtract(&ClipRegion, &WinRegion, &ClipRegion); } ret = (*portPriv->AdaptorRec->ReputImage)(portPriv->pScrn, @@ -926,8 +933,8 @@ CLIP_VIDEO_BAILOUT: if(!portPriv->FreeCompositeClip) portPriv->pCompositeClip = NULL; - REGION_UNINIT(pScreen, &WinRegion); - REGION_UNINIT(pScreen, &ClipRegion); + RegionUninit(&WinRegion); + RegionUninit(&ClipRegion); return ret; } @@ -964,7 +971,7 @@ xf86XVEnlistPortInWindow(WindowPtr pWin, XvPortRecPrivatePtr portPriv) } if(!winPriv) { - winPriv = xcalloc(1, sizeof(XF86XVWindowRec)); + winPriv = calloc(1, sizeof(XF86XVWindowRec)); if(!winPriv) return BadAlloc; winPriv->PortRec = portPriv; winPriv->next = PrivRoot; @@ -991,7 +998,7 @@ xf86XVRemovePortFromWindow(WindowPtr pWin, XvPortRecPrivatePtr portPriv) else dixSetPrivate(&pWin->devPrivates, XF86XVWindowKey, winPriv->next); - xfree(winPriv); + free(winPriv); break; } prevPriv = winPriv; @@ -1025,7 +1032,7 @@ xf86XVDestroyWindow(WindowPtr pWin) FreeGC(WinPriv->pGC, 0); } WinPriv = WinPriv->next; - xfree(tmp); + free(tmp); } dixSetPrivate(&pWin->devPrivates, XF86XVWindowKey, NULL); @@ -1048,7 +1055,7 @@ xf86XVWindowExposures(WindowPtr pWin, RegionPtr reg1, RegionPtr reg2) XvPortRecPrivatePtr pPriv; Bool AreasExposed; - AreasExposed = (WinPriv && reg1 && REGION_NOTEMPTY(pScreen, reg1)); + AreasExposed = (WinPriv && reg1 && RegionNotEmpty(reg1)); pScreen->WindowExposures = ScreenPriv->WindowExposures; (*pScreen->WindowExposures)(pWin, reg1, reg2); @@ -1091,7 +1098,7 @@ xf86XVWindowExposures(WindowPtr pWin, RegionPtr reg1, RegionPtr reg2) pPrev->next = WinPriv->next; tmp = WinPriv; WinPriv = WinPriv->next; - xfree(tmp); + free(tmp); continue; } break; @@ -1119,7 +1126,7 @@ xf86XVClipNotify(WindowPtr pWin, int dx, int dy) if(!pPriv) goto next; if(pPriv->pCompositeClip && pPriv->FreeCompositeClip) - REGION_DESTROY(pScreen, pPriv->pCompositeClip); + RegionDestroy(pPriv->pCompositeClip); pPriv->pCompositeClip = NULL; @@ -1147,7 +1154,7 @@ xf86XVClipNotify(WindowPtr pWin, int dx, int dy) pPrev->next = WinPriv->next; tmp = WinPriv; WinPriv = WinPriv->next; - xfree(tmp); + free(tmp); continue; } } @@ -1177,9 +1184,6 @@ xf86XVCloseScreen(int i, ScreenPtr pScreen) XvAdaptorPtr pa; int c; - /* Clear offscreen images */ - memset(&OffscreenImages[pScreen->myNum], 0, sizeof(OffscreenImages[0])); - if(!ScreenPriv) return TRUE; if(ScreenPriv->videoGC) { @@ -1199,8 +1203,8 @@ xf86XVCloseScreen(int i, ScreenPtr pScreen) xf86XVFreeAdaptor(pa); } - xfree(pxvs->pAdaptors); - xfree(ScreenPriv); + free(pxvs->pAdaptors); + free(ScreenPriv); return TRUE; } @@ -1216,7 +1220,7 @@ xf86XVQueryAdaptors( *p_nAdaptors = pxvs->nAdaptors; *p_pAdaptors = pxvs->pAdaptors; - return (Success); + return Success; } @@ -1225,11 +1229,15 @@ xf86XVQueryAdaptors( static Bool xf86XVEnterVT(int index, int flags) { + ScrnInfoPtr pScrn = xf86Screens[index]; ScreenPtr pScreen = screenInfo.screens[index]; XF86XVScreenPtr ScreenPriv = GET_XF86XV_SCREEN(pScreen); Bool ret; + pScrn->EnterVT = ScreenPriv->EnterVT; ret = (*ScreenPriv->EnterVT)(index, flags); + ScreenPriv->EnterVT = pScrn->EnterVT; + pScrn->EnterVT = xf86XVEnterVT; if(ret) WalkTree(pScreen, xf86XVReputAllVideo, 0); @@ -1239,6 +1247,7 @@ xf86XVEnterVT(int index, int flags) static void xf86XVLeaveVT(int index, int flags) { + ScrnInfoPtr pScrn = xf86Screens[index]; ScreenPtr pScreen = screenInfo.screens[index]; XvScreenPtr pxvs = GET_XV_SCREEN(pScreen); XF86XVScreenPtr ScreenPriv = GET_XF86XV_SCREEN(pScreen); @@ -1259,7 +1268,7 @@ xf86XVLeaveVT(int index, int flags) pPriv->isOn = XV_OFF; if(pPriv->pCompositeClip && pPriv->FreeCompositeClip) - REGION_DESTROY(pScreen, pPriv->pCompositeClip); + RegionDestroy(pPriv->pCompositeClip); pPriv->pCompositeClip = NULL; @@ -1270,7 +1279,10 @@ xf86XVLeaveVT(int index, int flags) } } + pScrn->LeaveVT = ScreenPriv->LeaveVT; (*ScreenPriv->LeaveVT)(index, flags); + ScreenPriv->LeaveVT = pScrn->LeaveVT; + pScrn->LeaveVT = xf86XVLeaveVT; } static void @@ -1300,7 +1312,7 @@ xf86XVAdjustFrame(int index, int x, int y, int flags) if(!pPriv->type && (pPriv->isOn != XV_OFF)) { /* overlaid still/image */ if(pPriv->pCompositeClip && pPriv->FreeCompositeClip) - REGION_DESTROY(pScreen, pPriv->pCompositeClip); + RegionDestroy(pPriv->pCompositeClip); pPriv->pCompositeClip = NULL; @@ -1404,7 +1416,6 @@ xf86XVPutStill( CARD16 drw_w, CARD16 drw_h ){ XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr)(pPort->devPriv.ptr); - ScreenPtr pScreen; RegionRec WinRegion; RegionRec ClipRegion; BoxRec WinBox; @@ -1416,16 +1427,14 @@ xf86XVPutStill( if(!portPriv->pScrn->vtSema) return Success; /* Success ? */ - pScreen = pDraw->pScreen; - WinBox.x1 = pDraw->x + drw_x; WinBox.y1 = pDraw->y + drw_y; WinBox.x2 = WinBox.x1 + drw_w; WinBox.y2 = WinBox.y1 + drw_h; - REGION_INIT(pScreen, &WinRegion, &WinBox, 1); - REGION_NULL(pScreen, &ClipRegion); - REGION_INTERSECT(pScreen, &ClipRegion, &WinRegion, pGC->pCompositeClip); + RegionInit(&WinRegion, &WinBox, 1); + RegionNull(&ClipRegion); + RegionIntersect(&ClipRegion, &WinRegion, pGC->pCompositeClip); if(portPriv->AdaptorRec->flags & VIDEO_CLIP_TO_VIEWPORT) { RegionRec VPReg; @@ -1436,23 +1445,23 @@ xf86XVPutStill( VPBox.x2 = portPriv->pScrn->frameX1 + 1; VPBox.y2 = portPriv->pScrn->frameY1 + 1; - REGION_INIT(pScreen, &VPReg, &VPBox, 1); - REGION_INTERSECT(pScreen, &ClipRegion, &ClipRegion, &VPReg); - REGION_UNINIT(pScreen, &VPReg); + RegionInit(&VPReg, &VPBox, 1); + RegionIntersect(&ClipRegion, &ClipRegion, &VPReg); + RegionUninit(&VPReg); } if(portPriv->pDraw) { xf86XVRemovePortFromWindow((WindowPtr)(portPriv->pDraw), portPriv); } - if(!REGION_NOTEMPTY(pScreen, &ClipRegion)) { + if(!RegionNotEmpty(&ClipRegion)) { clippedAway = TRUE; goto PUT_STILL_BAILOUT; } if(portPriv->AdaptorRec->flags & VIDEO_NO_CLIPPING) { - BoxPtr clipBox = REGION_RECTS(&ClipRegion); - if( (REGION_NUM_RECTS(&ClipRegion) != 1) || + BoxPtr clipBox = RegionRects(&ClipRegion); + if( (RegionNumRects(&ClipRegion) != 1) || (clipBox->x1 != WinBox.x1) || (clipBox->x2 != WinBox.x2) || (clipBox->y1 != WinBox.y1) || (clipBox->y2 != WinBox.y2)) { @@ -1462,7 +1471,7 @@ xf86XVPutStill( } if(portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) { - REGION_SUBTRACT(pScreen, &ClipRegion, &WinRegion, &ClipRegion); + RegionSubtract(&ClipRegion, &WinRegion, &ClipRegion); } ret = (*portPriv->AdaptorRec->PutStill)(portPriv->pScrn, @@ -1491,8 +1500,8 @@ PUT_STILL_BAILOUT: portPriv->isOn = XV_PENDING; } - REGION_UNINIT(pScreen, &WinRegion); - REGION_UNINIT(pScreen, &ClipRegion); + RegionUninit(&WinRegion); + RegionUninit(&ClipRegion); return ret; } @@ -1556,7 +1565,6 @@ xf86XVGetStill( CARD16 drw_w, CARD16 drw_h ){ XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr)(pPort->devPriv.ptr); - ScreenPtr pScreen; RegionRec WinRegion; RegionRec ClipRegion; BoxRec WinBox; @@ -1568,28 +1576,26 @@ xf86XVGetStill( if(!portPriv->pScrn->vtSema) return Success; /* Success ? */ - pScreen = pDraw->pScreen; - WinBox.x1 = pDraw->x + drw_x; WinBox.y1 = pDraw->y + drw_y; WinBox.x2 = WinBox.x1 + drw_w; WinBox.y2 = WinBox.y1 + drw_h; - REGION_INIT(pScreen, &WinRegion, &WinBox, 1); - REGION_NULL(pScreen, &ClipRegion); - REGION_INTERSECT(pScreen, &ClipRegion, &WinRegion, pGC->pCompositeClip); + RegionInit(&WinRegion, &WinBox, 1); + RegionNull(&ClipRegion); + RegionIntersect(&ClipRegion, &WinRegion, pGC->pCompositeClip); if(portPriv->pDraw) { xf86XVRemovePortFromWindow((WindowPtr)(portPriv->pDraw), portPriv); } - if(!REGION_NOTEMPTY(pScreen, &ClipRegion)) { + if(!RegionNotEmpty(&ClipRegion)) { clippedAway = TRUE; goto GET_STILL_BAILOUT; } if(portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) { - REGION_SUBTRACT(pScreen, &ClipRegion, &WinRegion, &ClipRegion); + RegionSubtract(&ClipRegion, &WinRegion, &ClipRegion); } ret = (*portPriv->AdaptorRec->GetStill)(portPriv->pScrn, @@ -1606,8 +1612,8 @@ GET_STILL_BAILOUT: portPriv->isOn = XV_PENDING; } - REGION_UNINIT(pScreen, &WinRegion); - REGION_UNINIT(pScreen, &ClipRegion); + RegionUninit(&WinRegion); + RegionUninit(&ClipRegion); return ret; } @@ -1704,7 +1710,6 @@ xf86XVPutImage( CARD16 width, CARD16 height ){ XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr)(pPort->devPriv.ptr); - ScreenPtr pScreen; RegionRec WinRegion; RegionRec ClipRegion; BoxRec WinBox; @@ -1716,16 +1721,14 @@ xf86XVPutImage( if(!portPriv->pScrn->vtSema) return Success; /* Success ? */ - pScreen = pDraw->pScreen; - WinBox.x1 = pDraw->x + drw_x; WinBox.y1 = pDraw->y + drw_y; WinBox.x2 = WinBox.x1 + drw_w; WinBox.y2 = WinBox.y1 + drw_h; - REGION_INIT(pScreen, &WinRegion, &WinBox, 1); - REGION_NULL(pScreen, &ClipRegion); - REGION_INTERSECT(pScreen, &ClipRegion, &WinRegion, pGC->pCompositeClip); + RegionInit(&WinRegion, &WinBox, 1); + RegionNull(&ClipRegion); + RegionIntersect(&ClipRegion, &WinRegion, pGC->pCompositeClip); if(portPriv->AdaptorRec->flags & VIDEO_CLIP_TO_VIEWPORT) { RegionRec VPReg; @@ -1736,9 +1739,9 @@ xf86XVPutImage( VPBox.x2 = portPriv->pScrn->frameX1 + 1; VPBox.y2 = portPriv->pScrn->frameY1 + 1; - REGION_INIT(pScreen, &VPReg, &VPBox, 1); - REGION_INTERSECT(pScreen, &ClipRegion, &ClipRegion, &VPReg); - REGION_UNINIT(pScreen, &VPReg); + RegionInit(&VPReg, &VPBox, 1); + RegionIntersect(&ClipRegion, &ClipRegion, &VPReg); + RegionUninit(&VPReg); } /* If we are changing windows, unregister our port in the old window */ @@ -1749,14 +1752,14 @@ xf86XVPutImage( ret = xf86XVEnlistPortInWindow((WindowPtr)pDraw, portPriv); if(ret != Success) goto PUT_IMAGE_BAILOUT; - if(!REGION_NOTEMPTY(pScreen, &ClipRegion)) { + if(!RegionNotEmpty(&ClipRegion)) { clippedAway = TRUE; goto PUT_IMAGE_BAILOUT; } if(portPriv->AdaptorRec->flags & VIDEO_NO_CLIPPING) { - BoxPtr clipBox = REGION_RECTS(&ClipRegion); - if( (REGION_NUM_RECTS(&ClipRegion) != 1) || + BoxPtr clipBox = RegionRects(&ClipRegion); + if( (RegionNumRects(&ClipRegion) != 1) || (clipBox->x1 != WinBox.x1) || (clipBox->x2 != WinBox.x2) || (clipBox->y1 != WinBox.y1) || (clipBox->y2 != WinBox.y2)) { @@ -1766,7 +1769,7 @@ xf86XVPutImage( } if(portPriv->AdaptorRec->flags & VIDEO_INVERT_CLIPLIST) { - REGION_SUBTRACT(pScreen, &ClipRegion, &WinRegion, &ClipRegion); + RegionSubtract(&ClipRegion, &WinRegion, &ClipRegion); } ret = (*portPriv->AdaptorRec->PutImage)(portPriv->pScrn, @@ -1794,8 +1797,8 @@ PUT_IMAGE_BAILOUT: portPriv->isOn = XV_PENDING; } - REGION_UNINIT(pScreen, &WinRegion); - REGION_UNINIT(pScreen, &ClipRegion); + RegionUninit(&WinRegion); + RegionUninit(&ClipRegion); return ret; } @@ -1825,9 +1828,8 @@ xf86XVFillKeyHelperDrawable (DrawablePtr pDraw, CARD32 key, RegionPtr clipboxes) WindowPtr pWin = (WindowPtr)pDraw; XF86XVWindowPtr pPriv = GET_XF86XV_WINDOW(pWin); GCPtr pGC = NULL; - XID pval[2]; - BoxPtr pbox = REGION_RECTS(clipboxes); - int i, nbox = REGION_NUM_RECTS(clipboxes); + BoxPtr pbox = RegionRects(clipboxes); + int i, nbox = RegionNumRects(clipboxes); xRectangle *rects; if(!xf86Screens[pScreen->myNum]->vtSema) return; @@ -1837,6 +1839,7 @@ xf86XVFillKeyHelperDrawable (DrawablePtr pDraw, CARD32 key, RegionPtr clipboxes) if(!pGC) { int status; + XID pval[2]; pval[0] = key; pval[1] = IncludeInferiors; pGC = CreateGC(pDraw, GCForeground | GCSubwindowMode, pval, &status, @@ -1845,14 +1848,15 @@ xf86XVFillKeyHelperDrawable (DrawablePtr pDraw, CARD32 key, RegionPtr clipboxes) ValidateGC(pDraw, pGC); if (pPriv) pPriv->pGC = pGC; } else if (key != pGC->fgPixel){ - pval[0] = key; - ChangeGC(pGC, GCForeground, pval); + ChangeGCVal val; + val.val = key; + ChangeGC(NullClient, pGC, GCForeground, &val); ValidateGC(pDraw, pGC); } - REGION_TRANSLATE(pDraw->pScreen, clipboxes, -pDraw->x, -pDraw->y); + RegionTranslate(clipboxes, -pDraw->x, -pDraw->y); - rects = xalloc(nbox * sizeof(xRectangle)); + rects = malloc(nbox * sizeof(xRectangle)); for(i = 0; i < nbox; i++, pbox++) { rects[i].x = pbox->x1; @@ -1865,28 +1869,28 @@ xf86XVFillKeyHelperDrawable (DrawablePtr pDraw, CARD32 key, RegionPtr clipboxes) if (!pPriv) FreeGC(pGC, 0); - xfree(rects); + free(rects); } void xf86XVFillKeyHelper (ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes) { - DrawablePtr root = &WindowTable[pScreen->myNum]->drawable; - XID pval[2]; - BoxPtr pbox = REGION_RECTS(clipboxes); - int i, nbox = REGION_NUM_RECTS(clipboxes); + DrawablePtr root = &pScreen->root->drawable; + ChangeGCVal pval[2]; + BoxPtr pbox = RegionRects(clipboxes); + int i, nbox = RegionNumRects(clipboxes); xRectangle *rects; GCPtr gc; if(!xf86Screens[pScreen->myNum]->vtSema) return; gc = GetScratchGC(root->depth, pScreen); - pval[0] = key; - pval[1] = IncludeInferiors; - (void) ChangeGC(gc, GCForeground|GCSubwindowMode, pval); + pval[0].val = key; + pval[1].val = IncludeInferiors; + (void) ChangeGC(NullClient, gc, GCForeground|GCSubwindowMode, pval); ValidateGC(root, gc); - rects = xalloc (nbox * sizeof(xRectangle)); + rects = malloc(nbox * sizeof(xRectangle)); for(i = 0; i < nbox; i++, pbox++) { @@ -1898,7 +1902,7 @@ xf86XVFillKeyHelper (ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes) (*gc->ops->PolyFillRect)(root, gc, nbox, rects); - xfree (rects); + free(rects); FreeScratchGC (gc); } @@ -1911,8 +1915,6 @@ xf86XVFillKeyHelper (ScreenPtr pScreen, CARD32 key, RegionPtr clipboxes) boundaries in 16.16 fixed point. */ -#define DummyScreen screenInfo.screens[0] - Bool xf86XVClipVideoHelper( BoxPtr dst, @@ -1926,7 +1928,7 @@ xf86XVClipVideoHelper( ){ double xsw, xdw, ysw, ydw; INT32 delta; - BoxPtr extents = REGION_EXTENTS(DummyScreen, reg); + BoxPtr extents = RegionExtents(reg); int diff; xsw = (*xb - *xa) << 16; @@ -1988,9 +1990,9 @@ xf86XVClipVideoHelper( (dst->y1 > extents->y1) || (dst->y2 < extents->y2)) { RegionRec clipReg; - REGION_INIT(DummyScreen, &clipReg, dst, 1); - REGION_INTERSECT(DummyScreen, reg, reg, &clipReg); - REGION_UNINIT(DummyScreen, &clipReg); + RegionInit(&clipReg, dst, 1); + RegionIntersect(reg, reg, &clipReg); + RegionUninit(&clipReg); } return TRUE; } diff --git a/xserver/hw/xfree86/common/xf86xvmc.c b/xserver/hw/xfree86/common/xf86xvmc.c index 39d33da08..e6464a582 100644 --- a/xserver/hw/xfree86/common/xf86xvmc.c +++ b/xserver/hw/xfree86/common/xf86xvmc.c @@ -55,8 +55,8 @@ typedef struct { XvMCAdaptorPtr dixinfo; } xf86XvMCScreenRec, *xf86XvMCScreenPtr; -static int XF86XvMCScreenKeyIndex; -static DevPrivateKey XF86XvMCScreenKey = &XF86XvMCScreenKeyIndex; +static DevPrivateKeyRec XF86XvMCScreenKeyRec; +#define XF86XvMCScreenKey (&XF86XvMCScreenKeyRec) #define XF86XVMC_GET_PRIVATE(pScreen) (xf86XvMCScreenPtr) \ dixLookupPrivate(&(pScreen)->devPrivates, XF86XvMCScreenKey) @@ -149,8 +149,8 @@ xf86XvMCCloseScreen (int i, ScreenPtr pScreen) pScreen->CloseScreen = pScreenPriv->CloseScreen; - xfree(pScreenPriv->dixinfo); - xfree(pScreenPriv); + free(pScreenPriv->dixinfo); + free(pScreenPriv); return (*pScreen->CloseScreen)(i, pScreen); } @@ -169,11 +169,14 @@ Bool xf86XvMCScreenInit( if(!XvMCScreenInitProc) return FALSE; - if(!(pAdapt = xalloc(sizeof(XvMCAdaptorRec) * num_adaptors))) + if(!(pAdapt = malloc(sizeof(XvMCAdaptorRec) * num_adaptors))) return FALSE; - if(!(pScreenPriv = xalloc(sizeof(xf86XvMCScreenRec)))) { - xfree(pAdapt); + if (!dixRegisterPrivateKey(&XF86XvMCScreenKeyRec, PRIVATE_SCREEN, 0)) + return FALSE; + + if(!(pScreenPriv = malloc(sizeof(xf86XvMCScreenRec)))) { + free(pAdapt); return FALSE; } @@ -196,7 +199,7 @@ Bool xf86XvMCScreenInit( } if(!pAdapt[i].xv_adaptor) { /* no adaptor by that name */ - xfree(pAdapt); + free(pAdapt); return FALSE; } pAdapt[i].num_surfaces = (*adaptors)->num_surfaces; @@ -220,10 +223,10 @@ Bool xf86XvMCScreenInit( XF86MCAdaptorPtr xf86XvMCCreateAdaptorRec (void) { - return xcalloc(1, sizeof(XF86MCAdaptorRec)); + return calloc(1, sizeof(XF86MCAdaptorRec)); } void xf86XvMCDestroyAdaptorRec(XF86MCAdaptorPtr adaptor) { - xfree(adaptor); + free(adaptor); } diff --git a/xserver/hw/xfree86/common/xisb.c b/xserver/hw/xfree86/common/xisb.c index 1cb9e4854..e4c8bf25c 100644 --- a/xserver/hw/xfree86/common/xisb.c +++ b/xserver/hw/xfree86/common/xisb.c @@ -67,14 +67,14 @@ XisbNew (int fd, ssize_t size) { XISBuffer *b; - b = xalloc (sizeof (XISBuffer)); + b = malloc(sizeof (XISBuffer)); if (!b) - return (NULL); - b->buf = xalloc ((sizeof (unsigned char) * size)); + return NULL; + b->buf = malloc((sizeof (unsigned char) * size)); if (!b->buf) { - xfree (b); - return (NULL); + free(b); + return NULL; } b->fd = fd; @@ -83,14 +83,14 @@ XisbNew (int fd, ssize_t size) b->current = 1; /* force it to be past the end to trigger initial read */ b->end = 0; b->buffer_size = size; - return (b); + return b; } void XisbFree (XISBuffer *b) { - xfree (b->buf); - xfree (b); + free(b->buf); + free(b); } int @@ -103,7 +103,7 @@ XisbRead (XISBuffer *b) if (b->block_duration >= 0) { if (xf86WaitForInput (b->fd, b->block_duration) < 1) - return (-1); + return -1; } else { @@ -119,9 +119,9 @@ XisbRead (XISBuffer *b) switch (ret) { case 0: - return (-1); /* timeout */ + return -1; /* timeout */ case -1: - return (-2); /* error */ + return -2; /* error */ default: b->end = ret; b->current = 0; @@ -132,7 +132,7 @@ XisbRead (XISBuffer *b) ErrorF ("read 0x%02x (%c)\n", b->buf[b->current], isprint(b->buf[b->current])?b->buf[b->current]:'.'); - return (b->buf[b->current++]); + return b->buf[b->current++]; } /* the only purpose of this function is to provide output tracing */ diff --git a/xserver/hw/xfree86/ddc/Makefile.in b/xserver/hw/xfree86/ddc/Makefile.in index b0ca706c9..289e12183 100644 --- a/xserver/hw/xfree86/ddc/Makefile.in +++ b/xserver/hw/xfree86/ddc/Makefile.in @@ -119,10 +119,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -210,6 +206,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -224,6 +222,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -241,10 +240,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -300,10 +303,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -321,17 +325,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -358,20 +356,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -463,6 +464,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/xfree86/ddc/ddc.c b/xserver/hw/xfree86/ddc/ddc.c index 6fad9fbbc..2d9d4dcd2 100644 --- a/xserver/hw/xfree86/ddc/ddc.c +++ b/xserver/hw/xfree86/ddc/ddc.c @@ -53,8 +53,8 @@ find_start(unsigned int *ptr) } } for (i=0;i<9;i++) - if (test[i]) return (i+1); - return (-1); + if (test[i]) return i+1; + return -1; } static unsigned char * @@ -75,8 +75,8 @@ find_header(unsigned char *block) if (i==8) break; ptr++; } - if (ptr == end) return (NULL); - return (ptr); + if (ptr == end) return NULL; + return ptr; } static unsigned char * @@ -86,7 +86,7 @@ resort(unsigned char *s_block) unsigned char tmp; s_end = s_block + EDID1_LEN; - d_new = xalloc(EDID1_LEN); + d_new = malloc(EDID1_LEN); if (!d_new) return NULL; d_end = d_new + EDID1_LEN; @@ -97,12 +97,12 @@ resort(unsigned char *s_block) *d_ptr = tmp; if (s_ptr == s_end) s_ptr = s_block; } - xfree(s_block); - return (d_new); + free(s_block); + return d_new; } static int -DDC_checksum(unsigned char *block, int len) +DDC_checksum(const unsigned char *block, int len) { int i, result = 0; int not_null = 0; @@ -120,7 +120,7 @@ DDC_checksum(unsigned char *block, int len) /* catch the trivial case where all bytes are 0 */ if (!not_null) return 1; - return (result&0xFF); + return result&0xFF; } static unsigned char * @@ -134,7 +134,7 @@ GetEDID_DDC1(unsigned int *s_ptr) if (s_start==-1) return NULL; s_end = s_ptr + NUM; s_pos = s_ptr + s_start; - d_block=xalloc(EDID1_LEN); + d_block=malloc(EDID1_LEN); if (!d_block) return NULL; d_pos = d_block; for (i=0;imax_h = MAX_H; r->max_clock = 0; if(MAX_CLOCK != 0xff) /* is specified? */ - r->max_clock = MAX_CLOCK * 10; + r->max_clock = MAX_CLOCK * 10 + 5; if (HAVE_2ND_GTF) { r->gtf_2nd_f = F_2ND_GTF; r->gtf_2nd_c = C_2ND_GTF; diff --git a/xserver/hw/xfree86/dixmods/Makefile.in b/xserver/hw/xfree86/dixmods/Makefile.in index 7bf7223ae..d0f6e93e5 100644 --- a/xserver/hw/xfree86/dixmods/Makefile.in +++ b/xserver/hw/xfree86/dixmods/Makefile.in @@ -157,10 +157,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -248,6 +244,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -262,6 +260,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -279,10 +278,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -338,10 +341,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -359,17 +363,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -396,20 +394,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -501,6 +502,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/xfree86/dixmods/extmod/Makefile.in b/xserver/hw/xfree86/dixmods/extmod/Makefile.in index ced3205b9..cd32d6d0c 100644 --- a/xserver/hw/xfree86/dixmods/extmod/Makefile.in +++ b/xserver/hw/xfree86/dixmods/extmod/Makefile.in @@ -125,10 +125,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -216,6 +212,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -230,6 +228,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -247,10 +246,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -306,10 +309,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -327,17 +331,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -364,20 +362,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -469,6 +470,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/xfree86/dixmods/extmod/modinit.c b/xserver/hw/xfree86/dixmods/extmod/modinit.c index 299562592..f4e922cd0 100644 --- a/xserver/hw/xfree86/dixmods/extmod/modinit.c +++ b/xserver/hw/xfree86/dixmods/extmod/modinit.c @@ -47,15 +47,6 @@ static ExtensionModule extensionModules[] = { NULL }, #endif -#ifdef MULTIBUFFER - { - MultibufferExtensionInit, - MULTIBUFFER_PROTOCOL_NAME, - &noMultibufferExtension, - NULL, - NULL - }, -#endif #ifdef SCREENSAVER { ScreenSaverExtensionInit, @@ -155,13 +146,13 @@ extmodSetup(pointer module, pointer opts, int *errmaj, int *errmin) for (i = 0; extensionModules[i].name != NULL; i++) { if (opts) { char *s; - s = (char *)xalloc(strlen(extensionModules[i].name) + 5); + s = (char *)malloc(strlen(extensionModules[i].name) + 5); if (s) { pointer o; strcpy(s, "omit"); strcat(s, extensionModules[i].name); o = xf86FindOption(opts, s); - xfree(s); + free(s); if (o) { xf86MarkOptionUsed(o); continue; diff --git a/xserver/hw/xfree86/dixmods/extmod/modinit.h b/xserver/hw/xfree86/dixmods/extmod/modinit.h index 6210526aa..1154e4601 100644 --- a/xserver/hw/xfree86/dixmods/extmod/modinit.h +++ b/xserver/hw/xfree86/dixmods/extmod/modinit.h @@ -9,11 +9,6 @@ #include -#ifdef MULTIBUFFER -extern void MultibufferExtensionInit(INITARGS); -#include -#endif - #ifdef XTEST extern void XTestExtensionInit(INITARGS); #include diff --git a/xserver/hw/xfree86/dixmods/extmod/xf86dga2.c b/xserver/hw/xfree86/dixmods/extmod/xf86dga2.c index 5367bcc42..e522b5c47 100644 --- a/xserver/hw/xfree86/dixmods/extmod/xf86dga2.c +++ b/xserver/hw/xfree86/dixmods/extmod/xf86dga2.c @@ -57,14 +57,15 @@ static void XDGAResetProc(ExtensionEntry *extEntry); static void DGAClientStateChange (CallbackListPtr*, pointer, pointer); -static ClientPtr DGAClients[MAXSCREENS]; - unsigned char DGAReqCode = 0; int DGAErrorBase; int DGAEventBase; -static int DGAClientPrivateKeyIndex; -static DevPrivateKey DGAClientPrivateKey = &DGAClientPrivateKeyIndex; +static DevPrivateKeyRec DGAScreenPrivateKeyRec; +#define DGAScreenPrivateKey (&DGAScreenPrivateKeyRec) +#define DGAScreenPrivateKeyRegistered (DGAScreenPrivateKeyRec.initialized) +static DevPrivateKeyRec DGAClientPrivateKeyRec; +#define DGAClientPrivateKey (&DGAClientPrivateKeyRec) static int DGACallbackRefCount = 0; /* This holds the client's version information */ @@ -73,6 +74,11 @@ typedef struct { int minor; } DGAPrivRec, *DGAPrivPtr; +#define DGA_GETCLIENT(idx) ((ClientPtr) \ + dixLookupPrivate(&screenInfo.screens[idx]->devPrivates, DGAScreenPrivateKey)) +#define DGA_SETCLIENT(idx,p) \ + dixSetPrivate(&screenInfo.screens[idx]->devPrivates, DGAScreenPrivateKey, p) + #define DGA_GETPRIV(c) ((DGAPrivPtr) \ dixLookupPrivate(&(c)->devPrivates, DGAClientPrivateKey)) #define DGA_SETPRIV(c,p) \ @@ -84,6 +90,12 @@ XFree86DGAExtensionInit(INITARGS) { ExtensionEntry* extEntry; + if (!dixRegisterPrivateKey(&DGAClientPrivateKeyRec, PRIVATE_CLIENT, 0)) + return; + + if (!dixRegisterPrivateKey(&DGAScreenPrivateKeyRec, PRIVATE_SCREEN, 0)) + return; + if ((extEntry = AddExtension(XF86DGANAME, XF86DGANumberEvents, XF86DGANumberErrors, @@ -93,9 +105,6 @@ XFree86DGAExtensionInit(INITARGS) StandardMinorOpcode))) { int i; - for(i = 0; i < MAXSCREENS; i++) - DGAClients[i] = NULL; - DGAReqCode = (unsigned char)extEntry->base; DGAErrorBase = extEntry->errorBase; DGAEventBase = extEntry->eventBase; @@ -127,7 +136,7 @@ ProcXDGAQueryVersion(ClientPtr client) rep.minorVersion = SERVER_XDGA_MINOR_VERSION; WriteToClient(client, sizeof(xXDGAQueryVersionReply), (char *)&rep); - return (client->noClientException); + return Success; } @@ -164,7 +173,7 @@ ProcXDGAOpenFramebuffer(ClientPtr client) if(rep.length) WriteToClient(client, nameSize, deviceName); - return (client->noClientException); + return Success; } @@ -183,7 +192,7 @@ ProcXDGACloseFramebuffer(ClientPtr client) DGACloseFramebuffer(stuff->screen); - return (client->noClientException); + return Success; } static int @@ -208,15 +217,15 @@ ProcXDGAQueryModes(ClientPtr client) rep.number = 0; rep.length = 0; WriteToClient(client, sz_xXDGAQueryModesReply, (char*)&rep); - return (client->noClientException); + return Success; } if(!(num = DGAGetModes(stuff->screen))) { WriteToClient(client, sz_xXDGAQueryModesReply, (char*)&rep); - return (client->noClientException); + return Success; } - if(!(mode = (XDGAModePtr)xalloc(num * sizeof(XDGAModeRec)))) + if(!(mode = (XDGAModePtr)malloc(num * sizeof(XDGAModeRec)))) return BadAlloc; for(i = 0; i < num; i++) @@ -265,9 +274,9 @@ ProcXDGAQueryModes(ClientPtr client) WriteToClient(client, size, mode[i].name); } - xfree(mode); + free(mode); - return (client->noClientException); + return Success; } @@ -282,7 +291,7 @@ DGAClientStateChange ( int i; for(i = 0; i < screenInfo.numScreens; i++) { - if(DGAClients[i] == pci->client) { + if(DGA_GETCLIENT(i) == pci->client) { client = pci->client; break; } @@ -294,7 +303,7 @@ DGAClientStateChange ( XDGAModeRec mode; PixmapPtr pPix; - DGAClients[i] = NULL; + DGA_SETCLIENT(i, NULL); DGASelectInput(i, NULL, 0); DGASetMode(i, 0, &mode, &pPix); @@ -311,10 +320,12 @@ ProcXDGASetMode(ClientPtr client) XDGAModeRec mode; xXDGAModeInfo info; PixmapPtr pPix; + ClientPtr owner; int size; if (stuff->screen > screenInfo.numScreens) return BadValue; + owner = DGA_GETCLIENT(stuff->screen); REQUEST_SIZE_MATCH(xXDGASetModeReq); rep.type = X_Reply; @@ -326,31 +337,30 @@ ProcXDGASetMode(ClientPtr client) if (!DGAAvailable(stuff->screen)) return DGAErrorBase + XF86DGANoDirectVideoMode; - if(DGAClients[stuff->screen] && - (DGAClients[stuff->screen] != client)) + if(owner && owner != client) return DGAErrorBase + XF86DGANoDirectVideoMode; if(!stuff->mode) { - if(DGAClients[stuff->screen]) { + if(owner) { if(--DGACallbackRefCount == 0) DeleteCallback(&ClientStateCallback, DGAClientStateChange, NULL); } - DGAClients[stuff->screen] = NULL; + DGA_SETCLIENT(stuff->screen, NULL); DGASelectInput(stuff->screen, NULL, 0); DGASetMode(stuff->screen, 0, &mode, &pPix); WriteToClient(client, sz_xXDGASetModeReply, (char*)&rep); - return (client->noClientException); + return Success; } if(Success != DGASetMode(stuff->screen, stuff->mode, &mode, &pPix)) return BadValue; - if(!DGAClients[stuff->screen]) { + if(!owner) { if(DGACallbackRefCount++ == 0) AddCallback (&ClientStateCallback, DGAClientStateChange, NULL); } - DGAClients[stuff->screen] = client; + DGA_SETCLIENT(stuff->screen, client); if(pPix) { if(AddResource(stuff->pid, RT_PIXMAP, (pointer)(pPix))) { @@ -394,7 +404,7 @@ ProcXDGASetMode(ClientPtr client) WriteToClient(client, sz_xXDGAModeInfo, (char*)(&info)); WriteToClient(client, size, mode.name); - return (client->noClientException); + return Success; } static int @@ -405,14 +415,14 @@ ProcXDGASetViewport(ClientPtr client) if (stuff->screen > screenInfo.numScreens) return BadValue; - if(DGAClients[stuff->screen] != client) + if(DGA_GETCLIENT(stuff->screen) != client) return DGAErrorBase + XF86DGADirectNotActivated; REQUEST_SIZE_MATCH(xXDGASetViewportReq); DGASetViewport(stuff->screen, stuff->x, stuff->y, stuff->flags); - return (client->noClientException); + return Success; } static int @@ -425,21 +435,17 @@ ProcXDGAInstallColormap(ClientPtr client) if (stuff->screen > screenInfo.numScreens) return BadValue; - if(DGAClients[stuff->screen] != client) + if(DGA_GETCLIENT(stuff->screen) != client) return DGAErrorBase + XF86DGADirectNotActivated; REQUEST_SIZE_MATCH(xXDGAInstallColormapReq); rc = dixLookupResourceByType((pointer *)&cmap, stuff->cmap, RT_COLORMAP, client, DixInstallAccess); - if (rc == Success) { - DGAInstallCmap(cmap); - return (client->noClientException); - } else { - return (rc == BadValue) ? BadColor : rc; - } - - return (client->noClientException); + if (rc != Success) + return rc; + DGAInstallCmap(cmap); + return Success; } @@ -451,15 +457,15 @@ ProcXDGASelectInput(ClientPtr client) if (stuff->screen > screenInfo.numScreens) return BadValue; - if(DGAClients[stuff->screen] != client) + if(DGA_GETCLIENT(stuff->screen) != client) return DGAErrorBase + XF86DGADirectNotActivated; REQUEST_SIZE_MATCH(xXDGASelectInputReq); - if(DGAClients[stuff->screen] == client) + if(DGA_GETCLIENT(stuff->screen) == client) DGASelectInput(stuff->screen, client, stuff->mask); - return (client->noClientException); + return Success; } @@ -471,7 +477,7 @@ ProcXDGAFillRectangle(ClientPtr client) if (stuff->screen > screenInfo.numScreens) return BadValue; - if(DGAClients[stuff->screen] != client) + if(DGA_GETCLIENT(stuff->screen) != client) return DGAErrorBase + XF86DGADirectNotActivated; REQUEST_SIZE_MATCH(xXDGAFillRectangleReq); @@ -480,7 +486,7 @@ ProcXDGAFillRectangle(ClientPtr client) stuff->width, stuff->height, stuff->color)) return BadMatch; - return (client->noClientException); + return Success; } static int @@ -491,7 +497,7 @@ ProcXDGACopyArea(ClientPtr client) if (stuff->screen > screenInfo.numScreens) return BadValue; - if(DGAClients[stuff->screen] != client) + if(DGA_GETCLIENT(stuff->screen) != client) return DGAErrorBase + XF86DGADirectNotActivated; REQUEST_SIZE_MATCH(xXDGACopyAreaReq); @@ -500,7 +506,7 @@ ProcXDGACopyArea(ClientPtr client) stuff->width, stuff->height, stuff->dstx, stuff->dsty)) return BadMatch; - return (client->noClientException); + return Success; } @@ -512,7 +518,7 @@ ProcXDGACopyTransparentArea(ClientPtr client) if (stuff->screen > screenInfo.numScreens) return BadValue; - if(DGAClients[stuff->screen] != client) + if(DGA_GETCLIENT(stuff->screen) != client) return DGAErrorBase + XF86DGADirectNotActivated; REQUEST_SIZE_MATCH(xXDGACopyTransparentAreaReq); @@ -521,7 +527,7 @@ ProcXDGACopyTransparentArea(ClientPtr client) stuff->width, stuff->height, stuff->dstx, stuff->dsty, stuff->key)) return BadMatch; - return (client->noClientException); + return Success; } @@ -534,7 +540,7 @@ ProcXDGAGetViewportStatus(ClientPtr client) if (stuff->screen > screenInfo.numScreens) return BadValue; - if(DGAClients[stuff->screen] != client) + if(DGA_GETCLIENT(stuff->screen) != client) return DGAErrorBase + XF86DGADirectNotActivated; REQUEST_SIZE_MATCH(xXDGAGetViewportStatusReq); @@ -545,7 +551,7 @@ ProcXDGAGetViewportStatus(ClientPtr client) rep.status = DGAGetViewportStatus(stuff->screen); WriteToClient(client, sizeof(xXDGAGetViewportStatusReply), (char *)&rep); - return (client->noClientException); + return Success; } static int @@ -557,7 +563,7 @@ ProcXDGASync(ClientPtr client) if (stuff->screen > screenInfo.numScreens) return BadValue; - if(DGAClients[stuff->screen] != client) + if(DGA_GETCLIENT(stuff->screen) != client) return DGAErrorBase + XF86DGADirectNotActivated; REQUEST_SIZE_MATCH(xXDGASyncReq); @@ -568,7 +574,7 @@ ProcXDGASync(ClientPtr client) DGASync(stuff->screen); WriteToClient(client, sizeof(xXDGASyncReply), (char *)&rep); - return (client->noClientException); + return Success; } static int @@ -580,7 +586,7 @@ ProcXDGASetClientVersion(ClientPtr client) REQUEST_SIZE_MATCH(xXDGASetClientVersionReq); if ((pPriv = DGA_GETPRIV(client)) == NULL) { - pPriv = xalloc(sizeof(DGAPrivRec)); + pPriv = malloc(sizeof(DGAPrivRec)); /* XXX Need to look into freeing this */ if (!pPriv) return BadAlloc; @@ -589,7 +595,7 @@ ProcXDGASetClientVersion(ClientPtr client) pPriv->major = stuff->major; pPriv->minor = stuff->minor; - return (client->noClientException); + return Success; } static int @@ -602,7 +608,7 @@ ProcXDGAChangePixmapMode(ClientPtr client) if (stuff->screen > screenInfo.numScreens) return BadValue; - if(DGAClients[stuff->screen] != client) + if(DGA_GETCLIENT(stuff->screen) != client) return DGAErrorBase + XF86DGADirectNotActivated; REQUEST_SIZE_MATCH(xXDGAChangePixmapModeReq); @@ -620,7 +626,7 @@ ProcXDGAChangePixmapMode(ClientPtr client) rep.y = y; WriteToClient(client, sizeof(xXDGAChangePixmapModeReply), (char *)&rep); - return (client->noClientException); + return Success; } @@ -633,7 +639,7 @@ ProcXDGACreateColormap(ClientPtr client) if (stuff->screen > screenInfo.numScreens) return BadValue; - if(DGAClients[stuff->screen] != client) + if(DGA_GETCLIENT(stuff->screen) != client) return DGAErrorBase + XF86DGADirectNotActivated; REQUEST_SIZE_MATCH(xXDGACreateColormapReq); @@ -646,7 +652,7 @@ ProcXDGACreateColormap(ClientPtr client) if(result != Success) return result; - return (client->noClientException); + return Success; } /* @@ -686,10 +692,10 @@ ProcXF86DGAGetVideoLL(ClientPtr client) rep.sequenceNumber = client->sequence; if(!DGAAvailable(stuff->screen)) - return (DGAErrorBase + XF86DGANoDirectVideoMode); + return DGAErrorBase + XF86DGANoDirectVideoMode; if(!(num = DGAGetOldDGAMode(stuff->screen))) - return (DGAErrorBase + XF86DGANoDirectVideoMode); + return DGAErrorBase + XF86DGANoDirectVideoMode; /* get the parameters for the mode that best matches */ DGAGetModeInfo(stuff->screen, &mode, num); @@ -704,7 +710,7 @@ ProcXF86DGAGetVideoLL(ClientPtr client) rep.ram_size = rep.bank_size >> 10; WriteToClient(client, SIZEOF(xXF86DGAGetVideoLLReply), (char *)&rep); - return (client->noClientException); + return Success; } static int @@ -713,28 +719,29 @@ ProcXF86DGADirectVideo(ClientPtr client) int num; PixmapPtr pix; XDGAModeRec mode; + ClientPtr owner; REQUEST(xXF86DGADirectVideoReq); if (stuff->screen > screenInfo.numScreens) return BadValue; - REQUEST_SIZE_MATCH(xXF86DGADirectVideoReq); if (!DGAAvailable(stuff->screen)) return DGAErrorBase + XF86DGANoDirectVideoMode; - if (DGAClients[stuff->screen] && - (DGAClients[stuff->screen] != client)) + owner = DGA_GETCLIENT(stuff->screen); + + if (owner && owner != client) return DGAErrorBase + XF86DGANoDirectVideoMode; if (stuff->enable & XF86DGADirectGraphics) { if(!(num = DGAGetOldDGAMode(stuff->screen))) - return (DGAErrorBase + XF86DGANoDirectVideoMode); + return DGAErrorBase + XF86DGANoDirectVideoMode; } else num = 0; if(Success != DGASetMode(stuff->screen, num, &mode, &pix)) - return (DGAErrorBase + XF86DGAScreenNotActive); + return DGAErrorBase + XF86DGAScreenNotActive; DGASetInputMode (stuff->screen, (stuff->enable & XF86DGADirectKeyb) != 0, @@ -743,22 +750,22 @@ ProcXF86DGADirectVideo(ClientPtr client) /* We need to track the client and attach the teardown callback */ if (stuff->enable & (XF86DGADirectGraphics | XF86DGADirectKeyb | XF86DGADirectMouse)) { - if (!DGAClients[stuff->screen]) { + if (!owner) { if (DGACallbackRefCount++ == 0) AddCallback (&ClientStateCallback, DGAClientStateChange, NULL); } - DGAClients[stuff->screen] = client; + DGA_SETCLIENT(stuff->screen, client); } else { - if (DGAClients[stuff->screen]) { + if (owner) { if (--DGACallbackRefCount == 0) DeleteCallback(&ClientStateCallback, DGAClientStateChange, NULL); } - DGAClients[stuff->screen] = NULL; + DGA_SETCLIENT(stuff->screen, NULL); } - return (client->noClientException); + return Success; } static int @@ -778,10 +785,10 @@ ProcXF86DGAGetViewPortSize(ClientPtr client) rep.sequenceNumber = client->sequence; if (!DGAAvailable(stuff->screen)) - return (DGAErrorBase + XF86DGANoDirectVideoMode); + return DGAErrorBase + XF86DGANoDirectVideoMode; if(!(num = DGAGetOldDGAMode(stuff->screen))) - return (DGAErrorBase + XF86DGANoDirectVideoMode); + return DGAErrorBase + XF86DGANoDirectVideoMode; DGAGetModeInfo(stuff->screen, &mode, num); @@ -789,7 +796,7 @@ ProcXF86DGAGetViewPortSize(ClientPtr client) rep.height = mode.viewportHeight; WriteToClient(client, SIZEOF(xXF86DGAGetViewPortSizeReply), (char *)&rep); - return (client->noClientException); + return Success; } static int @@ -800,13 +807,13 @@ ProcXF86DGASetViewPort(ClientPtr client) if (stuff->screen > screenInfo.numScreens) return BadValue; - if (DGAClients[stuff->screen] != client) + if (DGA_GETCLIENT(stuff->screen) != client) return DGAErrorBase + XF86DGADirectNotActivated; REQUEST_SIZE_MATCH(xXF86DGASetViewPortReq); if (!DGAAvailable(stuff->screen)) - return (DGAErrorBase + XF86DGANoDirectVideoMode); + return DGAErrorBase + XF86DGANoDirectVideoMode; if (!DGAActive(stuff->screen)) return DGAErrorBase + XF86DGADirectNotActivated; @@ -815,7 +822,7 @@ ProcXF86DGASetViewPort(ClientPtr client) != Success) return DGAErrorBase + XF86DGADirectNotActivated; - return (client->noClientException); + return Success; } static int @@ -834,7 +841,7 @@ ProcXF86DGAGetVidPage(ClientPtr client) rep.vpage = 0; /* silently fail */ WriteToClient(client, SIZEOF(xXF86DGAGetVidPageReply), (char *)&rep); - return (client->noClientException); + return Success; } @@ -850,7 +857,7 @@ ProcXF86DGASetVidPage(ClientPtr client) /* silently fail */ - return (client->noClientException); + return Success; } @@ -864,21 +871,21 @@ ProcXF86DGAInstallColormap(ClientPtr client) if (stuff->screen > screenInfo.numScreens) return BadValue; - if (DGAClients[stuff->screen] != client) + if (DGA_GETCLIENT(stuff->screen) != client) return DGAErrorBase + XF86DGADirectNotActivated; REQUEST_SIZE_MATCH(xXF86DGAInstallColormapReq); if (!DGAActive(stuff->screen)) - return (DGAErrorBase + XF86DGADirectNotActivated); + return DGAErrorBase + XF86DGADirectNotActivated; rc = dixLookupResourceByType((pointer *)&pcmp, stuff->id, RT_COLORMAP, client, DixInstallAccess); if (rc == Success) { DGAInstallCmap(pcmp); - return (client->noClientException); + return Success; } else { - return (rc == BadValue) ? BadColor : rc; + return rc; } } @@ -901,7 +908,7 @@ ProcXF86DGAQueryDirectVideo(ClientPtr client) rep.flags = XF86DGADirectPresent; WriteToClient(client, SIZEOF(xXF86DGAQueryDirectVideoReply), (char *)&rep); - return (client->noClientException); + return Success; } static int @@ -913,13 +920,13 @@ ProcXF86DGAViewPortChanged(ClientPtr client) if (stuff->screen > screenInfo.numScreens) return BadValue; - if (DGAClients[stuff->screen] != client) + if (DGA_GETCLIENT(stuff->screen) != client) return DGAErrorBase + XF86DGADirectNotActivated; REQUEST_SIZE_MATCH(xXF86DGAViewPortChangedReq); if (!DGAActive(stuff->screen)) - return (DGAErrorBase + XF86DGADirectNotActivated); + return DGAErrorBase + XF86DGADirectNotActivated; rep.type = X_Reply; rep.length = 0; @@ -927,7 +934,7 @@ ProcXF86DGAViewPortChanged(ClientPtr client) rep.result = 1; WriteToClient(client, SIZEOF(xXF86DGAViewPortChangedReply), (char *)&rep); - return (client->noClientException); + return Success; } #endif /* DGA_PROTOCOL_OLD_SUPPORT */ diff --git a/xserver/hw/xfree86/dixmods/extmod/xf86vmode.c b/xserver/hw/xfree86/dixmods/extmod/xf86vmode.c index a304a42d4..0001c9eeb 100644 --- a/xserver/hw/xfree86/dixmods/extmod/xf86vmode.c +++ b/xserver/hw/xfree86/dixmods/extmod/xf86vmode.c @@ -51,8 +51,8 @@ from Kaleb S. KEITHLEY #define DEFAULT_XF86VIDMODE_VERBOSITY 3 static int VidModeErrorBase; -static int VidModeClientPrivateKeyIndex; -static DevPrivateKey VidModeClientPrivateKey = &VidModeClientPrivateKeyIndex; +static DevPrivateKeyRec VidModeClientPrivateKeyRec; +#define VidModeClientPrivateKey (&VidModeClientPrivateKeyRec) /* This holds the client's version information */ typedef struct { @@ -141,8 +141,8 @@ typedef struct _XF86VidModeScreenPrivate { Bool hasWindow; } XF86VidModeScreenPrivateRec, *XF86VidModeScreenPrivatePtr; -static int ScreenPrivateKeyIndex; -static DevPrivateKey ScreenPrivateKey = &ScreenPrivateKeyIndex; +static DevPrivateKeyRec ScreenPrivateKeyRec; +#define ScreenPrivateKey (&ScreenPrivateKeyRec) #define GetScreenPrivate(s) ((ScreenSaverScreenPrivatePtr) \ dixLookupPrivate(&(s)->devPrivates, ScreenPrivateKey)) @@ -150,7 +150,7 @@ static DevPrivateKey ScreenPrivateKey = &ScreenPrivateKeyIndex; dixSetPrivate(&(s)->devPrivates, ScreenPrivateKey, v) #define SetupScreen(s) ScreenSaverScreenPrivatePtr pPriv = GetScreenPrivate(s) -#define New(t) (xalloc (sizeof (t))) +#define New(t) (malloc(sizeof (t))) #endif #ifdef DEBUG @@ -169,6 +169,13 @@ XFree86VidModeExtensionInit(void) DEBUG_P("XFree86VidModeExtensionInit"); + if (!dixRegisterPrivateKey(&VidModeClientPrivateKeyRec, PRIVATE_CLIENT, 0)) + return; +#ifdef XF86VIDMODE_EVENTS + if (!dixRegisterPrivateKey(&ScreenPrivateKeyRec, PRIVATE_SCREEN, 0)) + return; +#endif + #ifdef XF86VIDMODE_EVENTS EventType = CreateNewResourceType(XF86VidModeFreeEvents, "VidModeEvent"); #endif @@ -177,9 +184,6 @@ XFree86VidModeExtensionInit(void) pScreen = screenInfo.screens[i]; if (VidModeExtensionInit(pScreen)) enabled = TRUE; -#ifdef XF86VIDMODE_EVENTS - SetScreenPrivate (pScreen, NULL); -#endif } /* This means that the DDX doesn't want the vidmode extension enabled */ if (!enabled) @@ -229,7 +233,7 @@ CheckScreenPrivate (pScreen) if (!pPriv) return; if (!pPriv->events && !pPriv->hasWindow) { - xfree (pPriv); + free(pPriv); SetScreenPrivate (pScreen, NULL); } } @@ -283,7 +287,7 @@ setEventMask (ScreenPtr pScreen, ClientPtr client, unsigned long mask) break; if (mask == 0) { *pPrev = pEv->next; - xfree (pEv); + free(pEv); CheckScreenPrivate (pScreen); } else { if (!pEv) { @@ -319,7 +323,7 @@ XF86VidModeFreeEvents(pointer value, XID id) if (!pEv) return TRUE; *pPrev = pEv->next; - xfree (pEv); + free(pEv); CheckScreenPrivate (pScreen); return TRUE; } @@ -331,7 +335,6 @@ SendXF86VidModeNotify(ScreenPtr pScreen, int state, Bool forced) XF86VidModeEventPtr pEv; unsigned long mask; xXF86VidModeNotifyEvent ev; - ClientPtr client; int kind; UpdateCurrentTimeIf (); @@ -343,19 +346,15 @@ SendXF86VidModeNotify(ScreenPtr pScreen, int state, Bool forced) kind = XF86VidModeModeChange; for (pEv = pPriv->events; pEv; pEv = pEv->next) { - client = pEv->client; - if (client->clientGone) - continue; if (!(pEv->mask & mask)) continue; ev.type = XF86VidModeNotify + XF86VidModeEventBase; ev.state = state; - ev.sequenceNumber = client->sequence; ev.timestamp = currentTime.milliseconds; - ev.root = WindowTable[pScreen->myNum]->drawable.id; + ev.root = pScreen->root->drawable.id; ev.kind = kind; ev.forced = forced; - WriteEventsToClient (client, 1, (xEvent *) &ev); + WriteEventsToClient (pEv->client, 1, (xEvent *) &ev); } } @@ -394,7 +393,7 @@ ProcXF86VidModeQueryVersion(ClientPtr client) swaps(&rep.minorVersion, n); } WriteToClient(client, sizeof(xXF86VidModeQueryVersionReply), (char *)&rep); - return (client->noClientException); + return Success; } static int @@ -495,7 +494,7 @@ ProcXF86VidModeGetModeLine(ClientPtr client) WriteToClient(client, sizeof(xXF86VidModeGetModeLineReply), (char *)&rep); } - return (client->noClientException); + return Success; } static int @@ -521,7 +520,7 @@ ProcXF86VidModeGetAllModeLines(ClientPtr client) modecount = VidModeGetNumOfModes(stuff->screen); if (modecount < 1) - return (VidModeErrorBase + XF86VidModeExtensionDisabled); + return VidModeErrorBase + XF86VidModeExtensionDisabled; if (!VidModeGetFirstModeline(stuff->screen, &mode, &dotClock)) return BadValue; @@ -590,7 +589,7 @@ ProcXF86VidModeGetAllModeLines(ClientPtr client) } while (VidModeGetNextModeline(stuff->screen, &mode, &dotClock)); - return (client->noClientException); + return Success; } #define MODEMATCH(mode,stuff) \ @@ -738,20 +737,20 @@ ProcXF86VidModeAddModeLine(ClientPtr client) break; case MODE_HSYNC: case MODE_H_ILLEGAL: - xfree(mode); + free(mode); return VidModeErrorBase + XF86VidModeBadHTimings; case MODE_VSYNC: case MODE_V_ILLEGAL: - xfree(mode); + free(mode); return VidModeErrorBase + XF86VidModeBadVTimings; default: - xfree(mode); + free(mode); return VidModeErrorBase + XF86VidModeModeUnsuitable; } /* Check that the driver is happy with the mode */ if (VidModeCheckModeForDriver(stuff->screen, mode) != MODE_OK) { - xfree(mode); + free(mode); return VidModeErrorBase + XF86VidModeModeUnsuitable; } @@ -761,7 +760,7 @@ ProcXF86VidModeAddModeLine(ClientPtr client) if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) ErrorF("AddModeLine - Succeeded\n"); - return client->noClientException; + return Success; } static int @@ -874,7 +873,7 @@ ProcXF86VidModeDeleteModeLine(ClientPtr client) VidModeDeleteModeline(stuff->screen, mode); if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) ErrorF("DeleteModeLine - Succeeded\n"); - return(client->noClientException); + return Success; } } while (VidModeGetNextModeline(stuff->screen, &mode, &dotClock)); @@ -968,23 +967,23 @@ ProcXF86VidModeModModeLine(ClientPtr client) break; case MODE_HSYNC: case MODE_H_ILLEGAL: - xfree(modetmp); + free(modetmp); return VidModeErrorBase + XF86VidModeBadHTimings; case MODE_VSYNC: case MODE_V_ILLEGAL: - xfree(modetmp); + free(modetmp); return VidModeErrorBase + XF86VidModeBadVTimings; default: - xfree(modetmp); + free(modetmp); return VidModeErrorBase + XF86VidModeModeUnsuitable; } /* Check that the driver is happy with the mode */ if (VidModeCheckModeForDriver(stuff->screen, modetmp) != MODE_OK) { - xfree(modetmp); + free(modetmp); return VidModeErrorBase + XF86VidModeModeUnsuitable; } - xfree(modetmp); + free(modetmp); VidModeSetModeValue(mode, VIDMODE_H_DISPLAY, stuff->hdisplay); VidModeSetModeValue(mode, VIDMODE_H_SYNCSTART, stuff->hsyncstart); @@ -1002,7 +1001,7 @@ ProcXF86VidModeModModeLine(ClientPtr client) if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) ErrorF("ModModeLine - Succeeded\n"); - return(client->noClientException); + return Success; } static int @@ -1103,8 +1102,7 @@ ProcXF86VidModeValidateModeLine(ClientPtr client) status = VidModeCheckModeForDriver(stuff->screen, modetmp); status_reply: - if(modetmp) - xfree(modetmp); + free(modetmp); rep.type = X_Reply; rep.length = bytes_to_int32(SIZEOF(xXF86VidModeValidateModeLineReply) @@ -1120,7 +1118,7 @@ status_reply: WriteToClient(client, sizeof(xXF86VidModeValidateModeLineReply), (char *)&rep); if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) ErrorF("ValidateModeLine - Succeeded (status = %d)\n", status); - return(client->noClientException); + return Success; } static int @@ -1137,7 +1135,7 @@ ProcXF86VidModeSwitchMode(ClientPtr client) VidModeZoomViewport(stuff->screen, (short)stuff->zoom); - return (client->noClientException); + return Success; } static int @@ -1201,7 +1199,7 @@ ProcXF86VidModeSwitchToMode(ClientPtr client) if ((VidModeGetDotClock(stuff->screen, stuff->dotclock) == dotClock) && MODEMATCH(mode, stuff)) - return (client->noClientException); + return Success; if (!VidModeGetFirstModeline(stuff->screen, &mode, &dotClock)) return BadValue; @@ -1230,7 +1228,7 @@ ProcXF86VidModeSwitchToMode(ClientPtr client) if (xf86GetVerbosity() > DEFAULT_XF86VIDMODE_VERBOSITY) ErrorF("SwitchToMode - Succeeded\n"); - return(client->noClientException); + return Success; } } while (VidModeGetNextModeline(stuff->screen, &mode, &dotClock)); @@ -1252,7 +1250,7 @@ ProcXF86VidModeLockModeSwitch(ClientPtr client) if (!VidModeLockZoom(stuff->screen, (short)stuff->lock)) return VidModeErrorBase + XF86VidModeZoomLocked; - return (client->noClientException); + return Success; } static int @@ -1296,14 +1294,14 @@ ProcXF86VidModeGetMonitor(ClientPtr client) rep.sequenceNumber = client->sequence; rep.nhsync = nHsync; rep.nvsync = nVrefresh; - hsyncdata = xalloc(nHsync * sizeof(CARD32)); + hsyncdata = malloc(nHsync * sizeof(CARD32)); if (!hsyncdata) { return BadAlloc; } - vsyncdata = xalloc(nVrefresh * sizeof(CARD32)); + vsyncdata = malloc(nVrefresh * sizeof(CARD32)); if (!vsyncdata) { - xfree(hsyncdata); + free(hsyncdata); return BadAlloc; } @@ -1336,10 +1334,10 @@ ProcXF86VidModeGetMonitor(ClientPtr client) if (rep.modelLength) WriteToClient(client, rep.modelLength, (char *)(VidModeGetMonitorValue(monitor, VIDMODE_MON_MODEL, 0)).ptr); - xfree(hsyncdata); - xfree(vsyncdata); + free(hsyncdata); + free(vsyncdata); - return (client->noClientException); + return Success; } static int @@ -1371,7 +1369,7 @@ ProcXF86VidModeGetViewPort(ClientPtr client) swapl(&rep.y, n); } WriteToClient(client, SIZEOF(xXF86VidModeGetViewPortReply), (char *)&rep); - return (client->noClientException); + return Success; } static int @@ -1389,7 +1387,7 @@ ProcXF86VidModeSetViewPort(ClientPtr client) if (!VidModeSetViewPort(stuff->screen, stuff->x, stuff->y)) return BadValue; - return (client->noClientException); + return Success; } static int @@ -1421,11 +1419,11 @@ ProcXF86VidModeGetDotClocks(ClientPtr client) rep.flags = 0; if (!ClockProg) { - Clocks = xalloc(numClocks * sizeof(int)); + Clocks = malloc(numClocks * sizeof(int)); if (!Clocks) return BadValue; if (!VidModeGetClocks(stuff->screen, Clocks)) { - xfree(Clocks); + free(Clocks); return BadValue; } } @@ -1452,8 +1450,8 @@ ProcXF86VidModeGetDotClocks(ClientPtr client) } } - xfree(Clocks); - return (client->noClientException); + free(Clocks); + return Success; } static int @@ -1472,7 +1470,7 @@ ProcXF86VidModeSetGamma(ClientPtr client) ((float)stuff->green)/10000., ((float)stuff->blue)/10000.)) return BadValue; - return (client->noClientException); + return Success; } static int @@ -1506,7 +1504,7 @@ ProcXF86VidModeGetGamma(ClientPtr client) swapl(&rep.blue, n); } WriteToClient(client, sizeof(xXF86VidModeGetGammaReply), (char *)&rep); - return (client->noClientException); + return Success; } static int @@ -1533,7 +1531,7 @@ ProcXF86VidModeSetGammaRamp(ClientPtr client) if (!VidModeSetGammaRamp(stuff->screen, stuff->size, r, g, b)) return BadValue; - return (client->noClientException); + return Success; } static int @@ -1557,12 +1555,12 @@ ProcXF86VidModeGetGammaRamp(ClientPtr client) if(stuff->size) { ramplen = length * 3 * sizeof(CARD16); - if (!(ramp = xalloc(ramplen))) + if (!(ramp = malloc(ramplen))) return BadAlloc; if (!VidModeGetGammaRamp(stuff->screen, stuff->size, ramp, ramp + length, ramp + (length * 2))) { - xfree(ramp); + free(ramp); return BadValue; } } @@ -1581,10 +1579,10 @@ ProcXF86VidModeGetGammaRamp(ClientPtr client) if(stuff->size) { WriteToClient(client, ramplen, (char*)ramp); - xfree(ramp); + free(ramp); } - return (client->noClientException); + return Success; } @@ -1611,7 +1609,7 @@ ProcXF86VidModeGetGammaRampSize(ClientPtr client) } WriteToClient(client,sizeof(xXF86VidModeGetGammaRampSizeReply),(char*)&rep); - return (client->noClientException); + return Success; } static int @@ -1641,7 +1639,7 @@ ProcXF86VidModeGetPermissions(ClientPtr client) } WriteToClient(client,sizeof(xXF86VidModeGetPermissionsReply),(char*)&rep); - return (client->noClientException); + return Success; } @@ -1657,7 +1655,7 @@ ProcXF86VidModeSetClientVersion(ClientPtr client) REQUEST_SIZE_MATCH(xXF86VidModeSetClientVersionReq); if ((pPriv = VM_GETPRIV(client)) == NULL) { - pPriv = xalloc(sizeof(VidModePrivRec)); + pPriv = malloc(sizeof(VidModePrivRec)); if (!pPriv) return BadAlloc; VM_SETPRIV(client, pPriv); @@ -1665,7 +1663,7 @@ ProcXF86VidModeSetClientVersion(ClientPtr client) pPriv->major = stuff->major; pPriv->minor = stuff->minor; - return (client->noClientException); + return Success; } static int diff --git a/xserver/hw/xfree86/doc/Makefile.am b/xserver/hw/xfree86/doc/Makefile.am index 72bc5d9a8..33ff18ab7 100644 --- a/xserver/hw/xfree86/doc/Makefile.am +++ b/xserver/hw/xfree86/doc/Makefile.am @@ -5,6 +5,4 @@ SUBDIRS = man endif EXTRA_DIST = \ - README.DRI \ - README.modes \ - README.rapidaccess + README.modes diff --git a/xserver/hw/xfree86/doc/Makefile.in b/xserver/hw/xfree86/doc/Makefile.in index c9de0f38f..d3e14bffa 100644 --- a/xserver/hw/xfree86/doc/Makefile.in +++ b/xserver/hw/xfree86/doc/Makefile.in @@ -101,10 +101,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -192,6 +188,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -206,6 +204,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -223,10 +222,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -282,10 +285,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -303,17 +307,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -340,20 +338,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -445,6 +446,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ @@ -593,9 +595,7 @@ target_alias = @target_alias@ @BUILDDOCS_FALSE@SUBDIRS = man @BUILDDOCS_TRUE@SUBDIRS = devel man sgml EXTRA_DIST = \ - README.DRI \ - README.modes \ - README.rapidaccess + README.modes all: all-recursive diff --git a/xserver/hw/xfree86/doc/README.DRI b/xserver/hw/xfree86/doc/README.DRI deleted file mode 100644 index 7fc52eb32..000000000 --- a/xserver/hw/xfree86/doc/README.DRI +++ /dev/null @@ -1,1256 +0,0 @@ - DRI User Guide - - VA Linux Systems, Inc. Professional Services - Graphics. - - 15 June 2001 - -1. Preamble - -1.1 Copyright - -Copyright 2000-2001 by VA Linux Systems, Inc. All Rights Reserved. - -Permission is granted to make and distribute verbatim copies of this document -provided the copyright notice and this permission notice are preserved on all -copies. - -1.2 Trademarks - -OpenGL is a registered trademark and SGI is a trademark of Silicon Graphics, -Inc. Unix is a registered trademark of The Open Group. The `X' device and X -Window System are trademarks of The Open Group. XFree86 is a trademark of -The XFree86 Project. Linux is a registered trademark of Linus Torvalds. -Intel is a registered trademark of Intel Corporation. 3Dlabs, GLINT, and -Oxygen are either registered trademarks or trademarks of 3Dlabs Inc. Ltd. -3dfx, Voodoo3, Voodoo4, and Voodoo5 are registered trademarks of 3dfx Inter- -active, Incorporated. Matrox is a registered trademark of Matrox Electronic -Systems Ltd. ATI Rage and Radeon are registered trademarks of ATI Technolo- -gies, Inc. All other trademarks mentioned are the property of their respec- -tive owners. - -2. Introduction - -With XFree86 4.x and the Direct Rendering Interface (DRI), hardware acceler- -ated 3D graphics can be considered a standard feature on Linux workstations. -Support for other operating systems, such as FreeBSD, is underway. - -This document describes how to use the DRI system and troubleshoot problems -which may occur. Readers should have a basic understanding of Linux, X and -OpenGL. See the resources section at the end for more documentation and -software downloads. - -This document does not cover compilation or installation of XFree86 4.x. It -is assumed that you've already installed a Linux distribution which includes -XFree86 4.x or that you're an experienced Linux developer who has compiled -the DRI for himself. DRI download, compilation and installation instructions -can be found at http://dri.sourceforge.net/DRIcompile.html - -Edits, corrections and updates to this document may be mailed to . - -3. Supported Architectures & Hardware - -3.1 CPU Architectures - -The architectures currently supported by the DRI have grown from the initial -Intel i386 systems to now include the Alpha Processor and the Sun SPARC -machines. - -Intel's SSE (a.k.a. Katmai) instructions are used in optimized vertex trans- -formation functions in Mesa-based drivers. This requires a recent Linux ker- -nel both at compile and runtime. See the DRI Compile Guide for compile-time -requirements. At runtime a check is made to determine if the CPU can execute -SSE instructions. They're disabled otherwise. - -AMD's 3DNow! instructions are also used in optimized vertex transformation -functions in the Mesa-based DRI drivers. 3DNow! is supported in most ver- -sions of Linux. Like the SSE optimizations, a runtime check is made to -determine if the CPU can execute 3DNow! instructions. - -Alpha-based systems can use Compaq's optimized math library for improved 3D -performance. See the DRI Compilation Guide for details. - -3.2 Graphics Hardware - -XFree86 4.2 (or later versions) includes 3D acceleration for the following -graphics hardware: - - o 3dfx, supported on Intel x86, AMD and Alpha: - - o Voodoo5 5500 - - o Voodoo4 4500 - - o Voodoo3 3500 TV - - o Voodoo3 3000 AGP - - o Voodoo3 3000 PCI - - o Voodoo3 2000 AGP - - o Voodoo3 2000 PCI - - o Voodoo Banshee - - o Velocity 100/200 - - There are many configurations of 3dfx cards on the market. Not all have - been tested. - - o Matrox, supported on Intel x86 and AMD: - - o Matrox G200 - - o Matrox G400 - - o Intel i810/i815/i830 (motherboard chipsets) - - o i810 - - o i810-dc100 - - o i810e - - o i815 - - o i830 - - o ATI Rage 128, supported on Intel x86, AMD and Alpha: - - o Rage Fury - - o Rage Magnum - - o XPERT 2000 - - o XPERT 128 - - o XPERT 99 - - o All-in-Wonder 128 - - o Rage 128 PCI (Alpha-based systems) - - Note that both PCI and AGP versions of Rage 128 based cards are sup- - ported at this time. - - o ATI Radeon, supported on Intel x86, AMD and Alpha: - - o Radeon SDR AGP - - o Radeon DDR AGP - - o Radeon 32MB SDR PCI (Alpha-based systems) - - o Radeon 7000, M6 (RV100) - - o Radeon 7200 (R100) - - o Radeon 7500, M7 (RV200) - - o Radeon 8500, 9100 (R200) - - o Radeon 9000, M9 (RV250) - - o 3Dlabs, supported on Intel x86 and AMD: - - o Oxygen GMX 2000 (MX/Gamma based). Note: this driver is no longer - being actively developed. - -Support for other hardware is underway. Most of the DRI development work is -funded by contracts with IHVs. These contracts often prevent us from -announcing drivers before they're released. Queries about upcoming drivers -may not be answerable. - -4. Prerequisite Software - - o The DRI is available in XFree86 4.0 and later. - - o Some hardware drivers require specific versions of the Linux kernel for - AGP support, etc. See section 10 for specifics. - - o You DO NOT need to install Mesa separately. The parts of Mesa needed - for hardware acceleration are already in the XFree86/DRI project. - -5. Kernel Modules - -3D hardware acceleration requires a DRI kernel module that's specific to your -graphics hardware. - -The DRI kernel module version must exactly match your running kernel version. -Since there are so many versions of the kernel, it's difficult to provide -precompiled kernel modules. - -While the Linux source tree includes the DRI kernel module sources, the lat- -est DRI kernel sources will be found in the DRI source tree. - -See the DRI Compilation Guide for information on compiling the DRI kernel -modules. - -XFree86 4.0.1 added automatic kernel module loading to the X server. On -Linux, the X server uses modprobe to load kernel modules. In Linux 2.4.x the -DRM kernel modules should be kept in /lib/modules/2.4.x/ker- -nel/drivers/char/drm/ for automatic loading to work. - -Optionally, DRM kernel modules can be loaded manually with insmod prior to -starting the X server. - -You can verify that the kernel module was installed with lsmod, checking the -X server startup log, and checking that /proc/dri/0 exists. - -6. XF86Config file - -The XFree86 configuration file is usually found in /etc/X11/XF86Config. This -section describes the parts which must be specially set for the DRI. - -First, the XF86Config file must load the GLX and DRI modules: - - Section "Module" - ... - # This loads the GLX module - Load "glx" - # This loads the DRI module - Load "dri" - EndSection - -Next, the DRI section can be used to restrict access to direct rendering. A -client can only use direct rendering if it has permission to open the -/dev/dri/card? file(s). The permissions on these DRI device files is con- -trolled by the "DRI" section in the XF86Config file. - -If you want all of the users on your system to be able to use direct-render- -ing, then use a simple DRI section like this: - - Section "DRI" - Mode 0666 - EndSection - -This section will allow any user with a current connection to the X server to -use direct rendering. - -If you want to restrict the use of direct-rendering to a certain group of -users, then create a group for those users by editing the /etc/group file on -your system. For example, you may want to create a group called xf86dri and -place two users (e.g., fred and jane) in that group. To do that, you might -add the following line to /etc/group: - - xf86dri:x:8000:fred,jane - -You have to be careful that the group id (8000 in this example) is unique. - -Then you would use the following DRI section: - - Section "DRI" - Group "xf86dri" - Mode 0660 - EndSection - -This would limit access to direct-rendering to those users in the xf86dri -group (fred and jane in this example). When other users tried to use direct -rendering, they would fall back to unaccelerated indirect rendering. - -[Note that there is a known bug in XFree86 4.0 that prevents some changes to -the DRI section from taking effect. Until this bug is fixed, if you change -the DRI section, please also remove the /dev/dri directory with the rm -rf -/dev/dri command.] - -Finally, the XF86Config file needs Device and Screen sections specific to -your hardware. Look in section 10: Hardware-Specific Information and Trou- -bleshooting for details. - -7. Memory usage - -Using the 3D features of a graphics card requires more memory than when it's -just used as a 2D device. Double buffering, depth buffering, stencil -buffers, textures, etc. all require extra graphics memory. These features -may require four times the memory used for a simple 2D display. - -If your graphics card doesn't have a lot of memory (less than 16MB, for exam- -ple), you may have to reduce your screen size and/or color depth in order to -use 3D features. Reducing the screen resolution will also leave more space -for texture images, possibly improving 3D performance. If, for example, you -play Quake3 at 1024x768 but start your display at 1600x1200 you might con- -sider restarting X at 1024x768 in order to maximize your texture memory -space. - -The documentation included with your card should have information about maxi- -mum screen size when using 3D. - -8. Using 3D Acceleration - -This section describes how to link your application with libGL.so and verify -that you are in fact using 3D acceleration. - -8.1 libGL.so - -Your OpenGL program must link with the libGL.so.1.2 library provided by -XFree86. The libGL.so.1.2 library contains a GLX protocol encoder for indi- -rect/remote rendering and DRI code for accessing hardware drivers. In par- -ticular, be sure you're not using libGL.so from another source such as Mesa -or the Utah GLX project. - -Unless it was built in a special way, the libGL.so library does not contain -any 3D hardware driver code. Instead, libGL.so dynamically loads the appro- -priate 3D driver during initialization. - -Most simple OpenGL programs also use the GLUT and GLU libraries. A source -for these libraries is listed in the Resources section below. - -8.2 Compiling and linking an OpenGL program - -A simple GLUT/OpenGL program may be compiled and linked as follows: - - gcc program.c -I/usr/local/include -L/usr/local/lib -L/usr/X11R6/lib -lglut -lGLU -lGL -o program - -The -I option is used to specify where the GL/glut.h (and possibly the -GL/gl.h and GL/glu.h) header file may be found. - -The -L options specify where the libglut.so and the X libraries are located. -libGL.so and libGLU.so should be in /usr/lib, as specified by the -Linux/OpenGL ABI standard. - -The -lglut -lGLU -lGL arguments specify that the application should link with -the GLUT, GLU and GL libraries, in that order. - -8.3 Running your OpenGL program - -Simply typing ./program in your shell should execute the program. - -If you get an error message such as - - gears: error in loading shared libraries: libGL.so.1: cannot - open shared object file: No such file or directory - -if means that the libGL.so.1 file is not the right location. Proceed to the -trouble shooting section. - -8.4 libOSMesa.so - -OSMesa (Off-Screen Mesa) is an interface and driver for rendering 3D images -into a user-allocated block of memory rather than an on-screen window. It -was originally developed for Mesa before Mesa became part of the XFree86/DRI -project. It can now be used with the XFree86/DRI libGL.so as well. - -libOSMesa.so implements the OSMesa interface and it must be linked with your -application if you want to use the OSMesa functions. You must also link with -libGL.so. For example: - - gcc osdemo.c -lOSMesa -lGLU -lGL -o osdemo - -In stand-alone Mesa this interface was compiled into the monolithic libGL.so -(formerly libMesaGL.so) library. In XFree86 4.0.1 and later this interface -is implemented in a separate library. - -8.5 glxinfo - -glxinfo is a useful program for checking which version of libGL you're using -as well as which DRI-based driver. Simply type glxinfo and examine the -OpenGL vendor, renderer, and version lines. Among the output you should see -something like this: - - OpenGL vendor string: VA Linux Systems, Inc. - OpenGL renderer string: Mesa DRI Voodoo3 20000224 - OpenGL version string: 1.2 Mesa 3.4 - -or this: - - OpenGL vendor string: VA Linux Systems, Inc. - OpenGL renderer string: Mesa GLX Indirect - OpenGL version string: 1.2 Mesa 3.4 - -The first example indicates that the 3dfx driver is using Voodoo3 hardware. -The second example indicates that no hardware driver was found and indirect, -unaccelerated rendering is being used. - -If you see that indirect rendering is being used when direct rendering was -expected, proceed to the troubleshooting section. - -glxinfo also lists all of the GLX-enhanced visuals available so you can -determine which visuals are double-bufferd, have depth (Z) buffers, stencil -buffers, accumulation buffers, etc. - -8.6 Environment Variables - -The libGL.so library recognizes three environment variables. Normally, none -of them need to be defined. If you're using the csh or tcsh shells, type -setenv VARNAME value to set the variable. Otherwise, if you're using sh or -bash, type export VARNAME=value. - - 1. LIBGL_DEBUG, if defined will cause libGL.so to print error and diagnos- - tic messages. This can help to solve problems. Setting LIBGL_DEBUG to - verbose may provide additional information. - - 2. LIBGL_ALWAYS_INDIRECT, if defined this will force libGL.so to always - use indirect rendering instead of hardware acceleration. This can be - useful to isolate rendering errors. - - 3. LIBGL_DRIVERS_PATH can be used to override the default directories - which are searched for 3D drivers. The value is one or more paths sep- - arated by colons. In a typical XFree86 installation, the 3D drivers - should be in /usr/X11R6/lib/modules/dri/ and LIBGL_DRIVERS_PATH need - not be defined. Note that this feature is disabled for set-uid pro- - grams. This variable replaces the LIBGL_DRIVERS_DIR env var used in - XFree86 4.0. - - 4. MESA_DEBUG, if defined, will cause Mesa-based 3D drivers to print user - error messages to stderr. These are errors that you'd otherwise detect - by calling glGetError. - -Mesa-based drivers (this includes most of the drivers listed above) also -observe many of the existing Mesa environment variables. These include the -MESA_DEBUG and MESA_INFO variables. - -9. General Trouble Shooting - -This section contains information to help you diagnose general problems. See -below for additional information for specific hardware. - -9.1 Bus Mastering - -DMA-based DRI drivers (that's most DRI drivers) cannot function unless bus -mastering is enabled for your graphics card. By default, some systems don't -having bus mastering on. You should enable it in your BIOS. - -Alternately, you can check the status of bus mastering and change the setting -from within Linux. There may be similar procedures for other operating sys- -tems. - -Run lspci (as root) and find the information describing your graphics -adapter. For example: - - 00:00.0 Host bridge: Intel Corporation 440BX/ZX - 82443BX/ZX Host bridge (rev 03) - 00:01.0 PCI bridge: Intel Corporation 440BX/ZX - 82443BX/ZX AGP bridge (rev 03) - 00:07.0 ISA bridge: Intel Corporation 82371AB PIIX4 ISA (rev 02) - 00:07.1 IDE interface: Intel Corporation 82371AB PIIX4 IDE (rev 01) - 00:07.2 USB Controller: Intel Corporation 82371AB PIIX4 USB (rev 01) - 00:07.3 Bridge: Intel Corporation 82371AB PIIX4 ACPI (rev 02) - 00:11.0 Ethernet controller: Intel Corporation 82557 [Ethernet Pro 100] (rev 08) - 00:12.0 SCSI storage controller: Symbios Logic Inc. (formerly NCR) 53c895 (rev 02) - 00:14.0 Multimedia audio controller: Ensoniq ES1371 [AudioPCI-97] (rev 08) - 01:00.0 VGA compatible controller: 3Dfx Interactive, Inc.: Unknown device 0009 (rev 01) - -The bus, device, and function number comprise the device id, which is conven- -tionally written in the form bus:dev.func, or in this case 01:00.0. - -Use the setpci command to examine bit two of register 4 for your graphics -card. This will indicate whether or not bus mastering is enabled. - - setpci -s 01:00.0 4.w - -A hexadecimal value will be printed. Convert the least significant digit to -binary. For example, if you see 3, that's 0011 in binary (bit two is 0). If -you see 7, that's 0111 in binary (bit two is 1). In the first example, bus -mastering is disabled. It's enabled in the second example. - -The following shell script will enabled bus mastering for your graphics card -and host bridge. Run it as root. - - #!/bin/bash - dev=01:00.0 # change as appropriate - echo Enabling bus mastering on device $dev - setpci -s $dev 4.w=$(printf %x $((0x$(setpci -s $dev 4.w)|4))) - dev=00:00.0 - echo Enabling bus mastering on host bridge $dev - setpci -s $dev 4.w=$(printf %x $((0x$(setpci -s $dev 4.w)|4))) - -You can check if this worked by running the first setpci command again. - -9.2 The X Server - - 1. Before you start the X server, verify the appropriate 3D kernel module - is installed. Type lsmod and look for the appropriate kernel module. - For 3dfx hardware you should see tdfx, for example. - - 2. Verify you're running XFree86 4.0 (or newer) and not an older version. - If you run xdpyinfo and look for the following line near the top: - - vendor release number: 4000 - - 3. Verify that your XF86Config file (usually found at /etc/X11/XF86Config) - loads the glx and dri modules and has a DRI section. - - See the Software Resources section below for sample XF86Config files. - - 4. Examine the messages printed during X server startup and check that the - DRM module loaded. Using the Voodoo3 as an example: - - (==) TDFX(0): Write-combining range (0xf0000000,0x2000000) - (II) TDFX(0): Textures Memory 7.93 MB - (0): [drm] created "tdfx" driver at busid "PCI:1:0:0" - (0): [drm] added 4096 byte SAREA at 0xc65dd000 - (0): [drm] mapped SAREA 0xc65dd000 to 0x40013000 - (0): [drm] framebuffer handle = 0xf0000000 - (0): [drm] added 1 reserved context for kernel - (II) TDFX(0): [drm] Registers = 0xfc000000 - (II) TDFX(0): visual configs initialized - (II) TDFX(0): Using XFree86 Acceleration Architecture (XAA) - Screen to screen bit blits - Solid filled rectangles - 8x8 mono pattern filled rectangles - Indirect CPU to Screen color expansion - Solid Lines - Dashed Lines - Offscreen Pixmaps - Driver provided NonTEGlyphRenderer replacement - Setting up tile and stipple cache: - 10 128x128 slots - (==) TDFX(0): Backing store disabled - (==) TDFX(0): Silken mouse enabled - (0): X context handle = 0x00000001 - (0): [drm] installed DRM signal handler - (0): [DRI] installation complete - (II) TDFX(0): direct rendering enabled - - 5. After the X server has started, verify that the required X server - extensions are loaded. Run xdpyinfo and look for the following entries - in the extensions list: - - GLX - SGI-GLX - XFree86-DRI - -9.3 Linking, running and verifying 3D acceleration - -After you've verified that the X server and DRI have started correctly it's -time to verify that the GL library and hardware drivers are working cor- -rectly. - - 1. Verify that you're using the correct libGL.so library with ldd. The - /usr/lib and /usr/X11R6/lib directories are expected locations for - libGL.so. - - Example: - - % ldd /usr/local/bin/glxinfo - libglut.so.3 => /usr/local/lib/libglut.so.3 (0x40019000) - libGLU.so.1 => /usr/local/lib/libGLU.so.1 (0x40051000) - libGL.so.1 => /usr/lib/libGL.so.1 (0x40076000) - libXmu.so.6 => /usr/X11R6/lib/libXmu.so.6 (0x402ee000) - libXi.so.6 => /usr/X11R6/lib/libXi.so.6 (0x40301000) - libm.so.6 => /lib/libm.so.6 (0x40309000) - libc.so.6 => /lib/libc.so.6 (0x40325000) - libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x40419000) - libXt.so.6 => /usr/X11R6/lib/libXt.so.6 (0x404bd000) - libSM.so.6 => /usr/X11R6/lib/libSM.so.6 (0x40509000) - libICE.so.6 => /usr/X11R6/lib/libICE.so.6 (0x40512000) - libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x40529000) - libvga.so.1 => /usr/lib/libvga.so.1 (0x40537000) - libpthread.so.0 => /lib/libpthread.so.0 (0x4057d000) - /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000) - - 2. You may also double check that libGL.so is in fact DRI-capable. Run - strings libGL.so.1.2 | grep DRI and look for symbols prefixed with - "XF86DRI", such as "XF86DRIQueryExtension". - - 3. To be safe one should run ldconfig after installing libGL.so to be sure - the runtime loader will find the proper library. - - 4. Verify that the appropriate 3D driver is in /usr/X11R6/lib/modules/dri/ - For example, the 3dfx driver will be named tdfx_dri.so. - - 5. Set the LIBGL_DEBUG environment variable. This will cause libGL.so to - print an error message if it fails to load a DRI driver. Any error - message printed should be self-explanatory. - - 6. Run glxinfo. Note the line labeled "OpenGL renderer string". It - should have a value which starts with "Mesa DRI" followed by the name - of your hardware. - - 7. Older Linux OpenGL applications may have been linked against Mesa's GL - library and will not automatically use libGL.so. In some cases, making - symbolic links from the Mesa GL library to libGL.so.1 will solve the - problem: - - ln -s libGL.so.1 libMesaGL.so.3 - - In other cases, the application will have to be relinked against the - new XFree86 libGL.so. - - It is reported that part of the problem is that running ldconfig will - silently rewrite symbolic links based on the SONAME field in libraries. - -If you're still having trouble, look in the next section for information spe- -cific to your graphics card. - -10. Hardware-Specific Information and Troubleshooting - -This section presents hardware-specific information for normal use and trou- -bleshooting. - -10.1 3dfx Banshee, Voodoo3, Voodoo4 and Voodoo5 Series - -10.1.1 Requirements - -The 3dfx DRI driver requires special versions of the 3dfx Glide library. -Different versions of Glide are needed for Banshee/Voodoo3 than for -Voodoo4/5. The Glide libraries can be downloaded from the DRI website. - -10.1.2 Configuration - -Your XF86Config file's device section must specify the tdfx device. For -example: - - Section "Device" - Identifier "Voodoo3" - VendorName "3dfx" - Driver "tdfx" - EndSection - -Or, - - Section "Device" - Identifier "Voodoo5" - VendorName "3dfx" - Driver "tdfx" - EndSection - -The Screen section should then reference the Voodoo device: - - Section "Screen" - Identifier "Screen 1" - Device "Voodoo3" - Monitor "High Res Monitor" - DefaultDepth 16 - Subsection "Display" - Depth 16 - Modes "1280x1024" "1024x768" "800x600" "640x480" - ViewPort 0 0 - EndSubsection - EndSection - -Or, - - Section "Screen" - Identifier "Screen 1" - Device "Voodoo5" - Monitor "High Res Monitor" - DefaultDepth 24 - Subsection "Display" - Depth 16 - Modes "1280x1024" "1024x768" "800x600" "640x480" - ViewPort 0 0 - EndSubsection - Subsection "Display" - Depth 24 - Modes "1280x1024" "1024x768" "800x600" "640x480" - ViewPort 0 0 - EndSubsection - EndSection - -The kernel module for 3dfx hardware is named tdfx.o and should be installed -in /lib/modules/2.4.x/kernel/drivers/char/drm/. It will be automatically -loaded by the Xserver if needed. - -The DRI 3D driver for 3dfx hardware should be in /usr/X11R6/lib/mod- -ules/dri/tdfx_dri.so. This will be automatically loaded by libGL.so. - -The Voodoo5 supports 3D rendering in 16 and 32 bpp modes. When running in -32bpp mode an 8-bit stencil buffer and 24-bit Z (depth) buffer are offered. -When running in 16bpp mode only a 16-bit Z (depth) buffer is offered and -stencil is implemented in software. - -A software-based accumulation buffer is available in both 16 and 32bpp modes. - -10.1.3 Troubleshooting - - o If you try to run an OpenGL application and see an error message similar - to - - gd error (glide): gd error (glide): grSstSelect: non-existent SSTgd error (glide): grSstSelect: non-existent SSTS - - it means that you have the wrong version of the Glide library for your - hardware. - - o 3D acceleration for Banshee and Voodoo3 is only supported in the 16 - bit/pixel screen mode. Use xdpyinfo to verify that all your visuals are - depth 16. Edit your XF86Config file if needed. - - o The /dev/3dfx device is not used for DRI; it's only for Glide on older - 3dfx hardware. - - o Different versions of Glide are needed for Voodoo3 and Voodoo5. See the - DRI website's resources page to download the right version of Glide. - - o Voodoo4/5 may be run at 24bpp (instead of 32bpp, the default) but 3D - acceleration is not supported in that mode. 32bpp mode is fully 3D - accelerated. - -10.1.4 Performance and Features - - o Normally, buffer swapping in double-buffered applications is synchro- - nized to your monitor's refresh rate. This may be overridden by setting - the FX_GLIDE_SWAPINTERVAL environment variable. The value of this vari- - able indicates the maximum number of swap buffer commands can be - buffered. Zero allows maximum frame rate. - - o On Voodoo4/5, rendering with 16-bits/texel textures is faster than using - 32-bit per texel textures. The internalFormat parameter to glTexImage2D - can be used to control texel size. Quake3 and other games let you con- - trol this as well. - - o The glTexEnv mode GL_BLEND is not directly supported by the Voodoo3 - hardware. It can be accomplished with a multipass algorithm but it's - not implemented at this time. Applications which use that mode, such as - the Performer Town demo, may become sluggish when falling back to soft- - ware rendering to render in that mode. - - o The Voodoo3/Banshee driver reverts to software rendering under the fol- - lowing conditions: - - o Setting GL_LIGHT_MODEL_COLOR_CONTROL to GL_SEPARATE_SPECULAR_COLOR. - - o Enabling line stippling or polygon stippling. - - o Enabling point smoothing or polygon smoothing. - - o Enabling line smoothing when line width is not 1.0. That is, - antialiased lines are done in hardware only when the line width is - 1.0. - - o Using 1-D or 3-D texture maps. - - o Using the GL_BLEND texture environment. - - o Using stencil operations. - - o Using the accumulation buffer. - - o Using glBlendEquation(GL_LOGIC_OP). - - o Using glDrawBuffer(GL_FRONT_AND_BACK). - - o Using glPolygonMode(face, GL_POINT) or glPolygonMode(face, - GL_LINE). - - o Using point size attenuation (i.e. GL_DISTANCE_ATTENUATION_EXT). - - o Using glColorMask(r, g, b, a) when r!=g or g!=b. - - o The Voodoo5 driver reverts to software rendering under the same condi- - tions Voodoo3 with three exceptions. First, stencil operations are - implemented in hardware when the screen is configured for 32 bits/pixel. - Second, the GL_BLEND texture env mode is fully supported in hardware. - Third, glColorMask is fully supported in hardware when the screen is - configured for 32 bits/pixel. - - o As of January, 2001 the second VSA-100 chip on the Voodoo5 is not yet - operational. Therefore, the board isn't being used to its full capac- - ity. The second VSA-100 chip will allow Scan-Line Interleave (SLI) mode - for full-screen applications and games, potentially doubling the sys- - tem's fill rate. When the second VSA-100 chip is activated glGet- - String(GL_RENDERER) will report Voodoo5 instead of Voodoo4. - - o The lowest mipmap level is sometimes miscolored in trilinear- sampled - polygons. - - o The GL_EXT_texture_env_combine extension is supported on the Voodoo4 and - Voodoo5. - -10.1.5 Known Problems - - o The lowest mipmap level is sometimes miscolored in trilinear- sampled - polygons (Voodoo3/Banshee). - - o Fog doesn't work with orthographic projections. - - o The accuracy of blending operations on Voodoo4/5 isn't always very good. - If you run Glean, you'll find some test failures. - - o The Glide library cannot be used directly; it's only meant to be used - via the tdfx DRI driver. - - o SSystem has problems because of poorly set near and far clipping planes. - The office.unc Performer model also suffers from this problem. - -10.2 Intel i810 - -10.2.1 Requirements - -A kernel with AGP GART support (such as Linux 2.4.x) is needed. - -10.2.2 Configuration - -Your XF86Config file's device section must specify the i810 device, and spec- -ify a usable amount of video ram to reserve. - - Section "Device" - Identifier "i810" - VendorName "Intel" - Driver "i810" - Option "AGPMode" "1" - VideoRam 10000 - EndSection - -The Screen section should then reference the i810 device: - - Section "Screen" - Identifier "Screen 1" - Device "i810" - Monitor "High Res Monitor" - DefaultDepth 16 - Subsection "Display" - Depth 16 - Modes "1280x1024" "1024x768" "800x600" "640x480" - ViewPort 0 0 - EndSubsection - EndSection - -The kernel module for the i810 is named i810.o and should be installed in -/lib/modules/2.4.x/kernel/drivers/char/drm/. It will be automatically loaded -by the Xserver if needed. - -The DRI 3D driver for the i810 should be in /usr/X11R6/lib/mod- -ules/dri/i810_dri.so. This will be automatically loaded by libGL.so. - -10.2.3 Troubleshooting - - o 3D acceleration for the i810 is only available in the 16 bit/pixel - screen mode at this time. 32bpp acceleration is not supported by this - hardware. Use xdpyinfo to verify that all your visuals are depth 16. - Edit your XF86Config file if needed. - - o The i810 uses system ram for video and 3d graphics. The X server will - ordinarily reserve 4mb of ram for graphics, which is too little for an - effective 3d setup. To tell the driver to use a larger amount, specify - a VideoRam option in the Device section of your XF86Config file. A num- - ber between 10000 and 16384 seems adequate for most requirements. If - too little memory is available for DMA buffers, back and depth buffers - and textures, direct rendering will be disabled. - -10.2.4 Performance and Features - -Basically all of the i810 features which can be exposed through OpenGL 1.2 -are implemented. However, the following OpenGL features are implemented in -software and will be slow: - - o Stencil buffer and accumulation buffer operations - - o Blend subtract, min/max and logic op blend modes - - o glColorMask when any mask is set to false - - o GL_SEPARATE_SPECULAR_COLOR lighting mode - - o glDrawBuffer(GL_FRONT_AND_BACK) - - o Using 1D or 3D textures - - o Using texture borders - -10.3 Matrox G200 and G400 - -10.3.1 Requirements - -A kernel with AGP GART support (such as Linux 2.4.x) is needed. - -10.3.2 Configuration - -Your XF86Config file's device section must specify the mga device: - - Section "Device" - Identifier "MGA" - VendorName "Matrox" - Driver "mga" - Option "AGPMode" "1" - VideoRam 32768 - EndSection - -The Screen section should then reference the MGA device: - - Section "Screen" - Identifier "Screen 1" - Device "MGA" - Monitor "High Res Monitor" - DefaultDepth 16 - Subsection "Display" - Depth 16 - Modes "1280x1024" "1024x768" "800x600" "640x480" - ViewPort 0 0 - EndSubsection - EndSection - -To use a 32bpp screen mode, use this Screen section instead: - - Section "Screen" - Identifier "Screen 1" - Device "MGA" - Monitor "High Res Monitor" - DefaultDepth 24 - DefaultFbBpp 32 - Subsection "Display" - Depth 24 - Modes "1280x1024" "1024x768" "800x600" "640x480" - ViewPort 0 0 - EndSubsection - EndSection - -The kernel module for the G200/G400 is named mga.o and should be installed in -/lib/modules/2.4.x/kernel/drivers/char/drm/. It will be automatically loaded -by the Xserver if needed. - -The DRI 3D driver for the G200/G400 should be in /usr/X11R6/lib/mod- -ules/dri/mga_dri.so. This will be automatically loaded by libGL.so. - -10.3.3 Performance and Features - -Software rendering will be used under any of the following conditions: - - o Using glDrawBuffer(GL_FRONT_AND_BACK). - - o Using point, line, or triangle smoothing. - - o Using glLogicOp. - - o Using glPolygonStipple or glLineStipple. - - o Using 1D or 3D textures. - - o Using texture borders. - - o Using glDepthFunc(GL_NEVER). - - o Using the accumulation buffer. - -The AGP mode may be set to 1, 2, or 4. One is used by default. Higher AGP -speeds may result in unreliable performance depending on your motherboard. - -Compaq has funded the implementation of AGP accelerated ReadPixels and Draw- -Pixels in this driver. With this implementation, on a G400 drawing directly -from AGP memory (exported to the client), throughput of up to 1 GB/sec has -been measured. - -Additionally Compaq's funding has produced several new extensions in Mesa, -including one (packed_depth_stencil_MESA) which enables Read/DrawPixels func- -tionality to operate directly on the packed 24/8 depth/stencil buffers of -this hardware. - -In order to access this functionality, the application must ensure that all -pixel processing operations are disabled. There are in addition a fairly -complex set of rules regarding which packing/unpacking modes must be used, -and which data formats are supported, and alignment constraints. See the -files in lib/GL/mesa/src/drv/mga/DOCS for a summary of these. The extension -definitions are included in the Mesa 3.4 source distribution. - -10.3.4 IRQ Assignment - -There have been problems in the past with the MGA driver being very sluggish -when the DRI is enabled (to the point of being unusable.) This is caused by -the graphics card not having an interrupt assigned to it. The current DRI -trunk will attempt to detect this condition and bail out gracefully. - -The solution to the above problem is to assign an interrupt to your graphics -card. This is something you must turn on in your system BIOS configuration. -Please consult your system BIOS manual for instructions on how to enable an -interrupt for your graphics card. - -10.3.5 MGA HAL lib - -MGAHALlib.a is a binary library Matrox has provided for use under Linux to -expose functionality for which they can not provide documentation. (For -example TV-Out requires MacroVision be enabled on the output.) This binary -library also sets the pixel/memory clocks to the optimal settings for your -Matrox card. - -Currently the MGAHAL library is required for the G450 to work. You can down- -load this from the driver section on Matrox's website: www.matrox.com/mga - -Here modifications to the DRI build instructions which make the mga ddx -driver use the MGAHAL library: - - 1.Put the following define in your host.def file - #define UseMatroxHal YES - 2. Place mgaHALlib.a in the following directory - xc/programs/Xserver/hw/xfree86/drivers/mga/HALlib/ - -You can use DualHead on the G400/G450 DH cards by creating two device sec- -tions which both point to the same BusID. For most AGP devices the BusID -will be "PCI:1:0:0". Configure your screen section as you would normally -configure XFree86 4.x Multihead. It should be noted that currently the sec- -ond head does not support direct rendering. - -10.3.6 Known Problems - -None. - -10.4 ATI Rage 128 - -10.4.1 Requirements - -A kernel with AGP GART support (such as Linux 2.4.x) is needed. - -10.4.2 Configuration - -Your XF86Config file's device section must specify the ati device: - - Section "Device" - Identifier "Rage128" - VendorName "ATI" - Driver "ati" - Option "AGPMode" "1" - Option "UseCCEFor2D" "false" - EndSection - -The Screen section should then reference the Rage 128 device: - - Section "Screen" - Identifier "Screen 1" - Device "Rage128" - Monitor "High Res Monitor" - DefaultDepth 16 - Subsection "Display" - Depth 16 - Modes "1280x1024" "1024x768" "800x600" "640x480" - ViewPort 0 0 - EndSubsection - Subsection "Display" - Depth 32 - Modes "1280x1024" "1024x768" "800x600" "640x480" - ViewPort 0 0 - EndSubsection - EndSection - -The kernel module for the Rage 128 is named r128.o and should be installed in -/lib/modules/2.4.x/kernel/drivers/char/drm/. It will be automatically loaded -by the Xserver if needed. - -The DRI 3D driver for the Rage 128 should be in /usr/X11R6/lib/mod- -ules/dri/r128_dri.so. This will be automatically loaded by libGL.so. - -You may also set your screen depth to 32 for 32bpp mode. - -10.4.3 Performance and Features - -While PCI Rage 128 based cards are supported, they do not yet support PCI -GART, so they will not perform as well as their AGP counterparts. - -For AGP cards, the AGP mode may be set to 1, 2, or 4. One is used by -default. Higher AGP speeds may result in unreliable performance depending on -your motherboard. - -Note that even at 32bpp there is no alpha channel. - -The following OpenGL features are implemented in software and will be slow: - - o accumulation buffer operations - - o stencil, when using a 16bpp screen - - o Blend subtract, min/max and logic op blend modes - - o GL_SEPARATE_SPECULAR_COLOR lighting mode - - o glDrawBuffer(GL_FRONT_AND_BACK) - - o Using 1D or 3D textures - - o Using texture borders - -10.4.4 Known Problems - -If you experience stability problems you may try setting the UseCCEFor2D -option to true. This will effectively disable 2D hardware acceleration. -Performance will be degraded, of course. - -10.5 ATI Radeon - -10.5.1 Requirements - -A kernel with AGP GART support (such as Linux 2.4.x) is needed. - -10.5.2 Configuration - -Your XF86Config file's device section must specify the ati device: - - Section "Device" - Identifier "Radeon" - VendorName "ATI" - Driver "ati" - Option "AGPMode" "1" - EndSection - -The Screen section should then reference the Radeon device: - - Section "Screen" - Identifier "Screen 1" - Device "Radeon" - Monitor "High Res Monitor" - DefaultDepth 16 - Subsection "Display" - Depth 16 - Modes "1280x1024" "1024x768" "800x600" "640x480" - ViewPort 0 0 - EndSubsection - Subsection "Display" - Depth 32 - Modes "1280x1024" "1024x768" "800x600" "640x480" - ViewPort 0 0 - EndSubsection - EndSection - -The kernel module for the Radeon is named radeon.o and should be installed in -/lib/modules/2.4.x/kernel/drivers/char/drm/. It will be automatically loaded -by the Xserver if needed. - -The DRI 3D driver for the Radeon should be in /usr/X11R6/lib/mod- -ules/dri/radeon_dri.so. This will be automatically loaded by libGL.so. - -You may also set your screen depth to 32 for 32bpp mode. - -10.5.3 Performance and Features - -While this driver supports many of the features of ATI Radeon cards, we do -not yet fully support the card's TCL features. This work is progressing, but -is not yet ready. - -The AGP mode may be set to 1, 2, or 4. One is used by default. Higher AGP -speeds may result in unreliable performance depending on your motherboard. - -The following OpenGL features are implemented in software and will be slow: - - o Blend subtract, blend min/max and blend logicops - - o Stencil and accumulation operations - - o 1D and 3D textures - - o Texture borders - -The GL_EXT_texture_env_combine, GL_EXT_texture_env_add and GL_EXT_tex- -ture_env_dot3 extensions are supported (or will be soon supported in the new -driver based on Mesa 3.5). - -We hope to implement support for the following features in the future: - - o Vertex transformation, clipping and lighting (TCL) - - o Hardware stencil buffer - - o Cube map textures - - o 3D textures - - o Three texture units - -10.5.4 Known Problems - -Certain (early?) revisions of the AMD Irongate chipset have AGPGART problems -which effect Radeon, and other graphics cards. The card may work unreliably, -or not work at all. If the DRM kernel module is not loaded, the 2D Xserver -may work. There's hope that this can be fixed in the future. - -10.6 3DLabs Oxygen GMX 2000 - -The driver for this hardware was experimental and is no longer being devel- -oped or supported. - -11. General Limitations and Known Bugs - -11.1 OpenGL - -The following OpenGL features are not supported at this time: overlays, -stereo, hardware-accelerated indirect rendering. - -OpenGL-like functionality is provided with the Mesa library. XFree86 4.1.0 -uses Mesa 3.4.2. Subsequent releases of XFree86 will use newer versions of -Mesa. When newer versions of Mesa are available, the 3D drivers can be -updated without reinstalling XFree86 or libGL.so. - -11.2 GLX - -The GLX 1.3 API is exported but none of the new 1.3 functions are opera- -tional. - -The new glXGetProcAddressARB function is fully supported. - -GLXPixmap rendering is only supported for indirect rendering contexts. This -is a common OpenGL limitation. Attempting to use a direct rendering context -with a GLXPixmap will result in an X protocol error. - -11.3 Debugging - -Debugging DRI drivers with gdb can be difficult because of the locking -involved. When debugging OpenGL applications, you should avoid stepping -inside the GL functions. If you're trying to debug a DRI driver it's recom- -mended that you do so remotely, from a second system. - -11.4 Scheduling - -When you run multiple GL applications at once you may notice poor time slic- -ing. This is due to an interaction problem with the Linux scheduler which -will be addressed in the future. - -11.5 libGL.so and dlopen() - -A number of popular OpenGL applications on Linux (such as Quake3, HereticII, -Heavy Gear 2, etc) dynamically open the libGL.so library at runtime with -dlopen(), rather than linking with -lGL at compile/link time. - -If dynamic loading of libGL.so is not implemented carefully, there can be a -number of serious problems. Here are the things to be careful of in your -application: - - o Specify the RTLD_GLOBAL flag to dlopen(). If you don't do this then - you'll likely see a runtime error message complaining that _glapi_Con- - text is undefined when libGL.so tries to open a hardware-specific - driver. Without this flag, nested opening of dynamic libraries does not - work. - - o Do not close the library with dlclose() until after XCloseDisplay() has - been called. When libGL.so initializes itself it registers several - callbacks functions with Xlib. When XCloseDisplay() is called those - callback functions are called. If libGL.so has already been unloaded - with dlclose() this will cause a segmentation fault. - - o Your application should link with -lpthread. On Linux, libGL.so uses - the pthreads library in order to provide thread safety. There is appar- - ently a bug in the dlopen()/dlclose() code which causes crashes if the - library uses pthreads but the parent application doesn't. The only - known work-around is to link the application with -lpthread. - -Some applications don't yet incorporate these procedures and may fail. For -example, changing the graphics settings in some video games will expose this -problem. The DRI developers are working with game vendors to prevent this -problem in the future. - -11.6 Bug Database - -The DRI bug database which includes bugs related to specific drivers is at -the SourceForge DRI Bug Database - -Please scan both the open and closed bug lists to determine if your problem -has already been reported and perhaps fixed. - -12. Resources - -12.1 Software - -A collection of useful configuration files, libraries, headers, utilities and -demo programs is available from http://dri.sourceforge.net/res.phtml - -12.2 Documentation - - o General OpenGL information is available at the OpenGL Home Page - - o XFree86 information is available at the XFree86 Home Page - - o Information about the design of the DRI is available from Precision - Insight, Inc. - - o Visit the DRI project on SourceForge.net for the latest development news - about the DRI and 3D drivers. - - o The DRI Compilation Guide explains how to download, compile and install - the DRI for yourself. - -12.3 Support - - o The DRI-users mailing list at SourceForge is a forum for people to dis- - cuss DRI problems. - - o In the future there may be IHV and Linux vendor support resources for - the DRI. - - Generated from XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/DRI.sgml,v 1.28 dawes Exp $ - - diff --git a/xserver/hw/xfree86/doc/README.rapidaccess b/xserver/hw/xfree86/doc/README.rapidaccess deleted file mode 100644 index 39f515ee2..000000000 --- a/xserver/hw/xfree86/doc/README.rapidaccess +++ /dev/null @@ -1,48 +0,0 @@ -The IBM Rapid Access keyboard have some extra buttons -on it to launch programs, control a cd-player and so on. - -These buttons is not functional when the computer is turned -on but have to be activated by sending the codes 0xea 0x71 -to it. - -I've written the following hack to send codes to the keyboard: - --------------------------------------------------------------- -/* gcc -O2 -s -Wall -osend_to_keyboard send_to_keyboard.c */ -#include -#include -#include - -int main( int argc, char *argv[] ) -{ - int i; - - ioperm( 0x60, 3, 1 ); - - for( i = 1; i < argc; i++ ) { - int x = strtol( argv[i], 0, 16 ); - - usleep( 300 ); - outb( x, 0x60 ); - } - - return 0; -} --------------------------------------------------------------- - -As root you can then call this program (in your boot scripts) -as "send_to_keyboard ea 71" to turn on the extra buttons. - -It's not a good idea to run several instances of this program -at the same time. It is a hack but it works. If you try to -send other codes to the keyboard it probably will lock up. -For other codes see: - -http://www.win.tue.nl/~aeb/linux/kbd/scancodes-2.html#ss2.22 - --- -Dennis Björklund - - - -$XFree86$ diff --git a/xserver/hw/xfree86/doc/devel/Makefile.in b/xserver/hw/xfree86/doc/devel/Makefile.in index 2137e021c..ea585dd38 100644 --- a/xserver/hw/xfree86/doc/devel/Makefile.in +++ b/xserver/hw/xfree86/doc/devel/Makefile.in @@ -95,10 +95,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -186,6 +182,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -200,6 +198,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -217,10 +216,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -276,10 +279,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -297,17 +301,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -334,20 +332,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -439,6 +440,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/xfree86/doc/man/Makefile.in b/xserver/hw/xfree86/doc/man/Makefile.in index bb981b6e0..872c0c3d9 100644 --- a/xserver/hw/xfree86/doc/man/Makefile.in +++ b/xserver/hw/xfree86/doc/man/Makefile.in @@ -108,10 +108,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -199,6 +195,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -213,6 +211,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -230,10 +229,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -289,10 +292,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -310,17 +314,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -347,20 +345,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -452,6 +453,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/xfree86/doc/man/Xorg.man.pre b/xserver/hw/xfree86/doc/man/Xorg.man.pre index 7da30adeb..289fd7e38 100644 --- a/xserver/hw/xfree86/doc/man/Xorg.man.pre +++ b/xserver/hw/xfree86/doc/man/Xorg.man.pre @@ -1,4 +1,6 @@ .\" $XdotOrg: xserver/xorg/hw/xfree86/doc/man/Xorg.man.pre,v 1.3 2005/07/04 18:41:01 ajax Exp $ +.\" shorthand for double quote that works everywhere. +.ds q \N'34' .TH __xservername__ __appmansuffix__ __vendorversion__ .SH NAME __xservername__ - X11R7 X server @@ -448,6 +450,14 @@ Immediately kills the server -- no questions asked. It can be disabled by setting the .B DontZap __xconfigfile__(__filemansuffix__) file option to a TRUE value. +.PP +.RS 8 +It should be noted that zapping is triggered by the +.B Terminate_Server +action in the keyboard map. This action is not part of the default keymaps +but can be enabled with the XKB option +.B \*qterminate:ctrl_alt_bksp\*q. +.RE .TP 8 .B Ctrl+Alt+Keypad-Plus Change video mode to next one specified in the configuration file. diff --git a/xserver/hw/xfree86/doc/man/xorg.conf.man.pre b/xserver/hw/xfree86/doc/man/xorg.conf.man.pre index f7ff6f617..6b3636fff 100644 --- a/xserver/hw/xfree86/doc/man/xorg.conf.man.pre +++ b/xserver/hw/xfree86/doc/man/xorg.conf.man.pre @@ -1065,35 +1065,85 @@ of the class. If none of the optional entries appear, the .B InputClass section is generic and will match any input device. If more than one of these entries appear, they all must match for the configuration to apply. -The allowed matching entries are shown below. .PP +There are two types of match entries used in +.B InputClass +sections. The first allows various tokens to be matched against attributes +of the device. An entry can be constructed to match attributes from different +devices by separating arguments with a '|' character. Multiple entries of the +same type may be supplied to add multiple matching conditions on the same +attribute. For example: +.PP +.RS 4 +.nf +.B "Section \*qInputClass\*q" +.B " Identifier \*qMy Class\*q" +.B " # product string must contain example and +.B " # either gizmo or gadget +.B " MatchProduct \*qexample\*q +.B " MatchProduct \*qgizmo|gadget\*q +.I " ..." +.B "EndSection" +.fi +.RE .TP 7 .BI "MatchProduct \*q" matchproduct \*q This entry can be used to check if the substring .RI \*q matchproduct \*q -occurs in the device's product name. Multiple substrings can be matched by -separating arguments with a '|' character. +occurs in the device's product name. .TP 7 .BI "MatchVendor \*q" matchvendor \*q This entry can be used to check if the substring .RI \*q matchvendor \*q -occurs in the device's vendor name. Multiple substrings can be matched by -separating arguments with a '|' character. +occurs in the device's vendor name. .TP 7 .BI "MatchDevicePath \*q" matchdevice \*q This entry can be used to check if the device file matches the .RI \*q matchdevice \*q -pathname pattern. Multiple patterns can be matched by separating arguments -with a '|' character. +pathname pattern. +.TP 7 +.BI "MatchOS \*q" matchos \*q +This entry can be used to check if the operating system matches the +case-insensitive +.RI \*q matchos \*q +string. This entry is only supported on platforms providing the +.BR uname (2) +system call. +.TP 7 +.BI "MatchPnPID \*q" matchpnp \*q +The device's Plug and Play (PnP) ID can be checked against the +.RI \*q matchpnp \*q +shell wildcard pattern. +.TP 7 +.BI "MatchUSBID \*q" matchusb \*q +The device's USB ID can be checked against the +.RI \*q matchusb \*q +shell wildcard pattern. The ID is constructed as lowercase hexadecimal numbers +separated by a ':'. This is the same format as the +.BR lsusb (8) +program. +.TP 7 +.BI "MatchDriver \*q" matchdriver \*q +Check the case-sensitive string +.RI \*q matchdriver \*q +against the currently configured driver of the device. Ordering of sections +using this entry is important since it will not match unless the driver has +been set by the config backend or a previous +.B InputClass +section. .TP 7 .BI "MatchTag \*q" matchtag \*q This entry can be used to check if tags assigned by the config backend matches the .RI \*q matchtag \*q -pattern. Multiple patterns can be matched by separating arguments -with a '|' character. A match is found if at least one of the tags given in +pattern. A match is found if at least one of the tags given in .RI \*q matchtag \*q matches at least one of the tags assigned by the backend. +.PP +The second type of entry is used to match device types. These entries take a +boolean argument similar to +.B Option +entries. .TP 7 .BI "MatchIsKeyboard \*q" bool \*q .TP 7 @@ -1106,9 +1156,6 @@ matches at least one of the tags assigned by the backend. .BI "MatchIsTouchpad \*q" bool \*q .TP 7 .BI "MatchIsTouchscreen \*q" bool \*q -Match device types. These entries take a boolean argument similar to -.B Option -entries. .PP When an input device has been matched to the .B InputClass @@ -1654,6 +1701,14 @@ at startup. By default, the server will attempt to enable all connected monitors. (RandR 1.2-supporting drivers only) .TP 7 +.BI "Option " "\*qDefaultModes\*q " \*qbool\*q +This optional entry specifies whether the server should add supported default +modes to the list of modes offered on this monitor. By default, the server +will add default modes; you should only disable this if you can guarantee +that EDID will be available at all times, or if you have added custom modelines +which the server can use. +(RandR 1.2-supporting drivers only) +.TP 7 .BI "Option " "\*qMinClock\*q " \*qfrequency\*q This optional entry specifies the minimum dot clock, in kHz, that is supported by the monitor. @@ -2334,8 +2389,7 @@ section for a dual headed configuration with two mice: .SH "DRI SECTION" This optional section is used to provide some information for the Direct Rendering Infrastructure. -Details about the format of this section -can be found in the README.DRI document, which is also available on-line at +Details about the format of this section can be found on-line at .IR . .SH "VENDOR SECTION" The optional diff --git a/xserver/hw/xfree86/doc/sgml/DESIGN.sgml b/xserver/hw/xfree86/doc/sgml/DESIGN.sgml deleted file mode 100644 index e95df7999..000000000 --- a/xserver/hw/xfree86/doc/sgml/DESIGN.sgml +++ /dev/null @@ -1,7414 +0,0 @@ - %defs; - - - - - - - - - - - - - - - - - - - - - - -] > - -
- -XFree86 server 4.x Design (DRAFT) -<author>The XFree86 Project, Inc -<and>Updates for X11R&relvers; by Jim Gettys -<date>19 December 2003 - - - - - - - -<ident> -$XFree86: xc/programs/Xserver/hw/xfree86/doc/sgml/DESIGN.sgml,v 1.53 2003/08/23 14:10:14 dawes Exp $ -</ident> - - -<p> -<bf>NOTE</bf>: This is a DRAFT document, and the interfaces described here -are subject to change without notice. - - -<sect>Preface -<p> - -The broad design principles are: -<itemize> - <item>keep it reasonable - <itemize> - <item>We cannot rewrite the complete server - <item>We don't want to re-invent the wheel - </itemize> - <item>keep it modular - <itemize> - <item>As many things as possible should go into modules - <item>The basic loader binary should be minimal - <item>A clean design with well defined layering is important - <item>DDX specific global variables are a nono - <item>The structure should be flexible enough to allow - future extensions - <item> The structure should minimize duplication of common code - </itemize> - <item>keep important features in mind - <itemize> - <item>multiple screens, including multiple instances of drivers - <item>mixing different color depths and visuals on different - and ideally even on the same screen - <item>better control of the PCI device used - <item>better config file parser - <item>get rid of all VGA compatibility assumptions - </itemize> -</itemize> - -Unless we find major deficiencies in the DIX layer, we should avoid -making changes there. - -<sect>The xorg.conf File -<p> - -The xorg.conf file format is similar to the old format, with the following -changes: - -<sect1>&k.device; section -<p> - - The &k.device; sections are similar to what they used to be, and - describe hardware-specific information for a single video card. - &k.device; - Some new keywords are added: - - - <descrip> - <tag>Driver "drivername"</tag> - Specifies the name of the driver to be used for the card. This - is mandatory. - <tag>BusID "busslot"</tag> - Specifies uniquely the location of the card on the bus. The - purpose is to identify particular cards in a multi-headed - configuration. The format of the argument is intentionally - vague, and may be architecture dependent. For a PCI bus, it - is something like "bus:slot:func". - </descrip> - - A &k.device; section is considered ``active'' if there is a reference - to it in an active &k.screen; section. - -<sect1>&k.screen; section -<p> - - The &k.screen; sections are similar to what they used to be. They - no longer have a &k.driver; keyword, but an &k.identifier; keyword - is added. (The &k.driver; keyword may be accepted in place of the - &k.identifier; keyword for compatibility purposes.) The identifier - can be used to identify which screen is to be active when multiple - &k.screen sections are present. It is possible to specify the active - screen from the command line. A default is chosen in the absence - of one being specified. A &k.screen; section is considered ``active'' - if there is a reference to it either from the command line, or from - an active &k.serverlayout; section. - -<sect1>&k.inputdevice; section -<p> - - The &k.inputdevice; section is a new section that describes - configuration information for input devices. It replaces the old - &s.key;Keyboard&e.key;, &s.key;Pointer&e.key; and &s.key;XInput&e.key; - sections. Like the &k.device; section, it has two mandatory keywords: - &k.identifier; and &k.driver;. For compatibility purposes the old - &s.key;Keyboard&e.key; and &s.key;Pointer&e.key; sections are - converted by the parser into &k.inputdevice; sections as follows: - - <descrip> - <tag>&s.key;Keyboard&e.key;</tag> - &k.identifier; "Implicit Core Keyboard"<newline> - &k.driver; "keyboard" - <tag>&s.key;Pointer&e.key;</tag> - &k.identifier; "Implicit Core Pointer"<newline> - &k.driver; "mouse" - </descrip> - - An &k.inputdevice; section is considered active if there is a - reference to it in an active &k.serverlayout; section. An - &k.inputdevice; section may also be referenced implicitly if there - is no &k.serverlayout; section, if the &s.cmd;-screen&e.cmd; command - line options is used, or if the &k.serverlayout; section doesn't - reference any &k.inputdevice; sections. In this case, the first - sections with drivers "keyboard" and "mouse" are used as the core - keyboard and pointer respectively. - -<sect1>&k.serverlayout; section -<p> - - The &k.serverlayout; section is a new section that is used to identify - which &k.screen; sections are to be used in a multi-headed configuration, - and the relative layout of those screens. It also identifies which - &k.inputdevice; sections are to be used. Each &k.serverlayout section - has an identifier, a list of &k.screen; section identifiers, and a list of - &k.inputdevice; section identifiers. &k.serverflags; options may also be - included in a &k.serverlayout; section, making it possible to override - the global values in the &k.serverflags; section. - - A &k.serverlayout; section can be made active by being referenced on - the command line. In the absence of this, a default will be chosen - (the first one found). The screen names may optionally be followed - by a number specifying the preferred screen number, and optionally - by information specifying the physical positioning of the screen, - either in absolute terms or relative to another screen (or screens). - When no screen number is specified, they are numbered according to - the order in which they are listed. The old (now obsolete) method - of providing the positioning information is to give the names of - the four adjacent screens. The order of these is top, bottom, left, - right. Here is an example of a &k.serverlayout; section for two - screens using the old method, with the second located to the right - of the first: - - <code> - Section "ServerLayout" - Identifier "Main Layout" - Screen 0 "Screen 1" "" "" "" "Screen 2" - Screen 1 "Screen 2" - Screen "Screen 3" - EndSection - </code> - - The preferred way of specifying the layout is to explicitly specify - the screen's location in absolute terms or relative to another - screen. - - In the absolute case, the upper left corner's coordinates are given - after the &s.key;Absolute&e.key; keyword. If the coordinates are - omitted, a value of &s.code;(0,0)&e.code; is assumed. An example - of absolute positioning follows: - - <code> - Section "ServerLayout" - Identifier "Main Layout" - Screen 0 "Screen 1" Absolute 0 0 - Screen 1 "Screen 2" Absolute 1024 0 - Screen "Screen 3" Absolute 2048 0 - EndSection - </code> - - In the relative case, the position is specified by either using one of - the following keywords followed by the name of the reference screen: - - <quote> - &s.key;RightOf&nl; - LeftOf&nl; - Above&nl; - Below&nl; - Relative&e.key; - </quote> - - When the &s.key;Relative&e.key; keyword is used, the reference screen - name is followed by the coordinates of the new screen's origin - relative to reference screen. The following example shows how to use - some of the relative positioning options. - - <code> - Section "ServerLayout" - Identifier "Main Layout" - Screen 0 "Screen 1" - Screen 1 "Screen 2" RightOf "Screen 1" - Screen "Screen 3" Relative "Screen 1" 2048 0 - EndSection - </code> - -<sect1>Options -<p> - - Options are used more extensively. They may appear in most sections - now. Options related to drivers can be present in the &k.screen;, - &k.device; and &k.monitor; sections and the &k.display; subsections. - The order of precedence is &k.display;, &k.screen;, &k.monitor;, - &k.device;. Options have been extended to allow an optional value - to be specified in addition to the option name. For more details - about options, see the <ref id="options" name="Options"> section - for details. - -<sect>Driver Interface -<p> - -The driver interface consists of a minimal set of entry points that are -required based on the external events that the driver must react to. -No non-essential structure is imposed on the way they are used beyond -that. This is a significant difference compared with the old design. - -The entry points for drawing operations are already taken care of by -the framebuffer code (including, XAA). Extensions and enhancements to -framebuffer code are outside the scope of this document. - -This approach to the driver interface provides good flexibility, but does -increase the complexity of drivers. To help address this, the XFree86 -common layer provides a set of ``helper'' functions to take care of things -that most drivers need. These helpers help minimise the amount of code -duplication between drivers. The use of helper functions by drivers is -however optional, though encouraged. The basic philosophy behind the -helper functions is that they should be useful to many drivers, that -they should balance this against the complexity of their interface. It -is inevitable that some drivers may find some helpers unsuitable and -need to provide their own code. - -Events that a driver needs to react to are: - - <descrip> - <tag>ScreenInit</tag> - - An initialisation function is called from the DIX layer for each - screen at the start of each server generation. - - <tag>Enter VT</tag> - - The server takes control of the console. - - <tag>Leave VT</tag> - - The server releases control of the console. - - <tag>Mode Switch</tag> - - Change video mode. - - <tag>ViewPort change</tag> - - Change the origin of the physical view port. - - <tag>ScreenSaver state change</tag> - - Screen saver activation/deactivation. - - <tag>CloseScreen</tag> - - A close screen function is called from the DIX layer for each screen - at the end of each server generation. - </descrip> - - -In addition to these events, the following functions are required by -the XFree86 common layer: - - <descrip> - <tag>Identify</tag> - - Print a driver identifying message. - - <tag>Probe</tag> - - This is how a driver identifies if there is any hardware present that - it knows how to drive. - - <tag>PreInit</tag> - - Process information from the xorg.conf file, determine the - full characteristics of the hardware, and determine if a valid - configuration is present. - </descrip> - -The VidMode extension also requires: - - <descrip> - <tag>ValidMode</tag> - - Identify if a new mode is usable with the current configuration. - The PreInit function (and/or helpers it calls) may also make use - of the ValidMode function or something similar. - </descrip> - - -Other extensions may require other entry points. The drivers will -inform the common layer of these in such cases. - -<sect>Resource Access Control Introduction -<p> - -Graphics devices are accessed through ranges in I/O or memory space. -While most modern graphics devices allow relocation of such ranges many -of them still require the use of well established interfaces such as -VGA memory and IO ranges or 8514/A IO ranges. With modern buses (like -PCI) it is possible for multiple video devices to share access to these -resources. The RAC (Resource Access Control) subsystem provides a -mechanism for this. - -<sect1>Terms and Definitions -<p> - -<sect2>Bus -<p> - - ``Bus'' is ambiguous as it is used for different things: it may refer - to physical incompatible extension connectors in a computer system. - The RAC system knows two such systems: The ISA bus and the PCI bus. - (On the software level EISA, MCA and VL buses are currently treated - like ISA buses). ``Bus'' may also refer to logically different - entities on a single bus system which are connected via bridges. A - PCI system may have several distinct PCI buses connecting each other - by PCI-PCI bridges or to the host CPU by HOST-PCI bridges. - - Systems that host more than one bus system link these together using - bridges. Bridges are a concern to RAC as they might block or pass - specific resources. PCI-PCI bridges may be set up to pass VGA - resources to the secondary bus. PCI-ISA buses pass any resources not - decoded on the primary PCI bus to the ISA bus. This way VGA resources - (although exclusive on the ISA bus) can be shared by ISA and PCI - cards. Currently HOST-PCI bridges are not yet handled by RAC as they - require specific drivers. - -<sect2>Entity -<p> - - The smallest independently addressable unit on a system bus is - referred to as an entity. So far we know ISA and PCI entities. PCI - entities can be located on the PCI bus by an unique ID consisting of - the bus, card and function number. - -<sect2>Resource -<p> - - ``Resource'' refers to a range of memory or I/O addresses an entity - can decode. - - If a device is capable of disabling this decoding the resource is - called sharable. For PCI devices a generic method is provided to - control resource decoding. Other devices will have to provide a - device specific function to control decoding. - - If the entity is capable of decoding this range at a different - location this resource is considered relocatable. - - Resources which start at a specific address and occupy a single - continuous range are called block resources. - - Alternatively resource addresses can be decoded in a way that they - satisfy the conditions: - <quote><verb> - address & mask == base - </verb></quote> - and - <quote><verb> - base & mask == base - </verb></quote> - Resources addressed in such a way are called sparse resources. - -<sect2>Server States -<p> - - The resource access control system knows two server states: the - SETUP and the OPERATING state. The SETUP state is entered whenever - a mode change takes place or the server exits or does VT switching. - During this state all entity resources are under resource access - control. During OPERATING state only those entities are controlled - which actually have shared resources that conflict with others. - -<sect>Control Flow in the Server and Mandatory Driver Functions -<p> - -At the start of each server generation, &s.code;main()&e.code; -(&s.code;dix/main.c&e.code;) calls the DDX function -&s.code;InitOutput()&e.code;. This is the first place that the DDX gets -control. &s.code;InitOutput()&e.code; is expected to fill in the global -&s.code;screenInfo&e.code; struct, and one -&s.code;screenInfo.screen[]&e.code; entry for each screen present. Here -is what &s.code;InitOutput()&e.code; does: - -<sect1>Parse the xorg.conf file -<p> - - This is done at the start of the first server generation only. - - The xorg.conf file is read in full, and the resulting information - stored in data structures. None of the parsed information is - processed at this point. The parser data structures are opaque to - the video drivers and to most of the common layer code. - - The entire file is parsed first to remove any section ordering - requirements. - - -<sect1>Initial processing of parsed information and command line options -<p> - - This is done at the start of the first server generation only. - - The initial processing is to determine paths like the - &s.key;ModulePath&e.key;, etc, and to determine which &k.serverlayout;, - &k.screen; and &k.device; sections are active. - - -<sect1>Enable port I/O access -<p> - - Port I/O access is controlled from the XFree86 common layer, and is - ``all or nothing''. It is enabled prior to calling driver probes, at - the start of subsequent server generations, and when VT switching - back to the Xserver. It is disabled at the end of server generations, - and when VT switching away from the Xserver. - - The implementation details of this may vary on different platforms. - - -<sect1>General bus probe -<p> - - This is done at the start of the first server generation only. - - In the case of ix86 machines, this will be a general PCI probe. - The full information obtained here will be available to the drivers. - This information persists for the life of the Xserver. In the PCI - case, the PCI information for all video cards found is available by - calling &s.code;xf86GetPciVideoInfo()&e.code;. - - <quote> - &s.code;pciVideoPtr *xf86GetPciVideoInfo(void)&e.code; - <quote><p> - returns a pointer to a list of pointers to - &s.code;pciVideoRec&e.code; entries, of which there is one for - each detected PCI video card. The list is terminated with a - &s.code;NULL&e.code; pointer. If no PCI video cards were - detected, the return value is &s.code;NULL&e.code;. - - </quote> - </quote> - - After the bus probe, the resource broker is initialised. - - -<sect1>Load initial set of modules -<p> - - This is done at the start of the first server generation only. - - The core server contains a list of mandatory modules. These are loaded - first. Currently the only module on this list is the bitmap font module. - - The next set of modules loaded are those specified explicitly in the - &k.module; section of the config file. - - The final set of initial modules are the driver modules referenced - by the active &k.device; and &k.inputdevice; sections in the config - file. Each of these modules is loaded exactly once. - - -<sect1>Register Video and Input Drivers -<p> - - This is done at the start of the first server generation only. - - When a driver module is loaded, the loader calls its - &s.code;Setup&e.code; function. For video drivers, this function - calls &s.code;xf86AddDriver()&e.code; to register the driver's - &s.code;DriverRec&e.code;, which contains a small set of essential - details and driver entry points required during the early phase of - &s.code;InitOutput()&e.code;. &s.code;xf86AddDriver()&e.code; adds - it to the global &s.code;xf86DriverList[]&e.code; array. - - The &s.code;DriverRec&e.code; contains the driver canonical name, - the &s.code;Identify()&e.code;, - &s.code;Probe()&e.code; and &s.code;AvailableOptions()&e.code; - function entry points as well as a pointer - to the driver's module (as returned from the loader when the driver - was loaded) and a reference count which keeps track of how many - screens are using the driver. The entry driver entry points are - those required prior to the driver allocating and filling in its - &s.code;ScrnInfoRec&e.code;. - - For a static server, the &s.code;xf86DriverList[]&e.code; array is - initialised at build time, and the loading of modules is not done. - - A similar procedure is used for input drivers. The input driver's - &s.code;Setup&e.code; function calls - &s.code;xf86AddInputDriver()&e.code; to register the driver's - &s.code;InputDriverRec&e.code;, which contains a small set of - essential details and driver entry points required during the early - phase of &s.code;InitInput()&e.code;. - &s.code;xf86AddInputDriver()&e.code; adds it to the global - &s.code;xf86InputDriverList[]&e.code; array. For a static server, - the &s.code;xf86InputDriverList[]&e.code; array is initialised at - build time. - - Both the &s.code;xf86DriverList[]&e.code; and - &s.code;xf86InputDriverList[]&e.code; arrays have been initialised - by the end of this stage. - - Once all the drivers are registered, their - &s.code;ChipIdentify()&e.code; functions are called. - - <quote> - &s.code;void ChipIdentify(int flags)&e.code; - <quote> - This is expected to print a message indicating the driver name, - a short summary of what it supports, and a list of the chipset - names that it supports. It may use the xf86PrintChipsets() helper - to do this. - </quote> - </quote> - - <quote> - &s.code;void xf86PrintChipsets(const char *drvname, const char *drvmsg, - &f.indent;SymTabPtr chips)&e.code; - <quote> - This function provides an easy way for a driver's ChipIdentify - function to format the identification message. - </quote> - </quote> - -<sect1>Initialise Access Control -<p> - - This is done at the start of the first server generation only. - - The Resource Access Control (RAC) subsystem is initialised before - calling any driver functions that may access hardware. All generic - bus information is probed and saved (for restoration later). All - (shared resource) video devices are disabled at the generic bus - level, and a probe is done to find the ``primary'' video device. These - devices remain disabled for the next step. - - -<sect1>Video Driver Probe<label id="probe"> -<p> - This is done at the start of the first server generation only. The - &s.code;ChipProbe()&e.code; function of each registered video driver - is called. - - <quote><p> - &s.code;Bool ChipProbe(DriverPtr drv, int flags)&e.code; - <quote><p> - The purpose of this is to identify all instances of hardware - supported by the driver. The flags value is currently either 0, - &s.code;PROBE_DEFAULT&e.code; or &s.code;PROBE_DETECT&e.code;. - &s.code;PROBE_DETECT&e.code; is used if "-configure" or "-probe" - command line arguments are given and indicates to the - &s.code;Probe()&e.code; function that it should not configure the - bus entities and that no xorg.conf information is available. - - The probe must find the active device sections that match the - driver by calling &s.code;xf86MatchDevice()&e.code;. The number - of matches found limits the maximum number of instances for this - driver. If no matches are found, the function should return - &s.code;FALSE&e.code; immediately. - - Devices that cannot be identified by using device-independent - methods should be probed at this stage (keeping in mind that access - to all resources that can be disabled in a device-independent way - are disabled during this phase). The probe must be a minimal - probe. It should just determine if there is a card present that - the driver can drive. It should use the least intrusive probe - methods possible. It must not do anything that is not essential, - like probing for other details such as the amount of memory - installed, etc. It is recommended that the - &s.code;xf86MatchPciInstances()&e.code; helper function be used - for identifying matching PCI devices, and similarly the - &s.code;xf86MatchIsaInstances()&e.code; for ISA (non-PCI) devices - (see the <ref id="rac" name="RAC"> section). These helpers also - checks and claims the appropriate entity. When not using the - helper, that should be done with &s.code;xf86CheckPciSlot()&e.code; - and &s.code;xf86ClaimPciSlot()&e.code; for PCI devices and - &s.code;xf86ClaimIsaSlot()&e.code; for ISA devices (see the - <ref id="rac" name="RAC"> section). - - The probe must register all non-relocatable resources at this - stage. If a resource conflict is found between exclusive resources - the driver will fail immediately. This is usually best done with - the &s.code;xf86ConfigPciEntity()&e.code; helper function - for PCI and &s.code;xf86ConfigIsaEntity()&e.code; for ISA - (see the <ref id="rac" name="RAC"> section). It is possible to - register some entity specific functions with those helpers. When - not using the helpers, the &s.code;xf86AddEntityToScreen()&e.code; - &s.code;xf86ClaimFixedResources()&e.code; and - &s.code;xf86SetEntityFuncs()&e.code; should be used instead (see - the <ref id="rac" name="RAC"> section). - - If a chipset is specified in an active device section which the - driver considers relevant (ie it has no driver specified, or the - driver specified matches the driver doing the probe), the Probe - must return &s.code;FALSE&e.code; if the chipset doesn't match - one supported by the driver. - - If there are no active device sections that the driver considers - relevant, it must return &s.code;FALSE&e.code;. - - Allocate a &s.code;ScrnInfoRec&e.code; for each active instance of the - hardware found, and fill in the basic information, including the - other driver entry points. This is best done with the - &s.code;xf86ConfigIsaEntity()&e.code; helper function for ISA - instances or &s.code;xf86ConfigPciEntity()&e.code; for PCI instances. - These functions allocate a &s.code;ScrnInfoRec&e.code; for active - entities. Optionally &s.code;xf86AllocateScreen()&e.code; - function may also be used to allocate the &s.code;ScrnInfoRec&e.code;. - Any of these functions take care of initialising fields to defined - ``unused'' values. - - Claim the entities for each instance of the hardware found. This - prevents other drivers from claiming the same hardware. - - Must leave hardware in the same state it found it in, and must not - do any hardware initialisation. - - All detection can be overridden via the config file, and that - parsed information is available to the driver at this stage. - - Returns &s.code;TRUE&e.code; if one or more instances are found, - and &s.code;FALSE&e.code; otherwise. - - </quote> - - &s.code;int xf86MatchDevice(const char *drivername, - &f.indent;GDevPtr **driversectlist)&e.code; - <quote><p> - - This function takes the name of the driver and returns via - &s.code;driversectlist&e.code; a list of device sections that - match the driver name. The function return value is the number - of matches found. If a fatal error is encountered the return - value is &s.code;-1&e.code;. - - The caller should use &s.code;xfree()&e.code; to free - &s.code;*driversectlist&e.code; when it is no longer needed. - - </quote> - - &s.code;ScrnInfoPtr xf86AllocateScreen(DriverPtr drv, int flags)&e.code; - <quote><p> - This function allocates a new &s.code;ScrnInfoRec&e.code; in the - &s.code;xf86Screens[]&e.code; array. This function is normally - called by the video driver &s.code;ChipProbe()&e.code; functions. - The return value is a pointer to the newly allocated - &s.code;ScrnInfoRec&e.code;. The &s.code;scrnIndex&e.code;, - &s.code;origIndex&e.code;, &s.code;module&e.code; and - &s.code;drv&e.code; fields are initialised. The reference count - in &s.code;drv&e.code; is incremented. The storage for any - currently allocated ``privates'' pointers is also allocated and - the &s.code;privates&e.code; field initialised (the privates data - is of course not allocated or initialised). This function never - returns on failure. If the allocation fails, the server exits - with a fatal error. The flags value is not currently used, and - should be set to zero. - </quote> - </quote> - - At the completion of this, a list of &s.code;ScrnInfoRecs&e.code; - have been allocated in the &s.code;xf86Screens[]&e.code; array, and - the associated entities and fixed resources have been claimed. The - following &s.code;ScrnInfoRec&e.code; fields must be initialised at - this point: - - <quote><verb> - driverVersion - driverName - scrnIndex(*) - origIndex(*) - drv(*) - module(*) - name - Probe - PreInit - ScreenInit - EnterVT - LeaveVT - numEntities - entityList - access - </verb></quote> - - <tt>(*)</tt> These are initialised when the &s.code;ScrnInfoRec&e.code; - is allocated, and not explicitly by the driver. - - The following &s.code;ScrnInfoRec&e.code; fields must be initialised - if the driver is going to use them: - - <quote><verb> - SwitchMode - AdjustFrame - FreeScreen - ValidMode - </verb></quote> - -<sect1>Matching Screens -<p> - - This is done at the start of the first server generation only. - - After the Probe phase is finished, there will be some number of - &s.code;ScrnInfoRecs&e.code;. These are then matched with the active - &k.screen; sections in the xorg.conf, and those not having an active - &k.screen; section are deleted. If the number of remaining screens - is 0, &s.code;InitOutput()&e.code; sets - &s.code;screenInfo.numScreens&e.code; to &s.code;0&e.code; and - returns. - - At this point the following fields of the &s.code;ScrnInfoRecs&e.code; - must be initialised: - - <quote><verb> - confScreen - </verb></quote> - - -<sect1>Allocate non-conflicting resources -<p> - - This is done at the start of the first server generation only. - - Before calling the drivers again, the resource information collected - from the Probe phase is processed. This includes checking the extent - of PCI resources for the probed devices, and resolving any conflicts - in the relocatable PCI resources. It also reports conflicts, checks - bus routing issues, and anything else that is needed to enable the - entities for the next phase. - - If any drivers registered an &s.code;EntityInit()&e.code; function - during the Probe phase, then they are called here. - - -<sect1>Sort the Screens and pre-check Monitor Information -<p> - - This is done at the start of the first server generation only. - - The list of screens is sorted to match the ordering requested in the - config file. - - The list of modes for each active monitor is checked against the - monitor's parameters. Invalid modes are pruned. - - -<sect1>PreInit -<p> - - This is done at the start of the first server generation only. - - For each &s.code;ScrnInfoRec&e.code;, enable access to the screens entities and call - the &s.code;ChipPreInit()&e.code; function. - - <quote><p> - &s.code;Bool ChipPreInit(ScrnInfoRec screen, int flags)&e.code; - <quote><p> - The purpose of this function is to find out all the information - required to determine if the configuration is usable, and to - initialise those parts of the &s.code;ScrnInfoRec&e.code; that - can be set once at the beginning of the first server generation. - - The number of entities registered for the screen should be checked - against the expected number (most drivers expect only one). The - entity information for each of them should be retrieved (with - &s.code;xf86GetEntityInfo()&e.code;) and checked for the correct - bus type and that none of the sharable resources registered during - the Probe phase was rejected. - - Access to resources for the entities that can be controlled in a - device-independent way are enabled before this function is called. - If the driver needs to access any resources that it has disabled - in an &s.code;EntityInit()&e.code; function that it registered, - then it may enable them here providing that it disables them before - this function returns. - - This includes probing for video memory, clocks, ramdac, and all - other HW info that is needed. It includes determining the - depth/bpp/visual and related info. It includes validating and - determining the set of video modes that will be used (and anything - that is required to determine that). - - This information should be determined in the least intrusive way - possible. The state of the HW must remain unchanged by this - function. Although video memory (including MMIO) may be mapped - within this function, it must be unmapped before returning. Driver - specific information should be stored in a structure hooked into - the &s.code;ScrnInfoRec&e.code;'s &s.code;driverPrivate&e.code; - field. Any other modules which require persistent data (ie data - that persists across server generations) should be initialised in - this function, and they should allocate a ``privates'' index to - hook their data into by calling - &s.code;xf86AllocateScrnInfoPrivateIndex().&e.code; The ``privates'' - data is persistent. - - Helper functions for some of these things are provided at the - XFree86 common level, and the driver can choose to make use of - them. - - All additional resources that the screen needs must be registered - here. This should be done with - &s.code;xf86RegisterResources()&e.code;. If some of the fixed - resources registered in the Probe phase are not needed or not - decoded by the hardware when in the OPERATING server state, their - status should be updated with - &s.code;xf86SetOperatingState()&e.code;. - - Modules may be loaded at any point in this function, and all - modules that the driver will need must be loaded before the end - of this function. Either the &s.code;xf86LoadSubModule()&e.code; - or the &s.code;xf86LoadDrvSubModule()&e.code; function should be - used to load modules depending on whether a - &s.code;ScrnInfoRec&e.code; has been set up. A driver may unload - a module within this function if it was only needed temporarily, - and the &s.code;xf86UnloadSubModule()&e.code; function should be used - to do that. Otherwise there is no need to explicitly unload modules - because the loader takes care of module dependencies and will - unload submodules automatically if/when the driver module is - unloaded. - - The bulk of the &s.code;ScrnInfoRec&e.code; fields should be filled - out in this function. - - &s.code;ChipPreInit()&e.code; returns &s.code;FALSE&e.code; when - the configuration is unusable in some way (unsupported depth, no - valid modes, not enough video memory, etc), and &s.code;TRUE&e.code; - if it is usable. - - It is expected that if the &s.code;ChipPreInit()&e.code; function - returns &s.code;TRUE&e.code;, then the only reasons that subsequent - stages in the driver might fail are lack or resources (like xalloc - failures). All other possible reasons for failure should be - determined by the &s.code;ChipPreInit()&e.code; function. - - </quote> - </quote> - - The &s.code;ScrnInfoRecs&e.code; for screens where the &s.code;ChipPreInit()&e.code; fails are removed. - If none remain, &s.code;InitOutput()&e.code; sets &s.code;screenInfo.numScreens&e.code; to &s.code;0&e.code; and returns. - - At this point, further fields of the &s.code;ScrnInfoRecs&e.code; would normally be - filled in. Most are not strictly mandatory, but many are required - by other layers and/or helper functions that the driver may choose - to use. The documentation for those layers and helper functions - indicates which they require. - - The following fields of the &s.code;ScrnInfoRecs&e.code; should be filled in if the - driver is going to use them: - - <quote><verb> - monitor - display - depth - pixmapBPP - bitsPerPixel - weight (>8bpp only) - mask (>8bpp only) - offset (>8bpp only) - rgbBits (8bpp only) - gamma - defaultVisual - maxHValue - maxVValue - virtualX - virtualY - displayWidth - frameX0 - frameY0 - frameX1 - frameY1 - zoomLocked - modePool - modes - currentMode - progClock (TRUE if clock is programmable) - chipset - ramdac - clockchip - numClocks (if not programmable) - clock[] (if not programmable) - videoRam - biosBase - memBase - memClk - driverPrivate - chipID - chipRev - </verb></quote> - - <quote><p> - &s.code;pointer xf86LoadSubModule(ScrnInfoPtr pScrn, const char *name)&e.code: - and - &s.code;pointer xf86LoadDrvSubModule(DriverPtr drv, const char *name)&e.code: - <quote><p> - Load a module that a driver depends on. This function loads the - module &s.code;name&e.code; as a sub module of the driver. The - return value is a handle identifying the new module. If the load - fails, the return value will be &s.code;NULL&e.code;. If a driver - needs to explicitly unload a module it has loaded in this way, - the return value must be saved and passed to - &s.code;xf86UnloadSubModule()&e.code; when unloading. - - </quote> - - &s.code;void xf86UnloadSubModule(pointer module)&e.code; - <quote><p> - Unloads the module referenced by &s.code;module&e.code;. - &s.code;module&e.code; should be a pointer returned previously - by &s.code;xf86LoadSubModule()&e.code; or - &s.code;xf86LoadDrvSubModule()&e.code; . - - </quote> - </quote> - -<sect1>Cleaning up Unused Drivers -<p> - - At this point it is known which screens will be in use, and which - drivers are being used. Unreferenced drivers (and modules they - may have loaded) are unloaded here. - - -<sect1>Consistency Checks -<p> - - The parameters that must be global to the server, like pixmap formats, - bitmap bit order, bitmap scanline unit and image byte order are - compared for each of the screens. If a mismatch is found, the server - exits with an appropriate message. - - -<sect1>Check if Resource Control is Needed -<p> - - Determine if resource access control is needed. This is the case - if more than one screen is used. If necessary the RAC wrapper module - is loaded. - -<sect1>AddScreen (ScreenInit) -<p> - - At this point, the valid screens are known. - &s.code;AddScreen()&e.code; is called for each of them, passing - &s.code;ChipScreenInit()&e.code; as the argument. - &s.code;AddScreen()&e.code; is a DIX function that allocates a new - &s.code;screenInfo.screen[]&e.code; entry (aka - &s.code;pScreen&e.code;), and does some basic initialisation of it. - It then calls the &s.code;ChipScreenInit()&e.code; function, with - &s.code;pScreen&e.code; as one of its arguments. If - &s.code;ChipScreenInit()&e.code; returns &s.code;FALSE&e.code;, - &s.code;AddScreen()&e.code; returns &s.code;-1&e.code;. Otherwise - it returns the index of the screen. &s.code;AddScreen()&e.code; - should only fail because of programming errors or failure to allocate - resources (like memory). All configuration problems should be - detected BEFORE this point. - - <quote><p> - &s.code;Bool ChipScreenInit(int index, ScreenPtr pScreen, - &f.indent;int argc, char **argv)&e.code; - <quote><p> - This is called at the start of each server generation. - - Fill in all of &s.code;pScreen&e.code;, possibly doing some of - this by calling ScreenInit functions from other layers like mi, - framebuffers (cfb, etc), and extensions. - - Decide which operations need to be placed under resource access - control. The classes of operations are the frame buffer operations - (&s.code;RAC_FB&e.code;), the pointer operations - (&s.code;RAC_CURSOR&e.code;), the viewport change operations - (&s.code;RAC_VIEWPORT&e.code;) and the colormap operations - (&s.code;RAC_COLORMAP&e.code;). Any operation that requires - resources which might be disabled during OPERATING state should - be set to use RAC. This can be specified separately for memory - and IO resources (the &s.code;racMemFlags&e.code; and - &s.code;racIoFlags&e.code; fields of the &s.code;ScrnInfoRec&e.code; - respectively). - - Map any video memory or other memory regions. - - Save the video card state. Enough state must be saved so that - the original state can later be restored. - - Initialise the initial video mode. The &s.code;ScrnInfoRec&e.code;'s - &s.code;vtSema&e.code; field should be set to &s.code;TRUE&e.code; - just prior to changing the video hardware's state. - - </quote> - </quote> - - - The &s.code;ChipScreenInit()&e.code; function (or functions from other - layers that it calls) should allocate entries in the - &s.code;ScreenRec&e.code;'s &s.code;devPrivates&e.code; area by - calling &s.code;AllocateScreenPrivateIndex()&e.code; if it needs - per-generation storage. Since the &s.code;ScreenRec&e.code;'s - &s.code;devPrivates&e.code; information is cleared for each server - generation, this is the correct place to initialise it. - - After &s.code;AddScreen()&e.code; has successfully returned, the - following &s.code;ScrnInfoRec&e.code; fields are initialised: - - <quote><verb> - pScreen - racMemFlags - racIoFlags - </verb></quote> - - The &s.code;ChipScreenInit()&e.code; function should initialise the - &s.code;CloseScreen&e.code; and &s.code;SaveScreen&e.code; fields - of &s.code;pScreen&e.code;. The old value of - &s.code;pScreen->CloseScreen&e.code; should be saved as part of - the driver's per-screen private data, allowing it to be called from - &s.code;ChipCloseScreen()&e.code;. This means that the existing - &s.code;CloseScreen()&e.code; function is wrapped. - -<sect1>Finalising RAC Initialisation -<p> - - After all the &s.code;ChipScreenInit()&e.code; functions have been - called, each screen has registered its RAC requirements. This - information is used to determine which shared resources are requested - by more than one driver and set the access functions accordingly. - This is done following these rules: - - <enum> - <item>The sharable resources registered by each entity are compared. - If a resource is registered by more than one entity the entity - will be marked to indicate that it needs to share this resources - type (IO or MEM). - - <item>A resource marked ``disabled'' during OPERATING state will be - ignored entirely. - - <item>A resource marked ``unused'' will only conflict with an overlapping - resource of an other entity if the second is actually in use - during OPERATING state. - - <item>If an ``unused'' resource was found to conflict but the entity - does not use any other resource of this type the entire resource - type will be disabled for that entity. - </enum> - - -<sect1>Finishing InitOutput() -<p> - - At this point &s.code;InitOutput()&e.code; is finished, and all the - screens have been setup in their initial video mode. - - -<sect1>Mode Switching -<p> - - When a SwitchMode event is received, &s.code;ChipSwitchMode()&e.code; - is called (when it exists): - - <quote><p> - &s.code;Bool ChipSwitchMode(int index, DisplayModePtr mode, int flags)&e.code; - <quote><p> - Initialises the new mode for the screen identified by - &s.code;index;&e.code;. The viewport may need to be adjusted - also. - - </quote> - </quote> - - -<sect1>Changing Viewport -<p> - - When a Change Viewport event is received, - &s.code;ChipAdjustFrame()&e.code; is called (when it exists): - - <quote><p> - &s.code;void ChipAdjustFrame(int index, int x, int y, int flags)&e.code; - <quote><p> - Changes the viewport for the screen identified by - &s.code;index;&e.code;. - - It should be noted that many chipsets impose restrictions on where the - viewport may be placed in the virtual resolution, either for alignment - reasons, or to prevent the start of the viewport from being positioned - within a pixel (as can happen in a 24bpp mode). After calculating the - value the chipset's panning registers need to be set to for non-DGA - modes, this function should recalculate the ScrnInfoRec's - &s.code;frameX0&e.code;, &s.code;frameY0&e.code, &s.code;frameX1&e.code; - and &s.code;frameY1&e.code; fields to correspond to that value. If - this is not done, switching to another mode might cause the position - of a hardware cursor to change. - - </quote> - </quote> - - -<sect1>VT Switching -<p> - - When a VT switch event is received, &s.code;xf86VTSwitch()&e.code; - is called. &s.code;xf86VTSwitch()&e.code; does the following: - - <descrip> - <tag>On ENTER:</tag> - <itemize> - <item>enable port I/O access - - <item>save and initialise the bus/resource state - - <item>enter the SETUP server state - - <item>calls &s.code;ChipEnterVT()&e.code; for each screen - - <item>enter the OPERATING server state - - <item>validate GCs - - <item>Restore fb from saved pixmap for each screen - - <item>Enable all input devices - </itemize> - <tag>On LEAVE:</tag> - <itemize> - <item>Save fb to pixmap for each screen - - <item>validate GCs - - <item>enter the SETUP server state - - <item>calls &s.code;ChipLeaveVT()&e.code; for each screen - - <item>disable all input devices - - <item>restore bus/resource state - - <item>disables port I/O access - </itemize> - </descrip> - - <quote><p> - &s.code;Bool ChipEnterVT(int index, int flags)&e.code; - <quote><p> - This function should initialise the current video mode and - initialise the viewport, turn on the HW cursor if appropriate, - etc. - - Should it re-save the video state before initialising the video - mode? - - </quote> - - &s.code;void ChipLeaveVT(int index, int flags)&e.code; - <quote><p> - This function should restore the saved video state. If - appropriate it should also turn off the HW cursor, and invalidate - any pixmap/font caches. - - </quote> - - Optionally, &s.code;ChipLeaveVT()&e.code; may also unmap memory - regions. If so, &s.code;ChipEnterVT()&e.code; will need to remap - them. Additionally, if an aperture used to access video memory is - unmapped and remapped in this fashion, &s.code;ChipEnterVT()&e.code; - will also need to notify the framebuffer layers of the aperture's new - location in virtual memory. This is done with a call to the screen's - &s.code;ModifyPixmapHeader()&e.code; function, as follows - - <quote><p> - &s.code;(*pScreen->ModifyPixmapHeader)(pScrn->ppix, - &f.indent;-1, -1, -1, -1, -1, <it>NewApertureAddress</it>);&e.code; - <quote><p> - where the &s.code``ppix''&e.code; field in a ScrnInfoRec - points to the pixmap used by the screen's - &s.code;SaveRestoreImage()&e.code; function to hold the screen's - contents while switched out. - - </quote> - </quote> - - Currently, aperture remapping, as described here, should not be - attempted if the driver uses the &s.code;xf8_16bpp&e.code; or - &s.code;xf8_32bpp&e.code; framebuffer layers. A pending - restructuring of VT switching will address this restriction in - the near future. - - </quote> - - Other layers may wrap the &s.code;ChipEnterVT()&e.code; and - &s.code;ChipLeaveVT()&e.code; functions if they need to take some - action when these events are received. - -<sect1>End of server generation -<p> - - At the end of each server generation, the DIX layer calls - &s.code;ChipCloseScreen()&e.code; for each screen: - - <quote><p> - &s.code;Bool ChipCloseScreen(int index, ScreenPtr pScreen)&e.code; - <quote><p> - This function should restore the saved video state and unmap the - memory regions. - - It should also free per-screen data structures allocated by the - driver. Note that the persistent data held in the - &s.code;ScrnInfoRec&e.code;'s &s.code;driverPrivate&e.code; field - should not be freed here because it is needed by subsequent server - generations. - - The &s.code;ScrnInfoRec&e.code;'s &s.code;vtSema&e.code; field - should be set to &s.code;FALSE&e.code; once the video HW state - has been restored. - - Before freeing the per-screen driver data the saved - &s.code;CloseScreen&e.code; value should be restored to - &s.code;pScreen->CloseScreen&e.code;, and that function should - be called after freeing the data. - - </quote> - </quote> - -<sect>Optional Driver Functions -<p> - -The functions outlined here can be called from the XFree86 common layer, -but their presence is optional. - -<sect1>Mode Validation -<p> - - When a mode validation helper supplied by the XFree86-common layer is - being used, it can be useful to provide a function to check for hw - specific mode constraints: - - <quote><p> - &s.code;ModeStatus ChipValidMode(int index, DisplayModePtr mode, - &f.indent;Bool verbose, int flags)&e.code; - <quote><p> - Check the passed mode for hw-specific constraints, and return the - appropriate status value. - - </quote> - </quote> - -<p> -This function may also modify the effective timings and clock of the passed -mode. These have been stored in the mode's &s.code;Crtc*&e.code; and -&s.code;SynthClock&e.code; elements, and have already been adjusted for -interlacing, doublescanning, multiscanning and clock multipliers and dividers. -The function should not modify any other mode field, unless it wants to modify -the mode timings reported to the user by &s.code;xf86PrintModes()&e.code;. - -<p> -The function is called once for every mode in the xorg.conf Monitor section -assigned to the screen, with &s.code;flags&e.code; set to -&s.code;MODECHECK_INITIAL&e.code;. It is subsequently called for every mode -in the xorg.conf Display subsection assigned to the screen, with -&s.code;flags&e.code; set to &s.code;MODECHECK_FINAL&e.code;. In the second -case, the mode will have successfully passed all other tests. In addition, -the &s.code;ScrnInfoRec&e.code;'s &s.code;virtualX&e.code;, -&s.code;virtualY&e.code; and &s.code;displayWidth&e.code; fields will have been -set as if the mode to be validated were to be the last mode accepted. - -<p> -In effect, calls with MODECHECK_INITIAL are intended for checks that do not -depend on any mode other than the one being validated, while calls with -MODECHECK_FINAL are intended for checks that may involve more than one mode. - -<sect1>Free screen data -<p> - - When a screen is deleted prior to the completion of the ScreenInit - phase the &s.code;ChipFreeScreen()&e.code; function is called when defined. - - <quote><p> - &s.code;void ChipFreeScreen(int scrnindex, int flags)&e.code; - <quote><p> - Free any driver-allocated data that may have been allocated up to - and including an unsuccessful &s.code;ChipScreenInit()&e.code; - call. This would predominantly be data allocated by - &s.code;ChipPreInit()&e.code; that persists across server - generations. It would include the &s.code;driverPrivate&e.code;, - and any ``privates'' entries that modules may have allocated. - - </quote> - </quote> - - -<sect>Recommended driver functions -<p> - -The functions outlined here are for internal use by the driver only. -They are entirely optional, and are never accessed directly from higher -layers. The sample function declarations shown here are just examples. -The interface (if any) used is up to the driver. - -<sect1>Save -<p> - - Save the video state. This could be called from &s.code;ChipScreenInit()&e.code; and - (possibly) &s.code;ChipEnterVT()&e.code;. - - <quote><p> - &s.code;void ChipSave(ScrnInfoPtr pScrn)&e.code; - <quote><p> - Saves the current state. This will only be saving pre-server - states or states before returning to the server. There is only - one current saved state per screen and it is stored in private - storage in the screen. - - </quote> - </quote> - -<sect1>Restore -<p> - - Restore the original video state. This could be called from the - &s.code;ChipLeaveVT()&e.code; and &s.code;ChipCloseScreen()&e.code; - functions. - - <quote><p> - &s.code;void ChipRestore(ScrnInfoPtr pScrn)&e.code; - <quote><p> - Restores the saved state from the private storage. Usually only - used for restoring text modes. - - </quote> - </quote> - - -<sect1>Initialise Mode -<p> - - Initialise a video mode. This could be called from the - &s.code;ChipScreenInit()&e.code;, &s.code;ChipSwitchMode()&e.code; - and &s.code;ChipEnterVT()&e.code; functions. - - <quote><p> - &s.code;Bool ChipModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode)&e.code; - <quote><p> - Programs the hardware for the given video mode. - - </quote> - </quote> - - -<sect>Data and Data Structures -<p> - -<sect1>Command line data -<p> - -Command line options are typically global, and are stored in global -variables. These variables are read-only and are available to drivers -via a function call interface. Most of these command line values are -processed via helper functions to ensure that they are treated consistently -by all drivers. The other means of access is provided for cases where -the supplied helper functions might not be appropriate. - -Some of them are: - -<quote><verb> - xf86Verbose verbosity level - xf86Bpp -bpp from the command line - xf86Depth -depth from the command line - xf86Weight -weight from the command line - xf86Gamma -{r,g,b,}gamma from the command line - xf86FlipPixels -flippixels from the command line - xf86ProbeOnly -probeonly from the command line - defaultColorVisualClass -cc from the command line -</verb></quote> - -If we ever do allow for screen-specific command line options, we may -need to rethink this. - -These can be accessed in a read-only manner by drivers with the following -functions: - - <quote><p> - &s.code;int xf86GetVerbosity()&e.code; - <quote><p> - Returns the value of &s.code;xf86Verbose&e.code;. - - </quote> - - &s.code;int xf86GetDepth()&e.code; - <quote><p> - Returns the &s.cmd;-depth&e.cmd; command line setting. If not - set on the command line, &s.code;-1&e.code; is returned. - - </quote> - - &s.code;rgb xf86GetWeight()&e.code; - <quote><p> - Returns the &s.cmd;-weight&e.cmd; command line setting. If not - set on the command line, &s.code;{0, 0, 0}&e.code; is returned. - - </quote> - - &s.code;Gamma xf86GetGamma()&e.code; - <quote><p> - Returns the &s.cmd;-gamma&e.cmd; or &s.cmd;-rgamma&e.cmd;, - &s.cmd;-ggamma&e.cmd;, &s.cmd;-bgamma&e.cmd; command line settings. - If not set on the command line, &s.code;{0.0, 0.0, 0.0}&e.code; - is returned. - - </quote> - - &s.code;Bool xf86GetFlipPixels()&e.code; - <quote><p> - Returns &s.code;TRUE&e.code; if &s.cmd;-flippixels&e.cmd; is - present on the command line, and &s.code;FALSE&e.code; otherwise. - - </quote> - - &s.code;const char *xf86GetServerName()&e.code; - <quote><p> - Returns the name of the X server from the command line. - - </quote> - </quote> - -<sect1>Data handling -<p> - -Config file data contains parts that are global, and parts that are -Screen specific. All of it is parsed into data structures that neither -the drivers or most other parts of the server need to know about. - -The global data is typically not required by drivers, and as such, most -of it is stored in the private &s.code;xf86InfoRec&e.code;. - -The screen-specific data collected from the config file is stored in -screen, device, display, monitor-specific data structures that are separate -from the &s.code;ScrnInfoRecs&e.code;, with the appropriate elements/fields -hooked into the &s.code;ScrnInfoRecs&e.code; as required. The screen -config data is held in &s.code;confScreenRec&e.code;, device data in -the &s.code;GDevRec&e.code;, monitor data in the &s.code;MonRec&e.code;, -and display data in the &s.code;DispRec&e.code;. - -The XFree86 common layer's screen specific data (the actual data in use -for each screen) is held in the &s.code;ScrnInfoRecs&e.code;. As has -been outlined above, the &s.code;ScrnInfoRecs&e.code; are allocated at probe -time, and it is the responsibility of the Drivers' &s.code;Probe()&e.code; -and &s.code;PreInit()&e.code; functions to finish filling them in based -on both data provided on the command line and data provided from the -Config file. The precedence for this is: - - <quote> - command line -> config file -> probed/default data - </quote> - -For most things in this category there are helper functions that the -drivers can use to ensure that the above precedence is consistently -used. - -As well as containing screen-specific data that the XFree86 common layer -(including essential parts of the server infrastructure as well as helper -functions) needs to access, it also contains some data that drivers use -internally. When considering whether to add a new field to the -&s.code;ScrnInfoRec&e.code;, consider the balance between the convenience -of things that lots of drivers need and the size/obscurity of the -&s.code;ScrnInfoRec&e.code;. - -Per-screen driver specific data that cannot be accommodated with the -static &s.code;ScrnInfoRec&e.code; fields is held in a driver-defined -data structure, a pointer to which is assigned to the -&s.code;ScrnInfoRec&e.code;'s &s.code;driverPrivate&e.code; field. This -is per-screen data that persists across server generations (as does the -bulk of the static &s.code;ScrnInfoRec&e.code; data). It would typically -also include the video card's saved state. - -Per-screen data for other modules that the driver uses (for example, -the XAA module) that is reset for each server generation is hooked into -the &s.code;ScrnInfoRec&e.code; through it's &s.code;privates&e.code; -field. - -Once it has stabilised, the data structures and variables accessible to -video drivers will be documented here. In the meantime, those things -defined in the &s.code;xf86.h&e.code; and &s.code;xf86str.h&e.code; -files are visible to video drivers. Things defined in -&s.code;xf86Priv.h&e.code; and &s.code;xf86Privstr.h&e.code; are NOT -intended to be visible to video drivers, and it is an error for a driver -to include those files. - - -<sect1>Accessing global data -<p> - -Some other global state information that the drivers may access via -functions is as follows: - - <quote><p> - &s.code;Bool xf86ServerIsExiting()&e.code; - <quote><p> - Returns &s.code;TRUE&e.code; if the server is at the end of a - generation and is in the process of exiting, and - &s.code;FALSE&e.code; otherwise. - - </quote> - - &s.code;Bool xf86ServerIsResetting()&e.code; - <quote><p> - Returns &s.code;TRUE&e.code; if the server is at the end of a - generation and is in the process of resetting, and - &s.code;FALSE&e.code; otherwise. - - </quote> - - &s.code;Bool xf86ServerIsInitialising()&e.code; - <quote><p> - Returns &s.code;TRUE&e.code; if the server is at the beginning of - a generation and is in the process of initialising, and - &s.code;FALSE&e.code; otherwise. - - </quote> - - &s.code;Bool xf86ServerIsOnlyProbing()&e.code; - <quote><p> - Returns &s.code;TRUE&e.code; if the -probeonly command line flag - was specified, and &s.code;FALSE&e.code; otherwise. - - </quote> - - &s.code;Bool xf86CaughtSignal()&e.code; - <quote><p> - Returns &s.code;TRUE&e.code; if the server has caught a signal, - and &s.code;FALSE&e.code; otherwise. - - </quote> - </quote> - -<sect1>Allocating private data -<p> - -A driver and any module it uses may allocate per-screen private storage -in either the &s.code;ScreenRec&e.code; (DIX level) or -&s.code;ScrnInfoRec&e.code; (XFree86 common layer level). -&s.code;ScreenRec&e.code; storage persists only for a single server -generation, and &s.code;ScrnInfoRec&e.code; storage persists across -generations for the lifetime of the server. - -The &s.code;ScreenRec&e.code; &s.code;devPrivates&e.code; data must be -reallocated/initialised at the start of each new generation. This is -normally done from the &s.code;ChipScreenInit()&e.code; function, and -Init functions for other modules that it calls. Data allocated in this -way should be freed by the driver's &s.code;ChipCloseScreen()&e.code; -functions, and Close functions for other modules that it calls. A new -&s.code;devPrivates&e.code; entry is allocated by calling the -&s.code;AllocateScreenPrivateIndex()&e.code; function. - - <quote><p> - &s.code;int AllocateScreenPrivateIndex()&e.code; - <quote><p> - This function allocates a new element in the - &s.code;devPrivates&e.code; field of all currently existing - &s.code;ScreenRecs&e.code;. The return value is the index of this - new element in the &s.code;devPrivates&e.code; array. The - &s.code;devPrivates&e.code; field is of type - &s.code;DevUnion&e.code;: - - <verb> - typedef union _DevUnion { - pointer ptr; - long val; - unsigned long uval; - pointer (*fptr)(void); - } DevUnion; - </verb> - - which allows the element to be used for any of the above types. - It is commonly used as a pointer to data that the caller allocates - after the new index has been allocated. - - This function will return &s.code;-1&e.code; when there is an - error allocating the new index. - - </quote> - </quote> - -The &s.code;ScrnInfoRec&e.code; &s.code;privates&e.code; data persists -for the life of the server, so only needs to be allocated once. This -should be done from the &s.code;ChipPreInit()&e.code; function, and Init -functions for other modules that it calls. Data allocated in this way -should be freed by the driver's &s.code;ChipFreeScreen()&e.code; functions, -and Free functions for other modules that it calls. A new -&s.code;privates&e.code; entry is allocated by calling the -&s.code;xf86AllocateScrnInfoPrivateIndex()&e.code; function. - - - <quote><p> - &s.code;int xf86AllocateScrnInfoPrivateIndex()&e.code; - <quote><p> - This function allocates a new element in the &s.code;privates&e.code; - field of all currently existing &s.code;ScrnInfoRecs&e.code;. - The return value is the index of this new element in the - &s.code;privates&e.code; array. The &s.code;privates&e.code; - field is of type &s.code;DevUnion&e.code;: - - <verb> - typedef union _DevUnion { - pointer ptr; - long val; - unsigned long uval; - pointer (*fptr)(void); - } DevUnion; - </verb> - - which allows the element to be used for any of the above types. - It is commonly used as a pointer to data that the caller allocates - after the new index has been allocated. - - This function will not return when there is an error allocating - the new index. When there is an error it will cause the server - to exit with a fatal error. The similar function for allocation - privates in the &s.code;ScreenRec&e.code; - (&s.code;AllocateScreenPrivateIndex()&e.code;) differs in this - respect by returning &s.code;-1&e.code; when the allocation fails. - - </quote> - </quote> - -<sect>Keeping Track of Bus Resources<label id="rac"> -<p> - -<sect1>Theory of Operation -<p> - -The XFree86 common layer has knowledge of generic access control mechanisms -for devices on certain bus systems (currently the PCI bus) as well as -of methods to enable or disable access to the buses itself. Furthermore -it can access information on resources decoded by these devices and if -necessary modify it. - -When first starting the Xserver collects all this information, saves it -for restoration, checks it for consistency, and if necessary, corrects -it. Finally it disables all resources on a generic level prior to -calling any driver function. - -When the &s.code;Probe()&e.code; function of each driver is called the -device sections are matched against the devices found in the system. -The driver may probe devices at this stage that cannot be identified by -using device independent methods. Access to all resources that can be -controlled in a device independent way is disabled. The -&s.code;Probe()&e.code; function should register all non-relocatable -resources at this stage. If a resource conflict is found between -exclusive resources the driver will fail immediately. Optionally the -driver might specify an &s.code;EntityInit()&e.code;, -&s.code;EntityLeave()&e.code; and &s.code;EntityEnter()&e.code; function. - -&s.code;EntityInit()&e.code; can be used to disable any shared resources -that are not controlled by the generic access control functions. It is -called prior to the PreInit phase regardless if an entity is active or -not. When calling the &s.code;EntityInit()&e.code;, -&s.code;EntityEnter()&e.code; and &s.code;EntityLeave()&e.code; functions -the common level will disable access to all other entities on a generic -level. Since the common level has no knowledge of device specific -methods to disable access to resources it cannot be guaranteed that -certain resources are not decoded by any other entity until the -&s.code;EntityInit()&e.code; or &s.code;EntityEnter()&e.code; phase is -finished. Device drivers should therefore register all those resources -which they are going to disable. If these resources are never to be -used by any driver function they may be flagged &s.code;ResInit&e.code; -so that they can be removed from the resource list after processing all -&s.code;EntityInit()&e.code; functions. &s.code;EntityEnter()&e.code; -should disable decoding of all resources which are not registered as -exclusive and which are not handled by the generic access control in -the common level. The difference to &s.code;EntityInit()&e.code; is -that the latter one is only called once during lifetime of the server. -It can therefore be used to set up variables prior to disabling resources. -&s.code;EntityLeave()&e.code; should restore the original state when -exiting the server or switching to a different VT. It also needs to -disable device specific access functions if they need to be disabled on -server exit or VT switch. The default state is to enable them before -giving up the VT. - -In &s.code;PreInit()&e.code; phase each driver should check if any -sharable resources it has registered during &s.code;Probe()&e.code; has -been denied and take appropriate action which could simply be to fail. -If it needs to access resources it has disabled during -&s.code;EntitySetup()&e.code; it can do so provided it has registered -these and will disable them before returning from -&s.code;PreInit()&e.code;. This also applies to all other driver -functions. Several functions are provided to request resource ranges, -register these, correct PCI config space and add replacements for the -generic access functions. Resources may be marked ``disabled'' or -``unused'' during OPERATING stage. Although these steps could also be -performed in &s.code;ScreenInit()&e.code;, this is not desirable. - -Following &s.code;PreInit()&e.code; phase the common level determines -if resource access control is needed. This is the case if more than -one screen is used. If necessary the RAC wrapper module is loaded. In -&s.code;ScreenInit()&e.code; the drivers can decide which operations -need to be placed under RAC. Available are the frame buffer operations, -the pointer operations and the colormap operations. Any operation that -requires resources which might be disabled during OPERATING state should -be set to use RAC. This can be specified separately for memory and IO -resources. - -When &s.code;ScreenInit()&e.code; phase is done the common level will -determine which shared resources are requested by more than one driver -and set the access functions accordingly. This is done following these -rules: - -<enum> -<item>The sharable resources registered by each entity are compared. If - a resource is registered by more than one entity the entity will be - marked to need to share this resources type (&s.code;IO&e.code; or - &s.code;MEM&e.code;). - -<item>A resource marked ``disabled'' during OPERATING state will be ignored - entirely. - -<item>A resource marked ``unused'' will only conflicts with an overlapping - resource of an other entity if the second is actually in use during - OPERATING state. - -<item>If an ``unused'' resource was found to conflict however the entity - does not use any other resource of this type the entire resource type - will be disabled for that entity. -</enum> - -The driver has the choice among different ways to control access to -certain resources: - -<enum> -<item>It can rely on the generic access functions. This is probably the - most common case. Here the driver only needs to register any resource - it is going to use. - -<item>It can replace the generic access functions by driver specific - ones. This will mostly be used in cases where no generic access - functions are available. In this case the driver has to make sure - these resources are disabled when entering the &s.code;PreInit()&e.code; - stage. Since the replacement functions are registered in - &s.code;PreInit()&e.code; the driver will have to enable these - resources itself if it needs to access them during this state. The - driver can specify if the replacement functions can control memory - and/or I/O resources separately. - -<item>The driver can enable resources itself when it needs them. Each - driver function enabling them needs to disable them before it will - return. This should be used if a resource which can be controlled - in a device dependent way is only required during SETUP state. This - way it can be marked ``unused'' during OPERATING state. -</enum> - -A resource which is decoded during OPERATING state however never accessed -by the driver should be marked unused. - -Since access switching latencies are an issue during Xserver operation, -the common level attempts to minimize the number of entities that need -to be placed under RAC control. When a wrapped operation is called, -the &s.code;EnableAccess()&e.code; function is called before control is -passed on. &s.code;EnableAccess()&e.code; checks if a screen is under -access control. If not it just establishes bus routing and returns. -If the screen needs to be under access control, -&s.code;EnableAccess()&e.code; determines which resource types -(&s.code;MEM&e.code;, &s.code;IO&e.code;) are required. Then it tests -if this access is already established. If so it simply returns. If -not it disables the currently established access, fixes bus routing and -enables access to all entities registered for this screen. - -Whenever a mode switch or a VT-switch is performed the common level will -return to SETUP state. - -<sect1>Resource Types -<p> - -Resource have certain properties. When registering resources each range -is accompanied by a flag consisting of the ORed flags of the different -properties the resource has. Each resource range may be classified -according to - -<itemize> - <item>its physical properties i.e., if it addresses - memory (&s.code;ResMem&e.code;) or - I/O space (&s.code;ResIo&e.code;), - <item>if it addresses a - block (&s.code;ResBlock&e.code;) or - sparse (&s.code;ResSparse&e.code;) - range, - <item>its access properties. -</itemize> - -There are two known access properties: - -<itemize> - <item>&s.code;ResExclusive&e.code; - for resources which may not be shared with any other device and - <item>&s.code;ResShared&e.code; - for resources which can be disabled and therefore can be shared. -</itemize> - -If it is necessary to test a resource against any type a generic access -type &s.code;ResAny&e.code; is provided. If this is set the resource -will conflict with any resource of a different entity intersecting its -range. Further it can be specified that a resource is decoded however -never used during any stage (&s.code;ResUnused&e.code;) or during -OPERATING state (&s.code;ResUnusedOpr&e.code;). A resource only visible -during the init functions (ie. &s.code;EntityInit()&e.code;, -&s.code;EntityEnter()&e.code; and &s.code;EntityLeave()&e.code; should -be registered with the flag &s.code;ResInit&e.code;. A resource that -might conflict with background resource ranges may be flagged with -&s.code;ResBios&e.code;. This might be useful when registering resources -ranges that were assigned by the system Bios. - -Several predefined resource lists are available for VGA and 8514/A -resources in &s.code;common/xf86Resources.h&e.code;. - -<sect1>Available Functions<label id="avail"> -<p> - -The functions provided for resource management are listed in their order -of use in the driver. - - -<sect2>Probe Phase -<p> - -In this phase each driver detects those resources it is able to drive, -creates an entity record for each of them, registers non-relocatable -resources and allocates screens and adds the resources to screens. - -Two helper functions are provided for matching device sections in the -xorg.conf file to the devices: - - <quote><p> - &s.code;int xf86MatchPciInstances(const char *driverName, int vendorID, - &f.indent;SymTabPtr chipsets, PciChipsets *PCIchipsets, - &f.indent;GDevPtr *devList, int numDevs, DriverPtr drvp, - &f.indent;int **foundEntities)&e.code; - <quote><p> - This function finds matches between PCI cards that a driver supports - and config file device sections. It is intended for use in the - &s.code;ChipProbe()&e.code; function of drivers for PCI cards. - Only probed PCI devices with a vendor ID matching - &s.code;vendorID&e.code; are considered. &s.code;devList&e.code; - and &s.code;numDevs&e.code; are typically those found from - calling &s.code;xf86MatchDevice()&e.code;, and represent the active - config file device sections relevant to the driver. - &s.code;PCIchipsets&e.code; is a table that provides a mapping - between the PCI device IDs, the driver's internal chipset tokens - and a list of fixed resources. - - When a device section doesn't have a &s.key;BusID&e.key; entry it - can only match the primary video device. Secondary devices are - only matched with device sections that have a matching - &s.key;BusID&e.key; entry. - - Once the preliminary matches have been found, a final match is - confirmed by checking if the chipset override, ChipID override or - probed PCI chipset type match one of those given in the - &s.code;chipsets&e.code; and &s.code;PCIchipsets&e.code; lists. - The &s.code;PCIchipsets&e.code; list includes a list of the PCI - device IDs supported by the driver. The list should be terminated - with an entry with PCI ID &s.code;-1&e.code;". The - &s.code;chipsets&e.code; list is a table mapping the driver's - internal chipset tokens to names, and should be terminated with - a &s.code;NULL&e.code; entry. Only those entries with a - corresponding entry in the &s.code;PCIchipsets&e.code; list are - considered. The order of precedence is: config file chipset, - config file ChipID, probed PCI device ID. - - In cases where a driver handles PCI chipsets with more than one - vendor ID, it may set &s.code;vendorID&e.code; to - &s.code;0&e.code;, and OR each devID in the list with (the - vendor ID << 16). - - Entity index numbers for confirmed matches are returned as an - array via &s.code;foundEntities&e.code;. The PCI information, - chipset token and device section for each match are found in the - &s.code;EntityInfoRec&e.code; referenced by the indices. - - The function return value is the number of confirmed matches. A - return value of &s.code;-1&e.code; indicates an internal error. - The returned &s.code;foundEntities&e.code; array should be freed - by the driver with &s.code;xfree()&e.code; when it is no longer - needed in cases where the return value is greater than zero. - - </quote> - - &s.code;int xf86MatchIsaInstances(const char *driverName, - &f.indent;SymTabPtr chipsets, IsaChipsets *ISAchipsets, - &f.indent;DriverPtr drvp, FindIsaDevProc FindIsaDevice, - &f.indent;GDevPtr *devList, int numDevs, - int **foundEntities)&e.code; - <quote><p> - This function finds matches between ISA cards that a driver supports - and config file device sections. It is intended for use in the - &s.code;ChipProbe()&e.code; function of drivers for ISA cards. - &s.code;devList&e.code; and &s.code;numDevs&e.code; are - typically those found from calling &s.code;xf86MatchDevice()&e.code;, - and represent the active config file device sections relevant to - the driver. &s.code;ISAchipsets&e.code; is a table that provides - a mapping between the driver's internal chipset tokens and the - resource classes. &s.code;FindIsaDevice&e.code; is a - driver-provided function that probes the hardware and returns the - chipset token corresponding to what was detected, and - &s.code;-1&e.code; if nothing was detected. - - If the config file device section contains a chipset entry, then - it is checked against the &s.code;chipsets&e.code; list. When - no chipset entry is present, the &s.code;FindIsaDevice&e.code; - function is called instead. - - Entity index numbers for confirmed matches are returned as an - array via &s.code;foundEntities&e.code;. The chipset token and - device section for each match are found in the - &s.code;EntityInfoRec&e.code; referenced by the indices. - - The function return value is the number of confirmed matches. A - return value of &s.code;-1&e.code; indicates an internal error. - The returned &s.code;foundEntities&e.code; array should be freed - by the driver with &s.code;xfree()&e.code; when it is no longer - needed in cases where the return value is greater than zero. - - </quote> - </quote> - -These two helper functions make use of several core functions that are -available at the driver level: - - <quote><p> - &s.code;Bool xf86ParsePciBusString(const char *busID, int *bus, - &f.indent;int *device, int *func)&e.code; - <quote><p> - Takes a &s.code;BusID&e.code; string, and if it is in the correct - format, returns the PCI &s.code;bus&e.code;, &s.code;device&e.code;, - &s.code;func&e.code; values that it indicates. The format of the - string is expected to be "PCI:bus:device:func" where each of `bus', - `device' and `func' are decimal integers. The ":func" part may - be omitted, and the func value assumed to be zero, but this isn't - encouraged. The "PCI" prefix may also be omitted. The prefix - "AGP" is currently equivalent to the "PCI" prefix. If the string - isn't a valid PCI BusID, the return value is &s.code;FALSE&e.code;. - - </quote> - - - &s.code;Bool xf86ComparePciBusString(const char *busID, int bus, - &f.indent;int device, int func)&e.code; - <quote><p> - Compares a &s.code;BusID&e.code; string with PCI &s.code;bus&e.code;, - &s.code;device&e.code;, &s.code;func&e.code; values. If they - match &s.code;TRUE&e.code; is returned, and &s.code;FALSE&e.code; - if they don't. - - </quote> - - &s.code;Bool xf86ParseIsaBusString(const char *busID)&e.code; - <quote><p> - Compares a &s.code;BusID&e.code; string with the ISA bus ID string - ("ISA" or "ISA:"). If they match &s.code;TRUE&e.code; is returned, - and &s.code;FALSE&e.code; if they don't. - - </quote> - - &s.code;Bool xf86CheckPciSlot(int bus, int device, int func)&e.code; - <quote><p> - Checks if the PCI slot &s.code;bus:device:func&e.code; has been - claimed. If so, it returns &s.code;FALSE&e.code;, and otherwise - &s.code;TRUE&e.code;. - - </quote> - - &s.code;int xf86ClaimPciSlot(int bus, int device, int func, DriverPtr drvp, - &f.indent;int chipset, GDevPtr dev, Bool active)&e.code; - <quote><p> - This function is used to claim a PCI slot, allocate the associated - entity record and initialise their data structures. The return - value is the index of the newly allocated entity record, or - &s.code;-1&e.code; if the claim fails. This function should always - succeed if &s.code;xf86CheckPciSlot()&e.code; returned - &s.code;TRUE&e.code; for the same PCI slot. - - </quote> - - &s.code;Bool xf86IsPrimaryPci(void)&e.code; - <quote><p> - This function returns &s.code;TRUE&e.code; if the primary card is - a PCI device, and &s.code;FALSE&e.code; otherwise. - - </quote> - - &s.code;int xf86ClaimIsaSlot(DriverPtr drvp, int chipset, - &f.indent;GDevPtr dev, Bool active)&e.code; - <quote><p> - This allocates an entity record entity and initialise the data - structures. The return value is the index of the newly allocated - entity record. - - </quote> - - &s.code;Bool xf86IsPrimaryIsa(void)&e.code; - <quote><p> - This function returns &s.code;TRUE&e.code; if the primary card is - an ISA (non-PCI) device, and &s.code;FALSE&e.code; otherwise. - - </quote> - </quote> - -Two helper functions are provided to aid configuring entities: - <quote><p> - &s.code;ScrnInfoPtr xf86ConfigPciEntity(ScrnInfoPtr pScrn, - &f.indent;int scrnFlag, int entityIndex, - &f.indent;PciChipsets *p_chip, - &f.indent;resList res, EntityProc init, - &f.indent;EntityProc enter, EntityProc leave, - &f.indent;pointer private)&e.code; - <p> - &s.code;ScrnInfoPtr xf86ConfigIsaEntity(ScrnInfoPtr pScrn, - &f.indent;int scrnFlag, int entityIndex, - &f.indent;IsaChipsets *i_chip, - &f.indent;resList res, EntityProc init, - &f.indent;EntityProc enter, EntityProc leave, - &f.indent;pointer private)&e.code; - <quote><p> - These functions are used to register the non-relocatable resources - for an entity, and the optional entity-specific &s.code;Init&e.code;, &s.code;Enter&e.code; and - &s.code;Leave&e.code; functions. Usually the list of fixed resources is obtained - from the Isa/PciChipsets lists. However an additional list of - resources may be passed. Generally this is not required. - For active entities a &s.code;ScrnInfoRec&e.code; is allocated - if the &s.code;pScrn&e.code; argument is &s.code;NULL&e.code;. -The - return value is &s.code;TRUE&e.code; when successful. The init, enter, leave - functions are defined as follows: - - <quote> - &s.code;typedef void (*EntityProc)(int entityIndex, - &f.indent;pointer private)&e.code; - </quote> - - They are passed the entity index and a pointer to a private scratch - area. This can be set up during &s.code;Probe()&e.code; and - its address can be passed to - &s.code;xf86ConfigIsaEntity()&e.code; and - &s.code;xf86ConfigPciEntity()&e.code; as the last argument. - - </quote> - </quote> - -These two helper functions make use of several core functions that are -available at the driver level: - <quote><p> - &s.code;void xf86ClaimFixedResources(resList list, int entityIndex)&e.code; - <quote><p> - This function registers the non-relocatable resources which cannot - be disabled and which therefore would cause the server to fail - immediately if they were found to conflict. It also records - non-relocatable but sharable resources for processing after the - &s.code;Probe()&e.code; phase. - - </quote> - - &s.code;Bool xf86SetEntityFuncs(int entityIndex, EntityProc init, - &f.indent;EntityProc enter, EntityProc leave, pointer)&e.code; - <quote><p> - This function registers with an entity the &s.code;init&e.code;, - &s.code;enter&e.code;, &s.code;leave&e.code; functions along - with the pointer to their private area. - - </quote> - - &s.code;void xf86AddEntityToScreen(ScrnInfoPtr pScrn, int entityIndex)&e.code; - <quote><p> - This function associates the entity referenced by - &s.code;entityIndex&e.code; with the screen. - - </quote> - </quote> - -<sect2>PreInit Phase -<p> - -During this phase the remaining resources should be registered. -&s.code;PreInit()&e.code; should call &s.code;xf86GetEntityInfo()&e.code; -to obtain a pointer to an &s.code;EntityInfoRec&e.code; for each entity -it is able to drive and check if any resource are listed in its -&s.code;resources&e.code; field. If resources registered in the Probe -phase have been rejected in the post-Probe phase -(&s.code;resources&e.code; is non-&s.code;NULL&e.code;), then the driver should -decide if it can continue without using these or if it should fail. - - <quote><p> - &s.code;EntityInfoPtr xf86GetEntityInfo(int entityIndex)&e.code; - <quote><p> - This function returns a pointer to the &s.code;EntityInfoRec&e.code; - referenced by &s.code;entityIndex&e.code;. The returned - &s.code;EntityInfoRec&e.code; should be freed with - &s.code;xfree()&e.code; when no longer needed. - - </quote> - </quote> -Several functions are provided to simplify resource registration: - <quote><p> - &s.code;Bool xf86IsEntityPrimary(int entityIndex)&e.code; - <quote><p> - This function returns &s.code;TRUE&e.code; if the entity referenced - by &s.code;entityIndex&e.code; is the primary display device (i.e., - the one initialised at boot time and used in text mode). - - </quote> - - &s.code;Bool xf86IsScreenPrimary(int scrnIndex)&e.code; - <quote><p> - This function returns &s.code;TRUE&e.code; if the primary entity - is registered with the screen referenced by - &s.code;scrnIndex&e.code;. - - </quote> - - &s.code;pciVideoPtr xf86GetPciInfoForEntity(int entityIndex)&e.code; - <quote><p> - This function returns a pointer to the &s.code;pciVideoRec&e.code; - for the specified entity. If the entity is not a PCI device, - &s.code;NULL&e.code; is returned. - - </quote> - </quote> - -The primary function for registration of resources is: - <quote><p> - &s.code;resPtr xf86RegisterResources(int entityIndex, resList list, - &f.indent;int access)&e.code; - <quote><p> - This function tries to register the resources in - &s.code;list&e.code;. If list is &s.code;NULL&e.code; it tries - to determine the resources automatically. This only works for - entities that provide a generic way to read out the resource ranges - they decode. So far this is only the case for PCI devices. By - default the PCI resources are registered as shared - (&s.code;ResShared&e.code;) if the driver wants to set a different - access type it can do so by specifying the access flags in the - third argument. A value of &s.code;0&e.code; means to use the - default settings. If for any reason the resource broker is not - able to register some of the requested resources the function will - return a pointer to a list of the failed ones. In this case the - driver may be able to move the resource to different locations. - In case of PCI bus entities this is done by passing the list of - failed resources to &s.code;xf86ReallocatePciResources()&e.code;. - When the registration succeeds, the return value is - &s.code;NULL&e.code;. - - </quote> - - &s.code;resPtr xf86ReallocatePciResources(int entityIndex, resPtr pRes)&e.code; - <quote><p> - This function takes a list of PCI resources that need to be - reallocated and returns &s.code;NULL&e.code when all relocations are - successful. - &s.code;xf86RegisterResources()&e.code; should be called again to - register the relocated resources with the broker. - If the reallocation fails, a list of the resources that could not be - relocated is returned. - - </quote> - </quote> - -Two functions are provided to obtain a resource range of a given type: - <quote><p> - &s.code;resRange xf86GetBlock(long type, memType size, - &f.indent;memType window_start, memType window_end, - &f.indent;memType align_mask, resPtr avoid)&e.code; - <quote><p> - This function tries to find a block range of size - &s.code;size&e.code; and type &s.code;type&e.code; in a window - bound by &s.code;window_start&e.code; and &s.code;window_end&e.code; - with the alignment specified in &s.code;align_mask&e.code;. - Optionally a list of resource ranges which should be avoided within - the window can be supplied. On failure a zero-length range of - type &s.code;ResEnd&e.code; will be returned. - - </quote> - &s.code;resRange xf86GetSparse(long type, memType fixed_bits, - &f.indent;memType decode_mask, memType address_mask, - &f.indent;resPtr avoid)&e.code; - <quote><p> - This function is like the previous one, but attempts to find a - sparse range instead of a block range. Here three values have to - be specified: the &s.code;address_mask&e.code; which marks all - bits of the mask part of the address, the &s.code;decode_mask&e.code; - which masks out the bits which are hardcoded and are therefore - not available for relocation and the values of the fixed bits. - The function tries to find a base that satisfies the given condition. - If the function fails it will return a zero range of type - &s.code;ResEnd&e.code;. Optionally it might be passed a list of - resource ranges to avoid. - - </quote> - </quote> - -Some PCI devices are broken in the sense that they return invalid size -information for a certain resource. In this case the driver can supply -the correct size and make sure that the resource range allocated for -the card is large enough to hold the address range decoded by the card. -The function &s.code;xf86FixPciResource()&e.code; can be used to do this: - <quote><p> - &s.code;Bool xf86FixPciResource(int entityIndex, unsigned int prt, - &f.indent;CARD32 alignment, long type)&e.code; - <quote><p> - This function fixes a PCI resource allocation. The - &s.code;prt&e.code; parameter contains the number of the PCI base - register that needs to be fixed (&s.code;0-5&e.code;, and - &s.code;6&e.code; for the BIOS base register). The size is - specified by the alignment. Since PCI resources need to span an - integral range of size &s.code;2^n&e.code;, the alignment also - specifies the number of addresses that will be decoded. If the - driver specifies a type mask it can override the default type for - PCI resources which is &s.code;ResShared&e.code;. The resource - broker needs to know that to find a matching resource range. This - function should be called before calling - &s.code;xf86RegisterResources()&e.code;. The return value is - &s.code;TRUE&e.code; when the function succeeds. - - </quote> - - &s.code;Bool xf86CheckPciMemBase(pciVideoPtr pPci, memType base)&e.code; - <quote><p> - This function checks that the memory base address specified matches - one of the PCI base address register values for the given PCI - device. This is mostly used to check that an externally provided - base address (e.g., from a config file) matches an actual value - allocated to a device. - - </quote> - </quote> - -The driver may replace the generic access control functions for an entity. -This is done with the &s.code;xf86SetAccessFuncs()&e.code;: - <quote><p> - &s.code;void xf86SetAccessFuncs(EntityInfoPtr pEnt, - &f.indent;xf86SetAccessFuncPtr funcs, - &f.indent;xf86SetAccessFuncPtr oldFuncs)&e.code; - <quote><p> - with: - </quote> - - <verb> - typedef struct { - xf86AccessPtr mem; - xf86AccessPtr io; - xf86AccessPtr io_mem; - } xf86SetAccessFuncRec, *xf86SetAccessFuncPtr; - </verb> - - <quote><p> - The driver can pass three functions: one for I/O access, one for - memory access and one for combined memory and I/O access. If the - memory access and combined access functions are identical the - common level assumes that the memory access cannot be controlled - independently of I/O access, if the I/O access function and the - combined access functions are the same it is assumed that I/O can - not be controlled independently. If memory and I/O have to be - controlled together all three values should be the same. If a - non &s.code;NULL&e.code; value is passed as third argument it is - interpreted as an address where to store the old access record. - If the third argument is &s.code;NULL&e.code; it will be assumed - that the generic access should be enabled before replacing the - access functions. Otherwise it will be disabled. The driver may - enable them itself using the returned values. It should do this - from its replacement access functions as the generic access may - be disabled by the common level on certain occasions. If replacement - functions are specified they must control all resources of the - specific type registered for the entity. - - </quote> - </quote> - -To find out if a specific resource range conflicts with another -resource the &s.code;xf86ChkConflict()&e.code; function may be used: - <quote><p> - &s.code;memType xf86ChkConflict(resRange *rgp, int entityIndex)&e.code; - <quote><p> - This function checks if the resource range &s.code;rgp&e.code; of - for the specified entity conflicts with with another resource. - If a conflict is found, the address of the start of the conflict - is returned. The return value is zero when there is no conflict. - - </quote> - </quote> - -The OPERATING state properties of previously registered fixed resources -can be set with the &s.code;xf86SetOperatingState()&e.code; function: - <quote><p> - &s.code;resPtr xf86SetOperatingState(resList list, int entityIndex, - &f.indent;int mask)&e.code; - <quote><p> - This function is used to set the status of a resource during - OPERATING state. &s.code;list&e.code; holds a list to which - &s.code;mask&e.code; is to be applied. The parameter - &s.code;mask&e.code; may have the value &s.code;ResUnusedOpr&e.code; - and &s.code;ResDisableOpr&e.code;. The first one should be used - if a resource isn't used by the driver during OPERATING state - although it is decoded by the device, while the latter one indicates - that the resource is not decoded during OPERATING state. Note - that the resource ranges have to match those specified during - registration. If a range has been specified starting at - &s.code;A&e.code; and ending at &s.code;B&e.code; and suppose - &s.code;C&e.code; us a value satisfying - &s.code;A < C < B&e.code; one may not - specify the resource range &s.code;(A,B)&e.code; by splitting it - into two ranges &s.code;(A,C)&e.code; and &s.code;(C,B)&e.code;. - - </quote> - </quote> - -The following two functions are provided for special cases: - <quote><p> - &s.code;void xf86RemoveEntityFromScreen(ScrnInfoPtr pScrn, int entityIndex)&e.code; - <quote><p> - This function may be used to remove an entity from a screen. This - only makes sense if a screen has more than one entity assigned or - the screen is to be deleted. No test is made if the screen has - any entities left. - - </quote> - - &s.code;void xf86DeallocateResourcesForEntity(int entityIndex, long type)&e.code; - <quote><p> - This function deallocates all resources of a given type registered - for a certain entity from the resource broker list. - - </quote> - </quote> - -<sect2>ScreenInit Phase -<p> - -All that is required in this phase is to setup the RAC flags. Note that -it is also permissible to set these flags up in the PreInit phase. The -RAC flags are held in the &s.code;racIoFlags&e.code; and &s.code;racMemFlags&e.code; fields of the -&s.code;ScrnInfoRec&e.code; for each screen. They specify which graphics operations -might require the use of shared resources. This can be specified -separately for memory and I/O resources. The available flags are defined -in &s.code;rac/xf86RAC.h&e.code;. They are: - - &s.code;RAC_FB&e.code; - <quote> - for framebuffer operations (including hw acceleration) - </quote> - &s.code;RAC_CURSOR&e.code; - <quote> - for Cursor operations - (??? I'm not sure if we need this for SW cursor it depends - on which level the sw cursor is drawn) - </quote> - &s.code;RAC_COLORMAP&e.code; - <quote> - for colormap operations - </quote> - &s.code;RAC_VIEWPORT&e.code; - <quote> - for the call to &s.code;ChipAdjustFrame()&e.code; </quote> - - -The flags are ORed together. - -<sect>Config file ``Option'' entries<label id="options"> -<p> - -Option entries are permitted in most sections and subsections of the -config file. There are two forms of option entries: - -<descrip> -<tag>Option "option-name"</tag> - A boolean option. -<tag>Option "option-name" "option-value"</tag> - An option with an arbitrary value. -</descrip> - -The option entries are handled by the parser, and a list of the parsed -options is included with each of the appropriate data structures that -the drivers have access to. The data structures used to hold the option -information are opaque to the driver, and a driver must not access the -option data directly. Instead, the common layer provides a set of -functions that may be used to access, check and manipulate the option -data. - -First, the low level option handling functions. In most cases drivers -would not need to use these directly. - - <quote><p> - &s.code;pointer xf86FindOption(pointer options, const char *name)&e.code; - <quote><p> - Takes a list of options and an option name, and returns a handle - for the first option entry in the list matching the name. Returns - &s.code;NULL&e.code; if no match is found. - - </quote> - - &s.code;char *xf86FindOptionValue(pointer options, const char *name)&e.code; - <quote><p> - Takes a list of options and an option name, and returns the value - associated with the first option entry in the list matching the - name. If the matching option has no value, an empty string - (&s.code;""&e.code;) is returned. Returns &s.code;NULL&e.code; - if no match is found. - - </quote> - - &s.code;void xf86MarkOptionUsed(pointer option)&e.code; - <quote><p> - Takes a handle for an option, and marks that option as used. - - </quote> - - &s.code;void xf86MarkOptionUsedByName(pointer options, const char *name)&e.code; - <quote><p> - Takes a list of options and an option name and marks the first - option entry in the list matching the name as used. - - </quote> - </quote> - - -Next, the higher level functions that most drivers would use. - <quote><p> - &s.code;void xf86CollectOptions(ScrnInfoPtr pScrn, pointer extraOpts)&e.code; - <quote><p> - Collect the options from each of the config file sections used by - the screen (&s.code;pScrn&e.code;) and return the merged list as - &s.code;pScrn->options&e.code;. This function requires that - &s.code;pScrn->confScreen&e.code;, &s.code;pScrn->display&e.code;, - &s.code;pScrn->monitor&e.code;, - &s.code;pScrn->numEntities&e.code;, and - &s.code;pScrn->entityList&e.code; are initialised. - &s.code;extraOpts&e.code; may optionally be set to an additional - list of options to be combined with the others. The order of - precedence for options is &s.code;extraOpts&e.code;, display, - confScreen, monitor, device. - - </quote> - - &s.code;void xf86ProcessOptions(int scrnIndex, pointer options, - &f.indent;OptionInfoPtr optinfo)&e.code; - <quote><p> - Processes a list of options according to the information in the - array of &s.code;OptionInfoRecs&e.code; (&s.code;optinfo&e.code;). - The resulting information is stored in the &s.code;value&e.code; - fields of the appropriate &s.code;optinfo&e.code; entries. The - &s.code;found&e.code; fields are set to &s.code;TRUE&e.code; - when an option with a value of the correct type if found, and - &s.code;FALSE&e.code; otherwise. The &s.code;type&e.code; field - is used to determine the expected value type for each option. - Each option in the list of options for which there is a name match - (but not necessarily a value type match) is marked as used. - Warning messages are printed when option values don't match the - types specified in the optinfo data. - - NOTE: If this function is called before a driver's screen number - is known (e.g., from the &s.code;ChipProbe()&e.code; function) a - &s.code;scrnIndex&e.code; value of &s.code;-1&e.code; should be - used. - - NOTE 2: Given that this function stores into the - &s.code;OptionInfoRecs&e.code; pointed to by &s.code;optinfo&e.code, - the caller should ensure the &s.code;OptionInfoRecs&e.code; are - (re-)initialised before the call, especially if the caller expects - to use the predefined option values as defaults. - - The &s.code;OptionInfoRec&e.code; is defined as follows: - - <verb> - typedef struct { - double freq; - int units; - } OptFrequency; - - typedef union { - unsigned long num; - char * str; - double realnum; - Bool bool; - OptFrequency freq; - } ValueUnion; - - typedef enum { - OPTV_NONE = 0, - OPTV_INTEGER, - OPTV_STRING, /* a non-empty string */ - OPTV_ANYSTR, /* Any string, including an empty one */ - OPTV_REAL, - OPTV_BOOLEAN, - OPTV_FREQ - } OptionValueType; - - typedef enum { - OPTUNITS_HZ = 1, - OPTUNITS_KHZ, - OPTUNITS_MHZ - } OptFreqUnits; - - typedef struct { - int token; - const char* name; - OptionValueType type; - ValueUnion value; - Bool found; - } OptionInfoRec, *OptionInfoPtr; - </verb> - - &s.code;OPTV_FREQ&e.code; can be used for options values that are - frequencies. These values are a floating point number with an - optional unit name appended. The unit name can be one of "Hz", - "kHz", "k", "MHz", "M". The multiplier associated with the unit - is stored in &s.code;freq.units&e.code;, and the scaled frequency - is stored in &s.code;freq.freq&e.code;. When no unit is specified, - &s.code;freq.units&e.code; is set to &s.code;0&e.code;, and - &s.code;freq.freq&e.code; is unscaled. - - Typical usage is to setup an array of - &s.code;OptionInfoRecs&e.code; with all fields initialised. - The &s.code;value&e.code; and &s.code;found&e.code; fields get - set by &s.code;xf86ProcessOptions()&e.code;. For cases where the - value parsing is more complex, the driver should specify - &s.code;OPTV_STRING&e.code;, and parse the string itself. An - example of using this option handling is included in the - <ref id="sample" name="Sample Driver"> section. - - </quote> - - &s.code;void xf86ShowUnusedOptions(int scrnIndex, pointer options)&e.code; - <quote><p> - Prints out warning messages for each option in the list of options - that isn't marked as used. This is intended to show options that - the driver hasn't recognised. It would normally be called near - the end of the &s.code;ChipScreenInit()&e.code; function, but only - when &s.code;serverGeneration == 1&e.code;. - - </quote> - - &s.code;OptionInfoPtr xf86TokenToOptinfo(const OptionInfoRec *table, - &f.indent;int token)&e.code; - - <quote><p> - Returns a pointer to the &s.code;OptionInfoRec&e.code; in - &s.code;table&e.code; with a token field matching - &s.code;token&e.code;. Returns &s.code;NULL&e.code; if no match - is found. - - </quote> - - &s.code;Bool xf86IsOptionSet(const OptionInfoRec *table, int token)&e.code; - <quote><p> - Returns the &s.code;found&e.code; field of the - &s.code;OptionInfoRec&e.code; in &s.code;table&e.code; with a - &s.code;token&e.code; field matching &s.code;token&e.code;. This - can be used for options of all types. Note that for options of - type &s.code;OPTV_BOOLEAN&e.code;, it isn't sufficient to check - this to determine the value of the option. Returns - &s.code;FALSE&e.code; if no match is found. - - </quote> - - &s.code;char *xf86GetOptValString(const OptionInfoRec *table, int token)&e.code; - <quote><p> - Returns the &s.code;value.str&e.code; field of the - &s.code;OptionInfoRec&e.code; in &s.code;table&e.code; with a - token field matching &s.code;token&e.code;. Returns - &s.code;NULL&e.code; if no match is found. - - </quote> - - &s.code;Bool xf86GetOptValInteger(const OptionInfoRec *table, int token, - &f.indent;int *value)&e.code; - <quote><p> - Returns via &s.code;*value&e.code; the &s.code;value.num&e.code; - field of the &s.code;OptionInfoRec&e.code; in &s.code;table&e.code; - with a &s.code;token&e.code; field matching &s.code;token&e.code;. - &s.code;*value&e.code; is only changed when a match is found so - it can be safely initialised with a default prior to calling this - function. The function return value is as for - &s.code;xf86IsOptionSet()&e.code;. - - </quote> - - &s.code;Bool xf86GetOptValULong(const OptionInfoRec *table, int token, - &f.indent;unsigned long *value)&e.code; - <quote><p> - Like &s.code;xf86GetOptValInteger()&e.code;, except the value is - treated as an &s.code;unsigned long&e.code;. - - </quote> - - &s.code;Bool xf86GetOptValReal(const OptionInfoRec *table, int token, - &f.indent;double *value)&e.code; - <quote><p> - Like &s.code;xf86GetOptValInteger()&e.code;, except that - &s.code;value.realnum&e.code; is used. - - </quote> - - &s.code;Bool xf86GetOptValFreq(const OptionInfoRec *table, int token, - &f.indent;OptFreqUnits expectedUnits, double *value)&e.code; - <quote><p> - Like &s.code;xf86GetOptValInteger()&e.code;, except that the - &s.code;value.freq&e.code; data is returned. The frequency value - is scaled to the units indicated by &s.code;expectedUnits&e.code;. - The scaling is exact when the units were specified explicitly in - the option's value. Otherwise, the &s.code;expectedUnits&e.code; - field is used as a hint when doing the scaling. In this case, - values larger than &s.code;1000&e.code; are assumed to have be - specified in the next smallest units. For example, if the Option - value is "10000" and expectedUnits is &s.code;OPTUNITS_MHZ&e.code;, - the value returned is &s.code;10&e.code;. - - </quote> - - &s.code;Bool xf86GetOptValBool(const OptionInfoRec *table, int token, Bool *value)&e.code; - <quote><p> - This function is used to check boolean options - (&s.code;OPTV_BOOLEAN&e.code;). If the function return value is - &s.code;FALSE&e.code;, it means the option wasn't set. Otherwise - &s.code;*value&e.code; is set to the boolean value indicated by - the option's value. No option &s.code;value&e.code; is interpreted - as &s.code;TRUE&e.code;. Option values meaning &s.code;TRUE&e.code; - are "1", "yes", "on", "true", and option values meaning - &s.code;FALSE&e.code; are "0", "no", "off", "false". Option names - both with the "no" prefix in their names, and with that prefix - removed are also checked and handled in the obvious way. - &s.code;*value&e.code; is not changed when the option isn't present. - It should normally be set to a default value before calling this - function. - - </quote> - - &s.code;Bool xf86ReturnOptValBool(const OptionInfoRec *table, int token, Bool def)&e.code; - <quote><p> - This function is used to check boolean options - (&s.code;OPTV_BOOLEAN&e.code;). If the option is set, its value - is returned. If the options is not set, the default value specified - by &s.code;def&e.code; is returned. The option interpretation is - the same as for &s.code;xf86GetOptValBool()&e.code;. - - </quote> - - &s.code;int xf86NameCmp(const char *s1, const char *s2)&e.code; - <quote><p> - This function should be used when comparing strings from the config - file with expected values. It works like &s.code;strcmp()&e.code;, - but is not case sensitive and space, tab, and `<tt>_</tt>' characters - are ignored in the comparison. The use of this function isn't - restricted to parsing option values. It may be used anywhere - where this functionality required. - - </quote> - </quote> - -<sect>Modules, Drivers, Include Files and Interface Issues -<p> - -NOTE: this section is incomplete. - - -<sect1>Include files -<p> - -The following include files are typically required by video drivers: - - <quote><p> - All drivers should include these: - <quote> - &s.code;"xf86.h"&nl; - "xf86_OSproc.h"&nl; - "xf86_ansic.h"&nl; - "xf86Resources.h"&e.code; - </quote> - Wherever inb/outb (and related things) are used the following should be - included: - <quote> - &s.code;"compiler.h"&e.code; - </quote> - Note: in drivers, this must be included after &s.code;"xf86_ansic.h"&e.code;. - - Drivers that need to access PCI vendor/device definitions need this: - <quote> - &s.code;"xf86PciInfo.h"&e.code; - </quote> - - Drivers that need to access the PCI config space need this: - <quote> - &s.code;"xf86Pci.h"&e.code; - </quote> - - Drivers that initialise a SW cursor need this: - <quote> - &s.code;"mipointer.h"&e.code; - </quote> - - All drivers implementing backing store need this: - <quote> - &s.code;"mibstore.h"&e.code; - </quote> - - All drivers using the mi colourmap code need this: - <quote> - &s.code;"micmap.h"&e.code; - </quote> - - If a driver uses the vgahw module, it needs this: - <quote> - &s.code;"vgaHW.h"&e.code; - </quote> - - Drivers supporting VGA or Hercules monochrome screens need: - <quote> - &s.code;"xf1bpp.h"&e.code; - </quote> - - Drivers supporting VGA or EGC 16-colour screens need: - <quote> - &s.code;"xf4bpp.h"&e.code; - </quote> - - Drivers using cfb need: - <quote> - &s.code;#define PSZ 8&nl; - #include "cfb.h"&nl; - #undef PSZ&e.code; - </quote> - - Drivers supporting bpp 16, 24 or 32 with cfb need one or more of: - <quote> - &s.code;"cfb16.h"&nl; - "cfb24.h"&nl; - "cfb32.h"&e.code; - </quote> - - If a driver uses XAA, it needs these: - <quote> - &s.code;"xaa.h"&nl; - "xaalocal.h"&e.code; - </quote> - - If a driver uses the fb manager, it needs this: - <quote> - &s.code;"xf86fbman.h"&e.code; - </quote> - </quote> - -Non-driver modules should include &s.code;"xf86_ansic.h"&e.code; to get the correct -wrapping of ANSI C/libc functions. - -All modules must NOT include any system include files, or the following: - - <quote> - &s.code;"xf86Priv.h"&nl; - "xf86Privstr.h"&nl; - "xf86_OSlib.h"&nl; - "Xos.h"&e.code; - </quote> - -In addition, "xf86_libc.h" must not be included explicitly. It is -included implicitly by "xf86_ansic.h". - - -<sect>Offscreen Memory Manager -<p> - -Management of offscreen video memory may be handled by the XFree86 -framebuffer manager. Once the offscreen memory manager is running, -drivers or extensions may allocate, free or resize areas of offscreen -video memory using the following functions (definitions taken from -&s.code;xf86fbman.h&e.code;): - -<code> - typedef struct _FBArea { - ScreenPtr pScreen; - BoxRec box; - int granularity; - void (*MoveAreaCallback)(struct _FBArea*, struct _FBArea*) - void (*RemoveAreaCallback)(struct _FBArea*) - DevUnion devPrivate; - } FBArea, *FBAreaPtr; - - typedef void (*MoveAreaCallbackProcPtr)(FBAreaPtr from, FBAreaPtr to) - typedef void (*RemoveAreaCallbackProcPtr)(FBAreaPtr) - - FBAreaPtr xf86AllocateOffscreenArea ( - ScreenPtr pScreen, - int width, int height, - int granularity, - MoveAreaCallbackProcPtr MoveAreaCallback, - RemoveAreaCallbackProcPtr RemoveAreaCallback, - pointer privData - ) - - void xf86FreeOffscreenArea (FBAreaPtr area) - - Bool xf86ResizeOffscreenArea ( - FBAreaPtr area - int w, int h - ) -</code> - -The function: -<quote> - &s.code;Bool xf86FBManagerRunning(ScreenPtr pScreen)&e.code; -</quote> - -can be used by an extension to check if the driver has initialized -the memory manager. The manager is not available if this returns -&s.code;FALSE&e.code; and the functions above will all fail. - - -&s.code;xf86AllocateOffscreenArea()&e.code; can be used to request a -rectangle of dimensions &s.code;width&e.code; x &s.code;height&e.code; -(in pixels) from unused offscreen memory. &s.code;granularity&e.code; -specifies that the leftmost edge of the rectangle must lie on some -multiple of &s.code;granularity&e.code; pixels. A granularity of zero -means the same thing as a granularity of one - no alignment preference. -A &s.code;MoveAreaCallback&e.code; can be provided to notify the requester -when the offscreen area is moved. If no &s.code;MoveAreaCallback&e.code; -is supplied then the area is considered to be immovable. The -&s.code;privData&e.code; field will be stored in the manager's internal -structure for that allocated area and will be returned to the requester -in the &s.code;FBArea&e.code; passed via the -&s.code;MoveAreaCallback&e.code;. An optional -&s.code;RemoveAreaCallback&e.code; is provided. If the driver provides -this it indicates that the area should be allocated with a lower priority. -Such an area may be removed when a higher priority request (one that -doesn't have a &s.code;RemoveAreaCallback&e.code;) is made. When this -function is called, the driver will have an opportunity to do whatever -cleanup it needs to do to deal with the loss of the area, but it must -finish its cleanup before the function exits since the offscreen memory -manager will free the area immediately after. - -&s.code;xf86AllocateOffscreenArea()&e.code; returns &s.code;NULL&e.code; -if it was unable to allocate the requested area. When no longer needed, -areas should be freed with &s.code;xf86FreeOffscreenArea()&e.code;. - -&s.code;xf86ResizeOffscreenArea()&e.code; resizes an existing -&s.code;FBArea&e.code;. &s.code;xf86ResizeOffscreenArea()&e.code; -returns &s.code;TRUE&e.code; if the resize was successful. If -&s.code;xf86ResizeOffscreenArea()&e.code; returns &s.code;FALSE&e.code;, -the original &s.code;FBArea&e.code; is left unmodified. Resizing an -area maintains the area's original &s.code;granularity&e.code;, -&s.code;devPrivate&e.code;, and &s.code;MoveAreaCallback&e.code;. -&s.code;xf86ResizeOffscreenArea()&e.code; has considerably less overhead -than freeing the old area then reallocating the new size, so it should -be used whenever possible. - -The function: - <quote> - &s.code;Bool xf86QueryLargestOffscreenArea( - &f.indent;ScreenPtr pScreen, - &f.indent;int *width, int *height, - &f.indent;int granularity, - &f.indent;int preferences, - &f.indent;int priority - &nl)&e.code; - </quote> - -is provided to query the width and height of the largest single -&s.code;FBArea&e.code; allocatable given a particular priority. -&s.code;preferences&e.code; can be one of the following to indicate -whether width, height or area should be considered when determining -which is the largest single &s.code;FBArea&e.code; available. - - <quote> - &s.code;FAVOR_AREA_THEN_WIDTH&nl; - FAVOR_AREA_THEN_HEIGHT&nl; - FAVOR_WIDTH_THEN_AREA&nl; - FAVOR_HEIGHT_THEN_AREA&e.code; - </quote> - -&s.code;priority&e.code; is one of the following: - - <quote><p> - &s.code;PRIORITY_LOW&e.code; - <quote><p> - Return the largest block available without stealing anyone else's - space. This corresponds to the priority of allocating a - &s.code;FBArea&e.code; when a &s.code;RemoveAreaCallback&e.code; - is provided. - - </quote> - &s.code;PRIORITY_NORMAL&e.code; - <quote><p> - Return the largest block available if it is acceptable to steal a - lower priority area from someone. This corresponds to the priority - of allocating a &s.code;FBArea&e.code; without providing a - &s.code;RemoveAreaCallback&e.code;. - - </quote> - &s.code;PRIORITY_EXTREME&e.code; - <quote><p> - Return the largest block available if all &s.code;FBAreas&e.code; - that aren't locked down were expunged from memory first. This - corresponds to any allocation made directly after a call to - &s.code;xf86PurgeUnlockedOffscreenAreas()&e.code;. - - </quote> - </quote> - - -The function: - - <quote> - &s.code;Bool xf86PurgeUnlockedOffscreenAreas(ScreenPtr pScreen)&e.code; - </quote> - -is provided as an extreme method to free up offscreen memory. This -will remove all removable &s.code;FBArea&e.code; allocations. - - -Initialization of the XFree86 framebuffer manager is done via - - <quote> - &s.code;Bool xf86InitFBManager(ScreenPtr pScreen, BoxPtr FullBox)&e.code; - </quote> - -&s.code;FullBox&e.code; represents the area of the framebuffer that the -manager is allowed to manage. This is typically a box with a width of -&s.code;pScrn->displayWidth&e.code; and a height of as many lines as -can be fit within the total video memory, however, the driver can reserve -areas at the extremities by passing a smaller area to the manager. - -&s.code;xf86InitFBManager()&e.code; must be called before XAA is -initialized since XAA uses the manager for it's pixmap cache. - -An alternative function is provided to allow the driver to initialize -the framebuffer manager with a Region rather than a box. - - <quote> - &s.code;Bool xf86InitFBManagerRegion(ScreenPtr pScreen, - &f.indent;RegionPtr FullRegion)&e.code; - </quote> - -&s.code;xf86InitFBManagerRegion()&e.code;, unlike -&s.code;xf86InitFBManager()&e.code;, does not remove the area used for -the visible screen so that area should not be included in the region -passed to the function. &s.code;xf86InitFBManagerRegion()&e.code; is -useful when non-contiguous areas are available to be managed, and is -required when multiple framebuffers are stored in video memory (as in -the case where an overlay of a different depth is stored as a second -framebuffer in offscreen memory). - - -<sect>Colormap Handling<label id="cmap"> -<p> - -A generic colormap handling layer is provided within the XFree86 common -layer. This layer takes care of most of the details, and only requires -a function from the driver that loads the hardware palette when required. -To use the colormap layer, a driver calls the -&s.code;xf86HandleColormaps()&e.code; function. - - <quote><p> - &s.code;Bool xf86HandleColormaps(ScreenPtr pScreen, int maxColors, - &f.indent;int sigRGBbits, LoadPaletteFuncPtr loadPalette, - &f.indent;SetOverscanFuncPtr setOverscan, - unsigned int flags)&e.code; - <quote><p> - This function must be called after the default colormap has been - initialised. The &s.code;pScrn->gamma&e.code; field must also - be initialised, preferably by calling &s.code;xf86SetGamma()&e.code;. - &s.code;maxColors&e.code; is the number of entries in the palette. - &s.code;sigRGBbits&e.code; is the size in bits of each color - component in the DAC's palette. &s.code;loadPalette&e.code; - is a driver-provided function for loading a colormap into the - hardware, and is described below. &s.code;setOverscan&e.code; is - an optional function that may be provided when the overscan color - is an index from the standard LUT and when it needs to be adjusted - to keep it as close to black as possible. The - &s.code;setOverscan&e.code; function programs the overscan index. - It shouldn't normally be used for depths other than 8. - &s.code;setOverscan&e.code; should be set to &s.code;NULL&e.code; - when it isn't needed. &s.code;flags&e.code; may be set to the - following (which may be ORed together): - - &s.code;CMAP_PALETTED_TRUECOLOR&e.code; - <quote><p> - the TrueColor visual is paletted and is - just a special case of DirectColor. - This flag is only valid for - &s.code;bpp > 8&e.code;. - - </quote> - - &s.code;CMAP_RELOAD_ON_MODE_SWITCH&e.code; - <quote><p> - reload the colormap automatically - after mode switches. This is useful - for when the driver is resetting the - hardware during mode switches and - corrupting or erasing the hardware - palette. - - </quote> - - &s.code;CMAP_LOAD_EVEN_IF_OFFSCREEN&e.code; - <quote><p> - reload the colormap even if the screen - is switched out of the server's VC. - The palette is <it>not</it> reloaded when - the screen is switched back in, nor after - mode switches. This is useful when the - driver needs to keep track of palette - changes. - - </quote> - - The colormap layer normally reloads the palette after VT enters so it - is not necessary for the driver to save and restore the palette - when switching VTs. The driver must, however, still save the - initial palette during server start up and restore it during - server exit. - - </quote> - - &s.code;void LoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices, - &f.indent;LOCO *colors, VisualPtr pVisual)&e.code; - <quote><p> - &s.code;LoadPalette()&e.code; is a driver-provided function for - loading a colormap into hardware. &s.code;colors&e.code; is the - array of RGB values that represent the full colormap. - &s.code;indices&e.code; is a list of index values into the colors - array. These indices indicate the entries that need to be updated. - &s.code;numColors&e.code; is the number of the indices to be - updated. - - </quote> - - &s.code;void SetOverscan(ScrnInfoPtr pScrn, int overscan)&e.code; - <quote><p> - &s.code;SetOverscan()&e.code; is a driver-provided function for - programming the &s.code;overscan&e.code; index. As described - above, it is normally only appropriate for LUT modes where all - colormap entries are available for the display, but where one of - them is also used for the overscan (typically 8bpp for VGA compatible - LUTs). It isn't required in cases where the overscan area is - never visible. - - </quote> - </quote> - - -<sect>DPMS Extension -<p> - -Support code for the DPMS extension is included in the XFree86 common layer. -This code provides an interface between the main extension code, and a means -for drivers to initialise DPMS when they support it. One function is -available to drivers to do this initialisation, and it is always available, -even when the DPMS extension is not supported by the core server (in -which case it returns a failure result). - - - <quote><p> - &s.code;Bool xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags)&e.code; - <quote><p> - This function registers a driver's DPMS level programming function - &s.code;set&e.code;. It also checks - &s.code;pScrn->options&e.code; for the "dpms" option, and when - present marks DPMS as being enabled for that screen. The - &s.code;set&e.code; function is called whenever the DPMS level - changes, and is used to program the requested level. - &s.code;flags&e.code; is currently not used, and should be - &s.code;0&e.code;. If the initialisation fails for any reason, - including when there is no DPMS support in the core server, the - function returns &s.code;FALSE&e.code;. - - </quote> - </quote> - - -Drivers that implement DPMS support must provide the following function, -that gets called when the DPMS level is changed: - - - <quote><p> - &s.code;void ChipDPMSSet(ScrnInfoPtr pScrn, int level, int flags)&e.code; - <quote><p> - Program the DPMS level specified by &s.code;level&e.code;. Valid - values of &s.code;level&e.code; are &s.code;DPMSModeOn&e.code;, - &s.code;DPMSModeStandby&e.code;, &s.code;DPMSModeSuspend&e.code;, - &s.code;DPMSModeOff&e.code;. These values are defined in - &s.code;"extensions/dpms.h"&e.code;. - - </quote> - </quote> - - -<sect>DGA Extension -<p> - -Drivers can support the XFree86 Direct Graphics Architecture (DGA) by -filling out a structure of function pointers and a list of modes and -passing them to DGAInit. - - <quote><p> - &s.code;Bool DGAInit(ScreenPtr pScreen, DGAFunctionPtr funcs, - &f.indent;DGAModePtr modes, int num)&e.code; - <quote><p> - <verb> -/** The DGAModeRec **/ - -typedef struct { - int num; - DisplayModePtr mode; - int flags; - int imageWidth; - int imageHeight; - int pixmapWidth; - int pixmapHeight; - int bytesPerScanline; - int byteOrder; - int depth; - int bitsPerPixel; - unsigned long red_mask; - unsigned long green_mask; - unsigned long blue_mask; - int viewportWidth; - int viewportHeight; - int xViewportStep; - int yViewportStep; - int maxViewportX; - int maxViewportY; - int viewportFlags; - int offset; - unsigned char *address; - int reserved1; - int reserved2; -} DGAModeRec, *DGAModePtr; -</verb> - - &s.code;num&e.code; - <quote> - Can be ignored. The DGA DDX will assign these numbers. - </quote> - - &s.code;mode&e.code; - <quote> - A pointer to the &s.code;DisplayModeRec&e.code; for this mode. - </quote> - - &s.code;flags&e.code; - <quote><p> - The following flags are defined and may be OR'd together: - - &s.code;DGA_CONCURRENT_ACCESS&e.code; - <quote><p> - Indicates that the driver supports concurrent graphics - accelerator and linear framebuffer access. - - </quote> - - &s.code;DGA_FILL_RECT&nl; - DGA_BLIT_RECT&nl; - DGA_BLIT_RECT_TRANS&e.code; - <quote><p> - Indicates that the driver supports the FillRect, BlitRect - or BlitTransRect functions in this mode. - - </quote> - - &s.code;DGA_PIXMAP_AVAILABLE&e.code; - <quote><p> - Indicates that Xlib may be used on the framebuffer. - This flag will usually be set unless the driver wishes - to prohibit this for some reason. - - </quote> - - &s.code;DGA_INTERLACED&nl; - DGA_DOUBLESCAN&e.code; - <quote><p> - Indicates that these are interlaced or double scan modes. - - </quote> - </quote> - - &s.code;imageWidth&nl; - imageHeight&e.code; - <quote><p> - These are the dimensions of the linear framebuffer - accessible by the client. - - </quote> - - &s.code;pixmapWidth&nl; - pixmapHeight&e.code; - <quote><p> - These are the dimensions of the area of the - framebuffer accessible by the graphics accelerator. - - </quote> - - &s.code;bytesPerScanline&e.code; - <quote><p> - Pitch of the framebuffer in bytes. - - </quote> - - &s.code;byteOrder&e.code; - <quote><p> - Usually the same as - &s.code;pScrn->imageByteOrder&e.code;. - - </quote> - - &s.code;depth&e.code; - <quote><p> - The depth of the framebuffer in this mode. - - </quote> - - &s.code;bitsPerPixel&e.code; - <quote><p> - The number of bits per pixel in this mode. - - </quote> - - &s.code;red_mask&nl; - green_mask&nl; - blue_mask&e.code; - <quote><p> - The RGB masks for this mode, if applicable. - - </quote> - - &s.code;viewportWidth&nl; - viewportHeight&e.code; - <quote><p> - Dimensions of the visible part of the framebuffer. - Usually &s.code;mode->HDisplay&e.code; and - &s.code;mode->VDisplay&e.code;. - - </quote> - - &s.code;xViewportStep&nl; - yViewportStep&e.code; - <quote><p> - The granularity of x and y viewport positions that - the driver supports in this mode. - - </quote> - - &s.code;maxViewportX&nl; - maxViewportY&e.code; - <quote><p> - The maximum viewport position supported by the - driver in this mode. - - </quote> - - &s.code;viewportFlags&e.code; - <quote><p> - The following may be OR'd together: - - &s.code;DGA_FLIP_IMMEDIATE&e.code; - <quote><p> - The driver supports immediate viewport changes. - - </quote> - &s.code;DGA_FLIP_RETRACE&e.code; - <quote<p> - The driver supports viewport changes at retrace. - - </quote> - </quote> - - &s.code;offset&e.code; - <quote><p> - The offset into the linear framebuffer that corresponds to - pixel (0,0) for this mode. - - </quote> - - &s.code;address&e.code; - <quote><p> - The virtual address of the framebuffer as mapped by the driver. - This is needed when DGA_PIXMAP_AVAILABLE is set. - - </quote> - - <verb> -/** The DGAFunctionRec **/ - -typedef struct { - Bool (*OpenFramebuffer)( - ScrnInfoPtr pScrn, - char **name, - unsigned char **mem, - int *size, - int *offset, - int *extra - ); - void (*CloseFramebuffer)(ScrnInfoPtr pScrn); - Bool (*SetMode)(ScrnInfoPtr pScrn, DGAModePtr pMode); - void (*SetViewport)(ScrnInfoPtr pScrn, int x, int y, int flags); - int (*GetViewport)(ScrnInfoPtr pScrn); - void (*Sync)(ScrnInfoPtr); - void (*FillRect)( - ScrnInfoPtr pScrn, - int x, int y, int w, int h, - unsigned long color - ); - void (*BlitRect)( - ScrnInfoPtr pScrn, - int srcx, int srcy, - int w, int h, - int dstx, int dsty - ); - void (*BlitTransRect)( - ScrnInfoPtr pScrn, - int srcx, int srcy, - int w, int h, - int dstx, int dsty, - unsigned long color - ); -} DGAFunctionRec, *DGAFunctionPtr; -</verb> - - </quote> - - &s.code;Bool OpenFramebuffer (pScrn, name, mem, size, offset, extra)&e.code; - <quote><p> - &s.code;OpenFramebuffer()&e.code; should pass the client everything - it needs to know to be able to open the framebuffer. These - parameters are OS specific and their meanings are to be interpreted - by an OS specific client library. - - &s.code;name&e.code; - <quote><p> - The name of the device to open or &s.code;NULL&e.code; if - there is no special device to open. A &s.code;NULL&e.code; - name tells the client that it should open whatever device - one would usually open to access physical memory. - - </quote> - &s.code;mem&e.code; - <quote><p> - The physical address of the start of the framebuffer. - - </quote> - &s.code;size&e.code; - <quote><p> - The size of the framebuffer in bytes. - - </quote> - &s.code;offset&e.code; - <quote><p> - Any offset into the device, if applicable. - - </quote> - &s.code;flags&e.code; - <quote><p> - Any additional information that the client may need. - Currently, only the &s.code;DGA_NEED_ROOT&e.code; flag is - defined. - - </quote> - </quote> - - &s.code;void CloseFramebuffer (pScrn)&e.code; - <quote><p> - &s.code;CloseFramebuffer()&e.code; merely informs the driver (if it - even cares) that client no longer needs to access the framebuffer - directly. This function is optional. - - </quote> - - &s.code;Bool SetMode (pScrn, pMode)&e.code; - <quote><p> - &s.code;SetMode()&e.code; tells the driver to initialize the mode - passed to it. If &s.code;pMode&e.code; is &s.code;NULL&e.code;, - then the driver should restore the original pre-DGA mode. - - </quote> - - &s.code;void SetViewport (pScrn, x, y, flags)&e.code; - <quote><p> - &s.code;SetViewport()&e.code; tells the driver to make the upper - left-hand corner of the visible screen correspond to coordinate - &s.code;(x,y)&e.code; on the framebuffer. &s.code;Flags&e.code; - currently defined are: - - &s.code;DGA_FLIP_IMMEDIATE&e.code; - <quote><p> - The viewport change should occur immediately. - - </quote> - &s.code;DGA_FLIP_RETRACE&e.code; - <quote><p> - The viewport change should occur at the - vertical retrace, but this function should - return sooner if possible. - - </quote> - The &s.code;(x,y)&e.code; locations will be passed as the client - specified them, however, the driver is expected to round these - locations down to the next supported location as specified by the - &s.code;xViewportStep&e.code; and &s.code;yViewportStep&e.code; - for the current mode. - - </quote> - - &s.code;int GetViewport (pScrn)&e.code; - <quote><p> - &s.code;GetViewport()&e.code; gets the current page flip status. - Set bits in the returned int correspond to viewport change requests - still pending. For instance, set bit zero if the last SetViewport - request is still pending, bit one if the one before that is still - pending, etc. - - </quote> - - &s.code;void Sync (pScrn)&e.code; - <quote><p> - This function should ensure that any graphics accelerator operations - have finished. This function should not return until the graphics - accelerator is idle. - - </quote> - - &s.code;void FillRect (pScrn, x, y, w, h, color)&e.code; - <quote><p> - This optional function should fill a rectangle - &s.code;w × h&e.code; located at - &s.code;(x,y)&e.code; in the given color. - - </quote> - - &s.code;void BlitRect (pScrn, srcx, srcy, w, h, dstx, dsty)&e.code; - <quote><p> - This optional function should copy an area - &s.code;w × h&e.code; located at - &s.code;(srcx,srcy)&e.code; to location &s.code;(dstx,dsty)&e.code;. - This function will need to handle copy directions as appropriate. - - </quote> - - &s.code;void BlitTransRect (pScrn, srcx, srcy, w, h, dstx, dsty, color)&e.code; - <quote><p> - This optional function is the same as BlitRect except that pixels - in the source corresponding to the color key &s.code;color&e.code; - should be skipped. - - </quote> - </quote> - -<sect>The XFree86 X Video Extension (Xv) Device Dependent Layer -<p> - -XFree86 offers the X Video Extension which allows clients to treat video -as any another primitive and ``Put'' video into drawables. By default, -the extension reports no video adaptors as being available since the -DDX layer has not been initialized. The driver can initialize the DDX -layer by filling out one or more &s.code;XF86VideoAdaptorRecs&e.code; -as described later in this document and passing a list of -&s.code;XF86VideoAdaptorPtr&e.code; pointers to the following function: - - <quote> - &s.code;Bool xf86XVScreenInit( - &f.indent;ScreenPtr pScreen, - &f.indent;XF86VideoAdaptorPtr *adaptPtrs, - &f.indent;int num)&e.code; - </quote> - -After doing this, the extension will report video adaptors as being -available, providing the data in their respective -&s.code;XF86VideoAdaptorRecs&e.code; was valid. -&s.code;xf86XVScreenInit()&e.code; <em>copies</em> data from the structure -passed to it so the driver may free it after the initialization. At -the moment, the DDX only supports rendering into Window drawables. -Pixmap rendering will be supported after a sufficient survey of suitable -hardware is completed. - -The &s.code;XF86VideoAdaptorRec&e.code;: - -<quote><p> -<verb> -typedef struct { - unsigned int type; - int flags; - char *name; - int nEncodings; - XF86VideoEncodingPtr pEncodings; - int nFormats; - XF86VideoFormatPtr pFormats; - int nPorts; - DevUnion *pPortPrivates; - int nAttributes; - XF86AttributePtr pAttributes; - int nImages; - XF86ImagePtr pImages; - PutVideoFuncPtr PutVideo; - PutStillFuncPtr PutStill; - GetVideoFuncPtr GetVideo; - GetStillFuncPtr GetStill; - StopVideoFuncPtr StopVideo; - SetPortAttributeFuncPtr SetPortAttribute; - GetPortAttributeFuncPtr GetPortAttribute; - QueryBestSizeFuncPtr QueryBestSize; - PutImageFuncPtr PutImage; - QueryImageAttributesFuncPtr QueryImageAttributes; -} XF86VideoAdaptorRec, *XF86VideoAdaptorPtr; -</verb> - - Each adaptor will have its own XF86VideoAdaptorRec. The fields are - as follows: - - &s.code;type&e.code; - <quote><p> - This can be any of the following flags OR'd together. - - &s.code;XvInputMask&e.code; - &s.code;XvOutputMask&e.code; - <quote><p> - These refer to the target drawable and are similar to a Window's - class. &s.code;XvInputMask&e.code; indicates that the adaptor - can put video into a drawable. &s.code;XvOutputMask&e.code; - indicates that the adaptor can get video from a drawable. - </quote> - - &s.code;XvVideoMask&e.code; - &s.code;XvStillMask&e.code; - &s.code;XvImageMask&e.code; - <quote><p> - These indicate that the adaptor supports video, still or - image primitives respectively. - </quote> - - &s.code;XvWindowMask&e.code; - &s.code;XvPixmapMask&e.code; - <quote><p> - These indicate the types of drawables the adaptor is capable - of rendering into. At the moment, Pixmap rendering is not - supported and the &s.code;XvPixmapMask&e.code; flag is ignored. - </quote> - - </quote> - - &s.code;flags&e.code; - <quote><p> - Currently, the following flags are defined: - - &s.code;VIDEO_NO_CLIPPING&e.code; - <quote><p> - This indicates that the video adaptor does not support - clipping. The driver will never receive ``Put'' requests - where less than the entire area determined by - &s.code;drw_x&e.code;, &s.code;drw_y&e.code;, - &s.code;drw_w&e.code; and &s.code;drw_h&e.code; is visible. - This flag does not apply to ``Get'' requests. Hardware - that is incapable of clipping ``Gets'' may punt or get - the extents of the clipping region passed to it. - - </quote> - - &s.code;VIDEO_INVERT_CLIPLIST&e.code; - <quote><p> - This indicates that the video driver requires the clip - list to contain the regions which are obscured rather - than the regions which are are visible. - - </quote> - - &s.code;VIDEO_OVERLAID_STILLS&e.code; - <quote><p> - Implementing PutStill for hardware that does video as an - overlay can be awkward since it's unclear how long to leave - the video up for. When this flag is set, StopVideo will be - called whenever the destination gets clipped or moved so that - the still can be left up until then. - - </quote> - - &s.code;VIDEO_OVERLAID_IMAGES&e.code; - <quote><p> - Same as &s.code;VIDEO_OVERLAID_STILLS&e.code; but for images. - </quote> - - &s.code;VIDEO_CLIP_TO_VIEWPORT&e.code; - <quote><p> - Indicates that the clip region passed to the driver functions - should be clipped to the visible portion of the screen in the - case where the viewport is smaller than the virtual desktop. - </quote> - - </quote> - - &s.code;name&e.code; - <quote><p> - The name of the adaptor. - - </quote> - - &s.code;nEncodings&nl; - pEncodings&e.code; - <quote><p> - The number of encodings the adaptor is capable of and pointer - to the &s.code;XF86VideoEncodingRec&e.code; array. The - &s.code;XF86VideoEncodingRec&e.code; is described later on. - For drivers that only support XvImages there should be an encoding - named "XV_IMAGE" and the width and height should specify - the maximum size source image supported. - - </quote> - - &s.code;nFormats&nl; - pFormats&e.code; - <quote><p> - The number of formats the adaptor is capable of and pointer to - the &s.code;XF86VideoFormatRec&e.code; array. The - &s.code;XF86VideoFormatRec&e.code; is described later on. - - </quote> - - &s.code;nPorts&nl; - pPortPrivates&e.code; - <quote><p> - The number of ports is the number of separate data streams which - the adaptor can handle simultaneously. If you have more than - one port, the adaptor is expected to be able to render into more - than one window at a time. &s.code;pPortPrivates&e.code; is - an array of pointers or ints - one for each port. A port's - private data will be passed to the driver any time the port is - requested to do something like put the video or stop the video. - In the case where there may be many ports, this enables the - driver to know which port the request is intended for. Most - commonly, this will contain a pointer to the data structure - containing information about the port. In Xv, all ports on - a particular adaptor are expected to be identical in their - functionality. - - </quote> - - &s.code;nAttributes&nl; - pAttributes&e.code; - <quote><p> - The number of attributes recognized by the adaptor and a pointer to - the array of &s.code;XF86AttributeRecs&e.code;. The - &s.code;XF86AttributeRec&e.code; is described later on. - - </quote> - - &s.code;nImages&nl; - pImages&e.code; - <quote><p> - The number of &s.code;XF86ImageRecs&e.code; supported by the adaptor - and a pointer to the array of &s.code;XF86ImageRecs&e.code;. The - &s.code;XF86ImageRec&e.code; is described later on. - - </quote> - - - &s.code;PutVideo PutStill GetVideo GetStill StopVideo - SetPortAttribute GetPortAttribute QueryBestSize PutImage - QueryImageAttributes&e.code; - <quote><p> - These functions define the DDX->driver interface. In each - case, the pointer &s.code;data&e.code; is passed to the driver. - This is the port private for that port as described above. All - fields are required except under the following conditions: - - <enum> - <item>&s.code;PutVideo&e.code;, &s.code;PutStill&e.code; and - the image routines &s.code;PutImage&e.code; and - &s.code;QueryImageAttributes&e.code; are not required when the - adaptor type does not contain &s.code;XvInputMask&e.code;. - - <item>&s.code;GetVideo&e.code; and &s.code;GetStill&e.code; - are not required when the adaptor type does not contain - &s.code;XvOutputMask&e.code;. - - <item>&s.code;GetVideo&e.code; and &s.code;PutVideo&e.code; - are not required when the adaptor type does not contain - &s.code;XvVideoMask&e.code;. - - <item>&s.code;GetStill&e.code; and &s.code;PutStill&e.code; - are not required when the adaptor type does not contain - &s.code;XvStillMask&e.code;. - - <item>&s.code;PutImage&e.code; and &s.code;QueryImageAttributes&e.code; - are not required when the adaptor type does not contain - &s.code;XvImageMask&e.code;. - - </enum> - - With the exception of &s.code;QueryImageAttributes&e.code;, these - functions should return &s.code;Success&e.code; if the operation was - completed successfully. They can return &s.code;XvBadAlloc&e.code; - otherwise. &s.code;QueryImageAttributes&e.code; returns the size - of the XvImage queried. - - If the &s.code;VIDEO_NO_CLIPPING&e.code; - flag is set, the &s.code;clipBoxes&e.code; may be ignored by - the driver. &s.code;ClipBoxes&e.code; is an &s.code;X-Y&e.code; - banded region identical to those used throughout the server. - The clipBoxes represent the visible portions of the area determined - by &s.code;drw_x&e.code;, &s.code;drw_y&e.code;, - &s.code;drw_w&e.code; and &s.code;drw_h&e.code; in the Get/Put - function. The boxes are in screen coordinates, are guaranteed - not to overlap and an empty region will never be passed. - If the driver has specified &s.code;VIDEO_INVERT_CLIPLIST&e.code;, - &s.code;clipBoxes&e.code; will indicate the areas of the primitive - which are obscured rather than the areas visible. - - </quote> - - &s.code;typedef int (* PutVideoFuncPtr)( ScrnInfoPtr pScrn, - &f.indent;short vid_x, short vid_y, short drw_x, short drw_y, - &f.indent;short vid_w, short vid_h, short drw_w, short drw_h, - &f.indent;RegionPtr clipBoxes, pointer data )&e.code; - <quote><p> - This indicates that the driver should take a subsection - &s.code;vid_w&e.code; by &s.code;vid_h&e.code; at location - &s.code;(vid_x,vid_y)&e.code; from the video stream and direct - it into the rectangle &s.code;drw_w&e.code; by &s.code;drw_h&e.code; - at location &s.code;(drw_x,drw_y)&e.code; on the screen, scaling as - necessary. Due to the large variations in capabilities of - the various hardware expected to be used with this extension, - it is not expected that all hardware will be able to do this - exactly as described. In that case the driver should just do - ``the best it can,'' scaling as closely to the target rectangle - as it can without rendering outside of it. In the worst case, - the driver can opt to just not turn on the video. - - </quote> - - &s.code;typedef int (* PutStillFuncPtr)( ScrnInfoPtr pScrn, - &f.indent;short vid_x, short vid_y, short drw_x, short drw_y, - &f.indent;short vid_w, short vid_h, short drw_w, short drw_h, - &f.indent;RegionPtr clipBoxes, pointer data )&e.code; - <quote><p> - This is same as &s.code;PutVideo&e.code; except that the driver - should place only one frame from the stream on the screen. - - </quote> - - &s.code;typedef int (* GetVideoFuncPtr)( ScrnInfoPtr pScrn, - &f.indent;short vid_x, short vid_y, short drw_x, short drw_y, - &f.indent;short vid_w, short vid_h, short drw_w, short drw_h, - &f.indent;RegionPtr clipBoxes, pointer data )&e.code; - <quote><p> - This is same as &s.code;PutVideo&e.code; except that the driver - gets video from the screen and outputs it. The driver should - do the best it can to get the requested dimensions correct - without reading from an area larger than requested. - - </quote> - - &s.code;typedef int (* GetStillFuncPtr)( ScrnInfoPtr pScrn, - &f.indent;short vid_x, short vid_y, short drw_x, short drw_y, - &f.indent;short vid_w, short vid_h, short drw_w, short drw_h, - &f.indent;RegionPtr clipBoxes, pointer data )&e.code; - <quote><p> - This is the same as &s.code;GetVideo&e.code; except that the - driver should place only one frame from the screen into the - output stream. - - </quote> - - &s.code;typedef void (* StopVideoFuncPtr)(ScrnInfoPtr pScrn, - &f.indent;pointer data, Bool cleanup)&e.code; - <quote><p> - This indicates the driver should stop displaying the video. - This is used to stop both input and output video. The - &s.code;cleanup&e.code; field indicates that the video is - being stopped because the client requested it to stop or - because the server is exiting the current VT. In that case - the driver should deallocate any offscreen memory areas (if - there are any) being used to put the video to the screen. If - &s.code;cleanup&e.code; is not set, the video is being stopped - temporarily due to clipping or moving of the window, etc... - and video will likely be restarted soon so the driver should - not deallocate any offscreen areas associated with that port. - - </quote> - &s.code;typedef int (* SetPortAttributeFuncPtr)(ScrnInfoPtr pScrn, - &f.indent;Atom attribute,INT32 value, pointer data)&e.code; - - &s.code;typedef int (* GetPortAttributeFuncPtr)(ScrnInfoPtr pScrn, - &f.indent;Atom attribute,INT32 *value, pointer data)&e.code; - - <quote><p> - A port may have particular attributes such as hue, - saturation, brightness or contrast. Xv clients set and - get these attribute values by sending attribute strings - (Atoms) to the server. Such requests end up at these - driver functions. It is recommended that the driver provide - at least the following attributes mentioned in the Xv client - library docs: - <quote> - &s.code;XV_ENCODING&nl; - XV_HUE&nl; - XV_SATURATION&nl; - XV_BRIGHTNESS&nl; - XV_CONTRAST&e.code; - </quote> - but the driver may recognize as many atoms as it wishes. If - a requested attribute is unknown by the driver it should return - &s.code;BadMatch&e.code;. &s.code;XV_ENCODING&e.code; is the - attribute intended to let the client specify which video - encoding the particular port should be using (see the description - of &s.code;XF86VideoEncodingRec&e.code; below). If the - requested encoding is unsupported, the driver should return - &s.code;XvBadEncoding&e.code;. If the value lies outside the - advertised range &s.code;BadValue&e.code; may be returned. - &s.code;Success&e.code; should be returned otherwise. - - </quote> - - &s.code;typedef void (* QueryBestSizeFuncPtr)(ScrnInfoPtr pScrn, - &f.indent;Bool motion, short vid_w, short vid_h, - &f.indent;short drw_w, short drw_h, - &f.indent;unsigned int *p_w, unsigned int *p_h, pointer data)&e.code; - <quote><p> - &s.code;QueryBestSize&e.code; provides the client with a way - to query what the destination dimensions would end up being - if they were to request that an area - &s.code;vid_w&e.code by &s.code;vid_h&e.code; from the video - stream be scaled to rectangle of - &s.code;drw_w&e.code; by &s.code;drw_h&e.code; on the screen. - Since it is not expected that all hardware will be able to - get the target dimensions exactly, it is important that the - driver provide this function. - - </quote> - - &s.code;typedef int (* PutImageFuncPtr)( ScrnInfoPtr pScrn, - &f.indent;short src_x, short src_y, short drw_x, short drw_y, - &f.indent;short src_w, short src_h, short drw_w, short drw_h, - &f.indent;int image, char *buf, short width, short height, - &f.indent;Bool sync, RegionPtr clipBoxes, pointer data )&e.code; - <quote><p> - This is similar to &s.code;PutStill&e.code; except that the - source of the video is not a port but the data stored in a system - memory buffer at &s.code;buf&e.code;. The data is in the format - indicated by the &s.code;image&e.code; descriptor and represents a - source of size &s.code;width&e.code; by &s.code;height&e.code;. - If &s.code;sync&e.code; is TRUE the driver should not return - from this function until it is through reading the data - from &s.code;buf&e.code;. Returning when &s.code;sync&e.code; - is TRUE indicates that it is safe for the data at &s.code;buf&e.code; - to be replaced, freed, or modified. - - </quote> - - &s.code;typedef int (* QueryImageAttributesFuncPtr)( ScrnInfoPtr pScrn, - &f.indent;int image, short *width, short *height, - &f.indent;int *pitches, int *offsets)&e.code; - <quote><p> - This function is called to let the driver specify how data for - a particular &s.code;image&e.code; of size &s.code;width&e.code; - by &s.code;height&e.code; should be stored. Sometimes only - the size and corrected width and height are needed. In that - case &s.code;pitches&e.code; and &s.code;offsets&e.code; are - NULL. The size of the memory required for the image is returned - by this function. The &s.code;width&e.code; and - &s.code;height&e.code; of the requested image can be altered by - the driver to reflect format limitations (such as component - sampling periods that are larger than one). If - &s.code;pitches&e.code; and &s.code;offsets&e.code; are not NULL, - these will be arrays with as many elements in them as there - are planes in the &s.code;image&e.code; format. The driver - should specify the pitch (in bytes) of each scanline in the - particular plane as well as the offset to that plane (in bytes) - from the beginning of the image. - - </quote> - - </quote> - -The XF86VideoEncodingRec: -<quote><p> -<verb> -typedef struct { - int id; - char *name; - unsigned short width, height; - XvRationalRec rate; -} XF86VideoEncodingRec, *XF86VideoEncodingPtr; - -</verb> - The &s.code;XF86VideoEncodingRec&e.code; specifies what encodings - the adaptor can support. Most of this data is just informational - and for the client's benefit, and is what will be reported by - &s.code;XvQueryEncodings&e.code;. The &s.code;id&e.code; field is - expected to be a unique identifier to allow the client to request a - certain encoding via the &s.code;XV_ENCODING&e.code; attribute string. - -</quote> - -The XF86VideoFormatRec: - -<quote><p> -<verb> -typedef struct { - char depth; - short class; -} XF86VideoFormatRec, *XF86VideoFormatPtr; -</verb> - - This specifies what visuals the video is viewable in. - &s.code;depth&e.code; is the depth of the visual (not bpp). - &s.code;class&e.code; is the visual class such as - &s.code;TrueColor&e.code;, &s.code;DirectColor&e.code; or - &s.code;PseudoColor&e.code;. Initialization of an adaptor will fail - if none of the visuals on that screen are supported. - -</quote> - -The XF86AttributeRec: - -<quote><p> -<verb> -typedef struct { - int flags; - int min_value; - int max_value; - char *name; -} XF86AttributeListRec, *XF86AttributeListPtr; - -</verb> - - Each adaptor may have an array of these advertising the attributes - for its ports. Currently defined flags are &s.code;XvGettable&e.code; - and &s.code;XvSettable&e.code; which may be OR'd together indicating that - attribute is ``gettable'' or ``settable'' by the client. The - &s.code;min&e.code; and &s.code;max&e.code; field specify the valid range - for the value. &s.code;Name&e.code; is a text string describing the - attribute by name. - -</quote> - -The XF86ImageRec: - -<quote><p> -<verb> -typedef struct { - int id; - int type; - int byte_order; - char guid[16]; - int bits_per_pixel; - int format; - int num_planes; - - /* for RGB formats */ - int depth; - unsigned int red_mask; - unsigned int green_mask; - unsigned int blue_mask; - - /* for YUV formats */ - unsigned int y_sample_bits; - unsigned int u_sample_bits; - unsigned int v_sample_bits; - unsigned int horz_y_period; - unsigned int horz_u_period; - unsigned int horz_v_period; - unsigned int vert_y_period; - unsigned int vert_u_period; - unsigned int vert_v_period; - char component_order[32]; - int scanline_order; -} XF86ImageRec, *XF86ImagePtr; -</verb> - - XF86ImageRec describes how video source data is laid out in memory. - The fields are as follows: - - &s.code;id&e.code; - <quote><p> - This is a unique descriptor for the format. It is often good to - set this value to the FOURCC for the format when applicable. - </quote> - - &s.code;type&e.code; - <quote><p> - This is &s.code;XvRGB&e.code; or &s.code;XvYUV&e.code;. - </quote> - - &s.code;byte_order&e.code; - <quote><p> - This is &s.code;LSBFirst&e.code; or &s.code;MSBFirst&e.code;. - </quote> - - &s.code;guid&e.code; - <quote><p> - This is the Globally Unique IDentifier for the format. When - not applicable, all characters should be NULL. - </quote> - - &s.code;bits_per_pixel&e.code; - <quote><p> - The number of bits taken up (but not necessarily used) by each - pixel. Note that for some planar formats which have fractional - bits per pixel (such as IF09) this number may be rounded _down_. - </quote> - - &s.code;format&e.code; - <quote><p> - This is &s.code;XvPlanar&e.code; or &s.code;XvPacked&e.code;. - </quote> - - &s.code;num_planes&e.code; - <quote><p> - The number of planes in planar formats. This should be set to - one for packed formats. - </quote> - - &s.code;depth&e.code; - <quote><p> - The significant bits per pixel in RGB formats (analgous to the - depth of a pixmap format). - </quote> - - &s.code;red_mask&e.code; - &s.code;green_mask&e.code; - &s.code;blue_mask&e.code; - <quote><p> - The red, green and blue bitmasks for packed RGB formats. - </quote> - - &s.code;y_sample_bits&e.code; - &s.code;u_sample_bits&e.code; - &s.code;v_sample_bits&e.code; - <quote><p> - The y, u and v sample sizes (in bits). - </quote> - - &s.code;horz_y_period&e.code; - &s.code;horz_u_period&e.code; - &s.code;horz_v_period&e.code; - <quote><p> - The y, u and v sampling periods in the horizontal direction. - </quote> - - &s.code;vert_y_period&e.code; - &s.code;vert_u_period&e.code; - &s.code;vert_v_period&e.code; - <quote><p> - The y, u and v sampling periods in the vertical direction. - </quote> - - &s.code;component_order&e.code; - <quote><p> - Uppercase ascii characters representing the order that - samples are stored within packed formats. For planar formats - this represents the ordering of the planes. Unused characters - in the 32 byte string should be set to NULL. - </quote> - - &s.code;scanline_order&e.code; - <quote><p> - This is &s.code;XvTopToBottom&e.code; or &s.code;XvBottomToTop&e.code;. - </quote> - - Since some formats (particular some planar YUV formats) may not -be completely defined by the parameters above, the guid, when -available, should provide the most accurate description of the -format. - -</quote> - -<sect>The Loader -<p> - -This section describes the interfaces to the module loader. The loader -interfaces can be divided into two groups: those that are only available to -the XFree86 common layer, and those that are also available to modules. - -<sect1>Loader Overview -<p> - -The loader is capable of loading modules in a range of object formats, -and knowledge of these formats is built in to the loader. Knowledge of -new object formats can be added to the loader in a straightforward -manner. This makes it possible to provide OS-independent modules (for -a given CPU architecture type). In addition to this, the loader can -load modules via the OS-provided &s.code;dlopen(3)&e.code; service where -available. Such modules are not platform independent, and the semantics -of &s.code;dlopen()&e.code; on most systems results in significant -limitations in the use of modules of this type. Support for -&s.code;dlopen()&e.code; modules in the loader is primarily for -experimental and development purposes. - -Symbols exported by the loader (on behalf of the core X server) to -modules are determined at compile time. Only those symbols explicitly -exported are available to modules. All external symbols of loaded -modules are exported to other modules, and to the core X server. The -loader can be requested to check for unresolved symbols at any time, -and the action to be taken for unresolved symbols can be controlled by -the caller of the loader. Typically the caller identifies which symbols -can safely remain unresolved and which cannot. - -NOTE: Now that ISO-C allows pointers to functions and pointers to data to -have different internal representations, some of the following interfaces -will need to be revisited. - -<sect1>Semi-private Loader Interface -<p> - -The following is the semi-private loader interface that is available to the -XFree86 common layer. - - <quote><p> - &s.code;void LoaderInit(void)&e.code; - <quote><p> - The &s.code;LoaderInit()&e.code; function initialises the loader, - and it must be called once before calling any other loader functions. - This function initialises the tables of exported symbols, and anything - else that might need to be initialised. - - </quote> - - &s.code;void LoaderSetPath(const char *path)&e.code; - <quote><p> - The &s.code;LoaderSetPath()&e.code; function initialises a default - module search path. This must be called if calls to other functions - are to be made without explicitly specifying a module search path. - The search path &s.code;path&e.code; must be a string of one or more - comma separated absolute paths. Modules are expected to be located - below these paths, possibly in subdirectories of these paths. - - </quote> - - &s.code;pointer LoadModule(const char *module, const char *path, - &f.indent;const char **subdirlist, const char **patternlist, - &f.indent;pointer options, const XF86ModReqInfo * modreq, - &f.indent;int *errmaj, int *errmin)&e.code; - <quote><p> - The &s.code;LoadModule()&e.code; function loads the module called - &s.code;module&e.code;. The return value is a module handle, and - may be used in future calls to the loader that require a reference - to a loaded module. The module name &s.code;module&e.code; is - normally the module's canonical name, which doesn't contain any - directory path information, or any object/library file prefixes of - suffixes. Currently a full pathname and/or filename is also accepted. - This might change. The other parameters are: - - &s.code;path&e.code; - <quote><p> - An optional comma-separated list of module search paths. - When &s.code;NULL&e.code;, the default search path is used. - - </quote> - - &s.code;subdirlist&e.code; - <quote><p> - An optional &s.code;NULL&e.code; terminated list of - subdirectories to search. When &s.code;NULL&e.code;, - the default built-in list is used (refer to - &s.code;stdSubdirs&e.code; in &s.code;loadmod.c&e.code;). - The default list is also substituted for entries in - &s.code;subdirlist&e.code; with the value - &s.code;DEFAULT_LIST&e.code;. This makes is possible - to augment the default list instead of replacing it. - Subdir elements must be relative, and must not contain - &s.code;".."&e.code;. If any violate this requirement, - the load fails. - - </quote> - - &s.code;patternlist&e.code; - <quote><p> - An optional &s.code;NULL&e.code; terminated list of - POSIX regular expressions used to connect module - filenames with canonical module names. Each regex - should contain exactly one subexpression that corresponds - to the canonical module name. When &s.code;NULL&e.code;, - the default built-in list is used (refer to - &s.code;stdPatterns&e.code; in - &s.code;loadmod.c&e.code;). The default list is also - substituted for entries in &s.code;patternlist&e.code; - with the value &s.code;DEFAULT_LIST&e.code;. This - makes it possible to augment the default list instead - of replacing it. - - </quote> - - &s.code;options&e.code; - <quote><p> - An optional parameter that is passed to the newly - loaded module's &s.code;SetupProc&e.code; function - (if it has one). This argument is normally a - &s.code;NULL&e.code; terminated list of - &s.code;Options&e.code;, and must be interpreted that - way by modules loaded directly by the XFree86 common - layer. However, it may be used for application-specific - parameter passing in other situations. - - When loading ``external'' modules (modules that don't - have the standard entry point, for example a - special shared library) the options parameter can be - set to &s.code;EXTERN_MODULE&e.code; to tell the - loader not to reject the module when it doesn't find - the standard entry point. - - </quote> - - &s.code;modreq&e.code; - <quote><p> - An optional &s.code;XF86ModReqInfo*&e.code; containing - version/ABI/vendor information to requirements to - check the newly loaded module against. The main - purpose of this is to allow the loader to verify that - a module of the correct type/version before running - its &s.code;SetupProc&e.code; function. - - The &s.code;XF86ModReqInfo&e.code; struct is defined - as follows: -<verb> -typedef struct { - CARD8 majorversion; /* MAJOR_UNSPEC */ - CARD8 minorversion; /* MINOR_UNSPEC */ - CARD16 patchlevel; /* PATCH_UNSPEC */ - const char * abiclass; /* ABI_CLASS_NONE */ - CARD32 abiversion; /* ABI_VERS_UNSPEC */ - const char * moduleclass; /* MOD_CLASS_NONE */ -} XF86ModReqInfo; -</verb> - - The information here is compared against the equivalent - information in the module's - &s.code;XF86ModuleVersionInfo&e.code; record (which - is described below). The values in comments above - indicate ``don't care'' settings for each of the fields. - The comparisons made are as follows: - - &s.code;majorversion&e.code; - <quote><p> - Must match the module's majorversion - exactly. - - </quote> - &s.code;minorversion&e.code; - <quote><p> - The module's minor version must be - no less than this value. This - comparison is only made if - &s.code;majorversion&e.code; is - specified and matches. - - </quote> - &s.code;patchlevel&e.code; - <quote><p> - The module's patchlevel must be no - less than this value. This comparison - is only made if - &s.code;minorversion&e.code; is - specified and matches. - - </quote> - &s.code;abiclass&e.code; - <quote><p> - String must match the module's abiclass - string. - - </quote> - &s.code;abiversion&e.code; - <quote><p> - Must be consistent with the module's - abiversion (major equal, minor no - older). - - </quote> - &s.code;moduleclass&e.code; - <quote><p> - String must match the module's - moduleclass string. - - </quote> - - </quote> - - &s.code;errmaj&e.code; - <quote><p> - An optional pointer to a variable holding the major - part or the error code. When provided, - &s.code;*errmaj&e.code; is filled in when - &s.code;LoadModule()&e.code; fails. - - </quote> - - &s.code;errmin&e.code; - <quote><p> - Like &s.code;errmaj&e.code;, but for the minor part - of the error code. - - </quote> - - </quote> - - &s.code;void UnloadModule(pointer mod)&e.code; - <quote><p> - This function unloads the module referred to by the handle mod. - All child modules are also unloaded recursively. This function must - not be used to directly unload modules that are child modules (i.e., - those that have been loaded with the &s.code;LoadSubModule()&e.code; - described below). - - </quote> - </quote> - -<sect1>Module Requirements -<p> - -Modules must provide information about themselves to the loader, and -may optionally provide entry points for "setup" and "teardown" functions -(those two functions are referred to here as &s.code;SetupProc&e.code; -and &s.code;TearDownProc&e.code;). - -The module information is contained in the -&s.code;XF86ModuleVersionInfo&e.code; struct, which is defined as follows: - -<quote><p><verb> -typedef struct { - const char * modname; /* name of module, e.g. "foo" */ - const char * vendor; /* vendor specific string */ - CARD32 _modinfo1_; /* constant MODINFOSTRING1/2 to find */ - CARD32 _modinfo2_; /* infoarea with a binary editor/sign tool */ - CARD32 xf86version; /* contains XF86_VERSION_CURRENT */ - CARD8 majorversion; /* module-specific major version */ - CARD8 minorversion; /* module-specific minor version */ - CARD16 patchlevel; /* module-specific patch level */ - const char * abiclass; /* ABI class that the module uses */ - CARD32 abiversion; /* ABI version */ - const char * moduleclass; /* module class */ - CARD32 checksum[4]; /* contains a digital signature of the */ - /* version info structure */ -} XF86ModuleVersionInfo; -</verb> - -The fields are used as follows: - - &s.code;modname&e.code; - <quote><p> - The module's name. This field is currently only for - informational purposes, but the loader may be modified - in future to require it to match the module's canonical - name. - - </quote> - - &s.code;vendor&e.code; - <quote><p> - The module vendor. This field is for informational purposes - only. - - </quote> - - &s.code;_modinfo1_&e.code; - <quote><p> - This field holds the first part of a signature that can - be used to locate this structure in the binary. It should - always be initialised to &s.code;MODINFOSTRING1&e.code;. - - </quote> - - &s.code;_modinfo2_&e.code; - <quote><p> - This field holds the second part of a signature that can - be used to locate this structure in the binary. It should - always be initialised to &s.code;MODINFOSTRING2&e.code;. - - </quote> - - &s.code;xf86version&e.code; - <quote><p> - The XFree86 version against which the module was compiled. - This is mostly for informational/diagnostic purposes. It - should be initialised to &s.code;XF86_VERSION_CURRENT&e.code;, which is - defined in &s.code;xf86Version.h&e.code;. - - </quote> - - &s.code;majorversion&e.code; - <quote><p> - The module-specific major version. For modules where this - version is used for more than simply informational - purposes, the major version should only change (be - incremented) when ABI incompatibilities are introduced, - or ABI components are removed. - - </quote> - - &s.code;minorversion&e.code; - <quote><p> - The module-specific minor version. For modules where this - version is used for more than simply informational - purposes, the minor version should only change (be - incremented) when ABI additions are made in a backward - compatible way. It should be reset to zero when the major - version is increased. - - </quote> - - &s.code;patchlevel&e.code; - <quote><p> - The module-specific patch level. The patch level should - increase with new revisions of the module where there - are no ABI changes, and it should be reset to zero when - the minor version is increased. - - </quote> - - &s.code;abiclass&e.code; - <quote><p> - The ABI class that the module requires. The class is - specified as a string for easy extensibility. It should - indicate which (if any) of the X server's built-in ABI - classes that the module relies on, or a third-party ABI - if appropriate. Built-in ABI classes currently defined are: - - <quote> - &s.code;ABI_CLASS_NONE&e.code; - <quote>no class</quote> - &s.code;ABI_CLASS_ANSIC&e.code; - <quote>only requires the ANSI C interfaces</quote> - &s.code;ABI_CLASS_VIDEODRV&e.code; - <quote>requires the video driver ABI</quote> - &s.code;ABI_CLASS_XINPUT&e.code; - <quote>requires the XInput driver ABI</quote> - &s.code;ABI_CLASS_EXTENSION&e.code; - <quote>requires the extension module ABI</quote> - &s.code;ABI_CLASS_FONT&e.code; - <quote>requires the font module ABI</quote> - </quote> - - </quote> - - &s.code;abiversion&e.code; - <quote><p> - The version of abiclass that the module requires. The - version consists of major and minor components. The - major version must match and the minor version must be - no newer than that provided by the server or parent - module. Version identifiers for the built-in classes - currently defined are: - - <quote> - &s.code;ABI_ANSIC_VERSION&nl; - ABI_VIDEODRV_VERSION&nl; - ABI_XINPUT_VERSION&nl; - ABI_EXTENSION_VERSION&nl; - ABI_FONT_VERSION&e.code; - </quote> - - </quote> - - &s.code;moduleclass&e.code; - <quote><p> - This is similar to the abiclass field, except that it - defines the type of module rather than the ABI it - requires. For example, although all video drivers require - the video driver ABI, not all modules that require the - video driver ABI are video drivers. This distinction - can be made with the moduleclass. Currently pre-defined - module classes are: - - <quote> - &s.code;MOD_CLASS_NONE&nl; - MOD_CLASS_VIDEODRV&nl; - MOD_CLASS_XINPUT&nl; - MOD_CLASS_FONT&nl; - MOD_CLASS_EXTENSION&e.code; - </quote> - - </quote> - - &s.code;checksum&e.code; - <quote><p> - Not currently used. - - </quote> - -</quote> - -The module version information, and the optional &s.code;SetupProc&e.code; -and &s.code;TearDownProc&e.code; entry points are found by the loader -by locating a data object in the module called "modnameModuleData", -where "modname" is the canonical name of the module. Modules must -contain such a data object, and it must be declared with global scope, -be compile-time initialised, and is of the following type: - -<quote> -<verb> -typedef struct { - XF86ModuleVersionInfo * vers; - ModuleSetupProc setup; - ModuleTearDownProc teardown; -} XF86ModuleData; -</verb> -</quote> - -The vers parameter must be initialised to a pointer to a correctly -initialised &s.code;XF86ModuleVersionInfo&e.code; struct. The other -two parameter are optional, and should be initialised to -&s.code;NULL&e.code; when not required. The other parameters are defined -as - - <quote><p> - &s.code;typedef pointer (*ModuleSetupProc)(pointer, pointer, int *, int *)&e.code; - - &s.code;typedef void (*ModuleTearDownProc)(pointer)&e.code; - - - &s.code;pointer SetupProc(pointer module, pointer options, - &f.indent;int *errmaj, int *errmin)&e.code; - <quote><p> - When defined, this function is called by the loader after successfully - loading a module. module is a handle for the newly loaded module, - and maybe used by the &s.code;SetupProc&e.code; if it calls other - loader functions that require a reference to it. The remaining - arguments are those that were passed to the - &s.code;LoadModule()&e.code; (or &s.code;LoadSubModule()&e.code;), - and are described above. When the &s.code;SetupProc&e.code; is - successful it must return a non-&s.code;NULL&e.code; value. The - loader checks this, and if it is &s.code;NULL&e.code; it unloads - the module and reports the failure to the caller of - &s.code;LoadModule()&e.code;. If the &s.code;SetupProc&e.code; - does things that need to be undone when the module is unloaded, - it should define a &s.code;TearDownProc&e.code;, and return a - pointer that the &s.code;TearDownProc&e.code; can use to undo what - has been done. - - When a module is loaded multiple times, the &s.code;SetupProc&e.code; - is called once for each time it is loaded. - - </quote> - - &s.code;void TearDownProc(pointer tearDownData)&e.code; - <quote><p> - When defined, this function is called when the loader unloads a - module. The &s.code;tearDownData&e.code; parameter is the return - value of the &s.code;SetupProc()&e.code; that was called when the - module was loaded. The purpose of this function is to clean up - before the module is unloaded (for example, by freeing allocated - resources). - - </quote> - </quote> - -<sect1>Public Loader Interface -<p> - -The following is the Loader interface that is available to any part of -the server, and may also be used from within modules. - - <quote><p> - &s.code;pointer LoadSubModule(pointer parent, const char *module, - &f.indent;const char **subdirlist, const char **patternlist, - &f.indent;pointer options, const XF86ModReqInfo * modreq, - &f.indent;int *errmaj, int *errmin)&e.code; - <quote><p> - This function is like the &s.code;LoadModule()&e.code; function - described above, except that the module loaded is registered as a - child of the calling module. The &s.code;parent&e.code; parameter - is the calling module's handle. Modules loaded with this function - are automatically unloaded when the parent module is unloaded. The - other difference is that the path parameter may not be specified. - The module search path used for modules loaded with this function - is the default search path as initialised with - &s.code;LoaderSetPath()&e.code;. - - </quote> - - &s.code;void UnloadSubModule(pointer module)&e.code; - <quote><p> - This function unloads the module with handle &s.code;module&e.code;. - If that module itself has children, they are also unloaded. It is - like &s.code;UnloadModule()&e.code;, except that it is safe to use - for unloading child modules. - - </quote> - - &s.code;pointer LoaderSymbol(const char *symbol)&e.code; - <quote><p> - This function returns the address of the symbol with name - &s.code;symbol&e.code;. This may be used to locate a module entry - point with a known name. - - </quote> - - &s.code;char **LoaderlistDirs(const char **subdirlist, - &f.indent;const char **patternlist)&e.code; - <quote><p> - This function returns a &s.code;NULL&e.code; terminated list of - canonical modules names for modules found in the default module - search path. The &s.code;subdirlist&e.code; and - &s.code;patternlist&e.code; parameters are as described above, and - can be used to control the locations and names that are searched. - If no modules are found, the return value is &s.code;NULL&e.code;. - The returned list should be freed by calling - &s.code;LoaderFreeDirList()&e.code; when it is no longer needed. - - </quote> - - &s.code;void LoaderFreeDirList(char **list)&e.code; - <quote><p> - This function frees a module list created by - &s.code;LoaderlistDirs()&e.code;. - - </quote> - - &s.code;void LoaderReqSymLists(const char **list0, ...)&e.code; - <quote><p> - This function allows the registration of required symbols with the - loader. It is normally used by a caller of - &s.code;LoadSubModule()&e.code;. If any symbols registered in this - way are found to be unresolved when - &s.code;LoaderCheckUnresolved()&e.code; is called then - &s.code;LoaderCheckUnresolved()&e.code; will report a failure. - The function takes one or more &s.code;NULL&e.code; terminated - lists of symbols. The end of the argument list is indicated by a - &s.code;NULL&e.code; argument. - - </quote> - - &s.code;void LoaderReqSymbols(const char *sym0, ...)&e.code; - <quote><p> - This function is like &s.code;LoaderReqSymLists()&e.code; except - that its arguments are symbols rather than lists of symbols. This - function is more convenient when single functions are to be registered, - especially when the single function might depend on runtime factors. - The end of the argument list is indicated by a &s.code;NULL&e.code; - argument. - - </quote> - - &s.code;void LoaderRefSymLists(const char **list0, ...)&e.code; - <quote><p> - This function allows the registration of possibly unresolved symbols - with the loader. When &s.code;LoaderCheckUnresolved()&e.code; is - run it won't generate warnings for symbols registered in this way - unless they were also registered as required symbols. - The function takes one or more &s.code;NULL&e.code; terminated - lists of symbols. The end of the argument list is indicated by a - &s.code;NULL&e.code; argument. - - </quote> - - &s.code;void LoaderRefSymbols(const char *sym0, ...)&e.code; - <quote><p> - This function is like &s.code;LoaderRefSymLists()&e.code; except - that its arguments are symbols rather than lists of symbols. This - function is more convenient when single functions are to be registered, - especially when the single function might depend on runtime factors. - The end of the argument list is indicated by a &s.code;NULL&e.code; - argument. - - </quote> - - &s.code;int LoaderCheckUnresolved(int delayflag)&e.code; - <quote><p> - This function checks for unresolved symbols. It generates warnings - for unresolved symbols that have not been registered with - &s.code;LoaderRefSymLists()&e.code;, and maps them to a dummy - function. This behaviour may change in future. If unresolved - symbols are found that have been registered with - &s.code;LoaderReqSymLists()&e.code; or - &s.code;LoaderReqSymbols()&e.code; then this function returns a - non-zero value. If none of these symbols are unresolved the return - value is zero, indicating success. - - The &s.code;delayflag&e.code; parameter should normally be set to - &s.code;LD_RESOLV_IFDONE&e.code;. - - </quote> - - &s.code;LoaderErrorMsg(const char *name, const char *modname, - &f.indent;int errmaj, int errmin)&e.code; - <quote><p> - This function prints an error message that includes the text ``Failed - to load module'', the module name &s.code;modname&e.code;, a message - specific to the &s.code;errmaj&e.code; value, and the value if - &s.code;errmin&e.code;. If &s.code;name&e.code; is - non-&s.code;NULL&e.code;, it is printed as an identifying prefix - to the message (followed by a `:'). - - </quote> - </quote> - -<sect1>Special Registration Functions -<p> - -The loader contains some functions for registering some classes of modules. -These may be moved out of the loader at some point. - - <quote><p> - &s.code;void LoadExtension(ExtensionModule *ext)&e.code; - <quote><p> - This registers the entry points for the extension identified by - &s.code;ext&e.code;. The &s.code;ExtensionModule&e.code; struct is - defined as: - -<quote> -<verb> -typedef struct { - InitExtension initFunc; - char * name; - Bool *disablePtr; - InitExtension setupFunc; -} ExtensionModule; -</verb> -</quote> - - </quote> - - &s.code;void LoadFont(FontModule *font)&e.code; - <quote><p> - This registers the entry points for the font rasteriser module - identified by &s.code;font&e.code;. The &s.code;FontModule&e.code; - struct is defined as: - -<quote> -<verb> -typedef struct { - InitFont initFunc; - char * name; - pointer module; -} FontModule; -</verb> -</quote> - - </quote> - </quote> - -</sect> - - -<sect>Helper Functions -<p> - -This section describe ``helper'' functions that video driver -might find useful. While video drivers are not required to use any of -these to be considered ``compliant'', the use of appropriate helpers is -strongly encouraged to improve the consistency of driver behaviour. - -<sect1>Functions for printing messages -<p> - - <quote><p> - &s.code;ErrorF(const char *format, ...)&e.code; - <quote><p> - This is the basic function for writing to the error log (typically - stderr and/or a log file). Video drivers should usually avoid - using this directly in favour of the more specialised functions - described below. This function is useful for printing messages - while debugging a driver. - - </quote> - - &s.code;FatalError(const char *format, ...)&e.code; - <quote><p> - This prints a message and causes the Xserver to abort. It should - rarely be used within a video driver, as most error conditions - should be flagged by the return values of the driver functions. - This allows the higher layers to decide how to proceed. In rare - cases, this can be used within a driver if a fatal unexpected - condition is found. - - </quote> - - &s.code;xf86ErrorF(const char *format, ...)&e.code; - <quote><p> - This is like &s.code;ErrorF()&e.code;, except that the message is - only printed when the Xserver's verbosity level is set to the - default (&s.code;1&e.code;) or higher. It means that the messages - are not printed when the server is started with the - &s.cmd;-quiet&e.cmd; flag. Typically this function would only be - used for continuing messages started with one of the more specialised - functions described below. - - </quote> - - &s.code;xf86ErrorFVerb(int verb, const char *format, ...)&e.code; - <quote><p> - Like &s.code;xf86ErrorF()&e.code;, except the minimum verbosity - level for which the message is to be printed is given explicitly. - Passing a &s.code;verb&e.code; value of zero means the message - is always printed. A value higher than &s.code;1&e.code; can be - used for information would normally not be needed, but which might - be useful when diagnosing problems. - - </quote> - - &s.code;xf86Msg(MessageType type, const char *format, ...)&e.code; - <quote><p> - This is like &s.code;xf86ErrorF()&e.code;, except that the message - is prefixed with a marker determined by the value of - &s.code;type&e.code;. The marker is used to indicate the type of - message (warning, error, probed value, config value, etc). Note - the &s.code;xf86Verbose&e.code; value is ignored for messages of - type &s.code;X_ERROR&e.code;. - - The marker values are: - - <quote> - &s.code;X_PROBED&e.code; - <quote>Value was probed.</quote> - &s.code;X_CONFIG&e.code; - <quote>Value was given in the config file.</quote> - &s.code;X_DEFAULT&e.code; - <quote>Value is a default.</quote> - &s.code;X_CMDLINE&e.code; - <quote>Value was given on the command line.</quote> - &s.code;X_NOTICE&e.code; - <quote>Notice.</quote> - &s.code;X_ERROR&e.code; - <quote>Error message.</quote> - &s.code;X_WARNING&e.code; - <quote>Warning message.</quote> - &s.code;X_INFO&e.code; - <quote>Informational message.</quote> - &s.code;X_NONE&e.code; - <quote>No prefix.</quote> - &s.code;X_NOT_IMPLEMENTED&e.code; - <quote>The message relates to functionality that is not yet - implemented.</quote> - </quote> - - - </quote> - - &s.code;xf86MsgVerb(MessageType type, int verb, const char *format, ...)&e.code; - <quote><p> - Like &s.code;xf86Msg()&e.code;, but with the verbosity level given - explicitly. - - </quote> - - &s.code;xf86DrvMsg(int scrnIndex, MessageType type, const char *format, ...)&e.code; - <quote><p> - This is like &s.code;xf86Msg()&e.code; except that the driver's - name (the &s.code;name&e.code; field of the - &s.code;ScrnInfoRec&e.code;) followed by the - &s.code;scrnIndex&e.code; in parentheses is printed following the - prefix. This should be used by video drivers in most cases as it - clearly indicates which driver/screen the message is for. If - &s.code;scrnIndex&e.code; is negative, this function behaves - exactly like &s.code;xf86Msg()&e.code;. - - NOTE: This function can only be used after the - &s.code;ScrnInfoRec&e.code; and its &s.code;name&e.code; field - have been allocated. Normally, this means that it can not be - used before the END of the &s.code;ChipProbe()&e.code; function. - Prior to that, use &s.code;xf86Msg()&e.code;, providing the - driver's name explicitly. No screen number can be supplied at - that point. - - </quote> - - &s.code;xf86DrvMsgVerb(int scrnIndex, MessageType type, int verb, - &f.indent;const char *format, ...)&e.code; - <quote><p> - Like &s.code;xf86DrvMsg()&e.code;, but with the verbosity level - given explicitly. - - </quote> - </quote> - - -<sect1>Functions for setting values based on command line and config file -<p> - - <quote><p> - &s.code;Bool xf86SetDepthBpp(ScrnInfoPtr scrp, int depth, int bpp, - &f.indent;int fbbpp, int depth24flags)&e.code; - <quote><p> - This function sets the &s.code;depth&e.code;, &s.code;pixmapBPP&e.code; and &s.code;bitsPerPixel&e.code; fields - of the &s.code;ScrnInfoRec&e.code;. It also determines the defaults for display-wide - attributes and pixmap formats the screen will support, and finds - the Display subsection that matches the depth/bpp. This function - should normally be called very early from the - &s.code;ChipPreInit()&e.code; function. - - It requires that the &s.code;confScreen&e.code; field of the &s.code;ScrnInfoRec&e.code; be - initialised prior to calling it. This is done by the XFree86 - common layer prior to calling &s.code;ChipPreInit()&e.code;. - - The parameters passed are: - - &s.code;depth&e.code; - <quote><p> - driver's preferred default depth if no other is given. - If zero, use the overall server default. - - </quote> - &s.code;bpp&e.code; - <quote><p> - Same, but for the pixmap bpp. - - </quote> - &s.code;fbbpp&e.code; - <quote><p> - Same, but for the framebuffer bpp. - - </quote> - &s.code;depth24flags&e.code; - <quote><p> - Flags that indicate the level of 24/32bpp support - and whether conversion between different framebuffer - and pixmap formats is supported. The flags for this - argument are defined as follows, and multiple flags - may be ORed together: - - &s.code;NoDepth24Support&e.code; - <quote>No depth 24 formats supported</quote> - &s.code;Support24bppFb&e.code; - <quote>24bpp framebuffer supported</quote> - &s.code;Support32bppFb&e.code; - <quote>32bpp framebuffer supported</quote> - &s.code;SupportConvert24to32&e.code; - <quote>Can convert 24bpp pixmap to 32bpp fb</quote> - &s.code;SupportConvert32to24&e.code; - <quote>Can convert 32bpp pixmap to 24bpp fb</quote> - &s.code;ForceConvert24to32&e.code; - <quote>Force 24bpp pixmap to 32bpp fb conversion</quote> - &s.code;ForceConvert32to24&e.code; - <quote>Force 32bpp pixmap to 24bpp fb conversion</quote> - - </quote> - - It uses the command line, config file, and default values in the - correct order of precedence to determine the depth and bpp values. - It is up to the driver to check the results to see that it supports - them. If not the &s.code;ChipPreInit()&e.code; function should - return &s.code;FALSE&e.code;. - - If only one of depth/bpp is given, the other is set to a reasonable - (and consistent) default. - - If a driver finds that the initial &s.code;depth24flags&e.code; - it uses later results in a fb format that requires more video - memory than is available it may call this function a second time - with a different &s.code;depth24flags&e.code; setting. - - On success, the return value is &s.code;TRUE&e.code;. On failure - it prints an error message and returns &s.code;FALSE&e.code;. - - The following fields of the &s.code;ScrnInfoRec&e.code; are - initialised by this function: - - <quote> - &s.code;depth&e.code;, &s.code;bitsPerPixel&e.code;, - &s.code;display&e.code;, &s.code;imageByteOrder&e.code;, - &s.code;bitmapScanlinePad&e.code;, - &s.code;bitmapScanlineUnit&e.code;, &s.code;bitmapBitOrder&e.code;, - &s.code;numFormats&e.code;, &s.code;formats&e.code;, - &s.code;fbFormat&e.code;. - </quote> - - </quote> - - &s.code;void xf86PrintDepthBpp(scrnInfoPtr scrp)&e.code; - <quote><p> - This function can be used to print out the depth and bpp settings. - It should be called after the final call to - &s.code;xf86SetDepthBpp()&e.code;. - - </quote> - - &s.code;Bool xf86SetWeight(ScrnInfoPtr scrp, rgb weight, rgb mask)&e.code; - <quote><p> - This function sets the &s.code;weight&e.code;, &s.code;mask&e.code;, - &s.code;offset&e.code; and &s.code;rgbBits&e.code; fields of the - &s.code;ScrnInfoRec&e.code;. It would normally be called fairly - early in the &s.code;ChipPreInit()&e.code; function for - depths > 8bpp. - - It requires that the &s.code;depth&e.code; and - &s.code;display&e.code; fields of the &s.code;ScrnInfoRec&e.code; - be initialised prior to calling it. - - The parameters passed are: - - &s.code;weight&e.code; - <quote><p> - driver's preferred default weight if no other is given. - If zero, use the overall server default. - - </quote> - - &s.code;mask&e.code; - <quote><p> - Same, but for mask. - - </quote> - - It uses the command line, config file, and default values in the - correct order of precedence to determine the weight value. It - derives the mask and offset values from the weight and the defaults. - It is up to the driver to check the results to see that it supports - them. If not the &s.code;ChipPreInit()&e.code; function should - return &s.code;FALSE&e.code;. - - On success, this function prints a message showing the weight - values selected, and returns &s.code;TRUE&e.code;. - - On failure it prints an error message and returns &s.code;FALSE&e.code;. - - The following fields of the &s.code;ScrnInfoRec&e.code; are - initialised by this function: - - <quote> - &s.code;weight&e.code;, &s.code;mask&e.code;, &s.code;offset&e.code;. - </quote> - - </quote> - - &s.code;Bool xf86SetDefaultVisual(ScrnInfoPtr scrp, int visual)&e.code; - <quote><p> - This function sets the &s.code;defaultVisual&e.code; field of the - &s.code;ScrnInfoRec&e.code;. It would normally be called fairly - early from the &s.code;ChipPreInit()&e.code; function. - - It requires that the &s.code;depth&e.code; and - &s.code;display&e.code; fields of the &s.code;ScrnInfoRec&e.code; - be initialised prior to calling it. - - The parameters passed are: - - &s.code;visual&e.code; - <quote><p> - driver's preferred default visual if no other is given. - If &s.code;-1&e.code;, use the overall server default. - - </quote> - - It uses the command line, config file, and default values in the - correct order of precedence to determine the default visual value. - It is up to the driver to check the result to see that it supports - it. If not the &s.code;ChipPreInit()&e.code; function should - return &s.code;FALSE&e.code;. - - On success, this function prints a message showing the default visual - selected, and returns &s.code;TRUE&e.code;. - - On failure it prints an error message and returns &s.code;FALSE&e.code;. - - </quote> - - &s.code;Bool xf86SetGamma(ScrnInfoPtr scrp, Gamma gamma)&e.code; - <quote><p> - This function sets the &s.code;gamma&e.code; field of the - &s.code;ScrnInfoRec&e.code;. It would normally be called fairly - early from the &s.code;ChipPreInit()&e.code; function in cases - where the driver supports gamma correction. - - It requires that the &s.code;monitor&e.code; field of the - &s.code;ScrnInfoRec&e.code; be initialised prior to calling it. - - The parameters passed are: - - &s.code;gamma&e.code; - <quote><p> - driver's preferred default gamma if no other is given. - If zero (&s.code;< 0.01&e.code;), use the overall server - default. - - </quote> - - It uses the command line, config file, and default values in the - correct order of precedence to determine the gamma value. It is - up to the driver to check the results to see that it supports - them. If not the &s.code;ChipPreInit()&e.code; function should - return &s.code;FALSE&e.code;. - - On success, this function prints a message showing the gamma - value selected, and returns &s.code;TRUE&e.code;. - - On failure it prints an error message and returns &s.code;FALSE&e.code;. - - </quote> - - &s.code;void xf86SetDpi(ScrnInfoPtr pScrn, int x, int y)&e.code; - <quote><p> - This function sets the &s.code;xDpi&e.code; and &s.code;yDpi&e.code; - fields of the &s.code;ScrnInfoRec&e.code;. The driver can specify - preferred defaults by setting &s.code;x&e.code; and &s.code;y&e.code; - to non-zero values. The &s.cmd;-dpi&e.cmd; command line option - overrides all other settings. Otherwise, if the - &s.key;DisplaySize&e.key; entry is present in the screen's &k.monitor; - config file section, it is used together with the virtual size to - calculate the dpi values. This function should be called after - all the mode resolution has been done. - - </quote> - - &s.code;void xf86SetBlackWhitePixels(ScrnInfoPtr pScrn)&e.code; - <quote><p> - This functions sets the &s.code;blackPixel&e.code; and - &s.code;whitePixel&e.code; fields of the &s.code;ScrnInfoRec&e.code; - according to whether or not the &s.cmd;-flipPixels&e.cmd; command - line options is present. - - </quote> - - &s.code;const char *xf86GetVisualName(int visual)&e.code; - <quote><p> - Returns a printable string with the visual name matching the - numerical visual class provided. If the value is outside the - range of valid visual classes, &s.code;NULL&e.code; is returned. - - </quote> - </quote> - - -<sect1>Primary Mode functions -<p> - -The primary mode helper functions are those which would normally be -used by a driver, unless it has unusual requirements which cannot -be catered for the by the helpers. - - <quote><p> - &s.code;int xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes, - &f.indent;char **modeNames, ClockRangePtr clockRanges, - &f.indent;int *linePitches, int minPitch, int maxPitch, - &f.indent;int pitchInc, int minHeight, int maxHeight, - &f.indent;int virtualX, int virtualY, - &f.indent;unsigned long apertureSize, - &f.indent;LookupModeFlags strategy)&e.code; - <quote><p> - This function basically selects the set of modes to use based on - those available and the various constraints. It also sets some - other related parameters. It is normally called near the end of - the &s.code;ChipPreInit()&e.code; function. - - The parameters passed to the function are: - - &s.code;availModes&e.code; - <quote><p> - List of modes available for the monitor. - - </quote> - &s.code;modeNames&e.code; - <quote><p> - List of mode names that the screen is requesting. - - </quote> - &s.code;clockRanges&e.code; - <quote><p> - A list of clock ranges allowed by the driver. Each - range includes whether interlaced or multiscan modes - are supported for that range. See below for more on - &s.code;clockRanges&e.code;. - - </quote> - &s.code;linePitches&e.code; - <quote><p> - List of line pitches supported by the driver. - This is optional and should be &s.code;NULL&e.code; when - not used. - - </quote> - &s.code;minPitch&e.code; - <quote><p> - Minimum line pitch supported by the driver. This must - be supplied when &s.code;linePitches&e.code; is - &s.code;NULL&e.code;, and is ignored otherwise. - - </quote> - &s.code;maxPitch&e.code; - <quote><p> - Maximum line pitch supported by the driver. This is - required when &s.code;minPitch&e.code; is required. - - </quote> - &s.code;pitchInc&e.code; - <quote><p> - Granularity of horizontal pitch values as supported by - the chipset. This is expressed in bits. This must be - supplied. - - </quote> - &s.code;minHeight&e.code; - <quote><p> - minimum virtual height allowed. If zero, no limit is - imposed. - - </quote> - &s.code;maxHeight&e.code; - <quote><p> - maximum virtual height allowed. If zero, no limit is - imposed. - - </quote> - &s.code;virtualX&e.code; - <quote><p> - If greater than zero, this is the virtual width value - that will be used. Otherwise, the virtual width is - chosen to be the smallest that can accommodate the modes - selected. - - </quote> - &s.code;virtualY&e.code; - <quote><p> - If greater than zero, this is the virtual height value - that will be used. Otherwise, the virtual height is - chosen to be the smallest that can accommodate the modes - selected. - - </quote> - &s.code;apertureSize&e.code; - <quote><p> - The size (in bytes) of the aperture used to access video - memory. - - </quote> - &s.code;strategy&e.code; - <quote><p> - The strategy to use when choosing from multiple modes - with the same name. The options are: - - &s.code;LOOKUP_DEFAULT&e.code; - <quote>???</quote> - &s.code;LOOKUP_BEST_REFRESH&e.code; - <quote>mode with best refresh rate</quote> - &s.code;LOOKUP_CLOSEST_CLOCK&e.code; - <quote>mode with closest matching clock</quote> - &s.code;LOOKUP_LIST_ORDER&e.code; - <quote>first usable mode in list</quote> - - The following options can also be combined (OR'ed) with - one of the above: - - &s.code;LOOKUP_CLKDIV2&e.code; - <quote>Allow halved clocks</quote> - &s.code;LOOKUP_OPTIONAL_TOLERANCES&e.code; - <quote>Allow missing horizontal sync and/or vertical refresh - ranges in the xorg.conf Monitor section</quote> - - &s.code;LOOKUP_OPTIONAL_TOLERANCES&e.code; should only be - specified when the driver can ensure all modes it generates - can sync on, or at least not damage, the monitor or digital - flat panel. Horizontal sync and/or vertical refresh ranges - specified by the user will still be honoured (and acted upon). - - </quote> - - This function requires that the following fields of the - &s.code;ScrnInfoRec&e.code; are initialised prior to calling it: - - &s.code;clock[]&e.code; - <quote>List of discrete clocks (when non-programmable)</quote> - &s.code;numClocks&e.code; - <quote>Number of discrete clocks (when non-programmable)</quote> - &s.code;progClock&e.code; - <quote>Whether the clock is programmable or not</quote> - &s.code;monitor&e.code; - <quote>Pointer to the applicable xorg.conf monitor section</quote> - &s.code;fdFormat&e.code; - <quote>Format of the screen buffer</quote> - &s.code;videoRam&e.code; - <quote>total video memory size (in bytes)</quote> - &s.code;maxHValue&e.code; - <quote>Maximum horizontal timing value allowed</quote> - &s.code;maxVValue&e.code; - <quote>Maximum vertical timing value allowed</quote> - &s.code;xInc&e.code; - <quote>Horizontal timing increment in pixels (defaults to 8)</quote> - - This function fills in the following &s.code;ScrnInfoRec&e.code; - fields: - - &s.code;modePool&e.code; - <quote><p> - A subset of the modes available to the monitor which - are compatible with the driver. - - </quote> - &s.code;modes&e.code; - <quote><p> - One mode entry for each of the requested modes, with - the status field of each filled in to indicate if - the mode has been accepted or not. This list of - modes is a circular list. - - </quote> - &s.code;virtualX&e.code; - <quote><p> - The resulting virtual width. - - </quote> - &s.code;virtualY&e.code; - <quote><p> - The resulting virtual height. - - </quote> - &s.code;displayWidth&e.code; - <quote><p> - The resulting line pitch. - - </quote> - &s.code;virtualFrom&e.code; - <quote><p> - Where the virtual size was determined from. - - </quote> - - The first stage of this function checks that the - &s.code;virtualX&e.code; and &s.code;virtualY&e.code; values - supplied (if greater than zero) are consistent with the line pitch - and &s.code;maxHeight&e.code; limitations. If not, an error - message is printed, and the return value is &s.code;-1&e.code;. - - The second stage sets up the mode pool, eliminating immediately - any modes that exceed the driver's line pitch limits, and also - the virtual width and height limits (if greater than zero). For - each mode removed an informational message is printed at verbosity - level &s.code;2&e.code;. If the mode pool ends up being empty, - a warning message is printed, and the return value is - &s.code;0&e.code;. - - The final stage is to lookup each mode name, and fill in the remaining - parameters. If an error condition is encountered, a message is - printed, and the return value is &s.code;-1&e.code;. Otherwise, - the return value is the number of valid modes found - (&s.code;0&e.code; if none are found). - - Even if the supplied mode names include duplicates, no two names will - ever match the same mode. Furthermore, if the supplied mode names do not - yield a valid mode (including the case where no names are passed at all), - the function will continue looking through the mode pool until it finds - a mode that survives all checks, or until the mode pool is exhausted. - - A message is only printed by this function when a fundamental - problem is found. It is intended that this function may be called - more than once if there is more than one set of constraints that - the driver can work within. - - If this function returns &s.code;-1&e.code;, the - &s.code;ChipPreInit()&e.code; function should return - &s.code;FALSE&e.code;. - - &s.code;clockRanges&e.code; is a linked list of clock ranges - allowed by the driver. If a mode doesn't fit in any of the defined - &s.code;clockRanges&e.code;, it is rejected. The first - &s.code;clockRange&e.code; that matches all requirements is used. - This structure needs to be initialized to NULL when allocated. - - &s.code;clockRanges&e.code; contains the following fields: - - &s.code;minClock&nl; - maxClock&e.code; - <quote><p> - The lower and upper mode clock bounds for which the rest - of the &s.code;clockRange&e.code; parameters apply. - Since these are the mode clocks, they are not scaled - with the &s.code;ClockMulFactor&e.code; and - &s.code;ClockDivFactor&e.code;. It is up to the driver - to adjust these values if they depend on the clock - scaling factors. - - </quote> - &s.code;clockIndex&e.code; - <quote><p> - (not used yet) &s.code;-1&e.code; for programmable clocks - - </quote> - &s.code;interlaceAllowed&e.code; - <quote><p> - &s.code;TRUE&e.code; if interlacing is allowed for this - range - - </quote> - &s.code;doubleScanAllowed&e.code; - <quote><p> - &s.code;TRUE&e.code; if doublescan or multiscan is allowed - for this range - - </quote> - &s.code;ClockMulFactor&nl; - ClockDivFactor&e.code; - <quote><p> - Scaling factors that are applied to the mode clocks ONLY - before selecting a clock index (when there is no - programmable clock) or a &s.code;SynthClock&e.code; - value. This is useful for drivers that support pixel - multiplexing or that need to scale the clocks because - of hardware restrictions (like sending 24bpp data to an - 8 bit RAMDAC using a tripled clock). - - Note that these parameters describe what must be done - to the mode clock to achieve the data transport clock - between graphics controller and RAMDAC. For example - for &s.code;2:1&e.code; pixel multiplexing, two pixels - are sent to the RAMDAC on each clock. This allows the - RAMDAC clock to be half of the actual pixel clock. - Hence, &s.code;ClockMulFactor=1&e.code; and - &s.code;ClockDivFactor=2&e.code;. This means that the - clock used for clock selection (ie, determining the - correct clock index from the list of discrete clocks) - or for the &s.code;SynthClock&e.code; field in case of - a programmable clock is: (&s.code;mode->Clock * - ClockMulFactor) / ClockDivFactor&e.code;. - - </quote> - &s.code;PrivFlags&e.code; - <quote><p> - This field is copied into the - &s.code;mode->PrivFlags&e.code; field when this - &s.code;clockRange&e.code; is selected by - &s.code;xf86ValidateModes()&e.code;. It allows the - driver to find out what clock range was selected, so it - knows it needs to set up pixel multiplexing or any other - range-dependent feature. This field is purely - driver-defined: it may contain flag bits, an index or - anything else (as long as it is an &s.code;INT&e.code;). - </quote> - - Note that the &s.code;mode->SynthClock&e.code; field is always - filled in by &s.code;xf86ValidateModes()&e.code;: it will contain - the ``data transport clock'', which is the clock that will have - to be programmed in the chip when it has a programmable clock, or - the clock that will be picked from the clocks list when it is not - a programmable one. Thus: - - &s.code;mode->SynthClock = - &f.indent;(mode->Clock * ClockMulFactor) / ClockDivFactor&e.code; - - </quote> - - &s.code;void xf86PruneDriverModes(ScrnInfoPtr scrp)&e.code; - <quote><p> - This function deletes modes in the modes field of the - &s.code;ScrnInfoRec&e.code; that have been marked as invalid. - This is normally run after having run - &s.code;xf86ValidateModes()&e.code; for the last time. For each - mode that is deleted, a warning message is printed out indicating - the reason for it being deleted. - - </quote> - - &s.code;void xf86SetCrtcForModes(ScrnInfoPtr scrp, int adjustFlags)&e.code; - <quote><p> - This function fills in the &s.code;Crtc*&e.code; fields for all - the modes in the &s.code;modes&e.code; field of the - &s.code;ScrnInfoRec&e.code;. The &s.code;adjustFlags&e.code; - parameter determines how the vertical CRTC values are scaled for - interlaced modes. They are halved if it is - &s.code;INTERLACE_HALVE_V&e.code;. The vertical CRTC values are - doubled for doublescan modes, and are further multiplied by the - &s.code;VScan&e.code; value. - - This function is normally called after calling - &s.code;xf86PruneDriverModes()&e.code;. - - </quote> - - &s.code;void xf86PrintModes(ScrnInfoPtr scrp)&e.code; - <quote><p> - This function prints out the virtual size setting, and the line - pitch being used. It also prints out two lines for each mode being - used. The first line includes the mode's pixel clock, horizontal sync - rate, refresh rate, and whether it is interlaced, doublescanned and/or - multi-scanned. The second line is the mode's Modeline. - - This function is normally called after calling - &s.code;xf86SetCrtcForModes()&e.code;. - - </quote> - </quote> - - -<sect1>Secondary Mode functions -<p> - -The secondary mode helper functions are functions which are normally -used by the primary mode helper functions, and which are not normally -called directly by a driver. If a driver has unusual requirements -and needs to do its own mode validation, it might be able to make -use of some of these secondary mode helper functions. - - <quote><p> - &s.code;int xf86GetNearestClock(ScrnInfoPtr scrp, int freq, Bool allowDiv2, - &f.indent;int *divider)&e.code; - <quote><p> - This function returns the index of the closest clock to the - frequency &s.code;freq&e.code; given (in kHz). It assumes that - the number of clocks is greater than zero. It requires that the - &s.code;numClocks&e.code; and &s.code;clock&e.code; fields of the - &s.code;ScrnInfoRec&e.code; are initialised. The - &s.code;allowDiv2&e.code; field determines if the clocks can be - halved. The &s.code;*divider&e.code; return value indicates - whether clock division is used when determining the clock returned. - - This function is only for non-programmable clocks. - - </quote> - - &s.code;const char *xf86ModeStatusToString(ModeStatus status)&e.code; - <quote><p> - This function converts the &s.code;status&e.code; value to a - descriptive printable string. - - </quote> - - &s.code;ModeStatus xf86LookupMode(ScrnInfoPtr scrp, DisplayModePtr modep, - &f.indent;ClockRangePtr clockRanges, LookupModeFlags strategy)&e.code; - <quote><p> - This function takes a pointer to a mode with the name filled in, - and looks for a mode in the &s.code;modePool&e.code; list which - matches. The parameters of the matching mode are filled in to - &s.code;*modep&e.code;. The &s.code;clockRanges&e.code; and - &s.code;strategy&e.code; parameters are as for the - &s.code;xf86ValidateModes()&e.code; function above. - - This function requires the &s.code;modePool&e.code;, - &s.code;clock[]&e.code;, &s.code;numClocks&e.code; and - &s.code;progClock&e.code; fields of the &s.code;ScrnInfoRec&e.code; - to be initialised before being called. - - The return value is &s.code;MODE_OK&e.code; if a mode was found. - Otherwise it indicates why a matching mode could not be found. - - </quote> - - &s.code;ModeStatus xf86InitialCheckModeForDriver(ScrnInfoPtr scrp, - &f.indent;DisplayModePtr mode, ClockRangePtr clockRanges, - &f.indent;LookupModeFlags strategy, int maxPitch, - &f.indent;int virtualX, int virtualY)&e.code; - <quote><p> - This function checks the passed mode against some basic driver - constraints. Apart from the ones passed explicitly, the - &s.code;maxHValue&e.code; and &s.code;maxVValue&e.code; fields of - the &s.code;ScrnInfoRec&e.code; are also used. If the - &s.code;ValidMode&e.code; field of the &s.code;ScrnInfoRec&e.code; - is set, that function is also called to check the mode. Next, the - mode is checked against the monitor's constraints. - - If the mode is consistent with all constraints, the return value - is &s.code;MODE_OK&e.code;. Otherwise the return value indicates - which constraint wasn't met. - - </quote> - - &s.code;void xf86DeleteMode(DisplayModePtr *modeList, DisplayModePtr mode)&e.code; - <quote><p> - This function deletes the &s.code;mode&e.code; given from the - &s.code;modeList&e.code;. It never prints any messages, so it is - up to the caller to print a message if required. - - </quote> - </quote> - -<sect1>Functions for handling strings and tokens -<p> - - Tables associating strings and numerical tokens combined with the - following functions provide a compact way of handling strings from - the config file, and for converting tokens into printable strings. - The table data structure is: - -<quote><verb> -typedef struct { - int token; - const char * name; -} SymTabRec, *SymTabPtr; -</verb></quote> - - A table is an initialised array of &s.code;SymTabRec&e.code;. The - tokens must be non-negative integers. Multiple names may be mapped - to a single token. The table is terminated with an element with a - &s.code;token&e.code; value of &s.code;-1&e.code; and - &s.code;NULL&e.code; for the &s.code;name&e.code;. - - - <quote><p> - &s.code;const char *xf86TokenToString(SymTabPtr table, int token)&e.code; - <quote><p> - This function returns the first string in &s.code;table&e.code; - that matches &s.code;token&e.code;. If no match is found, - &s.code;NULL&e.code; is returned (NOTE, older versions of this - function would return the string "unknown" when no match is found). - - </quote> - - &s.code;int xf86StringToToken(SymTabPtr table, const char *string)&e.code; - <quote><p> - This function returns the first token in &s.code;table&e.code; - that matches &s.code;string&e.code;. The - &s.code;xf86NameCmp()&e.code; function is used to determine the - match. If no match is found, &s.code;-1&e.code; is returned. - - </quote> - </quote> - - -<sect1>Functions for finding which config file entries to use -<p> - - These functions can be used to select the appropriate config file - entries that match the detected hardware. They are described above - in the <ref id="probe" name="Probe"> and - <ref id="avail" name="Available Functions"> sections. - - -<sect1>Probing discrete clocks on old hardware -<p> - - The &s.code;xf86GetClocks()&e.code; function may be used to assist - in finding the discrete pixel clock values on older hardware. - - - <quote><p> - &s.code;void xf86GetClocks(ScrnInfoPtr pScrn, int num, - &f.indent;Bool (*ClockFunc)(ScrnInfoPtr, int), - &f.indent;void (*ProtectRegs)(ScrnInfoPtr, Bool), - &f.indent;void (*BlankScreen)(ScrnInfoPtr, Bool), - &f.indent;int vertsyncreg, int maskval, int knownclkindex, - &f.indent;int knownclkvalue)&e.code; - <quote><p> - This function uses a comparative sampling method to measure the - discrete pixel clock values. The number of discrete clocks to - measure is given by &s.code;num&e.code;. &s.code;clockFunc&e.code; - is a function that selects the &s.code;n&e.code;'th clock. It - should also save or restore any state affected by programming the - clocks when the index passed is &s.code;CLK_REG_SAVE&e.code; or - &s.code;CLK_REG_RESTORE&e.code;. &s.code;ProtectRegs&e.code; is - a function that does whatever is required to protect the hardware - state while selecting a new clock. &s.code;BlankScreen&e.code; - is a function that blanks the screen. &s.code;vertsyncreg&e.code; - and &s.code;maskval&e.code; are the register and bitmask to - check for the presence of vertical sync pulses. - &s.code;knownclkindex&e.code; and &s.code;knownclkvalue&e.code; - are the index and value of a known clock. These are the known - references on which the comparative measurements are based. The - number of clocks probed is set in &s.code;pScrn->numClocks&e.code;, - and the probed clocks are set in the &s.code;pScrn->clock[]&e.code; - array. All of the clock values are in units of kHz. - - </quote> - - &s.code;void xf86ShowClocks(ScrnInfoPtr scrp, MessageType from)&e.code; - <quote><p> - Print out the pixel clocks &s.code;scrp->clock[]&e.code;. - &s.code;from&e.code; indicates whether the clocks were probed - or from the config file. - - </quote> - </quote> - -<sect1>Other helper functions -<p> - <quote><p> - &s.code;Bool xf86IsUnblank(int mode)&e.code; - <quote><p> - Returns &s.code;TRUE&e.code; when the screen saver mode specified - by &s.code;mode&e.code; requires the screen be unblanked, - and &s.code;FALSE&e.code; otherwise. The screen saver modes that - require blanking are &s.code;SCREEN_SAVER_ON&e.code; and - &s.code;SCREEN_SAVER_CYCLE&e.code;, and the screen saver modes that - require unblanking are &s.code;SCREEN_SAVER_OFF&e.code; and - &s.code;SCREEN_SAVER_FORCER&e.code;. Drivers may call this helper - from their &s.code;SaveScreen()&e.code; function to interpret the - screen saver modes. - - </quote> - </quote> - -<sect>The vgahw module -<p> - -The vgahw modules provides an interface for saving, restoring and -programming the standard VGA registers, and for handling VGA colourmaps. - -<sect1>Data Structures -<p> - - The public data structures used by the vgahw module are - &s.code;vgaRegRec&e.code; and &s.code;vgaHWRec&e.code;. They are - defined in &s.code;vgaHW.h.&e.code; - - -<sect1>General vgahw Functions -<p> - - <quote><p> - &s.code;Bool vgaHWGetHWRec(ScrnInfoPtr pScrn)&e.code; - <quote><p> - This function allocates a &s.code;vgaHWRec&e.code; structure, and - hooks it into the &s.code;ScrnInfoRec&e.code;'s - &s.code;privates&e.code;. Like all information hooked into the - &s.code;privates&e.code;, it is persistent, and only needs to be - allocated once per screen. This function should normally be called - from the driver's &s.code;ChipPreInit()&e.code; function. The - &s.code;vgaHWRec&e.code; is zero-allocated, and the following - fields are explicitly initialised: - - &s.code;ModeReg.DAC[]&e.code; - <quote>initialised with a default colourmap</quote> - &s.code;ModeReg.Attribute[0x11]&e.code; - <quote>initialised with the default overscan index</quote> - &s.code;ShowOverscan&e.code; - <quote>initialised according to the "ShowOverscan" option</quote> - &s.code;paletteEnabled&e.code; - <quote>initialised to FALSE</quote> - &s.code;cmapSaved&e.code; - <quote>initialised to FALSE</quote> - &s.code;pScrn&e.code; - <quote>initialised to pScrn</quote> - - In addition to the above, &s.code;vgaHWSetStdFuncs()&e.code; is - called to initialise the register access function fields with the - standard VGA set of functions. - - Once allocated, a pointer to the &s.code;vgaHWRec&e.code; can be - obtained from the &s.code;ScrnInfoPtr&e.code; with the - &s.code;VGAHWPTR(pScrn)&e.code; macro. - - </quote> - - &s.code;void vgaHWFreeHWRec(ScrnInfoPtr pScrn)&e.code; - <quote><p> - This function frees a &s.code;vgaHWRec&e.code; structure. It - should be called from a driver's &s.code;ChipFreeScreen()&e.code; - function. - - </quote> - - &s.code;Bool vgaHWSetRegCounts(ScrnInfoPtr pScrn, int numCRTC, - &f.indent;int numSequencer, int numGraphics, int numAttribute)&e.code; - <quote><p> - This function allows the number of CRTC, Sequencer, Graphics and - Attribute registers to be changed. This makes it possible for - extended registers to be saved and restored with - &s.code;vgaHWSave()&e.code; and &s.code;vgaHWRestore()&e.code;. - This function should be called after a &s.code;vgaHWRec&e.code; - has been allocated with &s.code;vgaHWGetHWRec()&e.code;. The - default values are defined in &s.code;vgaHW.h&e.code; as follows: - - <quote><verb> -#define VGA_NUM_CRTC 25 -#define VGA_NUM_SEQ 5 -#define VGA_NUM_GFX 9 -#define VGA_NUM_ATTR 21 - </verb></quote> - - </quote> - - &s.code;Bool vgaHWCopyReg(vgaRegPtr dst, vgaRegPtr src)&e.code; - <quote><p> - This function copies the contents of the VGA saved registers in - &s.code;src&e.code; to &s.code;dst&e.code;. Note that it isn't - possible to simply do this with &s.code;memcpy()&e.code; (or - similar). This function returns &s.code;TRUE&e.code; unless there - is a problem allocating space for the &s.code;CRTC&e.code and - related fields in &s.code;dst&e.code;. - - </quote> - - &s.code;void vgaHWSetStdFuncs(vgaHWPtr hwp)&e.code; - <quote><p> - This function initialises the register access function fields of - &s.code;hwp&e.code; with the standard VGA set of functions. This - is called by &s.code;vgaHWGetHWRec()&e.code;, so there is usually - no need to call this explicitly. The register access functions - are described below. If the registers are shadowed in some other - port I/O space (for example a PCI I/O region), these functions - can be used to access the shadowed registers if - &s.code;hwp->PIOOffset&e.code; is initialised with - &s.code;offset&e.code;, calculated in such a way that when the - standard VGA I/O port value is added to it the correct offset into - the PIO area results. This value is initialised to zero in - &s.code;vgaHWGetHWRec()&e.code;. (Note: the PIOOffset functionality - is present in XFree86 4.1.0 and later.) - - </quote> - - &s.code;void vgaHWSetMmioFuncs(vgaHWPtr hwp, CARD8 *base, int offset)&e.code; - <quote><p> - This function initialised the register access function fields of - hwp with a generic MMIO set of functions. - &s.code;hwp->MMIOBase&e.code; is initialised with - &s.code;base&e.code;, which must be the virtual address that the - start of MMIO area is mapped to. &s.code;hwp->MMIOOffset&e.code; - is initialised with &s.code;offset&e.code;, which must be calculated - in such a way that when the standard VGA I/O port value is added - to it the correct offset into the MMIO area results. That means - that these functions are only suitable when the VGA I/O ports are - made available in a direct mapping to the MMIO space. If that is - not the case, the driver will need to provide its own register - access functions. The register access functions are described - below. - - </quote> - - &s.code;Bool vgaHWMapMem(ScrnInfoPtr pScrn)&e.code; - <quote><p> - This function maps the VGA memory window. It requires that the - &s.code;vgaHWRec&e.code; be allocated. If a driver requires - non-default &s.code;MapPhys&e.code; or &s.code;MapSize&e.code; - settings (the physical location and size of the VGA memory window) - then those fields of the &s.code;vgaHWRec&e.code; must be initialised - before calling this function. Otherwise, this function initialiases - the default values of &s.code;0xA0000&e.code; for - &s.code;MapPhys&e.code; and &s.code;(64 * 1024)&e.code; for - &s.code;MapSize&e.code;. This function must be called before - attempting to save or restore the VGA state. If the driver doesn't - call it explicitly, the &s.code;vgaHWSave()&e.code; and - &s.code;vgaHWRestore()&e.code; functions may call it if they need - to access the VGA memory (in which case they will also call - &s.code;vgaHWUnmapMem()&e.code; to unmap the VGA memory before - exiting). - - </quote> - - &s.code;void vgaHWUnmapMem(ScrnInfoPtr pScrn)&e.code; - <quote><p> - This function unmaps the VGA memory window. It must only be called - after the memory has been mapped. The &s.code;Base&e.code; field - of the &s.code;vgaHWRec&e.code; field is set to &s.code;NULL&e.code; - to indicate that the memory is no longer mapped. - - </quote> - - &s.code;void vgaHWGetIOBase(vgaHWPtr hwp)&e.code; - <quote><p> - This function initialises the &s.code;IOBase&e.code; field of the - &s.code;vgaHWRec&e.code;. This function must be called before - using any other functions that access the video hardware. - - A macro &s.code;VGAHW_GET_IOBASE()&e.code; is also available in - &s.code;vgaHW.h&e.code; that returns the I/O base, and this may - be used when the vgahw module is not loaded (for example, in the - &s.code;ChipProbe()&e.code; function). - - </quote> - - &s.code;void vgaHWUnlock(vgaHWPtr hwp)&e.code; - <quote><p> - This function unlocks the VGA &s.code;CRTC[0-7]&e.code; registers, - and must be called before attempting to write to those registers. - - </quote> - - &s.code;void vgaHWLock(vgaHWPtr hwp)&e.code; - <quote><p> - This function locks the VGA &s.code;CRTC[0-7]&e.code; registers. - - </quote> - - &s.code;void vgaHWEnable(vgaHWPtr hwp)&e.code; - <quote><p> - This function enables the VGA subsystem. (Note, this function is - present in XFree86 4.1.0 and later.). - - </quote> - - &s.code;void vgaHWDisable(vgaHWPtr hwp)&e.code; - <quote><p> - This function disables the VGA subsystem. (Note, this function is - present in XFree86 4.1.0 and later.). - - </quote> - - &s.code;void vgaHWSave(ScrnInfoPtr pScrn, vgaRegPtr save, int flags)&e.code; - <quote><p> - This function saves the VGA state. The state is written to the - &s.code;vgaRegRec&e.code; pointed to by &s.code;save&e.code;. - &s.code;flags&e.code; is set to one or more of the following flags - ORed together: - - &s.code;VGA_SR_MODE&e.code; - <quote>the mode setting registers are saved</quote> - &s.code;VGA_SR_FONTS&e.code; - <quote>the text mode font/text data is saved</quote> - &s.code;VGA_SR_CMAP&e.code; - <quote>the colourmap (LUT) is saved</quote> - &s.code;VGA_SR_ALL&e.code; - <quote>all of the above are saved</quote> - - The &s.code;vgaHWRec&e.code; and its &s.code;IOBase&e.code; fields - must be initialised before this function is called. If - &s.code;VGA_SR_FONTS&e.code; is set in &s.code;flags&e.code;, the - VGA memory window must be mapped. If it isn't then - &s.code;vgaHWMapMem()&e.code; will be called to map it, and - &s.code;vgaHWUnmapMem()&e.code; will be called to unmap it - afterwards. &s.code;vgaHWSave()&e.code; uses the three functions - below in the order &s.code;vgaHWSaveColormap()&e.code;, - &s.code;vgaHWSaveMode()&e.code;, &s.code;vgaHWSaveFonts()&e.code; to - carry out the different save phases. It is undecided at this - stage whether they will remain part of the vgahw module's public - interface or not. - - </quote> - - &s.code;void vgaHWSaveMode(ScrnInfoPtr pScrn, vgaRegPtr save)&e.code; - <quote><p> - This function saves the VGA mode registers. They are saved to - the &s.code;vgaRegRec&e.code; pointed to by &s.code;save&e.code;. - The registers saved are: - - <quote> - &s.code;MiscOut&nl; - CRTC[0-0x18]&nl; - Attribute[0-0x14]&nl; - Graphics[0-8]&nl; - Sequencer[0-4]&e.code; - </quote> - - The number of registers actually saved may be modified by a prior call - to &s.code;vgaHWSetRegCounts()&e.code;. - - </quote> - - &s.code;void vgaHWSaveFonts(ScrnInfoPtr pScrn, vgaRegPtr save)&e.code; - <quote><p> - This function saves the text mode font and text data held in the - video memory. If called while in a graphics mode, no save is - done. The VGA memory window must be mapped with - &s.code;vgaHWMapMem()&e.code; before to calling this function. - - On some platforms, one or more of the font/text plane saves may be - no-ops. This is the case when the platform's VC driver already - takes care of this. - - </quote> - - &s.code;void vgaHWSaveColormap(ScrnInfoPtr pScrn, vgaRegPtr save)&e.code; - <quote><p> - This function saves the VGA colourmap (LUT). Before saving it, it - attempts to verify that the colourmap is readable. In rare cases - where it isn't readable, a default colourmap is saved instead. - - </quote> - - &s.code;void vgaHWRestore(ScrnInfoPtr pScrn, vgaRegPtr restore, int flags)&e.code; - <quote><p> - This function programs the VGA state. The state programmed is - that contained in the &s.code;vgaRegRec&e.code; pointed to by - &s.code;restore&e.code;. &s.code;flags&e.code; is the same - as described above for the &s.code;vgaHWSave()&e.code; function. - - The &s.code;vgaHWRec&e.code; and its &s.code;IOBase&e.code; fields - must be initialised before this function is called. If - &s.code;VGA_SR_FONTS&e.code; is set in &s.code;flags&e.code;, the - VGA memory window must be mapped. If it isn't then - &s.code;vgaHWMapMem()&e.code; will be called to map it, and - &s.code;vgaHWUnmapMem()&e.code; will be called to unmap it - afterwards. &s.code;vgaHWRestore()&e.code; uses the three functions - below in the order &s.code;vgaHWRestoreFonts()&e.code;, - &s.code;vgaHWRestoreMode()&e.code;, - &s.code;vgaHWRestoreColormap()&e.code; to carry out the different - restore phases. It is undecided at this stage whether they will - remain part of the vgahw module's public interface or not. - - </quote> - - &s.code;void vgaHWRestoreMode(ScrnInfoPtr pScrn, vgaRegPtr restore)&e.code; - <quote><p> - This function restores the VGA mode registers. They are restored - from the data in the &s.code;vgaRegRec&e.code; pointed to by - &s.code;restore&e.code;. The registers restored are: - - <quote> - &s.code;MiscOut&nl; - CRTC[0-0x18]&nl; - Attribute[0-0x14]&nl; - Graphics[0-8]&nl; - Sequencer[0-4]&e.code; - </quote> - - The number of registers actually restored may be modified by a prior call - to &s.code;vgaHWSetRegCounts()&e.code;. - - </quote> - - &s.code;void vgaHWRestoreFonts(ScrnInfoPtr pScrn, vgaRegPtr restore)&e.code; - <quote><p> - This function restores the text mode font and text data to the - video memory. The VGA memory window must be mapped with - &s.code;vgaHWMapMem()&e.code; before to calling this function. - - On some platforms, one or more of the font/text plane restores - may be no-ops. This is the case when the platform's VC driver - already takes care of this. - - </quote> - - &s.code;void vgaHWRestoreColormap(ScrnInfoPtr pScrn, vgaRegPtr restore)&e.code; - <quote><p> - This function restores the VGA colourmap (LUT). - - </quote> - - &s.code;void vgaHWInit(ScrnInfoPtr pScrn, DisplayModePtr mode)&e.code; - <quote><p> - This function fills in the &s.code;vgaHWRec&e.code;'s - &s.code;ModeReg&e.code; field with the values appropriate for - programming the given video mode. It requires that the - &s.code;ScrnInfoRec&e.code;'s &s.code;depth&e.code; field is - initialised, which determines how the registers are programmed. - - </quote> - - &s.code;void vgaHWSeqReset(vgaHWPtr hwp, Bool start)&e.code; - <quote><p> - Do a VGA sequencer reset. If start is &s.code;TRUE&e.code;, the - reset is started. If start is &s.code;FALSE&e.code;, the reset - is ended. - - </quote> - - &s.code;void vgaHWProtect(ScrnInfoPtr pScrn, Bool on)&e.code; - <quote><p> - This function protects VGA registers and memory from corruption - during loads. It is typically called with on set to - &s.code;TRUE&e.code; before programming, and with on set to - &s.code;FALSE&e.code; after programming. - - </quote> - - &s.code;Bool vgaHWSaveScreen(ScreenPtr pScreen, int mode)&e.code; - <quote><p> - This function blanks and unblanks the screen. It is blanked when - &s.code;mode&e.code; is &s.code;SCREEN_SAVER_ON&e.code; or - &s.code;SCREEN_SAVER_CYCLE&e.code;, and unblanked when - &s.code;mode&e.code; is &s.code;SCREEN_SAVER_OFF&e.code; or - &s.code;SCREEN_SAVER_FORCER&e.code;. - - </quote> - - &s.code;void vgaHWBlankScreen(ScrnInfoPtr pScrn, Bool on)&e.code; - <quote><p> - This function blanks and unblanks the screen. It is blanked when - &s.code;on&e.code; is &s.code;FALSE&e.code;, and unblanked when - &s.code;on&e.code; is &s.code;TRUE&e.code;. This function is - provided for use in cases where the &s.code;ScrnInfoRec&e.code; - can't be derived from the &s.code;ScreenRec&e.code; (while probing - for clocks, for example). - - </quote> - </quote> - -<sect1>VGA Colormap Functions -<p> - - The vgahw module uses the standard colormap support (see the - <ref id="cmap" name="Colormap Handling"> section. This is initialised - with the following function: - - <quote> - &s.code;Bool vgaHWHandleColormaps(ScreenPtr pScreen)&e.code; - </quote> - - -<sect1>VGA Register Access Functions -<p> - - The vgahw module abstracts access to the standard VGA registers by - using a set of functions held in the &s.code;vgaHWRec&e.code;. When - the &s.code;vgaHWRec&e.code; is created these function pointers are - initialised with the set of standard VGA I/O register access functions. - In addition to these, the vgahw module includes a basic set of MMIO - register access functions, and the &s.code;vgaHWRec&e.code; function - pointers can be initialised to these by calling the - &s.code;vgaHWSetMmioFuncs()&e.code; function described above. Some - drivers/platforms may require a different set of functions for VGA - access. The access functions are described here. - - - <quote><p> - &s.code;void writeCrtc(vgaHWPtr hwp, CARD8 index, CARD8 value)&e.code; - <quote><p> - Write &s.code;value&e.code; to CRTC register &s.code;index&e.code;. - - </quote> - - &s.code;CARD8 readCrtc(vgaHWPtr hwp, CARD8 index)&e.code; - <quote><p> - Return the value read from CRTC register &s.code;index&e.code;. - - </quote> - - &s.code;void writeGr(vgaHWPtr hwp, CARD8 index, CARD8 value)&e.code; - <quote><p> - Write &s.code;value&e.code; to Graphics Controller register - &s.code;index&e.code;. - - </quote> - - &s.code;CARD8 readGR(vgaHWPtr hwp, CARD8 index)&e.code; - <quote><p> - Return the value read from Graphics Controller register - &s.code;index&e.code;. - - </quote> - - &s.code;void writeSeq(vgaHWPtr hwp, CARD8 index, CARD8, value)&e.code; - <quote><p> - Write &s.code;value&e.code; to Sequencer register - &s.code;index&e.code;. - - </quote> - - &s.code;CARD8 readSeq(vgaHWPtr hwp, CARD8 index)&e.code; - <quote><p> - Return the value read from Sequencer register &s.code;index&e.code;. - - </quote> - - &s.code;void writeAttr(vgaHWPtr hwp, CARD8 index, CARD8, value)&e.code; - <quote><p> - Write &s.code;value&e.code; to Attribute Controller register - &s.code;index&e.code;. When writing out the index value this - function should set bit 5 (&s.code;0x20&e.code;) according to the - setting of &s.code;hwp->paletteEnabled&e.code; in order to - preserve the palette access state. It should be cleared when - &s.code;hwp->paletteEnabled&e.code; is &s.code;TRUE&e.code; - and set when it is &s.code;FALSE&e.code;. - - </quote> - - &s.code;CARD8 readAttr(vgaHWPtr hwp, CARD8 index)&e.code; - <quote><p> - Return the value read from Attribute Controller register - &s.code;index&e.code;. When writing out the index value this - function should set bit 5 (&s.code;0x20&e.code;) according to the - setting of &s.code;hwp->paletteEnabled&e.code; in order to - preserve the palette access state. It should be cleared when - &s.code;hwp->paletteEnabled&e.code; is &s.code;TRUE&e.code; - and set when it is &s.code;FALSE&e.code;. - - </quote> - - &s.code;void writeMiscOut(vgaHWPtr hwp, CARD8 value)&e.code; - <quote><p> - Write `&s.code;value&e.code;' to the Miscellaneous Output register. - - </quote> - - &s.code;CARD8 readMiscOut(vgwHWPtr hwp)&e.code; - <quote><p> - Return the value read from the Miscellaneous Output register. - - </quote> - - &s.code;void enablePalette(vgaHWPtr hwp)&e.code; - <quote><p> - Clear the palette address source bit in the Attribute Controller - index register and set &s.code;hwp->paletteEnabled&e.code; to - &s.code;TRUE&e.code;. - - </quote> - - &s.code;void disablePalette(vgaHWPtr hwp)&e.code; - <quote><p> - Set the palette address source bit in the Attribute Controller - index register and set &s.code;hwp->paletteEnabled&e.code; to - &s.code;FALSE&e.code;. - - </quote> - - &s.code;void writeDacMask(vgaHWPtr hwp, CARD8 value)&e.code; - <quote><p> - Write &s.code;value&e.code; to the DAC Mask register. - - </quote> - - &s.code;CARD8 readDacMask(vgaHWptr hwp)&e.code; - <quote><p> - Return the value read from the DAC Mask register. - - </quote> - - &s.code;void writeDacReadAddress(vgaHWPtr hwp, CARD8 value)&e.code; - <quote><p> - Write &s.code;value&e.code; to the DAC Read Address register. - - </quote> - - &s.code;void writeDacWriteAddress(vgaHWPtr hwp, CARD8 value)&e.code; - <quote><p> - Write &s.code;value&e.code; to the DAC Write Address register. - - </quote> - - &s.code;void writeDacData(vgaHWPtr hwp, CARD8 value)&e.code; - <quote><p> - Write &s.code;value&e.code; to the DAC Data register. - - </quote> - - &s.code;CARD8 readDacData(vgaHWptr hwp)&e.code; - <quote><p> - Return the value read from the DAC Data register. - - </quote> - - &s.code;CARD8 readEnable(vgaHWptr hwp)&e.code; - <quote><p> - Return the value read from the VGA Enable register. (Note: This - function is present in XFree86 4.1.0 and later.) - - </quote> - - &s.code;void writeEnable(vgaHWPtr hwp, CARD8 value)&e.code; - <quote><p> - Write &s.code;value&e.code; to the VGA Enable register. (Note: This - function is present in XFree86 4.1.0 and later.) - - </quote> - </quote> - -<sect>Some notes about writing a driver<label id="sample"> -<p> - -<em>NOTE: some parts of this are not up to date</em> - -The following is an outline for writing a basic unaccelerated driver -for a PCI video card with a linear mapped framebuffer, and which has a -VGA core. It is includes some general information that is relevant to -most drivers (even those which don't fit that basic description). - -The information here is based on the initial conversion of the Matrox -Millennium driver to the ``new design''. For a fleshing out and sample -implementation of some of the bits outlined here, refer to that driver. -Note that this is an example only. The approach used here will not be -appropriate for all drivers. - -Each driver must reserve a unique driver name, and a string that is used -to prefix all of its externally visible symbols. This is to avoid name -space clashes when loading multiple drivers. The examples here are for -the ``ZZZ'' driver, which uses the ``ZZZ'' or ``zzz'' prefix for its externally -visible symbols. - - -<sect1>Include files -<p> - - All drivers normally include the following headers: - <quote> - &s.code;"xf86.h"&nl; - "xf86_OSproc.h"&nl; - "xf86_ansic.h"&nl; - "xf86Resources.h"&e.code; - </quote> - Wherever inb/outb (and related things) are used the following should be - included: - <quote> - &s.code;"compiler.h"&e.code; - </quote> - Note: in drivers, this must be included after &s.code;"xf86_ansic.h"&e.code;. - - Drivers that need to access PCI vendor/device definitions need this: - <quote> - &s.code;"xf86PciInfo.h"&e.code; - </quote> - - Drivers that need to access the PCI config space need this: - <quote> - &s.code;"xf86Pci.h"&e.code; - </quote> - - Drivers using the mi banking wrapper need: - - <quote> - &s.code;"mibank.h"&e.code; - </quote> - - Drivers that initialise a SW cursor need this: - <quote> - &s.code;"mipointer.h"&e.code; - </quote> - - All drivers implementing backing store need this: - <quote> - &s.code;"mibstore.h"&e.code; - </quote> - - All drivers using the mi colourmap code need this: - <quote> - &s.code;"micmap.h"&e.code; - </quote> - - If a driver uses the vgahw module, it needs this: - <quote> - &s.code;"vgaHW.h"&e.code; - </quote> - - Drivers supporting VGA or Hercules monochrome screens need: - <quote> - &s.code;"xf1bpp.h"&e.code; - </quote> - - Drivers supporting VGA or EGC 16-colour screens need: - <quote> - &s.code;"xf4bpp.h"&e.code; - </quote> - - Drivers using cfb need: - <quote> - &s.code;#define PSZ 8&nl; - #include "cfb.h"&nl; - #undef PSZ&e.code; - </quote> - - Drivers supporting bpp 16, 24 or 32 with cfb need one or more of: - <quote> - &s.code;"cfb16.h"&nl; - "cfb24.h"&nl; - "cfb32.h"&e.code; - </quote> - - The driver's own header file: - <quote> - &s.code;"zzz.h"&e.code; - </quote> - - Drivers must NOT include the following: - - <quote> - &s.code;"xf86Priv.h"&nl; - "xf86Privstr.h"&nl; - "xf86_libc.h"&nl; - "xf86_OSlib.h"&nl; - "Xos.h"&e.code;&nl; - any OS header - </quote> - - -<sect1>Data structures and initialisation -<p> - -<itemize> - <item>The following macros should be defined: - <code> -#define VERSION <version-as-an-int> -#define ZZZ_NAME "ZZZ" /* the name used to prefix messages */ -#define ZZZ_DRIVER_NAME "zzz" /* the driver name as used in config file */ -#define ZZZ_MAJOR_VERSION <int> -#define ZZZ_MINOR_VERSION <int> -#define ZZZ_PATCHLEVEL <int> - </code> -<p> - NOTE: &s.code;ZZZ_DRIVER_NAME&e.code; should match the name of the - driver module without things like the "lib" prefix, the "_drv" suffix - or filename extensions. -<p> - - <item>A DriverRec must be defined, which includes the functions required - at the pre-probe phase. The name of this DriverRec must be an - upper-case version of ZZZ_DRIVER_NAME (for the purposes of static - linking). -<p> - <code> -DriverRec ZZZ = { - VERSION, - ZZZ_DRIVER_NAME, - ZZZIdentify, - ZZZProbe, - ZZZAvailableOptions, - NULL, - 0 -}; - </code> - - <item>Define list of supported chips and their matching ID: -<p> - <code> -static SymTabRec ZZZChipsets[] = { - { PCI_CHIP_ZZZ1234, "zzz1234a" }, - { PCI_CHIP_ZZZ5678, "zzz5678a" }, - { -1, NULL } -}; - </code> -<p> - The token field may be any integer value that the driver may use to - uniquely identify the supported chipsets. For drivers that support - only PCI devices using the PCI device IDs might be a natural choice, - but this isn't mandatory. For drivers that support both PCI and other - devices (like ISA), some other ID should probably used. When other - IDs are used as the tokens it is recommended that the names be - defined as an &s.code;enum&e.code; type. -<p> - <item>If the driver uses the &s.code;xf86MatchPciInstances(&e.code;) - helper (recommended for drivers that support PCI cards) a list that - maps PCI IDs to chip IDs and fixed resources must be defined: -<p> - <code> -static PciChipsets ZZZPciChipsets[] = { - { PCI_CHIP_ZZZ1234, PCI_CHIP_ZZZ1234, RES_SHARED_VGA }, - { PCI_CHIP_ZZZ5678, PCI_CHIP_ZZZ5678, RES_SHARED_VGA }, - { -1, -1, RES_UNDEFINED } -} - </code> -<p> - <item>Define the &s.code;XF86ModuleVersionInfo&e.code; struct for the - driver. This is required for the dynamically loaded version: -<p> - <code> -static XF86ModuleVersionInfo zzzVersRec = -{ - "zzz", - MODULEVENDORSTRING, - MODINFOSTRING1, - MODINFOSTRING2, - XF86_VERSION_CURRENT, - ZZZ_MAJOR_VERSION, ZZZ_MINOR_VERSION, ZZZ_PATCHLEVEL, - ABI_CLASS_VIDEODRV, - ABI_VIDEODRV_VERSION, - MOD_CLASS_VIDEODRV, - {0,0,0,0} -}; - </code> -<p> - <item>Define a data structure to hold the driver's screen-specific data. - This must be used instead of global variables. This would be defined - in the &s.code;"zzz.h"&e.code; file, something like: -<p> - <code> -typedef struct { - type1 field1; - type2 field2; - int fooHack; - Bool pciRetry; - Bool noAccel; - Bool hwCursor; - CloseScreenProcPtr CloseScreen; - OptionInfoPtr Options; - ... -} ZZZRec, *ZZZPtr; - </code> -<p> - <item>Define the list of config file Options that the driver accepts. For - consistency between drivers those in the list of ``standard'' options - should be used where appropriate before inventing new options. -<p> - <code> -typedef enum { - OPTION_FOO_HACK, - OPTION_PCI_RETRY, - OPTION_HW_CURSOR, - OPTION_NOACCEL -} ZZZOpts; - -static const OptionInfoRec ZZZOptions[] = { - { OPTION_FOO_HACK, "FooHack", OPTV_INTEGER, {0}, FALSE }, - { OPTION_PCI_RETRY, "PciRetry", OPTV_BOOLEAN, {0}, FALSE }, - { OPTION_HW_CURSOR, "HWcursor", OPTV_BOOLEAN, {0}, FALSE }, - { OPTION_NOACCEL, "NoAccel", OPTV_BOOLEAN, {0}, FALSE }, - { -1, NULL, OPTV_NONE, {0}, FALSE } -}; - </code> -<p> -</itemize> - -<sect1>Functions -<p> - - -<sect2>SetupProc -<p> - - For dynamically loaded modules, a &s.code;ModuleData&e.code; - variable is required. It is should be the name of the driver - prepended to "ModuleData". A &s.code;Setup()&e.code; function is - also required, which calls &s.code;xf86AddDriver()&e.code; to add - the driver to the main list of drivers. - - <code> -static MODULESETUPPROTO(zzzSetup); - -XF86ModuleData zzzModuleData = { &zzzVersRec, zzzSetup, NULL }; - -static pointer -zzzSetup(pointer module, pointer opts, int *errmaj, int *errmin) -{ - static Bool setupDone = FALSE; - - /* This module should be loaded only once, but check to be sure. */ - - if (!setupDone) { - /* - * Modules that this driver always requires may be loaded - * here by calling LoadSubModule(). - */ - - setupDone = TRUE; - xf86AddDriver(&MGA, module, 0); - - /* - * The return value must be non-NULL on success even though - * there is no TearDownProc. - */ - return (pointer)1; - } else { - if (errmaj) *errmaj = LDR_ONCEONLY; - return NULL; - } -} - </code> - -<sect2>GetRec, FreeRec -<p> - - A function is usually required to allocate the driver's - screen-specific data structure and hook it into the - &s.code;ScrnInfoRec&e.code;'s &s.code;driverPrivate&e.code; field. - The &s.code;ScrnInfoRec&e.code;'s &s.code;driverPrivate&e.code; is - initialised to &s.code;NULL&e.code;, so it is easy to check if the - initialisation has already been done. After allocating it, initialise - the fields. By using &s.code;xnfcalloc()&e.code; to do the allocation - it is zeroed, and if the allocation fails the server exits. -<p> - NOTE: - When allocating structures from inside the driver which are defined - on the common level it is important to initialize the structure to - zero. - Only this guarantees that the server remains source compatible to - future changes in common level structures. - - <code> -static Bool -ZZZGetRec(ScrnInfoPtr pScrn) -{ - if (pScrn->driverPrivate != NULL) - return TRUE; - pScrn->driverPrivate = xnfcalloc(sizeof(ZZZRec), 1); - /* Initialise as required */ - ... - return TRUE; -} - </code> - - Define a macro in &s.code;"zzz.h"&e.code; which gets a pointer to - the &s.code;ZZZRec&e.code; when given &s.code;pScrn&e.code;: - - <code> -#define ZZZPTR(p) ((ZZZPtr)((p)->driverPrivate)) - </code> - - Define a function to free the above, setting it to &s.code;NULL&e.code; - once it has been freed: - - <code> -static void -ZZZFreeRec(ScrnInfoPtr pScrn) -{ - if (pScrn->driverPrivate == NULL) - return; - xfree(pScrn->driverPrivate); - pScrn->driverPrivate = NULL; -} - </code> - -<sect2>Identify -<p> - - Define the &s.code;Identify()&e.code; function. It is run before - the Probe, and typically prints out an identifying message, which - might include the chipsets it supports. This function is mandatory: - - <code> -static void -ZZZIdentify(int flags) -{ - xf86PrintChipsets(ZZZ_NAME, "driver for ZZZ Tech chipsets", - ZZZChipsets); -} - </code> - -<sect2>Probe -<p> - - Define the &s.code;Probe()&e.code; function. The purpose of this - is to find all instances of the hardware that the driver supports, - and for the ones not already claimed by another driver, claim the - slot, and allocate a &s.code;ScrnInfoRec&e.code;. This should be - a minimal probe, and it should under no circumstances leave the - state of the hardware changed. Because a device is found, don't - assume that it will be used. Don't do any initialisations other - than the required &s.code;ScrnInfoRec&e.code; initialisations. - Don't allocate any new data structures. - - This function is mandatory. - - NOTE: The &s.code;xf86DrvMsg()&e.code; functions cannot be used from - the Probe. - - <code> -static Bool -ZZZProbe(DriverPtr drv, int flags) -{ - Bool foundScreen = FALSE; - int numDevSections, numUsed; - GDevPtr *devSections; - int *usedChips; - int i; - - /* - * Find the config file Device sections that match this - * driver, and return if there are none. - */ - if ((numDevSections = xf86MatchDevice(ZZZ_DRIVER_NAME, - &devSections)) <= 0) { - return FALSE; - } - - /* - * Since this is a PCI card, "probing" just amounts to checking - * the PCI data that the server has already collected. If there - * is none, return. - * - * Although the config file is allowed to override things, it - * is reasonable to not allow it to override the detection - * of no PCI video cards. - * - * The provided xf86MatchPciInstances() helper takes care of - * the details. - */ - /* test if PCI bus present */ - if (xf86GetPciVideoInfo()) { - - numUsed = xf86MatchPciInstances(ZZZ_NAME, PCI_VENDOR_ZZZ, - ZZZChipsets, ZZZPciChipsets, devSections, - numDevSections, drv, &usedChips); - - for (i = 0; i < numUsed; i++) { - ScrnInfoPtr pScrn = NULL; - if ((pScrn = xf86ConfigPciEntity(pScrn, flags, usedChips[i], - ZZZPciChipsets, NULL, NULL, - NULL, NULL, NULL))) { - /* Allocate a ScrnInfoRec */ - pScrn->driverVersion = VERSION; - pScrn->driverName = ZZZ_DRIVER_NAME; - pScrn->name = ZZZ_NAME; - pScrn->Probe = ZZZProbe; - pScrn->PreInit = ZZZPreInit; - pScrn->ScreenInit = ZZZScreenInit; - pScrn->SwitchMode = ZZZSwitchMode; - pScrn->AdjustFrame = ZZZAdjustFrame; - pScrn->EnterVT = ZZZEnterVT; - pScrn->LeaveVT = ZZZLeaveVT; - pScrn->FreeScreen = ZZZFreeScreen; - pScrn->ValidMode = ZZZValidMode; - foundScreen = TRUE; - /* add screen to entity */ - } - } - xfree(usedChips); - } - -#ifdef HAS_ISA_DEVS - /* - * If the driver supports ISA hardware, the following block - * can be included too. - */ - numUsed = xf86MatchIsaInstances(ZZZ_NAME, ZZZChipsets, - ZZZIsaChipsets, drv, ZZZFindIsaDevice, - devSections, numDevSections, &usedChips); - for (i = 0; i < numUsed; i++) { - ScrnInfoPtr pScrn = NULL; - if ((pScrn = xf86ConfigIsaEntity(pScrn, flags, usedChips[i], - ZZZIsaChipsets, NULL, NULL, NULL, - NULL, NULL))) { - pScrn->driverVersion = VERSION; - pScrn->driverName = ZZZ_DRIVER_NAME; - pScrn->name = ZZZ_NAME; - pScrn->Probe = ZZZProbe; - pScrn->PreInit = ZZZPreInit; - pScrn->ScreenInit = ZZZScreenInit; - pScrn->SwitchMode = ZZZSwitchMode; - pScrn->AdjustFrame = ZZZAdjustFrame; - pScrn->EnterVT = ZZZEnterVT; - pScrn->LeaveVT = ZZZLeaveVT; - pScrn->FreeScreen = ZZZFreeScreen; - pScrn->ValidMode = ZZZValidMode; - foundScreen = TRUE; - } - } - xfree(usedChips); -#endif /* HAS_ISA_DEVS */ - - xfree(devSections); - return foundScreen; - </code> - -<sect2>AvailableOptions -<p> - - Define the &s.code;AvailableOptions()&e.code; function. The purpose - of this is to return the available driver options back to the - -configure option, so that an xorg.conf file can be built and the - user can see which options are available for them to use. - -<sect2>PreInit -<p> - - Define the &s.code;PreInit()&e.code; function. The purpose of - this is to find all the information required to determine if the - configuration is usable, and to initialise those parts of the - &s.code;ScrnInfoRec&e.code; that can be set once at the beginning - of the first server generation. The information should be found in - the least intrusive way possible. - - This function is mandatory. - - NOTES: - <enum> - <item>The &s.code;PreInit()&e.code; function is only called once - during the life of the X server (at the start of the first - generation). - - <item>Data allocated here must be of the type that persists for - the life of the X server. This means that data that hooks into - the &s.code;ScrnInfoRec&e.code;'s &s.code;privates&e.code; - field should be allocated here, but data that hooks into the - &s.code;ScreenRec&e.code;'s &s.code;devPrivates&e.code; field - should not be allocated here. The &s.code;driverPrivate&e.code; - field should also be allocated here. - - <item>Although the &s.code;ScrnInfoRec&e.code; has been allocated - before this function is called, the &s.code;ScreenRec&e.code; - has not been allocated. That means that things requiring it - cannot be used in this function. - - <item>Very little of the &s.code;ScrnInfoRec&e.code; has been - initialised when this function is called. It is important to - get the order of doing things right in this function. - - </enum> - - <code> -static Bool -ZZZPreInit(ScrnInfoPtr pScrn, int flags) -{ - /* Fill in the monitor field */ - pScrn->monitor = pScrn->confScreen->monitor; - - /* - * If using the vgahw module, it will typically be loaded - * here by calling xf86LoadSubModule(pScrn, "vgahw"); - */ - - /* - * Set the depth/bpp. Use the globally preferred depth/bpp. If the - * driver has special default depth/bpp requirements, the defaults should - * be specified here explicitly. - * We support both 24bpp and 32bpp framebuffer layouts. - * This sets pScrn->display also. - */ - if (!xf86SetDepthBpp(pScrn, 0, 0, 0, - Support24bppFb | Support32bppFb)) { - return FALSE; - } else { - if (depth/bpp isn't one we support) { - print error message; - return FALSE; - } - } - /* Print out the depth/bpp that was set */ - xf86PrintDepthBpp(pScrn); - - /* Set bits per RGB for 8bpp */ - if (pScrn->depth <= 8) { - /* Take into account a dac_6_bit option here */ - pScrn->rgbBits = 6 or 8; - } - - /* - * xf86SetWeight() and xf86SetDefaultVisual() must be called - * after pScrn->display is initialised. - */ - - /* Set weight/mask/offset for depth > 8 */ - if (pScrn->depth > 8) { - if (!xf86SetWeight(pScrn, defaultWeight, defaultMask)) { - return FALSE; - } else { - if (weight isn't one we support) { - print error message; - return FALSE; - } - } - } - - /* Set the default visual. */ - if (!xf86SetDefaultVisual(pScrn, -1)) { - return FALSE; - } else { - if (visual isn't one we support) { - print error message; - return FALSE; - } - } - - /* If the driver supports gamma correction, set the gamma. */ - if (!xf86SetGamma(pScrn, default_gamma)) { - return FALSE; - } - - /* This driver uses a programmable clock */ - pScrn->progClock = TRUE; - - /* Allocate the ZZZRec driverPrivate */ - if (!ZZZGetRec(pScrn)) { - return FALSE; - } - - pZzz = ZZZPTR(pScrn); - - /* Collect all of the option flags (fill in pScrn->options) */ - xf86CollectOptions(pScrn, NULL); - - /* - * Process the options based on the information in ZZZOptions. - * The results are written to pZzz->Options. If all of the options - * processing is done within this function a local variable "options" - * can be used instead of pZzz->Options. - */ - if (!(pZzz->Options = xalloc(sizeof(ZZZOptions)))) - return FALSE; - (void)memcpy(pZzz->Options, ZZZOptions, sizeof(ZZZOptions)); - xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, pZzz->Options); - - /* - * Set various fields of ScrnInfoRec and/or ZZZRec based on - * the options found. - */ - from = X_DEFAULT; - pZzz->hwCursor = FALSE; - if (xf86IsOptionSet(pZzz->Options, OPTION_HW_CURSOR)) { - from = X_CONFIG; - pZzz->hwCursor = TRUE; - } - xf86DrvMsg(pScrn->scrnIndex, from, "Using %s cursor\n", - pZzz->hwCursor ? "HW" : "SW"); - if (xf86IsOptionSet(pZzz->Options, OPTION_NOACCEL)) { - pZzz->noAccel = TRUE; - xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, - "Acceleration disabled\n"); - } else { - pZzz->noAccel = FALSE; - } - if (xf86IsOptionSet(pZzz->Options, OPTION_PCI_RETRY)) { - pZzz->UsePCIRetry = TRUE; - xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "PCI retry enabled\n"); - } - pZzz->fooHack = 0; - if (xf86GetOptValInteger(pZzz->Options, OPTION_FOO_HACK, - &pZzz->fooHack)) { - xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Foo Hack set to %d\n", - pZzz->fooHack); - } - - /* - * Find the PCI slot(s) that this screen claimed in the probe. - * In this case, exactly one is expected, so complain otherwise. - * Note in this case we're not interested in the card types so - * that parameter is set to NULL. - */ - if ((i = xf86GetPciInfoForScreen(pScrn->scrnIndex, &pciList, NULL)) - != 1) { - print error message; - ZZZFreeRec(pScrn); - if (i > 0) - xfree(pciList); - return FALSE; - } - /* Note that pciList should be freed below when no longer needed */ - - /* - * Determine the chipset, allowing config file chipset and - * chipid values to override the probed information. The config - * chipset value has precedence over its chipid value if both - * are present. - * - * It isn't necessary to fill in pScrn->chipset if the driver - * keeps track of the chipset in its ZZZRec. - */ - - ... - - /* - * Determine video memory, fb base address, I/O addresses, etc, - * allowing the config file to override probed values. - * - * Set the appropriate pScrn fields (videoRam is probably the - * most important one that other code might require), and - * print out the settings. - */ - - ... - - /* Initialise a clockRanges list. */ - - ... - - /* Set any other chipset specific things in the ZZZRec */ - - ... - - /* Select valid modes from those available */ - - i = xf86ValidateModes(pScrn, pScrn->monitor->Modes, - pScrn->display->modes, clockRanges, - NULL, minPitch, maxPitch, rounding, - minHeight, maxHeight, - pScrn->display->virtualX, - pScrn->display->virtualY, - pScrn->videoRam * 1024, - LOOKUP_BEST_REFRESH); - if (i == -1) { - ZZZFreeRec(pScrn); - return FALSE; - } - - /* Prune the modes marked as invalid */ - - xf86PruneDriverModes(pScrn); - - /* If no valid modes, return */ - - if (i == 0 || pScrn->modes == NULL) { - print error message; - ZZZFreeRec(pScrn); - return FALSE; - } - - /* - * Initialise the CRTC fields for the modes. This driver expects - * vertical values to be halved for interlaced modes. - */ - xf86SetCrtcForModes(pScrn, INTERLACE_HALVE_V); - - /* Set the current mode to the first in the list. */ - pScrn->currentMode = pScrn->modes; - - /* Print the list of modes being used. */ - xf86PrintModes(pScrn); - - /* Set the DPI */ - xf86SetDpi(pScrn, 0, 0); - - /* Load bpp-specific modules */ - switch (pScrn->bitsPerPixel) { - case 1: - mod = "xf1bpp"; - break; - case 4: - mod = "xf4bpp"; - break; - case 8: - mod = "cfb"; - break; - case 16: - mod = "cfb16"; - break; - case 24: - mod = "cfb24"; - break; - case 32: - mod = "cfb32"; - break; - } - if (mod && !xf86LoadSubModule(pScrn, mod)) - ZZZFreeRec(pScrn); - return FALSE; - - /* Load XAA if needed */ - if (!pZzz->noAccel || pZzz->hwCursor) - if (!xf86LoadSubModule(pScrn, "xaa")) { - ZZZFreeRec(pScrn); - return FALSE; - } - - /* Done */ - return TRUE; -} - </code> - -<sect2>MapMem, UnmapMem -<p> - - Define functions to map and unmap the video memory and any other - memory apertures required. These functions are not mandatory, but - it is often useful to have such functions. - - <code> -static Bool -ZZZMapMem(ScrnInfoPtr pScrn) -{ - /* Call xf86MapPciMem() to map each PCI memory area */ - ... - return TRUE or FALSE; -} - -static Bool -ZZZUnmapMem(ScrnInfoPtr pScrn) -{ - /* Call xf86UnMapVidMem() to unmap each memory area */ - ... - return TRUE or FALSE; -} - </code> - -<sect2>Save, Restore -<p> - - Define functions to save and restore the original video state. These - functions are not mandatory, but are often useful. - - <code> -static void -ZZZSave(ScrnInfoPtr pScrn) -{ - /* - * Save state into per-screen data structures. - * If using the vgahw module, vgaHWSave will typically be - * called here. - */ - ... -} - -static void -ZZZRestore(ScrnInfoPtr pScrn) -{ - /* - * Restore state from per-screen data structures. - * If using the vgahw module, vgaHWRestore will typically be - * called here. - */ - ... -} - </code> - -<sect2>ModeInit -<p> - - Define a function to initialise a new video mode. This function isn't - mandatory, but is often useful. - - <code> -static Bool -ZZZModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode) -{ - /* - * Program a video mode. If using the vgahw module, - * vgaHWInit and vgaRestore will typically be called here. - * Once up to the point where there can't be a failure - * set pScrn->vtSema to TRUE. - */ - ... -} - </code> - -<sect2>ScreenInit -<p> - - Define the &s.code;ScreenInit()&e.code; function. This is called - at the start of each server generation, and should fill in as much - of the &s.code;ScreenRec&e.code; as possible as well as any other - data that is initialised once per generation. It should initialise - the framebuffer layers it is using, and initialise the initial video - mode. - - This function is mandatory. - - NOTE: The &s.code;ScreenRec&e.code; (&s.code;pScreen&e.code;) is - passed to this driver, but it and the - &s.code;ScrnInfoRecs&e.code; are not yet hooked into each - other. This means that in this function, and functions it - calls, one cannot be found from the other. - - <code> -static Bool -ZZZScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) -{ - /* Get the ScrnInfoRec */ - pScrn = xf86Screens[pScreen->myNum]; - - /* - * If using the vgahw module, its data structures and related - * things are typically initialised/mapped here. - */ - - /* Save the current video state */ - ZZZSave(pScrn); - - /* Initialise the first mode */ - ZZZModeInit(pScrn, pScrn->currentMode); - - /* Set the viewport if supported */ - - ZZZAdjustFrame(scrnIndex, pScrn->frameX0, pScrn->frameY0, 0); - - /* - * Setup the screen's visuals, and initialise the framebuffer - * code. - */ - - /* Reset the visual list */ - miClearVisualTypes(); - - /* - * Setup the visuals supported. This driver only supports - * TrueColor for bpp > 8, so the default set of visuals isn't - * acceptable. To deal with this, call miSetVisualTypes with - * the appropriate visual mask. - */ - - if (pScrn->bitsPerPixel > 8) { - if (!miSetVisualTypes(pScrn->depth, TrueColorMask, - pScrn->rgbBits, pScrn->defaultVisual)) - return FALSE; - } else { - if (!miSetVisualTypes(pScrn->depth, - miGetDefaultVisualMask(pScrn->depth), - pScrn->rgbBits, pScrn->defaultVisual)) - return FALSE; - } - - /* - * Initialise the framebuffer. - */ - - switch (pScrn->bitsPerPixel) { - case 1: - ret = xf1bppScreenInit(pScreen, FbBase, - pScrn->virtualX, pScrn->virtualY, - pScrn->xDpi, pScrn->yDpi, - pScrn->displayWidth); - break; - case 4: - ret = xf4bppScreenInit(pScreen, FbBase, - pScrn->virtualX, pScrn->virtualY, - pScrn->xDpi, pScrn->yDpi, - pScrn->displayWidth); - break; - case 8: - ret = cfbScreenInit(pScreen, FbBase, - pScrn->virtualX, pScrn->virtualY, - pScrn->xDpi, pScrn->yDpi, - pScrn->displayWidth); - break; - case 16: - ret = cfb16ScreenInit(pScreen, FbBase, - pScrn->virtualX, pScrn->virtualY, - pScrn->xDpi, pScrn->yDpi, - pScrn->displayWidth); - break; - case 24: - ret = cfb24ScreenInit(pScreen, FbBase, - pScrn->virtualX, pScrn->virtualY, - pScrn->xDpi, pScrn->yDpi, - pScrn->displayWidth); - break; - case 32: - ret = cfb32ScreenInit(pScreen, FbBase, - pScrn->virtualX, pScrn->virtualY, - pScrn->xDpi, pScrn->yDpi, - pScrn->displayWidth); - break; - default: - print a message about an internal error; - ret = FALSE; - break; - } - - if (!ret) - return FALSE; - - /* Override the default mask/offset settings */ - if (pScrn->bitsPerPixel > 8) { - for (i = 0, visual = pScreen->visuals; - i < pScreen->numVisuals; i++, visual++) { - if ((visual->class | DynamicClass) == DirectColor) { - visual->offsetRed = pScrn->offset.red; - visual->offsetGreen = pScrn->offset.green; - visual->offsetBlue = pScrn->offset.blue; - visual->redMask = pScrn->mask.red; - visual->greenMask = pScrn->mask.green; - visual->blueMask = pScrn->mask.blue; - } - } - } - - /* - * If banking is needed, initialise an miBankInfoRec (defined in - * "mibank.h"), and call miInitializeBanking(). - */ - if (!miInitializeBanking(pScreen, pScrn->virtualX, pScrn->virtualY, - pScrn->displayWidth, pBankInfo)) - return FALSE; - - /* - * If backing store is to be supported (as is usually the case), - * initialise it. - */ - miInitializeBackingStore(pScreen); - - /* - * Set initial black & white colourmap indices. - */ - xf86SetBlackWhitePixels(pScreen); - - /* - * Install colourmap functions. If using the vgahw module, - * vgaHandleColormaps would usually be called here. - */ - - ... - - /* - * Initialise cursor functions. This example is for the mi - * software cursor. - */ - miDCInitialize(pScreen, xf86GetPointerScreenFuncs()); - - /* Initialise the default colourmap */ - switch (pScrn->depth) { - case 1: - if (!xf1bppCreateDefColormap(pScreen)) - return FALSE; - break; - case 4: - if (!xf4bppCreateDefColormap(pScreen)) - return FALSE; - break; - default: - if (!cfbCreateDefColormap(pScreen)) - return FALSE; - break; - } - - /* - * Wrap the CloseScreen vector and set SaveScreen. - */ - ZZZPTR(pScrn)->CloseScreen = pScreen->CloseScreen; - pScreen->CloseScreen = ZZZCloseScreen; - pScreen->SaveScreen = ZZZSaveScreen; - - /* Report any unused options (only for the first generation) */ - if (serverGeneration == 1) { - xf86ShowUnusedOptions(pScrn->scrnIndex, pScrn->options); - } - - /* Done */ - return TRUE; -} - </code> - - -<sect2>SwitchMode -<p> - - Define the &s.code;SwitchMode()&e.code; function if mode switching - is supported by the driver. - - <code> -static Bool -ZZZSwitchMode(int scrnIndex, DisplayModePtr mode, int flags) -{ - return ZZZModeInit(xf86Screens[scrnIndex], mode); -} - </code> - - -<sect2>AdjustFrame -<p> - - Define the &s.code;AdjustFrame()&e.code; function if the driver - supports this. - - <code> -static void -ZZZAdjustFrame(int scrnIndex, int x, int y, int flags) -{ - /* Adjust the viewport */ -} - </code> - - -<sect2>EnterVT, LeaveVT -<p> - - Define the &s.code;EnterVT()&e.code; and &s.code;LeaveVT()&e.code; - functions. - - These functions are mandatory. - - <code> -static Bool -ZZZEnterVT(int scrnIndex, int flags) -{ - ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; - return ZZZModeInit(pScrn, pScrn->currentMode); -} - -static void -ZZZLeaveVT(int scrnIndex, int flags) -{ - ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; - ZZZRestore(pScrn); -} - </code> - -<sect2>CloseScreen -<p> - - Define the &s.code;CloseScreen()&e.code; function: - - This function is mandatory. Note that it unwraps the previously - wrapped &s.code;pScreen->CloseScreen&e.code;, and finishes by - calling it. - - <code> -static Bool -ZZZCloseScreen(int scrnIndex, ScreenPtr pScreen) -{ - ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; - if (pScrn->vtSema) { - ZZZRestore(pScrn); - ZZZUnmapMem(pScrn); - } - pScrn->vtSema = FALSE; - pScreen->CloseScreen = ZZZPTR(pScrn)->CloseScreen; - return (*pScreen->CloseScreen)(scrnIndex, pScreen); -} - </code> - -<sect2>SaveScreen -<p> - - Define the &s.code;SaveScreen()&e.code; function (the screen - blanking function). When using the vgahw module, this will typically - be: - - <code> -static Bool -ZZZSaveScreen(ScreenPtr pScreen, int mode) -{ - return vgaHWSaveScreen(pScreen, mode); -} - </code> - - This function is mandatory. Before modifying any hardware register - directly this function needs to make sure that the Xserver is active - by checking if &s.code;pScrn&e.code; is non-NULL and for - &s.code;pScrn->vtSema == TRUE&e.code;. - -<sect2>FreeScreen -<p> - - Define the &s.code;FreeScreen()&e.code; function. This function - is optional. It should be defined if the &s.code;ScrnInfoRec&e.code; - &s.code;driverPrivate&e.code; field is used so that it can be freed - when a screen is deleted by the common layer for reasons possibly - beyond the driver's control. This function is not used in during - normal (error free) operation. The per-generation data is freed by - the &s.code;CloseScreen()&e.code; function. - - <code> -static void -ZZZFreeScreen(int scrnIndex, int flags) -{ - /* - * If the vgahw module is used vgaHWFreeHWRec() would be called - * here. - */ - ZZZFreeRec(xf86Screens[scrnIndex]); -} - </code> - - -</article> diff --git a/xserver/hw/xfree86/doc/sgml/DESIGN.xml b/xserver/hw/xfree86/doc/sgml/DESIGN.xml new file mode 100644 index 000000000..6c90a4011 --- /dev/null +++ b/xserver/hw/xfree86/doc/sgml/DESIGN.xml @@ -0,0 +1,9402 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.3//EN" + "http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd" [ + <!ENTITY % defs SYSTEM "/xserver/doc/xml/xserver.ent"> %defs; + <!-- config file keyword markup --> + <!-- specific config file keywords --> + <!ENTITY k.device "<emphasis>Device</emphasis>"> + <!ENTITY k.monitor "<emphasis>Monitor</emphasis>"> + <!ENTITY k.display "<emphasis>Display</emphasis>"> + <!ENTITY k.inputdevice "<emphasis>InputDevice</emphasis>"> + <!ENTITY k.screen "<emphasis>Screen</emphasis>"> + <!ENTITY k.serverlayout "<emphasis>ServerLayout</emphasis>"> + <!ENTITY k.driver "<emphasis>Driver</emphasis>"> + <!ENTITY k.module "<emphasis>Module</emphasis>"> + <!ENTITY k.identifier "<emphasis>Identifier</emphasis>"> + <!ENTITY k.serverflags "<emphasis>ServerFlags</emphasis>"> +] > + +<article> + <articleinfo> + + <title>XFree86 DDX Design (Xorg server version &xserver.version;) + + + + The XFree86 Project, Inc. + + The X.Org Foundation, Inc. + + + JimGettys + Updates for X11R6.7 + + + + &xserver.reldate; + Xorg server version &xserver.version; + + + + +This document describes software undergoing continual evolution, and +the interfaces described here are subject to change without notice. +This document is intended to cover the interfaces as found in the +xorg-server-&xserver.version; release, but is probably not completely +in sync with the code base. + + + + + Preface + + +This document was originally the design spec for the DDX layer of the +XFree86 4.0 X server. The X.Org Foundation adopted the XFree86 4.4rc2 +version of that server as the basis of the Xorg server project, and has +evolved the XFree86 DDX layer greatly since forking. This document thus +covers only the current implementation of the XFree86 DDX as found in the +Xorg server &xserver.version; release, and no longer matches the XFree86 +server itself. + + + +The XFree86 Project's broad design principles for XFree86 4.0 were: + + keep it reasonable + + We cannot rewrite the complete server + + We don't want to re-invent the wheel + + + keep it modular + + As many things as possible should go into modules + + The basic loader binary should be minimal + + A clean design with well defined layering is + important + DDX specific global variables are a nono + + The structure should be flexible enough to allow + future extensions + The structure should minimize duplication of + common code + + keep important features in mind + + multiple screens, including multiple instances + of drivers + mixing different color depths and visuals on + different and ideally even on the same screen + + better control of the PCI device used + + better config file parser + get rid of all VGA compatibility assumptions + + + + + + +While the XFree86 project had a goal of avoiding changes to the DIX +layer unless they found major deficiencies there, to avoid divergence from +the X.Org sample implementation they were integrating changes from, the +X.Org developers now maintain both sides, and make changes where they are +most appropriate. This document concentrates on the XFree86 DDX layer used +in the Xorg server itself (the code found in hw/xfree86 +in the source tree), and developers will also want to refer to the +Xserver-spec documentation that covers the DIX layer +routines common to all the X servers in the sample implementation. + + + + + The xorg.conf File + + +The xorg.conf file format is based on the XF86Config format from XFree86 4.4, +which is in turn similar to the old XFree86 3.x XF86Config format, with the +following changes: + + + + &k.device; section + + + The &k.device; sections are similar to what they used to be, and + describe hardware-specific information for a single video card. + &k.device; + Some new keywords are added: + + + + Driver "drivername" + + Specifies the name of the driver to be used for the card. This + is mandatory. + + BusID "busslot" + + Specifies uniquely the location of the card on the bus. The + purpose is to identify particular cards in a multi-headed + configuration. The format of the argument is intentionally + vague, and may be architecture dependent. For a PCI bus, it + is something like "bus:slot:func". + + + + + + A &k.device; section is considered active if there is a reference + to it in an active &k.screen; section. + + + + + &k.screen; section + + + The &k.screen; sections are similar to what they used to be. They + no longer have a &k.driver; keyword, but an &k.identifier; keyword + is added. (The &k.driver; keyword may be accepted in place of the + &k.identifier; keyword for compatibility purposes.) The identifier + can be used to identify which screen is to be active when multiple + &k.screen; sections are present. It is possible to specify the active + screen from the command line. A default is chosen in the absence + of one being specified. A &k.screen; section is considered active + if there is a reference to it either from the command line, or from + an active &k.serverlayout; section. + + + + + &k.inputdevice; section + + + The &k.inputdevice; section is a new section that describes + configuration information for input devices. It replaces the old + Keyboard, Pointer and XInput + sections. Like the &k.device; section, it has two mandatory keywords: + &k.identifier; and &k.driver;. For compatibility purposes the old + Keyboard and Pointer sections are + converted by the parser into &k.inputdevice; sections as follows: + + + Keyboard + + &k.identifier; "Implicit Core Keyboard" + &k.driver; "keyboard" + + Pointer + + &k.identifier; "Implicit Core Pointer" + &k.driver; "mouse" + + + + + + An &k.inputdevice; section is considered active if there is a + reference to it in an active &k.serverlayout; section. An + &k.inputdevice; section may also be referenced implicitly if there + is no &k.serverlayout; section, if the command + line options is used, or if the &k.serverlayout; section doesn't + reference any &k.inputdevice; sections. In this case, the first + sections with drivers "keyboard" and "mouse" are used as the core + keyboard and pointer respectively. + + + + + &k.serverlayout; section + + + The &k.serverlayout; section is a new section that is used to identify + which &k.screen; sections are to be used in a multi-headed configuration, + and the relative layout of those screens. It also identifies which + &k.inputdevice; sections are to be used. Each &k.serverlayout; section + has an identifier, a list of &k.screen; section identifiers, and a list of + &k.inputdevice; section identifiers. &k.serverflags; options may also be + included in a &k.serverlayout; section, making it possible to override + the global values in the &k.serverflags; section. + + + + A &k.serverlayout; section can be made active by being referenced on + the command line. In the absence of this, a default will be chosen + (the first one found). The screen names may optionally be followed + by a number specifying the preferred screen number, and optionally + by information specifying the physical positioning of the screen, + either in absolute terms or relative to another screen (or screens). + When no screen number is specified, they are numbered according to + the order in which they are listed. The old (now obsolete) method + of providing the positioning information is to give the names of + the four adjacent screens. The order of these is top, bottom, left, + right. Here is an example of a &k.serverlayout; section for two + screens using the old method, with the second located to the right + of the first: + + + Section "ServerLayout" + Identifier "Main Layout" + Screen 0 "Screen 1" "" "" "" "Screen 2" + Screen 1 "Screen 2" + Screen "Screen 3" + EndSection + + + + + The preferred way of specifying the layout is to explicitly specify + the screen's location in absolute terms or relative to another + screen. + + + + In the absolute case, the upper left corner's coordinates are given + after the Absolute keyword. If the coordinates are + omitted, a value of (0,0) is assumed. An example + of absolute positioning follows: + + + Section "ServerLayout" + Identifier "Main Layout" + Screen 0 "Screen 1" Absolute 0 0 + Screen 1 "Screen 2" Absolute 1024 0 + Screen "Screen 3" Absolute 2048 0 + EndSection + + + + + In the relative case, the position is specified by either using one of + the following keywords followed by the name of the reference screen: + + + RightOf + LeftOf + Above + Below + Relative + + + + + When the Relative keyword is used, the reference screen + name is followed by the coordinates of the new screen's origin + relative to reference screen. The following example shows how to use + some of the relative positioning options. + + + Section "ServerLayout" + Identifier "Main Layout" + Screen 0 "Screen 1" + Screen 1 "Screen 2" RightOf "Screen 1" + Screen "Screen 3" Relative "Screen 1" 2048 0 + EndSection + + + + + + Options + + + Options are used more extensively. They may appear in most sections + now. Options related to drivers can be present in the &k.screen;, + &k.device; and &k.monitor; sections and the &k.display; subsections. + The order of precedence is &k.display;, &k.screen;, &k.monitor;, + &k.device;. Options have been extended to allow an optional value + to be specified in addition to the option name. For more details + about options, see the Options section + for details. + + + + + + Driver Interface + + +The driver interface consists of a minimal set of entry points that are +required based on the external events that the driver must react to. +No non-essential structure is imposed on the way they are used beyond +that. This is a significant difference compared with the old design. + + + +The entry points for drawing operations are already taken care of by +the framebuffer code (including, XAA). Extensions and enhancements to +framebuffer code are outside the scope of this document. + + + +This approach to the driver interface provides good flexibility, but does +increase the complexity of drivers. To help address this, the XFree86 +common layer provides a set of helper functions to take care of things +that most drivers need. These helpers help minimise the amount of code +duplication between drivers. The use of helper functions by drivers is +however optional, though encouraged. The basic philosophy behind the +helper functions is that they should be useful to many drivers, that +they should balance this against the complexity of their interface. It +is inevitable that some drivers may find some helpers unsuitable and +need to provide their own code. + + + +Events that a driver needs to react to are: + + + ScreenInit + + + An initialisation function is called from the DIX layer for each + screen at the start of each server generation. + + + Enter VT + + + The server takes control of the console. + + + Leave VT + + + The server releases control of the console. + + + Mode Switch + + + Change video mode. + + + ViewPort change + + + Change the origin of the physical view port. + + + ScreenSaver state change + + + Screen saver activation/deactivation. + + + CloseScreen + + + A close screen function is called from the DIX layer for each screen + at the end of each server generation. + + + + + + +In addition to these events, the following functions are required by +the XFree86 common layer: + + + Identify + + + Print a driver identifying message. + + + Probe + + + This is how a driver identifies if there is any hardware present that + it knows how to drive. + + + PreInit + + + Process information from the xorg.conf file, determine the + full characteristics of the hardware, and determine if a valid + configuration is present. + + + + + +The VidMode extension also requires: + + + ValidMode + + + Identify if a new mode is usable with the current configuration. + The PreInit function (and/or helpers it calls) may also make use + of the ValidMode function or something similar. + + + + + + +Other extensions may require other entry points. The drivers will +inform the common layer of these in such cases. + + + + + Resource Access Control Introduction + + +Graphics devices are accessed through ranges in I/O or memory space. +While most modern graphics devices allow relocation of such ranges many +of them still require the use of well established interfaces such as +VGA memory and IO ranges or 8514/A IO ranges. With modern buses (like +PCI) it is possible for multiple video devices to share access to these +resources. The RAC (Resource Access Control) subsystem provides a +mechanism for this. + + + + Terms and Definitions + + + Bus + + + Bus is ambiguous as it is used for different things: it may refer + to physical incompatible extension connectors in a computer system. + The RAC system knows two such systems: The ISA bus and the PCI bus. + (On the software level EISA, MCA and VL buses are currently treated + like ISA buses). Bus may also refer to logically different + entities on a single bus system which are connected via bridges. A + PCI system may have several distinct PCI buses connecting each other + by PCI-PCI bridges or to the host CPU by HOST-PCI bridges. + + + + Systems that host more than one bus system link these together using + bridges. Bridges are a concern to RAC as they might block or pass + specific resources. PCI-PCI bridges may be set up to pass VGA + resources to the secondary bus. PCI-ISA buses pass any resources not + decoded on the primary PCI bus to the ISA bus. This way VGA resources + (although exclusive on the ISA bus) can be shared by ISA and PCI + cards. Currently HOST-PCI bridges are not yet handled by RAC as they + require specific drivers. + + + + + Entity + + + The smallest independently addressable unit on a system bus is + referred to as an entity. So far we know ISA and PCI entities. PCI + entities can be located on the PCI bus by an unique ID consisting of + the bus, card and function number. + + + + + Resource + + + Resource refers to a range of memory or I/O addresses an entity + can decode. + + + + If a device is capable of disabling this decoding the resource is + called sharable. For PCI devices a generic method is provided to + control resource decoding. Other devices will have to provide a + device specific function to control decoding. + + + + If the entity is capable of decoding this range at a different + location this resource is considered relocatable. + + + + Resources which start at a specific address and occupy a single + continuous range are called block resources. + + + + Alternatively resource addresses can be decoded in a way that they + satisfy the conditions: + + address & mask == base + + and + + base & mask == base + + Resources addressed in such a way are called sparse resources. + + + + + + Server States + + + The resource access control system knows two server states: the + SETUP and the OPERATING state. The SETUP state is entered whenever + a mode change takes place or the server exits or does VT switching. + During this state all entity resources are under resource access + control. During OPERATING state only those entities are controlled + which actually have shared resources that conflict with others. + + + + + + + Control Flow in the Server and Mandatory Driver Functions + + +At the start of each server generation, main() +(dix/main.c) calls the DDX function +InitOutput(). This is the first place that the DDX gets +control. InitOutput() is expected to fill in the global +screenInfo struct, and one +screenInfo.screen[] entry for each screen present. +Here is what InitOutput() does: + + + + Parse the xorg.conf file + + + This is done at the start of the first server generation only. + + + + The xorg.conf file is read in full, and the resulting information + stored in data structures. None of the parsed information is + processed at this point. The parser data structures are opaque to + the video drivers and to most of the common layer code. + + + + The entire file is parsed first to remove any section ordering + requirements. + + + + + + Initial processing of parsed information and command line options + + + + This is done at the start of the first server generation only. + + + + The initial processing is to determine paths like the + ModulePath, etc, and to determine which &k.serverlayout;, + &k.screen; and &k.device; sections are active. + + + + + + Enable port I/O access + + + Port I/O access is controlled from the XFree86 common layer, and is + all or nothing. It is enabled prior to calling driver probes, at + the start of subsequent server generations, and when VT switching + back to the Xserver. It is disabled at the end of server generations, + and when VT switching away from the Xserver. + + + + The implementation details of this may vary on different platforms. + + + + + + General bus probe + + + This is done at the start of the first server generation only. + + + + In the case of ix86 machines, this will be a general PCI probe. + The full information obtained here will be available to the drivers. + This information persists for the life of the Xserver. In the PCI + case, the PCI information for all video cards found is available by + calling xf86GetPciVideoInfo(). + + +
+ + pciVideoPtr *xf86GetPciVideoInfo(void); + +
+ returns a pointer to a list of pointers to + pciVideoRec entries, of which there is one for + each detected PCI video card. The list is terminated with a + NULL pointer. If no PCI video cards were + detected, the return value is NULL. + +
+
+ + + After the bus probe, the resource broker is initialised. + +
+ + + + Load initial set of modules + + + This is done at the start of the first server generation only. + + + + The core server contains a list of mandatory modules. These are loaded + first. Currently the only module on this list is the bitmap font module. + + + + The next set of modules loaded are those specified explicitly in the + &k.module; section of the config file. + + + + The final set of initial modules are the driver modules referenced + by the active &k.device; and &k.inputdevice; sections in the config + file. Each of these modules is loaded exactly once. + + + + + + Register Video and Input Drivers + + + This is done at the start of the first server generation only. + + + + When a driver module is loaded, the loader calls its + Setup function. For video drivers, this function + calls xf86AddDriver() to register the driver's + DriverRec, which contains a small set of essential + details and driver entry points required during the early phase of + InitOutput(). xf86AddDriver() + adds it to the global xf86DriverList[] array. + + + + The DriverRec contains the driver canonical name, + the Identify(), + Probe() and AvailableOptions() + function entry points as well as a pointer + to the driver's module (as returned from the loader when the driver + was loaded) and a reference count which keeps track of how many + screens are using the driver. The entry driver entry points are + those required prior to the driver allocating and filling in its + ScrnInfoRec. + + + + For a static server, the xf86DriverList[] array is + initialised at build time, and the loading of modules is not done. + + + + A similar procedure is used for input drivers. The input driver's + Setup function calls + xf86AddInputDriver() to register the driver's + InputDriverRec, which contains a small set of + essential details and driver entry points required during the early + phase of InitInput(). + xf86AddInputDriver() adds it to the global + xf86InputDriverList[] array. For a static server, + the xf86InputDriverList[] array is initialised at + build time. + + + + Both the xf86DriverList[] and + xf86InputDriverList[] arrays have been initialised + by the end of this stage. + + + + Once all the drivers are registered, their + ChipIdentify() functions are called. + + +
+ + void ChipIdentify(int flags); + +
+ This is expected to print a message indicating the driver name, + a short summary of what it supports, and a list of the chipset + names that it supports. It may use the xf86PrintChipsets() helper + to do this. +
+
+ +
+ + void xf86PrintChipsets(const char *drvname, const char *drvmsg, + SymTabPtr chips); + +
+ This function provides an easy way for a driver's ChipIdentify + function to format the identification message. +
+
+
+ + + Initialise Access Control + + + This is done at the start of the first server generation only. + + + + The Resource Access Control (RAC) subsystem is initialised before + calling any driver functions that may access hardware. All generic + bus information is probed and saved (for restoration later). All + (shared resource) video devices are disabled at the generic bus + level, and a probe is done to find the primary video device. These + devices remain disabled for the next step. + + + + + + Video Driver Probe + + + This is done at the start of the first server generation only. The + ChipProbe() function of each registered video driver + is called. + + +
+ + Bool ChipProbe(DriverPtr drv, int flags); + +
+ The purpose of this is to identify all instances of hardware + supported by the driver. The flags value is currently either 0, + PROBE_DEFAULT or PROBE_DETECT. + PROBE_DETECT is used if "-configure" or "-probe" + command line arguments are given and indicates to the + Probe() function that it should not configure the + bus entities and that no xorg.conf information is available. + + + + The probe must find the active device sections that match the + driver by calling xf86MatchDevice(). The number + of matches found limits the maximum number of instances for this + driver. If no matches are found, the function should return + FALSE immediately. + + + + Devices that cannot be identified by using device-independent + methods should be probed at this stage (keeping in mind that access + to all resources that can be disabled in a device-independent way + are disabled during this phase). The probe must be a minimal + probe. It should just determine if there is a card present that + the driver can drive. It should use the least intrusive probe + methods possible. It must not do anything that is not essential, + like probing for other details such as the amount of memory + installed, etc. It is recommended that the + xf86MatchPciInstances() helper function be used + for identifying matching PCI devices, and similarly the + xf86MatchIsaInstances() for ISA (non-PCI) devices + (see the RAC section). These helpers also + checks and claims the appropriate entity. When not using the + helper, that should be done with xf86CheckPciSlot() + and xf86ClaimPciSlot() for PCI devices and + xf86ClaimIsaSlot() for ISA devices (see the + RAC section). + + + + The probe must register all non-relocatable resources at this + stage. If a resource conflict is found between exclusive resources + the driver will fail immediately. This is usually best done with + the xf86ConfigPciEntity() helper function + for PCI and xf86ConfigIsaEntity() for ISA + (see the RAC section). It is possible to + register some entity specific functions with those helpers. When + not using the helpers, the xf86AddEntityToScreen() + xf86ClaimFixedResources() and + xf86SetEntityFuncs() should be used instead (see + the RAC section). + + + + If a chipset is specified in an active device section which the + driver considers relevant (ie it has no driver specified, or the + driver specified matches the driver doing the probe), the Probe + must return FALSE if the chipset doesn't match + one supported by the driver. + + + + If there are no active device sections that the driver considers + relevant, it must return FALSE. + + + + Allocate a ScrnInfoRec for each active instance of the + hardware found, and fill in the basic information, including the + other driver entry points. This is best done with the + xf86ConfigIsaEntity() helper function for ISA + instances or xf86ConfigPciEntity() for PCI instances. + These functions allocate a ScrnInfoRec for active + entities. Optionally xf86AllocateScreen() + function may also be used to allocate the ScrnInfoRec. + Any of these functions take care of initialising fields to defined + unused values. + + + + Claim the entities for each instance of the hardware found. This + prevents other drivers from claiming the same hardware. + + + + Must leave hardware in the same state it found it in, and must not + do any hardware initialisation. + + + + All detection can be overridden via the config file, and that + parsed information is available to the driver at this stage. + + + + Returns TRUE if one or more instances are found, + and FALSE otherwise. + + +
+ +
+ + int xf86MatchDevice(const char *drivername, + GDevPtr **driversectlist) + +
+ This function takes the name of the driver and returns via + driversectlist a list of device sections that + match the driver name. The function return value is the number + of matches found. If a fatal error is encountered the return + value is -1. + + + + The caller should use xfree() to free + *driversectlist when it is no longer needed. + + +
+ +
+ + ScrnInfoPtr xf86AllocateScreen(DriverPtr drv, int flags) + +
+ This function allocates a new ScrnInfoRec in the + xf86Screens[] array. This function is normally + called by the video driver ChipProbe() functions. + The return value is a pointer to the newly allocated + ScrnInfoRec. The scrnIndex, + origIndex, module and + drv fields are initialised. The reference count + in drv is incremented. The storage for any + currently allocated privates pointers is also allocated and + the privates field initialised (the privates data + is of course not allocated or initialised). This function never + returns on failure. If the allocation fails, the server exits + with a fatal error. The flags value is not currently used, and + should be set to zero. +
+
+ + + At the completion of this, a list of ScrnInfoRecs + have been allocated in the xf86Screens[] array, and + the associated entities and fixed resources have been claimed. The + following ScrnInfoRec fields must be initialised at + this point: + + + driverVersion + driverName + scrnIndex(*) + origIndex(*) + drv(*) + module(*) + name + Probe + PreInit + ScreenInit + EnterVT + LeaveVT + numEntities + entityList + access + + + (*) These are initialised when the ScrnInfoRec + is allocated, and not explicitly by the driver. + + + + The following ScrnInfoRec fields must be initialised + if the driver is going to use them: + + + SwitchMode + AdjustFrame + FreeScreen + ValidMode + + +
+ + + Matching Screens + + + This is done at the start of the first server generation only. + + + + After the Probe phase is finished, there will be some number of + ScrnInfoRecs. These are then matched with the active + &k.screen; sections in the xorg.conf, and those not having an active + &k.screen; section are deleted. If the number of remaining screens + is 0, InitOutput() sets + screenInfo.numScreens to 0 and + returns. + + + + At this point the following fields of the ScrnInfoRecs + must be initialised: + + + confScreen + + + + + + + Allocate non-conflicting resources + + + This is done at the start of the first server generation only. + + + + Before calling the drivers again, the resource information collected + from the Probe phase is processed. This includes checking the extent + of PCI resources for the probed devices, and resolving any conflicts + in the relocatable PCI resources. It also reports conflicts, checks + bus routing issues, and anything else that is needed to enable the + entities for the next phase. + + + + If any drivers registered an EntityInit() function + during the Probe phase, then they are called here. + + + + + + Sort the Screens and pre-check Monitor Information + + + This is done at the start of the first server generation only. + + + + The list of screens is sorted to match the ordering requested in the + config file. + + + + The list of modes for each active monitor is checked against the + monitor's parameters. Invalid modes are pruned. + + + + + + PreInit + + + This is done at the start of the first server generation only. + + + + For each ScrnInfoRec, enable access to the screens entities and call + the ChipPreInit() function. + + +
+ + Bool ChipPreInit(ScrnInfoRec screen, int flags); + +
+ The purpose of this function is to find out all the information + required to determine if the configuration is usable, and to + initialise those parts of the ScrnInfoRec that + can be set once at the beginning of the first server generation. + + + + The number of entities registered for the screen should be checked + against the expected number (most drivers expect only one). The + entity information for each of them should be retrieved (with + xf86GetEntityInfo()) and checked for the correct + bus type and that none of the sharable resources registered during + the Probe phase was rejected. + + + + Access to resources for the entities that can be controlled in a + device-independent way are enabled before this function is called. + If the driver needs to access any resources that it has disabled + in an EntityInit() function that it registered, + then it may enable them here providing that it disables them before + this function returns. + + + + This includes probing for video memory, clocks, ramdac, and all + other HW info that is needed. It includes determining the + depth/bpp/visual and related info. It includes validating and + determining the set of video modes that will be used (and anything + that is required to determine that). + + + + This information should be determined in the least intrusive way + possible. The state of the HW must remain unchanged by this + function. Although video memory (including MMIO) may be mapped + within this function, it must be unmapped before returning. Driver + specific information should be stored in a structure hooked into + the ScrnInfoRec's driverPrivate + field. Any other modules which require persistent data (ie data + that persists across server generations) should be initialised in + this function, and they should allocate a privates index to + hook their data into by calling + xf86AllocateScrnInfoPrivateIndex(). The privates + data is persistent. + + + + Helper functions for some of these things are provided at the + XFree86 common level, and the driver can choose to make use of + them. + + + + All additional resources that the screen needs must be registered + here. This should be done with + xf86RegisterResources(). If some of the fixed + resources registered in the Probe phase are not needed or not + decoded by the hardware when in the OPERATING server state, their + status should be updated with + xf86SetOperatingState(). + + + + Modules may be loaded at any point in this function, and all + modules that the driver will need must be loaded before the end + of this function. Either the xf86LoadSubModule() + or the xf86LoadDrvSubModule() function should be + used to load modules depending on whether a + ScrnInfoRec has been set up. A driver may unload + a module within this function if it was only needed temporarily, + and the xf86UnloadSubModule() function should be used + to do that. Otherwise there is no need to explicitly unload modules + because the loader takes care of module dependencies and will + unload submodules automatically if/when the driver module is + unloaded. + + + + The bulk of the ScrnInfoRec fields should be filled + out in this function. + + + + ChipPreInit() returns FALSE when + the configuration is unusable in some way (unsupported depth, no + valid modes, not enough video memory, etc), and TRUE + if it is usable. + + + + It is expected that if the ChipPreInit() function + returns TRUE, then the only reasons that subsequent + stages in the driver might fail are lack or resources (like xalloc + failures). All other possible reasons for failure should be + determined by the ChipPreInit() function. +
+
+ + + The ScrnInfoRecs for screens where the ChipPreInit() fails are removed. + If none remain, InitOutput() sets screenInfo.numScreens to 0 and returns. + + + + At this point, further fields of the ScrnInfoRecs would normally be + filled in. Most are not strictly mandatory, but many are required + by other layers and/or helper functions that the driver may choose + to use. The documentation for those layers and helper functions + indicates which they require. + + + + The following fields of the ScrnInfoRecs should be filled in if the + driver is going to use them: + + + monitor + display + depth + pixmapBPP + bitsPerPixel + weight (>8bpp only) + mask (>8bpp only) + offset (>8bpp only) + rgbBits (8bpp only) + gamma + defaultVisual + maxHValue + maxVValue + virtualX + virtualY + displayWidth + frameX0 + frameY0 + frameX1 + frameY1 + zoomLocked + modePool + modes + currentMode + progClock (TRUE if clock is programmable) + chipset + ramdac + clockchip + numClocks (if not programmable) + clock[] (if not programmable) + videoRam + biosBase + memBase + memClk + driverPrivate + chipID + chipRev + + + +
+ + pointer xf86LoadSubModule(ScrnInfoPtr pScrn, const char *name); + and + pointer xf86LoadDrvSubModule(DriverPtr drv, const char *name); + +
+ Load a module that a driver depends on. This function loads the + module name as a sub module of the driver. The + return value is a handle identifying the new module. If the load + fails, the return value will be NULL. If a driver + needs to explicitly unload a module it has loaded in this way, + the return value must be saved and passed to + xf86UnloadSubModule() when unloading. + +
+
+ +
+ + void xf86UnloadSubModule(pointer module); + +
+ Unloads the module referenced by module. + module should be a pointer returned previously + by xf86LoadSubModule() or + xf86LoadDrvSubModule() . + +
+
+
+ + + Cleaning up Unused Drivers + + + At this point it is known which screens will be in use, and which + drivers are being used. Unreferenced drivers (and modules they + may have loaded) are unloaded here. + + + + + + Consistency Checks + + + The parameters that must be global to the server, like pixmap formats, + bitmap bit order, bitmap scanline unit and image byte order are + compared for each of the screens. If a mismatch is found, the server + exits with an appropriate message. + + + + + + Check if Resource Control is Needed + + + Determine if resource access control is needed. This is the case + if more than one screen is used. If necessary the RAC wrapper module + is loaded. + + + + + AddScreen (ScreenInit) + + + At this point, the valid screens are known. + AddScreen() is called for each of them, passing + ChipScreenInit() as the argument. + AddScreen() is a DIX function that allocates a new + screenInfo.screen[] entry (aka + pScreen), and does some basic initialisation of it. + It then calls the ChipScreenInit() function, with + pScreen as one of its arguments. If + ChipScreenInit() returns FALSE, + AddScreen() returns -1. Otherwise + it returns the index of the screen. AddScreen() + should only fail because of programming errors or failure to allocate + resources (like memory). All configuration problems should be + detected BEFORE this point. + + +
+ + Bool ChipScreenInit(int index, ScreenPtr pScreen, + int argc, char **argv); + +
+ This is called at the start of each server generation. + + + + Fill in all of pScreen, possibly doing some of + this by calling ScreenInit functions from other layers like mi, + framebuffers (cfb, etc), and extensions. + + + + Decide which operations need to be placed under resource access + control. The classes of operations are the frame buffer operations + (RAC_FB), the pointer operations + (RAC_CURSOR), the viewport change operations + (RAC_VIEWPORT) and the colormap operations + (RAC_COLORMAP). Any operation that requires + resources which might be disabled during OPERATING state should + be set to use RAC. This can be specified separately for memory + and IO resources (the racMemFlags and + racIoFlags fields of the ScrnInfoRec + respectively). + + + + Map any video memory or other memory regions. + + + + Save the video card state. Enough state must be saved so that + the original state can later be restored. + + + + Initialise the initial video mode. The ScrnInfoRec's + vtSema field should be set to TRUE + just prior to changing the video hardware's state. + +
+
+ + + + The ChipScreenInit() function (or functions from other + layers that it calls) should allocate entries in the + ScreenRec's devPrivates area by + calling AllocateScreenPrivateIndex() if it needs + per-generation storage. Since the ScreenRec's + devPrivates information is cleared for each server + generation, this is the correct place to initialise it. + + + + After AddScreen() has successfully returned, the + following ScrnInfoRec fields are initialised: + + + pScreen + racMemFlags + racIoFlags + + + + + The ChipScreenInit() function should initialise the + CloseScreen and SaveScreen fields + of pScreen. The old value of + pScreen->CloseScreen should be saved as part of + the driver's per-screen private data, allowing it to be called from + ChipCloseScreen(). This means that the existing + CloseScreen() function is wrapped. + +
+ + + Finalising RAC Initialisation + + + After all the ChipScreenInit() functions have been + called, each screen has registered its RAC requirements. This + information is used to determine which shared resources are requested + by more than one driver and set the access functions accordingly. + This is done following these rules: + + + + The sharable resources registered by each entity are compared. + If a resource is registered by more than one entity the entity + will be marked to indicate that it needs to share this resources + type (IO or MEM). + + + + A resource marked disabled during OPERATING state will be + ignored entirely. + + + + A resource marked unused will only conflict with an overlapping + resource of an other entity if the second is actually in use + during OPERATING state. + + + + If an unused resource was found to conflict but the entity + does not use any other resource of this type the entire resource + type will be disabled for that entity. + + + + + + + + Finishing InitOutput() + + + At this point InitOutput() is finished, and all the + screens have been setup in their initial video mode. + + + + + + Mode Switching + + + When a SwitchMode event is received, ChipSwitchMode() + is called (when it exists): + + +
+ + Bool ChipSwitchMode(int index, DisplayModePtr mode, int flags); + +
+ Initialises the new mode for the screen identified by + index;. The viewport may need to be adjusted + also. + +
+
+ +
+ + + Changing Viewport + + + When a Change Viewport event is received, + ChipAdjustFrame() is called (when it exists): + + +
+ + void ChipAdjustFrame(int index, int x, int y, int flags); + +
+ Changes the viewport for the screen identified by + index;. + + + + It should be noted that many chipsets impose restrictions on where the + viewport may be placed in the virtual resolution, either for alignment + reasons, or to prevent the start of the viewport from being positioned + within a pixel (as can happen in a 24bpp mode). After calculating the + value the chipset's panning registers need to be set to for non-DGA + modes, this function should recalculate the ScrnInfoRec's + frameX0, frameY0, frameX1 + and frameY1 fields to correspond to that value. If + this is not done, switching to another mode might cause the position + of a hardware cursor to change. + +
+
+ +
+ + + VT Switching + + + When a VT switch event is received, xf86VTSwitch() + is called. xf86VTSwitch() does the following: + + + On ENTER: + + + + enable port I/O access + + + + save and initialise the bus/resource state + + + + enter the SETUP server state + + + + calls ChipEnterVT() for each screen + + + + enter the OPERATING server state + + + + validate GCs + + + + Restore fb from saved pixmap for each screen + + + + Enable all input devices + + + + + + On LEAVE: + + + + Save fb to pixmap for each screen + + + + validate GCs + + + + enter the SETUP server state + + + + calls ChipLeaveVT() for each screen + + + + disable all input devices + + + + restore bus/resource state + + + + disables port I/O access + + + + + + + +
+ + Bool ChipEnterVT(int index, int flags); + +
+ This function should initialise the current video mode and + initialise the viewport, turn on the HW cursor if appropriate, + etc. + + + + Should it re-save the video state before initialising the video + mode? + + +
+ +
+ + void ChipLeaveVT(int index, int flags); + +
+ This function should restore the saved video state. If + appropriate it should also turn off the HW cursor, and invalidate + any pixmap/font caches. + + +
+ + + Optionally, ChipLeaveVT() may also unmap memory + regions. If so, ChipEnterVT() will need to remap + them. Additionally, if an aperture used to access video memory is + unmapped and remapped in this fashion, ChipEnterVT() + will also need to notify the framebuffer layers of the aperture's new + location in virtual memory. This is done with a call to the screen's + ModifyPixmapHeader() function, as follows + + +
+ + (*pScreen->ModifyPixmapHeader)(pScrn->ppix, + -1, -1, -1, -1, -1, NewApertureAddress); + +
+ where the ppix field in a ScrnInfoRec + points to the pixmap used by the screen's + SaveRestoreImage() function to hold the screen's + contents while switched out. + + +
+ + + Currently, aperture remapping, as described here, should not be + attempted if the driver uses the xf8_16bpp or + xf8_32bpp framebuffer layers. A pending + restructuring of VT switching will address this restriction in + the near future. + + + + Other layers may wrap the ChipEnterVT() and + ChipLeaveVT() functions if they need to take some + action when these events are received. + +
+ + + End of server generation + + + At the end of each server generation, the DIX layer calls + ChipCloseScreen() for each screen: + + +
+ + Bool ChipCloseScreen(int index, ScreenPtr pScreen); + +
+ This function should restore the saved video state and unmap the + memory regions. + + + + It should also free per-screen data structures allocated by the + driver. Note that the persistent data held in the + ScrnInfoRec's driverPrivate field + should not be freed here because it is needed by subsequent server + generations. + + + + The ScrnInfoRec's vtSema field + should be set to FALSE once the video HW state + has been restored. + + + + Before freeing the per-screen driver data the saved + CloseScreen value should be restored to + pScreen->CloseScreen, and that function should + be called after freeing the data. + +
+
+
+
+ + + Optional Driver Functions + + +The functions outlined here can be called from the XFree86 common layer, +but their presence is optional. + + + + Mode Validation + + + When a mode validation helper supplied by the XFree86-common layer is + being used, it can be useful to provide a function to check for hw + specific mode constraints: + + +
+ + ModeStatus ChipValidMode(int index, DisplayModePtr mode, + Bool verbose, int flags); + +
+ Check the passed mode for hw-specific constraints, and return the + appropriate status value. + +
+
+ + +This function may also modify the effective timings and clock of the passed +mode. These have been stored in the mode's Crtc* and +SynthClock elements, and have already been adjusted for +interlacing, doublescanning, multiscanning and clock multipliers and dividers. +The function should not modify any other mode field, unless it wants to modify +the mode timings reported to the user by xf86PrintModes(). + + + +The function is called once for every mode in the xorg.conf Monitor section +assigned to the screen, with flags set to +MODECHECK_INITIAL. It is subsequently called for every mode +in the xorg.conf Display subsection assigned to the screen, with +flags set to MODECHECK_FINAL. In the second +case, the mode will have successfully passed all other tests. In addition, +the ScrnInfoRec's virtualX, +virtualY and displayWidth fields will have been +set as if the mode to be validated were to be the last mode accepted. + + + +In effect, calls with MODECHECK_INITIAL are intended for checks that do not +depend on any mode other than the one being validated, while calls with +MODECHECK_FINAL are intended for checks that may involve more than one mode. + +
+ + + Free screen data + + + When a screen is deleted prior to the completion of the ScreenInit + phase the ChipFreeScreen() function is called when defined. + + +
+ + void ChipFreeScreen(int scrnindex, int flags); + +
+ Free any driver-allocated data that may have been allocated up to + and including an unsuccessful ChipScreenInit() + call. This would predominantly be data allocated by + ChipPreInit() that persists across server + generations. It would include the driverPrivate, + and any privates entries that modules may have allocated. + +
+
+ +
+
+ + + Recommended driver functions + + +The functions outlined here are for internal use by the driver only. +They are entirely optional, and are never accessed directly from higher +layers. The sample function declarations shown here are just examples. +The interface (if any) used is up to the driver. + + + + Save + + + Save the video state. This could be called from ChipScreenInit() and + (possibly) ChipEnterVT(). + + +
+ + void ChipSave(ScrnInfoPtr pScrn); + +
+ Saves the current state. This will only be saving pre-server + states or states before returning to the server. There is only + one current saved state per screen and it is stored in private + storage in the screen. + +
+
+
+ + + Restore + + + Restore the original video state. This could be called from the + ChipLeaveVT() and ChipCloseScreen() + functions. + + +
+ + void ChipRestore(ScrnInfoPtr pScrn); + +
+ Restores the saved state from the private storage. Usually only + used for restoring text modes. + +
+
+ +
+ + + Initialise Mode + + + Initialise a video mode. This could be called from the + ChipScreenInit(), ChipSwitchMode() + and ChipEnterVT() functions. + + +
+ + Bool ChipModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode); + +
+ Programs the hardware for the given video mode. + +
+
+ +
+
+ + + Data and Data Structures + + + Command line data + + +Command line options are typically global, and are stored in global +variables. These variables are read-only and are available to drivers +via a function call interface. Most of these command line values are +processed via helper functions to ensure that they are treated consistently +by all drivers. The other means of access is provided for cases where +the supplied helper functions might not be appropriate. + + + +Some of them are: + + + xf86Verbose verbosity level + xf86Bpp -bpp from the command line + xf86Depth -depth from the command line + xf86Weight -weight from the command line + xf86Gamma -{r,g,b,}gamma from the command line + xf86FlipPixels -flippixels from the command line + xf86ProbeOnly -probeonly from the command line + defaultColorVisualClass -cc from the command line + + + + +If we ever do allow for screen-specific command line options, we may +need to rethink this. + + + +These can be accessed in a read-only manner by drivers with the following +functions: + + +
+ + int xf86GetVerbosity(); + +
+ Returns the value of xf86Verbose. +
+ +
+ +
+ + int xf86GetDepth(); + +
+ Returns the command line setting. If not + set on the command line, -1 is returned. +
+ +
+ +
+ + rgb xf86GetWeight(); + +
+ Returns the command line setting. If not + set on the command line, {0, 0, 0} is returned. +
+ +
+ +
+ + Gamma xf86GetGamma(); + +
+ Returns the or , + , command line settings. + If not set on the command line, {0.0, 0.0, 0.0} + is returned. +
+ +
+ +
+ + Bool xf86GetFlipPixels(); + +
+ Returns TRUE if is + present on the command line, and FALSE otherwise. +
+ +
+ +
+ + const char *xf86GetServerName(); + +
+ Returns the name of the X server from the command line. +
+ +
+
+ + + Data handling + + +Config file data contains parts that are global, and parts that are +Screen specific. All of it is parsed into data structures that neither +the drivers or most other parts of the server need to know about. + + + +The global data is typically not required by drivers, and as such, most +of it is stored in the private xf86InfoRec. + + + +The screen-specific data collected from the config file is stored in +screen, device, display, monitor-specific data structures that are separate +from the ScrnInfoRecs, with the appropriate elements/fields +hooked into the ScrnInfoRecs as required. The screen +config data is held in confScreenRec, device data in +the GDevRec, monitor data in the MonRec, +and display data in the DispRec. + + + +The XFree86 common layer's screen specific data (the actual data in use +for each screen) is held in the ScrnInfoRecs. As has +been outlined above, the ScrnInfoRecs are allocated at probe +time, and it is the responsibility of the Drivers' Probe() +and PreInit() functions to finish filling them in based +on both data provided on the command line and data provided from the +Config file. The precedence for this is: + +
+ command line -> config file -> probed/default data +
+
+ + +For most things in this category there are helper functions that the +drivers can use to ensure that the above precedence is consistently +used. + + + +As well as containing screen-specific data that the XFree86 common layer +(including essential parts of the server infrastructure as well as helper +functions) needs to access, it also contains some data that drivers use +internally. When considering whether to add a new field to the +ScrnInfoRec, consider the balance between the convenience +of things that lots of drivers need and the size/obscurity of the +ScrnInfoRec. + + + +Per-screen driver specific data that cannot be accommodated with the +static ScrnInfoRec fields is held in a driver-defined +data structure, a pointer to which is assigned to the +ScrnInfoRec's driverPrivate field. This +is per-screen data that persists across server generations (as does the +bulk of the static ScrnInfoRec data). It would typically +also include the video card's saved state. + + + +Per-screen data for other modules that the driver uses (for example, +the XAA module) that is reset for each server generation is hooked into +the ScrnInfoRec through it's privates +field. + + + +Once it has stabilised, the data structures and variables accessible to +video drivers will be documented here. In the meantime, those things +defined in the xf86.h and xf86str.h +files are visible to video drivers. Things defined in +xf86Priv.h and xf86Privstr.h are NOT +intended to be visible to video drivers, and it is an error for a driver +to include those files. + + +
+ + + Accessing global data + + +Some other global state information that the drivers may access via +functions is as follows: + + +
+ + Bool xf86ServerIsExiting(); + +
+ Returns TRUE if the server is at the end of a + generation and is in the process of exiting, and + FALSE otherwise. +
+ +
+ +
+ + Bool xf86ServerIsResetting(); + +
+ Returns TRUE if the server is at the end of a + generation and is in the process of resetting, and + FALSE otherwise. +
+ +
+ +
+ + Bool xf86ServerIsInitialising(); + +
+ Returns TRUE if the server is at the beginning of + a generation and is in the process of initialising, and + FALSE otherwise. +
+ +
+ +
+ + Bool xf86ServerIsOnlyProbing(); + +
+ Returns TRUE if the -probeonly command line flag + was specified, and FALSE otherwise. +
+ +
+ +
+ + Bool xf86CaughtSignal(); + +
+ Returns TRUE if the server has caught a signal, + and FALSE otherwise. +
+ +
+
+ + + Allocating private data + + +A driver and any module it uses may allocate per-screen private storage +in either the ScreenRec (DIX level) or +ScrnInfoRec (XFree86 common layer level). +ScreenRec storage persists only for a single server +generation, and ScrnInfoRec storage persists across +generations for the lifetime of the server. + + + +The ScreenRec devPrivates data must be +reallocated/initialised at the start of each new generation. This is +normally done from the ChipScreenInit() function, and +Init functions for other modules that it calls. Data allocated in this +way should be freed by the driver's ChipCloseScreen() +functions, and Close functions for other modules that it calls. A new +devPrivates entry is allocated by calling the +AllocateScreenPrivateIndex() function. + + +
+ + int AllocateScreenPrivateIndex(); + +
+ This function allocates a new element in the + devPrivates field of all currently existing + ScreenRecs. The return value is the index of this + new element in the devPrivates array. The + devPrivates field is of type + DevUnion: + + + typedef union _DevUnion { + pointer ptr; + long val; + unsigned long uval; + pointer (*fptr)(void); + } DevUnion; + + + which allows the element to be used for any of the above types. + It is commonly used as a pointer to data that the caller allocates + after the new index has been allocated. + + + + This function will return -1 when there is an + error allocating the new index. + + +
+
+ + +The ScrnInfoRec privates data persists +for the life of the server, so only needs to be allocated once. This +should be done from the ChipPreInit() function, and Init +functions for other modules that it calls. Data allocated in this way +should be freed by the driver's ChipFreeScreen() functions, +and Free functions for other modules that it calls. A new +privates entry is allocated by calling the +xf86AllocateScrnInfoPrivateIndex() function. + + +
+ + int xf86AllocateScrnInfoPrivateIndex(); + +
+ This function allocates a new element in the privates + field of all currently existing ScrnInfoRecs. + The return value is the index of this new element in the + privates array. The privates + field is of type DevUnion: + + + typedef union _DevUnion { + pointer ptr; + long val; + unsigned long uval; + pointer (*fptr)(void); + } DevUnion; + + + which allows the element to be used for any of the above types. + It is commonly used as a pointer to data that the caller allocates + after the new index has been allocated. + + + + This function will not return when there is an error allocating + the new index. When there is an error it will cause the server + to exit with a fatal error. The similar function for allocation + privates in the ScreenRec + (AllocateScreenPrivateIndex()) differs in this + respect by returning -1 when the allocation fails. + + +
+
+
+
+ + + Keeping Track of Bus Resources + + + Theory of Operation + + +The XFree86 common layer has knowledge of generic access control mechanisms +for devices on certain bus systems (currently the PCI bus) as well as +of methods to enable or disable access to the buses itself. Furthermore +it can access information on resources decoded by these devices and if +necessary modify it. + + + +When first starting the Xserver collects all this information, saves it +for restoration, checks it for consistency, and if necessary, corrects +it. Finally it disables all resources on a generic level prior to +calling any driver function. + + + +When the Probe() function of each driver is called the +device sections are matched against the devices found in the system. +The driver may probe devices at this stage that cannot be identified by +using device independent methods. Access to all resources that can be +controlled in a device independent way is disabled. The +Probe() function should register all non-relocatable +resources at this stage. If a resource conflict is found between +exclusive resources the driver will fail immediately. Optionally the +driver might specify an EntityInit(), +EntityLeave() and EntityEnter() function. + + + +EntityInit() can be used to disable any shared resources +that are not controlled by the generic access control functions. It is +called prior to the PreInit phase regardless if an entity is active or +not. When calling the EntityInit(), +EntityEnter() and EntityLeave() functions +the common level will disable access to all other entities on a generic +level. Since the common level has no knowledge of device specific +methods to disable access to resources it cannot be guaranteed that +certain resources are not decoded by any other entity until the +EntityInit() or EntityEnter() phase is +finished. Device drivers should therefore register all those resources +which they are going to disable. If these resources are never to be +used by any driver function they may be flagged ResInit +so that they can be removed from the resource list after processing all +EntityInit() functions. EntityEnter() +should disable decoding of all resources which are not registered as +exclusive and which are not handled by the generic access control in +the common level. The difference to EntityInit() is +that the latter one is only called once during lifetime of the server. +It can therefore be used to set up variables prior to disabling resources. +EntityLeave() should restore the original state when +exiting the server or switching to a different VT. It also needs to +disable device specific access functions if they need to be disabled on +server exit or VT switch. The default state is to enable them before +giving up the VT. + + + +In PreInit() phase each driver should check if any +sharable resources it has registered during Probe() has +been denied and take appropriate action which could simply be to fail. +If it needs to access resources it has disabled during +EntitySetup() it can do so provided it has registered +these and will disable them before returning from +PreInit(). This also applies to all other driver +functions. Several functions are provided to request resource ranges, +register these, correct PCI config space and add replacements for the +generic access functions. Resources may be marked disabled or +unused during OPERATING stage. Although these steps could also be +performed in ScreenInit(), this is not desirable. + + + +Following PreInit() phase the common level determines +if resource access control is needed. This is the case if more than +one screen is used. If necessary the RAC wrapper module is loaded. In +ScreenInit() the drivers can decide which operations +need to be placed under RAC. Available are the frame buffer operations, +the pointer operations and the colormap operations. Any operation that +requires resources which might be disabled during OPERATING state should +be set to use RAC. This can be specified separately for memory and IO +resources. + + + +When ScreenInit() phase is done the common level will +determine which shared resources are requested by more than one driver +and set the access functions accordingly. This is done following these +rules: + + + + The sharable resources registered by each entity are compared. If + a resource is registered by more than one entity the entity will be + marked to need to share this resources type (IO or + MEM). + + + + A resource marked disabled during OPERATING state will be ignored + entirely. + + + + A resource marked unused will only conflicts with an overlapping + resource of an other entity if the second is actually in use during + OPERATING state. + + + + If an unused resource was found to conflict however the entity + does not use any other resource of this type the entire resource type + will be disabled for that entity. + + + + + +The driver has the choice among different ways to control access to +certain resources: + + + + It can rely on the generic access functions. This is probably the + most common case. Here the driver only needs to register any resource + it is going to use. + + + + It can replace the generic access functions by driver specific + ones. This will mostly be used in cases where no generic access + functions are available. In this case the driver has to make sure + these resources are disabled when entering the PreInit() + stage. Since the replacement functions are registered in + PreInit() the driver will have to enable these + resources itself if it needs to access them during this state. The + driver can specify if the replacement functions can control memory + and/or I/O resources separately. + + + + The driver can enable resources itself when it needs them. Each + driver function enabling them needs to disable them before it will + return. This should be used if a resource which can be controlled + in a device dependent way is only required during SETUP state. This + way it can be marked unused during OPERATING state. + + + + + +A resource which is decoded during OPERATING state however never accessed +by the driver should be marked unused. + + + +Since access switching latencies are an issue during Xserver operation, +the common level attempts to minimize the number of entities that need +to be placed under RAC control. When a wrapped operation is called, +the EnableAccess() function is called before control is +passed on. EnableAccess() checks if a screen is under +access control. If not it just establishes bus routing and returns. +If the screen needs to be under access control, +EnableAccess() determines which resource types +(MEM, IO) are required. Then it tests +if this access is already established. If so it simply returns. If +not it disables the currently established access, fixes bus routing and +enables access to all entities registered for this screen. + + + +Whenever a mode switch or a VT-switch is performed the common level will +return to SETUP state. + + + + + Resource Types + + +Resource have certain properties. When registering resources each range +is accompanied by a flag consisting of the ORed flags of the different +properties the resource has. Each resource range may be classified +according to + + + + its physical properties i.e., if it addresses + memory (ResMem) or + I/O space (ResIo), + + + if it addresses a + block (ResBlock) or + sparse (ResSparse) + range, + + + its access properties. + + + + + +There are two known access properties: + + + + ResExclusive + for resources which may not be shared with any other device and + + + ResShared + for resources which can be disabled and therefore can be shared. + + + + + +If it is necessary to test a resource against any type a generic access +type ResAny is provided. If this is set the resource +will conflict with any resource of a different entity intersecting its +range. Further it can be specified that a resource is decoded however +never used during any stage (ResUnused) or during +OPERATING state (ResUnusedOpr). A resource only visible +during the init functions (ie. EntityInit(), +EntityEnter() and EntityLeave() should +be registered with the flag ResInit. A resource that +might conflict with background resource ranges may be flagged with +ResBios. This might be useful when registering resources +ranges that were assigned by the system Bios. + + + +Several predefined resource lists are available for VGA and 8514/A +resources in common/xf86Resources.h. + + + + + Available Functions + + +The functions provided for resource management are listed in their order +of use in the driver. + + + + Probe Phase + + +In this phase each driver detects those resources it is able to drive, +creates an entity record for each of them, registers non-relocatable +resources and allocates screens and adds the resources to screens. + + + +Two helper functions are provided for matching device sections in the +xorg.conf file to the devices: + + +
+ + int xf86MatchPciInstances(const char *driverName, int vendorID, + SymTabPtr chipsets, PciChipsets *PCIchipsets, + GDevPtr *devList, int numDevs, DriverPtr drvp, + int **foundEntities); + +
+ This function finds matches between PCI cards that a driver supports + and config file device sections. It is intended for use in the + ChipProbe() function of drivers for PCI cards. + Only probed PCI devices with a vendor ID matching + vendorID are considered. devList + and numDevs are typically those found from + calling xf86MatchDevice(), and represent the active + config file device sections relevant to the driver. + PCIchipsets is a table that provides a mapping + between the PCI device IDs, the driver's internal chipset tokens + and a list of fixed resources. + + + + When a device section doesn't have a BusID entry it + can only match the primary video device. Secondary devices are + only matched with device sections that have a matching + BusID entry. + + + + Once the preliminary matches have been found, a final match is + confirmed by checking if the chipset override, ChipID override or + probed PCI chipset type match one of those given in the + chipsets and PCIchipsets lists. + The PCIchipsets list includes a list of the PCI + device IDs supported by the driver. The list should be terminated + with an entry with PCI ID -1". The + chipsets list is a table mapping the driver's + internal chipset tokens to names, and should be terminated with + a NULL entry. Only those entries with a + corresponding entry in the PCIchipsets list are + considered. The order of precedence is: config file chipset, + config file ChipID, probed PCI device ID. + + + + In cases where a driver handles PCI chipsets with more than one + vendor ID, it may set vendorID to + 0, and OR each devID in the list with (the + vendor ID << 16). + + + + Entity index numbers for confirmed matches are returned as an + array via foundEntities. The PCI information, + chipset token and device section for each match are found in the + EntityInfoRec referenced by the indices. + + + + The function return value is the number of confirmed matches. A + return value of -1 indicates an internal error. + The returned foundEntities array should be freed + by the driver with xfree() when it is no longer + needed in cases where the return value is greater than zero. + + +
+ +
+ + int xf86MatchIsaInstances(const char *driverName, + SymTabPtr chipsets, IsaChipsets *ISAchipsets, + DriverPtr drvp, FindIsaDevProc FindIsaDevice, + GDevPtr *devList, int numDevs, + int **foundEntities); + +
+ This function finds matches between ISA cards that a driver supports + and config file device sections. It is intended for use in the + ChipProbe() function of drivers for ISA cards. + devList and numDevs are + typically those found from calling xf86MatchDevice(), + and represent the active config file device sections relevant to + the driver. ISAchipsets is a table that provides + a mapping between the driver's internal chipset tokens and the + resource classes. FindIsaDevice is a + driver-provided function that probes the hardware and returns the + chipset token corresponding to what was detected, and + -1 if nothing was detected. + + + + If the config file device section contains a chipset entry, then + it is checked against the chipsets list. When + no chipset entry is present, the FindIsaDevice + function is called instead. + + + + Entity index numbers for confirmed matches are returned as an + array via foundEntities. The chipset token and + device section for each match are found in the + EntityInfoRec referenced by the indices. + + + + The function return value is the number of confirmed matches. A + return value of -1 indicates an internal error. + The returned foundEntities array should be freed + by the driver with xfree() when it is no longer + needed in cases where the return value is greater than zero. + + +
+ + +These two helper functions make use of several core functions that are +available at the driver level: + + +
+ + Bool xf86ParsePciBusString(const char *busID, int *bus, + int *device, int *func); + +
+ Takes a BusID string, and if it is in the correct + format, returns the PCI bus, device, + func values that it indicates. The format of the + string is expected to be "PCI:bus:device:func" where each of bus, + device and func are decimal integers. The ":func" part may + be omitted, and the func value assumed to be zero, but this isn't + encouraged. The "PCI" prefix may also be omitted. The prefix + "AGP" is currently equivalent to the "PCI" prefix. If the string + isn't a valid PCI BusID, the return value is FALSE. + + +
+ +
+ + Bool xf86ComparePciBusString(const char *busID, int bus, + int device, int func); + +
+ Compares a BusID string with PCI bus, + device, func values. If they + match TRUE is returned, and FALSE + if they don't. + + +
+ +
+ + Bool xf86ParseIsaBusString(const char *busID); + +
+ Compares a BusID string with the ISA bus ID string + ("ISA" or "ISA:"). If they match TRUE is returned, + and FALSE if they don't. + + +
+ +
+ + Bool xf86CheckPciSlot(int bus, int device, int func); + +
+ Checks if the PCI slot bus:device:func has been + claimed. If so, it returns FALSE, and otherwise + TRUE. + + +
+ +
+ + int xf86ClaimPciSlot(int bus, int device, int func, DriverPtr drvp, + int chipset, GDevPtr dev, Bool active); + +
+ This function is used to claim a PCI slot, allocate the associated + entity record and initialise their data structures. The return + value is the index of the newly allocated entity record, or + -1 if the claim fails. This function should always + succeed if xf86CheckPciSlot() returned + TRUE for the same PCI slot. + + +
+ +
+ + Bool xf86IsPrimaryPci(void); + +
+ This function returns TRUE if the primary card is + a PCI device, and FALSE otherwise. + + +
+ +
+ + int xf86ClaimIsaSlot(DriverPtr drvp, int chipset, + GDevPtr dev, Bool active); + +
+ This allocates an entity record entity and initialise the data + structures. The return value is the index of the newly allocated + entity record. + + +
+ +
+ + Bool xf86IsPrimaryIsa(void); + +
+ This function returns TRUE if the primary card is + an ISA (non-PCI) device, and FALSE otherwise. + + +
+ + +Two helper functions are provided to aid configuring entities: + + +
+ + ScrnInfoPtr xf86ConfigPciEntity(ScrnInfoPtr pScrn, + int scrnFlag, int entityIndex, + PciChipsets *p_chip, + resList res, EntityProc init, + EntityProc enter, EntityProc leave, + pointer private); + + ScrnInfoPtr xf86ConfigIsaEntity(ScrnInfoPtr pScrn, + int scrnFlag, int entityIndex, + IsaChipsets *i_chip, + resList res, EntityProc init, + EntityProc enter, EntityProc leave, + pointer private); + +
+ These functions are used to register the non-relocatable resources + for an entity, and the optional entity-specific Init, Enter and + Leave functions. Usually the list of fixed resources is obtained + from the Isa/PciChipsets lists. However an additional list of + resources may be passed. Generally this is not required. + For active entities a ScrnInfoRec is allocated + if the pScrn argument is NULL. +The + return value is TRUE when successful. The init, enter, leave + functions are defined as follows: + +
+ + typedef void (*EntityProc)(int entityIndex, + pointer private); + +
+ + They are passed the entity index and a pointer to a private scratch + area. This can be set up during Probe() and + its address can be passed to + xf86ConfigIsaEntity() and + xf86ConfigPciEntity() as the last argument. +
+ +
+ + +These two helper functions make use of several core functions that are +available at the driver level: + +
+ + void xf86ClaimFixedResources(resList list, int entityIndex); + +
+ This function registers the non-relocatable resources which cannot + be disabled and which therefore would cause the server to fail + immediately if they were found to conflict. It also records + non-relocatable but sharable resources for processing after the + Probe() phase. + + +
+ +
+ + Bool xf86SetEntityFuncs(int entityIndex, EntityProc init, + EntityProc enter, EntityProc leave, pointer); + +
+ This function registers with an entity the init, + enter, leave functions along + with the pointer to their private area. + + +
+ +
+ + void xf86AddEntityToScreen(ScrnInfoPtr pScrn, int entityIndex); + +
+ This function associates the entity referenced by + entityIndex with the screen. + + +
+
+
+ + + PreInit Phase + + +During this phase the remaining resources should be registered. +PreInit() should call xf86GetEntityInfo() +to obtain a pointer to an EntityInfoRec for each entity +it is able to drive and check if any resource are listed in its +resources field. If resources registered in the Probe +phase have been rejected in the post-Probe phase +(resources is non-NULL), then the driver should +decide if it can continue without using these or if it should fail. + + +
+ + EntityInfoPtr xf86GetEntityInfo(int entityIndex); + +
+ This function returns a pointer to the EntityInfoRec + referenced by entityIndex. The returned + EntityInfoRec should be freed with + xfree() when no longer needed. + + +
+ + +Several functions are provided to simplify resource registration: +
+ + Bool xf86IsEntityPrimary(int entityIndex); + +
+ This function returns TRUE if the entity referenced + by entityIndex is the primary display device (i.e., + the one initialised at boot time and used in text mode). + + +
+ +
+ + Bool xf86IsScreenPrimary(int scrnIndex); + +
+ This function returns TRUE if the primary entity + is registered with the screen referenced by + scrnIndex. + + +
+ +
+ + pciVideoPtr xf86GetPciInfoForEntity(int entityIndex); + +
+ This function returns a pointer to the pciVideoRec + for the specified entity. If the entity is not a PCI device, + NULL is returned. + + +
+
+ + +The primary function for registration of resources is: +
+ + resPtr xf86RegisterResources(int entityIndex, resList list, + int access); + +
+ This function tries to register the resources in + list. If list is NULL it tries + to determine the resources automatically. This only works for + entities that provide a generic way to read out the resource ranges + they decode. So far this is only the case for PCI devices. By + default the PCI resources are registered as shared + (ResShared) if the driver wants to set a different + access type it can do so by specifying the access flags in the + third argument. A value of 0 means to use the + default settings. If for any reason the resource broker is not + able to register some of the requested resources the function will + return a pointer to a list of the failed ones. In this case the + driver may be able to move the resource to different locations. + In case of PCI bus entities this is done by passing the list of + failed resources to xf86ReallocatePciResources(). + When the registration succeeds, the return value is + NULL. + + +
+
+ +
+ + resPtr xf86ReallocatePciResources(int entityIndex, resPtr pRes); + +
+ This function takes a list of PCI resources that need to be + reallocated and returns NULL when all relocations are + successful. + xf86RegisterResources() should be called again to + register the relocated resources with the broker. + If the reallocation fails, a list of the resources that could not be + relocated is returned. + + +
+ + +Two functions are provided to obtain a resource range of a given type: +
+ + resRange xf86GetBlock(long type, memType size, + memType window_start, memType window_end, + memType align_mask, resPtr avoid); + +
+ This function tries to find a block range of size + size and type type in a window + bound by window_start and window_end + with the alignment specified in align_mask. + Optionally a list of resource ranges which should be avoided within + the window can be supplied. On failure a zero-length range of + type ResEnd will be returned. + +
+ +
+ + resRange xf86GetSparse(long type, memType fixed_bits, + memType decode_mask, memType address_mask, + resPtr avoid); + +
+ This function is like the previous one, but attempts to find a + sparse range instead of a block range. Here three values have to + be specified: the address_mask which marks all + bits of the mask part of the address, the decode_mask + which masks out the bits which are hardcoded and are therefore + not available for relocation and the values of the fixed bits. + The function tries to find a base that satisfies the given condition. + If the function fails it will return a zero range of type + ResEnd. Optionally it might be passed a list of + resource ranges to avoid. + + +
+
+ + +Some PCI devices are broken in the sense that they return invalid size +information for a certain resource. In this case the driver can supply +the correct size and make sure that the resource range allocated for +the card is large enough to hold the address range decoded by the card. +The function xf86FixPciResource() can be used to do this: +
+ + Bool xf86FixPciResource(int entityIndex, unsigned int prt, + CARD32 alignment, long type); + +
+ This function fixes a PCI resource allocation. The + prt parameter contains the number of the PCI base + register that needs to be fixed (0-5, and + 6 for the BIOS base register). The size is + specified by the alignment. Since PCI resources need to span an + integral range of size 2ˆn, the alignm ent also + specifies the number of addresses that will be decoded. If the + driver specifies a type mask it can override the default type for + PCI resources which is ResShared. The resource + broker needs to know that to find a matching resource range. This + function should be called before calling + xf86RegisterResources(). The return value is + TRUE when the function succeeds. + + +
+ +
+ + Bool xf86CheckPciMemBase(pciVideoPtr pPci, memType base); + +
+ This function checks that the memory base address specified matches + one of the PCI base address register values for the given PCI + device. This is mostly used to check that an externally provided + base address (e.g., from a config file) matches an actual value + allocated to a device. + + +
+
+ + +The driver may replace the generic access control functions for an entity. +This is done with the xf86SetAccessFuncs(): +
+ + void xf86SetAccessFuncs(EntityInfoPtr pEnt, + xf86SetAccessFuncPtr funcs, + xf86SetAccessFuncPtr oldFuncs); + + with: + + typedef struct { + xf86AccessPtr mem; + xf86AccessPtr io; + xf86AccessPtr io_mem; + } xf86SetAccessFuncRec, *xf86SetAccessFuncPtr; + +
+ The driver can pass three functions: one for I/O access, one for + memory access and one for combined memory and I/O access. If the + memory access and combined access functions are identical the + common level assumes that the memory access cannot be controlled + independently of I/O access, if the I/O access function and the + combined access functions are the same it is assumed that I/O can + not be controlled independently. If memory and I/O have to be + controlled together all three values should be the same. If a + non NULL value is passed as third argument it is + interpreted as an address where to store the old access record. + If the third argument is NULL it will be assumed + that the generic access should be enabled before replacing the + access functions. Otherwise it will be disabled. The driver may + enable them itself using the returned values. It should do this + from its replacement access functions as the generic access may + be disabled by the common level on certain occasions. If replacement + functions are specified they must control all resources of the + specific type registered for the entity. + + +
+
+ + +To find out if a specific resource range conflicts with another +resource the xf86ChkConflict() function may be used: +
+ + memType xf86ChkConflict(resRange *rgp, int entityIndex); + +
+ This function checks if the resource range rgp of + for the specified entity conflicts with with another resource. + If a conflict is found, the address of the start of the conflict + is returned. The return value is zero when there is no conflict. + + +
+
+ + +The OPERATING state properties of previously registered fixed resources +can be set with the xf86SetOperatingState() function: +
+ + resPtr xf86SetOperatingState(resList list, int entityIndex, + int mask); + +
+ This function is used to set the status of a resource during + OPERATING state. list holds a list to which + mask is to be applied. The parameter + mask may have the value ResUnusedOpr + and ResDisableOpr. The first one should be used + if a resource isn't used by the driver during OPERATING state + although it is decoded by the device, while the latter one indicates + that the resource is not decoded during OPERATING state. Note + that the resource ranges have to match those specified during + registration. If a range has been specified starting at + A and ending at B and suppose + C us a value satisfying + A < C < B one may not + specify the resource range (A,B) by splitting it + into two ranges (A,C) and (C,B). + + +
+
+ + +The following two functions are provided for special cases: +
+ + void xf86RemoveEntityFromScreen(ScrnInfoPtr pScrn, int entityIndex); + +
+ This function may be used to remove an entity from a screen. This + only makes sense if a screen has more than one entity assigned or + the screen is to be deleted. No test is made if the screen has + any entities left. + + +
+ +
+ + void xf86DeallocateResourcesForEntity(int entityIndex, long type); + +
+ This function deallocates all resources of a given type registered + for a certain entity from the resource broker list. + + +
+
+ +
+ + + ScreenInit Phase + + +All that is required in this phase is to setup the RAC flags. Note that +it is also permissible to set these flags up in the PreInit phase. The +RAC flags are held in the racIoFlags and racMemFlags fields of the +ScrnInfoRec for each screen. They specify which graphics operations +might require the use of shared resources. This can be specified +separately for memory and I/O resources. The available flags are defined +in rac/xf86RAC.h. They are: + + + RAC_FB + + for framebuffer operations (including hw acceleration) + + RAC_CURSOR + + for Cursor operations + (??? I'm not sure if we need this for SW cursor it depends + on which level the sw cursor is drawn) + + RAC_COLORMAP + + for colormap operations + + RAC_VIEWPORT + + for the call to ChipAdjustFrame() + + + + +The flags are ORed together. + + +
+
+ + + Config file <quote>Option</quote> entries + + +Option entries are permitted in most sections and subsections of the +config file. There are two forms of option entries: + + + Option "option-name" + + A boolean option. + + Option "option-name" "option-value" + + An option with an arbitrary value. + + + + + +The option entries are handled by the parser, and a list of the parsed +options is included with each of the appropriate data structures that +the drivers have access to. The data structures used to hold the option +information are opaque to the driver, and a driver must not access the +option data directly. Instead, the common layer provides a set of +functions that may be used to access, check and manipulate the option +data. + + + +First, the low level option handling functions. In most cases drivers +would not need to use these directly. + + +
+ + pointer xf86FindOption(pointer options, const char *name); + +
+ Takes a list of options and an option name, and returns a handle + for the first option entry in the list matching the name. Returns + NULL if no match is found. + + +
+ +
+ + char *xf86FindOptionValue(pointer options, const char *name); + +
+ Takes a list of options and an option name, and returns the value + associated with the first option entry in the list matching the + name. If the matching option has no value, an empty string + ("") is returned. Returns NULL + if no match is found. + + +
+ +
+ + void xf86MarkOptionUsed(pointer option); + +
+ Takes a handle for an option, and marks that option as used. + + +
+ +
+ + void xf86MarkOptionUsedByName(pointer options, const char *name); + +
+ Takes a list of options and an option name and marks the first + option entry in the list matching the name as used. + + +
+ + +Next, the higher level functions that most drivers would use. + +
+ + void xf86CollectOptions(ScrnInfoPtr pScrn, pointer extraOpts); + +
+ Collect the options from each of the config file sections used by + the screen (pScrn) and return the merged list as + pScrn->options. This function requires that + pScrn->confScreen, pScrn->display, + pScrn->monitor, + pScrn->numEntities, and + pScrn->entityList are initialised. + extraOpts may optionally be set to an additional + list of options to be combined with the others. The order of + precedence for options is extraOpts, display, + confScreen, monitor, device. + + +
+ +
+ + void xf86ProcessOptions(int scrnIndex, pointer options, + OptionInfoPtr optinfo); + +
+ Processes a list of options according to the information in the + array of OptionInfoRecs (optinfo). + The resulting information is stored in the value + fields of the appropriate optinfo entries. The + found fields are set to TRUE + when an option with a value of the correct type if found, and + FALSE otherwise. The type field + is used to determine the expected value type for each option. + Each option in the list of options for which there is a name match + (but not necessarily a value type match) is marked as used. + Warning messages are printed when option values don't match the + types specified in the optinfo data. + + + + NOTE: If this function is called before a driver's screen number + is known (e.g., from the ChipProbe() function) a + scrnIndex value of -1 should be + used. + + + + NOTE 2: Given that this function stores into the + OptionInfoRecs pointed to by optinfo, + the caller should ensure the OptionInfoRecs are + (re-)initialised before the call, especially if the caller expects + to use the predefined option values as defaults. + + + + The OptionInfoRec is defined as follows: + + + typedef struct { + double freq; + int units; + } OptFrequency; + + typedef union { + unsigned long num; + char * str; + double realnum; + Bool bool; + OptFrequency freq; + } ValueUnion; + + typedef enum { + OPTV_NONE = 0, + OPTV_INTEGER, + OPTV_STRING, /* a non-empty string */ + OPTV_ANYSTR, /* Any string, including an empty one */ + OPTV_REAL, + OPTV_BOOLEAN, + OPTV_PERCENT, + OPTV_FREQ + } OptionValueType; + + typedef enum { + OPTUNITS_HZ = 1, + OPTUNITS_KHZ, + OPTUNITS_MHZ + } OptFreqUnits; + + typedef struct { + int token; + const char* name; + OptionValueType type; + ValueUnion value; + Bool found; + } OptionInfoRec, *OptionInfoPtr; + + + + OPTV_FREQ can be used for options values that are + frequencies. These values are a floating point number with an + optional unit name appended. The unit name can be one of "Hz", + "kHz", "k", "MHz", "M". The multiplier associated with the unit + is stored in freq.units, and the scaled frequency + is stored in freq.freq. When no unit is specified, + freq.units is set to 0, and + freq.freq is unscaled. + + + + OPTV_PERCENT can be used for option values that are + specified in percent (e.g. "20%"). These values are a floating point + number with a percent sign appended. If the percent sign is missing, + the parser will fail to match the value. + + + + Typical usage is to setup an array of + OptionInfoRecs with all fields initialised. + The value and found fields get + set by xf86ProcessOptions(). For cases where the + value parsing is more complex, the driver should specify + OPTV_STRING, and parse the string itself. An + example of using this option handling is included in the + Sample Driver section. + + +
+ +
+ + void xf86ShowUnusedOptions(int scrnIndex, pointer options); + +
+ Prints out warning messages for each option in the list of options + that isn't marked as used. This is intended to show options that + the driver hasn't recognised. It would normally be called near + the end of the ChipScreenInit() function, but only + when serverGeneration == 1 + +
+ +
+ + OptionInfoPtr xf86TokenToOptinfo(const OptionInfoRec *table, + int token); + +
+ Returns a pointer to the OptionInfoRec in + table with a token field matching + token. Returns NULL if no match + is found. + + +
+ +
+ + Bool xf86IsOptionSet(const OptionInfoRec *table, int token); + +
+ Returns the found field of the + OptionInfoRec in table with a + token field matching token. This + can be used for options of all types. Note that for options of + type OPTV_BOOLEAN, it isn't sufficient to check + this to determine the value of the option. Returns + FALSE if no match is found. + + +
+ +
+ + char *xf86GetOptValString(const OptionInfoRec *table, int token); + +
+ Returns the value.str field of the + OptionInfoRec in table with a + token field matching token. Returns + NULL if no match is found. + + +
+ +
+ + Bool xf86GetOptValInteger(const OptionInfoRec *table, int token, + + int *value); + +
+ Returns via *value the value.num + field of the OptionInfoRec in table + with a token field matching token. + *value is only changed when a match is found so + it can be safely initialised with a default prior to calling this + function. The function return value is as for + xf86IsOptionSet(). + + +
+ +
+ + Bool xf86GetOptValULong(const OptionInfoRec *table, int token, + unsigned long *value); + +
+ Like xf86GetOptValInteger(), except the value is + treated as an unsigned long. + + +
+ +
+ + Bool xf86GetOptValReal(const OptionInfoRec *table, int token, + double *value); + +
+ Like xf86GetOptValInteger(), except that + value.realnum is used. + + +
+ +
+ + Bool xf86GetOptValFreq(const OptionInfoRec *table, int token, + OptFreqUnits expectedUnits, double *value); + +
+ Like xf86GetOptValInteger(), except that the + value.freq data is returned. The frequency value + is scaled to the units indicated by expectedUnits. + The scaling is exact when the units were specified explicitly in + the option's value. Otherwise, the expectedUnits + field is used as a hint when doing the scaling. In this case, + values larger than 1000 are assumed to have be + specified in the next smallest units. For example, if the Option + value is "10000" and expectedUnits is OPTUNITS_MHZ, + the value returned is 10. + + +
+ +
+ + Bool xf86GetOptValBool(const OptionInfoRec *table, int token, Bool *value); + +
+ This function is used to check boolean options + (OPTV_BOOLEAN). If the function return value is + FALSE, it means the option wasn't set. Otherwise + *value is set to the boolean value indicated by + the option's value. No option value is interpreted + as TRUE. Option values meaning TRUE + are "1", "yes", "on", "true", and option values meaning + FALSE are "0", "no", "off", "false". Option names + both with the "no" prefix in their names, and with that prefix + removed are also checked and handled in the obvious way. + *value is not changed when the option isn't present. + It should normally be set to a default value before calling this + function. + + +
+ +
+ + Bool xf86ReturnOptValBool(const OptionInfoRec *table, int token, Bool def); + +
+ This function is used to check boolean options + (OPTV_BOOLEAN). If the option is set, its value + is returned. If the options is not set, the default value specified + by def is returned. The option interpretation is + the same as for xf86GetOptValBool(). + + +
+ +
+ + int xf86NameCmp(const char *s1, const char *s2); + +
+ This function should be used when comparing strings from the config + file with expected values. It works like strcmp(), + but is not case sensitive and space, tab, and _ characters + are ignored in the comparison. The use of this function isn't + restricted to parsing option values. It may be used anywhere + where this functionality required. + + +
+
+ + + Modules, Drivers, Include Files and Interface Issues + + +NOTE: this section is incomplete. + + + + + Include files + + +The following include files are typically required by video drivers: + +
+ All drivers should include these: + + "xf86.h" + "xf86_OSproc.h" + "xf86_ansic.h" + "xf86Resources.h" + + Wherever inb/outb (and related things) are used the following should be + included: + + "compiler.h" + + Note: in drivers, this must be included after "xf86_ansic.h". + + + + Drivers that need to access PCI vendor/device definitions need this: + + "xf86PciInfo.h" + + + + + Drivers that need to access the PCI config space need this: + + "xf86Pci.h" + + + + + Drivers that initialise a SW cursor need this: + + "mipointer.h" + + + + + All drivers implementing backing store need this: + + "mibstore.h" + + + + + All drivers using the mi colourmap code need this: + + "micmap.h" + + + + + If a driver uses the vgahw module, it needs this: + + "vgaHW.h" + + + + + Drivers supporting VGA or Hercules monochrome screens need: + + "xf1bpp.h" + + + + + Drivers supporting VGA or EGC 16-colour screens need: + + "xf4bpp.h" + + + + + Drivers using cfb need: + + #define PSZ 8 + #include "cfb.h" + #undef PSZ + + + + + Drivers supporting bpp 16, 24 or 32 with cfb need one or more of: + + "cfb16.h" + "cfb24.h" + "cfb32.h" + + + + + If a driver uses XAA, it needs these: + + "xaa.h" + "xaalocal.h" + + + + + If a driver uses the fb manager, it needs this: + + "xf86fbman.h" + + +
+
+ + +Non-driver modules should include "xf86_ansic.h" to get the correct +wrapping of ANSI C/libc functions. + + + +All modules must NOT include any system include files, or the following: + + + "xf86Priv.h" + "xf86Privstr.h" + "xf86_OSlib.h" + "Xos.h" + + + + +In addition, "xf86_libc.h" must not be included explicitly. It is +included implicitly by "xf86_ansic.h". + + +
+
+ + + Offscreen Memory Manager + + +Management of offscreen video memory may be handled by the XFree86 +framebuffer manager. Once the offscreen memory manager is running, +drivers or extensions may allocate, free or resize areas of offscreen +video memory using the following functions (definitions taken from +xf86fbman.h): + + + typedef struct _FBArea { + ScreenPtr pScreen; + BoxRec box; + int granularity; + void (*MoveAreaCallback)(struct _FBArea*, struct _FBArea*) + void (*RemoveAreaCallback)(struct _FBArea*) + DevUnion devPrivate; + } FBArea, *FBAreaPtr; + + typedef void (*MoveAreaCallbackProcPtr)(FBAreaPtr from, FBAreaPtr to) + typedef void (*RemoveAreaCallbackProcPtr)(FBAreaPtr) + + FBAreaPtr xf86AllocateOffscreenArea ( + ScreenPtr pScreen, + int width, int height, + int granularity, + MoveAreaCallbackProcPtr MoveAreaCallback, + RemoveAreaCallbackProcPtr RemoveAreaCallback, + pointer privData + ) + + void xf86FreeOffscreenArea (FBAreaPtr area) + + Bool xf86ResizeOffscreenArea ( + FBAreaPtr area + int w, int h + ) + + + + +The function: + + Bool xf86FBManagerRunning(ScreenPtr pScreen); + + +can be used by an extension to check if the driver has initialized +the memory manager. The manager is not available if this returns +FALSE and the functions above will all fail. + + + + +xf86AllocateOffscreenArea() can be used to request a +rectangle of dimensions width × height +(in pixels) from unused offscreen memory. granularity +specifies that the leftmost edge of the rectangle must lie on some +multiple of granularity pixels. A granularity of zero +means the same thing as a granularity of one - no alignment preference. +A MoveAreaCallback can be provided to notify the requester +when the offscreen area is moved. If no MoveAreaCallback +is supplied then the area is considered to be immovable. The +privData field will be stored in the manager's internal +structure for that allocated area and will be returned to the requester +in the FBArea passed via the +MoveAreaCallback. An optional +RemoveAreaCallback is provided. If the driver provides +this it indicates that the area should be allocated with a lower priority. +Such an area may be removed when a higher priority request (one that +doesn't have a RemoveAreaCallback) is made. When this +function is called, the driver will have an opportunity to do whatever +cleanup it needs to do to deal with the loss of the area, but it must +finish its cleanup before the function exits since the offscreen memory +manager will free the area immediately after. + + + +xf86AllocateOffscreenArea() returns NULL +if it was unable to allocate the requested area. When no longer needed, +areas should be freed with xf86FreeOffscreenArea(). + + + +xf86ResizeOffscreenArea() resizes an existing +FBArea. xf86ResizeOffscreenArea() +returns TRUE if the resize was successful. If +xf86ResizeOffscreenArea() returns FALSE, +the original FBArea is left unmodified. Resizing an +area maintains the area's original granularity, +devPrivate, and MoveAreaCallback. +xf86ResizeOffscreenArea() has considerably less overhead +than freeing the old area then reallocating the new size, so it should +be used whenever possible. + + + +The function: + + Bool xf86QueryLargestOffscreenArea( + ScreenPtr pScreen, + int *width, int *height, + int granularity, + int preferences, + int priority + ); + + +is provided to query the width and height of the largest single +FBArea allocatable given a particular priority. +preferences can be one of the following to indicate +whether width, height or area should be considered when determining +which is the largest single FBArea available. + + + FAVOR_AREA_THEN_WIDTH + FAVOR_AREA_THEN_HEIGHT + FAVOR_WIDTH_THEN_AREA + FAVOR_HEIGHT_THEN_AREA + + + + +priority is one of the following: + +
+ + PRIORITY_LOW +
+ Return the largest block available without stealing anyone else's + space. This corresponds to the priority of allocating a + FBArea when a RemoveAreaCallback + is provided. +
+
+ + + PRIORITY_NORMAL +
+ Return the largest block available if it is acceptable to steal a + lower priority area from someone. This corresponds to the priority + of allocating a FBArea without providing a + RemoveAreaCallback. +
+
+ + + PRIORITY_EXTREME +
+ Return the largest block available if all FBAreas + that aren't locked down were expunged from memory first. This + corresponds to any allocation made directly after a call to + xf86PurgeUnlockedOffscreenAreas(). +
+
+ +
+
+ + + +The function: + + + Bool xf86PurgeUnlockedOffscreenAreas(ScreenPtr pScreen); + + +is provided as an extreme method to free up offscreen memory. This +will remove all removable FBArea allocations. + + + + +Initialization of the XFree86 framebuffer manager is done via + + + Bool xf86InitFBManager(ScreenPtr pScreen, BoxPtr FullBox); + + +FullBox represents the area of the framebuffer that the +manager is allowed to manage. This is typically a box with a width of +pScrn->displayWidth and a height of as many lines as +can be fit within the total video memory, however, the driver can reserve +areas at the extremities by passing a smaller area to the manager. + + + +xf86InitFBManager() must be called before XAA is +initialized since XAA uses the manager for it's pixmap cache. + + + +An alternative function is provided to allow the driver to initialize +the framebuffer manager with a Region rather than a box. + + + Bool xf86InitFBManagerRegion(ScreenPtr pScreen, + RegionPtr FullRegion); + + +xf86InitFBManagerRegion(), unlike +xf86InitFBManager(), does not remove the area used for +the visible screen so that area should not be included in the region +passed to the function. xf86InitFBManagerRegion() is +useful when non-contiguous areas are available to be managed, and is +required when multiple framebuffers are stored in video memory (as in +the case where an overlay of a different depth is stored as a second +framebuffer in offscreen memory). + + +
+ + + Colormap Handling + + +A generic colormap handling layer is provided within the XFree86 common +layer. This layer takes care of most of the details, and only requires +a function from the driver that loads the hardware palette when required. +To use the colormap layer, a driver calls the +xf86HandleColormaps() function. + +
+ + Bool xf86HandleColormaps(ScreenPtr pScreen, int maxColors, + int sigRGBbits, LoadPaletteFuncPtr loadPalette, + SetOverscanFuncPtr setOverscan, + unsigned int flags); + +
+ This function must be called after the default colormap has been + initialised. The pScrn->gamma field must also + be initialised, preferably by calling xf86SetGamma(). + maxColors is the number of entries in the palette. + sigRGBbits is the size in bits of each color + component in the DAC's palette. loadPalette + is a driver-provided function for loading a colormap into the + hardware, and is described below. setOverscan is + an optional function that may be provided when the overscan color + is an index from the standard LUT and when it needs to be adjusted + to keep it as close to black as possible. The + setOverscan function programs the overscan index. + It shouldn't normally be used for depths other than 8. + setOverscan should be set to NULL + when it isn't needed. flags may be set to the + following (which may be ORed together): + + + + CMAP_PALETTED_TRUECOLOR + + the TrueColor visual is paletted and is + just a special case of DirectColor. + This flag is only valid for + bpp > 8. + + + + CMAP_RELOAD_ON_MODE_SWITCH + + reload the colormap automatically + after mode switches. This is useful + for when the driver is resetting the + hardware during mode switches and + corrupting or erasing the hardware + palette. + + + + CMAP_LOAD_EVEN_IF_OFFSCREEN + + reload the colormap even if the screen + is switched out of the server's VC. + The palette is not reloaded when + the screen is switched back in, nor after + mode switches. This is useful when the + driver needs to keep track of palette + changes. + + + + + + + The colormap layer normally reloads the palette after VT enters so it + is not necessary for the driver to save and restore the palette + when switching VTs. The driver must, however, still save the + initial palette during server start up and restore it during + server exit. + + +
+ +
+ + void LoadPalette(ScrnInfoPtr pScrn, int numColors, int *indices, + LOCO *colors, VisualPtr pVisual); + +
+ LoadPalette() is a driver-provided function for + loading a colormap into hardware. colors is the + array of RGB values that represent the full colormap. + indices is a list of index values into the colors + array. These indices indicate the entries that need to be updated. + numColors is the number of the indices to be + updated. + + +
+ +
+ + void SetOverscan(ScrnInfoPtr pScrn, int overscan); + +
+ SetOverscan() is a driver-provided function for + programming the overscan index. As described + above, it is normally only appropriate for LUT modes where all + colormap entries are available for the display, but where one of + them is also used for the overscan (typically 8bpp for VGA compatible + LUTs). It isn't required in cases where the overscan area is + never visible. + + +
+
+ +
+ + + DPMS Extension + + +Support code for the DPMS extension is included in the XFree86 common layer. +This code provides an interface between the main extension code, and a means +for drivers to initialise DPMS when they support it. One function is +available to drivers to do this initialisation, and it is always available, +even when the DPMS extension is not supported by the core server (in +which case it returns a failure result). + + +
+ + Bool xf86DPMSInit(ScreenPtr pScreen, DPMSSetProcPtr set, int flags); + +
+ This function registers a driver's DPMS level programming function + set. It also checks + pScrn->options for the "dpms" option, and when + present marks DPMS as being enabled for that screen. The + set function is called whenever the DPMS level + changes, and is used to program the requested level. + flags is currently not used, and should be + 0. If the initialisation fails for any reason, + including when there is no DPMS support in the core server, the + function returns FALSE. + + +
+ + + +Drivers that implement DPMS support must provide the following function, +that gets called when the DPMS level is changed: + + +
+ + void ChipDPMSSet(ScrnInfoPtr pScrn, int level, int flags); + +
+ Program the DPMS level specified by level. Valid + values of level are DPMSModeOn, + DPMSModeStandby, DPMSModeSuspend, + DPMSModeOff. These values are defined in + "extensions/dpms.h". + + +
+
+ +
+ + + DGA Extension + + +Drivers can support the XFree86 Direct Graphics Architecture (DGA) by +filling out a structure of function pointers and a list of modes and +passing them to DGAInit. + + +
+ + Bool DGAInit(ScreenPtr pScreen, DGAFunctionPtr funcs, + DGAModePtr modes, int num); + +/** The DGAModeRec **/ + +typedef struct { + int num; + DisplayModePtr mode; + int flags; + int imageWidth; + int imageHeight; + int pixmapWidth; + int pixmapHeight; + int bytesPerScanline; + int byteOrder; + int depth; + int bitsPerPixel; + unsigned long red_mask; + unsigned long green_mask; + unsigned long blue_mask; + int viewportWidth; + int viewportHeight; + int xViewportStep; + int yViewportStep; + int maxViewportX; + int maxViewportY; + int viewportFlags; + int offset; + unsigned char *address; + int reserved1; + int reserved2; +} DGAModeRec, *DGAModePtr; + + + + + num + + Can be ignored. The DGA DDX will assign these numbers. + + + + mode + + A pointer to the DisplayModeRec for this mode. + + + + flags + + The following flags are defined and may be OR'd together: + + + + DGA_CONCURRENT_ACCESS + + Indicates that the driver supports concurrent graphics + accelerator and linear framebuffer access. + + + + + DGA_FILL_RECT + DGA_BLIT_RECT + DGA_BLIT_RECT_TRANS + + Indicates that the driver supports the FillRect, BlitRect + or BlitTransRect functions in this mode. + + + + + DGA_PIXMAP_AVAILABLE + + Indicates that Xlib may be used on the framebuffer. + This flag will usually be set unless the driver wishes + to prohibit this for some reason. + + + + + DGA_INTERLACED + DGA_DOUBLESCAN + + Indicates that these are interlaced or double scan modes. + + + + + + + imageWidth + imageHeight + + These are the dimensions of the linear framebuffer + accessible by the client. + + + + + pixmapWidth + pixmapHeight + + These are the dimensions of the area of the + framebuffer accessible by the graphics accelerator. + + + + + bytesPerScanline + + Pitch of the framebuffer in bytes. + + + + + byteOrder + + Usually the same as + pScrn->imageByteOrder. + + + + + depth + + The depth of the framebuffer in this mode. + + + + + bitsPerPixel + + The number of bits per pixel in this mode. + + + + + red_mask + green_mask + blue_mask + + The RGB masks for this mode, if applicable. + + + + + viewportWidth + viewportHeight + + Dimensions of the visible part of the framebuffer. + Usually mode->HDisplay and + mode->VDisplay. + + + + + xViewportStep + yViewportStep + + The granularity of x and y viewport positions that + the driver supports in this mode. + + + + + maxViewportX + maxViewportY + + The maximum viewport position supported by the + driver in this mode. + + + + viewportFlags + + The following may be OR'd together: + + + + DGA_FLIP_IMMEDIATE + + The driver supports immediate viewport changes. + + + + DGA_FLIP_RETRACE + + + The driver supports viewport changes at retrace. + + + + + + offset + + The offset into the linear framebuffer that corresponds to + pixel (0,0) for this mode. + + + + address + + The virtual address of the framebuffer as mapped by the driver. + This is needed when DGA_PIXMAP_AVAILABLE is set. + + + + + +/** The DGAFunctionRec **/ + +typedef struct { + Bool (*OpenFramebuffer)( + ScrnInfoPtr pScrn, + char **name, + unsigned char **mem, + int *size, + int *offset, + int *extra + ); + void (*CloseFramebuffer)(ScrnInfoPtr pScrn); + Bool (*SetMode)(ScrnInfoPtr pScrn, DGAModePtr pMode); + void (*SetViewport)(ScrnInfoPtr pScrn, int x, int y, int flags); + int (*GetViewport)(ScrnInfoPtr pScrn); + void (*Sync)(ScrnInfoPtr); + void (*FillRect)( + ScrnInfoPtr pScrn, + int x, int y, int w, int h, + unsigned long color + ); + void (*BlitRect)( + ScrnInfoPtr pScrn, + int srcx, int srcy, + int w, int h, + int dstx, int dsty + ); + void (*BlitTransRect)( + ScrnInfoPtr pScrn, + int srcx, int srcy, + int w, int h, + int dstx, int dsty, + unsigned long color + ); +} DGAFunctionRec, *DGAFunctionPtr; + + + +
+ + Bool OpenFramebuffer (pScrn, name, mem, size, offset, extra); + +
+ OpenFramebuffer() should pass the client everything + it needs to know to be able to open the framebuffer. These + parameters are OS specific and their meanings are to be interpreted + by an OS specific client library. + + + + name + + The name of the device to open or NULL if + there is no special device to open. A NULL + name tells the client that it should open whatever device + one would usually open to access physical memory. + + + + mem + + The physical address of the start of the framebuffer. + + + + size + + The size of the framebuffer in bytes. + + + + offset + + Any offset into the device, if applicable. + + + + flags + + Any additional information that the client may need. + Currently, only the DGA_NEED_ROOT flag is + defined. + + + +
+
+ +
+ + void CloseFramebuffer (pScrn); + +
+ CloseFramebuffer() merely informs the driver (if it + even cares) that client no longer needs to access the framebuffer + directly. This function is optional. + + +
+ +
+ + Bool SetMode (pScrn, pMode); + +
+ SetMode() tells the driver to initialize the mode + passed to it. If pMode is NULL, + then the driver should restore the original pre-DGA mode. + + +
+ +
+ + void SetViewport (pScrn, x, y, flags); + +
+ SetViewport() tells the driver to make the upper + left-hand corner of the visible screen correspond to coordinate + (x,y) on the framebuffer. flags + currently defined are: + + + + DGA_FLIP_IMMEDIATE + + The viewport change should occur immediately. + + + + DGA_FLIP_RETRACE + + The viewport change should occur at the + vertical retrace, but this function should + return sooner if possible. + + + + + + The (x,y) locations will be passed as the client + specified them, however, the driver is expected to round these + locations down to the next supported location as specified by the + xViewportStep and yViewportStep + for the current mode. + +
+ +
+ + int GetViewport (pScrn); + +
+ GetViewport() gets the current page flip status. + Set bits in the returned int correspond to viewport change requests + still pending. For instance, set bit zero if the last SetViewport + request is still pending, bit one if the one before that is still + pending, etc. + + +
+ +
+ + void Sync (pScrn); + +
+ This function should ensure that any graphics accelerator operations + have finished. This function should not return until the graphics + accelerator is idle. + + +
+ +
+ + void FillRect (pScrn, x, y, w, h, color); + +
+ This optional function should fill a rectangle + w × h located at + (x,y) in the given color. + + +
+ +
+ + void BlitRect (pScrn, srcx, srcy, w, h, dstx, dsty); + +
+ This optional function should copy an area + w × h located at + (srcx,srcy) to location (dstx,dsty). + This function will need to handle copy directions as appropriate. + + +
+ +
+ + void BlitTransRect (pScrn, srcx, srcy, w, h, dstx, dsty, color); + +
+ This optional function is the same as BlitRect except that pixels + in the source corresponding to the color key color + should be skipped. + + +
+
+ +
+ + + The XFree86 X Video Extension (Xv) Device Dependent Layer + + +XFree86 offers the X Video Extension which allows clients to treat video +as any another primitive and Put video into drawables. By default, +the extension reports no video adaptors as being available since the +DDX layer has not been initialized. The driver can initialize the DDX +layer by filling out one or more XF86VideoAdaptorRecs +as described later in this document and passing a list of +XF86VideoAdaptorPtr pointers to the following function: + + + Bool xf86XVScreenInit(ScreenPtr pScreen, + XF86VideoAdaptorPtr *adaptPtrs, + int num); + + + + +After doing this, the extension will report video adaptors as being +available, providing the data in their respective +XF86VideoAdaptorRecs was valid. +xf86XVScreenInit() copies data from the structure +passed to it so the driver may free it after the initialization. At +the moment, the DDX only supports rendering into Window drawables. +Pixmap rendering will be supported after a sufficient survey of suitable +hardware is completed. + + + +The XF86VideoAdaptorRec: + + +typedef struct { + unsigned int type; + int flags; + char *name; + int nEncodings; + XF86VideoEncodingPtr pEncodings; + int nFormats; + XF86VideoFormatPtr pFormats; + int nPorts; + DevUnion *pPortPrivates; + int nAttributes; + XF86AttributePtr pAttributes; + int nImages; + XF86ImagePtr pImages; + PutVideoFuncPtr PutVideo; + PutStillFuncPtr PutStill; + GetVideoFuncPtr GetVideo; + GetStillFuncPtr GetStill; + StopVideoFuncPtr StopVideo; + SetPortAttributeFuncPtr SetPortAttribute; + GetPortAttributeFuncPtr GetPortAttribute; + QueryBestSizeFuncPtr QueryBestSize; + PutImageFuncPtr PutImage; + QueryImageAttributesFuncPtr QueryImageAttributes; +} XF86VideoAdaptorRec, *XF86VideoAdaptorPtr; + + + +Each adaptor will have its own XF86VideoAdaptorRec. The fields are +as follows: + + + + type + + This can be any of the following flags OR'd together. + + + + XvInputMask + XvOutputMask + + These refer to the target drawable and are similar to a Window's + class. XvInputMask indicates that the adaptor + can put video into a drawable. XvOutputMask + indicates that the adaptor can get video from a drawable. + + + + XvVideoMask + XvStillMask + XvImageMask + + These indicate that the adaptor supports video, still or + image primitives respectively. + + + + XvWindowMask + XvPixmapMask + + These indicate the types of drawables the adaptor is capable + of rendering into. At the moment, Pixmap rendering is not + supported and the XvPixmapMask flag is ignored. + + + + + + + flags + + Currently, the following flags are defined: + + + + VIDEO_NO_CLIPPING + + This indicates that the video adaptor does not support + clipping. The driver will never receive Put requests + where less than the entire area determined by + drw_x, drw_y, + drw_w and drw_h is visible. + This flag does not apply to Get requests. Hardware + that is incapable of clipping Gets may punt or get + the extents of the clipping region passed to it. + + + + + + VIDEO_INVERT_CLIPLIST + + This indicates that the video driver requires the clip + list to contain the regions which are obscured rather + than the regions which are are visible. + + + + + + VIDEO_OVERLAID_STILLS + + Implementing PutStill for hardware that does video as an + overlay can be awkward since it's unclear how long to leave + the video up for. When this flag is set, StopVideo will be + called whenever the destination gets clipped or moved so that + the still can be left up until then. + + + + + + VIDEO_OVERLAID_IMAGES + + Same as VIDEO_OVERLAID_STILLS but for images. + + + + + VIDEO_CLIP_TO_VIEWPORT + + Indicates that the clip region passed to the driver functions + should be clipped to the visible portion of the screen in the + case where the viewport is smaller than the virtual desktop. + + + + + + + name + + The name of the adaptor. + + + + + nEncodings + pEncodings + + The number of encodings the adaptor is capable of and pointer + to the XF86VideoEncodingRec array. The + XF86VideoEncodingRec is described later on. + For drivers that only support XvImages there should be an encoding + named "XV_IMAGE" and the width and height should specify + the maximum size source image supported. + + + + + nFormats + pFormats + + The number of formats the adaptor is capable of and pointer to + the XF86VideoFormatRec array. The + XF86VideoFormatRec is described later on. + + + + + nPorts + pPortPrivates + + The number of ports is the number of separate data streams which + the adaptor can handle simultaneously. If you have more than + one port, the adaptor is expected to be able to render into more + than one window at a time. pPortPrivates is + an array of pointers or ints - one for each port. A port's + private data will be passed to the driver any time the port is + requested to do something like put the video or stop the video. + In the case where there may be many ports, this enables the + driver to know which port the request is intended for. Most + commonly, this will contain a pointer to the data structure + containing information about the port. In Xv, all ports on + a particular adaptor are expected to be identical in their + functionality. + + + + + nAttributes + pAttributes + + The number of attributes recognized by the adaptor and a pointer to + the array of XF86AttributeRecs. The + XF86AttributeRec is described later on. + + + + + nImages + pImages + + The number of XF86ImageRecs supported by the adaptor + and a pointer to the array of XF86ImageRecs. The + XF86ImageRec is described later on. + + + + + + PutVideo PutStill GetVideo GetStill StopVideo + SetPortAttribute GetPortAttribute QueryBestSize PutImage + QueryImageAttributes + + + These functions define the DDX->driver interface. In each + case, the pointer data is passed to the driver. + This is the port private for that port as described above. All + fields are required except under the following conditions: + + + + PutVideo, PutStill and + the image routines PutImage and + QueryImageAttributes are not required when the + adaptor type does not contain XvInputMask. + + + + GetVideo and GetStill + are not required when the adaptor type does not contain + XvOutputMask. + + + + GetVideo and PutVideo + are not required when the adaptor type does not contain + XvVideoMask. + + + + GetStill and PutStill + are not required when the adaptor type does not contain + XvStillMask. + + + + PutImage and QueryImageAttributes + are not required when the adaptor type does not contain + XvImageMask. + + + + + + + + With the exception of QueryImageAttributes, these + functions should return Success if the operation was + completed successfully. They can return XvBadAlloc + otherwise. QueryImageAttributes returns the size + of the XvImage queried. + + + + If the VIDEO_NO_CLIPPING + flag is set, the clipBoxes may be ignored by + the driver. ClipBoxes is an X-Y + banded region identical to those used throughout the server. + The clipBoxes represent the visible portions of the area determined + by drw_x, drw_y, + drw_w and drw_h in the Get/Put + function. The boxes are in screen coordinates, are guaranteed + not to overlap and an empty region will never be passed. + If the driver has specified VIDEO_INVERT_CLIPLIST, + clipBoxes will indicate the areas of the primitive + which are obscured rather than the areas visible. + + + + +
+ + typedef int (* PutVideoFuncPtr)( ScrnInfoPtr pScrn, + short vid_x, short vid_y, short drw_x, short drw_y, + short vid_w, short vid_h, short drw_w, short drw_h, + RegionPtr clipBoxes, pointer data ); + +
+ This indicates that the driver should take a subsection + vid_w by vid_h at location + (vid_x,vid_y) from the video stream and direct + it into the rectangle drw_w by drw_h + at location (drw_x,drw_y) on the screen, scaling as + necessary. Due to the large variations in capabilities of + the various hardware expected to be used with this extension, + it is not expected that all hardware will be able to do this + exactly as described. In that case the driver should just do + the best it can, scaling as closely to the target rectangle + as it can without rendering outside of it. In the worst case, + the driver can opt to just not turn on the video. + + +
+ +
+ + typedef int (* PutStillFuncPtr)( ScrnInfoPtr pScrn, + short vid_x, short vid_y, short drw_x, short drw_y, + short vid_w, short vid_h, short drw_w, short drw_h, + RegionPtr clipBoxes, pointer data ); + +
+ This is same as PutVideo except that the driver + should place only one frame from the stream on the screen. + + +
+ +
+ + typedef int (* GetVideoFuncPtr)( ScrnInfoPtr pScrn, + short vid_x, short vid_y, short drw_x, short drw_y, + short vid_w, short vid_h, short drw_w, short drw_h, + RegionPtr clipBoxes, pointer data ); + +
+ This is same as PutVideo except that the driver + gets video from the screen and outputs it. The driver should + do the best it can to get the requested dimensions correct + without reading from an area larger than requested. + + +
+ +
+ + typedef int (* GetStillFuncPtr)( ScrnInfoPtr pScrn, + short vid_x, short vid_y, short drw_x, short drw_y, + short vid_w, short vid_h, short drw_w, short drw_h, + RegionPtr clipBoxes, pointer data ); + +
+ This is the same as GetVideo except that the + driver should place only one frame from the screen into the + output stream. + + +
+ +
+ + typedef void (* StopVideoFuncPtr)(ScrnInfoPtr pScrn, + pointer data, Bool cleanup); + +
+ This indicates the driver should stop displaying the video. + This is used to stop both input and output video. The + cleanup field indicates that the video is + being stopped because the client requested it to stop or + because the server is exiting the current VT. In that case + the driver should deallocate any offscreen memory areas (if + there are any) being used to put the video to the screen. If + cleanup is not set, the video is being stopped + temporarily due to clipping or moving of the window, etc... + and video will likely be restarted soon so the driver should + not deallocate any offscreen areas associated with that port. + + +
+
+ + typedef int (* SetPortAttributeFuncPtr)(ScrnInfoPtr pScrn, + Atom attribute,INT32 value, pointer data); + + + + typedef int (* GetPortAttributeFuncPtr)(ScrnInfoPtr pScrn, + Atom attribute,INT32 *value, pointer data); + +
+ A port may have particular attributes such as hue, + saturation, brightness or contrast. Xv clients set and + get these attribute values by sending attribute strings + (Atoms) to the server. Such requests end up at these + driver functions. It is recommended that the driver provide + at least the following attributes mentioned in the Xv client + library docs: + + XV_ENCODING + XV_HUE + XV_SATURATION + XV_BRIGHTNESS + XV_CONTRAST + + but the driver may recognize as many atoms as it wishes. If + a requested attribute is unknown by the driver it should return + BadMatch. XV_ENCODING is the + attribute intended to let the client specify which video + encoding the particular port should be using (see the description + of XF86VideoEncodingRec below). If the + requested encoding is unsupported, the driver should return + XvBadEncoding. If the value lies outside the + advertised range BadValue may be returned. + Success should be returned otherwise. + + +
+ +
+ + typedef void (* QueryBestSizeFuncPtr)(ScrnInfoPtr pScrn, + Bool motion, short vid_w, short vid_h, + short drw_w, short drw_h, + unsigned int *p_w, unsigned int *p_h, pointer data); + +
+ QueryBestSize provides the client with a way + to query what the destination dimensions would end up being + if they were to request that an area + vid_w by vid_h from the video + stream be scaled to rectangle of + drw_w by drw_h on the screen. + Since it is not expected that all hardware will be able to + get the target dimensions exactly, it is important that the + driver provide this function. + + +
+ +
+ + typedef int (* PutImageFuncPtr)( ScrnInfoPtr pScrn, + short src_x, short src_y, short drw_x, short drw_y, + short src_w, short src_h, short drw_w, short drw_h, + int image, char *buf, short width, short height, + Bool sync, RegionPtr clipBoxes, pointer data ); + +
+ This is similar to PutStill except that the + source of the video is not a port but the data stored in a system + memory buffer at buf. The data is in the format + indicated by the image descriptor and represents a + source of size width by height. + If sync is TRUE the driver should not return + from this function until it is through reading the data + from buf. Returning when sync + is TRUE indicates that it is safe for the data at buf + to be replaced, freed, or modified. + + +
+ +
+ + typedef int (* QueryImageAttributesFuncPtr)( ScrnInfoPtr pScrn, + int image, short *width, short *height, + int *pitches, int *offsets); + +
+ This function is called to let the driver specify how data for + a particular image of size width + by height should be stored. Sometimes only + the size and corrected width and height are needed. In that + case pitches and offsets are + NULL. The size of the memory required for the image is returned + by this function. The width and + height of the requested image can be altered by + the driver to reflect format limitations (such as component + sampling periods that are larger than one). If + pitches and offsets are not NULL, + these will be arrays with as many elements in them as there + are planes in the image format. The driver + should specify the pitch (in bytes) of each scanline in the + particular plane as well as the offset to that plane (in bytes) + from the beginning of the image. + + +
+
+ + +The XF86VideoEncodingRec: + +
+ +typedef struct { + int id; + char *name; + unsigned short width, height; + XvRationalRec rate; +} XF86VideoEncodingRec, *XF86VideoEncodingPtr; + + +
+ The XF86VideoEncodingRec specifies what encodings + the adaptor can support. Most of this data is just informational + and for the client's benefit, and is what will be reported by + XvQueryEncodings. The id field is + expected to be a unique identifier to allow the client to request a + certain encoding via the XV_ENCODING attribute string. + + +
+
+ + +The XF86VideoFormatRec: + +
+ +typedef struct { + char depth; + short class; +} XF86VideoFormatRec, *XF86VideoFormatPtr; + + +
+ This specifies what visuals the video is viewable in. + depth is the depth of the visual (not bpp). + class is the visual class such as + TrueColor, DirectColor or + PseudoColor. Initialization of an adaptor will fail + if none of the visuals on that screen are supported. + + +
+
+ + +The XF86AttributeRec: + +
+ +typedef struct { + int flags; + int min_value; + int max_value; + char *name; +} XF86AttributeListRec, *XF86AttributeListPtr; + + +
+ Each adaptor may have an array of these advertising the attributes + for its ports. Currently defined flags are XvGettable + and XvSettable which may be OR'd together indicating that + attribute is gettable or settable by the client. The + min and max field specify the valid range + for the value. Name is a text string describing the + attribute by name. + + +
+ +
+ + +The XF86ImageRec: + +
+ +typedef struct { + int id; + int type; + int byte_order; + char guid[16]; + int bits_per_pixel; + int format; + int num_planes; + + /* for RGB formats */ + int depth; + unsigned int red_mask; + unsigned int green_mask; + unsigned int blue_mask; + + /* for YUV formats */ + unsigned int y_sample_bits; + unsigned int u_sample_bits; + unsigned int v_sample_bits; + unsigned int horz_y_period; + unsigned int horz_u_period; + unsigned int horz_v_period; + unsigned int vert_y_period; + unsigned int vert_u_period; + unsigned int vert_v_period; + char component_order[32]; + int scanline_order; +} XF86ImageRec, *XF86ImagePtr; + + +
+ XF86ImageRec describes how video source data is laid out in memory. + The fields are as follows: + + + + id + + This is a unique descriptor for the format. It is often good to + set this value to the FOURCC for the format when applicable. + + + + type + + This is XvRGB or XvYUV. + + + + byte_order + + This is LSBFirst or MSBFirst. + + + + guid + + This is the Globally Unique IDentifier for the format. When + not applicable, all characters should be NULL. + + + + bits_per_pixel + + The number of bits taken up (but not necessarily used) by each + pixel. Note that for some planar formats which have fractional + bits per pixel (such as IF09) this number may be rounded _down_. + + + + format + + This is XvPlanar or XvPacked. + + + + num_planes + + The number of planes in planar formats. This should be set to + one for packed formats. + + + + depth + + The significant bits per pixel in RGB formats (analgous to the + depth of a pixmap format). + + + + red_mask + green_mask + blue_mask + + The red, green and blue bitmasks for packed RGB formats. + + + + y_sample_bits + u_sample_bits + v_sample_bits + + The y, u and v sample sizes (in bits). + + + + horz_y_period + horz_u_period + horz_v_period + + The y, u and v sampling periods in the horizontal direction. + + + + vert_y_period + vert_u_period + vert_v_period + + The y, u and v sampling periods in the vertical direction. + + + + component_order + + Uppercase ascii characters representing the order that + samples are stored within packed formats. For planar formats + this represents the ordering of the planes. Unused characters + in the 32 byte string should be set to NULL. + + + + scanline_order + + This is XvTopToBottom or XvBottomToTop. + + + + + + + Since some formats (particular some planar YUV formats) may not +be completely defined by the parameters above, the guid, when +available, should provide the most accurate description of the +format. + + +
+
+
+ + + The Loader + + +This section describes the interfaces to the module loader. The loader +interfaces can be divided into two groups: those that are only available to +the XFree86 common layer, and those that are also available to modules. + + + + Loader Overview + + +The loader is capable of loading modules in a range of object formats, +and knowledge of these formats is built in to the loader. Knowledge of +new object formats can be added to the loader in a straightforward +manner. This makes it possible to provide OS-independent modules (for +a given CPU architecture type). In addition to this, the loader can +load modules via the OS-provided dlopen(3) service where +available. Such modules are not platform independent, and the semantics +of dlopen() on most systems results in significant +limitations in the use of modules of this type. Support for +dlopen() modules in the loader is primarily for +experimental and development purposes. + + + +Symbols exported by the loader (on behalf of the core X server) to +modules are determined at compile time. Only those symbols explicitly +exported are available to modules. All external symbols of loaded +modules are exported to other modules, and to the core X server. The +loader can be requested to check for unresolved symbols at any time, +and the action to be taken for unresolved symbols can be controlled by +the caller of the loader. Typically the caller identifies which symbols +can safely remain unresolved and which cannot. + + + +NOTE: Now that ISO-C allows pointers to functions and pointers to data to +have different internal representations, some of the following interfaces +will need to be revisited. + + + + + Semi-private Loader Interface + + +The following is the semi-private loader interface that is available to the +XFree86 common layer. + + +
+ + void LoaderInit(void); + +
+ The LoaderInit() function initialises the loader, + and it must be called once before calling any other loader functions. + This function initialises the tables of exported symbols, and anything + else that might need to be initialised. + + +
+ +
+ + void LoaderSetPath(const char *path); + +
+ The LoaderSetPath() function initialises a default + module search path. This must be called if calls to other functions + are to be made without explicitly specifying a module search path. + The search path path must be a string of one or more + comma separated absolute paths. Modules are expected to be located + below these paths, possibly in subdirectories of these paths. + + +
+ +
+ + pointer LoadModule(const char *module, const char *path, + const char **subdirlist, const char **patternlist, + pointer options, const XF86ModReqInfo * modreq, + int *errmaj, int *errmin); + +
+ The LoadModule() function loads the module called + module. The return value is a module handle, and + may be used in future calls to the loader that require a reference + to a loaded module. The module name module is + normally the module's canonical name, which doesn't contain any + directory path information, or any object/library file prefixes of + suffixes. Currently a full pathname and/or filename is also accepted. + This might change. The other parameters are: + + + + path + + An optional comma-separated list of module search paths. + When NULL, the default search path is used. + + + + + subdirlist + + An optional NULL terminated list of + subdirectories to search. When NULL, + the default built-in list is used (refer to + stdSubdirs in loadmod.c). + The default list is also substituted for entries in + subdirlist with the value + DEFAULT_LIST. This makes is possible + to augment the default list instead of replacing it. + Subdir elements must be relative, and must not contain + "..". If any violate this requirement, + the load fails. + + + + + patternlist + + An optional NULL terminated list of + POSIX regular expressions used to connect module + filenames with canonical module names. Each regex + should contain exactly one subexpression that corresponds + to the canonical module name. When NULL, + the default built-in list is used (refer to + stdPatterns in + loadmod.c). The default list is also + substituted for entries in patternlist + with the value DEFAULT_LIST. This + makes it possible to augment the default list instead + of replacing it. + + + + + options + + An optional parameter that is passed to the newly + loaded module's SetupProc function + (if it has one). This argument is normally a + NULL terminated list of + Options, and must be interpreted that + way by modules loaded directly by the XFree86 common + layer. However, it may be used for application-specific + parameter passing in other situations. + + + + When loading external modules (modules that don't + have the standard entry point, for example a + special shared library) the options parameter can be + set to EXTERN_MODULE to tell the + loader not to reject the module when it doesn't find + the standard entry point. + + + + + modreq + + An optional XF86ModReqInfo* containing + version/ABI/vendor information to requirements to + check the newly loaded module against. The main + purpose of this is to allow the loader to verify that + a module of the correct type/version before running + its SetupProc function. + + + + The XF86ModReqInfo struct is defined + as follows: + +typedef struct { + CARD8 majorversion; /* MAJOR_UNSPEC */ + CARD8 minorversion; /* MINOR_UNSPEC */ + CARD16 patchlevel; /* PATCH_UNSPEC */ + const char * abiclass; /* ABI_CLASS_NONE */ + CARD32 abiversion; /* ABI_VERS_UNSPEC */ + const char * moduleclass; /* MOD_CLASS_NONE */ +} XF86ModReqInfo; + + + The information here is compared against the equivalent + information in the module's + XF86ModuleVersionInfo record (which + is described below). The values in comments above + indicate don't care settings for each of the fields. + The comparisons made are as follows: + + + + majorversion + + Must match the module's majorversion + exactly. + + + + minorversion + + The module's minor version must be + no less than this value. This + comparison is only made if + majorversion is + specified and matches. + + + + patchlevel + + The module's patchlevel must be no + less than this value. This comparison + is only made if + minorversion is + specified and matches. + + + + abiclass + + String must match the module's abiclass + string. + + + + abiversion + + Must be consistent with the module's + abiversion (major equal, minor no + older). + + + + moduleclass + + String must match the module's + moduleclass string. + + + + + + + errmaj + + An optional pointer to a variable holding the major + part or the error code. When provided, + *errmaj is filled in when + LoadModule() fails. + + + + errmin + + Like errmaj, but for the minor part + of the error code. + + + + +
+
+ +
+ + void UnloadModule(pointer mod); + +
+ This function unloads the module referred to by the handle mod. + All child modules are also unloaded recursively. This function must + not be used to directly unload modules that are child modules (i.e., + those that have been loaded with the LoadSubModule() + described below). + + +
+
+ + + Module Requirements + + +Modules must provide information about themselves to the loader, and +may optionally provide entry points for "setup" and "teardown" functions +(those two functions are referred to here as SetupProc +and TearDownProc). + + + +The module information is contained in the +XF86ModuleVersionInfo struct, which is defined as follows: + + +typedef struct { + const char * modname; /* name of module, e.g. "foo" */ + const char * vendor; /* vendor specific string */ + CARD32 _modinfo1_; /* constant MODINFOSTRING1/2 to find */ + CARD32 _modinfo2_; /* infoarea with a binary editor/sign tool */ + CARD32 xf86version; /* contains XF86_VERSION_CURRENT */ + CARD8 majorversion; /* module-specific major version */ + CARD8 minorversion; /* module-specific minor version */ + CARD16 patchlevel; /* module-specific patch level */ + const char * abiclass; /* ABI class that the module uses */ + CARD32 abiversion; /* ABI version */ + const char * moduleclass; /* module class */ + CARD32 checksum[4]; /* contains a digital signature of the */ + /* version info structure */ +} XF86ModuleVersionInfo; + + +The fields are used as follows: + + + + modname + + The module's name. This field is currently only for + informational purposes, but the loader may be modified + in future to require it to match the module's canonical + name. + + + + + vendor + + The module vendor. This field is for informational purposes + only. + + + + + _modinfo1_ + + This field holds the first part of a signature that can + be used to locate this structure in the binary. It should + always be initialised to MODINFOSTRING1. + + + + + _modinfo2_ + + This field holds the second part of a signature that can + be used to locate this structure in the binary. It should + always be initialised to MODINFOSTRING2. + + + + + xf86version + + The XFree86 version against which the module was compiled. + This is mostly for informational/diagnostic purposes. It + should be initialised to XF86_VERSION_CURRENT, which is + defined in xf86Version.h. + + + + + majorversion + + The module-specific major version. For modules where this + version is used for more than simply informational + purposes, the major version should only change (be + incremented) when ABI incompatibilities are introduced, + or ABI components are removed. + + + + + minorversion + + The module-specific minor version. For modules where this + version is used for more than simply informational + purposes, the minor version should only change (be + incremented) when ABI additions are made in a backward + compatible way. It should be reset to zero when the major + version is increased. + + + + + patchlevel + + The module-specific patch level. The patch level should + increase with new revisions of the module where there + are no ABI changes, and it should be reset to zero when + the minor version is increased. + + + + + abiclass + + The ABI class that the module requires. The class is + specified as a string for easy extensibility. It should + indicate which (if any) of the X server's built-in ABI + classes that the module relies on, or a third-party ABI + if appropriate. Built-in ABI classes currently defined are: + + + + ABI_CLASS_NONE + no class + + + ABI_CLASS_ANSIC + only requires the ANSI C interfaces + + + ABI_CLASS_VIDEODRV + requires the video driver ABI + + + ABI_CLASS_XINPUT + requires the XInput driver ABI + + + ABI_CLASS_EXTENSION + requires the extension module ABI + + + ABI_CLASS_FONT + requires the font module ABI + + + + + + + abiversion + + The version of abiclass that the module requires. The + version consists of major and minor components. The + major version must match and the minor version must be + no newer than that provided by the server or parent + module. Version identifiers for the built-in classes + currently defined are: + + + ABI_ANSIC_VERSION + ABI_VIDEODRV_VERSION + ABI_XINPUT_VERSION + ABI_EXTENSION_VERSION + ABI_FONT_VERSION + + + + + + moduleclass + + This is similar to the abiclass field, except that it + defines the type of module rather than the ABI it + requires. For example, although all video drivers require + the video driver ABI, not all modules that require the + video driver ABI are video drivers. This distinction + can be made with the moduleclass. Currently pre-defined + module classes are: + + + MOD_CLASS_NONE + MOD_CLASS_VIDEODRV + MOD_CLASS_XINPUT + MOD_CLASS_FONT + MOD_CLASS_EXTENSION + + + + + + checksum + + Not currently used. + + + + + + +The module version information, and the optional SetupProc +and TearDownProc entry points are found by the loader +by locating a data object in the module called "modnameModuleData", +where "modname" is the canonical name of the module. Modules must +contain such a data object, and it must be declared with global scope, +be compile-time initialised, and is of the following type: + + +typedef struct { + XF86ModuleVersionInfo * vers; + ModuleSetupProc setup; + ModuleTearDownProc teardown; +} XF86ModuleData; + + + + +The vers parameter must be initialised to a pointer to a correctly +initialised XF86ModuleVersionInfo struct. The other +two parameter are optional, and should be initialised to +NULL when not required. The other parameters are defined +as + +
+ + typedef pointer (*ModuleSetupProc)(pointer, pointer, int *, int *); + + typedef void (*ModuleTearDownProc)(pointer); + + pointer SetupProc(pointer module, pointer options, + int *errmaj, int *errmin); + +
+ When defined, this function is called by the loader after successfully + loading a module. module is a handle for the newly loaded module, + and maybe used by the SetupProc if it calls other + loader functions that require a reference to it. The remaining + arguments are those that were passed to the + LoadModule() (or LoadSubModule()), + and are described above. When the SetupProc is + successful it must return a non-NULL value. The + loader checks this, and if it is NULL it unloads + the module and reports the failure to the caller of + LoadModule(). If the SetupProc + does things that need to be undone when the module is unloaded, + it should define a TearDownProc, and return a + pointer that the TearDownProc can use to undo what + has been done. + + + + When a module is loaded multiple times, the SetupProc + is called once for each time it is loaded. + + +
+ +
+ + void TearDownProc(pointer tearDownData); + +
+ When defined, this function is called when the loader unloads a + module. The tearDownData parameter is the return + value of the SetupProc() that was called when the + module was loaded. The purpose of this function is to clean up + before the module is unloaded (for example, by freeing allocated + resources). + + +
+
+
+ + + Public Loader Interface + + +The following is the Loader interface that is available to any part of +the server, and may also be used from within modules. + + +
+ + pointer LoadSubModule(pointer parent, const char *module, + const char **subdirlist, const char **patternlist, + pointer options, const XF86ModReqInfo * modreq, + int *errmaj, int *errmin); + +
+ This function is like the LoadModule() function + described above, except that the module loaded is registered as a + child of the calling module. The parent parameter + is the calling module's handle. Modules loaded with this function + are automatically unloaded when the parent module is unloaded. The + other difference is that the path parameter may not be specified. + The module search path used for modules loaded with this function + is the default search path as initialised with + LoaderSetPath(). + + +
+ +
+ + void UnloadSubModule(pointer module); + +
+ This function unloads the module with handle module. + If that module itself has children, they are also unloaded. It is + like UnloadModule(), except that it is safe to use + for unloading child modules. + + +
+ +
+ + pointer LoaderSymbol(const char *symbol); + +
+ This function returns the address of the symbol with name + symbol. This may be used to locate a module entry + point with a known name. + + +
+ +
+ + char **LoaderlistDirs(const char **subdirlist, + const char **patternlist); + +
+ This function returns a NULL terminated list of + canonical modules names for modules found in the default module + search path. The subdirlist and + patternlist parameters are as described above, and + can be used to control the locations and names that are searched. + If no modules are found, the return value is NULL. + The returned list should be freed by calling + LoaderFreeDirList() when it is no longer needed. + + +
+ +
+ + void LoaderFreeDirList(char **list); + +
+ This function frees a module list created by + LoaderlistDirs(). + + +
+ +
+ + void LoaderReqSymLists(const char **list0, ...); + +
+ This function allows the registration of required symbols with the + loader. It is normally used by a caller of + LoadSubModule(). If any symbols registered in this + way are found to be unresolved when + LoaderCheckUnresolved() is called then + LoaderCheckUnresolved() will report a failure. + The function takes one or more NULL terminated + lists of symbols. The end of the argument list is indicated by a + NULL argument. + + +
+ +
+ + void LoaderReqSymbols(const char *sym0, ...); + +
+ This function is like LoaderReqSymLists() except + that its arguments are symbols rather than lists of symbols. This + function is more convenient when single functions are to be registered, + especially when the single function might depend on runtime factors. + The end of the argument list is indicated by a NULL + argument. + + +
+ +
+ + void LoaderRefSymLists(const char **list0, ...); + +
+ This function allows the registration of possibly unresolved symbols + with the loader. When LoaderCheckUnresolved() is + run it won't generate warnings for symbols registered in this way + unless they were also registered as required symbols. + The function takes one or more NULL terminated + lists of symbols. The end of the argument list is indicated by a + NULL argument. + + +
+ +
+ + void LoaderRefSymbols(const char *sym0, ...); + +
+ This function is like LoaderRefSymLists() except + that its arguments are symbols rather than lists of symbols. This + function is more convenient when single functions are to be registered, + especially when the single function might depend on runtime factors. + The end of the argument list is indicated by a NULL + argument. + + +
+ +
+ + int LoaderCheckUnresolved(int delayflag); + +
+ This function checks for unresolved symbols. It generates warnings + for unresolved symbols that have not been registered with + LoaderRefSymLists(), and maps them to a dummy + function. This behaviour may change in future. If unresolved + symbols are found that have been registered with + LoaderReqSymLists() or + LoaderReqSymbols() then this function returns a + non-zero value. If none of these symbols are unresolved the return + value is zero, indicating success. + + + + The delayflag parameter should normally be set to + LD_RESOLV_IFDONE. + + +
+ +
+ + LoaderErrorMsg(const char *name, const char *modname, + int errmaj, int errmin); + +
+ This function prints an error message that includes the text Failed + to load module, the module name modname, a message + specific to the errmaj value, and the value if + errmin. If name is + non-NULL, it is printed as an identifying prefix + to the message (followed by a :). + + +
+
+ + + Special Registration Functions + + +The loader contains some functions for registering some classes of modules. +These may be moved out of the loader at some point. + + +
+ + void LoadExtension(ExtensionModule *ext); + +
+ This registers the entry points for the extension identified by + ext. The ExtensionModule struct is + defined as: + + +typedef struct { + InitExtension initFunc; + char * name; + Bool *disablePtr; + InitExtension setupFunc; +} ExtensionModule; + + + +
+ +
+ + void LoadFont(FontModule *font); + +
+ This registers the entry points for the font rasteriser module + identified by font. The FontModule + struct is defined as: + + + typedef struct { + InitFont initFunc; + char * name; + pointer module; +} FontModule; + + + +
+ +
+ +
+ + + Helper Functions + + +This section describe helper functions that video driver +might find useful. While video drivers are not required to use any of +these to be considered compliant, the use of appropriate helpers is +strongly encouraged to improve the consistency of driver behaviour. + + + + Functions for printing messages + +
+ + ErrorF(const char *format, ...); + +
+ This is the basic function for writing to the error log (typically + stderr and/or a log file). Video drivers should usually avoid + using this directly in favour of the more specialised functions + described below. This function is useful for printing messages + while debugging a driver. + + +
+ +
+ + FatalError(const char *format, ...); + +
+ This prints a message and causes the Xserver to abort. It should + rarely be used within a video driver, as most error conditions + should be flagged by the return values of the driver functions. + This allows the higher layers to decide how to proceed. In rare + cases, this can be used within a driver if a fatal unexpected + condition is found. + + +
+ +
+ + xf86ErrorF(const char *format, ...); + +
+ This is like ErrorF(), except that the message is + only printed when the Xserver's verbosity level is set to the + default (1) or higher. It means that the messages + are not printed when the server is started with the + flag. Typically this function would only be + used for continuing messages started with one of the more specialised + functions described below. + + +
+ +
+ + xf86ErrorFVerb(int verb, const char *format, ...); + +
+ Like xf86ErrorF(), except the minimum verbosity + level for which the message is to be printed is given explicitly. + Passing a verb value of zero means the message + is always printed. A value higher than 1 can be + used for information would normally not be needed, but which might + be useful when diagnosing problems. + + +
+ + +
+ + xf86Msg(MessageType type, const char *format, ...); + +
+ This is like xf86ErrorF(), except that the message + is prefixed with a marker determined by the value of + type. The marker is used to indicate the type of + message (warning, error, probed value, config value, etc). Note + the xf86Verbose value is ignored for messages of + type X_ERROR. + + + + The marker values are: + + + + X_PROBED + Value was probed. + + + X_CONFIG + Value was given in the config file. + + + X_DEFAULT + Value is a default. + + + X_CMDLINE + Value was given on the command line. + + + X_NOTICE + Notice. + + + X_ERROR + Error message. + + + X_WARNING + Warning message. + + + X_INFO + Informational message. + + + X_NONE + No prefix. + + + X_NOT_IMPLEMENTED + The message relates to functionality + that is not yetimplemented. + + + + + +
+ +
+ + xf86MsgVerb(MessageType type, int verb, const char *format, ...); + +
+ Like xf86Msg(), but with the verbosity level given + explicitly. + + +
+ +
+ + xf86DrvMsg(int scrnIndex, MessageType type, const char *format, ...); + +
+ This is like xf86Msg() except that the driver's + name (the name field of the + ScrnInfoRec) followed by the + scrnIndex in parentheses is printed following the + prefix. This should be used by video drivers in most cases as it + clearly indicates which driver/screen the message is for. If + scrnIndex is negative, this function behaves + exactly like xf86Msg(). + + + + NOTE: This function can only be used after the + ScrnInfoRec and its name field + have been allocated. Normally, this means that it can not be + used before the END of the ChipProbe() function. + Prior to that, use xf86Msg(), providing the + driver's name explicitly. No screen number can be supplied at + that point. + + +
+ +
+ + xf86DrvMsgVerb(int scrnIndex, MessageType type, int verb, + const char *format, ...); + +
+ Like xf86DrvMsg(), but with the verbosity level + given explicitly. + + +
+
+ + + + Functions for setting values based on command line and config file + +
+ + Bool xf86SetDepthBpp(ScrnInfoPtr scrp, int depth, int bpp, + + int fbbpp, int depth24flags); + +
+ This function sets the depth, pixmapBPP and bitsPerPixel fields + of the ScrnInfoRec. It also determines the defaults for display-wide + attributes and pixmap formats the screen will support, and finds + the Display subsection that matches the depth/bpp. This function + should normally be called very early from the + ChipPreInit() function. + + + + It requires that the confScreen field of the ScrnInfoRec be + initialised prior to calling it. This is done by the XFree86 + common layer prior to calling ChipPreInit(). + + + + The parameters passed are: + + + + depth + + driver's preferred default depth if no other is given. + If zero, use the overall server default. + + + + bpp + + Same, but for the pixmap bpp. + + + + fbbpp + + Same, but for the framebuffer bpp. + + + + depth24flags + + Flags that indicate the level of 24/32bpp support + and whether conversion between different framebuffer + and pixmap formats is supported. The flags for this + argument are defined as follows, and multiple flags + may be ORed together: + + + + NoDepth24Support + No depth 24 formats supported + + + Support24bppFb + 24bpp framebuffer supported + + + Support32bppFb + 32bpp framebuffer supported + + + SupportConvert24to32 + Can convert 24bpp pixmap to 32bpp fb + + + SupportConvert32to24 + Can convert 32bpp pixmap to 24bpp fb + + + ForceConvert24to32 + Force 24bpp pixmap to 32bpp fb conversion + + + ForceConvert32to24 + Force 32bpp pixmap to 24bpp fb conversion + + + + + + + + + It uses the command line, config file, and default values in the + correct order of precedence to determine the depth and bpp values. + It is up to the driver to check the results to see that it supports + them. If not the ChipPreInit() function should + return FALSE. + + + + If only one of depth/bpp is given, the other is set to a reasonable + (and consistent) default. + + + + If a driver finds that the initial depth24flags + it uses later results in a fb format that requires more video + memory than is available it may call this function a second time + with a different depth24flags setting. + + + + On success, the return value is TRUE. On failure + it prints an error message and returns FALSE. + + + + The following fields of the ScrnInfoRec are + initialised by this function: + +
+depth, bitsPerPixel, +display, imageByteOrder, +bitmapScanlinePad, +bitmapScanlineUnit, bitmapBitOrder, +numFormats, formats, +fbFormat. +
+
+ +
+ +
+ + void xf86PrintDepthBpp(scrnInfoPtr scrp); + +
+ This function can be used to print out the depth and bpp settings. + It should be called after the final call to + xf86SetDepthBpp(). + + +
+ +
+ + Bool xf86SetWeight(ScrnInfoPtr scrp, rgb weight, rgb mask); + +
+ This function sets the weight, mask, + offset and rgbBits fields of the + ScrnInfoRec. It would normally be called fairly + early in the ChipPreInit() function for + depths > 8bpp. + + + + It requires that the depth and + display fields of the ScrnInfoRec + be initialised prior to calling it. + + + + The parameters passed are: + + + + weight + + driver's preferred default weight if no other is given. + If zero, use the overall server default. + + + + + mask + + Same, but for mask. + + + + + + + It uses the command line, config file, and default values in the + correct order of precedence to determine the weight value. It + derives the mask and offset values from the weight and the defaults. + It is up to the driver to check the results to see that it supports + them. If not the ChipPreInit() function should + return FALSE. + + + + On success, this function prints a message showing the weight + values selected, and returns TRUE. + + + + On failure it prints an error message and returns FALSE. + + + + The following fields of the ScrnInfoRec are + initialised by this function: + +
+ weight, + mask, + offset. +
+
+ +
+ +
+ + Bool xf86SetDefaultVisual(ScrnInfoPtr scrp, int visual); + +
+ This function sets the defaultVisual field of the + ScrnInfoRec. It would normally be called fairly + early from the ChipPreInit() function. + + + + It requires that the depth and + display fields of the ScrnInfoRec + be initialised prior to calling it. + + + + The parameters passed are: + + + + visual + + driver's preferred default visual if no other is given. + If -1, use the overall server default. + + + + + + + It uses the command line, config file, and default values in the + correct order of precedence to determine the default visual value. + It is up to the driver to check the result to see that it supports + it. If not the ChipPreInit() function should + return FALSE. + + + + On success, this function prints a message showing the default visual + selected, and returns TRUE. + + + + On failure it prints an error message and returns FALSE. + + +
+ +
+ + Bool xf86SetGamma(ScrnInfoPtr scrp, Gamma gamma); + +
+ This function sets the gamma field of the + ScrnInfoRec. It would normally be called fairly + early from the ChipPreInit() function in cases + where the driver supports gamma correction. + + + + It requires that the monitor field of the + ScrnInfoRec be initialised prior to calling it. + + + + The parameters passed are: + + + + gamma + + driver's preferred default gamma if no other is given. + If zero (< 0.01), use the overall server + default. + + + + + + + It uses the command line, config file, and default values in the + correct order of precedence to determine the gamma value. It is + up to the driver to check the results to see that it supports + them. If not the ChipPreInit() function should + return FALSE. + + + + On success, this function prints a message showing the gamma + value selected, and returns TRUE. + + + + On failure it prints an error message and returns FALSE. + + +
+ + +
+ + void xf86SetDpi(ScrnInfoPtr pScrn, int x, int y); + +
+ This function sets the xDpi and yDpi + fields of the ScrnInfoRec. The driver can specify + preferred defaults by setting x and y + to non-zero values. The command line option + overrides all other settings. Otherwise, if the + DisplaySize entry is present in the screen's &k.monitor; + config file section, it is used together with the virtual size to + calculate the dpi values. This function should be called after + all the mode resolution has been done. + + +
+ +
+ + void xf86SetBlackWhitePixels(ScrnInfoPtr pScrn); + +
+ This functions sets the blackPixel and + whitePixel fields of the ScrnInfoRec + according to whether or not the command + line options is present. + + +
+ +
+ + const char *xf86GetVisualName(int visual); + +
+ Returns a printable string with the visual name matching the + numerical visual class provided. If the value is outside the + range of valid visual classes, NULL is returned. + + +
+ +
+ + + Primary Mode functions + + +The primary mode helper functions are those which would normally be +used by a driver, unless it has unusual requirements which cannot +be catered for the by the helpers. + + +
+ + int xf86ValidateModes(ScrnInfoPtr scrp, DisplayModePtr availModes, + char **modeNames, ClockRangePtr clockRanges, + int *linePitches, int minPitch, int maxPitch, + int pitchInc, int minHeight, int maxHeight, + int virtualX, int virtualY, + unsigned long apertureSize, + LookupModeFlags strategy); + +
+ This function basically selects the set of modes to use based on + those available and the various constraints. It also sets some + other related parameters. It is normally called near the end of + the ChipPreInit() function. + + + + The parameters passed to the function are: + + + + availModes + + List of modes available for the monitor. + + + + modeNames + + List of mode names that the screen is requesting. + + + + clockRanges + + A list of clock ranges allowed by the driver. Each + range includes whether interlaced or multiscan modes + are supported for that range. See below for more on + clockRanges. + + + + linePitches + + List of line pitches supported by the driver. + This is optional and should be NULL when + not used. + + + + minPitch + + Minimum line pitch supported by the driver. This must + be supplied when linePitches is + NULL, and is ignored otherwise. + + + + maxPitch + + Maximum line pitch supported by the driver. This is + required when minPitch is required. + + + + pitchInc + + Granularity of horizontal pitch values as supported by + the chipset. This is expressed in bits. This must be + supplied. + + + + minHeight + + minimum virtual height allowed. If zero, no limit is + imposed. + + + + maxHeight + + maximum virtual height allowed. If zero, no limit is + imposed. + + + + virtualX + + If greater than zero, this is the virtual width value + that will be used. Otherwise, the virtual width is + chosen to be the smallest that can accommodate the modes + selected. + + + + virtualY + + If greater than zero, this is the virtual height value + that will be used. Otherwise, the virtual height is + chosen to be the smallest that can accommodate the modes + selected. + + + + apertureSize + + The size (in bytes) of the aperture used to access video + memory. + + + + strategy + + The strategy to use when choosing from multiple modes + with the same name. The options are: + + + + LOOKUP_DEFAULT + ??? + + + LOOKUP_BEST_REFRESH + mode with best refresh rate + + + LOOKUP_CLOSEST_CLOCK + mode with closest matching clock + + + LOOKUP_LIST_ORDER + first usable mode in list + + + + The following options can also be combined (OR'ed) with + one of the above: + + + + LOOKUP_CLKDIV2 + Allow halved clocks + + + LOOKUP_OPTIONAL_TOLERANCES + + Allow missing horizontal sync and/or vertical refresh + ranges in the xorg.conf Monitor section + + + + LOOKUP_OPTIONAL_TOLERANCES should only be + specified when the driver can ensure all modes it generates + can sync on, or at least not damage, the monitor or digital + flat panel. Horizontal sync and/or vertical refresh ranges + specified by the user will still be honoured (and acted upon). + + + + + + + This function requires that the following fields of the + ScrnInfoRec are initialised prior to calling it: + + + + clock[] + + List of discrete clocks (when non-programmable) + + + numClocks + + Number of discrete clocks (when non-programmable) + + + progClock + + Whether the clock is programmable or not + + + monitor + + Pointer to the applicable xorg.conf monitor section + + + fdFormat + + Format of the screen buffer + + + videoRam + + total video memory size (in bytes) + + + maxHValue + + Maximum horizontal timing value allowed + + + maxVValue + + Maximum vertical timing value allowed + + + xInc + + Horizontal timing increment in pixels (defaults to 8) + + + + + + This function fills in the following ScrnInfoRec + fields: + + + + modePool + + A subset of the modes available to the monitor which + are compatible with the driver. + + + + modes + + One mode entry for each of the requested modes, with + the status field of each filled in to indicate if + the mode has been accepted or not. This list of + modes is a circular list. + + + + virtualX + + The resulting virtual width. + + + + virtualY + + The resulting virtual height. + + + + displayWidth + + The resulting line pitch. + + + + virtualFrom + + Where the virtual size was determined from. + + + + + + + The first stage of this function checks that the + virtualX and virtualY values + supplied (if greater than zero) are consistent with the line pitch + and maxHeight limitations. If not, an error + message is printed, and the return value is -1. + + + + The second stage sets up the mode pool, eliminating immediately + any modes that exceed the driver's line pitch limits, and also + the virtual width and height limits (if greater than zero). For + each mode removed an informational message is printed at verbosity + level 2. If the mode pool ends up being empty, + a warning message is printed, and the return value is + 0. + + + + The final stage is to lookup each mode name, and fill in the remaining + parameters. If an error condition is encountered, a message is + printed, and the return value is -1. Otherwise, + the return value is the number of valid modes found + (0 if none are found). + + + + Even if the supplied mode names include duplicates, no two names will + ever match the same mode. Furthermore, if the supplied mode names do not + yield a valid mode (including the case where no names are passed at all), + the function will continue looking through the mode pool until it finds + a mode that survives all checks, or until the mode pool is exhausted. + + + + A message is only printed by this function when a fundamental + problem is found. It is intended that this function may be called + more than once if there is more than one set of constraints that + the driver can work within. + + + + If this function returns -1, the + ChipPreInit() function should return + FALSE. + + + + clockRanges is a linked list of clock ranges + allowed by the driver. If a mode doesn't fit in any of the defined + clockRanges, it is rejected. The first + clockRange that matches all requirements is used. + This structure needs to be initialized to NULL when allocated. + + + + clockRanges contains the following fields: + + + + minClock + maxClock + + The lower and upper mode clock bounds for which the rest + of the clockRange parameters apply. + Since these are the mode clocks, they are not scaled + with the ClockMulFactor and + ClockDivFactor. It is up to the driver + to adjust these values if they depend on the clock + scaling factors. + + + + clockIndex + + (not used yet) -1 for programmable clocks + + + + interlaceAllowed + + TRUE if interlacing is allowed for this + range + + + + doubleScanAllowed + + TRUE if doublescan or multiscan is allowed + for this range + + + + ClockMulFactor + ClockDivFactor + + Scaling factors that are applied to the mode clocks ONLY + before selecting a clock index (when there is no + programmable clock) or a SynthClock + value. This is useful for drivers that support pixel + multiplexing or that need to scale the clocks because + of hardware restrictions (like sending 24bpp data to an + 8 bit RAMDAC using a tripled clock). + + + + Note that these parameters describe what must be done + to the mode clock to achieve the data transport clock + between graphics controller and RAMDAC. For example + for 2:1 pixel multiplexing, two pixels + are sent to the RAMDAC on each clock. This allows the + RAMDAC clock to be half of the actual pixel clock. + Hence, ClockMulFactor=1 and + ClockDivFactor=2. This means that the + clock used for clock selection (ie, determining the + correct clock index from the list of discrete clocks) + or for the SynthClock field in case of + a programmable clock is: (mode->Clock * + ClockMulFactor) / ClockDivFactor. + + + + PrivFlags + + This field is copied into the + mode->PrivFlags field when this + clockRange is selected by + xf86ValidateModes(). It allows the + driver to find out what clock range was selected, so it + knows it needs to set up pixel multiplexing or any other + range-dependent feature. This field is purely + driver-defined: it may contain flag bits, an index or + anything else (as long as it is an INT). + + + + + + Note that the mode->SynthClock field is always + filled in by xf86ValidateModes(): it will contain + the data transport clock, which is the clock that will have + to be programmed in the chip when it has a programmable clock, or + the clock that will be picked from the clocks list when it is not + a programmable one. Thus: + + + mode->SynthClock = (mode->Clock * ClockMulFactor) / ClockDivFactor + + + +
+ +
+ + void xf86PruneDriverModes(ScrnInfoPtr scrp); + +
+ This function deletes modes in the modes field of the + ScrnInfoRec that have been marked as invalid. + This is normally run after having run + xf86ValidateModes() for the last time. For each + mode that is deleted, a warning message is printed out indicating + the reason for it being deleted. + + +
+ +
+ + void xf86SetCrtcForModes(ScrnInfoPtr scrp, int adjustFlags); + +
+ This function fills in the Crtc* fields for all + the modes in the modes field of the + ScrnInfoRec. The adjustFlags + parameter determines how the vertical CRTC values are scaled for + interlaced modes. They are halved if it is + INTERLACE_HALVE_V. The vertical CRTC values are + doubled for doublescan modes, and are further multiplied by the + VScan value. + + + + This function is normally called after calling + xf86PruneDriverModes(). + + +
+ +
+ + void xf86PrintModes(ScrnInfoPtr scrp); + +
+ This function prints out the virtual size setting, and the line + pitch being used. It also prints out two lines for each mode being + used. The first line includes the mode's pixel clock, horizontal sync + rate, refresh rate, and whether it is interlaced, doublescanned and/or + multi-scanned. The second line is the mode's Modeline. + + + + This function is normally called after calling + xf86SetCrtcForModes(). + + +
+ +
+ + + Secondary Mode functions + + +The secondary mode helper functions are functions which are normally +used by the primary mode helper functions, and which are not normally +called directly by a driver. If a driver has unusual requirements +and needs to do its own mode validation, it might be able to make +use of some of these secondary mode helper functions. + + +
+ + int xf86GetNearestClock(ScrnInfoPtr scrp, int freq, Bool allowDiv2, + int *divider); + +
+ This function returns the index of the closest clock to the + frequency freq given (in kHz). It assumes that + the number of clocks is greater than zero. It requires that the + numClocks and clock fields of the + ScrnInfoRec are initialised. The + allowDiv2 field determines if the clocks can be + halved. The *divider return value indicates + whether clock division is used when determining the clock returned. + + + + This function is only for non-programmable clocks. + + +
+ +
+ + const char *xf86ModeStatusToString(ModeStatus status); + +
+ This function converts the status value to a + descriptive printable string. + + +
+ +
+ + ModeStatus xf86LookupMode(ScrnInfoPtr scrp, DisplayModePtr modep, + ClockRangePtr clockRanges, LookupModeFlags strategy); + +
+ This function takes a pointer to a mode with the name filled in, + and looks for a mode in the modePool list which + matches. The parameters of the matching mode are filled in to + *modep. The clockRanges and + strategy parameters are as for the + xf86ValidateModes() function above. + + + + This function requires the modePool, + clock[], numClocks and + progClock fields of the ScrnInfoRec + to be initialised before being called. + + + + The return value is MODE_OK if a mode was found. + Otherwise it indicates why a matching mode could not be found. + + +
+ +
+ + ModeStatus xf86InitialCheckModeForDriver(ScrnInfoPtr scrp, + DisplayModePtr mode, ClockRangePtr clockRanges, + LookupModeFlags strategy, int maxPitch, + int virtualX, int virtualY); + +
+ This function checks the passed mode against some basic driver + constraints. Apart from the ones passed explicitly, the + maxHValue and maxVValue fields of + the ScrnInfoRec are also used. If the + ValidMode field of the ScrnInfoRec + is set, that function is also called to check the mode. Next, the + mode is checked against the monitor's constraints. + + + + If the mode is consistent with all constraints, the return value + is MODE_OK. Otherwise the return value indicates + which constraint wasn't met. + + +
+ +
+ + void xf86DeleteMode(DisplayModePtr *modeList, DisplayModePtr mode); + +
+ This function deletes the mode given from the + modeList. It never prints any messages, so it is + up to the caller to print a message if required. + + +
+
+ + + Functions for handling strings and tokens + + + Tables associating strings and numerical tokens combined with the + following functions provide a compact way of handling strings from + the config file, and for converting tokens into printable strings. + The table data structure is: + + +typedef struct { + int token; + const char * name; +} SymTabRec, *SymTabPtr; + + + + + A table is an initialised array of SymTabRec. The + tokens must be non-negative integers. Multiple names may be mapped + to a single token. The table is terminated with an element with a + token value of -1 and + NULL for the name. + + +
+ + const char *xf86TokenToString(SymTabPtr table, int token); + +
+ This function returns the first string in table + that matches token. If no match is found, + NULL is returned (NOTE, older versions of this + function would return the string "unknown" when no match is found). + + +
+ +
+ + int xf86StringToToken(SymTabPtr table, const char *string); + +
+ This function returns the first token in table + that matches string. The + xf86NameCmp() function is used to determine the + match. If no match is found, -1 is returned. + + +
+ +
+ + + Functions for finding which config file entries to use + + + These functions can be used to select the appropriate config file + entries that match the detected hardware. They are described above + in the Probe and + Available Functions sections. + + + + + + Probing discrete clocks on old hardware + + + The xf86GetClocks() function may be used to assist + in finding the discrete pixel clock values on older hardware. + + +
+ + void xf86GetClocks(ScrnInfoPtr pScrn, int num, + Bool (*ClockFunc)(ScrnInfoPtr, int), + void (*ProtectRegs)(ScrnInfoPtr, Bool), + void (*BlankScreen)(ScrnInfoPtr, Bool), + int vertsyncreg, int maskval, int knownclkindex, + int knownclkvalue); + +
+ This function uses a comparative sampling method to measure the + discrete pixel clock values. The number of discrete clocks to + measure is given by num. clockFunc + is a function that selects the n'th clock. It + should also save or restore any state affected by programming the + clocks when the index passed is CLK_REG_SAVE or + CLK_REG_RESTORE. ProtectRegs is + a function that does whatever is required to protect the hardware + state while selecting a new clock. BlankScreen + is a function that blanks the screen. vertsyncreg + and maskval are the register and bitmask to + check for the presence of vertical sync pulses. + knownclkindex and knownclkvalue + are the index and value of a known clock. These are the known + references on which the comparative measurements are based. The + number of clocks probed is set in pScrn->numClocks, + and the probed clocks are set in the pScrn->clock[] + array. All of the clock values are in units of kHz. + + +
+ +
+ + void xf86ShowClocks(ScrnInfoPtr scrp, MessageType from); + +
+ Print out the pixel clocks scrp->clock[]. + from indicates whether the clocks were probed + or from the config file. + + +
+
+ + + Other helper functions + +
+ + Bool xf86IsUnblank(int mode); + +
+ Returns TRUE when the screen saver mode specified + by mode requires the screen be unblanked, + and FALSE otherwise. The screen saver modes that + require blanking are SCREEN_SAVER_ON and + SCREEN_SAVER_CYCLE, and the screen saver modes that + require unblanking are SCREEN_SAVER_OFF and + SCREEN_SAVER_FORCER. Drivers may call this helper + from their SaveScreen() function to interpret the + screen saver modes. + + +
+
+
+ + + The vgahw module + + +The vgahw modules provides an interface for saving, restoring and +programming the standard VGA registers, and for handling VGA colourmaps. + + + + Data Structures + + + The public data structures used by the vgahw module are + vgaRegRec and vgaHWRec. They are + defined in vgaHW.h. + + + + + + General vgahw Functions + +
+ + Bool vgaHWGetHWRec(ScrnInfoPtr pScrn); + +
+ This function allocates a vgaHWRec structure, and + hooks it into the ScrnInfoRec's + privates. Like all information hooked into the + privates, it is persistent, and only needs to be + allocated once per screen. This function should normally be called + from the driver's ChipPreInit() function. The + vgaHWRec is zero-allocated, and the following + fields are explicitly initialised: + + + + ModeReg.DAC[] + initialised with a default colourmap + + + ModeReg.Attribute[0x11] + initialised with the default overscan index + + + ShowOverscan + initialised according to the "ShowOverscan" option + + + paletteEnabled + initialised to FALSE + + + cmapSaved + initialised to FALSE + + + pScrn + initialised to pScrn + + + + + + In addition to the above, vgaHWSetStdFuncs() is + called to initialise the register access function fields with the + standard VGA set of functions. + + + + Once allocated, a pointer to the vgaHWRec can be + obtained from the ScrnInfoPtr with the + VGAHWPTR(pScrn) macro. + + +
+ +
+ + void vgaHWFreeHWRec(ScrnInfoPtr pScrn); + +
+ This function frees a vgaHWRec structure. It + should be called from a driver's ChipFreeScreen() + function. + + +
+ +
+ + Bool vgaHWSetRegCounts(ScrnInfoPtr pScrn, int numCRTC, + int numSequencer, int numGraphics, int numAttribute); + +
+ This function allows the number of CRTC, Sequencer, Graphics and + Attribute registers to be changed. This makes it possible for + extended registers to be saved and restored with + vgaHWSave() and vgaHWRestore(). + This function should be called after a vgaHWRec + has been allocated with vgaHWGetHWRec(). The + default values are defined in vgaHW.h as follows: + + +#define VGA_NUM_CRTC 25 +#define VGA_NUM_SEQ 5 +#define VGA_NUM_GFX 9 +#define VGA_NUM_ATTR 21 + + + +
+ +
+ + Bool vgaHWCopyReg(vgaRegPtr dst, vgaRegPtr src); + +
+ This function copies the contents of the VGA saved registers in + src to dst. Note that it isn't + possible to simply do this with memcpy() (or + similar). This function returns TRUE unless there + is a problem allocating space for the CRTC and + related fields in dst. + + +
+ +
+ + void vgaHWSetStdFuncs(vgaHWPtr hwp); + +
+ This function initialises the register access function fields of + hwp with the standard VGA set of functions. This + is called by vgaHWGetHWRec(), so there is usually + no need to call this explicitly. The register access functions + are described below. If the registers are shadowed in some other + port I/O space (for example a PCI I/O region), these functions + can be used to access the shadowed registers if + hwp->PIOOffset is initialised with + offset, calculated in such a way that when the + standard VGA I/O port value is added to it the correct offset into + the PIO area results. This value is initialised to zero in + vgaHWGetHWRec(). (Note: the PIOOffset functionality + is present in XFree86 4.1.0 and later.) + + +
+ +
+ + void vgaHWSetMmioFuncs(vgaHWPtr hwp, CARD8 *base, int offset); + +
+ This function initialised the register access function fields of + hwp with a generic MMIO set of functions. + hwp->MMIOBase is initialised with + base, which must be the virtual address that the + start of MMIO area is mapped to. hwp->MMIOOffset + is initialised with offset, which must be calculated + in such a way that when the standard VGA I/O port value is added + to it the correct offset into the MMIO area results. That means + that these functions are only suitable when the VGA I/O ports are + made available in a direct mapping to the MMIO space. If that is + not the case, the driver will need to provide its own register + access functions. The register access functions are described + below. + + +
+ +
+ + Bool vgaHWMapMem(ScrnInfoPtr pScrn); + +
+ This function maps the VGA memory window. It requires that the + vgaHWRec be allocated. If a driver requires + non-default MapPhys or MapSize + settings (the physical location and size of the VGA memory window) + then those fields of the vgaHWRec must be initialised + before calling this function. Otherwise, this function initialiases + the default values of 0xA0000 for + MapPhys and (64 * 1024) for + MapSize. This function must be called before + attempting to save or restore the VGA state. If the driver doesn't + call it explicitly, the vgaHWSave() and + vgaHWRestore() functions may call it if they need + to access the VGA memory (in which case they will also call + vgaHWUnmapMem() to unmap the VGA memory before + exiting). + + +
+ +
+ + void vgaHWUnmapMem(ScrnInfoPtr pScrn); + +
+ This function unmaps the VGA memory window. It must only be called + after the memory has been mapped. The Base field + of the vgaHWRec field is set to NULL + to indicate that the memory is no longer mapped. + + +
+ +
+ + void vgaHWGetIOBase(vgaHWPtr hwp); + +
+ This function initialises the IOBase field of the + vgaHWRec. This function must be called before + using any other functions that access the video hardware. + + + + A macro VGAHW_GET_IOBASE() is also available in + vgaHW.h that returns the I/O base, and this may + be used when the vgahw module is not loaded (for example, in the + ChipProbe() function). + + +
+ +
+ + void vgaHWUnlock(vgaHWPtr hwp); + +
+ This function unlocks the VGA CRTC[0-7] registers, + and must be called before attempting to write to those registers. + + +
+ +
+ + void vgaHWLock(vgaHWPtr hwp); + +
+ This function locks the VGA CRTC[0-7] registers. + + +
+ +
+ + void vgaHWEnable(vgaHWPtr hwp); + +
+ This function enables the VGA subsystem. (Note, this function is + present in XFree86 4.1.0 and later.). + + +
+ +
+ + void vgaHWDisable(vgaHWPtr hwp); + +
+ This function disables the VGA subsystem. (Note, this function is + present in XFree86 4.1.0 and later.). + + +
+ +
+ + void vgaHWSave(ScrnInfoPtr pScrn, vgaRegPtr save, int flags); + +
+ This function saves the VGA state. The state is written to the + vgaRegRec pointed to by save. + flags is set to one or more of the following flags + ORed together: + + + + VGA_SR_MODE + the mode setting registers are saved + + + VGA_SR_FONTS + the text mode font/text data is saved + + + VGA_SR_CMAP + the colourmap (LUT) is saved + + + VGA_SR_ALL + all of the above are saved + + + + + + The vgaHWRec and its IOBase fields + must be initialised before this function is called. If + VGA_SR_FONTS is set in flags, the + VGA memory window must be mapped. If it isn't then + vgaHWMapMem() will be called to map it, and + vgaHWUnmapMem() will be called to unmap it + afterwards. vgaHWSave() uses the three functions + below in the order vgaHWSaveColormap(), + vgaHWSaveMode(), vgaHWSaveFonts() to + carry out the different save phases. It is undecided at this + stage whether they will remain part of the vgahw module's public + interface or not. + + +
+ +
+ + void vgaHWSaveMode(ScrnInfoPtr pScrn, vgaRegPtr save); + +
+ This function saves the VGA mode registers. They are saved to + the vgaRegRec pointed to by save. + The registers saved are: + + + MiscOut + CRTC[0-0x18] + Attribute[0-0x14] + Graphics[0-8] + Sequencer[0-4] + + + + + The number of registers actually saved may be modified by a prior call + to vgaHWSetRegCounts(). + + +
+ +
+ + void vgaHWSaveFonts(ScrnInfoPtr pScrn, vgaRegPtr save); + +
+ This function saves the text mode font and text data held in the + video memory. If called while in a graphics mode, no save is + done. The VGA memory window must be mapped with + vgaHWMapMem() before to calling this function. + + + + On some platforms, one or more of the font/text plane saves may be + no-ops. This is the case when the platform's VC driver already + takes care of this. + + +
+ +
+ + void vgaHWSaveColormap(ScrnInfoPtr pScrn, vgaRegPtr save); + +
+ This function saves the VGA colourmap (LUT). Before saving it, it + attempts to verify that the colourmap is readable. In rare cases + where it isn't readable, a default colourmap is saved instead. + + +
+ +
+ + void vgaHWRestore(ScrnInfoPtr pScrn, vgaRegPtr restore, int flags); + +
+ This function programs the VGA state. The state programmed is + that contained in the vgaRegRec pointed to by + restore. flags is the same + as described above for the vgaHWSave() function. + + + + The vgaHWRec and its IOBase fields + must be initialised before this function is called. If + VGA_SR_FONTS is set in flags, the + VGA memory window must be mapped. If it isn't then + vgaHWMapMem() will be called to map it, and + vgaHWUnmapMem() will be called to unmap it + afterwards. vgaHWRestore() uses the three functions + below in the order vgaHWRestoreFonts(), + vgaHWRestoreMode(), + vgaHWRestoreColormap() to carry out the different + restore phases. It is undecided at this stage whether they will + remain part of the vgahw module's public interface or not. + + +
+ +
+ + void vgaHWRestoreMode(ScrnInfoPtr pScrn, vgaRegPtr restore); + +
+ This function restores the VGA mode registers. They are restored + from the data in the vgaRegRec pointed to by + restore. The registers restored are: + + + MiscOut + CRTC[0-0x18] + Attribute[0-0x14] + Graphics[0-8] + Sequencer[0-4] + + + + + The number of registers actually restored may be modified by a prior call + to vgaHWSetRegCounts(). + + +
+ +
+ + void vgaHWRestoreFonts(ScrnInfoPtr pScrn, vgaRegPtr restore); + +
+ This function restores the text mode font and text data to the + video memory. The VGA memory window must be mapped with + vgaHWMapMem() before to calling this function. + + + + On some platforms, one or more of the font/text plane restores + may be no-ops. This is the case when the platform's VC driver + already takes care of this. + + +
+ +
+ + void vgaHWRestoreColormap(ScrnInfoPtr pScrn, vgaRegPtr restore); + +
+ This function restores the VGA colourmap (LUT). + + +
+ +
+ + void vgaHWInit(ScrnInfoPtr pScrn, DisplayModePtr mode); + +
+ This function fills in the vgaHWRec's + ModeReg field with the values appropriate for + programming the given video mode. It requires that the + ScrnInfoRec's depth field is + initialised, which determines how the registers are programmed. + + +
+ +
+ + void vgaHWSeqReset(vgaHWPtr hwp, Bool start); + +
+ Do a VGA sequencer reset. If start is TRUE, the + reset is started. If start is FALSE, the reset + is ended. + + +
+ +
+ + void vgaHWProtect(ScrnInfoPtr pScrn, Bool on); + +
+ This function protects VGA registers and memory from corruption + during loads. It is typically called with on set to + TRUE before programming, and with on set to + FALSE after programming. + + +
+ +
+ + Bool vgaHWSaveScreen(ScreenPtr pScreen, int mode); + +
+ This function blanks and unblanks the screen. It is blanked when + mode is SCREEN_SAVER_ON or + SCREEN_SAVER_CYCLE, and unblanked when + mode is SCREEN_SAVER_OFF or + SCREEN_SAVER_FORCER. + + +
+ +
+ + void vgaHWBlankScreen(ScrnInfoPtr pScrn, Bool on); + +
+ This function blanks and unblanks the screen. It is blanked when + on is FALSE, and unblanked when + on is TRUE. This function is + provided for use in cases where the ScrnInfoRec + can't be derived from the ScreenRec (while probing + for clocks, for example). + + +
+ +
+ + + VGA Colormap Functions + + + The vgahw module uses the standard colormap support (see the + Colormap Handling section. This is initialised + with the following function: + +
+ + Bool vgaHWHandleColormaps(ScreenPtr pScreen); + +
+
+ +
+ + + VGA Register Access Functions + + + The vgahw module abstracts access to the standard VGA registers by + using a set of functions held in the vgaHWRec. When + the vgaHWRec is created these function pointers are + initialised with the set of standard VGA I/O register access functions. + In addition to these, the vgahw module includes a basic set of MMIO + register access functions, and the vgaHWRec function + pointers can be initialised to these by calling the + vgaHWSetMmioFuncs() function described above. Some + drivers/platforms may require a different set of functions for VGA + access. The access functions are described here. + + + +
+ + void writeCrtc(vgaHWPtr hwp, CARD8 index, CARD8 value); + +
+ Write value to CRTC register index. + + +
+ +
+ + CARD8 readCrtc(vgaHWPtr hwp, CARD8 index); + +
+ Return the value read from CRTC register index. + + +
+ +
+ + void writeGr(vgaHWPtr hwp, CARD8 index, CARD8 value); + +
+ Write value to Graphics Controller register + index. + + +
+ +
+ + CARD8 readGR(vgaHWPtr hwp, CARD8 index); + +
+ Return the value read from Graphics Controller register + index. + + +
+ +
+ + void writeSeq(vgaHWPtr hwp, CARD8 index, CARD8, value); + +
+ Write value to Sequencer register + index. + + +
+ +
+ + CARD8 readSeq(vgaHWPtr hwp, CARD8 index); + +
+ Return the value read from Sequencer register index. + + +
+ +
+ + void writeAttr(vgaHWPtr hwp, CARD8 index, CARD8, value); + +
+ Write value to Attribute Controller register + index. When writing out the index value this + function should set bit 5 (0x20) according to the + setting of hwp->paletteEnabled in order to + preserve the palette access state. It should be cleared when + hwp->paletteEnabled is TRUE + and set when it is FALSE. + + +
+ +
+ + CARD8 readAttr(vgaHWPtr hwp, CARD8 index); + +
+ Return the value read from Attribute Controller register + index. When writing out the index value this + function should set bit 5 (0x20) according to the + setting of hwp->paletteEnabled in order to + preserve the palette access state. It should be cleared when + hwp->paletteEnabled is TRUE + and set when it is FALSE. + + +
+ +
+ + void writeMiscOut(vgaHWPtr hwp, CARD8 value); + +
+ Write value to the Miscellaneous Output register. + + +
+ +
+ + CARD8 readMiscOut(vgwHWPtr hwp); + +
+ Return the value read from the Miscellaneous Output register. + + +
+ +
+ + void enablePalette(vgaHWPtr hwp); + +
+ Clear the palette address source bit in the Attribute Controller + index register and set hwp->paletteEnabled to + TRUE. + + +
+ +
+ + void disablePalette(vgaHWPtr hwp); + +
+ Set the palette address source bit in the Attribute Controller + index register and set hwp->paletteEnabled to + FALSE. + + +
+ +
+ + void writeDacMask(vgaHWPtr hwp, CARD8 value); + +
+ Write value to the DAC Mask register. + + +
+ +
+ + CARD8 readDacMask(vgaHWptr hwp); + +
+ Return the value read from the DAC Mask register. + + +
+ +
+ + void writeDacReadAddress(vgaHWPtr hwp, CARD8 value); + +
+ Write value to the DAC Read Address register. + + +
+ +
+ + void writeDacWriteAddress(vgaHWPtr hwp, CARD8 value); + +
+ Write value to the DAC Write Address register. + + +
+ +
+ + void writeDacData(vgaHWPtr hwp, CARD8 value); + +
+ Write value to the DAC Data register. + + +
+ +
+ + CARD8 readDacData(vgaHWptr hwp); + +
+ Return the value read from the DAC Data register. + + +
+ +
+ + CARD8 readEnable(vgaHWptr hwp); + +
+ Return the value read from the VGA Enable register. (Note: This + function is present in XFree86 4.1.0 and later.) + + +
+ +
+ + void writeEnable(vgaHWPtr hwp, CARD8 value); + +
+ Write value to the VGA Enable register. (Note: This + function is present in XFree86 4.1.0 and later.) + + +
+
+
+ + + Some notes about writing a driver + + NOTE: some parts of this are not up to date + + +The following is an outline for writing a basic unaccelerated driver +for a PCI video card with a linear mapped framebuffer, and which has a +VGA core. It is includes some general information that is relevant to +most drivers (even those which don't fit that basic description). + + + +The information here is based on the initial conversion of the Matrox +Millennium driver to the new design. For a fleshing out and sample +implementation of some of the bits outlined here, refer to that driver. +Note that this is an example only. The approach used here will not be +appropriate for all drivers. + + + +Each driver must reserve a unique driver name, and a string that is used +to prefix all of its externally visible symbols. This is to avoid name +space clashes when loading multiple drivers. The examples here are for +the ZZZ driver, which uses the ZZZ or zzz prefix for its externally +visible symbols. + + + + Include files + + + All drivers normally include the following headers: + + "xf86.h" + "xf86_OSproc.h" + "xf86_ansic.h" + "xf86Resources.h" + + Wherever inb/outb (and related things) are used the following should be + included: + + "compiler.h" + + Note: in drivers, this must be included after "xf86_ansic.h". + + + + Drivers that need to access PCI vendor/device definitions need this: + + "xf86PciInfo.h" + + + + + Drivers that need to access the PCI config space need this: + + "xf86Pci.h" + + + + + Drivers using the mi banking wrapper need: + + + "mibank.h" + + + + + Drivers that initialise a SW cursor need this: + + "mipointer.h" + + + + + All drivers implementing backing store need this: + + "mibstore.h" + + + + + All drivers using the mi colourmap code need this: + + "micmap.h" + + + + + If a driver uses the vgahw module, it needs this: + + "vgaHW.h" + + + + + Drivers supporting VGA or Hercules monochrome screens need: + + "xf1bpp.h" + + + + + Drivers supporting VGA or EGC 16-colour screens need: + + "xf4bpp.h" + + + + + Drivers using cfb need: + + #define PSZ 8 + #include "cfb.h" + #undef PSZ + + + + + Drivers supporting bpp 16, 24 or 32 with cfb need one or more of: + + "cfb16.h" + "cfb24.h" + "cfb32.h" + + + + + The driver's own header file: + + "zzz.h" + + + + + Drivers must NOT include the following: + + + "xf86Priv.h" + "xf86Privstr.h" + "xf86_libc.h" + "xf86_OSlib.h" + "Xos.h" + any OS header + + + + + + + Data structures and initialisation + + + + The following macros should be defined: + +#define VERSION <version-as-an-int> +#define ZZZ_NAME "ZZZ" /* the name used to prefix messages */ +#define ZZZ_DRIVER_NAME "zzz" /* the driver name as used in config file */ +#define ZZZ_MAJOR_VERSION <int> +#define ZZZ_MINOR_VERSION <int> +#define ZZZ_PATCHLEVEL <int> + + + + NOTE: ZZZ_DRIVER_NAME should match the name of the + driver module without things like the "lib" prefix, the "_drv" suffix + or filename extensions. + + + + + + A DriverRec must be defined, which includes the functions required + at the pre-probe phase. The name of this DriverRec must be an + upper-case version of ZZZ_DRIVER_NAME (for the purposes of static + linking). + +DriverRec ZZZ = { + VERSION, + ZZZ_DRIVER_NAME, + ZZZIdentify, + ZZZProbe, + ZZZAvailableOptions, + NULL, + 0 +}; + + + + + + Define list of supported chips and their matching ID: + +static SymTabRec ZZZChipsets[] = { + { PCI_CHIP_ZZZ1234, "zzz1234a" }, + { PCI_CHIP_ZZZ5678, "zzz5678a" }, + { -1, NULL } +}; + + + + The token field may be any integer value that the driver may use to + uniquely identify the supported chipsets. For drivers that support + only PCI devices using the PCI device IDs might be a natural choice, + but this isn't mandatory. For drivers that support both PCI and other + devices (like ISA), some other ID should probably used. When other + IDs are used as the tokens it is recommended that the names be + defined as an enum type. + + + + + + If the driver uses the xf86MatchPciInstances() + helper (recommended for drivers that support PCI cards) a list that + maps PCI IDs to chip IDs and fixed resources must be defined: + +static PciChipsets ZZZPciChipsets[] = { + { PCI_CHIP_ZZZ1234, PCI_CHIP_ZZZ1234, RES_SHARED_VGA }, + { PCI_CHIP_ZZZ5678, PCI_CHIP_ZZZ5678, RES_SHARED_VGA }, + { -1, -1, RES_UNDEFINED } +} + + + + + + + Define the XF86ModuleVersionInfo struct for the + driver. This is required for the dynamically loaded version: + +static XF86ModuleVersionInfo zzzVersRec = +{ + "zzz", + MODULEVENDORSTRING, + MODINFOSTRING1, + MODINFOSTRING2, + XF86_VERSION_CURRENT, + ZZZ_MAJOR_VERSION, ZZZ_MINOR_VERSION, ZZZ_PATCHLEVEL, + ABI_CLASS_VIDEODRV, + ABI_VIDEODRV_VERSION, + MOD_CLASS_VIDEODRV, + {0,0,0,0} +}; + + + + + + + Define a data structure to hold the driver's screen-specific data. + This must be used instead of global variables. This would be defined + in the "zzz.h" file, something like: + +typedef struct { + type1 field1; + type2 field2; + int fooHack; + Bool pciRetry; + Bool noAccel; + Bool hwCursor; + CloseScreenProcPtr CloseScreen; + OptionInfoPtr Options; + ... +} ZZZRec, *ZZZPtr; + + + + + + + Define the list of config file Options that the driver accepts. For + consistency between drivers those in the list of standard options + should be used where appropriate before inventing new options. + + +typedef enum { + OPTION_FOO_HACK, + OPTION_PCI_RETRY, + OPTION_HW_CURSOR, + OPTION_NOACCEL +} ZZZOpts; + +static const OptionInfoRec ZZZOptions[] = { + { OPTION_FOO_HACK, "FooHack", OPTV_INTEGER, {0}, FALSE }, + { OPTION_PCI_RETRY, "PciRetry", OPTV_BOOLEAN, {0}, FALSE }, + { OPTION_HW_CURSOR, "HWcursor", OPTV_BOOLEAN, {0}, FALSE }, + { OPTION_NOACCEL, "NoAccel", OPTV_BOOLEAN, {0}, FALSE }, + { -1, NULL, OPTV_NONE, {0}, FALSE } +}; + + + + + + + + Functions + + + + SetupProc + + + For dynamically loaded modules, a ModuleData + variable is required. It is should be the name of the driver + prepended to "ModuleData". A Setup() function is + also required, which calls xf86AddDriver() to add + the driver to the main list of drivers. + + + +static MODULESETUPPROTO(zzzSetup); + +XF86ModuleData zzzModuleData = { &zzzVersRec, zzzSetup, NULL }; + +static pointer +zzzSetup(pointer module, pointer opts, int *errmaj, int *errmin) +{ + static Bool setupDone = FALSE; + + /* This module should be loaded only once, but check to be sure. */ + + if (!setupDone) { + /* + * Modules that this driver always requires may be loaded + * here by calling LoadSubModule(). + */ + + setupDone = TRUE; + xf86AddDriver(&MGA, module, 0); + + /* + * The return value must be non-NULL on success even though + * there is no TearDownProc. + */ + return (pointer)1; + } else { + if (errmaj) *errmaj = LDR_ONCEONLY; + return NULL; + } +} + + + + + GetRec, FreeRec + + + A function is usually required to allocate the driver's + screen-specific data structure and hook it into the + ScrnInfoRec's driverPrivate field. + The ScrnInfoRec's driverPrivate is + initialised to NULL, so it is easy to check if the + initialisation has already been done. After allocating it, initialise + the fields. By using xnfcalloc() to do the allocation + it is zeroed, and if the allocation fails the server exits. + + + + NOTE: + When allocating structures from inside the driver which are defined + on the common level it is important to initialize the structure to + zero. + Only this guarantees that the server remains source compatible to + future changes in common level structures. + + + +static Bool +ZZZGetRec(ScrnInfoPtr pScrn) +{ + if (pScrn->driverPrivate != NULL) + return TRUE; + pScrn->driverPrivate = xnfcalloc(sizeof(ZZZRec), 1); + /* Initialise as required */ + ... + return TRUE; +} + + + + Define a macro in "zzz.h" which gets a pointer to + the ZZZRec when given pScrn: + + +#define ZZZPTR(p) ((ZZZPtr)((p)->driverPrivate)) + + + + + Define a function to free the above, setting it to NULL + once it has been freed: + + +static void +ZZZFreeRec(ScrnInfoPtr pScrn) +{ + if (pScrn->driverPrivate == NULL) + return; + xfree(pScrn->driverPrivate); + pScrn->driverPrivate = NULL; +} + + + + + + Identify + + + Define the Identify() function. It is run before + the Probe, and typically prints out an identifying message, which + might include the chipsets it supports. This function is mandatory: + + +static void +ZZZIdentify(int flags) +{ + xf86PrintChipsets(ZZZ_NAME, "driver for ZZZ Tech chipsets", + ZZZChipsets); +} + + + + + + Probe + + + Define the Probe() function. The purpose of this + is to find all instances of the hardware that the driver supports, + and for the ones not already claimed by another driver, claim the + slot, and allocate a ScrnInfoRec. This should be + a minimal probe, and it should under no circumstances leave the + state of the hardware changed. Because a device is found, don't + assume that it will be used. Don't do any initialisations other + than the required ScrnInfoRec initialisations. + Don't allocate any new data structures. + + + + This function is mandatory. + + + + NOTE: The xf86DrvMsg() functions cannot be used from + the Probe. + + + +static Bool +ZZZProbe(DriverPtr drv, int flags) +{ + Bool foundScreen = FALSE; + int numDevSections, numUsed; + GDevPtr *devSections; + int *usedChips; + int i; + + /* + * Find the config file Device sections that match this + * driver, and return if there are none. + */ + if ((numDevSections = xf86MatchDevice(ZZZ_DRIVER_NAME, + &devSections)) <= 0) { + return FALSE; + } + + /* + * Since this is a PCI card, "probing" just amounts to checking + * the PCI data that the server has already collected. If there + * is none, return. + * + * Although the config file is allowed to override things, it + * is reasonable to not allow it to override the detection + * of no PCI video cards. + * + * The provided xf86MatchPciInstances() helper takes care of + * the details. + */ + /* test if PCI bus present */ + if (xf86GetPciVideoInfo()) { + + numUsed = xf86MatchPciInstances(ZZZ_NAME, PCI_VENDOR_ZZZ, + ZZZChipsets, ZZZPciChipsets, devSections, + numDevSections, drv, &usedChips); + + for (i = 0; i < numUsed; i++) { + ScrnInfoPtr pScrn = NULL; + if ((pScrn = xf86ConfigPciEntity(pScrn, flags, usedChips[i], + ZZZPciChipsets, NULL, NULL, + NULL, NULL, NULL))) { + /* Allocate a ScrnInfoRec */ + pScrn->driverVersion = VERSION; + pScrn->driverName = ZZZ_DRIVER_NAME; + pScrn->name = ZZZ_NAME; + pScrn->Probe = ZZZProbe; + pScrn->PreInit = ZZZPreInit; + pScrn->ScreenInit = ZZZScreenInit; + pScrn->SwitchMode = ZZZSwitchMode; + pScrn->AdjustFrame = ZZZAdjustFrame; + pScrn->EnterVT = ZZZEnterVT; + pScrn->LeaveVT = ZZZLeaveVT; + pScrn->FreeScreen = ZZZFreeScreen; + pScrn->ValidMode = ZZZValidMode; + foundScreen = TRUE; + /* add screen to entity */ + } + } + xfree(usedChips); + } + +#ifdef HAS_ISA_DEVS + /* + * If the driver supports ISA hardware, the following block + * can be included too. + */ + numUsed = xf86MatchIsaInstances(ZZZ_NAME, ZZZChipsets, + ZZZIsaChipsets, drv, ZZZFindIsaDevice, + devSections, numDevSections, &usedChips); + for (i = 0; i < numUsed; i++) { + ScrnInfoPtr pScrn = NULL; + if ((pScrn = xf86ConfigIsaEntity(pScrn, flags, usedChips[i], + ZZZIsaChipsets, NULL, NULL, NULL, + NULL, NULL))) { + pScrn->driverVersion = VERSION; + pScrn->driverName = ZZZ_DRIVER_NAME; + pScrn->name = ZZZ_NAME; + pScrn->Probe = ZZZProbe; + pScrn->PreInit = ZZZPreInit; + pScrn->ScreenInit = ZZZScreenInit; + pScrn->SwitchMode = ZZZSwitchMode; + pScrn->AdjustFrame = ZZZAdjustFrame; + pScrn->EnterVT = ZZZEnterVT; + pScrn->LeaveVT = ZZZLeaveVT; + pScrn->FreeScreen = ZZZFreeScreen; + pScrn->ValidMode = ZZZValidMode; + foundScreen = TRUE; + } + } + xfree(usedChips); +#endif /* HAS_ISA_DEVS */ + + xfree(devSections); + return foundScreen; + + + + + AvailableOptions + + + Define the AvailableOptions() function. The purpose + of this is to return the available driver options back to the + -configure option, so that an xorg.conf file can be built and the + user can see which options are available for them to use. + + + + + PreInit + + + Define the PreInit() function. The purpose of + this is to find all the information required to determine if the + configuration is usable, and to initialise those parts of the + ScrnInfoRec that can be set once at the beginning + of the first server generation. The information should be found in + the least intrusive way possible. + + + + This function is mandatory. + + + + NOTES: + + + The PreInit() function is only called once + during the life of the X server (at the start of the first + generation). + + + + Data allocated here must be of the type that persists for + the life of the X server. This means that data that hooks into + the ScrnInfoRec's privates + field should be allocated here, but data that hooks into the + ScreenRec's devPrivates field + should not be allocated here. The driverPrivate + field should also be allocated here. + + + + Although the ScrnInfoRec has been allocated + before this function is called, the ScreenRec + has not been allocated. That means that things requiring it + cannot be used in this function. + + + + Very little of the ScrnInfoRec has been + initialised when this function is called. It is important to + get the order of doing things right in this function. + + + + + + +static Bool +ZZZPreInit(ScrnInfoPtr pScrn, int flags) +{ + /* Fill in the monitor field */ + pScrn->monitor = pScrn->confScreen->monitor; + + /* + * If using the vgahw module, it will typically be loaded + * here by calling xf86LoadSubModule(pScrn, "vgahw"); + */ + + /* + * Set the depth/bpp. Use the globally preferred depth/bpp. If the + * driver has special default depth/bpp requirements, the defaults should + * be specified here explicitly. + * We support both 24bpp and 32bpp framebuffer layouts. + * This sets pScrn->display also. + */ + if (!xf86SetDepthBpp(pScrn, 0, 0, 0, + Support24bppFb | Support32bppFb)) { + return FALSE; + } else { + if (depth/bpp isn't one we support) { + print error message; + return FALSE; + } + } + /* Print out the depth/bpp that was set */ + xf86PrintDepthBpp(pScrn); + + /* Set bits per RGB for 8bpp */ + if (pScrn->depth <= 8) { + /* Take into account a dac_6_bit option here */ + pScrn->rgbBits = 6 or 8; + } + + /* + * xf86SetWeight() and xf86SetDefaultVisual() must be called + * after pScrn->display is initialised. + */ + + /* Set weight/mask/offset for depth > 8 */ + if (pScrn->depth > 8) { + if (!xf86SetWeight(pScrn, defaultWeight, defaultMask)) { + return FALSE; + } else { + if (weight isn't one we support) { + print error message; + return FALSE; + } + } + } + + /* Set the default visual. */ + if (!xf86SetDefaultVisual(pScrn, -1)) { + return FALSE; + } else { + if (visual isn't one we support) { + print error message; + return FALSE; + } + } + + /* If the driver supports gamma correction, set the gamma. */ + if (!xf86SetGamma(pScrn, default_gamma)) { + return FALSE; + } + + /* This driver uses a programmable clock */ + pScrn->progClock = TRUE; + + /* Allocate the ZZZRec driverPrivate */ + if (!ZZZGetRec(pScrn)) { + return FALSE; + } + + pZzz = ZZZPTR(pScrn); + + /* Collect all of the option flags (fill in pScrn->options) */ + xf86CollectOptions(pScrn, NULL); + + /* + * Process the options based on the information in ZZZOptions. + * The results are written to pZzz->Options. If all of the options + * processing is done within this function a local variable "options" + * can be used instead of pZzz->Options. + */ + if (!(pZzz->Options = xalloc(sizeof(ZZZOptions)))) + return FALSE; + (void)memcpy(pZzz->Options, ZZZOptions, sizeof(ZZZOptions)); + xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, pZzz->Options); + + /* + * Set various fields of ScrnInfoRec and/or ZZZRec based on + * the options found. + */ + from = X_DEFAULT; + pZzz->hwCursor = FALSE; + if (xf86IsOptionSet(pZzz->Options, OPTION_HW_CURSOR)) { + from = X_CONFIG; + pZzz->hwCursor = TRUE; + } + xf86DrvMsg(pScrn->scrnIndex, from, "Using %s cursor\n", + pZzz->hwCursor ? "HW" : "SW"); + if (xf86IsOptionSet(pZzz->Options, OPTION_NOACCEL)) { + pZzz->noAccel = TRUE; + xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, + "Acceleration disabled\n"); + } else { + pZzz->noAccel = FALSE; + } + if (xf86IsOptionSet(pZzz->Options, OPTION_PCI_RETRY)) { + pZzz->UsePCIRetry = TRUE; + xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "PCI retry enabled\n"); + } + pZzz->fooHack = 0; + if (xf86GetOptValInteger(pZzz->Options, OPTION_FOO_HACK, + &pZzz->fooHack)) { + xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Foo Hack set to %d\n", + pZzz->fooHack); + } + + /* + * Find the PCI slot(s) that this screen claimed in the probe. + * In this case, exactly one is expected, so complain otherwise. + * Note in this case we're not interested in the card types so + * that parameter is set to NULL. + */ + if ((i = xf86GetPciInfoForScreen(pScrn->scrnIndex, &pciList, NULL)) + != 1) { + print error message; + ZZZFreeRec(pScrn); + if (i > 0) + xfree(pciList); + return FALSE; + } + /* Note that pciList should be freed below when no longer needed */ + + /* + * Determine the chipset, allowing config file chipset and + * chipid values to override the probed information. The config + * chipset value has precedence over its chipid value if both + * are present. + * + * It isn't necessary to fill in pScrn->chipset if the driver + * keeps track of the chipset in its ZZZRec. + */ + + ... + + /* + * Determine video memory, fb base address, I/O addresses, etc, + * allowing the config file to override probed values. + * + * Set the appropriate pScrn fields (videoRam is probably the + * most important one that other code might require), and + * print out the settings. + */ + + ... + + /* Initialise a clockRanges list. */ + + ... + + /* Set any other chipset specific things in the ZZZRec */ + + ... + + /* Select valid modes from those available */ + + i = xf86ValidateModes(pScrn, pScrn->monitor->Modes, + pScrn->display->modes, clockRanges, + NULL, minPitch, maxPitch, rounding, + minHeight, maxHeight, + pScrn->display->virtualX, + pScrn->display->virtualY, + pScrn->videoRam * 1024, + LOOKUP_BEST_REFRESH); + if (i == -1) { + ZZZFreeRec(pScrn); + return FALSE; + } + + /* Prune the modes marked as invalid */ + + xf86PruneDriverModes(pScrn); + + /* If no valid modes, return */ + + if (i == 0 || pScrn->modes == NULL) { + print error message; + ZZZFreeRec(pScrn); + return FALSE; + } + + /* + * Initialise the CRTC fields for the modes. This driver expects + * vertical values to be halved for interlaced modes. + */ + xf86SetCrtcForModes(pScrn, INTERLACE_HALVE_V); + + /* Set the current mode to the first in the list. */ + pScrn->currentMode = pScrn->modes; + + /* Print the list of modes being used. */ + xf86PrintModes(pScrn); + + /* Set the DPI */ + xf86SetDpi(pScrn, 0, 0); + + /* Load bpp-specific modules */ + switch (pScrn->bitsPerPixel) { + case 1: + mod = "xf1bpp"; + break; + case 4: + mod = "xf4bpp"; + break; + case 8: + mod = "cfb"; + break; + case 16: + mod = "cfb16"; + break; + case 24: + mod = "cfb24"; + break; + case 32: + mod = "cfb32"; + break; + } + if (mod && !xf86LoadSubModule(pScrn, mod)) + ZZZFreeRec(pScrn); + return FALSE; + + /* Load XAA if needed */ + if (!pZzz->noAccel || pZzz->hwCursor) + if (!xf86LoadSubModule(pScrn, "xaa")) { + ZZZFreeRec(pScrn); + return FALSE; + } + + /* Done */ + return TRUE; +} + + + + + MapMem, UnmapMem + + + Define functions to map and unmap the video memory and any other + memory apertures required. These functions are not mandatory, but + it is often useful to have such functions. + + + +static Bool +ZZZMapMem(ScrnInfoPtr pScrn) +{ + /* Call xf86MapPciMem() to map each PCI memory area */ + ... + return TRUE or FALSE; +} + +static Bool +ZZZUnmapMem(ScrnInfoPtr pScrn) +{ + /* Call xf86UnMapVidMem() to unmap each memory area */ + ... + return TRUE or FALSE; +} + + + + + Save, Restore + + + Define functions to save and restore the original video state. These + functions are not mandatory, but are often useful. + + + +static void +ZZZSave(ScrnInfoPtr pScrn) +{ + /* + * Save state into per-screen data structures. + * If using the vgahw module, vgaHWSave will typically be + * called here. + */ + ... +} + +static void +ZZZRestore(ScrnInfoPtr pScrn) +{ + /* + * Restore state from per-screen data structures. + * If using the vgahw module, vgaHWRestore will typically be + * called here. + */ + ... +} + + + + + ModeInit + + + Define a function to initialise a new video mode. This function isn't + mandatory, but is often useful. + + + +static Bool +ZZZModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode) +{ + /* + * Program a video mode. If using the vgahw module, + * vgaHWInit and vgaRestore will typically be called here. + * Once up to the point where there can't be a failure + * set pScrn->vtSema to TRUE. + */ + ... +} + + + + + ScreenInit + + + Define the ScreenInit() function. This is called + at the start of each server generation, and should fill in as much + of the ScreenRec as possible as well as any other + data that is initialised once per generation. It should initialise + the framebuffer layers it is using, and initialise the initial video + mode. + + + + This function is mandatory. + + + + NOTE: The ScreenRec (pScreen) is + passed to this driver, but it and the + ScrnInfoRecs are not yet hooked into each + other. This means that in this function, and functions it + calls, one cannot be found from the other. + + + +static Bool +ZZZScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) +{ + /* Get the ScrnInfoRec */ + pScrn = xf86Screens[pScreen->myNum]; + + /* + * If using the vgahw module, its data structures and related + * things are typically initialised/mapped here. + */ + + /* Save the current video state */ + ZZZSave(pScrn); + + /* Initialise the first mode */ + ZZZModeInit(pScrn, pScrn->currentMode); + + /* Set the viewport if supported */ + + ZZZAdjustFrame(scrnIndex, pScrn->frameX0, pScrn->frameY0, 0); + + /* + * Setup the screen's visuals, and initialise the framebuffer + * code. + */ + + /* Reset the visual list */ + miClearVisualTypes(); + + /* + * Setup the visuals supported. This driver only supports + * TrueColor for bpp > 8, so the default set of visuals isn't + * acceptable. To deal with this, call miSetVisualTypes with + * the appropriate visual mask. + */ + + if (pScrn->bitsPerPixel > 8) { + if (!miSetVisualTypes(pScrn->depth, TrueColorMask, + pScrn->rgbBits, pScrn->defaultVisual)) + return FALSE; + } else { + if (!miSetVisualTypes(pScrn->depth, + miGetDefaultVisualMask(pScrn->depth), + pScrn->rgbBits, pScrn->defaultVisual)) + return FALSE; + } + + /* + * Initialise the framebuffer. + */ + + switch (pScrn->bitsPerPixel) { + case 1: + ret = xf1bppScreenInit(pScreen, FbBase, + pScrn->virtualX, pScrn->virtualY, + pScrn->xDpi, pScrn->yDpi, + pScrn->displayWidth); + break; + case 4: + ret = xf4bppScreenInit(pScreen, FbBase, + pScrn->virtualX, pScrn->virtualY, + pScrn->xDpi, pScrn->yDpi, + pScrn->displayWidth); + break; + case 8: + ret = cfbScreenInit(pScreen, FbBase, + pScrn->virtualX, pScrn->virtualY, + pScrn->xDpi, pScrn->yDpi, + pScrn->displayWidth); + break; + case 16: + ret = cfb16ScreenInit(pScreen, FbBase, + pScrn->virtualX, pScrn->virtualY, + pScrn->xDpi, pScrn->yDpi, + pScrn->displayWidth); + break; + case 24: + ret = cfb24ScreenInit(pScreen, FbBase, + pScrn->virtualX, pScrn->virtualY, + pScrn->xDpi, pScrn->yDpi, + pScrn->displayWidth); + break; + case 32: + ret = cfb32ScreenInit(pScreen, FbBase, + pScrn->virtualX, pScrn->virtualY, + pScrn->xDpi, pScrn->yDpi, + pScrn->displayWidth); + break; + default: + print a message about an internal error; + ret = FALSE; + break; + } + + if (!ret) + return FALSE; + + /* Override the default mask/offset settings */ + if (pScrn->bitsPerPixel > 8) { + for (i = 0, visual = pScreen->visuals; + i < pScreen->numVisuals; i++, visual++) { + if ((visual->class | DynamicClass) == DirectColor) { + visual->offsetRed = pScrn->offset.red; + visual->offsetGreen = pScrn->offset.green; + visual->offsetBlue = pScrn->offset.blue; + visual->redMask = pScrn->mask.red; + visual->greenMask = pScrn->mask.green; + visual->blueMask = pScrn->mask.blue; + } + } + } + + /* + * If banking is needed, initialise an miBankInfoRec (defined in + * "mibank.h"), and call miInitializeBanking(). + */ + if (!miInitializeBanking(pScreen, pScrn->virtualX, pScrn->virtualY, + pScrn->displayWidth, pBankInfo)) + return FALSE; + + /* + * If backing store is to be supported (as is usually the case), + * initialise it. + */ + miInitializeBackingStore(pScreen); + + /* + * Set initial black & white colourmap indices. + */ + xf86SetBlackWhitePixels(pScreen); + + /* + * Install colourmap functions. If using the vgahw module, + * vgaHandleColormaps would usually be called here. + */ + + ... + + /* + * Initialise cursor functions. This example is for the mi + * software cursor. + */ + miDCInitialize(pScreen, xf86GetPointerScreenFuncs()); + + /* Initialise the default colourmap */ + switch (pScrn->depth) { + case 1: + if (!xf1bppCreateDefColormap(pScreen)) + return FALSE; + break; + case 4: + if (!xf4bppCreateDefColormap(pScreen)) + return FALSE; + break; + default: + if (!cfbCreateDefColormap(pScreen)) + return FALSE; + break; + } + + /* + * Wrap the CloseScreen vector and set SaveScreen. + */ + ZZZPTR(pScrn)->CloseScreen = pScreen->CloseScreen; + pScreen->CloseScreen = ZZZCloseScreen; + pScreen->SaveScreen = ZZZSaveScreen; + + /* Report any unused options (only for the first generation) */ + if (serverGeneration == 1) { + xf86ShowUnusedOptions(pScrn->scrnIndex, pScrn->options); + } + + /* Done */ + return TRUE; +} + + + + + SwitchMode + + + Define the SwitchMode() function if mode switching + is supported by the driver. + + + +static Bool +ZZZSwitchMode(int scrnIndex, DisplayModePtr mode, int flags) +{ + return ZZZModeInit(xf86Screens[scrnIndex], mode); +} + + + + + AdjustFrame + + + Define the AdjustFrame() function if the driver + supports this. + + + +static void +ZZZAdjustFrame(int scrnIndex, int x, int y, int flags) +{ + /* Adjust the viewport */ +} + + + + + EnterVT, LeaveVT + + + Define the EnterVT() and LeaveVT() + functions. + + + + These functions are mandatory. + + + +static Bool +ZZZEnterVT(int scrnIndex, int flags) +{ + ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; + return ZZZModeInit(pScrn, pScrn->currentMode); +} + +static void +ZZZLeaveVT(int scrnIndex, int flags) +{ + ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; + ZZZRestore(pScrn); +} + + + + + CloseScreen + + + Define the CloseScreen() function: + + + + This function is mandatory. Note that it unwraps the previously + wrapped pScreen->CloseScreen, and finishes by + calling it. + + + +static Bool +ZZZCloseScreen(int scrnIndex, ScreenPtr pScreen) +{ + ScrnInfoPtr pScrn = xf86Screens[scrnIndex]; + if (pScrn->vtSema) { + ZZZRestore(pScrn); + ZZZUnmapMem(pScrn); + } + pScrn->vtSema = FALSE; + pScreen->CloseScreen = ZZZPTR(pScrn)->CloseScreen; + return (*pScreen->CloseScreen)(scrnIndex, pScreen); +} + + + + + SaveScreen + + + Define the SaveScreen() function (the screen + blanking function). When using the vgahw module, this will typically + be: + + +static Bool +ZZZSaveScreen(ScreenPtr pScreen, int mode) +{ + return vgaHWSaveScreen(pScreen, mode); +} + + + + + This function is mandatory. Before modifying any hardware register + directly this function needs to make sure that the Xserver is active + by checking if pScrn is non-NULL and for + pScrn->vtSema == TRUE. + + + + + FreeScreen + + + Define the FreeScreen() function. This function + is optional. It should be defined if the ScrnInfoRec + driverPrivate field is used so that it can be freed + when a screen is deleted by the common layer for reasons possibly + beyond the driver's control. This function is not used in during + normal (error free) operation. The per-generation data is freed by + the CloseScreen() function. + + + +static void +ZZZFreeScreen(int scrnIndex, int flags) +{ + /* + * If the vgahw module is used vgaHWFreeHWRec() would be called + * here. + */ + ZZZFreeRec(xf86Screens[scrnIndex]); +} + + + + + + + + + +
diff --git a/xserver/hw/xfree86/doc/sgml/Makefile.am b/xserver/hw/xfree86/doc/sgml/Makefile.am index 09b64f7b0..5322b4263 100644 --- a/xserver/hw/xfree86/doc/sgml/Makefile.am +++ b/xserver/hw/xfree86/doc/sgml/Makefile.am @@ -19,36 +19,13 @@ # NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -SGML_FILES = DESIGN.sgml +XML_FILES = DESIGN.xml -if BUILD_LINUXDOC -TXT_FILES = $(SGML_FILES:%.sgml=%.txt) -PS_FILES = $(SGML_FILES:%.sgml=%.ps) -if BUILD_PDFDOC -PDF_FILES = $(SGML_FILES:%.sgml=%.pdf) +include ../../../../doc/xml/xmlrules.in + +if ENABLE_DEVEL_DOCS +noinst_DATA = $(BUILT_DOC_FILES) endif -HTML_FILES = $(SGML_FILES:%.sgml=%.html) +CLEANFILES = $(CLEAN_DOC_FILES) -SUFFIXES = .sgml .txt .html .ps .pdf - -.sgml.txt: - @rm -f $@ - $(AM_V_GEN)$(MAKE_TEXT) $< - -.sgml.ps: - @rm -f $@ - $(AM_V_GEN)$(MAKE_PS) $< - -.ps.pdf: - @rm -f $@ - $(AM_V_GEN)$(MAKE_PDF) $< - -.sgml.html: - @rm -f $@ - $(AM_V_GEN)$(MAKE_HTML) $< - -noinst_DATA = $(TXT_FILES) $(PS_FILES) $(PDF_FILES) $(HTML_FILES) -CLEANFILES = $(TXT_FILES) $(PS_FILES) $(PDF_FILES) $(HTML_FILES) -endif - -EXTRA_DIST = $(SGML_FILES) +EXTRA_DIST = $(XML_FILES) diff --git a/xserver/hw/xfree86/doc/sgml/Makefile.in b/xserver/hw/xfree86/doc/sgml/Makefile.in index 32c3f9d6a..99292525e 100644 --- a/xserver/hw/xfree86/doc/sgml/Makefile.in +++ b/xserver/hw/xfree86/doc/sgml/Makefile.in @@ -35,6 +35,36 @@ # NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN # CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +# +# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice (including the next +# paragraph) shall be included in all copies or substantial portions of the +# Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# + +# This file is included by Makefile.am in subdirectories that have +# DocBook XML documentation files. +# +# No files are automatically distributed or installed by this subset of rules +# Any files to be distributed or installed would be listed in the including +# Makefile.am + srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ @@ -57,8 +87,14 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +DIST_COMMON = $(srcdir)/../../../../doc/xml/xmlrules.in \ + $(srcdir)/Makefile.am $(srcdir)/Makefile.in +@HAVE_STYLESHEETS_TRUE@am__append_1 = -m $(XSL_STYLESHEET) +@HAVE_STYLESHEETS_TRUE@am__append_2 = xorg.css +@HAVE_XMLTO_TEXT_TRUE@@HAVE_XMLTO_TRUE@am__append_3 = $(TXT_FILES) +@HAVE_XMLTO_TRUE@am__append_4 = $(HTML_FILES) +@HAVE_FOP_TRUE@@HAVE_XMLTO_TRUE@am__append_5 = $(PDF_FILES) subdir = hw/xfree86/doc/sgml -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/ac_define_dir.m4 \ $(top_srcdir)/m4/dolt.m4 $(top_srcdir)/configure.ac @@ -115,10 +151,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -206,6 +238,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -220,6 +254,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -237,10 +272,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -296,10 +335,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -317,17 +357,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -354,20 +388,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -459,6 +496,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ @@ -604,20 +642,24 @@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ -SGML_FILES = DESIGN.sgml -@BUILD_LINUXDOC_TRUE@TXT_FILES = $(SGML_FILES:%.sgml=%.txt) -@BUILD_LINUXDOC_TRUE@PS_FILES = $(SGML_FILES:%.sgml=%.ps) -@BUILD_LINUXDOC_TRUE@@BUILD_PDFDOC_TRUE@PDF_FILES = $(SGML_FILES:%.sgml=%.pdf) -@BUILD_LINUXDOC_TRUE@HTML_FILES = $(SGML_FILES:%.sgml=%.html) -@BUILD_LINUXDOC_TRUE@SUFFIXES = .sgml .txt .html .ps .pdf -@BUILD_LINUXDOC_TRUE@noinst_DATA = $(TXT_FILES) $(PS_FILES) $(PDF_FILES) $(HTML_FILES) -@BUILD_LINUXDOC_TRUE@CLEANFILES = $(TXT_FILES) $(PS_FILES) $(PDF_FILES) $(HTML_FILES) -EXTRA_DIST = $(SGML_FILES) +XML_FILES = DESIGN.xml +TXT_FILES = $(XML_FILES:%.xml=%.txt) +HTML_FILES = $(XML_FILES:%.xml=%.html) +PDF_FILES = $(XML_FILES:%.xml=%.pdf) +BUILT_DOC_FILES = $(am__append_2) $(am__append_3) $(am__append_4) \ + $(am__append_5) +SUFFIXES = .xml .txt .html .pdf +XML_ENT_DIR = $(abs_top_builddir)/doc/xml +XMLTO_FLAGS = --searchpath $(XML_ENT_DIR) $(am__append_1) +CLEAN_DOC_FILES = $(TXT_FILES) $(HTML_FILES) $(PDF_FILES) xorg.css +@ENABLE_DEVEL_DOCS_TRUE@noinst_DATA = $(BUILT_DOC_FILES) +CLEANFILES = $(CLEAN_DOC_FILES) +EXTRA_DIST = $(XML_FILES) all: all-am .SUFFIXES: -.SUFFIXES: .sgml .txt .html .ps .pdf -$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) +.SUFFIXES: .xml .txt .html .pdf +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../../../../doc/xml/xmlrules.in $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ @@ -664,6 +706,7 @@ CTAGS: distdir: $(DISTFILES) + $(mkdir_p) $(distdir)/../../../../doc/xml @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ @@ -776,21 +819,23 @@ uninstall-am: uninstall-info-am uninstall-info-am -@BUILD_LINUXDOC_TRUE@.sgml.txt: -@BUILD_LINUXDOC_TRUE@ @rm -f $@ -@BUILD_LINUXDOC_TRUE@ $(AM_V_GEN)$(MAKE_TEXT) $< +@HAVE_STYLESHEETS_TRUE@xorg.css: $(STYLESHEET_SRCDIR)/xorg.css +@HAVE_STYLESHEETS_TRUE@ $(AM_V_GEN)cp -pf $(STYLESHEET_SRCDIR)/xorg.css $@ +@HAVE_XMLTO_TEXT_TRUE@@HAVE_XMLTO_TRUE@.xml.txt: +@HAVE_XMLTO_TEXT_TRUE@@HAVE_XMLTO_TRUE@ @rm -f $@ +@HAVE_XMLTO_TEXT_TRUE@@HAVE_XMLTO_TRUE@ $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) txt $< +@HAVE_XMLTO_TRUE@.xml.html: +@HAVE_XMLTO_TRUE@ @rm -f $@ +@HAVE_XMLTO_TRUE@ $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) xhtml-nochunks $< +@HAVE_FOP_TRUE@@HAVE_XMLTO_TRUE@.xml.pdf: +@HAVE_FOP_TRUE@@HAVE_XMLTO_TRUE@ @rm -f $@ +@HAVE_FOP_TRUE@@HAVE_XMLTO_TRUE@ $(AM_V_GEN)$(XMLTO) $(XMLTO_FLAGS) --with-fop pdf $< -@BUILD_LINUXDOC_TRUE@.sgml.ps: -@BUILD_LINUXDOC_TRUE@ @rm -f $@ -@BUILD_LINUXDOC_TRUE@ $(AM_V_GEN)$(MAKE_PS) $< +# All the files we build depend on the entities +$(BUILT_DOC_FILES): $(XML_ENT_DIR)/xserver.ent -@BUILD_LINUXDOC_TRUE@.ps.pdf: -@BUILD_LINUXDOC_TRUE@ @rm -f $@ -@BUILD_LINUXDOC_TRUE@ $(AM_V_GEN)$(MAKE_PDF) $< - -@BUILD_LINUXDOC_TRUE@.sgml.html: -@BUILD_LINUXDOC_TRUE@ @rm -f $@ -@BUILD_LINUXDOC_TRUE@ $(AM_V_GEN)$(MAKE_HTML) $< +$(XML_ENT_DIR)/xserver.ent: + (cd $(XML_ENT_DIR) && $(MAKE) $(AM_MAKEFLAGS) $(@F)) # 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/dri/Makefile.in b/xserver/hw/xfree86/dri/Makefile.in index e02a747c1..eba094f8f 100644 --- a/xserver/hw/xfree86/dri/Makefile.in +++ b/xserver/hw/xfree86/dri/Makefile.in @@ -120,10 +120,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -211,6 +207,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -225,6 +223,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -242,10 +241,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -301,10 +304,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -322,17 +326,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -359,20 +357,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -464,6 +465,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/xfree86/dri/dri.c b/xserver/hw/xfree86/dri/dri.c index 5a97530c2..b64b822fa 100644 --- a/xserver/hw/xfree86/dri/dri.c +++ b/xserver/hw/xfree86/dri/dri.c @@ -74,10 +74,10 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #define PCI_BUS_NO_DOMAIN(bus) ((bus) & 0xffu) static int DRIEntPrivIndex = -1; -static int DRIScreenPrivKeyIndex; -static DevPrivateKey DRIScreenPrivKey = &DRIScreenPrivKeyIndex; -static int DRIWindowPrivKeyIndex; -static DevPrivateKey DRIWindowPrivKey = &DRIWindowPrivKeyIndex; +static DevPrivateKeyRec DRIScreenPrivKeyRec; +#define DRIScreenPrivKey (&DRIScreenPrivKeyRec) +static DevPrivateKeyRec DRIWindowPrivKeyRec; +#define DRIWindowPrivKey (&DRIWindowPrivKeyRec) static unsigned long DRIGeneration = 0; static unsigned int DRIDrawableValidationStamp = 0; @@ -357,7 +357,12 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD) if (DRIGeneration != serverGeneration) DRIGeneration = serverGeneration; - pDRIPriv = (DRIScreenPrivPtr) xcalloc(1, sizeof(DRIScreenPrivRec)); + if (!dixRegisterPrivateKey(&DRIScreenPrivKeyRec, PRIVATE_SCREEN, 0)) + return FALSE; + if (!dixRegisterPrivateKey(&DRIWindowPrivKeyRec, PRIVATE_WINDOW, 0)) + return FALSE; + + pDRIPriv = (DRIScreenPrivPtr) calloc(1, sizeof(DRIScreenPrivRec)); if (!pDRIPriv) { dixSetPrivate(&pScreen->devPrivates, DRIScreenPrivKey, NULL); return FALSE; @@ -533,7 +538,7 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD) /* allocate memory for hidden context store */ pDRIPriv->hiddenContextStore - = (void *)xcalloc(1, pDRIInfo->contextSize); + = (void *)calloc(1, pDRIInfo->contextSize); if (!pDRIPriv->hiddenContextStore) { DRIDrvMsg(pScreen->myNum, X_ERROR, "failed to allocate hidden context\n"); @@ -543,11 +548,11 @@ DRIScreenInit(ScreenPtr pScreen, DRIInfoPtr pDRIInfo, int *pDRMFD) /* allocate memory for partial 3D context store */ pDRIPriv->partial3DContextStore - = (void *)xcalloc(1, pDRIInfo->contextSize); + = (void *)calloc(1, pDRIInfo->contextSize); if (!pDRIPriv->partial3DContextStore) { DRIDrvMsg(pScreen->myNum, X_ERROR, "[DRI] failed to allocate partial 3D context\n"); - xfree(pDRIPriv->hiddenContextStore); + free(pDRIPriv->hiddenContextStore); DRIDestroyContextPriv(pDRIContextPriv); return FALSE; } @@ -731,7 +736,7 @@ DRICloseScreen(ScreenPtr pScreen) } } - xfree(pDRIPriv); + free(pDRIPriv); dixSetPrivate(&pScreen->devPrivates, DRIScreenPrivKey, NULL); } } @@ -759,7 +764,7 @@ drmServerInfo DRIDRMServerInfo = { Bool DRIExtensionInit(void) { - if (!DRIScreenPrivKey || DRIGeneration != serverGeneration) { + if (DRIGeneration != serverGeneration) { return FALSE; } @@ -849,7 +854,8 @@ DRIGetClientDriverName(ScreenPtr pScreen, DRICreateContextPriv always creates a kernel drm_context_t and then calls DRICreateContextPrivFromHandle to create a DRIContextPriv structure for - DRI tracking. Any special flags are stored in the DRIContextPriv + DRI tracking. For the SIGIO handler, the drm_context_t is associated with + DRIContextPrivPtr. Any special flags are stored in the DRIContextPriv area and are passed to the kernel (if necessary). DRICreateContextPriv returns a pointer to newly allocated @@ -880,7 +886,7 @@ DRICreateContextPrivFromHandle(ScreenPtr pScreen, contextPrivSize = sizeof(DRIContextPrivRec) + pDRIPriv->pDriverInfo->contextSize; - if (!(pDRIContextPriv = xcalloc(1, contextPrivSize))) { + if (!(pDRIContextPriv = calloc(1, contextPrivSize))) { return NULL; } pDRIContextPriv->pContextStore = (void *)(pDRIContextPriv + 1); @@ -938,7 +944,7 @@ DRIDestroyContextPriv(DRIContextPrivPtr pDRIContextPriv) while in this thread, but buffers can be dispatched asynchronously. */ drmDelContextTag(pDRIPriv->drmFD, pDRIContextPriv->hwContext); - xfree(pDRIContextPriv); + free(pDRIContextPriv); return TRUE; } @@ -1130,7 +1136,7 @@ DRIDCNTreeTraversal(WindowPtr pWin, pointer data) ScreenPtr pScreen = pWin->drawable.pScreen; DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); - if (REGION_NUM_RECTS(&pWin->clipList) > 0) { + if (RegionNumRects(&pWin->clipList) > 0) { WindowPtr *pDRIWindows = (WindowPtr*)data; int i = 0; @@ -1155,18 +1161,18 @@ DRIDriverClipNotify(ScreenPtr pScreen) DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); if (pDRIPriv->pDriverInfo->ClipNotify) { - WindowPtr *pDRIWindows = xcalloc(sizeof(WindowPtr), pDRIPriv->nrWindows); + WindowPtr *pDRIWindows = calloc(sizeof(WindowPtr), pDRIPriv->nrWindows); DRIInfoPtr pDRIInfo = pDRIPriv->pDriverInfo; if (pDRIPriv->nrWindows > 0) { pDRIPriv->nrWalked = 0; - TraverseTree(WindowTable[pScreen->myNum], DRIDCNTreeTraversal, + TraverseTree(pScreen->root, DRIDCNTreeTraversal, (pointer)pDRIWindows); } pDRIInfo->ClipNotify(pScreen, pDRIWindows, pDRIPriv->nrWindows); - xfree(pDRIWindows); + free(pDRIWindows); } } @@ -1227,14 +1233,14 @@ DRICreateDrawable(ScreenPtr pScreen, ClientPtr client, DrawablePtr pDrawable, } else { /* allocate a DRI Window Private record */ - if (!(pDRIDrawablePriv = xalloc(sizeof(DRIDrawablePrivRec)))) { + if (!(pDRIDrawablePriv = malloc(sizeof(DRIDrawablePrivRec)))) { return FALSE; } /* Only create a drm_drawable_t once */ if (drmCreateDrawable(pDRIPriv->drmFD, &pDRIDrawablePriv->hwDrawable)) { - xfree(pDRIDrawablePriv); + free(pDRIDrawablePriv); return FALSE; } @@ -1242,7 +1248,7 @@ DRICreateDrawable(ScreenPtr pScreen, ClientPtr client, DrawablePtr pDrawable, pDRIDrawablePriv->pScreen = pScreen; pDRIDrawablePriv->refCount = 1; pDRIDrawablePriv->drawableIndex = -1; - pDRIDrawablePriv->nrects = REGION_NUM_RECTS(&pWin->clipList); + pDRIDrawablePriv->nrects = RegionNumRects(&pWin->clipList); /* save private off of preallocated index */ dixSetPrivate(&pWin->devPrivates, DRIWindowPrivKey, @@ -1261,8 +1267,8 @@ DRICreateDrawable(ScreenPtr pScreen, ClientPtr client, DrawablePtr pDrawable, drmUpdateDrawableInfo(pDRIPriv->drmFD, pDRIDrawablePriv->hwDrawable, DRM_DRAWABLE_CLIPRECTS, - REGION_NUM_RECTS(&pWin->clipList), - REGION_RECTS(&pWin->clipList)); + RegionNumRects(&pWin->clipList), + RegionRects(&pWin->clipList)); *hHWDrawable = pDRIDrawablePriv->hwDrawable; } } @@ -1303,7 +1309,7 @@ DRIDrawablePrivDestroy(WindowPtr pWin) drmDestroyDrawable(pDRIPriv->drmFD, pDRIDrawablePriv->hwDrawable); - xfree(pDRIDrawablePriv); + free(pDRIDrawablePriv); dixSetPrivate(&pWin->devPrivates, DRIWindowPrivKey, NULL); } @@ -1475,8 +1481,8 @@ DRIGetDrawableInfo(ScreenPtr pScreen, #endif *W = (int)(pWin->drawable.width); *H = (int)(pWin->drawable.height); - *numClipRects = REGION_NUM_RECTS(&pWin->clipList); - *pClipRects = (drm_clip_rect_t *)REGION_RECTS(&pWin->clipList); + *numClipRects = RegionNumRects(&pWin->clipList); + *pClipRects = (drm_clip_rect_t *)RegionRects(&pWin->clipList); if (!*numClipRects && pDRIPriv->fullscreen) { /* use fake full-screen clip rect */ @@ -1560,7 +1566,7 @@ DRIGetDeviceInfo(ScreenPtr pScreen, DRIInfoPtr DRICreateInfoRec(void) { - DRIInfoPtr inforec = (DRIInfoPtr)xcalloc(1, sizeof(DRIInfoRec)); + DRIInfoPtr inforec = (DRIInfoPtr)calloc(1, sizeof(DRIInfoRec)); if (!inforec) return NULL; /* Initialize defaults */ @@ -1586,8 +1592,8 @@ DRICreateInfoRec(void) void DRIDestroyInfoRec(DRIInfoPtr DRIInfo) { - if (DRIInfo->busIdString) xfree(DRIInfo->busIdString); - xfree((char*)DRIInfo); + free(DRIInfo->busIdString); + free((char*)DRIInfo); } @@ -1856,10 +1862,10 @@ DRITreeTraversal(WindowPtr pWin, pointer data) ScreenPtr pScreen = pWin->drawable.pScreen; DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); - if(REGION_NUM_RECTS(&(pWin->clipList)) > 0) { + if(RegionNumRects(&(pWin->clipList)) > 0) { RegionPtr reg = (RegionPtr)data; - REGION_UNION(pScreen, reg, reg, &(pWin->clipList)); + RegionUnion(reg, reg, &(pWin->clipList)); pDRIPriv->nrWalked++; } @@ -1905,21 +1911,21 @@ DRICopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) if(pDRIPriv->nrWindowsVisible > 0) { RegionRec reg; - REGION_NULL(pScreen, ®); + RegionNull(®); pDRIPriv->nrWalked = 0; TraverseTree(pWin, DRITreeTraversal, (pointer)(®)); - if(REGION_NOTEMPTY(pScreen, ®)) { - REGION_TRANSLATE(pScreen, ®, ptOldOrg.x - pWin->drawable.x, + if(RegionNotEmpty(®)) { + RegionTranslate(®, ptOldOrg.x - pWin->drawable.x, ptOldOrg.y - pWin->drawable.y); - REGION_INTERSECT(pScreen, ®, ®, prgnSrc); + RegionIntersect(®, ®, prgnSrc); /* The MoveBuffers interface is not ideal */ (*pDRIPriv->pDriverInfo->MoveBuffers)(pWin, ptOldOrg, ®, pDRIPriv->pDriverInfo->ddxDrawableTableEntry); } - REGION_UNINIT(pScreen, ®); + RegionUninit(®); } /* call lower wrapped functions */ @@ -2095,7 +2101,7 @@ DRIClipNotify(WindowPtr pWin, int dx, int dy) if(!pDRIPriv) return; if ((pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin))) { - int nrects = REGION_NUM_RECTS(&pWin->clipList); + int nrects = RegionNumRects(&pWin->clipList); if(!pDRIPriv->windowsTouched) { DRILockTree(pScreen); @@ -2116,7 +2122,7 @@ DRIClipNotify(WindowPtr pWin, int dx, int dy) drmUpdateDrawableInfo(pDRIPriv->drmFD, pDRIDrawablePriv->hwDrawable, DRM_DRAWABLE_CLIPRECTS, - nrects, REGION_RECTS(&pWin->clipList)); + nrects, RegionRects(&pWin->clipList)); } /* call lower wrapped functions */ @@ -2341,9 +2347,9 @@ DRIMoveBuffersHelper( BoxRec tmpBox; int y, nbox; - extents = REGION_EXTENTS(pScreen, reg); - nbox = REGION_NUM_RECTS(reg); - pbox = REGION_RECTS(reg); + extents = RegionExtents(reg); + nbox = RegionNumRects(reg); + pbox = RegionRects(reg); if((dy > 0) && (dy < (extents->y2 - extents->y1))) { *ydir = -1; @@ -2398,7 +2404,7 @@ DRICreatePCIBusID(const struct pci_device * dev) { char *busID; - busID = xalloc(20); + busID = malloc(20); if (busID == NULL) return NULL; diff --git a/xserver/hw/xfree86/dri/dristruct.h b/xserver/hw/xfree86/dri/dristruct.h index fc929c2f9..a834bbff7 100644 --- a/xserver/hw/xfree86/dri/dristruct.h +++ b/xserver/hw/xfree86/dri/dristruct.h @@ -62,7 +62,8 @@ struct _DRIContextPrivRec }; #define DRI_SCREEN_PRIV(pScreen) ((DRIScreenPrivPtr) \ - dixLookupPrivate(&(pScreen)->devPrivates, DRIScreenPrivKey)) + (dixPrivateKeyRegistered(DRIScreenPrivKey) ? \ + dixLookupPrivate(&(pScreen)->devPrivates, DRIScreenPrivKey) : NULL)) #define DRI_SCREEN_PRIV_FROM_INDEX(screenIndex) ((DRIScreenPrivPtr) \ dixLookupPrivate(&screenInfo.screens[screenIndex]->devPrivates, \ diff --git a/xserver/hw/xfree86/dri/xf86dri.c b/xserver/hw/xfree86/dri/xf86dri.c index 78003991b..f32565d3c 100644 --- a/xserver/hw/xfree86/dri/xf86dri.c +++ b/xserver/hw/xfree86/dri/xf86dri.c @@ -146,7 +146,7 @@ ProcXF86DRIQueryVersion( swapl(&rep.patchVersion, n); } WriteToClient(client, sizeof(xXF86DRIQueryVersionReply), (char *)&rep); - return (client->noClientException); + return Success; } static int @@ -185,7 +185,7 @@ ProcXF86DRIQueryDirectRenderingCapable( WriteToClient(client, sizeof(xXF86DRIQueryDirectRenderingCapableReply), (char *)&rep); - return (client->noClientException); + return Success; } static int @@ -228,7 +228,7 @@ ProcXF86DRIOpenConnection( WriteToClient(client, sizeof(xXF86DRIOpenConnectionReply), (char *)&rep); if (rep.busIdStringLength) WriteToClient(client, rep.busIdStringLength, busIdString); - return (client->noClientException); + return Success; } static int @@ -255,7 +255,7 @@ ProcXF86DRIAuthConnection( rep.authenticated = 0; } WriteToClient(client, sizeof(xXF86DRIAuthConnectionReply), (char *)&rep); - return (client->noClientException); + return Success; } static int @@ -272,7 +272,7 @@ ProcXF86DRICloseConnection( DRICloseConnection( screenInfo.screens[stuff->screen]); - return (client->noClientException); + return Success; } static int @@ -311,7 +311,7 @@ ProcXF86DRIGetClientDriverName( WriteToClient(client, rep.clientDriverNameLength, clientDriverName); - return (client->noClientException); + return Success; } static int @@ -343,7 +343,7 @@ ProcXF86DRICreateContext( } WriteToClient(client, sizeof(xXF86DRICreateContextReply), (char *)&rep); - return (client->noClientException); + return Success; } static int @@ -363,7 +363,7 @@ ProcXF86DRIDestroyContext( return BadValue; } - return (client->noClientException); + return Success; } static int @@ -397,7 +397,7 @@ ProcXF86DRICreateDrawable( } WriteToClient(client, sizeof(xXF86DRICreateDrawableReply), (char *)&rep); - return (client->noClientException); + return Success; } static int @@ -425,7 +425,7 @@ ProcXF86DRIDestroyDrawable( return BadValue; } - return (client->noClientException); + return Success; } static int @@ -490,7 +490,7 @@ ProcXF86DRIGetDrawableInfo( if (rep.numClipRects) { /* Clip cliprects to screen dimensions (redirected windows) */ - pClippedRects = xalloc(rep.numClipRects * sizeof(drm_clip_rect_t)); + pClippedRects = malloc(rep.numClipRects * sizeof(drm_clip_rect_t)); if (pClippedRects) { ScreenPtr pScreen = screenInfo.screens[stuff->screen]; @@ -524,7 +524,7 @@ ProcXF86DRIGetDrawableInfo( WriteToClient(client, sizeof(drm_clip_rect_t) * rep.numClipRects, (char *)pClippedRects); - xfree(pClippedRects); + free(pClippedRects); } if (rep.numBackClipRects) { @@ -533,7 +533,7 @@ ProcXF86DRIGetDrawableInfo( (char *)pBackClipRects); } - return (client->noClientException); + return Success; } static int @@ -584,7 +584,7 @@ ProcXF86DRIGetDeviceInfo( if (rep.length) { WriteToClient(client, rep.devPrivateSize, (char *)pDevPrivate); } - return (client->noClientException); + return Success; } static int diff --git a/xserver/hw/xfree86/dri2/Makefile.in b/xserver/hw/xfree86/dri2/Makefile.in index dd2832eea..3313a1a11 100644 --- a/xserver/hw/xfree86/dri2/Makefile.in +++ b/xserver/hw/xfree86/dri2/Makefile.in @@ -119,10 +119,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -210,6 +206,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -224,6 +222,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -241,10 +240,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -300,10 +303,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -321,17 +325,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -358,20 +356,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -463,6 +464,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/xfree86/dri2/dri2.c b/xserver/hw/xfree86/dri2/dri2.c index eef822c45..34f735f52 100644 --- a/xserver/hw/xfree86/dri2/dri2.c +++ b/xserver/hw/xfree86/dri2/dri2.c @@ -35,7 +35,9 @@ #endif #include +#ifdef WITH_LIBDRM #include +#endif #include "xf86Module.h" #include "list.h" #include "scrnintstr.h" @@ -49,12 +51,15 @@ CARD8 dri2_major; /* version of DRI2 supported by DDX */ CARD8 dri2_minor; -static int dri2ScreenPrivateKeyIndex; -static DevPrivateKey dri2ScreenPrivateKey = &dri2ScreenPrivateKeyIndex; -static int dri2WindowPrivateKeyIndex; -static DevPrivateKey dri2WindowPrivateKey = &dri2WindowPrivateKeyIndex; -static int dri2PixmapPrivateKeyIndex; -static DevPrivateKey dri2PixmapPrivateKey = &dri2PixmapPrivateKeyIndex; +static DevPrivateKeyRec dri2ScreenPrivateKeyRec; +#define dri2ScreenPrivateKey (&dri2ScreenPrivateKeyRec) + +static DevPrivateKeyRec dri2WindowPrivateKeyRec; +#define dri2WindowPrivateKey (&dri2WindowPrivateKeyRec) + +static DevPrivateKeyRec dri2PixmapPrivateKeyRec; +#define dri2PixmapPrivateKey (&dri2PixmapPrivateKeyRec) + static RESTYPE dri2DrawableRes; typedef struct _DRI2Screen *DRI2ScreenPtr; @@ -77,6 +82,7 @@ typedef struct _DRI2Drawable { CARD64 last_swap_msc; /* msc at completion of most recent swap */ CARD64 last_swap_ust; /* ust at completion of most recent swap */ int swap_limit; /* for N-buffering */ + unsigned long serialNumber; } DRI2DrawableRec, *DRI2DrawablePtr; typedef struct _DRI2Screen { @@ -94,8 +100,11 @@ typedef struct _DRI2Screen { DRI2ScheduleSwapProcPtr ScheduleSwap; DRI2GetMSCProcPtr GetMSC; DRI2ScheduleWaitMSCProcPtr ScheduleWaitMSC; + DRI2AuthMagicProcPtr AuthMagic; HandleExposuresProcPtr HandleExposures; + + ConfigNotifyProcPtr ConfigNotify; } DRI2ScreenRec; static DRI2ScreenPtr @@ -110,15 +119,31 @@ DRI2GetDrawable(DrawablePtr pDraw) WindowPtr pWin; PixmapPtr pPixmap; - if (pDraw->type == DRAWABLE_WINDOW) { + switch (pDraw->type) { + case DRAWABLE_WINDOW: pWin = (WindowPtr) pDraw; return dixLookupPrivate(&pWin->devPrivates, dri2WindowPrivateKey); - } else { + case DRAWABLE_PIXMAP: pPixmap = (PixmapPtr) pDraw; return dixLookupPrivate(&pPixmap->devPrivates, dri2PixmapPrivateKey); + default: + return NULL; } } +static unsigned long +DRI2DrawableSerial(DrawablePtr pDraw) +{ + ScreenPtr pScreen = pDraw->pScreen; + PixmapPtr pPix; + + if (pDraw->type != DRAWABLE_WINDOW) + return pDraw->serialNumber; + + pPix = pScreen->GetWindowPixmap((WindowPtr)pDraw); + return pPix->drawable.serialNumber; +} + static DRI2DrawablePtr DRI2AllocateDrawable(DrawablePtr pDraw) { @@ -128,7 +153,7 @@ DRI2AllocateDrawable(DrawablePtr pDraw) WindowPtr pWin; PixmapPtr pPixmap; - pPriv = xalloc(sizeof *pPriv); + pPriv = malloc(sizeof *pPriv); if (pPriv == NULL) return NULL; @@ -152,6 +177,7 @@ DRI2AllocateDrawable(DrawablePtr pDraw) pPriv->last_swap_msc = 0; pPriv->last_swap_ust = 0; list_init(&pPriv->reference_list); + pPriv->serialNumber = DRI2DrawableSerial(pDraw); if (pDraw->type == DRAWABLE_WINDOW) { pWin = (WindowPtr) pDraw; @@ -165,9 +191,11 @@ DRI2AllocateDrawable(DrawablePtr pDraw) } typedef struct DRI2DrawableRefRec { - XID id; - XID dri2_id; - struct list link; + XID id; + XID dri2_id; + DRI2InvalidateProcPtr invalidate; + void *priv; + struct list link; } DRI2DrawableRefRec, *DRI2DrawableRefPtr; static DRI2DrawableRefPtr @@ -184,7 +212,8 @@ DRI2LookupDrawableRef(DRI2DrawablePtr pPriv, XID id) } static int -DRI2AddDrawableRef(DRI2DrawablePtr pPriv, XID id, XID dri2_id) +DRI2AddDrawableRef(DRI2DrawablePtr pPriv, XID id, XID dri2_id, + DRI2InvalidateProcPtr invalidate, void *priv) { DRI2DrawableRefPtr ref; @@ -200,13 +229,16 @@ DRI2AddDrawableRef(DRI2DrawablePtr pPriv, XID id, XID dri2_id) ref->id = id; ref->dri2_id = dri2_id; + ref->invalidate = invalidate; + ref->priv = priv; list_add(&ref->link, &pPriv->reference_list); return Success; } int -DRI2CreateDrawable(ClientPtr client, DrawablePtr pDraw, XID id) +DRI2CreateDrawable(ClientPtr client, DrawablePtr pDraw, XID id, + DRI2InvalidateProcPtr invalidate, void *priv) { DRI2DrawablePtr pPriv; XID dri2_id; @@ -219,7 +251,7 @@ DRI2CreateDrawable(ClientPtr client, DrawablePtr pDraw, XID id) return BadAlloc; dri2_id = FakeClientID(client->index); - rc = DRI2AddDrawableRef(pPriv, id, dri2_id); + rc = DRI2AddDrawableRef(pPriv, id, dri2_id, invalidate, priv); if (rc != Success) return rc; @@ -270,10 +302,10 @@ static int DRI2DrawableGone(pointer p, XID id) for (i = 0; i < pPriv->bufferCount; i++) (*ds->DestroyBuffer)(pDraw, pPriv->buffers[i]); - xfree(pPriv->buffers); + free(pPriv->buffers); } - xfree(pPriv); + free(pPriv); return Success; } @@ -309,6 +341,7 @@ allocate_or_reuse_buffer(DrawablePtr pDraw, DRI2ScreenPtr ds, || !dimensions_match || (pPriv->buffers[old_buf]->format != format)) { *buffer = (*ds->CreateBuffer)(pDraw, attachment, format); + pPriv->serialNumber = DRI2DrawableSerial(pDraw); return TRUE; } else { @@ -318,6 +351,31 @@ allocate_or_reuse_buffer(DrawablePtr pDraw, DRI2ScreenPtr ds, } } +static void +update_dri2_drawable_buffers(DRI2DrawablePtr pPriv, DrawablePtr pDraw, + DRI2BufferPtr *buffers, int *out_count, int *width, int *height) +{ + DRI2ScreenPtr ds = DRI2GetScreen(pDraw->pScreen); + int i; + + if (pPriv->buffers != NULL) { + for (i = 0; i < pPriv->bufferCount; i++) { + if (pPriv->buffers[i] != NULL) { + (*ds->DestroyBuffer)(pDraw, pPriv->buffers[i]); + } + } + + free(pPriv->buffers); + } + + pPriv->buffers = buffers; + pPriv->bufferCount = *out_count; + pPriv->width = pDraw->width; + pPriv->height = pDraw->height; + *width = pPriv->width; + *height = pPriv->height; +} + static DRI2BufferPtr * do_get_buffers(DrawablePtr pDraw, int *width, int *height, unsigned int *attachments, int count, int *out_count, @@ -342,9 +400,10 @@ do_get_buffers(DrawablePtr pDraw, int *width, int *height, } dimensions_match = (pDraw->width == pPriv->width) - && (pDraw->height == pPriv->height); + && (pDraw->height == pPriv->height) + && (pPriv->serialNumber == DRI2DrawableSerial(pDraw)); - buffers = xalloc((count + 1) * sizeof(buffers[0])); + buffers = malloc((count + 1) * sizeof(buffers[0])); for (i = 0; i < count; i++) { const unsigned attachment = *(attachments++); @@ -355,6 +414,9 @@ do_get_buffers(DrawablePtr pDraw, int *width, int *height, &buffers[i])) buffers_changed = 1; + if (buffers[i] == NULL) + goto err_out; + /* If the drawable is a window and the front-buffer is requested, * silently add the fake front-buffer to the list of requested * attachments. The counting logic in the loop accounts for the case @@ -385,39 +447,30 @@ do_get_buffers(DrawablePtr pDraw, int *width, int *height, if (need_real_front > 0) { if (allocate_or_reuse_buffer(pDraw, ds, pPriv, DRI2BufferFrontLeft, front_format, dimensions_match, - &buffers[i++])) + &buffers[i])) buffers_changed = 1; + + if (buffers[i] == NULL) + goto err_out; + i++; } if (need_fake_front > 0) { if (allocate_or_reuse_buffer(pDraw, ds, pPriv, DRI2BufferFakeFrontLeft, front_format, dimensions_match, - &buffers[i++])) + &buffers[i])) buffers_changed = 1; + if (buffers[i] == NULL) + goto err_out; + + i++; have_fake_front = 1; } *out_count = i; - - if (pPriv->buffers != NULL) { - for (i = 0; i < pPriv->bufferCount; i++) { - if (pPriv->buffers[i] != NULL) { - (*ds->DestroyBuffer)(pDraw, pPriv->buffers[i]); - } - } - - xfree(pPriv->buffers); - } - - pPriv->buffers = buffers; - pPriv->bufferCount = *out_count; - pPriv->width = pDraw->width; - pPriv->height = pDraw->height; - *width = pPriv->width; - *height = pPriv->height; - + update_dri2_drawable_buffers(pPriv, pDraw, buffers, out_count, width, height); /* If the client is getting a fake front-buffer, pre-fill it with the * contents of the real front-buffer. This ensures correct operation of @@ -431,13 +484,29 @@ do_get_buffers(DrawablePtr pDraw, int *width, int *height, box.y1 = 0; box.x2 = pPriv->width; box.y2 = pPriv->height; - REGION_INIT(pDraw->pScreen, ®ion, &box, 0); + RegionInit(®ion, &box, 0); DRI2CopyRegion(pDraw, ®ion, DRI2BufferFakeFrontLeft, DRI2BufferFrontLeft); } return pPriv->buffers; + +err_out: + + *out_count = 0; + + for (i = 0; i < count; i++) { + if (buffers[i] != NULL) + (*ds->DestroyBuffer)(pDraw, buffers[i]); + } + + free(buffers); + buffers = NULL; + + update_dri2_drawable_buffers(pPriv, pDraw, buffers, out_count, width, height); + + return buffers; } DRI2BufferPtr * @@ -456,6 +525,19 @@ DRI2GetBuffersWithFormat(DrawablePtr pDraw, int *width, int *height, out_count, TRUE); } +static void +DRI2InvalidateDrawable(DrawablePtr pDraw) +{ + DRI2DrawablePtr pPriv = DRI2GetDrawable(pDraw); + DRI2DrawableRefPtr ref; + + if (!pPriv) + return; + + list_for_each_entry(ref, &pPriv->reference_list, link) + ref->invalidate(pDraw, ref->priv); +} + /* * In the direct rendered case, we throttle the clients that have more * than their share of outstanding swaps (and thus busy buffers) when a @@ -548,14 +630,14 @@ DRI2CanFlip(DrawablePtr pDraw) if (pDraw->type == DRAWABLE_PIXMAP) return TRUE; - pRoot = WindowTable[pScreen->myNum]; + pRoot = pScreen->root; pRootPixmap = pScreen->GetWindowPixmap(pRoot); pWin = (WindowPtr) pDraw; pWinPixmap = pScreen->GetWindowPixmap(pWin); if (pRootPixmap != pWinPixmap) return FALSE; - if (!REGION_EQUAL(pScreen, &pWin->clipList, &pRoot->winSize)) + if (!RegionEqual(&pWin->clipList, &pRoot->winSize)) return FALSE; return TRUE; @@ -586,7 +668,6 @@ DRI2WaitMSCComplete(ClientPtr client, DrawablePtr pDraw, int frame, pPriv->blockedClient = NULL; pPriv->blockedOnMsc = FALSE; - } static void @@ -635,6 +716,8 @@ DRI2SwapComplete(ClientPtr client, DrawablePtr pDraw, int frame, ScreenPtr pScreen = pDraw->pScreen; DRI2DrawablePtr pPriv; CARD64 ust = 0; + BoxRec box; + RegionRec region; pPriv = DRI2GetDrawable(pDraw); if (pPriv == NULL) { @@ -646,6 +729,14 @@ DRI2SwapComplete(ClientPtr client, DrawablePtr pDraw, int frame, pPriv->swapsPending--; pPriv->swap_count++; + box.x1 = 0; + box.y1 = 0; + box.x2 = pDraw->width; + box.y2 = pDraw->height; + RegionInit(®ion, &box, 0); + DRI2CopyRegion(pDraw, ®ion, DRI2BufferFakeFrontLeft, + DRI2BufferFrontLeft); + ust = ((CARD64)tv_sec * 1000000) + tv_usec; if (swap_complete) swap_complete(client, swap_data, type, ust, frame, pPriv->swap_count); @@ -715,7 +806,7 @@ DRI2SwapBuffers(ClientPtr client, DrawablePtr pDraw, CARD64 target_msc, box.y1 = 0; box.x2 = pDraw->width; box.y2 = pDraw->height; - REGION_INIT(pScreen, ®ion, &box, 0); + RegionInit(®ion, &box, 0); pPriv->swapsPending++; @@ -772,6 +863,8 @@ DRI2SwapBuffers(ClientPtr client, DrawablePtr pDraw, CARD64 target_msc, */ *swap_target = pPriv->swap_count + pPriv->swapsPending; + DRI2InvalidateDrawable(pDraw); + return Success; } @@ -889,15 +982,19 @@ DRI2HasSwapControl(ScreenPtr pScreen) { DRI2ScreenPtr ds = DRI2GetScreen(pScreen); - return (ds->ScheduleSwap && ds->GetMSC); + return ds->ScheduleSwap && ds->GetMSC; } Bool DRI2Connect(ScreenPtr pScreen, unsigned int driverType, int *fd, const char **driverName, const char **deviceName) { - DRI2ScreenPtr ds = DRI2GetScreen(pScreen); + DRI2ScreenPtr ds; + if (!dixPrivateKeyRegistered(dri2ScreenPrivateKey)) + return FALSE; + + ds = DRI2GetScreen(pScreen); if (ds == NULL || driverType >= ds->numDrivers || !ds->driverNames[driverType]) return FALSE; @@ -910,16 +1007,44 @@ DRI2Connect(ScreenPtr pScreen, unsigned int driverType, int *fd, } Bool -DRI2Authenticate(ScreenPtr pScreen, drm_magic_t magic) +DRI2Authenticate(ScreenPtr pScreen, uint32_t magic) { DRI2ScreenPtr ds = DRI2GetScreen(pScreen); - if (ds == NULL || drmAuthMagic(ds->fd, magic)) - return FALSE; + if (ds == NULL || (*ds->AuthMagic)(ds->fd, magic)) + return FALSE; return TRUE; } +static int +DRI2ConfigNotify(WindowPtr pWin, int x, int y, int w, int h, int bw, + WindowPtr pSib) +{ + DrawablePtr pDraw = (DrawablePtr)pWin; + ScreenPtr pScreen = pDraw->pScreen; + DRI2ScreenPtr ds = DRI2GetScreen(pScreen); + DRI2DrawablePtr dd = DRI2GetDrawable(pDraw); + int ret; + + if (ds->ConfigNotify) { + pScreen->ConfigNotify = ds->ConfigNotify; + + ret = (*pScreen->ConfigNotify)(pWin, x, y, w, h, bw, pSib); + + ds->ConfigNotify = pScreen->ConfigNotify; + pScreen->ConfigNotify = DRI2ConfigNotify; + if (ret) + return ret; + } + + if (!dd || (dd->width == w && dd->height == h)) + return Success; + + DRI2InvalidateDrawable(pDraw); + return Success; +} + Bool DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info) { @@ -940,7 +1065,16 @@ DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info) return FALSE; } - ds = xcalloc(1, sizeof *ds); + if (!dixRegisterPrivateKey(&dri2ScreenPrivateKeyRec, PRIVATE_SCREEN, 0)) + return FALSE; + + if (!dixRegisterPrivateKey(&dri2WindowPrivateKeyRec, PRIVATE_WINDOW, 0)) + return FALSE; + + if (!dixRegisterPrivateKey(&dri2PixmapPrivateKeyRec, PRIVATE_PIXMAP, 0)) + return FALSE; + + ds = calloc(1, sizeof *ds); if (!ds) return FALSE; @@ -957,11 +1091,26 @@ DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info) ds->ScheduleSwap = info->ScheduleSwap; ds->ScheduleWaitMSC = info->ScheduleWaitMSC; ds->GetMSC = info->GetMSC; - cur_minor = 2; + cur_minor = 3; } else { cur_minor = 1; } + if (info->version >= 5) { + ds->AuthMagic = info->AuthMagic; + } + + /* + * if the driver doesn't provide an AuthMagic function or the info struct + * version is too low, it relies on the old method (using libdrm) or fail + */ + if (!ds->AuthMagic) +#ifdef WITH_LIBDRM + ds->AuthMagic = drmAuthMagic; +#else + goto err_out; +#endif + /* Initialize minor if needed and set to minimum provied by DDX */ if (!dri2_minor || dri2_minor > cur_minor) dri2_minor = cur_minor; @@ -969,25 +1118,24 @@ DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info) if (info->version == 3 || info->numDrivers == 0) { /* Driver too old: use the old-style driverName field */ ds->numDrivers = 1; - ds->driverNames = xalloc(sizeof(*ds->driverNames)); - if (!ds->driverNames) { - xfree(ds); - return FALSE; - } + ds->driverNames = malloc(sizeof(*ds->driverNames)); + if (!ds->driverNames) + goto err_out; ds->driverNames[0] = info->driverName; } else { ds->numDrivers = info->numDrivers; - ds->driverNames = xalloc(info->numDrivers * sizeof(*ds->driverNames)); - if (!ds->driverNames) { - xfree(ds); - return FALSE; - } + ds->driverNames = malloc(info->numDrivers * sizeof(*ds->driverNames)); + if (!ds->driverNames) + goto err_out; memcpy(ds->driverNames, info->driverNames, info->numDrivers * sizeof(*ds->driverNames)); } dixSetPrivate(&pScreen->devPrivates, dri2ScreenPrivateKey, ds); + ds->ConfigNotify = pScreen->ConfigNotify; + pScreen->ConfigNotify = DRI2ConfigNotify; + 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]) { @@ -997,6 +1145,12 @@ DRI2ScreenInit(ScreenPtr pScreen, DRI2InfoPtr info) } return TRUE; + +err_out: + xf86DrvMsg(pScreen->myNum, X_WARNING, + "[DRI2] Initialization failed for info version %d.\n", info->version); + free(ds); + return FALSE; } void @@ -1004,8 +1158,8 @@ DRI2CloseScreen(ScreenPtr pScreen) { DRI2ScreenPtr ds = DRI2GetScreen(pScreen); - xfree(ds->driverNames); - xfree(ds); + free(ds->driverNames); + free(ds); dixSetPrivate(&pScreen->devPrivates, dri2ScreenPrivateKey, NULL); } diff --git a/xserver/hw/xfree86/dri2/dri2.h b/xserver/hw/xfree86/dri2/dri2.h index b50cb0720..fe0bf6ccb 100644 --- a/xserver/hw/xfree86/dri2/dri2.h +++ b/xserver/hw/xfree86/dri2/dri2.h @@ -66,6 +66,8 @@ typedef void (*DRI2CopyRegionProcPtr)(DrawablePtr pDraw, DRI2BufferPtr pSrcBuffer); typedef void (*DRI2WaitProcPtr)(WindowPtr pWin, unsigned int sequence); +typedef int (*DRI2AuthMagicProcPtr)(int fd, uint32_t magic); + /** * Schedule a buffer swap * @@ -152,10 +154,14 @@ typedef int (*DRI2ScheduleWaitMSCProcPtr)(ClientPtr client, CARD64 target_msc, CARD64 divisor, CARD64 remainder); + +typedef void (*DRI2InvalidateProcPtr)(DrawablePtr pDraw, + void *data); + /** * Version of the DRI2InfoRec structure defined in this header */ -#define DRI2INFOREC_VERSION 4 +#define DRI2INFOREC_VERSION 5 typedef struct { unsigned int version; /**< Version of this struct */ @@ -179,6 +185,10 @@ typedef struct { /* array of driver names, indexed by DRI2Driver* driver types */ /* a name of NULL means that driver is not supported */ const char * const *driverNames; + + /* added in version 5 */ + + DRI2AuthMagicProcPtr AuthMagic; } DRI2InfoRec, *DRI2InfoPtr; extern _X_EXPORT int DRI2EventBase; @@ -196,10 +206,13 @@ extern _X_EXPORT Bool DRI2Connect(ScreenPtr pScreen, const char **driverName, const char **deviceName); -extern _X_EXPORT Bool DRI2Authenticate(ScreenPtr pScreen, drm_magic_t magic); +extern _X_EXPORT Bool DRI2Authenticate(ScreenPtr pScreen, uint32_t magic); extern _X_EXPORT int DRI2CreateDrawable(ClientPtr client, - DrawablePtr pDraw, XID id); + DrawablePtr pDraw, + XID id, + DRI2InvalidateProcPtr invalidate, + void *priv); extern _X_EXPORT void DRI2DestroyDrawable(DrawablePtr pDraw); diff --git a/xserver/hw/xfree86/dri2/dri2ext.c b/xserver/hw/xfree86/dri2/dri2ext.c index 3f5af699b..4e48e65b2 100644 --- a/xserver/hw/xfree86/dri2/dri2ext.c +++ b/xserver/hw/xfree86/dri2/dri2ext.c @@ -42,7 +42,6 @@ #include "scrnintstr.h" #include "pixmapstr.h" #include "extnsionst.h" -#include "xf86drm.h" #include "xfixes.h" #include "dri2.h" #include "protocol-versions.h" @@ -56,7 +55,9 @@ static Bool validDrawable(ClientPtr client, XID drawable, Mask access_mode, DrawablePtr *pDrawable, int *status) { - *status = dixLookupDrawable(pDrawable, drawable, client, 0, access_mode); + *status = dixLookupDrawable(pDrawable, drawable, client, + M_DRAWABLE_WINDOW | M_DRAWABLE_PIXMAP, + access_mode); if (*status != Success) { client->errorValue = drawable; return FALSE; @@ -91,7 +92,7 @@ ProcDRI2QueryVersion(ClientPtr client) WriteToClient(client, sizeof(xDRI2QueryVersionReply), &rep); - return client->noClientException; + return Success; } static int @@ -129,7 +130,7 @@ ProcDRI2Connect(ClientPtr client) WriteToClient(client, rep.driverNameLength, driverName); WriteToClient(client, rep.deviceNameLength, deviceName); - return client->noClientException; + return Success; } static int @@ -151,7 +152,19 @@ ProcDRI2Authenticate(ClientPtr client) rep.authenticated = DRI2Authenticate(pDraw->pScreen, stuff->magic); WriteToClient(client, sizeof(xDRI2AuthenticateReply), &rep); - return client->noClientException; + return Success; +} + +static void +DRI2InvalidateBuffersEvent(DrawablePtr pDraw, void *priv) +{ + xDRI2InvalidateBuffers event; + ClientPtr client = priv; + + event.type = DRI2EventBase + DRI2_InvalidateBuffers; + event.drawable = pDraw->id; + + WriteEventsToClient(client, 1, (xEvent *)&event); } static int @@ -167,11 +180,12 @@ ProcDRI2CreateDrawable(ClientPtr client) &pDrawable, &status)) return status; - status = DRI2CreateDrawable(client, pDrawable, stuff->drawable); + status = DRI2CreateDrawable(client, pDrawable, stuff->drawable, + DRI2InvalidateBuffersEvent, client); if (status != Success) return status; - return client->noClientException; + return Success; } static int @@ -186,11 +200,11 @@ ProcDRI2DestroyDrawable(ClientPtr client) &pDrawable, &status)) return status; - return client->noClientException; + return Success; } -static void +static int send_buffers_reply(ClientPtr client, DrawablePtr pDrawable, DRI2BufferPtr *buffers, int count, int width, int height) { @@ -198,6 +212,9 @@ send_buffers_reply(ClientPtr client, DrawablePtr pDrawable, int skip = 0; int i; + if (buffers == NULL) + return BadAlloc; + if (pDrawable->type == DRAWABLE_WINDOW) { for (i = 0; i < count; i++) { /* Do not send the real front buffer of a window to the client. @@ -234,6 +251,7 @@ send_buffers_reply(ClientPtr client, DrawablePtr pDrawable, buffer.flags = buffers[i]->flags; WriteToClient(client, sizeof(xDRI2Buffer), &buffer); } + return Success; } @@ -252,16 +270,15 @@ ProcDRI2GetBuffers(ClientPtr client) return status; if (DRI2ThrottleClient(client, pDrawable)) - return client->noClientException; + return Success; attachments = (unsigned int *) &stuff[1]; buffers = DRI2GetBuffers(pDrawable, &width, &height, attachments, stuff->count, &count); - send_buffers_reply(client, pDrawable, buffers, count, width, height); + return send_buffers_reply(client, pDrawable, buffers, count, width, height); - return client->noClientException; } static int @@ -279,15 +296,13 @@ ProcDRI2GetBuffersWithFormat(ClientPtr client) return status; if (DRI2ThrottleClient(client, pDrawable)) - return client->noClientException; + return Success; attachments = (unsigned int *) &stuff[1]; buffers = DRI2GetBuffersWithFormat(pDrawable, &width, &height, attachments, stuff->count, &count); - send_buffers_reply(client, pDrawable, buffers, count, width, height); - - return client->noClientException; + return send_buffers_reply(client, pDrawable, buffers, count, width, height); } static int @@ -324,7 +339,7 @@ ProcDRI2CopyRegion(ClientPtr client) WriteToClient(client, sizeof(xDRI2CopyRegionReply), &rep); - return client->noClientException; + return Success; } static void @@ -348,7 +363,6 @@ DRI2SwapEvent(ClientPtr client, void *data, int type, CARD64 ust, CARD64 msc, DrawablePtr pDrawable = data; event.type = DRI2EventBase + DRI2_BufferSwapComplete; - event.sequenceNumber = client->sequence; event.event_type = type; event.drawable = pDrawable->id; event.ust_hi = (CARD64)ust >> 32; @@ -381,7 +395,7 @@ ProcDRI2SwapBuffers(ClientPtr client) * also orders swaps. */ if (DRI2ThrottleClient(client, pDrawable)) - return client->noClientException; + return Success; target_msc = vals_to_card64(stuff->target_msc_lo, stuff->target_msc_hi); divisor = vals_to_card64(stuff->divisor_lo, stuff->divisor_hi); @@ -399,7 +413,7 @@ ProcDRI2SwapBuffers(ClientPtr client) WriteToClient(client, sizeof(xDRI2SwapBuffersReply), &rep); - return client->noClientException; + return Success; } static void @@ -439,7 +453,7 @@ ProcDRI2GetMSC(ClientPtr client) WriteToClient(client, sizeof(xDRI2MSCReply), &rep); - return client->noClientException; + return Success; } static int @@ -466,7 +480,7 @@ ProcDRI2WaitMSC(ClientPtr client) if (status != Success) return status; - return client->noClientException; + return Success; } int @@ -481,7 +495,7 @@ ProcDRI2WaitMSCReply(ClientPtr client, CARD64 ust, CARD64 msc, CARD64 sbc) WriteToClient(client, sizeof(xDRI2MSCReply), &rep); - return client->noClientException; + return Success; } static int @@ -501,7 +515,7 @@ ProcDRI2SwapInterval(ClientPtr client) DRI2SwapInterval(pDrawable, stuff->interval); - return client->noClientException; + return Success; } static int @@ -586,7 +600,7 @@ SProcDRI2Connect(ClientPtr client) rep.driverNameLength = 0; rep.deviceNameLength = 0; - return client->noClientException; + return Success; } static int diff --git a/xserver/hw/xfree86/exa/Makefile.in b/xserver/hw/xfree86/exa/Makefile.in index 1f6a2e508..6730b42a1 100644 --- a/xserver/hw/xfree86/exa/Makefile.in +++ b/xserver/hw/xfree86/exa/Makefile.in @@ -123,10 +123,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -214,6 +210,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -228,6 +226,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -245,10 +244,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -304,10 +307,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -325,17 +329,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -362,20 +360,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -467,6 +468,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/xfree86/exa/examodule.c b/xserver/hw/xfree86/exa/examodule.c index bcb6a405c..83f72b5e1 100644 --- a/xserver/hw/xfree86/exa/examodule.c +++ b/xserver/hw/xfree86/exa/examodule.c @@ -42,8 +42,8 @@ typedef struct _ExaXorgScreenPrivRec { OptionInfoPtr options; } ExaXorgScreenPrivRec, *ExaXorgScreenPrivPtr; -static int exaXorgScreenPrivateKeyIndex; -static DevPrivateKey exaXorgScreenPrivateKey = &exaXorgScreenPrivateKeyIndex; +static DevPrivateKeyRec exaXorgScreenPrivateKeyRec; +#define exaXorgScreenPrivateKey (&exaXorgScreenPrivateKeyRec) typedef enum { EXAOPT_MIGRATION_HEURISTIC, @@ -79,8 +79,8 @@ exaXorgCloseScreen (int i, ScreenPtr pScreen) pScrn->EnableDisableFBAccess = pScreenPriv->SavedEnableDisableFBAccess; - xfree (pScreenPriv->options); - xfree (pScreenPriv); + free(pScreenPriv->options); + free(pScreenPriv); return pScreen->CloseScreen (i, pScreen); } @@ -114,7 +114,10 @@ exaDDXDriverInit(ScreenPtr pScreen) ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; ExaXorgScreenPrivPtr pScreenPriv; - pScreenPriv = xcalloc (1, sizeof(ExaXorgScreenPrivRec)); + if (!dixRegisterPrivateKey(&exaXorgScreenPrivateKeyRec, PRIVATE_SCREEN, 0)) + return; + + pScreenPriv = calloc(1, sizeof(ExaXorgScreenPrivRec)); if (pScreenPriv == NULL) return; diff --git a/xserver/hw/xfree86/fbdevhw/Makefile.am b/xserver/hw/xfree86/fbdevhw/Makefile.am index 066352556..76a69c1fb 100644 --- a/xserver/hw/xfree86/fbdevhw/Makefile.am +++ b/xserver/hw/xfree86/fbdevhw/Makefile.am @@ -1,5 +1,4 @@ -linuxmoduledir = $(moduledir)/linux -linuxmodule_LTLIBRARIES = libfbdevhw.la +module_LTLIBRARIES = libfbdevhw.la libfbdevhw_la_LDFLAGS = -avoid-version diff --git a/xserver/hw/xfree86/fbdevhw/Makefile.in b/xserver/hw/xfree86/fbdevhw/Makefile.in index 9ddadb8aa..6b101c8fe 100644 --- a/xserver/hw/xfree86/fbdevhw/Makefile.in +++ b/xserver/hw/xfree86/fbdevhw/Makefile.in @@ -66,10 +66,10 @@ am__vpath_adj = case $$p in \ *) f=$$p;; \ esac; am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(linuxmoduledir)" \ - "$(DESTDIR)$(drivermandir)" "$(DESTDIR)$(sdkdir)" -linuxmoduleLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(linuxmodule_LTLIBRARIES) +am__installdirs = "$(DESTDIR)$(moduledir)" "$(DESTDIR)$(drivermandir)" \ + "$(DESTDIR)$(sdkdir)" +moduleLTLIBRARIES_INSTALL = $(INSTALL) +LTLIBRARIES = $(module_LTLIBRARIES) libfbdevhw_la_LIBADD = am__libfbdevhw_la_SOURCES_DIST = fbdevhwstub.c fbdevhw.c @FBDEVHW_FALSE@am_libfbdevhw_la_OBJECTS = fbdevhwstub.lo @@ -129,10 +129,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -220,6 +216,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -234,6 +232,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -251,10 +250,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -310,10 +313,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -331,17 +335,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -368,20 +366,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -473,6 +474,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ @@ -618,8 +620,7 @@ symbol_visibility = @symbol_visibility@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ -linuxmoduledir = $(moduledir)/linux -linuxmodule_LTLIBRARIES = libfbdevhw.la +module_LTLIBRARIES = libfbdevhw.la libfbdevhw_la_LDFLAGS = -avoid-version @FBDEVHW_FALSE@libfbdevhw_la_SOURCES = fbdevhwstub.c @FBDEVHW_TRUE@libfbdevhw_la_SOURCES = fbdevhw.c @@ -702,35 +703,35 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh -install-linuxmoduleLTLIBRARIES: $(linuxmodule_LTLIBRARIES) +install-moduleLTLIBRARIES: $(module_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(linuxmoduledir)" || $(mkdir_p) "$(DESTDIR)$(linuxmoduledir)" - @list='$(linuxmodule_LTLIBRARIES)'; for p in $$list; do \ + test -z "$(moduledir)" || $(mkdir_p) "$(DESTDIR)$(moduledir)" + @list='$(module_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(linuxmoduleLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(linuxmoduledir)/$$f'"; \ - $(LIBTOOL) --mode=install $(linuxmoduleLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(linuxmoduledir)/$$f"; \ + echo " $(LIBTOOL) --mode=install $(moduleLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(moduledir)/$$f'"; \ + $(LIBTOOL) --mode=install $(moduleLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(moduledir)/$$f"; \ else :; fi; \ done -uninstall-linuxmoduleLTLIBRARIES: +uninstall-moduleLTLIBRARIES: @$(NORMAL_UNINSTALL) - @set -x; list='$(linuxmodule_LTLIBRARIES)'; for p in $$list; do \ + @set -x; list='$(module_LTLIBRARIES)'; for p in $$list; do \ p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(linuxmoduledir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(linuxmoduledir)/$$p"; \ + echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(moduledir)/$$p'"; \ + $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(moduledir)/$$p"; \ done -clean-linuxmoduleLTLIBRARIES: - -test -z "$(linuxmodule_LTLIBRARIES)" || rm -f $(linuxmodule_LTLIBRARIES) - @list='$(linuxmodule_LTLIBRARIES)'; for p in $$list; do \ +clean-moduleLTLIBRARIES: + -test -z "$(module_LTLIBRARIES)" || rm -f $(module_LTLIBRARIES) + @list='$(module_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libfbdevhw.la: $(libfbdevhw_la_OBJECTS) $(libfbdevhw_la_DEPENDENCIES) - $(LINK) -rpath $(linuxmoduledir) $(libfbdevhw_la_LDFLAGS) $(libfbdevhw_la_OBJECTS) $(libfbdevhw_la_LIBADD) $(LIBS) + $(LINK) -rpath $(moduledir) $(libfbdevhw_la_LDFLAGS) $(libfbdevhw_la_OBJECTS) $(libfbdevhw_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -886,7 +887,7 @@ check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) installdirs: - for dir in "$(DESTDIR)$(linuxmoduledir)" "$(DESTDIR)$(drivermandir)" "$(DESTDIR)$(sdkdir)"; do \ + for dir in "$(DESTDIR)$(moduledir)" "$(DESTDIR)$(drivermandir)" "$(DESTDIR)$(sdkdir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: install-am @@ -916,7 +917,7 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-generic clean-libtool clean-linuxmoduleLTLIBRARIES \ +clean-am: clean-generic clean-libtool clean-moduleLTLIBRARIES \ mostlyclean-am distclean: distclean-am @@ -935,7 +936,7 @@ info: info-am info-am: -install-data-am: install-drivermanDATA install-linuxmoduleLTLIBRARIES \ +install-data-am: install-drivermanDATA install-moduleLTLIBRARIES \ install-sdkHEADERS install-exec-am: @@ -965,21 +966,21 @@ ps: ps-am ps-am: uninstall-am: uninstall-drivermanDATA uninstall-info-am \ - uninstall-linuxmoduleLTLIBRARIES uninstall-sdkHEADERS + uninstall-moduleLTLIBRARIES uninstall-sdkHEADERS .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-linuxmoduleLTLIBRARIES ctags distclean \ + clean-libtool clean-moduleLTLIBRARIES 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-drivermanDATA install-exec install-exec-am \ - install-info install-info-am install-linuxmoduleLTLIBRARIES \ - install-man install-sdkHEADERS install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ + install-info install-info-am install-man \ + install-moduleLTLIBRARIES install-sdkHEADERS install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-drivermanDATA \ - uninstall-info-am uninstall-linuxmoduleLTLIBRARIES \ + uninstall-info-am uninstall-moduleLTLIBRARIES \ uninstall-sdkHEADERS diff --git a/xserver/hw/xfree86/fbdevhw/fbdevhw.c b/xserver/hw/xfree86/fbdevhw/fbdevhw.c index 880f0a20e..f1609083e 100644 --- a/xserver/hw/xfree86/fbdevhw/fbdevhw.c +++ b/xserver/hw/xfree86/fbdevhw/fbdevhw.c @@ -129,7 +129,7 @@ fbdevHWFreeRec(ScrnInfoPtr pScrn) return; if (FBDEVHWPTR(pScrn) == NULL) return; - xfree(FBDEVHWPTR(pScrn)); + free(FBDEVHWPTR(pScrn)); FBDEVHWPTRLVAL(pScrn) = NULL; } diff --git a/xserver/hw/xfree86/i2c/Makefile.in b/xserver/hw/xfree86/i2c/Makefile.in index 9daacb2f5..d7c410b26 100644 --- a/xserver/hw/xfree86/i2c/Makefile.in +++ b/xserver/hw/xfree86/i2c/Makefile.in @@ -146,10 +146,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -237,6 +233,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -251,6 +249,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -268,10 +267,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -327,10 +330,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -348,17 +352,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -385,20 +383,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -490,6 +491,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/xfree86/i2c/bt829.c b/xserver/hw/xfree86/i2c/bt829.c index 3963ecf47..024e76fce 100644 --- a/xserver/hw/xfree86/i2c/bt829.c +++ b/xserver/hw/xfree86/i2c/bt829.c @@ -461,7 +461,7 @@ BT829Ptr bt829_Detect(I2CBusPtr b, I2CSlaveAddr addr) BT829Ptr bt; I2CByte a; - bt = xcalloc(1, sizeof(BT829Rec)); + bt = calloc(1, sizeof(BT829Rec)); if(bt == NULL) return NULL; bt->d.DevName = strdup("BT829 video decoder"); bt->d.SlaveAddr = addr; @@ -482,7 +482,7 @@ BT829Ptr bt829_Detect(I2CBusPtr b, I2CSlaveAddr addr) bt->id = btread(bt,IDCODE); free(bt->d.DevName); - bt->d.DevName = xcalloc(200, sizeof(char)); + bt->d.DevName = calloc(200, sizeof(char)); switch(BTVERSION){ case BT815: sprintf(bt->d.DevName, "bt815a video decoder, revision %d",bt->id & 0xf); diff --git a/xserver/hw/xfree86/i2c/fi1236.c b/xserver/hw/xfree86/i2c/fi1236.c index 7c39edbee..8337c900e 100644 --- a/xserver/hw/xfree86/i2c/fi1236.c +++ b/xserver/hw/xfree86/i2c/fi1236.c @@ -46,7 +46,7 @@ FI1236Ptr Detect_FI1236(I2CBusPtr b, I2CSlaveAddr addr) FI1236Ptr f; I2CByte a; - f = xcalloc(1,sizeof(FI1236Rec)); + f = calloc(1,sizeof(FI1236Rec)); if(f == NULL) return NULL; f->d.DevName = strdup("FI12xx Tuner"); f->d.SlaveAddr = addr; @@ -398,10 +398,6 @@ int TUNER_get_afc_hint(FI1236Ptr f) { if(f->afc_timer_installed)return TUNER_STILL_TUNING; return f->last_afc_hint; -if(f->type==TUNER_TYPE_MT2032) - return MT2032_get_afc_hint(f); - else - return FI1236_get_afc_hint(f); } static void MT2032_dump_status(FI1236Ptr f) diff --git a/xserver/hw/xfree86/i2c/msp3430.c b/xserver/hw/xfree86/i2c/msp3430.c index 4bd3a7187..2f244e4c2 100644 --- a/xserver/hw/xfree86/i2c/msp3430.c +++ b/xserver/hw/xfree86/i2c/msp3430.c @@ -136,7 +136,7 @@ MSP3430Ptr DetectMSP3430(I2CBusPtr b, I2CSlaveAddr addr) CARD8 hardware_version, major_revision, product_code, rom_version; Bool supported; - m = xcalloc(1,sizeof(MSP3430Rec)); + m = calloc(1,sizeof(MSP3430Rec)); if(m == NULL)return NULL; m->d.DevName = strdup("MSP34xx"); m->d.SlaveAddr = addr; @@ -149,8 +149,8 @@ MSP3430Ptr DetectMSP3430(I2CBusPtr b, I2CSlaveAddr addr) if(!I2C_WriteRead(&(m->d), NULL, 0, &a, 1)) { - xfree(m->d.DevName); - xfree(m); + free(m->d.DevName); + free(m); return NULL; } @@ -235,14 +235,14 @@ MSP3430Ptr DetectMSP3430(I2CBusPtr b, I2CSlaveAddr addr) MSP_getProductName(m->chip_id), supported?"":" (unsupported)", rom_version, m->chip_id); if (!supported) { - xfree(m->d.DevName); - xfree(m); - return NULL; - } + free(m->d.DevName); + free(m); + return NULL; + } if(!I2CDevInit(&(m->d))) { - xfree(m->d.DevName); - xfree(m); + free(m->d.DevName); + free(m); return NULL; } diff --git a/xserver/hw/xfree86/i2c/tda8425.c b/xserver/hw/xfree86/i2c/tda8425.c index 7631a0863..598f88b59 100644 --- a/xserver/hw/xfree86/i2c/tda8425.c +++ b/xserver/hw/xfree86/i2c/tda8425.c @@ -17,7 +17,7 @@ TDA8425Ptr Detect_tda8425(I2CBusPtr b, I2CSlaveAddr addr, Bool force) { TDA8425Ptr t; - t = xcalloc(1, sizeof(TDA8425Rec)); + t = calloc(1, sizeof(TDA8425Rec)); if(t == NULL) return NULL; t->d.DevName = "TDA8425 BTSC Stereo Audio Processor"; t->d.SlaveAddr = addr; @@ -30,14 +30,14 @@ TDA8425Ptr Detect_tda8425(I2CBusPtr b, I2CSlaveAddr addr, Bool force) if(!force && !I2CProbeAddress(b, addr)) { - xfree(t); + free(t); return NULL; } /* set default parameters */ if(!I2CDevInit(&(t->d))) { - xfree(t); + free(t); return NULL; } diff --git a/xserver/hw/xfree86/i2c/tda9850.c b/xserver/hw/xfree86/i2c/tda9850.c index 5b0c581ed..24323cb38 100644 --- a/xserver/hw/xfree86/i2c/tda9850.c +++ b/xserver/hw/xfree86/i2c/tda9850.c @@ -18,7 +18,7 @@ TDA9850Ptr Detect_tda9850(I2CBusPtr b, I2CSlaveAddr addr) TDA9850Ptr t; I2CByte a; - t = xcalloc(1, sizeof(TDA9850Rec)); + t = calloc(1, sizeof(TDA9850Rec)); if(t == NULL) return NULL; switch(addr) { @@ -39,14 +39,14 @@ TDA9850Ptr Detect_tda9850(I2CBusPtr b, I2CSlaveAddr addr) if(!I2C_WriteRead(&(t->d), NULL, 0, &a, 1)) { - xfree(t); + free(t); return NULL; } /* set default parameters */ if(!I2CDevInit(&(t->d))) { - xfree(t); + free(t); return NULL; } diff --git a/xserver/hw/xfree86/i2c/tda9885.c b/xserver/hw/xfree86/i2c/tda9885.c index 4147dfdd7..9c303b42b 100644 --- a/xserver/hw/xfree86/i2c/tda9885.c +++ b/xserver/hw/xfree86/i2c/tda9885.c @@ -13,7 +13,7 @@ TDA9885Ptr Detect_tda9885(I2CBusPtr b, I2CSlaveAddr addr) TDA9885Ptr t; I2CByte a; - t = xcalloc(1, sizeof(TDA9885Rec)); + t = calloc(1, sizeof(TDA9885Rec)); if(t == NULL) return NULL; switch(addr) { @@ -37,14 +37,14 @@ TDA9885Ptr Detect_tda9885(I2CBusPtr b, I2CSlaveAddr addr) if(!I2C_WriteRead(&(t->d), NULL, 0, &a, 1)) { - xfree(t); + free(t); return NULL; } /* set default parameters */ if(!I2CDevInit(&(t->d))) { - xfree(t); + free(t); return NULL; } diff --git a/xserver/hw/xfree86/i2c/uda1380.c b/xserver/hw/xfree86/i2c/uda1380.c index defda3cdc..c7b1cda66 100644 --- a/xserver/hw/xfree86/i2c/uda1380.c +++ b/xserver/hw/xfree86/i2c/uda1380.c @@ -36,7 +36,7 @@ UDA1380Ptr Detect_uda1380(I2CBusPtr b, I2CSlaveAddr addr) UDA1380Ptr t; I2CByte a; - t = xcalloc(1, sizeof(UDA1380Rec)); + t = calloc(1, sizeof(UDA1380Rec)); if(t == NULL) return NULL; switch(addr) { @@ -58,14 +58,14 @@ UDA1380Ptr Detect_uda1380(I2CBusPtr b, I2CSlaveAddr addr) if(!I2C_WriteRead(&(t->d), NULL, 0, &a, 1)) { - xfree(t); + free(t); return NULL; } /* set default parameters */ if(!I2CDevInit(&(t->d))) { - xfree(t); + free(t); return NULL; } diff --git a/xserver/hw/xfree86/i2c/xf86i2c.c b/xserver/hw/xfree86/i2c/xf86i2c.c index 59832d6f9..e0223f661 100644 --- a/xserver/hw/xfree86/i2c/xf86i2c.c +++ b/xserver/hw/xfree86/i2c/xf86i2c.c @@ -598,7 +598,7 @@ xf86I2CWriteVec(I2CDevPtr d, I2CByte *vec, int nValues) I2CDevPtr xf86CreateI2CDevRec(void) { - return xcalloc(1, sizeof(I2CDevRec)); + return calloc(1, sizeof(I2CDevRec)); } /* Unlink an I2C device. If you got the I2CDevRec from xf86CreateI2CDevRec @@ -623,7 +623,7 @@ xf86DestroyI2CDevRec(I2CDevPtr d, Bool unalloc) "I2C device \"%s:%s\" removed.\n", d->pI2CBus->BusName, d->DevName); - if (unalloc) xfree(d); + if (unalloc) free(d); } } @@ -695,7 +695,7 @@ xf86CreateI2CBusRec(void) { I2CBusPtr b; - b = (I2CBusPtr) xcalloc(1, sizeof(I2CBusRec)); + b = (I2CBusPtr) calloc(1, sizeof(I2CBusRec)); if (b != NULL) { b->scrnIndex = -1; @@ -751,7 +751,7 @@ xf86DestroyI2CBusRec(I2CBusPtr b, Bool unalloc, Bool devs_too) xf86DrvMsg(b->scrnIndex, X_INFO, "I2C bus \"%s\" removed.\n", b->BusName); - if (unalloc) xfree(b); + if (unalloc) free(b); } } diff --git a/xserver/hw/xfree86/int10/Makefile.am b/xserver/hw/xfree86/int10/Makefile.am index 36d2ad0bb..f5ece69ef 100644 --- a/xserver/hw/xfree86/int10/Makefile.am +++ b/xserver/hw/xfree86/int10/Makefile.am @@ -5,6 +5,7 @@ sdk_HEADERS = xf86int10.h EXTRA_CFLAGS = libint10_la_LDFLAGS = -avoid-version +libint10_la_LIBADD = $(PCIACCESS_LIBS) COMMON_SOURCES = \ helper_exec.c \ diff --git a/xserver/hw/xfree86/int10/Makefile.in b/xserver/hw/xfree86/int10/Makefile.in index 972f39800..8409e1c68 100644 --- a/xserver/hw/xfree86/int10/Makefile.in +++ b/xserver/hw/xfree86/int10/Makefile.in @@ -64,7 +64,8 @@ am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(moduledir)" "$(DESTDIR)$(sdkdir)" moduleLTLIBRARIES_INSTALL = $(INSTALL) LTLIBRARIES = $(module_LTLIBRARIES) -libint10_la_LIBADD = +am__DEPENDENCIES_1 = +libint10_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am__libint10_la_SOURCES_DIST = stub.c xf86int10module.c helper_exec.c \ helper_mem.c xf86int10.c \ $(srcdir)/../os-support/linux/int10/vm86/linux_vm86.c \ @@ -133,10 +134,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -224,6 +221,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -238,6 +237,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -255,10 +255,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -314,10 +318,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -335,17 +340,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -372,20 +371,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -477,6 +479,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ @@ -626,6 +629,7 @@ module_LTLIBRARIES = libint10.la sdk_HEADERS = xf86int10.h EXTRA_CFLAGS = libint10_la_LDFLAGS = -avoid-version +libint10_la_LIBADD = $(PCIACCESS_LIBS) COMMON_SOURCES = \ helper_exec.c \ helper_mem.c \ diff --git a/xserver/hw/xfree86/int10/generic.c b/xserver/hw/xfree86/int10/generic.c index 9d39e99b0..fe8bb69ac 100644 --- a/xserver/hw/xfree86/int10/generic.c +++ b/xserver/hw/xfree86/int10/generic.c @@ -137,7 +137,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags) options = xf86HandleInt10Options(xf86Screens[screen],entityIndex); if (int10skip(options)) { - xfree(options); + free(options); return NULL; } @@ -285,17 +285,17 @@ xf86ExtendedInitInt10(int entityIndex, int Flags) xf86ExecX86int10(pInt); UnlockLegacyVGA(pInt, &vga); #endif - xfree(options); + free(options); return pInt; error1: - xfree(base); + free(base); UnmapVRam(pInt); - xfree(INTPriv(pInt)->alloc); - xfree(pInt->private); + free(INTPriv(pInt)->alloc); + free(pInt->private); error0: - xfree(pInt); - xfree(options); + free(pInt); + free(options); return NULL; } @@ -339,11 +339,11 @@ xf86FreeInt10(xf86Int10InfoPtr pInt) #endif if (Int10Current == pInt) Int10Current = NULL; - xfree(INTPriv(pInt)->base); + free(INTPriv(pInt)->base); UnmapVRam(pInt); - xfree(INTPriv(pInt)->alloc); - xfree(pInt->private); - xfree(pInt); + free(INTPriv(pInt)->alloc); + free(pInt->private); + free(pInt); } void * diff --git a/xserver/hw/xfree86/int10/helper_exec.c b/xserver/hw/xfree86/int10/helper_exec.c index 6ba647f89..8f47afe2b 100644 --- a/xserver/hw/xfree86/int10/helper_exec.c +++ b/xserver/hw/xfree86/int10/helper_exec.c @@ -711,7 +711,7 @@ xf86Int10SaveRestoreBIOSVars(xf86Int10InfoPtr pInt, Bool save) if (pInt->BIOSScratch) { for (i = 0; i < BIOS_SCRATCH_LEN; i++) *(base + i) = *(pInt->BIOSScratch + i); - xfree(pInt->BIOSScratch); + free(pInt->BIOSScratch); pInt->BIOSScratch = NULL; } } diff --git a/xserver/hw/xfree86/int10/helper_mem.c b/xserver/hw/xfree86/int10/helper_mem.c index 6f6ecc2b3..496c9a529 100644 --- a/xserver/hw/xfree86/int10/helper_mem.c +++ b/xserver/hw/xfree86/int10/helper_mem.c @@ -208,14 +208,14 @@ xf86HandleInt10Options(ScrnInfoPtr pScrn, int entityIndex) configOptions = pEnt->device->options; if (configOptions) { - if (!(options = (OptionInfoPtr) xalloc(sizeof(INT10Options)))) + if (!(options = (OptionInfoPtr) malloc(sizeof(INT10Options)))) return NULL; (void)memcpy(options, INT10Options, sizeof(INT10Options)); xf86ProcessOptions(pScrn->scrnIndex, configOptions, options); } } - xfree(pEnt); + free(pEnt); return options; } @@ -276,7 +276,7 @@ xf86int10GetBiosLocationType(const xf86Int10InfoPtr pInt) EntityInfoPtr pEnt = xf86GetEntityInfo(pInt->entityIndex); location_type = pEnt->location.type; - xfree(pEnt); + free(pEnt); return location_type; } @@ -296,15 +296,12 @@ xf86int10GetBiosSegment(xf86Int10InfoPtr pInt, void *base) unsigned i; int cs = ~0; int segments[4]; - const char * format; segments[0] = MEM_RW(pInt, (0x10 << 2) + 2); segments[1] = MEM_RW(pInt, (0x42 << 2) + 2); segments[2] = V_BIOS >> 4; segments[3] = ~0; - format = "No V_BIOS found\n"; - for (i = 0; segments[i] != ~0; i++) { unsigned char * vbiosMem; @@ -318,7 +315,7 @@ xf86int10GetBiosSegment(xf86Int10InfoPtr pInt, void *base) } if (segments[i] == ~0) { - xf86DrvMsg(pInt->scrnIndex, X_ERROR, format, (unsigned long)cs << 4); + xf86DrvMsg(pInt->scrnIndex, X_ERROR, "No V_BIOS found\n"); return FALSE; } diff --git a/xserver/hw/xfree86/loader/Makefile.in b/xserver/hw/xfree86/loader/Makefile.in index 300d1b4bd..a8d4e5ec2 100644 --- a/xserver/hw/xfree86/loader/Makefile.in +++ b/xserver/hw/xfree86/loader/Makefile.in @@ -109,10 +109,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -200,6 +196,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -214,6 +212,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -231,10 +230,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -290,10 +293,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -311,17 +315,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -348,20 +346,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -453,6 +454,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/xfree86/loader/loadext.c b/xserver/hw/xfree86/loader/loadext.c index 29cdaf1ac..4078b7705 100644 --- a/xserver/hw/xfree86/loader/loadext.c +++ b/xserver/hw/xfree86/loader/loadext.c @@ -54,7 +54,7 @@ NewExtensionModule(void) numExtensionModules = 0; n = numExtensionModules + 1; - ExtensionModuleList = xrealloc(ExtensionModuleList, + ExtensionModuleList = realloc(ExtensionModuleList, (n + 1) * sizeof(ExtensionModule)); if (ExtensionModuleList == NULL) { ExtensionModuleList = save; @@ -163,7 +163,7 @@ get_node(const char *name) for (n = graph; n && n->n_name && strcmp(n->n_name, name); n = n->n_next) ; if (n) - return (n); + return n; n = xnfalloc(sizeof(NODE)); @@ -180,7 +180,7 @@ get_node(const char *name) n->n_prevp = &graph; graph = n; - return (n); + return n; } /* @@ -268,7 +268,7 @@ free_nodes(NODE * nodelist) for (n = nodelist; n;) { nextnode = n->n_next; - xfree(n); + free(n); n = nextnode; } } @@ -285,7 +285,7 @@ find_cycle(NODE * from, NODE * to, int longest_len, int depth) * to be acyclic */ if (from->n_flags & (NF_NODEST | NF_MARK | NF_ACYCLIC)) - return (0); + return 0; from->n_flags |= NF_MARK; for (np = from->n_arcs, i = from->n_narcs; --i >= 0; np++) { @@ -317,7 +317,7 @@ find_cycle(NODE * from, NODE * to, int longest_len, int depth) } } from->n_flags &= ~NF_MARK; - return (longest_len); + return longest_len; } /* do topological sort on graph */ @@ -378,10 +378,8 @@ tsort(void) if (n == NULL) ErrorF("tsort: internal error -- could not find cycle"); } - if (cycle_buf) - xfree(cycle_buf); - if (longest_cycle) - xfree(longest_cycle); + free(cycle_buf); + free(longest_cycle); if (graph) free_nodes(graph); } @@ -433,7 +431,7 @@ LoaderSortExtensions(void) if (graph) free_nodes(graph); newList[i].name = NULL; - xfree(ExtensionModuleList); + free(ExtensionModuleList); ExtensionModuleList = newList; #ifdef DEBUG for (i = 0; ExtensionModuleList[i].name; i++) diff --git a/xserver/hw/xfree86/loader/loadmod.c b/xserver/hw/xfree86/loader/loadmod.c index 5b175a546..615e8c691 100644 --- a/xserver/hw/xfree86/loader/loadmod.c +++ b/xserver/hw/xfree86/loader/loadmod.c @@ -104,9 +104,9 @@ FreeStringList(char **paths) return; for (p = paths; *p; p++) - xfree(*p); + free(*p); - xfree(paths); + free(paths); } static char **defaultPathList = NULL; @@ -114,7 +114,7 @@ static char **defaultPathList = NULL; static Bool PathIsAbsolute(const char *path) { - return (*path == '/'); + return *path == '/'; } /* @@ -135,7 +135,7 @@ InitPathList(const char *path) if (!path) return defaultPathList; - fullpath = xstrdup(path); + fullpath = strdup(path); if (!fullpath) return NULL; elem = strtok(fullpath, ","); @@ -147,19 +147,19 @@ InitPathList(const char *path) if (addslash) len++; save = list; - list = xrealloc(list, (n + 2) * sizeof(char *)); + list = realloc(list, (n + 2) * sizeof(char *)); if (!list) { if (save) { save[n] = NULL; FreeStringList(save); } - xfree(fullpath); + free(fullpath); return NULL; } - list[n] = xalloc(len + 1); + list[n] = malloc(len + 1); if (!list[n]) { FreeStringList(list); - xfree(fullpath); + free(fullpath); return NULL; } strcpy(list[n], elem); @@ -173,7 +173,7 @@ InitPathList(const char *path) } if (list) list[n] = NULL; - xfree(fullpath); + free(fullpath); return list; } @@ -244,7 +244,7 @@ InitPatterns(const char **patternlist) for (i = 0, s = patternlist; *s; i++, s++) if (*s == DEFAULT_LIST) i += sizeof(stdPatterns) / sizeof(stdPatterns[0]) - 1 - 1; - patterns = xalloc((i + 1) * sizeof(PatternRec)); + patterns = malloc((i + 1) * sizeof(PatternRec)); if (!patterns) { return NULL; } @@ -274,7 +274,7 @@ static void FreePatterns(PatternPtr patterns) { if (patterns && patterns != stdPatterns) - xfree(patterns); + free(patterns); } static const char ** @@ -290,7 +290,7 @@ InitSubdirs(const char **subdirlist) Bool indefault; if (subdirlist == NULL) { - subdirlist = tmp_subdirlist = xalloc(2 * sizeof(char *)); + subdirlist = tmp_subdirlist = malloc(2 * sizeof(char *)); if (subdirlist == NULL) return NULL; subdirlist[0] = DEFAULT_LIST; @@ -315,16 +315,14 @@ InitSubdirs(const char **subdirlist) if (**s == '/' || **s == '\\' || strchr(*s, ':') || strstr(*s, "..")) { xf86Msg(X_ERROR, "InitSubdirs: Bad subdir: \"%s\"\n", *s); - if (tmp_subdirlist) - xfree(tmp_subdirlist); + free(tmp_subdirlist); return NULL; } } } - subdirs = xalloc((i * 2 + 1) * sizeof(char *)); + subdirs = malloc((i * 2 + 1) * sizeof(char *)); if (!subdirs) { - if (tmp_subdirlist) - xfree(tmp_subdirlist); + free(tmp_subdirlist); return NULL; } i = 0; @@ -344,19 +342,18 @@ InitSubdirs(const char **subdirlist) } else slash = ""; len += oslen + 2; - if (!(subdirs[i] = xalloc(len))) { + if (!(subdirs[i] = malloc(len))) { while (--i >= 0) - xfree(subdirs[i]); - xfree(subdirs); - if (tmp_subdirlist) - xfree(tmp_subdirlist); + free(subdirs[i]); + free(subdirs); + free(tmp_subdirlist); return NULL; } /* tack on the OS name */ sprintf(subdirs[i], "%s%s%s/", *s, slash, osname); i++; /* path as given */ - subdirs[i] = xstrdup(*s); + subdirs[i] = strdup(*s); i++; s++; if (indefault && !s) { @@ -367,8 +364,7 @@ InitSubdirs(const char **subdirlist) } subdirs[i] = NULL; } - if (tmp_subdirlist) - xfree(tmp_subdirlist); + free(tmp_subdirlist); return (const char **)subdirs; } @@ -379,8 +375,8 @@ FreeSubdirs(const char **subdirs) if (subdirs) { for (s = subdirs; *s; s++) - xfree(*s); - xfree(subdirs); + free(*s); + free(subdirs); } } @@ -465,7 +461,7 @@ FindModule(const char *module, const char *dirname, const char **subdirlist, FreeSubdirs(subdirs); if (dirpath != dirname) - xfree(dirpath); + free(dirpath); return name; } @@ -527,7 +523,7 @@ LoaderListDirs(const char **subdirlist, const char **patternlist) match[1].rm_so != -1) { len = match[1].rm_eo - match[1].rm_so; save = listing; - listing = xrealloc(listing, + listing = realloc(listing, (n + 2) * sizeof(char *)); if (!listing) { if (save) { @@ -539,7 +535,7 @@ LoaderListDirs(const char **subdirlist, const char **patternlist) FreePatterns(patterns); return NULL; } - listing[n] = xalloc(len + 1); + listing[n] = malloc(len + 1); if (!listing[n]) { FreeStringList(listing); FreePathList(pathlist); @@ -743,7 +739,7 @@ static ModuleDescPtr AddSibling(ModuleDescPtr head, ModuleDescPtr new) { new->sib = head; - return (new); + return new; } pointer @@ -780,7 +776,7 @@ LoadSubModule(pointer _parent, const char *module, static ModuleDescPtr NewModuleDesc(const char *name) { - ModuleDescPtr mdp = xalloc(sizeof(ModuleDesc)); + ModuleDescPtr mdp = malloc(sizeof(ModuleDesc)); if (mdp) { mdp->child = NULL; @@ -793,7 +789,7 @@ NewModuleDesc(const char *name) mdp->TearDownData = NULL; } - return (mdp); + return mdp; } ModuleDescPtr @@ -944,7 +940,7 @@ doLoadModule(const char *module, const char *path, const char **subdirlist, * now check if the special data object ModuleData is * present. */ - p = xalloc(strlen(name) + strlen("ModuleData") + 1); + p = malloc(strlen(name) + strlen("ModuleData") + 1); if (!p) { if (errmaj) *errmaj = LDR_NOMEM; @@ -1021,9 +1017,9 @@ doLoadModule(const char *module, const char *path, const char **subdirlist, LoadModule_exit: FreePathList(pathlist); FreePatterns(patterns); - xfree(found); - xfree(name); - xfree(p); + free(found); + free(name); + free(p); return ret; } @@ -1099,8 +1095,8 @@ UnloadModuleOrDriver(ModuleDescPtr mod) UnloadModuleOrDriver(mod->child); if (mod->sib) UnloadModuleOrDriver(mod->sib); - xfree(mod->name); - xfree(mod); + free(mod->name); + free(mod); } void @@ -1122,8 +1118,8 @@ UnloadSubModule(pointer _mod) if (mod->child) UnloadModuleOrDriver(mod->child); - xfree(mod->name); - xfree(mod); + free(mod->name); + free(mod); } static void @@ -1241,7 +1237,7 @@ LoaderGetCanonicalName(const char *modname, PatternPtr patterns) for (p = patterns; p->pattern; p++) if (regexec(&p->rex, s, 2, match, 0) == 0 && match[1].rm_so != -1) { len = match[1].rm_eo - match[1].rm_so; - str = xalloc(len + 1); + str = malloc(len + 1); if (!str) return NULL; strncpy(str, s + match[1].rm_so, len); @@ -1250,7 +1246,7 @@ LoaderGetCanonicalName(const char *modname, PatternPtr patterns) } /* If there is no match, return the whole name minus the leading path */ - return xstrdup(s); + return strdup(s); } /* diff --git a/xserver/hw/xfree86/loader/sdksyms.sh b/xserver/hw/xfree86/loader/sdksyms.sh index f630bebfc..bdd1e8e11 100644 --- a/xserver/hw/xfree86/loader/sdksyms.sh +++ b/xserver/hw/xfree86/loader/sdksyms.sh @@ -8,7 +8,6 @@ cat > sdksyms.c << EOF #include #endif - /* These must be included first */ #include "misc.h" #include "miscstruct.h" @@ -217,7 +216,6 @@ cat > sdksyms.c << EOF /* mi/Makefile.am */ -#include "mibank.h" #include "micmap.h" #include "miline.h" #include "mipointer.h" @@ -320,11 +318,19 @@ cat > sdksyms.c << EOF EOF +case `gcc -dumpversion` in + [23].*) + n=2 + ;; + 4.*) + n=3 + ;; +esac topdir=$1 shift LC_ALL=C export LC_ALL -${CPP:-cpp} "$@" -DXorgLoader sdksyms.c | ${AWK:-awk} -v topdir=$topdir ' +${CPP:-cpp} "$@" -DXorgLoader sdksyms.c | ${AWK:-awk} -v topdir=$topdir -v nini=$n ' BEGIN { sdk = 0; print("/*"); @@ -355,8 +361,8 @@ BEGIN { /^extern[ ]/ { if (sdk) { - n = 2; - + n = nini; + printf("/* %s */\n", $0) # skip attribute, if any while ($n ~ /^(__attribute__|__global)/ || # skip modifiers, if any diff --git a/xserver/hw/xfree86/modes/Makefile.in b/xserver/hw/xfree86/modes/Makefile.in index 487422252..5b426d19d 100644 --- a/xserver/hw/xfree86/modes/Makefile.in +++ b/xserver/hw/xfree86/modes/Makefile.in @@ -125,10 +125,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -216,6 +212,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -230,6 +228,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -247,10 +246,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -306,10 +309,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -327,17 +331,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -364,20 +362,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -469,6 +470,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/xfree86/modes/xf86Crtc.c b/xserver/hw/xfree86/modes/xf86Crtc.c index 860e520ad..b2daec72e 100644 --- a/xserver/hw/xfree86/modes/xf86Crtc.c +++ b/xserver/hw/xfree86/modes/xf86Crtc.c @@ -42,12 +42,12 @@ #include "X11/extensions/render.h" #include "X11/extensions/dpmsconst.h" #include "X11/Xatom.h" -#ifdef RENDER #include "picturestr.h" -#endif #include "xf86xv.h" +#define NO_OUTPUT_DEFAULT_WIDTH 1024 +#define NO_OUTPUT_DEFAULT_HEIGHT 768 /* * Initialize xf86CrtcConfig structure */ @@ -92,7 +92,7 @@ xf86CrtcCreate (ScrnInfoPtr scrn, xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); xf86CrtcPtr crtc, *crtcs; - crtc = xcalloc (sizeof (xf86CrtcRec), 1); + crtc = calloc(sizeof (xf86CrtcRec), 1); if (!crtc) return NULL; crtc->version = XF86_CRTC_VERSION; @@ -120,20 +120,20 @@ xf86CrtcCreate (ScrnInfoPtr scrn, crtc->gamma_size = 256; crtc->gamma_red = malloc(3 * crtc->gamma_size * sizeof (CARD16)); if (!crtc->gamma_red) { - xfree (crtc); + free(crtc); return NULL; } crtc->gamma_green = crtc->gamma_red + crtc->gamma_size; crtc->gamma_blue = crtc->gamma_green + crtc->gamma_size; if (xf86_config->crtc) - crtcs = xrealloc (xf86_config->crtc, + crtcs = realloc(xf86_config->crtc, (xf86_config->num_crtc + 1) * sizeof (xf86CrtcPtr)); else - crtcs = xalloc ((xf86_config->num_crtc + 1) * sizeof (xf86CrtcPtr)); + crtcs = malloc((xf86_config->num_crtc + 1) * sizeof (xf86CrtcPtr)); if (!crtcs) { - xfree (crtc); + free(crtc); return NULL; } xf86_config->crtc = crtcs; @@ -157,10 +157,9 @@ xf86CrtcDestroy (xf86CrtcPtr crtc) xf86_config->num_crtc--; break; } - if (crtc->params) - xfree (crtc->params); + free(crtc->params); free(crtc->gamma_red); - xfree (crtc); + free(crtc); } @@ -184,7 +183,6 @@ xf86CrtcInUse (xf86CrtcPtr crtc) void xf86CrtcSetScreenSubpixelOrder (ScreenPtr pScreen) { -#ifdef RENDER int subpixel_order = SubPixelUnknown; Bool has_none = FALSE; ScrnInfoPtr scrn = xf86Screens[pScreen->myNum]; @@ -243,7 +241,6 @@ xf86CrtcSetScreenSubpixelOrder (ScreenPtr pScreen) if (subpixel_order == SubPixelUnknown && has_none) subpixel_order = SubPixelNone; PictureSetSubpixelOrder (pScreen, subpixel_order); -#endif } /** @@ -384,9 +381,8 @@ done: crtc->transformPresent = saved_transform_present; } - if (adjusted_mode->name) - xfree(adjusted_mode->name); - xfree(adjusted_mode); + free(adjusted_mode->name); + free(adjusted_mode); if (didLock) crtc->funcs->unlock (crtc); @@ -443,6 +439,7 @@ typedef enum { OPTION_ROTATE, OPTION_PANNING, OPTION_PRIMARY, + OPTION_DEFAULT_MODES, } OutputOpts; static OptionInfoRec xf86OutputOptions[] = { @@ -460,6 +457,7 @@ static OptionInfoRec xf86OutputOptions[] = { {OPTION_ROTATE, "Rotate", OPTV_STRING, {0}, FALSE }, {OPTION_PANNING, "Panning", OPTV_STRING, {0}, FALSE }, {OPTION_PRIMARY, "Primary", OPTV_BOOLEAN, {0}, FALSE }, + {OPTION_DEFAULT_MODES, "DefaultModes", OPTV_BOOLEAN, {0}, FALSE }, {-1, NULL, OPTV_NONE, {0}, FALSE }, }; @@ -482,8 +480,7 @@ xf86OutputSetMonitor (xf86OutputPtr output) if (!output->name) return; - if (output->options) - xfree (output->options); + free(output->options); output->options = xnfalloc (sizeof (xf86OutputOptions)); memcpy (output->options, xf86OutputOptions, sizeof (xf86OutputOptions)); @@ -497,7 +494,7 @@ xf86OutputSetMonitor (xf86OutputPtr output) monitor = output->name; else xf86MarkOptionUsedByName (output->scrn->options, option_name); - xfree (option_name); + free(option_name); output->conf_monitor = xf86findMonitor (monitor, xf86configptr->conf_monitor_lst); /* @@ -575,12 +572,15 @@ xf86OutputInitialRotation (xf86OutputPtr output) OPTION_ROTATE); int i; - if (!rotate_name) + if (!rotate_name) { + if (output->initial_rotation) + return output->initial_rotation; return RR_Rotate_0; + } for (i = 0; i < 4; i++) if (xf86nameCompare (direction[i], rotate_name) == 0) - return (1 << i); + return 1 << i; return RR_Rotate_0; } @@ -599,7 +599,7 @@ xf86OutputCreate (ScrnInfoPtr scrn, else len = 0; - output = xcalloc (sizeof (xf86OutputRec) + len, 1); + output = calloc(sizeof (xf86OutputRec) + len, 1); if (!output) return NULL; output->scrn = scrn; @@ -622,20 +622,20 @@ xf86OutputCreate (ScrnInfoPtr scrn, xf86OutputSetMonitor (output); if (xf86OutputIgnored (output)) { - xfree (output); + free(output); return FALSE; } } if (xf86_config->output) - outputs = xrealloc (xf86_config->output, + outputs = realloc(xf86_config->output, (xf86_config->num_output + 1) * sizeof (xf86OutputPtr)); else - outputs = xalloc ((xf86_config->num_output + 1) * sizeof (xf86OutputPtr)); + outputs = malloc((xf86_config->num_output + 1) * sizeof (xf86OutputPtr)); if (!outputs) { - xfree (output); + free(output); return NULL; } @@ -661,14 +661,14 @@ Bool xf86OutputRename (xf86OutputPtr output, const char *name) { int len = strlen(name) + 1; - char *newname = xalloc (len); + char *newname = malloc(len); if (!newname) return FALSE; /* so sorry... */ strcpy (newname, name); if (output->name && output->name != (char *) (output + 1)) - xfree (output->name); + free(output->name); output->name = newname; xf86OutputSetMonitor (output); if (xf86OutputIgnored (output)) @@ -706,8 +706,8 @@ xf86OutputDestroy (xf86OutputPtr output) break; } if (output->name && output->name != (char *) (output + 1)) - xfree (output->name); - xfree (output); + free(output->name); + free(output); } /* @@ -756,6 +756,8 @@ xf86CrtcCloseScreen (int index, ScreenPtr screen) crtc->randr_crtc = NULL; } + xf86RandR12CloseScreen (screen); + return screen->CloseScreen (index, screen); } @@ -954,7 +956,7 @@ xf86PickCrtcs (ScrnInfoPtr scrn, if (modes[n] == NULL) return best_score; - crtcs = xalloc (config->num_output * sizeof (xf86CrtcPtr)); + crtcs = malloc(config->num_output * sizeof (xf86CrtcPtr)); if (!crtcs) return best_score; @@ -1010,7 +1012,7 @@ xf86PickCrtcs (ScrnInfoPtr scrn, memcpy (best_crtcs, crtcs, config->num_output * sizeof (xf86CrtcPtr)); } } - xfree (crtcs); + free(crtcs); return best_score; } @@ -1041,8 +1043,8 @@ xf86DefaultScreenLimits (ScrnInfoPtr scrn, int *widthp, int *heightp, if (crtc->enabled) { - crtc_width = crtc->x + xf86ModeWidth (&crtc->desiredMode, crtc->desiredRotation); - crtc_height = crtc->y + xf86ModeHeight (&crtc->desiredMode, crtc->desiredRotation); + crtc_width = crtc->desiredX + xf86ModeWidth (&crtc->desiredMode, crtc->desiredRotation); + crtc_height = crtc->desiredY + xf86ModeHeight (&crtc->desiredMode, crtc->desiredRotation); } if (!canGrow) { for (o = 0; o < config->num_output; o++) @@ -1419,8 +1421,8 @@ xf86SortModes (DisplayModePtr input) if (!strcmp (o->name, n->name) && xf86ModesEqual (o, n)) { o->next = n->next; - xfree (n->name); - xfree (n); + free(n->name); + free(n); n = o; } } @@ -1564,7 +1566,7 @@ xf86ProbeOutputModes (ScrnInfoPtr scrn, int maxX, int maxY) int min_clock = 0; int max_clock = 0; double clock; - Bool add_default_modes = TRUE; + Bool add_default_modes = xf86ReturnOptValBool(output->options, OPTION_DEFAULT_MODES, TRUE); Bool debug_modes = config->debug_modes || xf86Initialising; enum det_monrec_source sync_source = sync_default; @@ -1925,7 +1927,7 @@ xf86SetScrnInfoModes (ScrnInfoPtr scrn) #endif } -static void +static Bool xf86CollectEnabledOutputs(ScrnInfoPtr scrn, xf86CrtcConfigPtr config, Bool *enabled) { @@ -1940,8 +1942,10 @@ xf86CollectEnabledOutputs(ScrnInfoPtr scrn, xf86CrtcConfigPtr config, "No outputs definitely connected, trying again...\n"); for (o = 0; o < config->num_output; o++) - enabled[o] = xf86OutputEnabled(config->output[o], FALSE); + any_enabled |= enabled[o] = xf86OutputEnabled(config->output[o], FALSE); } + + return any_enabled; } static Bool @@ -2105,8 +2109,8 @@ xf86TargetPreferred(ScrnInfoPtr scrn, xf86CrtcConfigPtr config, config->num_output * sizeof(DisplayModePtr)); } - xfree(preferred); - xfree(preferred_match); + free(preferred); + free(preferred_match); return ret; } @@ -2161,7 +2165,7 @@ no_aspect_match: ret = TRUE; out: - xfree(aspects); + free(aspects); return ret; } @@ -2202,7 +2206,7 @@ xf86TargetFallback(ScrnInfoPtr scrn, xf86CrtcConfigPtr config, target_rotation, width, height); } - return (target_mode != NULL); + return target_mode != NULL; } static Bool @@ -2341,6 +2345,8 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow) Bool *enabled; int width, height; int i = scrn->scrnIndex; + Bool have_outputs = TRUE; + Bool ret; /* Set up the device options */ config->options = xnfalloc (sizeof (xf86DeviceOptions)); @@ -2366,18 +2372,23 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow) modes = xnfcalloc (config->num_output, sizeof (DisplayModePtr)); enabled = xnfcalloc (config->num_output, sizeof (Bool)); - xf86CollectEnabledOutputs(scrn, config, enabled); - - if (xf86TargetUserpref(scrn, config, modes, enabled, width, height)) - xf86DrvMsg(i, X_INFO, "Using user preference for initial modes\n"); - else if (xf86TargetPreferred(scrn, config, modes, enabled, width, height)) - xf86DrvMsg(i, X_INFO, "Using exact sizes for initial modes\n"); - else if (xf86TargetAspect(scrn, config, modes, enabled, width, height)) - xf86DrvMsg(i, X_INFO, "Using fuzzy aspect match for initial modes\n"); - else if (xf86TargetFallback(scrn, config, modes, enabled, width, height)) - xf86DrvMsg(i, X_INFO, "Using sloppy heuristic for initial modes\n"); - else - xf86DrvMsg(i, X_WARNING, "Unable to find initial modes\n"); + ret = xf86CollectEnabledOutputs(scrn, config, enabled); + if (ret == FALSE && canGrow) { + xf86DrvMsg(i, X_WARNING, "Unable to find connected outputs - setting %dx%d initial framebuffer\n", + NO_OUTPUT_DEFAULT_WIDTH, NO_OUTPUT_DEFAULT_HEIGHT); + have_outputs = FALSE; + } else { + if (xf86TargetUserpref(scrn, config, modes, enabled, width, height)) + xf86DrvMsg(i, X_INFO, "Using user preference for initial modes\n"); + else if (xf86TargetPreferred(scrn, config, modes, enabled, width, height)) + xf86DrvMsg(i, X_INFO, "Using exact sizes for initial modes\n"); + else if (xf86TargetAspect(scrn, config, modes, enabled, width, height)) + xf86DrvMsg(i, X_INFO, "Using fuzzy aspect match for initial modes\n"); + else if (xf86TargetFallback(scrn, config, modes, enabled, width, height)) + xf86DrvMsg(i, X_INFO, "Using sloppy heuristic for initial modes\n"); + else + xf86DrvMsg(i, X_WARNING, "Unable to find initial modes\n"); + } for (o = -1; nextEnabledOutput(config, enabled, &o); ) { if (!modes[o]) @@ -2395,8 +2406,8 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow) */ if (!xf86InitialOutputPositions (scrn, modes)) { - xfree (crtcs); - xfree (modes); + free(crtcs); + free(modes); return FALSE; } @@ -2408,10 +2419,10 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow) /* * Assign CRTCs to fit output configuration */ - if (!xf86PickCrtcs (scrn, crtcs, modes, 0, width, height)) + if (have_outputs && !xf86PickCrtcs (scrn, crtcs, modes, 0, width, height)) { - xfree (crtcs); - xfree (modes); + free(crtcs); + free(modes); return FALSE; } @@ -2470,6 +2481,13 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow) */ xf86DefaultScreenLimits (scrn, &width, &height, canGrow); + if (have_outputs == FALSE) { + if (width < NO_OUTPUT_DEFAULT_WIDTH && height < NO_OUTPUT_DEFAULT_HEIGHT) { + width = NO_OUTPUT_DEFAULT_WIDTH; + height = NO_OUTPUT_DEFAULT_HEIGHT; + } + } + scrn->display->virtualX = width; scrn->display->virtualY = height; } @@ -2495,11 +2513,20 @@ xf86InitialConfiguration (ScrnInfoPtr scrn, Bool canGrow) width, height); } - /* Mirror output modes to scrn mode list */ - xf86SetScrnInfoModes (scrn); + if (have_outputs) { + /* Mirror output modes to scrn mode list */ + xf86SetScrnInfoModes (scrn); + } else { + /* Clear any existing modes from scrn->modes */ + while (scrn->modes != NULL) + xf86DeleteMode(&scrn->modes, scrn->modes); + scrn->modes = xf86ModesAdd(scrn->modes, + xf86CVTMode(width, height, 60, 0, 0)); + } + - xfree (crtcs); - xfree (modes); + free(crtcs); + free(modes); return TRUE; } @@ -2938,7 +2965,7 @@ xf86OutputSetEDID (xf86OutputPtr output, xf86MonPtr edid_mon) #endif if (output->MonInfo != NULL) - xfree(output->MonInfo); + free(output->MonInfo); output->MonInfo = edid_mon; @@ -3130,9 +3157,9 @@ xf86_crtc_clip_video_helper(ScrnInfoPtr pScrn, &crtc_box); if (crtc) { - REGION_INIT (pScreen, &crtc_region_local, &crtc_box, 1); + RegionInit(&crtc_region_local, &crtc_box, 1); crtc_region = &crtc_region_local; - REGION_INTERSECT (pScreen, crtc_region, crtc_region, reg); + RegionIntersect(crtc_region, crtc_region, reg); } *crtc_ret = crtc; } @@ -3141,7 +3168,7 @@ xf86_crtc_clip_video_helper(ScrnInfoPtr pScrn, crtc_region, width, height); if (crtc_region != reg) - REGION_UNINIT (pScreen, &crtc_region_local); + RegionUninit(&crtc_region_local); return ret; } @@ -3198,7 +3225,7 @@ xf86_crtc_supports_gamma(ScrnInfoPtr pScrn) return FALSE; crtc = xf86_config->crtc[0]; - return (crtc->funcs->gamma_set != NULL); + return crtc->funcs->gamma_set != NULL; } return FALSE; diff --git a/xserver/hw/xfree86/modes/xf86Cursors.c b/xserver/hw/xfree86/modes/xf86Cursors.c index 416299968..6b2ae97d4 100644 --- a/xserver/hw/xfree86/modes/xf86Cursors.c +++ b/xserver/hw/xfree86/modes/xf86Cursors.c @@ -41,9 +41,7 @@ #include "X11/extensions/render.h" #include "X11/extensions/dpmsconst.h" #include "X11/Xatom.h" -#ifdef RENDER #include "picturestr.h" -#endif #include "cursorstr.h" #include "inputstr.h" @@ -327,10 +325,13 @@ xf86_crtc_set_cursor_position (xf86CrtcPtr crtc, int x, int y) xf86CursorScreenKey); struct pict_f_vector v; - v.v[0] = x + ScreenPriv->HotX; v.v[1] = y + ScreenPriv->HotY; v.v[2] = 1; + v.v[0] = (x + ScreenPriv->HotX) + 0.5; + v.v[1] = (y + ScreenPriv->HotY) + 0.5; + v.v[2] = 1; pixman_f_transform_point (&crtc->f_framebuffer_to_crtc, &v); - x = floor (v.v[0] + 0.5); - y = floor (v.v[1] + 0.5); + /* cursor will have 0.5 added to it already so floor is sufficent */ + x = floor (v.v[0]); + y = floor (v.v[1]); /* * Transform position of cursor upper left corner */ @@ -553,7 +554,7 @@ xf86_cursors_init (ScreenPtr screen, int max_width, int max_height, int flags) if (!cursor_info) return FALSE; - xf86_config->cursor_image = xalloc (max_width * max_height * 4); + xf86_config->cursor_image = malloc(max_width * max_height * 4); if (!xf86_config->cursor_image) { @@ -661,11 +662,8 @@ xf86_cursors_fini (ScreenPtr screen) xf86DestroyCursorInfoRec (xf86_config->cursor_info); xf86_config->cursor_info = NULL; } - if (xf86_config->cursor_image) - { - xfree (xf86_config->cursor_image); - xf86_config->cursor_image = NULL; - } + free(xf86_config->cursor_image); + xf86_config->cursor_image = NULL; if (xf86_config->cursor) { FreeCursor (xf86_config->cursor, None); diff --git a/xserver/hw/xfree86/modes/xf86DiDGA.c b/xserver/hw/xfree86/modes/xf86DiDGA.c index 60fbdbf05..ca419ecb9 100644 --- a/xserver/hw/xfree86/modes/xf86DiDGA.c +++ b/xserver/hw/xfree86/modes/xf86DiDGA.c @@ -61,7 +61,7 @@ xf86_dga_get_modes (ScreenPtr pScreen) if (!num) return FALSE; - modes = xalloc(num * sizeof(DGAModeRec)); + modes = malloc(num * sizeof(DGAModeRec)); if (!modes) return FALSE; @@ -103,8 +103,7 @@ xf86_dga_get_modes (ScreenPtr pScreen) if (display_mode == scrn->modes) break; } - if (xf86_config->dga_modes) - xfree (xf86_config->dga_modes); + free(xf86_config->dga_modes); xf86_config->dga_nmode = num; xf86_config->dga_modes = modes; return TRUE; diff --git a/xserver/hw/xfree86/modes/xf86DisplayIDModes.c b/xserver/hw/xfree86/modes/xf86DisplayIDModes.c index 182d43e0e..f18f18c60 100644 --- a/xserver/hw/xfree86/modes/xf86DisplayIDModes.c +++ b/xserver/hw/xfree86/modes/xf86DisplayIDModes.c @@ -56,7 +56,7 @@ typedef void (*did_proc)(int scrnIndex, unsigned char *data, void *closure); static DisplayModePtr modeCalloc(void) { - return xcalloc(1, sizeof(DisplayModeRec)); + return calloc(1, sizeof(DisplayModeRec)); } /* diff --git a/xserver/hw/xfree86/modes/xf86EdidModes.c b/xserver/hw/xfree86/modes/xf86EdidModes.c index ec6540841..8f4d04f93 100644 --- a/xserver/hw/xfree86/modes/xf86EdidModes.c +++ b/xserver/hw/xfree86/modes/xf86EdidModes.c @@ -608,7 +608,7 @@ DDCModeFromDetailedTiming(int scrnIndex, struct detailed_timings *timing, /* perform basic check on the detail timing */ if (Mode->HSyncEnd > Mode->HTotal || Mode->VSyncEnd > Mode->VTotal) { - xfree(Mode); + free(Mode); return NULL; } diff --git a/xserver/hw/xfree86/modes/xf86Modes.c b/xserver/hw/xfree86/modes/xf86Modes.c index 75aedaa99..05f4319c9 100644 --- a/xserver/hw/xfree86/modes/xf86Modes.c +++ b/xserver/hw/xfree86/modes/xf86Modes.c @@ -138,7 +138,7 @@ xf86SetModeDefaultName(DisplayModePtr mode) { Bool interlaced = !!(mode->Flags & V_INTERLACE); - xfree(mode->name); + free(mode->name); mode->name = XNFprintf("%dx%d%s", mode->HDisplay, mode->VDisplay, interlaced ? "i" : ""); @@ -324,7 +324,7 @@ xf86PrintModeline(int scrnIndex,DisplayModePtr mode) mode->HSyncStart, mode->HSyncEnd, mode->HTotal, mode->VDisplay, mode->VSyncStart, mode->VSyncEnd, mode->VTotal, flags, xf86ModeHSync(mode)); - xfree(flags); + free(flags); } #endif /* XORG_VERSION_CURRENT <= 7.2.99.2 */ @@ -607,13 +607,13 @@ xf86GetConfigModes (XF86ConfModeLinePtr conf_mode) for (; conf_mode; conf_mode = (XF86ConfModeLinePtr) conf_mode->list.next) { - mode = xcalloc(1, sizeof(DisplayModeRec)); + mode = calloc(1, sizeof(DisplayModeRec)); if (!mode) continue; mode->name = xstrdup(conf_mode->ml_identifier); if (!mode->name) { - xfree (mode); + free(mode); continue; } mode->type = 0; diff --git a/xserver/hw/xfree86/modes/xf86RandR12.c b/xserver/hw/xfree86/modes/xf86RandR12.c index 7ba09b6fe..c17b5fa95 100644 --- a/xserver/hw/xfree86/modes/xf86RandR12.c +++ b/xserver/hw/xfree86/modes/xf86RandR12.c @@ -30,7 +30,6 @@ #include "xf86.h" #include "os.h" -#include "mibank.h" #include "globals.h" #include "xf86.h" #include "xf86Priv.h" @@ -72,7 +71,7 @@ static Bool xf86RandR12CreateScreenResources12 (ScreenPtr pScreen); static int xf86RandR12Generation; #if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0) -static int xf86RandR12KeyIndex; +static DevPrivateKeyRec xf86RandR12KeyRec; static DevPrivateKey xf86RandR12Key; #define XF86RANDRINFO(p) ((XF86RandRInfoPtr) \ dixLookupPrivate(&(p)->devPrivates, xf86RandR12Key)) @@ -518,7 +517,7 @@ xf86RandR12SetMode (ScreenPtr pScreen, int oldHeight = pScreen->height; int oldmmWidth = pScreen->mmWidth; int oldmmHeight = pScreen->mmHeight; - WindowPtr pRoot = WindowTable[pScreen->myNum]; + WindowPtr pRoot = pScreen->root; DisplayModePtr currentMode = NULL; Bool ret = TRUE; PixmapPtr pspix = NULL; @@ -686,8 +685,8 @@ xf86RandR12ScreenSetSize (ScreenPtr pScreen, XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen); ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen); xf86CrtcConfigPtr config = XF86_CRTC_CONFIG_PTR(pScrn); - WindowPtr pRoot = WindowTable[pScreen->myNum]; - PixmapPtr pScrnPix = (*pScreen->GetScreenPixmap)(pScreen); + WindowPtr pRoot = pScreen->root; + PixmapPtr pScrnPix; Bool ret = FALSE; int c; @@ -728,6 +727,7 @@ xf86RandR12ScreenSetSize (ScreenPtr pScreen, } } + pScrnPix = (*pScreen->GetScreenPixmap)(pScreen); pScreen->width = pScrnPix->drawable.width = width; pScreen->height = pScrnPix->drawable.height = height; randrp->mmWidth = pScreen->mmWidth = mmWidth; @@ -740,7 +740,7 @@ finish: if (pRoot && pScrn->vtSema) (*pScrn->EnableDisableFBAccess) (pScreen->myNum, TRUE); #if RANDR_12_INTERFACE - if (xf86RandR12Key && WindowTable[pScreen->myNum] && ret) + if (xf86RandR12Key && pScreen->root && ret) RRScreenSizeNotify (pScreen); #endif return ret; @@ -884,18 +884,20 @@ xf86RandR12Init (ScreenPtr pScreen) xf86RandR12Generation = serverGeneration; #if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0) - xf86RandR12Key = &xf86RandR12KeyIndex; + xf86RandR12Key = &xf86RandR12KeyRec; + if (!dixRegisterPrivateKey(&xf86RandR12KeyRec, PRIVATE_SCREEN, 0)) + return FALSE; #else xf86RandR12Index = AllocateScreenPrivateIndex(); #endif - randrp = xalloc (sizeof (XF86RandRInfoRec)); + randrp = malloc(sizeof (XF86RandRInfoRec)); if (!randrp) return FALSE; if (!RRScreenInit(pScreen)) { - xfree (randrp); + free(randrp); return FALSE; } rp = rrGetScrPriv(pScreen); @@ -926,6 +928,24 @@ xf86RandR12Init (ScreenPtr pScreen) return TRUE; } +void +xf86RandR12CloseScreen (ScreenPtr pScreen) +{ + XF86RandRInfoPtr randrp; + +#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(7,0,0,0,0) + if (xf86RandR12Key == NULL) + return; +#endif + + randrp = XF86RANDRINFO(pScreen); +#if RANDR_12_INTERFACE + xf86Screens[pScreen->myNum]->EnterVT = randrp->orig_EnterVT; +#endif + + free(randrp); +} + void xf86RandR12SetRotations (ScreenPtr pScreen, Rotation rotations) { @@ -1065,7 +1085,7 @@ xf86RandR12CrtcNotify (RRCrtcPtr randr_crtc) DisplayModePtr mode = &crtc->mode; Bool ret; - randr_outputs = xalloc(config->num_output * sizeof (RROutputPtr)); + randr_outputs = malloc(config->num_output * sizeof (RROutputPtr)); if (!randr_outputs) return FALSE; x = crtc->x; @@ -1102,7 +1122,7 @@ xf86RandR12CrtcNotify (RRCrtcPtr randr_crtc) rotation, crtc->transformPresent ? &crtc->transform : NULL, numOutputs, randr_outputs); - xfree(randr_outputs); + free(randr_outputs); return ret; } @@ -1159,7 +1179,7 @@ xf86RandR12CrtcSet (ScreenPtr pScreen, if (!crtc->scrn->vtSema) return FALSE; - save_crtcs = xalloc(config->num_output * sizeof (xf86CrtcPtr)); + save_crtcs = malloc(config->num_output * sizeof (xf86CrtcPtr)); if ((randr_mode != NULL) != crtc->enabled) changed = TRUE; else if (randr_mode && !xf86RandRModeMatches (randr_mode, &crtc->mode)) @@ -1223,7 +1243,7 @@ xf86RandR12CrtcSet (ScreenPtr pScreen, xf86OutputPtr output = config->output[o]; output->crtc = save_crtcs[o]; } - xfree(save_crtcs); + free(save_crtcs); return FALSE; } xf86RandR13VerifyPanningArea (crtc, pScreen->width, pScreen->height); @@ -1244,7 +1264,7 @@ xf86RandR12CrtcSet (ScreenPtr pScreen, } xf86DisableUnusedFunctions (pScrn); } - xfree(save_crtcs); + free(save_crtcs); return xf86RandR12CrtcNotify (randr_crtc); } @@ -1395,7 +1415,7 @@ xf86RROutputSetModes (RROutputPtr randr_output, DisplayModePtr modes) nmode++; if (nmode) { - rrmodes = xalloc (nmode * sizeof (RRModePtr)); + rrmodes = malloc(nmode * sizeof (RRModePtr)); if (!rrmodes) return FALSE; @@ -1432,7 +1452,7 @@ xf86RROutputSetModes (RROutputPtr randr_output, DisplayModePtr modes) } ret = RROutputSetModes (randr_output, rrmodes, nmode, npreferred); - xfree (rrmodes); + free(rrmodes); return ret; } @@ -1451,8 +1471,8 @@ xf86RandR12SetInfo12 (ScreenPtr pScreen) RRCrtcPtr randr_crtc; int nclone; - clones = xalloc(config->num_output * sizeof (RROutputPtr)); - crtcs = xalloc (config->num_crtc * sizeof (RRCrtcPtr)); + clones = malloc(config->num_output * sizeof (RROutputPtr)); + crtcs = malloc(config->num_crtc * sizeof (RRCrtcPtr)); for (o = 0; o < config->num_output; o++) { xf86OutputPtr output = config->output[o]; @@ -1469,8 +1489,8 @@ xf86RandR12SetInfo12 (ScreenPtr pScreen) if (!RROutputSetCrtcs (output->randr_output, crtcs, ncrtc)) { - xfree (crtcs); - xfree (clones); + free(crtcs); + free(clones); return FALSE; } @@ -1506,13 +1526,13 @@ xf86RandR12SetInfo12 (ScreenPtr pScreen) } if (!RROutputSetClones (output->randr_output, clones, nclone)) { - xfree (crtcs); - xfree (clones); + free(crtcs); + free(clones); return FALSE; } } - xfree (crtcs); - xfree (clones); + free(crtcs); + free(clones); return TRUE; } @@ -1730,7 +1750,7 @@ xf86RandR12ChangeGamma(int scrnIndex, Gamma gamma) if (!size) return Success; - points = xcalloc(size, 3 * sizeof(CARD16)); + points = calloc(size, 3 * sizeof(CARD16)); if (!points) return BadAlloc; @@ -1743,7 +1763,7 @@ xf86RandR12ChangeGamma(int scrnIndex, Gamma gamma) gamma_to_ramp(gamma.blue, blue, size); RRCrtcGammaSet(crtc, red, green, blue); - xfree(points); + free(points); pScrn->gamma = gamma; @@ -1754,10 +1774,16 @@ static Bool xf86RandR12EnterVT (int screen_index, int flags) { ScreenPtr pScreen = screenInfo.screens[screen_index]; + ScrnInfoPtr pScrn = xf86Screens[screen_index]; XF86RandRInfoPtr randrp = XF86RANDRINFO(pScreen); + Bool ret; if (randrp->orig_EnterVT) { - if (!randrp->orig_EnterVT (screen_index, flags)) + pScrn->EnterVT = randrp->orig_EnterVT; + ret = pScrn->EnterVT (screen_index, flags); + randrp->orig_EnterVT = pScrn->EnterVT; + pScrn->EnterVT = xf86RandR12EnterVT; + if (!ret) return FALSE; } diff --git a/xserver/hw/xfree86/modes/xf86RandR12.h b/xserver/hw/xfree86/modes/xf86RandR12.h index c8d9918cf..0c586beee 100644 --- a/xserver/hw/xfree86/modes/xf86RandR12.h +++ b/xserver/hw/xfree86/modes/xf86RandR12.h @@ -30,6 +30,7 @@ extern _X_EXPORT Bool xf86RandR12CreateScreenResources (ScreenPtr pScreen); extern _X_EXPORT Bool xf86RandR12Init(ScreenPtr pScreen); +extern _X_EXPORT void xf86RandR12CloseScreen(ScreenPtr pScreen); extern _X_EXPORT void xf86RandR12SetRotations (ScreenPtr pScreen, Rotation rotation); extern _X_EXPORT void xf86RandR12SetTransformSupport (ScreenPtr pScreen, Bool transforms); extern _X_EXPORT Bool xf86RandR12SetConfig(ScreenPtr pScreen, Rotation rotation, int rate, diff --git a/xserver/hw/xfree86/modes/xf86Rotate.c b/xserver/hw/xfree86/modes/xf86Rotate.c index 5de6b0c00..fdc38c5a6 100644 --- a/xserver/hw/xfree86/modes/xf86Rotate.c +++ b/xserver/hw/xfree86/modes/xf86Rotate.c @@ -76,13 +76,13 @@ xf86RotateCrtcRedisplay (xf86CrtcPtr crtc, RegionPtr region) { ScrnInfoPtr scrn = crtc->scrn; ScreenPtr screen = scrn->pScreen; - WindowPtr root = WindowTable[screen->myNum]; + WindowPtr root = screen->root; PixmapPtr dst_pixmap = crtc->rotatedPixmap; - PictFormatPtr format = compWindowFormat (WindowTable[screen->myNum]); + PictFormatPtr format = compWindowFormat (screen->root); int error; PicturePtr src, dst; - int n = REGION_NUM_RECTS(region); - BoxPtr b = REGION_RECTS(region); + int n = RegionNumRects(region); + BoxPtr b = RegionRects(region); XID include_inferiors = IncludeInferiors; src = CreatePicture (None, @@ -167,10 +167,10 @@ xf86CrtcDamageShadow (xf86CrtcPtr crtc) if (damage_box.y1 < 0) damage_box.y1 = 0; if (damage_box.x2 > pScreen->width) damage_box.x2 = pScreen->width; if (damage_box.y2 > pScreen->height) damage_box.y2 = pScreen->height; - REGION_INIT (pScreen, &damage_region, &damage_box, 1); + RegionInit(&damage_region, &damage_box, 1); DamageRegionAppend (&(*pScreen->GetScreenPixmap)(pScreen)->drawable, &damage_region); - REGION_UNINIT (pScreen, &damage_region); + RegionUninit(&damage_region); crtc->shadowClear = TRUE; } @@ -217,7 +217,7 @@ xf86RotateRedisplay(ScreenPtr pScreen) return FALSE; xf86RotatePrepare (pScreen); region = DamageRegion(damage); - if (REGION_NOTEMPTY(pScreen, region)) + if (RegionNotEmpty(region)) { int c; SourceValidateProcPtr SourceValidate; @@ -240,14 +240,14 @@ xf86RotateRedisplay(ScreenPtr pScreen) RegionRec crtc_damage; /* compute portion of damage that overlaps crtc */ - REGION_INIT(pScreen, &crtc_damage, &crtc->bounds, 1); - REGION_INTERSECT (pScreen, &crtc_damage, &crtc_damage, region); + RegionInit(&crtc_damage, &crtc->bounds, 1); + RegionIntersect(&crtc_damage, &crtc_damage, region); /* update damaged region */ - if (REGION_NOTEMPTY(pScreen, &crtc_damage)) + if (RegionNotEmpty(&crtc_damage)) xf86RotateCrtcRedisplay (crtc, &crtc_damage); - REGION_UNINIT (pScreen, &crtc_damage); + RegionUninit(&crtc_damage); } } pScreen->SourceValidate = SourceValidate; @@ -405,8 +405,7 @@ xf86CrtcRotate (xf86CrtcPtr crtc) */ xf86RotateDestroy (crtc); crtc->transform_in_use = FALSE; - if (new_params) - xfree (new_params); + free(new_params); new_params = NULL; new_nparams = 0; new_filter = NULL; @@ -467,7 +466,7 @@ xf86CrtcRotate (xf86CrtcPtr crtc) if (transform) { if (transform->nparams) { - new_params = xalloc (transform->nparams * sizeof (xFixed)); + new_params = malloc(transform->nparams * sizeof (xFixed)); if (new_params) { memcpy (new_params, transform->params, transform->nparams * sizeof (xFixed)); @@ -506,8 +505,7 @@ xf86CrtcRotate (xf86CrtcPtr crtc) crtc->crtc_to_framebuffer = crtc_to_fb; crtc->f_crtc_to_framebuffer = f_crtc_to_fb; crtc->f_framebuffer_to_crtc = f_fb_to_crtc; - if (crtc->params) - xfree (crtc->params); + free(crtc->params); crtc->params = new_params; crtc->nparams = new_nparams; crtc->filter = new_filter; diff --git a/xserver/hw/xfree86/os-support/Makefile.in b/xserver/hw/xfree86/os-support/Makefile.in index d3289f8f9..a9d0ec674 100644 --- a/xserver/hw/xfree86/os-support/Makefile.in +++ b/xserver/hw/xfree86/os-support/Makefile.in @@ -125,10 +125,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -216,6 +212,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -230,6 +228,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -247,10 +246,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -306,10 +309,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -327,17 +331,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -364,20 +362,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -469,6 +470,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/xfree86/os-support/bsd/Makefile.in b/xserver/hw/xfree86/os-support/bsd/Makefile.in index c4eee1550..22eef3126 100644 --- a/xserver/hw/xfree86/os-support/bsd/Makefile.in +++ b/xserver/hw/xfree86/os-support/bsd/Makefile.in @@ -141,10 +141,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -232,6 +228,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -246,6 +244,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -263,10 +262,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -322,10 +325,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -343,17 +347,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -380,20 +378,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -485,6 +486,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/xfree86/os-support/bsd/alpha_video.c b/xserver/hw/xfree86/os-support/bsd/alpha_video.c index 797878ba9..29301cc30 100644 --- a/xserver/hw/xfree86/os-support/bsd/alpha_video.c +++ b/xserver/hw/xfree86/os-support/bsd/alpha_video.c @@ -323,7 +323,7 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags) "xf86MapVidMem", DEV_MEM, Size, Base, strerror(errno)); } - return(base); + return base; } /* else, mmap /dev/vga */ @@ -342,7 +342,7 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags) FatalError("xf86MapVidMem: Could not mmap /dev/vga (%s)\n", strerror(errno)); } - return(base); + return base; } static void @@ -365,7 +365,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, checkDevMem(TRUE); if (devMemFd == -1) { - return(-1); + return -1; } psize = getpagesize(); @@ -379,7 +379,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, xf86Msg(X_WARNING, "xf86ReadBIOS: %s mmap[s=%x,a=%lx,o=%lx] failed (%s)\n", DEV_MEM, Len, Base, Offset, strerror(errno)); - return(-1); + return -1; } #ifdef DEBUG xf86MsgVerb(X_INFO, 3, "xf86ReadBIOS: BIOS at 0x%08x has signature 0x%04x\n", @@ -392,7 +392,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, "-> %02x %02x %02x %02x...\n", Base, Offset, Len, Buf[0], Buf[1], Buf[2], Buf[3]); #endif - return(Len); + return Len; } diff --git a/xserver/hw/xfree86/os-support/bsd/arm_video.c b/xserver/hw/xfree86/os-support/bsd/arm_video.c index 50c0655b1..ca0c1a128 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.6 2010/07/27 19:02:33 matthieu Exp $ */ +/* $OpenBSD: arm_video.c,v 1.7 2010/12/05 15:36:07 matthieu Exp $ */ /* * Copyright 1992 by Rich Murphey * Copyright 1993 by David Wexelblat diff --git a/xserver/hw/xfree86/os-support/bsd/bsd_VTsw.c b/xserver/hw/xfree86/os-support/bsd/bsd_VTsw.c index 4842be5c9..57d832a20 100644 --- a/xserver/hw/xfree86/os-support/bsd/bsd_VTsw.c +++ b/xserver/hw/xfree86/os-support/bsd/bsd_VTsw.c @@ -57,7 +57,7 @@ xf86VTSwitchPending() { #if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT) if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT) { - return(xf86Info.vtRequestsPending ? TRUE : FALSE); + return xf86Info.vtRequestsPending ? TRUE : FALSE; } #endif return FALSE; @@ -70,9 +70,9 @@ xf86VTSwitchAway() if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT) { xf86Info.vtRequestsPending = FALSE; if (ioctl(xf86Info.consoleFd, VT_RELDISP, 1) < 0) - return(FALSE); + return FALSE; else - return(TRUE); + return TRUE; } #endif return FALSE; @@ -85,19 +85,19 @@ xf86VTSwitchTo() if (xf86Info.consType == SYSCONS || xf86Info.consType == PCVT) { xf86Info.vtRequestsPending = FALSE; if (ioctl(xf86Info.consoleFd, VT_RELDISP, VT_ACKACQ) < 0) - return(FALSE); + return FALSE; else - return(TRUE); + return TRUE; } #endif - return(TRUE); + return TRUE; } Bool xf86VTActivate(int vtno) { if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, vtno) < 0) { - return(FALSE); + return FALSE; } - return(TRUE); + return TRUE; } diff --git a/xserver/hw/xfree86/os-support/bsd/bsd_init.c b/xserver/hw/xfree86/os-support/bsd/bsd_init.c index bbdf06b56..20c516962 100644 --- a/xserver/hw/xfree86/os-support/bsd/bsd_init.c +++ b/xserver/hw/xfree86/os-support/bsd/bsd_init.c @@ -641,9 +641,11 @@ xf86OpenWScons() int mode = WSDISPLAYIO_MODE_MAPPED; int i; char ttyname[16]; +#ifdef WSCONS_SUPPORT int mib[2]; size_t len; dev_t dev; +#endif #ifdef KERN_CONSDEV mib[0] = CTL_KERN; @@ -758,13 +760,13 @@ xf86ProcessArgument(int argc, char *argv[], int i) if (!strcmp(argv[i], "-keeptty")) { KeepTty = TRUE; - return(1); + return 1; } #if defined (SYSCONS_SUPPORT) || defined (PCVT_SUPPORT) if (!strcmp(argv[i], "-sharevts")) { ShareVTs = TRUE; - return(1); + return 1; } if ((argv[i][0] == 'v') && (argv[i][1] == 't')) { @@ -773,12 +775,12 @@ xf86ProcessArgument(int argc, char *argv[], int i) { UseMsg(); VTnum = -1; - return(0); + return 0; } - return(1); + return 1; } #endif /* SYSCONS_SUPPORT || PCVT_SUPPORT */ - return(0); + return 0; } void diff --git a/xserver/hw/xfree86/os-support/bsd/hppa_video.c b/xserver/hw/xfree86/os-support/bsd/hppa_video.c index c67668800..f12be73c8 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.3 2010/07/31 17:47:50 matthieu Exp $ */ +/* $OpenBSD: hppa_video.c,v 1.4 2010/12/05 15:36:07 matthieu Exp $ */ /* * Copyright 1992 by Rich Murphey * Copyright 1993 by David Wexelblat diff --git a/xserver/hw/xfree86/os-support/bsd/i386_video.c b/xserver/hw/xfree86/os-support/bsd/i386_video.c index 3f7c81021..33219f34d 100644 --- a/xserver/hw/xfree86/os-support/bsd/i386_video.c +++ b/xserver/hw/xfree86/os-support/bsd/i386_video.c @@ -231,7 +231,7 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags) "xf86MapVidMem", DEV_MEM, Size, Base, strerror(errno)); } - return(base); + return base; } /* else, mmap /dev/vga */ @@ -250,7 +250,7 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags) FatalError("xf86MapVidMem: Could not mmap /dev/vga (%s)", strerror(errno)); } - return(base); + return base; } static void @@ -273,7 +273,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, checkDevMem(TRUE); if (devMemFd == -1) { - return(-1); + return -1; } psize = getpagesize(); @@ -292,7 +292,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, xf86Msg(X_WARNING, SYSCTL_MSG2); } #endif - return(-1); + return -1; } #ifdef DEBUG ErrorF("xf86ReadBIOS: BIOS at 0x%08x has signature 0x%04x\n", @@ -305,7 +305,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, "-> %02x %02x %02x %02x...\n", Base, Offset, Len, Buf[0], Buf[1], Buf[2], Buf[3]); #endif - return(Len); + return Len; } #ifdef USE_I386_IOPL @@ -516,7 +516,7 @@ getAllRanges(int *nmr) mro.mo_arg[0] = *nmr; mro.mo_desc = mrd; if (ioctl(devMemFd, MEMRANGE_GET, &mro)) { - xfree(mrd); + free(mrd); return NULL; } return mrd; @@ -563,7 +563,7 @@ cleanMTRR() #ifdef DEBUG sleep(10); #endif - xfree(mrd); + free(mrd); return TRUE; } @@ -581,7 +581,7 @@ freeRangeList(RangePtr range) while (range) { rp = range; range = rp->next; - xfree(rp); + free(rp); } } @@ -666,7 +666,7 @@ findRanges(unsigned long base, unsigned long size, RangePtr *ucp, RangePtr *wcp) *p = rp; } } - xfree(mrd); + free(mrd); } /* @@ -873,7 +873,7 @@ NetBSDsetWC(int screenNum, unsigned long base, unsigned long size, Bool enable, n = 1; if (i386_set_mtrr(mtrrp, &n) < 0) { - xfree(mtrrp); + free(mtrrp); return NULL; } return mtrrp; @@ -890,7 +890,7 @@ NetBSDundoWC(int screenNum, pointer list) n = 1; mtrrp->flags &= ~MTRR_VALID; i386_set_mtrr(mtrrp, &n); - xfree(mtrrp); + free(mtrrp); } #endif diff --git a/xserver/hw/xfree86/os-support/bsd/sparc64_video.c b/xserver/hw/xfree86/os-support/bsd/sparc64_video.c index 30c316593..809ce5ad5 100644 --- a/xserver/hw/xfree86/os-support/bsd/sparc64_video.c +++ b/xserver/hw/xfree86/os-support/bsd/sparc64_video.c @@ -92,7 +92,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, int Len) { - return (0); + return 0; } #ifdef X_PRIVSEP diff --git a/xserver/hw/xfree86/os-support/bus/Makefile.in b/xserver/hw/xfree86/os-support/bus/Makefile.in index 7ce6c4212..2dd2fc672 100644 --- a/xserver/hw/xfree86/os-support/bus/Makefile.in +++ b/xserver/hw/xfree86/os-support/bus/Makefile.in @@ -127,10 +127,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -218,6 +214,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -232,6 +230,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -249,10 +248,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -308,10 +311,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -329,17 +333,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -366,20 +364,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -471,6 +472,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/xfree86/os-support/bus/Pci.c b/xserver/hw/xfree86/os-support/bus/Pci.c index b7fa25f71..a0a597d87 100644 --- a/xserver/hw/xfree86/os-support/bus/Pci.c +++ b/xserver/hw/xfree86/os-support/bus/Pci.c @@ -126,7 +126,6 @@ #include #include -#include #include "compiler.h" #include "xf86.h" #include "xf86Priv.h" diff --git a/xserver/hw/xfree86/os-support/bus/Pci.h b/xserver/hw/xfree86/os-support/bus/Pci.h index b52a6cfae..e001c304f 100644 --- a/xserver/hw/xfree86/os-support/bus/Pci.h +++ b/xserver/hw/xfree86/os-support/bus/Pci.h @@ -107,8 +107,6 @@ #ifndef _PCI_H #define _PCI_H 1 -#include -#include #include "xf86Pci.h" #include "xf86PciInfo.h" @@ -121,9 +119,6 @@ #define PCI_DOM_MASK 0x0ffu #endif -#define DEVID(vendor, device) \ - ((CARD32)((PCI_##device << 16) | PCI_##vendor)) - #ifndef PCI_DOM_MASK # define PCI_DOM_MASK 0x0ffu #endif @@ -143,9 +138,6 @@ #define PCI_DEV_FROM_TAG(tag) (((tag) & 0x0000f800u) >> 11) #define PCI_FUNC_FROM_TAG(tag) (((tag) & 0x00000700u) >> 8) -#define PCI_DFN_FROM_TAG(tag) (((tag) & 0x0000ff00u) >> 8) -#define PCI_BDEV_FROM_TAG(tag) ((tag) & 0x00fff800u) - #define PCI_DOM_FROM_BUS(bus) (((bus) >> 8) & (PCI_DOM_MASK)) #define PCI_BUS_NO_DOMAIN(bus) ((bus) & 0xffu) #define PCI_TAG_NO_DOMAIN(tag) ((tag) & 0x00ffff00u) diff --git a/xserver/hw/xfree86/os-support/bus/Sbus.c b/xserver/hw/xfree86/os-support/bus/Sbus.c index 0b6205f0b..7829d803f 100644 --- a/xserver/hw/xfree86/os-support/bus/Sbus.c +++ b/xserver/hw/xfree86/os-support/bus/Sbus.c @@ -191,10 +191,8 @@ sparcPromClose(void) close(promFd); promFd = -1; } - if (promOpio) { - xfree(promOpio); - promOpio = NULL; - } + free(promOpio); + promOpio = NULL; promOpenCount = 0; } @@ -208,7 +206,7 @@ sparcPromInit(void) promFd = open("/dev/openprom", O_RDONLY, 0); if (promFd == -1) return -1; - promOpio = (struct openpromio *)xalloc(4096); + promOpio = (struct openpromio *)malloc(4096); if (!promOpio) { sparcPromClose(); return -1; @@ -515,11 +513,11 @@ sparcPromNode2Pathname(sbusPromNodePtr pnode) char *ret; if (!pnode->node) return NULL; - ret = xalloc(4096); + ret = malloc(4096); if (!ret) return NULL; if (promWalkNode2Pathname(ret, promRootNode, promGetChild(promRootNode), pnode->node, 0)) return ret; - xfree(ret); + free(ret); return NULL; } @@ -585,7 +583,7 @@ sparcPromPathname2Node(const char *pathName) char *name, *regstr, *p; i = strlen(pathName); - name = xalloc(i + 2); + name = malloc(i + 2); if (! name) return 0; strcpy (name, pathName); name [i + 1] = 0; @@ -605,7 +603,7 @@ sparcPromPathname2Node(const char *pathName) return 0; promGetSibling(0); i = promWalkPathname2Node(name + 1, regstr, promRootNode, 0); - xfree(name); + free(name); return i; } diff --git a/xserver/hw/xfree86/os-support/hurd/Makefile.in b/xserver/hw/xfree86/os-support/hurd/Makefile.in index 304b20fb4..7af8599c8 100644 --- a/xserver/hw/xfree86/os-support/hurd/Makefile.in +++ b/xserver/hw/xfree86/os-support/hurd/Makefile.in @@ -109,10 +109,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -200,6 +196,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -214,6 +212,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -231,10 +230,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -290,10 +293,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -311,17 +315,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -348,20 +346,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -453,6 +454,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/xfree86/os-support/linux/Makefile.in b/xserver/hw/xfree86/os-support/linux/Makefile.in index c1d8de5cc..b3ed47b65 100644 --- a/xserver/hw/xfree86/os-support/linux/Makefile.in +++ b/xserver/hw/xfree86/os-support/linux/Makefile.in @@ -130,10 +130,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -221,6 +217,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -235,6 +233,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -252,10 +251,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -311,10 +314,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -332,17 +336,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -369,20 +367,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -474,6 +475,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/xfree86/os-support/linux/int10/linux.c b/xserver/hw/xfree86/os-support/linux/int10/linux.c index 0cf3507c3..2965b3756 100644 --- a/xserver/hw/xfree86/os-support/linux/int10/linux.c +++ b/xserver/hw/xfree86/os-support/linux/int10/linux.c @@ -100,7 +100,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags) options = xf86HandleInt10Options(xf86Screens[screen],entityIndex); if (int10skip(options)) { - xfree(options); + free(options); return NULL; } @@ -290,7 +290,7 @@ xf86ExtendedInitInt10(int entityIndex, int Flags) dprint(0xc0000, 0x20); #endif - xfree(options); + free(options); return pInt; error3: @@ -308,11 +308,11 @@ error2: error1: if (vMem) munmap(vMem, SYS_BIOS - V_BIOS); - xfree(((linuxInt10Priv*)pInt->private)->alloc); - xfree(pInt->private); + free(((linuxInt10Priv*)pInt->private)->alloc); + free(pInt->private); error0: - xfree(options); - xfree(pInt); + free(options); + free(pInt); return NULL; } @@ -399,9 +399,9 @@ xf86FreeInt10(xf86Int10InfoPtr pInt) shmctl(((linuxInt10Priv*)pInt->private)->lowMem, IPC_RMID, NULL); if (((linuxInt10Priv*)pInt->private)->highMem >= 0) shmctl(((linuxInt10Priv*)pInt->private)->highMem, IPC_RMID, NULL); - xfree(((linuxInt10Priv*)pInt->private)->alloc); - xfree(pInt->private); - xfree(pInt); + free(((linuxInt10Priv*)pInt->private)->alloc); + free(pInt->private); + free(pInt); } void * diff --git a/xserver/hw/xfree86/os-support/linux/lnx_agp.c b/xserver/hw/xfree86/os-support/linux/lnx_agp.c index 61437406d..c65f1e3f3 100644 --- a/xserver/hw/xfree86/os-support/linux/lnx_agp.c +++ b/xserver/hw/xfree86/os-support/linux/lnx_agp.c @@ -64,7 +64,7 @@ GARTInit(int screenNum) struct _agp_info agpinf; if (initDone) - return (gartFd != -1); + return gartFd != -1; initDone = TRUE; @@ -132,7 +132,7 @@ xf86GetAGPInfo(int screenNum) return NULL; - if ((info = xcalloc(sizeof(AgpInfo), 1)) == NULL) { + if ((info = calloc(sizeof(AgpInfo), 1)) == NULL) { xf86DrvMsg(screenNum, X_ERROR, "xf86GetAGPInfo: Failed to allocate AgpInfo\n"); return NULL; diff --git a/xserver/hw/xfree86/os-support/linux/lnx_init.c b/xserver/hw/xfree86/os-support/linux/lnx_init.c index 297e7a65a..92bfde48f 100644 --- a/xserver/hw/xfree86/os-support/linux/lnx_init.c +++ b/xserver/hw/xfree86/os-support/linux/lnx_init.c @@ -277,8 +277,9 @@ xf86OpenConsole(void) tcsetattr(xf86Info.consoleFd, TCSANOW, &nTty); /* need to keep the buffer clean, else the kernel gets angry */ - console_handler = xf86AddGeneralHandler(xf86Info.consoleFd, - drain_console, NULL); + if (xf86Info.allowEmptyInput) + console_handler = xf86AddGeneralHandler(xf86Info.consoleFd, + drain_console, NULL); /* we really should have a InitOSInputDevices() function instead * of Init?$#*&Device(). So I just place it here */ @@ -365,17 +366,17 @@ xf86ProcessArgument(int argc, char *argv[], int i) if (!strcmp(argv[i], "-keeptty")) { KeepTty = TRUE; - return(1); + return 1; } if (!strcmp(argv[i], "-novtswitch")) { VTSwitch = FALSE; - return(1); + return 1; } if (!strcmp(argv[i], "-sharevts")) { ShareVTs = TRUE; - return(1); + return 1; } if ((argv[i][0] == 'v') && (argv[i][1] == 't')) { @@ -383,11 +384,11 @@ xf86ProcessArgument(int argc, char *argv[], int i) { UseMsg(); VTnum = -1; - return(0); + return 0; } - return(1); + return 1; } - return(0); + return 0; } void diff --git a/xserver/hw/xfree86/os-support/linux/lnx_video.c b/xserver/hw/xfree86/os-support/linux/lnx_video.c index 26a17425a..bdd2639ba 100644 --- a/xserver/hw/xfree86/os-support/linux/lnx_video.c +++ b/xserver/hw/xfree86/os-support/linux/lnx_video.c @@ -182,7 +182,7 @@ mtrr_cull_wc_region(int screenNum, unsigned long base, unsigned long size, /* Found an overlapping region. Delete it. */ - wcr = xalloc(sizeof(*wcr)); + wcr = malloc(sizeof(*wcr)); if (!wcr) return NULL; wcr->sentry.base = gent.base; @@ -203,7 +203,7 @@ mtrr_cull_wc_region(int screenNum, unsigned long base, unsigned long size, wcreturn = wcr; gent.regnum--; } else { - xfree(wcr); + free(wcr); xf86DrvMsgVerb(screenNum, X_WARNING, 0, "Failed to remove MMIO " "write-combining range (0x%lx,0x%lx)\n", @@ -263,7 +263,7 @@ mtrr_add_wc_region(int screenNum, unsigned long base, unsigned long size, if (!mtrr_open(from == X_CONFIG ? 0 : 2)) return wcreturn; - *wcr = curwcr = xalloc(sizeof(**wcr)); + *wcr = curwcr = malloc(sizeof(**wcr)); if (!curwcr) return wcreturn; @@ -313,7 +313,7 @@ mtrr_add_wc_region(int screenNum, unsigned long base, unsigned long size, } else { *wcr = curwcr->next; - xfree(curwcr); + free(curwcr); /* Don't complain about the VGA region: MTRR fixed regions aren't currently supported, but might be in @@ -339,7 +339,7 @@ mtrr_undo_wc_region(int screenNum, struct mtrr_wc_region *wcr) ioctl(mtrr_fd, MTRRIOC_DEL_ENTRY, &p->sentry); prev = p; p = p->next; - xfree(prev); + free(prev); } } } diff --git a/xserver/hw/xfree86/os-support/misc/Makefile.in b/xserver/hw/xfree86/os-support/misc/Makefile.in index 459a8c67d..3dca17267 100644 --- a/xserver/hw/xfree86/os-support/misc/Makefile.in +++ b/xserver/hw/xfree86/os-support/misc/Makefile.in @@ -107,10 +107,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -198,6 +194,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -212,6 +210,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -229,10 +228,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -288,10 +291,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -309,17 +313,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -346,20 +344,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -451,6 +452,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/xfree86/os-support/sco/Makefile.in b/xserver/hw/xfree86/os-support/sco/Makefile.in index fef1a81f9..4d05b32a4 100644 --- a/xserver/hw/xfree86/os-support/sco/Makefile.in +++ b/xserver/hw/xfree86/os-support/sco/Makefile.in @@ -92,10 +92,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -183,6 +179,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -197,6 +195,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -214,10 +213,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -273,10 +276,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -294,17 +298,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -331,20 +329,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -436,6 +437,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/xfree86/os-support/sco/VTsw_sco.c b/xserver/hw/xfree86/os-support/sco/VTsw_sco.c index 0a59fb965..c9194ec8d 100644 --- a/xserver/hw/xfree86/os-support/sco/VTsw_sco.c +++ b/xserver/hw/xfree86/os-support/sco/VTsw_sco.c @@ -58,7 +58,7 @@ xf86VTRequest(int sig) Bool xf86VTSwitchPending(void) { - return(xf86Info.vtRequestsPending ? TRUE : FALSE); + return xf86Info.vtRequestsPending ? TRUE : FALSE; } /* @@ -79,9 +79,9 @@ xf86VTSwitchAway(void) xf86Info.vtRequestsPending = FALSE; if (ioctl(xf86Info.consoleFd, VT_RELDISP, VT_TRUE) < 0) { - return(FALSE); + return FALSE; } else { - return(TRUE); + return TRUE; } } @@ -97,7 +97,7 @@ xf86VTSwitchTo(void) xf86Info.vtRequestsPending = FALSE; if (ioctl(xf86Info.consoleFd, VT_RELDISP, VT_ACKACQ) < 0) { - return(FALSE); + return FALSE; } else { if (sco_ledstatus >= 0) { ioctl (xf86Info.consoleFd, KDSETLED, sco_ledstate); @@ -120,8 +120,8 @@ Bool xf86VTActivate(int vtno) { if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, vtno - 1) < 0) { - return(FALSE); + return FALSE; } - return(TRUE); + return TRUE; } diff --git a/xserver/hw/xfree86/os-support/sco/sco_init.c b/xserver/hw/xfree86/os-support/sco/sco_init.c index 5f7db3437..3322ed589 100644 --- a/xserver/hw/xfree86/os-support/sco/sco_init.c +++ b/xserver/hw/xfree86/os-support/sco/sco_init.c @@ -233,7 +233,7 @@ xf86ProcessArgument(int argc, char *argv[], int i) */ if (!strcmp(argv[i], "-keeptty")) { KeepTty = TRUE; - return(1); + return 1; } /* @@ -246,7 +246,7 @@ xf86ProcessArgument(int argc, char *argv[], int i) */ if (!strcmp(argv[i], "-nompxlock")) { mpxLock = FALSE; - return (1); + return 1; } /* @@ -256,14 +256,14 @@ xf86ProcessArgument(int argc, char *argv[], int i) if (sscanf(argv[i], "vt%2d", &VTnum) == 0) { UseMsg(); VTnum = -1; - return(0); + return 0; } if (VTnum <= 0) { UseMsg(); VTnum = -1; - return(0); + return 0; } - return(1); + return 1; } /* @@ -273,14 +273,14 @@ xf86ProcessArgument(int argc, char *argv[], int i) if (++i > argc) { UseMsg(); VTnum = -1; - return(0); + return 0; } else { VTnum = -2; strlcpy (vtdevice, argv[i], sizeof(vtdevice)); - return(2); + return 2; } } - return(0); + return 0; } void diff --git a/xserver/hw/xfree86/os-support/shared/VTsw_noop.c b/xserver/hw/xfree86/os-support/shared/VTsw_noop.c index 3425840a2..98b3a8da3 100644 --- a/xserver/hw/xfree86/os-support/shared/VTsw_noop.c +++ b/xserver/hw/xfree86/os-support/shared/VTsw_noop.c @@ -38,23 +38,23 @@ Bool xf86VTSwitchPending(void) { - return(FALSE); + return FALSE; } Bool xf86VTSwitchAway(void) { - return(FALSE); + return FALSE; } Bool xf86VTSwitchTo(void) { - return(TRUE); + return TRUE; } Bool xf86VTActivate(int vtno) { - return(TRUE); + return TRUE; } diff --git a/xserver/hw/xfree86/os-support/shared/VTsw_usl.c b/xserver/hw/xfree86/os-support/shared/VTsw_usl.c index 393f1c0b9..d4ef0f713 100644 --- a/xserver/hw/xfree86/os-support/shared/VTsw_usl.c +++ b/xserver/hw/xfree86/os-support/shared/VTsw_usl.c @@ -55,7 +55,7 @@ xf86VTRequest(int sig) Bool xf86VTSwitchPending(void) { - return(xf86Info.vtRequestsPending ? TRUE : FALSE); + return xf86Info.vtRequestsPending ? TRUE : FALSE; } Bool @@ -64,14 +64,14 @@ xf86VTSwitchAway(void) xf86Info.vtRequestsPending = FALSE; if (ioctl(xf86Info.consoleFd, VT_RELDISP, 1) < 0) { - return(FALSE); + return FALSE; } else { #ifdef OSSWITCHAWAY OSSWITCHAWAY; #endif - return(TRUE); + return TRUE; } } @@ -81,11 +81,11 @@ xf86VTSwitchTo(void) xf86Info.vtRequestsPending = FALSE; if (ioctl(xf86Info.consoleFd, VT_RELDISP, VT_ACKACQ) < 0) { - return(FALSE); + return FALSE; } else { - return(TRUE); + return TRUE; } } @@ -94,8 +94,8 @@ xf86VTActivate(int vtno) { #ifdef VT_ACTIVATE if (ioctl(xf86Info.consoleFd, VT_ACTIVATE, vtno) < 0) { - return(FALSE); + return FALSE; } #endif - return(TRUE); + return TRUE; } diff --git a/xserver/hw/xfree86/os-support/shared/bios_devmem.c b/xserver/hw/xfree86/os-support/shared/bios_devmem.c index 67a14f5d6..b9dfb7dcd 100644 --- a/xserver/hw/xfree86/os-support/shared/bios_devmem.c +++ b/xserver/hw/xfree86/os-support/shared/bios_devmem.c @@ -53,7 +53,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, { xf86Msg(X_WARNING, "xf86ReadBIOS: Failed to open %s (%s)\n", DEV_MEM, strerror(errno)); - return(-1); + return -1; } if (lseek(fd, (Base+Offset), SEEK_SET) < 0) @@ -61,15 +61,15 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, xf86Msg(X_WARNING, "xf86ReadBIOS: %s seek failed (%s)\n", DEV_MEM, strerror(errno)); close(fd); - return(-1); + return -1; } if (read(fd, Buf, Len) != Len) { xf86Msg(X_WARNING, "xf86ReadBIOS: %s read failed (%s)\n", DEV_MEM, strerror(errno)); close(fd); - return(-1); + return -1; } close(fd); - return(Len); + return Len; } diff --git a/xserver/hw/xfree86/os-support/shared/bios_mmap.c b/xserver/hw/xfree86/os-support/shared/bios_mmap.c index 40afd5b8e..33a8df042 100644 --- a/xserver/hw/xfree86/os-support/shared/bios_mmap.c +++ b/xserver/hw/xfree86/os-support/shared/bios_mmap.c @@ -53,7 +53,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, { xf86Msg(X_WARNING, "xf86ReadBIOS: Failed to open %s (%s)\n", DEV_MEM, strerror(errno)); - return(-1); + return -1; } psize = getpagesize(); Offset += Base & (psize - 1); @@ -66,14 +66,14 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, xf86Msg(X_WARNING, "xf86ReadBIOS: %s mmap failed (%s)\n", DEV_MEM, strerror(errno)); close(fd); - return(-1); + return -1; } DebugF("xf86ReadBIOS: BIOS at 0x%08x has signature 0x%04x\n", Base, ptr[0] | (ptr[1] << 8)); (void)memcpy(Buf, (void *)(ptr + Offset), Len); (void)munmap((caddr_t)ptr, mlen); (void)close(fd); - return(Len); + return Len; } #else /* __alpha__ */ @@ -114,7 +114,7 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, { xf86Msg(X_WARNING, "xf86ReadBIOS: Failed to open %s (%s)\n", DEV_MEM, strerror(errno)); - return(-1); + return -1; } psize = getpagesize(); @@ -128,14 +128,14 @@ xf86ReadBIOS(unsigned long Base, unsigned long Offset, unsigned char *Buf, { xf86Msg(X_WARNING, "xf86ReadBIOS: Failed to mmap %s (%s)\n", DEV_MEM, strerror(errno)); - return(-1); + return -1; } xf86SlowBCopyFromBus((unsigned char *)(base+Offset), Buf, Len); munmap((caddr_t)base, mlen); close(fd); - return(Len); + return Len; } #endif /* __alpha__ */ diff --git a/xserver/hw/xfree86/os-support/shared/posix_tty.c b/xserver/hw/xfree86/os-support/shared/posix_tty.c index 29b0899cc..538b62d80 100644 --- a/xserver/hw/xfree86/os-support/shared/posix_tty.c +++ b/xserver/hw/xfree86/os-support/shared/posix_tty.c @@ -112,7 +112,7 @@ GetBaud (int baudrate) if (baudrate == 460800) return B460800; #endif - return (0); + return 0; } int @@ -126,7 +126,7 @@ xf86OpenSerial (pointer options) if (!dev) { xf86Msg (X_ERROR, "xf86OpenSerial: No Device specified.\n"); - return (-1); + return -1; } #ifndef X_PRIVSEP SYSCALL (fd = open (dev, O_RDWR | O_NONBLOCK)); @@ -138,15 +138,15 @@ xf86OpenSerial (pointer options) xf86Msg (X_ERROR, "xf86OpenSerial: Cannot open device %s\n\t%s.\n", dev, strerror (errno)); - xfree(dev); - return (-1); + free(dev); + return -1; } if (!isatty (fd)) { /* Allow non-tty devices to be opened. */ - xfree(dev); - return (fd); + free(dev); + return fd; } /* set up default port parameters */ @@ -168,27 +168,27 @@ xf86OpenSerial (pointer options) if (xf86SetSerial (fd, options) == -1) { SYSCALL (close (fd)); - xfree(dev); - return (-1); + free(dev); + return -1; } SYSCALL (i = fcntl (fd, F_GETFL, 0)); if (i == -1) { SYSCALL (close (fd)); - xfree(dev); - return (-1); + free(dev); + return -1; } i &= ~O_NONBLOCK; SYSCALL (i = fcntl (fd, F_SETFL, i)); if (i == -1) { SYSCALL (close (fd)); - xfree(dev); - return (-1); + free(dev); + return -1; } - xfree(dev); - return (fd); + free(dev); + return fd; } int @@ -219,7 +219,7 @@ xf86SetSerial (int fd, pointer options) { xf86Msg (X_ERROR, "Invalid Option BaudRate value: %d\n", val); - return (-1); + return -1; } } @@ -236,7 +236,7 @@ xf86SetSerial (int fd, pointer options) default: xf86Msg (X_ERROR, "Invalid Option StopBits value: %d\n", val); - return (-1); + return -1; break; } } @@ -264,7 +264,7 @@ xf86SetSerial (int fd, pointer options) default: xf86Msg (X_ERROR, "Invalid Option DataBits value: %d\n", val); - return (-1); + return -1; break; } } @@ -288,7 +288,7 @@ xf86SetSerial (int fd, pointer options) { xf86Msg (X_ERROR, "Invalid Option Parity value: %s\n", s); - return (-1); + return -1; } } @@ -324,7 +324,7 @@ xf86SetSerial (int fd, pointer options) { xf86Msg (X_ERROR, "Invalid Option FlowControl value: %s\n", s); - return (-1); + return -1; } } @@ -340,26 +340,21 @@ xf86SetSerial (int fd, pointer options) #else xf86Msg (X_WARNING, "Option ClearDTR not supported on this OS\n"); - return (-1); + return -1; #endif xf86MarkOptionUsedByName (options, "ClearDTR"); } if ((xf86SetBoolOption (options, "ClearRTS", FALSE))) { -#ifdef CLEARRTS_SUPPORT - val = TIOCM_RTS; - SYSCALL (ioctl(fd, TIOCMBIC, &val)); -#else xf86Msg (X_WARNING, "Option ClearRTS not supported on this OS\n"); - return (-1); -#endif + return -1; xf86MarkOptionUsedByName (options, "ClearRTS"); } SYSCALL (r = tcsetattr (fd, TCSANOW, &t)); - return (r); + return r; } int @@ -386,11 +381,11 @@ xf86SetSerialSpeed (int fd, int speed) { xf86Msg (X_ERROR, "Invalid Option BaudRate value: %d\n", speed); - return (-1); + return -1; } SYSCALL (r = tcsetattr (fd, TCSANOW, &t)); - return (r); + return r; } int @@ -405,7 +400,7 @@ xf86ReadSerial (int fd, void *buf, int count) for (i = 1; i < r; i++) DebugF(", 0x%x",(unsigned char)*(((unsigned char *)buf) + i)); DebugF("\n"); - return (r); + return r; } int @@ -419,7 +414,7 @@ xf86WriteSerial (int fd, const void *buf, int count) ErrorF(", 0x%x",(unsigned char)*(((unsigned char *)buf) + i)); DebugF("\n"); SYSCALL (r = write (fd, buf, count)); - return (r); + return r; } int @@ -428,7 +423,7 @@ xf86CloseSerial (int fd) int r; SYSCALL (r = close (fd)); - return (r); + return r; } int @@ -454,7 +449,7 @@ xf86WaitForInput (int fd, int timeout) SYSCALL (r = select (FD_SETSIZE, NULL, NULL, NULL, &to)); } xf86ErrorFVerb (9,"select returned %d\n", r); - return (r); + return r; } int @@ -463,7 +458,7 @@ xf86SerialSendBreak (int fd, int duration) int r; SYSCALL (r = tcsendbreak (fd, duration)); - return (r); + return r; } diff --git a/xserver/hw/xfree86/os-support/shared/vidmem.c b/xserver/hw/xfree86/os-support/shared/vidmem.c index 803ce09bd..89db4cc9d 100644 --- a/xserver/hw/xfree86/os-support/shared/vidmem.c +++ b/xserver/hw/xfree86/os-support/shared/vidmem.c @@ -128,7 +128,7 @@ removeMapping(VidMapPtr vp, MappingPtr mp) for (i = 0; i < vp->numMappings; i++) { if (vp->mappings[i] == mp) { found = 1; - xfree(vp->mappings[i]); + free(vp->mappings[i]); } else if (found) { vp->mappings[i - 1] = vp->mappings[i]; } @@ -156,7 +156,7 @@ checkMtrrOption(VidMapPtr vp) options); if (xf86GetOptValBool(options, OPTION_MTRR, &vp->mtrrEnabled)) vp->mtrrFrom = X_CONFIG; - xfree(options); + free(options); vp->mtrrOptChecked = TRUE; } } diff --git a/xserver/hw/xfree86/os-support/solaris/Makefile.in b/xserver/hw/xfree86/os-support/solaris/Makefile.in index cd6c26f57..86b117c19 100644 --- a/xserver/hw/xfree86/os-support/solaris/Makefile.in +++ b/xserver/hw/xfree86/os-support/solaris/Makefile.in @@ -137,10 +137,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -228,6 +224,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -242,6 +240,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -259,10 +258,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -318,10 +321,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -339,17 +343,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -376,20 +374,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -481,6 +482,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/xfree86/os-support/solaris/sun_VTsw.c b/xserver/hw/xfree86/os-support/solaris/sun_VTsw.c index 1e2774b11..cff279e0c 100644 --- a/xserver/hw/xfree86/os-support/solaris/sun_VTsw.c +++ b/xserver/hw/xfree86/os-support/solaris/sun_VTsw.c @@ -66,7 +66,7 @@ xf86VTAcquire(int sig) Bool xf86VTSwitchPending(void) { - return(xf86Info.vtRequestsPending ? TRUE : FALSE); + return xf86Info.vtRequestsPending ? TRUE : FALSE; } Bool @@ -81,7 +81,7 @@ xf86VTSwitchAway(void) if (xf86VTPruneDoor) { xf86VTPruneDoor = 0; ioctl(xf86Info.consoleFd, VT_RELDISP, 1); - return (TRUE); + return TRUE; } vt_door_arg.vt_ev = VT_EV_HOTKEYS; @@ -94,15 +94,15 @@ xf86VTSwitchAway(void) door_arg.desc_num = 0; if ((door_fd = open(VT_DAEMON_DOOR_FILE, O_RDONLY)) < 0) - return (FALSE); + return FALSE; if (door_call(door_fd, &door_arg) != 0) { close(door_fd); - return (FALSE); + return FALSE; } close(door_fd); - return (TRUE); + return TRUE; } Bool @@ -111,11 +111,11 @@ xf86VTSwitchTo(void) xf86Info.vtRequestsPending = FALSE; if (ioctl(xf86Info.consoleFd, VT_RELDISP, VT_ACKACQ) < 0) { - return(FALSE); + return FALSE; } else { - return(TRUE); + return TRUE; } } @@ -125,13 +125,13 @@ xf86VTActivate(int vtno) struct vt_stat state; if (ioctl(xf86Info.consoleFd, VT_GETSTATE, &state) < 0) - return(FALSE); + return FALSE; if ((state.v_state & (1 << vtno)) == 0) - return(FALSE); + return FALSE; xf86Info.vtRequestsPending = TRUE; xf86Info.vtPendingNum = vtno; - return(TRUE); + return TRUE; } diff --git a/xserver/hw/xfree86/os-support/solaris/sun_agp.c b/xserver/hw/xfree86/os-support/solaris/sun_agp.c index e6a55a48b..9db5d6368 100644 --- a/xserver/hw/xfree86/os-support/solaris/sun_agp.c +++ b/xserver/hw/xfree86/os-support/solaris/sun_agp.c @@ -78,7 +78,7 @@ static Bool GARTInit(int screenNum) { if (initDone) - return (gartFd != -1); + return gartFd != -1; if (gartFd == -1) gartFd = open(AGP_DEVICE, O_RDWR); @@ -115,12 +115,6 @@ xf86GetAGPInfo(int screenNum) if (!GARTInit(screenNum)) return NULL; - if ((info = xcalloc(sizeof(AgpInfo), 1)) == NULL) { - xf86DrvMsg(screenNum, X_ERROR, - "xf86GetAGPInfo: Failed to allocate AgpInfo\n"); - return NULL; - } - if (ioctl(gartFd, AGPIOC_INFO, &agpinf) != 0) { xf86DrvMsg(screenNum, X_ERROR, "xf86GetAGPInfo: AGPIOC_INFO failed (%s)\n", @@ -128,6 +122,12 @@ xf86GetAGPInfo(int screenNum) return NULL; } + if ((info = calloc(sizeof(AgpInfo), 1)) == NULL) { + xf86DrvMsg(screenNum, X_ERROR, + "xf86GetAGPInfo: Failed to allocate AgpInfo\n"); + return NULL; + } + info->bridgeId = agpinf.agpi_devid; info->agpMode = agpinf.agpi_mode; info->base = agpinf.agpi_aperbase; diff --git a/xserver/hw/xfree86/os-support/solaris/sun_bell.c b/xserver/hw/xfree86/os-support/solaris/sun_bell.c index 05d17492a..bab391372 100644 --- a/xserver/hw/xfree86/os-support/solaris/sun_bell.c +++ b/xserver/hw/xfree86/os-support/solaris/sun_bell.c @@ -64,7 +64,7 @@ xf86OSRingBell(int loudness, int pitch, int duration) } lastFreq = 0; - bzero(silence, sizeof(silence)); + memset(silence, 0, sizeof(silence)); audioFD = open(AUDIO_DEVICE, O_WRONLY | O_NONBLOCK); if (audioFD == -1) { diff --git a/xserver/hw/xfree86/os-support/sysv/Makefile.in b/xserver/hw/xfree86/os-support/sysv/Makefile.in index 9649e15e0..405522f28 100644 --- a/xserver/hw/xfree86/os-support/sysv/Makefile.in +++ b/xserver/hw/xfree86/os-support/sysv/Makefile.in @@ -92,10 +92,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -183,6 +179,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -197,6 +195,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -214,10 +213,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -273,10 +276,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -294,17 +298,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -331,20 +329,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -436,6 +437,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/xfree86/os-support/sysv/sysv_init.c b/xserver/hw/xfree86/os-support/sysv/sysv_init.c index 170bb8914..9a423ffa5 100644 --- a/xserver/hw/xfree86/os-support/sysv/sysv_init.c +++ b/xserver/hw/xfree86/os-support/sysv/sysv_init.c @@ -215,7 +215,7 @@ xf86ProcessArgument(int argc, char *argv[], int i) if (!strcmp(argv[i], "-keeptty")) { KeepTty = TRUE; - return(1); + return 1; } #ifdef SVR4 /* @@ -226,7 +226,7 @@ xf86ProcessArgument(int argc, char *argv[], int i) if (!strcmp(argv[i], "-protect0")) { Protect0 = TRUE; - return(1); + return 1; } #endif if ((argv[i][0] == 'v') && (argv[i][1] == 't')) @@ -235,11 +235,11 @@ xf86ProcessArgument(int argc, char *argv[], int i) { UseMsg(); VTnum = -1; - return(0); + return 0; } - return(1); + return 1; } - return(0); + return 0; } void diff --git a/xserver/hw/xfree86/os-support/sysv/sysv_video.c b/xserver/hw/xfree86/os-support/sysv/sysv_video.c index 43c30621c..480abe5f9 100644 --- a/xserver/hw/xfree86/os-support/sysv/sysv_video.c +++ b/xserver/hw/xfree86/os-support/sysv/sysv_video.c @@ -106,7 +106,7 @@ mmapStat(pointer Base, unsigned long Size) { } } if (region == -1 && nmmreg > 0) region=region * i; - return(region); + return region; } #endif @@ -211,7 +211,7 @@ mapVidMem(int ScreenNum, unsigned long Base, unsigned long Size, int flags) "xf86MapVidMem: SUCCEED Mapping FrameBuffer \n"); #endif /* HAS_SVR3_MMAPDRV */ #endif /* SVR4 */ - return(base); + return base; } /* ARGSUSED */ diff --git a/xserver/hw/xfree86/parser/Configint.h b/xserver/hw/xfree86/parser/Configint.h index 03509b397..dda020e68 100644 --- a/xserver/hw/xfree86/parser/Configint.h +++ b/xserver/hw/xfree86/parser/Configint.h @@ -105,7 +105,7 @@ if( (ptr=calloc(1,sizeof(typerec))) == NULL ) { return; } if ((ptr->f=func) == NULL)\ {\ CLEANUP (ptr);\ - return (NULL);\ + return NULL;\ } #define HANDLE_LIST(field,func,type)\ @@ -114,7 +114,7 @@ type p = func ();\ if (p == NULL)\ {\ CLEANUP (ptr);\ - return (NULL);\ + return NULL;\ }\ else\ {\ diff --git a/xserver/hw/xfree86/parser/Device.c b/xserver/hw/xfree86/parser/Device.c index 47ece07de..d71abc6c2 100644 --- a/xserver/hw/xfree86/parser/Device.c +++ b/xserver/hw/xfree86/parser/Device.c @@ -363,9 +363,9 @@ xf86findDevice (const char *ident, XF86ConfDevicePtr p) while (p) { if (xf86nameCompare (ident, p->dev_identifier) == 0) - return (p); + return p; p = p->list.next; } - return (NULL); + return NULL; } diff --git a/xserver/hw/xfree86/parser/Flags.c b/xserver/hw/xfree86/parser/Flags.c index 699f15ceb..699dc6bcb 100644 --- a/xserver/hw/xfree86/parser/Flags.c +++ b/xserver/hw/xfree86/parser/Flags.c @@ -318,10 +318,10 @@ xf86findOption (XF86OptionPtr list, const char *name) while (list) { if (xf86nameCompare (list->opt_name, name) == 0) - return (list); + return list; list = list->list.next; } - return (NULL); + return NULL; } /* @@ -339,11 +339,11 @@ xf86findOptionValue (XF86OptionPtr list, const char *name) if (p) { if (p->opt_val) - return (p->opt_val); + return p->opt_val; else return ""; } - return (NULL); + return NULL; } XF86OptionPtr @@ -361,7 +361,7 @@ xf86optionListCreate( const char **options, int count, int used ) if( (count % 2) != 0 ) { fprintf( stderr, "xf86optionListCreate: count must be an even number.\n" ); - return (NULL); + return NULL; } for (i = 0; i < count; i += 2) { @@ -375,7 +375,7 @@ xf86optionListCreate( const char **options, int count, int used ) p = addNewOption2 (p, t1, t2, used); } - return (p); + return p; } /* the 2 given lists are merged. If an option with the same name is present in @@ -425,7 +425,7 @@ xf86optionListMerge (XF86OptionPtr head, XF86OptionPtr tail) } else head = tail; - return (head); + return head; } char * @@ -451,9 +451,8 @@ xf86parseOption(XF86OptionPtr head) if ((token = xf86getSubToken(&comment)) != STRING) { xf86parseError(BAD_OPTION_MSG, NULL); - if (comment) - free(comment); - return (head); + free(comment); + return head; } name = val.str; @@ -490,7 +489,7 @@ xf86parseOption(XF86OptionPtr head) if (old == NULL) return ((XF86OptionPtr)xf86addListItem((glp)head, (glp)cnew)); - return (head); + return head; } void diff --git a/xserver/hw/xfree86/parser/Input.c b/xserver/hw/xfree86/parser/Input.c index 8c8e46fb4..faff0f45f 100644 --- a/xserver/hw/xfree86/parser/Input.c +++ b/xserver/hw/xfree86/parser/Input.c @@ -59,6 +59,7 @@ #include #endif +#include "os.h" #include "xf86Parser.h" #include "xf86tokens.h" #include "Configint.h" @@ -102,8 +103,10 @@ xf86parseInputSection (void) case DRIVER: if (xf86getSubToken (&(ptr->inp_comment)) != STRING) Error (QUOTE_MSG, "Driver"); - if (strcmp(val.str, "keyboard") == 0) - ptr->inp_driver = "kbd"; + if (strcmp(val.str, "keyboard") == 0) { + ptr->inp_driver = strdup("kbd"); + free(val.str); + } else ptr->inp_driver = val.str; break; @@ -175,11 +178,11 @@ xf86validateInput (XF86ConfigPtr p) while (input) { if (!input->inp_driver) { xf86validationError (UNDEFINED_INPUTDRIVER_MSG, input->inp_identifier); - return (FALSE); + return FALSE; } input = input->list.next; } - return (TRUE); + return TRUE; } XF86ConfInputPtr @@ -188,11 +191,11 @@ xf86findInput (const char *ident, XF86ConfInputPtr p) while (p) { if (xf86nameCompare (ident, p->inp_identifier) == 0) - return (p); + return p; p = p->list.next; } - return (NULL); + return NULL; } XF86ConfInputPtr @@ -201,10 +204,10 @@ xf86findInputByDriver (const char *driver, XF86ConfInputPtr p) while (p) { if (xf86nameCompare (driver, p->inp_driver) == 0) - return (p); + return p; p = p->list.next; } - return (NULL); + return NULL; } diff --git a/xserver/hw/xfree86/parser/InputClass.c b/xserver/hw/xfree86/parser/InputClass.c index 7fb2866cd..9f88e7ee4 100644 --- a/xserver/hw/xfree86/parser/InputClass.c +++ b/xserver/hw/xfree86/parser/InputClass.c @@ -47,6 +47,10 @@ xf86ConfigSymTabRec InputClassTab[] = {MATCH_PRODUCT, "matchproduct"}, {MATCH_VENDOR, "matchvendor"}, {MATCH_DEVICE_PATH, "matchdevicepath"}, + {MATCH_OS, "matchos"}, + {MATCH_PNPID, "matchpnpid"}, + {MATCH_USBID, "matchusbid"}, + {MATCH_DRIVER, "matchdriver"}, {MATCH_TAG, "matchtag"}, {MATCH_IS_KEYBOARD, "matchiskeyboard"}, {MATCH_IS_POINTER, "matchispointer"}, @@ -61,6 +65,18 @@ xf86ConfigSymTabRec InputClassTab[] = #define TOKEN_SEP "|" +static void +add_group_entry(struct list *head, char **values) +{ + xf86MatchGroup *group; + + group = malloc(sizeof(*group)); + if (group) { + group->values = values; + list_add(&group->entry, head); + } +} + XF86ConfInputClassPtr xf86parseInputClassSection(void) { @@ -69,6 +85,16 @@ xf86parseInputClassSection(void) parsePrologue(XF86ConfInputClassPtr, XF86ConfInputClassRec) + /* Initialize MatchGroup lists */ + list_init(&ptr->match_product); + list_init(&ptr->match_vendor); + list_init(&ptr->match_device); + list_init(&ptr->match_os); + list_init(&ptr->match_pnpid); + list_init(&ptr->match_usbid); + list_init(&ptr->match_driver); + list_init(&ptr->match_tag); + while ((token = xf86getToken(InputClassTab)) != ENDSECTION) { switch (token) { case COMMENT: @@ -85,8 +111,10 @@ xf86parseInputClassSection(void) case DRIVER: if (xf86getSubToken(&(ptr->comment)) != STRING) Error(QUOTE_MSG, "Driver"); - if (strcmp(val.str, "keyboard") == 0) - ptr->driver = "kbd"; + if (strcmp(val.str, "keyboard") == 0) { + ptr->driver = strdup("kbd"); + free(val.str); + } else ptr->driver = val.str; break; @@ -96,22 +124,50 @@ xf86parseInputClassSection(void) case MATCH_PRODUCT: if (xf86getSubToken(&(ptr->comment)) != STRING) Error(QUOTE_MSG, "MatchProduct"); - ptr->match_product = xstrtokenize(val.str, TOKEN_SEP); + add_group_entry(&ptr->match_product, + xstrtokenize(val.str, TOKEN_SEP)); break; case MATCH_VENDOR: if (xf86getSubToken(&(ptr->comment)) != STRING) Error(QUOTE_MSG, "MatchVendor"); - ptr->match_vendor = xstrtokenize(val.str, TOKEN_SEP); + add_group_entry(&ptr->match_vendor, + xstrtokenize(val.str, TOKEN_SEP)); break; case MATCH_DEVICE_PATH: if (xf86getSubToken(&(ptr->comment)) != STRING) Error(QUOTE_MSG, "MatchDevicePath"); - ptr->match_device = xstrtokenize(val.str, TOKEN_SEP); + add_group_entry(&ptr->match_device, + xstrtokenize(val.str, TOKEN_SEP)); + break; + case MATCH_OS: + if (xf86getSubToken(&(ptr->comment)) != STRING) + Error(QUOTE_MSG, "MatchOS"); + add_group_entry(&ptr->match_os, + xstrtokenize(val.str, TOKEN_SEP)); + break; + case MATCH_PNPID: + if (xf86getSubToken(&(ptr->comment)) != STRING) + Error(QUOTE_MSG, "MatchPnPID"); + add_group_entry(&ptr->match_pnpid, + xstrtokenize(val.str, TOKEN_SEP)); + break; + case MATCH_USBID: + if (xf86getSubToken(&(ptr->comment)) != STRING) + Error(QUOTE_MSG, "MatchUSBID"); + add_group_entry(&ptr->match_usbid, + xstrtokenize(val.str, TOKEN_SEP)); + break; + case MATCH_DRIVER: + if (xf86getSubToken(&(ptr->comment)) != STRING) + Error(QUOTE_MSG, "MatchDriver"); + add_group_entry(&ptr->match_driver, + xstrtokenize(val.str, TOKEN_SEP)); break; case MATCH_TAG: if (xf86getSubToken(&(ptr->comment)) != STRING) Error(QUOTE_MSG, "MatchTag"); - ptr->match_tag = xstrtokenize(val.str, TOKEN_SEP); + add_group_entry(&ptr->match_tag, + xstrtokenize(val.str, TOKEN_SEP)); break; case MATCH_IS_KEYBOARD: if (xf86getSubToken(&(ptr->comment)) != STRING) @@ -183,7 +239,8 @@ xf86parseInputClassSection(void) void xf86printInputClassSection (FILE * cf, XF86ConfInputClassPtr ptr) { - char **list; + const xf86MatchGroup *group; + char * const *cur; while (ptr) { fprintf(cf, "Section \"InputClass\"\n"); @@ -193,38 +250,64 @@ xf86printInputClassSection (FILE * cf, XF86ConfInputClassPtr ptr) fprintf(cf, "\tIdentifier \"%s\"\n", ptr->identifier); if (ptr->driver) fprintf(cf, "\tDriver \"%s\"\n", ptr->driver); - if (ptr->match_product) { + + list_for_each_entry(group, &ptr->match_product, entry) { fprintf(cf, "\tMatchProduct \""); - for (list = ptr->match_product; *list; list++) - fprintf(cf, "%s%s", - list == ptr->match_product ? "" : TOKEN_SEP, - *list); + for (cur = group->values; *cur; cur++) + fprintf(cf, "%s%s", cur == group->values ? "" : TOKEN_SEP, + *cur); fprintf(cf, "\"\n"); } - if (ptr->match_vendor) { + list_for_each_entry(group, &ptr->match_vendor, entry) { fprintf(cf, "\tMatchVendor \""); - for (list = ptr->match_vendor; *list; list++) - fprintf(cf, "%s%s", - list == ptr->match_vendor ? "" : TOKEN_SEP, - *list); + for (cur = group->values; *cur; cur++) + fprintf(cf, "%s%s", cur == group->values ? "" : TOKEN_SEP, + *cur); fprintf(cf, "\"\n"); } - if (ptr->match_device) { + list_for_each_entry(group, &ptr->match_device, entry) { fprintf(cf, "\tMatchDevicePath \""); - for (list = ptr->match_device; *list; list++) - fprintf(cf, "%s%s", - list == ptr->match_device ? "" : TOKEN_SEP, - *list); + for (cur = group->values; *cur; cur++) + fprintf(cf, "%s%s", cur == group->values ? "" : TOKEN_SEP, + *cur); fprintf(cf, "\"\n"); } - if (ptr->match_tag) { - fprintf(cf, "\tMatchTag \""); - for (list = ptr->match_tag; *list; list++) - fprintf(cf, "%s%s", - list == ptr->match_tag ? "" : TOKEN_SEP, - *list); + list_for_each_entry(group, &ptr->match_os, entry) { + fprintf(cf, "\tMatchOS \""); + for (cur = group->values; *cur; cur++) + fprintf(cf, "%s%s", cur == group->values ? "" : TOKEN_SEP, + *cur); fprintf(cf, "\"\n"); } + list_for_each_entry(group, &ptr->match_pnpid, entry) { + fprintf(cf, "\tMatchPnPID \""); + for (cur = group->values; *cur; cur++) + fprintf(cf, "%s%s", cur == group->values ? "" : TOKEN_SEP, + *cur); + fprintf(cf, "\"\n"); + } + list_for_each_entry(group, &ptr->match_usbid, entry) { + fprintf(cf, "\tMatchUSBID \""); + for (cur = group->values; *cur; cur++) + fprintf(cf, "%s%s", cur == group->values ? "" : TOKEN_SEP, + *cur); + fprintf(cf, "\"\n"); + } + 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"); + } + list_for_each_entry(group, &ptr->match_tag, entry) { + fprintf(cf, "\tMatchTag \""); + for (cur = group->values; *cur; cur++) + fprintf(cf, "%s%s", cur == group->values ? "" : TOKEN_SEP, + *cur); + fprintf(cf, "\"\n"); + } + if (ptr->is_keyboard.set) fprintf(cf, "\tIsKeyboard \"%s\"\n", ptr->is_keyboard.val ? "yes" : "no"); @@ -253,31 +336,63 @@ void xf86freeInputClassList (XF86ConfInputClassPtr ptr) { XF86ConfInputClassPtr prev; - char **list; while (ptr) { + xf86MatchGroup *group, *next; + char **list; + TestFree(ptr->identifier); TestFree(ptr->driver); - if (ptr->match_product) { - for (list = ptr->match_product; *list; list++) + + list_for_each_entry_safe(group, next, &ptr->match_product, entry) { + list_del(&group->entry); + for (list = group->values; *list; list++) free(*list); - free(ptr->match_product); + free(group); } - if (ptr->match_vendor) { - for (list = ptr->match_vendor; *list; list++) + list_for_each_entry_safe(group, next, &ptr->match_vendor, entry) { + list_del(&group->entry); + for (list = group->values; *list; list++) free(*list); - free(ptr->match_vendor); + free(group); } - if (ptr->match_device) { - for (list = ptr->match_device; *list; list++) + list_for_each_entry_safe(group, next, &ptr->match_device, entry) { + list_del(&group->entry); + for (list = group->values; *list; list++) free(*list); - free(ptr->match_device); + free(group); } - if (ptr->match_tag) { - for (list = ptr->match_tag; *list; list++) + list_for_each_entry_safe(group, next, &ptr->match_os, entry) { + list_del(&group->entry); + for (list = group->values; *list; list++) free(*list); - free(ptr->match_tag); + free(group); } + list_for_each_entry_safe(group, next, &ptr->match_pnpid, entry) { + list_del(&group->entry); + for (list = group->values; *list; list++) + free(*list); + free(group); + } + list_for_each_entry_safe(group, next, &ptr->match_usbid, entry) { + list_del(&group->entry); + for (list = group->values; *list; list++) + free(*list); + free(group); + } + list_for_each_entry_safe(group, next, &ptr->match_driver, entry) { + list_del(&group->entry); + for (list = group->values; *list; list++) + free(*list); + free(group); + } + list_for_each_entry_safe(group, next, &ptr->match_tag, entry) { + list_del(&group->entry); + for (list = group->values; *list; list++) + free(*list); + free(group); + } + TestFree(ptr->comment); xf86optionListFree(ptr->option_lst); diff --git a/xserver/hw/xfree86/parser/Layout.c b/xserver/hw/xfree86/parser/Layout.c index 00c1e7d09..e1f770bc3 100644 --- a/xserver/hw/xfree86/parser/Layout.c +++ b/xserver/hw/xfree86/parser/Layout.c @@ -513,7 +513,7 @@ xf86validateLayout (XF86ConfigPtr p) { xf86validationError (UNDEFINED_SCREEN_MSG, adj->adj_screen_str, layout->lay_identifier); - return (FALSE); + return FALSE; } else adj->adj_screen = screen; @@ -529,7 +529,7 @@ xf86validateLayout (XF86ConfigPtr p) { xf86validationError (UNDEFINED_DEVICE_LAY_MSG, iptr->inactive_device_str, layout->lay_identifier); - return (FALSE); + return FALSE; } else iptr->inactive_device = device; @@ -541,7 +541,7 @@ xf86validateLayout (XF86ConfigPtr p) layout = layout->list.next; } - return (TRUE); + return TRUE; } XF86ConfLayoutPtr @@ -550,9 +550,9 @@ xf86findLayout (const char *name, XF86ConfLayoutPtr list) while (list) { if (xf86nameCompare (list->lay_identifier, name) == 0) - return (list); + return list; list = list->list.next; } - return (NULL); + return NULL; } diff --git a/xserver/hw/xfree86/parser/Makefile.in b/xserver/hw/xfree86/parser/Makefile.in index 581198373..160b666ad 100644 --- a/xserver/hw/xfree86/parser/Makefile.in +++ b/xserver/hw/xfree86/parser/Makefile.in @@ -149,10 +149,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -240,6 +236,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -254,6 +252,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -271,10 +270,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -330,10 +333,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -351,17 +355,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -388,20 +386,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -493,6 +494,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/xfree86/parser/Monitor.c b/xserver/hw/xfree86/parser/Monitor.c index 50de091fc..76c35ae74 100644 --- a/xserver/hw/xfree86/parser/Monitor.c +++ b/xserver/hw/xfree86/parser/Monitor.c @@ -264,7 +264,7 @@ xf86parseModeLine (void) #ifdef DEBUG printf ("ModeLine parsed\n"); #endif - return (ptr); + return ptr; } static XF86ConfModeLinePtr @@ -413,7 +413,7 @@ xf86parseVerboseMode (void) #ifdef DEBUG printf ("Verbose Mode parsed\n"); #endif - return (ptr); + return ptr; } #undef CLEANUP @@ -848,11 +848,11 @@ xf86findMonitor (const char *ident, XF86ConfMonitorPtr p) while (p) { if (xf86nameCompare (ident, p->mon_identifier) == 0) - return (p); + return p; p = p->list.next; } - return (NULL); + return NULL; } XF86ConfModesPtr @@ -861,11 +861,11 @@ xf86findModes (const char *ident, XF86ConfModesPtr p) while (p) { if (xf86nameCompare (ident, p->modes_identifier) == 0) - return (p); + return p; p = p->list.next; } - return (NULL); + return NULL; } XF86ConfModeLinePtr @@ -874,11 +874,11 @@ xf86findModeLine (const char *ident, XF86ConfModeLinePtr p) while (p) { if (xf86nameCompare (ident, p->ml_identifier) == 0) - return (p); + return p; p = p->list.next; } - return (NULL); + return NULL; } int @@ -895,10 +895,10 @@ xf86validateMonitor (XF86ConfigPtr p, XF86ConfScreenPtr screen) xf86validationError (UNDEFINED_MODES_MSG, modeslnk->ml_modes_str, screen->scrn_identifier); - return (FALSE); + return FALSE; } modeslnk->ml_modes = modes; modeslnk = modeslnk->list.next; } - return (TRUE); + return TRUE; } diff --git a/xserver/hw/xfree86/parser/Screen.c b/xserver/hw/xfree86/parser/Screen.c index b3b004df6..dd2319d95 100644 --- a/xserver/hw/xfree86/parser/Screen.c +++ b/xserver/hw/xfree86/parser/Screen.c @@ -522,7 +522,7 @@ xf86validateScreen (XF86ConfigPtr p) { screen->scrn_monitor = monitor; if (!xf86validateMonitor(p, screen)) - return (FALSE); + return FALSE; } } @@ -535,13 +535,13 @@ xf86validateScreen (XF86ConfigPtr p) if (!adaptor->al_adaptor) { xf86validationError (UNDEFINED_ADAPTOR_MSG, adaptor->al_adaptor_str, screen->scrn_identifier); - return (FALSE); + return FALSE; } else if (adaptor->al_adaptor->va_fwdref) { xf86validationError (ADAPTOR_REF_TWICE_MSG, adaptor->al_adaptor_str, adaptor->al_adaptor->va_fwdref); - return (FALSE); + return FALSE; } adaptor->al_adaptor->va_fwdref = strdup(screen->scrn_identifier); @@ -551,7 +551,7 @@ xf86validateScreen (XF86ConfigPtr p) screen = screen->list.next; } - return (TRUE); + return TRUE; } XF86ConfScreenPtr @@ -560,10 +560,10 @@ xf86findScreen (const char *ident, XF86ConfScreenPtr p) while (p) { if (xf86nameCompare (ident, p->scrn_identifier) == 0) - return (p); + return p; p = p->list.next; } - return (NULL); + return NULL; } diff --git a/xserver/hw/xfree86/parser/Video.c b/xserver/hw/xfree86/parser/Video.c index beeb43e4f..377438749 100644 --- a/xserver/hw/xfree86/parser/Video.c +++ b/xserver/hw/xfree86/parser/Video.c @@ -288,9 +288,9 @@ xf86findVideoAdaptor (const char *ident, XF86ConfVideoAdaptorPtr p) while (p) { if (xf86nameCompare (ident, p->va_identifier) == 0) - return (p); + return p; p = p->list.next; } - return (NULL); + return NULL; } diff --git a/xserver/hw/xfree86/parser/read.c b/xserver/hw/xfree86/parser/read.c index 1091be5e5..d4d525218 100644 --- a/xserver/hw/xfree86/parser/read.c +++ b/xserver/hw/xfree86/parser/read.c @@ -87,7 +87,7 @@ xf86validateConfig (XF86ConfigPtr p) if (!xf86validateLayout (p)) return FALSE; - return (TRUE); + return TRUE; } XF86ConfigPtr @@ -113,7 +113,7 @@ xf86readConfigFile (void) { xf86parseError (QUOTE_MSG, "Section"); CLEANUP (ptr); - return (NULL); + return NULL; } xf86setSection (val.str); if (xf86nameCompare (val.str, "files") == 0) @@ -219,24 +219,24 @@ xf86readConfigFile (void) } else { - Error (INVALID_SECTION_MSG, xf86tokenString ()); free(val.str); val.str = NULL; + Error (INVALID_SECTION_MSG, xf86tokenString ()); } break; default: - Error (INVALID_KEYWORD_MSG, xf86tokenString ()); free(val.str); val.str = NULL; + Error (INVALID_KEYWORD_MSG, xf86tokenString ()); } } if (xf86validateConfig (ptr)) - return (ptr); + return ptr; else { CLEANUP (ptr); - return (NULL); + return NULL; } } @@ -263,10 +263,10 @@ xf86addListItem (GenericListPtr head, GenericListPtr new) if (last) { last->next = new; - return (head); + return head; } else - return (new); + return new; } /* diff --git a/xserver/hw/xfree86/parser/scan.c b/xserver/hw/xfree86/parser/scan.c index 8aab0cf41..4163a3a6b 100644 --- a/xserver/hw/xfree86/parser/scan.c +++ b/xserver/hw/xfree86/parser/scan.c @@ -155,11 +155,11 @@ xf86strToUL (char *str) } else { - return (tot); + return tot; } p++; } - return (tot); + return tot; } /* @@ -289,7 +289,7 @@ xf86getNextLine(void) } while (!eolFound); - return (ret); + return ret; } /* @@ -308,7 +308,7 @@ xf86getToken (xf86ConfigSymTabRec * tab) * oth * case the next token must be read from the input. */ if (pushToken == EOF_TOKEN) - return (EOF_TOKEN); + return EOF_TOKEN; else if (pushToken == LOCK_TOKEN) { /* @@ -350,7 +350,7 @@ again: goto again; } else - return (pushToken = EOF_TOKEN); + return pushToken = EOF_TOKEN; } configLineNo++; configPos = 0; @@ -387,7 +387,7 @@ again: * Use xf86addComment when setting a comment. */ val.str = configRBuf; - return (COMMENT); + return COMMENT; } /* GJA -- handle '-' and ',' * Be careful: "-hsync" is a keyword. */ @@ -436,7 +436,7 @@ again: configRBuf[i] = '\0'; val.num = xf86strToUL (configRBuf); val.realnum = atof (configRBuf); - return (NUMBER); + return NUMBER; } /* @@ -453,7 +453,7 @@ again: configRBuf[i] = '\0'; val.str = malloc (strlen (configRBuf) + 1); strcpy (val.str, configRBuf); /* private copy ! */ - return (STRING); + return STRING; } /* @@ -486,9 +486,9 @@ again: pushToken = LOCK_TOKEN; if (temp == COMMA || temp == DASH) - return (temp); + return temp; if (temp == NUMBER || temp == STRING) - return (temp); + return temp; } /* @@ -499,12 +499,12 @@ again: i = 0; while (tab[i].token != -1) if (xf86nameCompare (configRBuf, tab[i].name) == 0) - return (tab[i].token); + return tab[i].token; else i++; } - return (ERROR_TOKEN); /* Error catcher */ + return ERROR_TOKEN; /* Error catcher */ } int @@ -519,7 +519,7 @@ xf86getSubToken (char **comment) *comment = xf86addComment(*comment, val.str); } else - return (token); + return token; } /*NOTREACHED*/ } @@ -536,7 +536,7 @@ xf86getSubTokenWithTab (char **comment, xf86ConfigSymTabRec *tab) *comment = xf86addComment(*comment, val.str); } else - return (token); + return token; } /*NOTREACHED*/ } @@ -601,7 +601,7 @@ xf86pathIsSafe(const char *path) * %P projroot * %C sysconfdir * %D datadir - * %M major version number + * %M config file format version number * %% % */ @@ -626,17 +626,10 @@ xf86pathIsSafe(const char *path) #ifndef XCONFENV #define XCONFENV "XORGCONFIG" #endif -#define XFREE86CFGFILE "XF86Config" -#ifndef XF86_VERSION_MAJOR -#ifdef XVERSION -#if XVERSION > 40000000 -#define XF86_VERSION_MAJOR (XVERSION / 10000000) -#else -#define XF86_VERSION_MAJOR (XVERSION / 1000) -#endif -#else -#define XF86_VERSION_MAJOR 4 -#endif +/* xorg.conf is based on XF86Config version 4. If we ever break + compatibility of the xorg.conf syntax, we'll bump this version number. */ +#ifndef CONFIG_FILE_VERSION +#define CONFIG_FILE_VERSION 4 #endif #define BAIL_OUT do { \ @@ -771,11 +764,8 @@ DoSubstitution(const char *template, const char *cmdline, const char *projroot, break; case 'M': if (!majorvers[0]) { - if (XF86_VERSION_MAJOR < 0 || XF86_VERSION_MAJOR > 99) { - fprintf(stderr, "XF86_VERSION_MAJOR is out of range\n"); - BAIL_OUT; - } else - sprintf(majorvers, "%d", XF86_VERSION_MAJOR); + snprintf(majorvers, sizeof(majorvers), + "%d", CONFIG_FILE_VERSION); } APPEND_STR(majorvers); break; @@ -829,6 +819,7 @@ OpenConfigFile(const char *path, const char *cmdline, const char *projroot, } } + free(pathcopy); if (file) { configFiles[numFiles].file = file; configFiles[numFiles].path = strdup(filepath); @@ -845,10 +836,13 @@ static int ConfigFilter(const struct dirent *de) { const char *name = de->d_name; - size_t len = strlen(name); + size_t len; size_t suflen = strlen(XCONFIGSUFFIX); - if (!name || name[0] == '.' || len <= suflen) + if (!name || name[0] == '.') + return 0; + len = strlen(name); + if(len <= suflen) return 0; if (strcmp(&name[len-suflen], XCONFIGSUFFIX) != 0) return 0; @@ -930,11 +924,11 @@ OpenConfigDir(const char *path, const char *cmdline, const char *projroot, if (!found) { free(dirpath); dirpath = NULL; - if (list) - free(list); + free(list); } } + free(pathcopy); return dirpath; } @@ -994,11 +988,8 @@ xf86openConfigFile(const char *path, const char *cmdline, const char *projroot) if (!projroot || !projroot[0]) projroot = PROJECTROOT; - /* Search for a config file or a fallback */ + /* Search for a config file */ configPath = OpenConfigFile(path, cmdline, projroot, XCONFIGFILE); - if (!configPath) - configPath = OpenConfigFile(path, cmdline, projroot, - XFREE86CFGFILE); return configPath; } @@ -1098,8 +1089,7 @@ xf86validationError (char *format,...) void xf86setSection (char *section) { - if (configSection) - free(configSection); + free(configSection); configSection = malloc(strlen (section) + 1); strcpy (configSection, section); } @@ -1124,7 +1114,7 @@ StringToToken (char *str, xf86ConfigSymTabRec * tab) if (!xf86nameCompare (tab[i].name, str)) return tab[i].token; } - return (ERROR_TOKEN); + return ERROR_TOKEN; } @@ -1139,9 +1129,9 @@ xf86nameCompare (const char *s1, const char *s2) if (!s1 || *s1 == 0) { if (!s2 || *s2 == 0) - return (0); + return 0; else - return (1); + return 1; } while (*s1 == '_' || *s1 == ' ' || *s1 == '\t') @@ -1153,7 +1143,7 @@ xf86nameCompare (const char *s1, const char *s2) while (c1 == c2) { if (c1 == '\0') - return (0); + return 0; s1++; s2++; while (*s1 == '_' || *s1 == ' ' || *s1 == '\t') @@ -1163,7 +1153,7 @@ xf86nameCompare (const char *s1, const char *s2) c1 = (isupper (*s1) ? tolower (*s1) : *s1); c2 = (isupper (*s2) ? tolower (*s2) : *s2); } - return (c1 - c2); + return c1 - c2; } char * @@ -1173,7 +1163,7 @@ xf86addComment(char *cur, char *add) int len, curlen, iscomment, hasnewline = 0, endnewline; if (add == NULL || add[0] == '\0') - return (cur); + return cur; if (cur) { curlen = strlen(cur); @@ -1198,7 +1188,7 @@ xf86addComment(char *cur, char *add) len += 1 + iscomment + (!hasnewline) + (!endnewline) + eol_seen; if ((str = realloc(cur, len + curlen)) == NULL) - return (cur); + return cur; cur = str; @@ -1210,7 +1200,7 @@ xf86addComment(char *cur, char *add) if (!endnewline) strcat(cur, "\n"); - return (cur); + return cur; } Bool diff --git a/xserver/hw/xfree86/parser/xf86Parser.h b/xserver/hw/xfree86/parser/xf86Parser.h index d79544a20..337ad0718 100644 --- a/xserver/hw/xfree86/parser/xf86Parser.h +++ b/xserver/hw/xfree86/parser/xf86Parser.h @@ -66,6 +66,7 @@ #include #include "xf86Optrec.h" +#include "list.h" #define HAVE_PARSER_DECLS @@ -338,15 +339,26 @@ typedef struct } xf86TriState; +typedef struct +{ + struct list entry; + char **values; +} +xf86MatchGroup; + typedef struct { GenericListRec list; char *identifier; char *driver; - char **match_product; - char **match_vendor; - char **match_device; - char **match_tag; + struct list match_product; + struct list match_vendor; + struct list match_device; + struct list match_os; + struct list match_pnpid; + struct list match_usbid; + struct list match_driver; + struct list match_tag; xf86TriState is_keyboard; xf86TriState is_pointer; xf86TriState is_joystick; diff --git a/xserver/hw/xfree86/parser/xf86tokens.h b/xserver/hw/xfree86/parser/xf86tokens.h index cb600704b..c16a8f551 100644 --- a/xserver/hw/xfree86/parser/xf86tokens.h +++ b/xserver/hw/xfree86/parser/xf86tokens.h @@ -279,6 +279,10 @@ typedef enum { MATCH_PRODUCT, MATCH_VENDOR, MATCH_DEVICE_PATH, + MATCH_OS, + MATCH_PNPID, + MATCH_USBID, + MATCH_DRIVER, MATCH_TAG, MATCH_IS_KEYBOARD, MATCH_IS_POINTER, diff --git a/xserver/hw/xfree86/ramdac/IBM.c b/xserver/hw/xfree86/ramdac/IBM.c index 2d9fe4d8f..89fb25c87 100644 --- a/xserver/hw/xfree86/ramdac/IBM.c +++ b/xserver/hw/xfree86/ramdac/IBM.c @@ -96,13 +96,13 @@ IBMramdac640CalculateMNPCForClock( lowestFreqErr = freqErr; /* Return if we found an exact match */ if (freqErr == 0) - return (ActualClock); + return ActualClock; } } } } - return (ActualClock); + return ActualClock; } unsigned long @@ -162,13 +162,13 @@ IBMramdac526CalculateMNPCForClock( lowestFreqErr = freqErr; /* Return if we found an exact match */ if (freqErr == 0) - return (ActualClock); + return ActualClock; } } } } - return (ActualClock); + return ActualClock; } void diff --git a/xserver/hw/xfree86/ramdac/Makefile.in b/xserver/hw/xfree86/ramdac/Makefile.in index 5b88e17b2..e094b5449 100644 --- a/xserver/hw/xfree86/ramdac/Makefile.in +++ b/xserver/hw/xfree86/ramdac/Makefile.in @@ -119,10 +119,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -210,6 +206,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -224,6 +222,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -241,10 +240,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -300,10 +303,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -321,17 +325,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -358,20 +356,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -463,6 +464,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/xfree86/ramdac/TI.c b/xserver/hw/xfree86/ramdac/TI.c index 1c541d76b..eee5d45cf 100644 --- a/xserver/hw/xfree86/ramdac/TI.c +++ b/xserver/hw/xfree86/ramdac/TI.c @@ -118,7 +118,7 @@ TIramdacCalculateMNPForClock( DebugF( "f_out=%ld f_vco=%.1f n=%d m=%d p=%d\n", ActualClock, VCO, *rN, *rM, *rP); - return (ActualClock); + return ActualClock; } void diff --git a/xserver/hw/xfree86/ramdac/xf86Cursor.c b/xserver/hw/xfree86/ramdac/xf86Cursor.c index 346e99490..ec781aad8 100644 --- a/xserver/hw/xfree86/ramdac/xf86Cursor.c +++ b/xserver/hw/xfree86/ramdac/xf86Cursor.c @@ -18,8 +18,7 @@ #include "inputstr.h" extern InputInfo inputInfo; -static int xf86CursorScreenKeyIndex; -DevPrivateKey xf86CursorScreenKey = &xf86CursorScreenKeyIndex; +DevPrivateKeyRec xf86CursorScreenKeyRec; /* sprite functions */ @@ -65,7 +64,10 @@ xf86InitCursor( if (!xf86InitHardwareCursor(pScreen, infoPtr)) return FALSE; - ScreenPriv = xcalloc(1, sizeof(xf86CursorScreenRec)); + if (!dixRegisterPrivateKey(&xf86CursorScreenKeyRec, PRIVATE_SCREEN, 0)) + return FALSE; + + ScreenPriv = calloc(1, sizeof(xf86CursorScreenRec)); if (!ScreenPriv) return FALSE; @@ -144,8 +146,8 @@ xf86CursorCloseScreen(int i, ScreenPtr pScreen) pScrn->EnableDisableFBAccess = ScreenPriv->EnableDisableFBAccess; pScrn->SwitchMode = ScreenPriv->SwitchMode; - xfree(ScreenPriv->transparentData); - xfree(ScreenPriv); + free(ScreenPriv->transparentData); + free(ScreenPriv); return (*pScreen->CloseScreen)(i, pScreen); } @@ -243,8 +245,6 @@ xf86CursorSwitchMode(int index, DisplayModePtr mode, int flags) ScreenPtr pScreen = screenInfo.screens[index]; xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate( &pScreen->devPrivates, xf86CursorScreenKey); - miPointerScreenPtr PointPriv = (miPointerScreenPtr)dixLookupPrivate( - &pScreen->devPrivates, miPointerScreenKey); if (ScreenPriv->isUp) { xf86SetCursor(pScreen, NullCursor, ScreenPriv->x, ScreenPriv->y); @@ -259,7 +259,7 @@ xf86CursorSwitchMode(int index, DisplayModePtr mode, int flags) * ensure the cursor is repainted by miPointerWarpCursor(). */ ScreenPriv->CursorToRestore = ScreenPriv->CurrentCursor; - PointPriv->waitForUpdate = FALSE; /* Force cursor repaint */ + miPointerSetWaitForUpdate(pScreen, FALSE); /* Force cursor repaint */ return ret; } @@ -286,7 +286,7 @@ xf86CursorUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, &pScreen->devPrivates, xf86CursorScreenKey); if (pCurs->refcnt <= 1) { - xfree(dixLookupPrivate(&pCurs->devPrivates, CursorScreenKey(pScreen))); + free(dixLookupPrivate(&pCurs->devPrivates, CursorScreenKey(pScreen))); dixSetPrivate(&pCurs->devPrivates, CursorScreenKey(pScreen), NULL); } @@ -300,9 +300,6 @@ xf86CursorSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs, xf86CursorScreenPtr ScreenPriv = (xf86CursorScreenPtr)dixLookupPrivate( &pScreen->devPrivates, xf86CursorScreenKey); xf86CursorInfoPtr infoPtr = ScreenPriv->CursorInfoPtr; - miPointerScreenPtr PointPriv = (miPointerScreenPtr)dixLookupPrivate( - &pScreen->devPrivates, miPointerScreenKey); - if (pCurs == NullCursor) { /* means we're supposed to remove the cursor */ if (ScreenPriv->SWCursor || @@ -353,11 +350,12 @@ xf86CursorSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCurs, xf86SetCursor(pScreen, pCurs, x, y); ScreenPriv->SWCursor = FALSE; ScreenPriv->isUp = TRUE; - PointPriv->waitForUpdate = !infoPtr->pScrn->silkenMouse; + + miPointerSetWaitForUpdate(pScreen, !infoPtr->pScrn->silkenMouse); return; } - PointPriv->waitForUpdate = TRUE; + miPointerSetWaitForUpdate(pScreen, TRUE); if (ScreenPriv->isUp) { /* Remove the HW cursor, or make it transparent */ @@ -439,13 +437,13 @@ xf86ForceHWCursor (ScreenPtr pScreen, Bool on) xf86CursorInfoPtr xf86CreateCursorInfoRec(void) { - return xcalloc(1, sizeof(xf86CursorInfoRec)); + return calloc(1, sizeof(xf86CursorInfoRec)); } void xf86DestroyCursorInfoRec(xf86CursorInfoPtr infoPtr) { - xfree(infoPtr); + free(infoPtr); } /** diff --git a/xserver/hw/xfree86/ramdac/xf86CursorPriv.h b/xserver/hw/xfree86/ramdac/xf86CursorPriv.h index 32be9c2f3..d22d88d8b 100644 --- a/xserver/hw/xfree86/ramdac/xf86CursorPriv.h +++ b/xserver/hw/xfree86/ramdac/xf86CursorPriv.h @@ -45,6 +45,7 @@ Bool xf86InitHardwareCursor(ScreenPtr pScreen, xf86CursorInfoPtr infoPtr); CARD32 xf86ReverseBitOrder(CARD32 data); -extern _X_EXPORT DevPrivateKey xf86CursorScreenKey; +extern _X_EXPORT DevPrivateKeyRec xf86CursorScreenKeyRec; +#define xf86CursorScreenKey (&xf86CursorScreenKeyRec) #endif /* _XF86CURSORPRIV_H */ diff --git a/xserver/hw/xfree86/ramdac/xf86HWCurs.c b/xserver/hw/xfree86/ramdac/xf86HWCurs.c index 4374e51d4..dd2b78f98 100644 --- a/xserver/hw/xfree86/ramdac/xf86HWCurs.c +++ b/xserver/hw/xfree86/ramdac/xf86HWCurs.c @@ -247,7 +247,7 @@ RealizeCursorInterleave0(xf86CursorInfoPtr infoPtr, CursorPtr pCurs) int words = size / (CUR_BITMAP_SCANLINE_PAD / 4); - if (!(mem = xcalloc(1, size))) + if (!(mem = calloc(1, size))) return NULL; if (pCurs == NullCursor) { @@ -354,8 +354,8 @@ RealizeCursorInterleave1(xf86CursorInfoPtr infoPtr, CursorPtr pCurs) if (!(mem2 = RealizeCursorInterleave0(infoPtr, pCurs))) return NULL; - if (!(mem = xcalloc(1, size))) { - xfree(mem2); + if (!(mem = calloc(1, size))) { + free(mem2); return NULL; } @@ -379,7 +379,7 @@ RealizeCursorInterleave1(xf86CursorInfoPtr infoPtr, CursorPtr pCurs) } /* Free the uninterleaved cursor */ - xfree(mem2); + free(mem2); return mem; } @@ -397,8 +397,8 @@ RealizeCursorInterleave8(xf86CursorInfoPtr infoPtr, CursorPtr pCurs) if (!(mem2 = RealizeCursorInterleave0(infoPtr, pCurs))) return NULL; - if (!(mem = xcalloc(1, size))) { - xfree(mem2); + if (!(mem = calloc(1, size))) { + free(mem2); return NULL; } @@ -414,7 +414,7 @@ RealizeCursorInterleave8(xf86CursorInfoPtr infoPtr, CursorPtr pCurs) } /* Free the uninterleaved cursor */ - xfree(mem2); + free(mem2); return mem; } @@ -432,8 +432,8 @@ RealizeCursorInterleave16(xf86CursorInfoPtr infoPtr, CursorPtr pCurs) if (!(mem2 = RealizeCursorInterleave0(infoPtr, pCurs))) return NULL; - if (!(mem = xcalloc(1, size))) { - xfree(mem2); + if (!(mem = calloc(1, size))) { + free(mem2); return NULL; } @@ -449,7 +449,7 @@ RealizeCursorInterleave16(xf86CursorInfoPtr infoPtr, CursorPtr pCurs) } /* Free the uninterleaved cursor */ - xfree(mem2); + free(mem2); return mem; } @@ -467,8 +467,8 @@ RealizeCursorInterleave32(xf86CursorInfoPtr infoPtr, CursorPtr pCurs) if (!(mem2 = RealizeCursorInterleave0(infoPtr, pCurs))) return NULL; - if (!(mem = xcalloc(1, size))) { - xfree(mem2); + if (!(mem = calloc(1, size))) { + free(mem2); return NULL; } @@ -484,7 +484,7 @@ RealizeCursorInterleave32(xf86CursorInfoPtr infoPtr, CursorPtr pCurs) } /* Free the uninterleaved cursor */ - xfree(mem2); + free(mem2); return mem; } @@ -502,8 +502,8 @@ RealizeCursorInterleave64(xf86CursorInfoPtr infoPtr, CursorPtr pCurs) if (!(mem2 = RealizeCursorInterleave0(infoPtr, pCurs))) return NULL; - if (!(mem = xcalloc(1, size))) { - xfree(mem2); + if (!(mem = calloc(1, size))) { + free(mem2); return NULL; } @@ -521,7 +521,7 @@ RealizeCursorInterleave64(xf86CursorInfoPtr infoPtr, CursorPtr pCurs) } /* Free the uninterleaved cursor */ - xfree(mem2); + free(mem2); return mem; } diff --git a/xserver/hw/xfree86/ramdac/xf86RamDac.c b/xserver/hw/xfree86/ramdac/xf86RamDac.c index bd4f3466a..24806b689 100644 --- a/xserver/hw/xfree86/ramdac/xf86RamDac.c +++ b/xserver/hw/xfree86/ramdac/xf86RamDac.c @@ -41,7 +41,7 @@ RamDacCreateInfoRec(void) { RamDacRecPtr infoRec; - infoRec = xcalloc(1, sizeof(RamDacRec)); + infoRec = calloc(1, sizeof(RamDacRec)); return infoRec; } @@ -51,7 +51,7 @@ RamDacHelperCreateInfoRec(void) { RamDacHelperRecPtr infoRec; - infoRec = xcalloc(1, sizeof(RamDacHelperRec)); + infoRec = calloc(1, sizeof(RamDacHelperRec)); return infoRec; } @@ -59,13 +59,13 @@ RamDacHelperCreateInfoRec(void) void RamDacDestroyInfoRec(RamDacRecPtr infoRec) { - xfree(infoRec); + free(infoRec); } void RamDacHelperDestroyInfoRec(RamDacHelperRecPtr infoRec) { - xfree(infoRec); + free(infoRec); } Bool @@ -82,7 +82,7 @@ RamDacInit(ScrnInfoPtr pScrn, RamDacRecPtr ramdacPriv) ((RamDacScreenRecPtr) (pScrn)->privates[RamDacGetScreenIndex()].ptr); ramdacScrPtr->RamDacRec = ramdacPriv; - return(TRUE); + return TRUE; } void @@ -132,12 +132,10 @@ RamDacFreeRec(ScrnInfoPtr pScrn) ramdacScrPtr = ((RamDacScreenRecPtr) (pScrn)->privates[RamDacGetScreenIndex()].ptr); - if (ramdacHWPtr) - xfree(ramdacHWPtr); + free(ramdacHWPtr); ramdacHWPtr = NULL; - if (ramdacScrPtr) - xfree(ramdacScrPtr); + free(ramdacScrPtr); ramdacScrPtr = NULL; } diff --git a/xserver/hw/xfree86/shadowfb/Makefile.in b/xserver/hw/xfree86/shadowfb/Makefile.in index 6174fbcb5..3c44b9726 100644 --- a/xserver/hw/xfree86/shadowfb/Makefile.in +++ b/xserver/hw/xfree86/shadowfb/Makefile.in @@ -119,10 +119,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -210,6 +206,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -224,6 +222,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -241,10 +240,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -300,10 +303,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -321,17 +325,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -358,20 +356,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -463,6 +464,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/xfree86/shadowfb/shadow.c b/xserver/hw/xfree86/shadowfb/shadow.c index 9c9aa0d55..344f1abf7 100644 --- a/xserver/hw/xfree86/shadowfb/shadow.c +++ b/xserver/hw/xfree86/shadowfb/shadow.c @@ -27,9 +27,7 @@ #include "xf86str.h" #include "shadowfb.h" -#ifdef RENDER # include "picturestr.h" -#endif static Bool ShadowCloseScreen (int i, ScreenPtr pScreen); static void ShadowCopyWindow( @@ -51,7 +49,6 @@ static Bool ShadowModifyPixmapHeader( static Bool ShadowEnterVT(int index, int flags); static void ShadowLeaveVT(int index, int flags); -#ifdef RENDER static void ShadowComposite( CARD8 op, PicturePtr pSrc, @@ -66,7 +63,6 @@ static void ShadowComposite( CARD16 width, CARD16 height ); -#endif /* RENDER */ typedef struct { @@ -77,9 +73,7 @@ typedef struct { CopyWindowProcPtr CopyWindow; CreateGCProcPtr CreateGC; ModifyPixmapHeaderProcPtr ModifyPixmapHeader; -#ifdef RENDER CompositeProcPtr Composite; -#endif /* RENDER */ Bool (*EnterVT)(int, int); void (*LeaveVT)(int, int); Bool vtSema; @@ -90,11 +84,11 @@ typedef struct { GCFuncs *funcs; } ShadowGCRec, *ShadowGCPtr; +static DevPrivateKeyRec ShadowScreenKeyRec; +#define ShadowScreenKey (&ShadowScreenKeyRec) -static int ShadowScreenKeyIndex; -static DevPrivateKey ShadowScreenKey = &ShadowScreenKeyIndex; -static int ShadowGCKeyIndex; -static DevPrivateKey ShadowGCKey = &ShadowGCKeyIndex; +static DevPrivateKeyRec ShadowGCKeyRec; +#define ShadowGCKey (&ShadowGCKeyRec) #define GET_SCREEN_PRIVATE(pScreen) \ (ShadowScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, ShadowScreenKey) @@ -164,16 +158,17 @@ ShadowFBInit2 ( ){ ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; ShadowScreenPtr pPriv; -#ifdef RENDER PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); -#endif /* RENDER */ if(!preRefreshArea && !postRefreshArea) return FALSE; - if(!dixRequestPrivate(ShadowGCKey, sizeof(ShadowGCRec))) + if (!dixRegisterPrivateKey(&ShadowScreenKeyRec, PRIVATE_SCREEN, 0)) return FALSE; - if(!(pPriv = (ShadowScreenPtr)xalloc(sizeof(ShadowScreenRec)))) + if(!dixRegisterPrivateKey(&ShadowGCKeyRec, PRIVATE_GC, sizeof(ShadowGCRec))) + return FALSE; + + if(!(pPriv = (ShadowScreenPtr)malloc(sizeof(ShadowScreenRec)))) return FALSE; dixSetPrivate(&pScreen->devPrivates, ShadowScreenKey, pPriv); @@ -199,12 +194,10 @@ ShadowFBInit2 ( pScrn->EnterVT = ShadowEnterVT; pScrn->LeaveVT = ShadowLeaveVT; -#ifdef RENDER if(ps) { pPriv->Composite = ps->Composite; ps->Composite = ShadowComposite; } -#endif /* RENDER */ return TRUE; } @@ -223,9 +216,14 @@ static Bool ShadowEnterVT(int index, int flags) { ScrnInfoPtr pScrn = xf86Screens[index]; + Bool ret; ShadowScreenPtr pPriv = GET_SCREEN_PRIVATE(pScrn->pScreen); - if((*pPriv->EnterVT)(index, flags)) { + pScrn->EnterVT = pPriv->EnterVT; + ret = (*pPriv->EnterVT)(index, flags); + pPriv->EnterVT = pScrn->EnterVT; + pScrn->EnterVT = ShadowEnterVT; + if(ret) { pPriv->vtSema = TRUE; return TRUE; } @@ -236,11 +234,15 @@ ShadowEnterVT(int index, int flags) static void ShadowLeaveVT(int index, int flags) { + ScrnInfoPtr pScrn = xf86Screens[index]; ShadowScreenPtr pPriv = GET_SCREEN_PRIVATE(xf86Screens[index]->pScreen); pPriv->vtSema = FALSE; + pScrn->LeaveVT = pPriv->LeaveVT; (*pPriv->LeaveVT)(index, flags); + pPriv->LeaveVT = pScrn->LeaveVT; + pScrn->LeaveVT = ShadowLeaveVT; } /**********************************************************/ @@ -251,9 +253,7 @@ ShadowCloseScreen (int i, ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; ShadowScreenPtr pPriv = GET_SCREEN_PRIVATE(pScreen); -#ifdef RENDER PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); -#endif /* RENDER */ pScreen->CloseScreen = pPriv->CloseScreen; pScreen->CopyWindow = pPriv->CopyWindow; @@ -263,13 +263,11 @@ ShadowCloseScreen (int i, ScreenPtr pScreen) pScrn->EnterVT = pPriv->EnterVT; pScrn->LeaveVT = pPriv->LeaveVT; -#ifdef RENDER if(ps) { ps->Composite = pPriv->Composite; } -#endif /* RENDER */ - xfree((pointer)pPriv); + free((pointer)pPriv); return (*pScreen->CloseScreen) (i, pScreen); } @@ -286,18 +284,18 @@ ShadowCopyWindow( RegionRec rgnDst; if (pPriv->vtSema) { - REGION_NULL(pWin->drawable.pScreen, &rgnDst); - REGION_COPY(pWin->drawable.pScreen, &rgnDst, prgn); + RegionNull(&rgnDst); + RegionCopy(&rgnDst, prgn); - REGION_TRANSLATE(pWin->drawable.pScreen, &rgnDst, + RegionTranslate(&rgnDst, pWin->drawable.x - ptOldOrg.x, pWin->drawable.y - ptOldOrg.y); - REGION_INTERSECT(pScreen, &rgnDst, &pWin->borderClip, &rgnDst); - if ((num = REGION_NUM_RECTS(&rgnDst))) { + RegionIntersect(&rgnDst, &pWin->borderClip, &rgnDst); + if ((num = RegionNumRects(&rgnDst))) { if(pPriv->preRefresh) - (*pPriv->preRefresh)(pPriv->pScrn, num, REGION_RECTS(&rgnDst)); + (*pPriv->preRefresh)(pPriv->pScrn, num, RegionRects(&rgnDst)); } else { - REGION_UNINIT(pWin->drawable.pScreen, &rgnDst); + RegionUninit(&rgnDst); } } @@ -307,8 +305,8 @@ ShadowCopyWindow( if (num) { if (pPriv->postRefresh) - (*pPriv->postRefresh)(pPriv->pScrn, num, REGION_RECTS(&rgnDst)); - REGION_UNINIT(pWin->drawable.pScreen, &rgnDst); + (*pPriv->postRefresh)(pPriv->pScrn, num, RegionRects(&rgnDst)); + RegionUninit(&rgnDst); } } @@ -355,7 +353,6 @@ ShadowModifyPixmapHeader( return retval; } -#ifdef RENDER static void ShadowComposite( CARD8 op, @@ -408,7 +405,6 @@ ShadowComposite( (*pPriv->postRefresh)(pPriv->pScrn, 1, &box); } } -#endif /* RENDER */ /**********************************************************/ @@ -1026,7 +1022,7 @@ ShadowPolyRectangle( offset1 = offset2 >> 1; offset3 = offset2 - offset1; - pBoxInit = (BoxPtr)xalloc(nRects * 4 * sizeof(BoxRec)); + pBoxInit = (BoxPtr)malloc(nRects * 4 * sizeof(BoxRec)); pbox = pBoxInit; while(nRects--) { @@ -1077,7 +1073,7 @@ ShadowPolyRectangle( if(pPriv->preRefresh) (*pPriv->preRefresh)(pPriv->pScrn, num, pBoxInit); } else { - xfree(pBoxInit); + free(pBoxInit); } } } @@ -1089,7 +1085,7 @@ ShadowPolyRectangle( } else if(num) { if(pPriv->postRefresh) (*pPriv->postRefresh)(pPriv->pScrn, num, pBoxInit); - xfree(pBoxInit); + free(pBoxInit); } SHADOW_GC_OP_EPILOGUE(pGC); @@ -1369,38 +1365,32 @@ ShadowFontToBox(BoxPtr BB, DrawablePtr pDrawable, GCPtr pGC, int x, int y, } right += pFont->info.maxbounds.rightSideBearing; BB->x1 = - max(pDrawable->x + x - left, (REGION_EXTENTS(pGC->pScreen, - &((WindowPtr) pDrawable)->winSize))->x1); + max(pDrawable->x + x - left, + RegionExtents(&((WindowPtr) pDrawable)->winSize)->x1); BB->y1 = max(pDrawable->y + y - ascent, - (REGION_EXTENTS(pGC->pScreen, - &((WindowPtr) pDrawable)->winSize))->y1); + RegionExtents(&((WindowPtr) pDrawable)->winSize)->y1); BB->x2 = min(pDrawable->x + x + right, - (REGION_EXTENTS(pGC->pScreen, - &((WindowPtr) pDrawable)->winSize))->x2); + RegionExtents(&((WindowPtr) pDrawable)->winSize)->x2); BB->y2 = min(pDrawable->y + y + descent, - (REGION_EXTENTS(pGC->pScreen, - &((WindowPtr) pDrawable)->winSize))->y2); + 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, (REGION_EXTENTS(pGC->pScreen, - &((WindowPtr) pDrawable)->winSize))->x1); + max(pDrawable->x + x + BB->x1, + RegionExtents(&((WindowPtr) pDrawable)->winSize)->x1); BB->y1 = max(pDrawable->y + y + BB->y1, - (REGION_EXTENTS(pGC->pScreen, - &((WindowPtr) pDrawable)->winSize))->y1); + RegionExtents(&((WindowPtr) pDrawable)->winSize)->y1); BB->x2 = min(pDrawable->x + x + BB->x2, - (REGION_EXTENTS(pGC->pScreen, - &((WindowPtr) pDrawable)->winSize))->x2); + RegionExtents(&((WindowPtr) pDrawable)->winSize)->x2); BB->y2 = min(pDrawable->y + y + BB->y2, - (REGION_EXTENTS(pGC->pScreen, - &((WindowPtr) pDrawable)->winSize))->y2); + RegionExtents(&((WindowPtr) pDrawable)->winSize)->y2); } } diff --git a/xserver/hw/xfree86/utils/Makefile.in b/xserver/hw/xfree86/utils/Makefile.in index 6c096a554..310bd81d1 100644 --- a/xserver/hw/xfree86/utils/Makefile.in +++ b/xserver/hw/xfree86/utils/Makefile.in @@ -101,10 +101,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -192,6 +188,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -206,6 +204,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -223,10 +222,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -282,10 +285,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -303,17 +307,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -340,20 +338,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -445,6 +446,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/xfree86/utils/cvt/Makefile.in b/xserver/hw/xfree86/utils/cvt/Makefile.in index dd4122eac..8d54724c1 100644 --- a/xserver/hw/xfree86/utils/cvt/Makefile.in +++ b/xserver/hw/xfree86/utils/cvt/Makefile.in @@ -140,10 +140,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -231,6 +227,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -245,6 +243,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -262,10 +261,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -321,10 +324,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -342,17 +346,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -379,20 +377,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -484,6 +485,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/xfree86/utils/gtf/Makefile.in b/xserver/hw/xfree86/utils/gtf/Makefile.in index 6f202e04e..a230e8614 100644 --- a/xserver/hw/xfree86/utils/gtf/Makefile.in +++ b/xserver/hw/xfree86/utils/gtf/Makefile.in @@ -146,10 +146,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -237,6 +233,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -251,6 +249,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -268,10 +267,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -327,10 +330,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -348,17 +352,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -385,20 +383,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -490,6 +491,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/xfree86/utils/gtf/gtf.c b/xserver/hw/xfree86/utils/gtf/gtf.c index 8ce93276a..bd5de7da9 100644 --- a/xserver/hw/xfree86/utils/gtf/gtf.c +++ b/xserver/hw/xfree86/utils/gtf/gtf.c @@ -634,7 +634,7 @@ mode *vert_refresh (int h_pixels, int v_lines, float freq, m->h_freq = h_freq; m->v_freq = freq; - return (m); + return m; } @@ -686,7 +686,7 @@ options *parse_command_line (int argc, char *argv[]) if (!o->fbmode && !o->xorgmode) o->xorgmode = 1; - return (o); + return o; bad_option: @@ -713,7 +713,7 @@ options *parse_command_line (int argc, char *argv[]) fprintf (stderr, "\n"); free (o); - return (NULL); + return NULL; } diff --git a/xserver/hw/xfree86/vbe/Makefile.in b/xserver/hw/xfree86/vbe/Makefile.in index 8eb4ada6c..4b8ee6096 100644 --- a/xserver/hw/xfree86/vbe/Makefile.in +++ b/xserver/hw/xfree86/vbe/Makefile.in @@ -119,10 +119,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -210,6 +206,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -224,6 +222,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -241,10 +240,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -300,10 +303,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -321,17 +325,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -358,20 +356,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -463,6 +464,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/xfree86/vbe/vbe.c b/xserver/hw/xfree86/vbe/vbe.c index 26f5911d5..7a64a4a71 100644 --- a/xserver/hw/xfree86/vbe/vbe.c +++ b/xserver/hw/xfree86/vbe/vbe.c @@ -17,7 +17,6 @@ #include "xf86.h" #include "vbe.h" -#include #include #define VERSION(x) VBE_VERSION_MAJOR(x),VBE_VERSION_MINOR(x) @@ -164,7 +163,7 @@ vbeFree(vbeInfoPtr pVbe) /* If we have initalized int10 we ought to free it, too */ if (pVbe->init_int10) xf86FreeInt10(pVbe->pInt10); - xfree(pVbe); + free(pVbe); return; } @@ -264,7 +263,7 @@ vbeReadEDID(vbeInfoPtr pVbe) xf86ProcessOptions(screen, xf86Screens[screen]->options, options); xf86GetOptValBool(options, VBEOPT_NOVBE, &novbe); xf86GetOptValBool(options, VBEOPT_NODDC, &noddc); - xfree(options); + free(options); if (novbe || noddc) return NULL; if (!vbeProbeDDC(pVbe)) goto error; @@ -346,7 +345,7 @@ VBEGetVBEInfo(vbeInfoPtr pVbe) char *str; CARD16 major, *modes; - bzero(pVbe->memory, sizeof(VbeInfoBlock)); + memset(pVbe->memory, 0, sizeof(VbeInfoBlock)); /* Input: @@ -371,9 +370,9 @@ VBEGetVBEInfo(vbeInfoPtr pVbe) xf86ExecX86int10(pVbe->pInt10); if (R16(pVbe->pInt10->ax) != 0x4f) - return (NULL); + return NULL; - block = xcalloc(sizeof(VbeInfoBlock), 1); + block = calloc(sizeof(VbeInfoBlock), 1); block->VESASignature[0] = ((char*)pVbe->memory)[0]; block->VESASignature[1] = ((char*)pVbe->memory)[1]; block->VESASignature[2] = ((char*)pVbe->memory)[2]; @@ -396,7 +395,7 @@ VBEGetVBEInfo(vbeInfoPtr pVbe) i = 0; while (modes[i] != 0xffff) i++; - block->VideoModePtr = xalloc(sizeof(CARD16) * i + 1); + block->VideoModePtr = malloc(sizeof(CARD16) * i + 1); memcpy(block->VideoModePtr, modes, sizeof(CARD16) * i); block->VideoModePtr[i] = 0xffff; @@ -419,20 +418,20 @@ VBEGetVBEInfo(vbeInfoPtr pVbe) memcpy(&block->OemData, ((char*)pVbe->memory) + 256, 256); } - return (block); + return block; } void VBEFreeVBEInfo(VbeInfoBlock *block) { - xfree(block->OEMStringPtr); - xfree(block->VideoModePtr); + free(block->OEMStringPtr); + free(block->VideoModePtr); if (((unsigned)block->VESAVersion >> 8) >= 2) { - xfree(block->OemVendorNamePtr); - xfree(block->OemProductNamePtr); - xfree(block->OemProductRevPtr); + free(block->OemVendorNamePtr); + free(block->OemProductNamePtr); + free(block->OemProductRevPtr); } - xfree(block); + free(block); } Bool @@ -494,10 +493,10 @@ VBEGetVBEMode(vbeInfoPtr pVbe, int *mode) if (R16(pVbe->pInt10->ax) == 0x4f) { *mode = R16(pVbe->pInt10->bx); - return (TRUE); + return TRUE; } - return (FALSE); + return FALSE; } VbeModeInfoBlock * @@ -505,7 +504,7 @@ VBEGetModeInfo(vbeInfoPtr pVbe, int mode) { VbeModeInfoBlock *block = NULL; - bzero(pVbe->memory, sizeof(VbeModeInfoBlock)); + memset(pVbe->memory, 0, sizeof(VbeModeInfoBlock)); /* Input: @@ -526,79 +525,19 @@ VBEGetModeInfo(vbeInfoPtr pVbe, int mode) pVbe->pInt10->di = SEG_OFF(pVbe->real_mode_base); xf86ExecX86int10(pVbe->pInt10); if (R16(pVbe->pInt10->ax) != 0x4f) - return (NULL); + return NULL; - block = xcalloc(sizeof(VbeModeInfoBlock), 1); + block = malloc(sizeof(VbeModeInfoBlock)); + if (block) + memcpy(block, pVbe->memory, sizeof(*block)); - block->ModeAttributes = *(CARD16*)pVbe->memory; - block->WinAAttributes = ((char*)pVbe->memory)[2]; - block->WinBAttributes = ((char*)pVbe->memory)[3]; - block->WinGranularity = *(CARD16*)(((char*)pVbe->memory) + 4); - block->WinSize = *(CARD16*)(((char*)pVbe->memory) + 6); - block->WinASegment = *(CARD16*)(((char*)pVbe->memory) + 8); - block->WinBSegment = *(CARD16*)(((char*)pVbe->memory) + 10); - block->WinFuncPtr = *(CARD32*)(((char*)pVbe->memory) + 12); - block->BytesPerScanline = *(CARD16*)(((char*)pVbe->memory) + 16); - - /* mandatory information for VBE 1.2 and above */ - block->XResolution = *(CARD16*)(((char*)pVbe->memory) + 18); - block->YResolution = *(CARD16*)(((char*)pVbe->memory) + 20); - block->XCharSize = ((char*)pVbe->memory)[22]; - block->YCharSize = ((char*)pVbe->memory)[23]; - block->NumberOfPlanes = ((char*)pVbe->memory)[24]; - block->BitsPerPixel = ((char*)pVbe->memory)[25]; - block->NumberOfBanks = ((char*)pVbe->memory)[26]; - block->MemoryModel = ((char*)pVbe->memory)[27]; - block->BankSize = ((char*)pVbe->memory)[28]; - block->NumberOfImages = ((char*)pVbe->memory)[29]; - block->Reserved = ((char*)pVbe->memory)[30]; - - /* Direct color fields (required for direct/6 and YUV/7 memory models) */ - block->RedMaskSize = ((char*)pVbe->memory)[31]; - block->RedFieldPosition = ((char*)pVbe->memory)[32]; - block->GreenMaskSize = ((char*)pVbe->memory)[33]; - block->GreenFieldPosition = ((char*)pVbe->memory)[34]; - block->BlueMaskSize = ((char*)pVbe->memory)[35]; - block->BlueFieldPosition = ((char*)pVbe->memory)[36]; - block->RsvdMaskSize = ((char*)pVbe->memory)[37]; - block->RsvdFieldPosition = ((char*)pVbe->memory)[38]; - block->DirectColorModeInfo = ((char*)pVbe->memory)[39]; - - /* Mandatory information for VBE 2.0 and above */ - if (pVbe->version >= 0x200) { - block->PhysBasePtr = *(CARD32*)(((char*)pVbe->memory) + 40); - block->Reserved32 = *(CARD32*)(((char*)pVbe->memory) + 44); - block->Reserved16 = *(CARD16*)(((char*)pVbe->memory) + 48); - - /* Mandatory information for VBE 3.0 and above */ - if (pVbe->version >= 0x300) { - block->LinBytesPerScanLine = *(CARD16*)(((char*)pVbe->memory) + 50); - block->BnkNumberOfImagePages = ((char*)pVbe->memory)[52]; - block->LinNumberOfImagePages = ((char*)pVbe->memory)[53]; - block->LinRedMaskSize = ((char*)pVbe->memory)[54]; - block->LinRedFieldPosition = ((char*)pVbe->memory)[55]; - block->LinGreenMaskSize = ((char*)pVbe->memory)[56]; - block->LinGreenFieldPosition = ((char*)pVbe->memory)[57]; - block->LinBlueMaskSize = ((char*)pVbe->memory)[58]; - block->LinBlueFieldPosition = ((char*)pVbe->memory)[59]; - block->LinRsvdMaskSize = ((char*)pVbe->memory)[60]; - block->LinRsvdFieldPosition = ((char*)pVbe->memory)[61]; - block->MaxPixelClock = *(CARD32*)(((char*)pVbe->memory) + 62); - memcpy(&block->Reserved2, ((char*)pVbe->memory) + 66, 188); - } - else - memcpy(&block->LinBytesPerScanLine, ((char*)pVbe->memory) + 50, 206); - } - else - memcpy(&block->PhysBasePtr, ((char*)pVbe->memory) + 40, 216); - - return (block); + return block; } void VBEFreeModeInfo(VbeModeInfoBlock *block) { - xfree(block); + free(block); } Bool @@ -658,7 +597,7 @@ VBESaveRestore(vbeInfoPtr pVbe, vbeSaveRestoreFunction function, pVbe->pInt10->cx = 0x000f; xf86ExecX86int10(pVbe->pInt10); if (R16(pVbe->pInt10->ax) != 0x4f) - return (FALSE); + return FALSE; if (function == MODE_SAVE) { int npages = (R16(pVbe->pInt10->bx) * 64) / 4096 + 1; @@ -666,7 +605,7 @@ VBESaveRestore(vbeInfoPtr pVbe, vbeSaveRestoreFunction function, real_mode_pages)) == NULL) { xf86DrvMsg(screen, X_ERROR, "Cannot allocate memory to save SVGA state.\n"); - return (FALSE); + return FALSE; } } *size = pVbe->pInt10->bx * 64; @@ -717,9 +656,9 @@ VBEBankSwitch(vbeInfoPtr pVbe, unsigned int iBank, int window) xf86ExecX86int10(pVbe->pInt10); if (R16(pVbe->pInt10->ax) != 0x4f) - return (FALSE); + return FALSE; - return (TRUE); + return TRUE; } Bool @@ -727,7 +666,7 @@ VBESetGetLogicalScanlineLength(vbeInfoPtr pVbe, vbeScanwidthCommand command, int width, int *pixels, int *bytes, int *max) { if (command < SCANWID_SET || command > SCANWID_GET_MAX) - return (FALSE); + return FALSE; /* Input: @@ -756,7 +695,7 @@ VBESetGetLogicalScanlineLength(vbeInfoPtr pVbe, vbeScanwidthCommand command, xf86ExecX86int10(pVbe->pInt10); if (R16(pVbe->pInt10->ax) != 0x4f) - return (FALSE); + return FALSE; if (command == SCANWID_GET || command == SCANWID_GET_MAX) { if (pixels) @@ -767,7 +706,7 @@ VBESetGetLogicalScanlineLength(vbeInfoPtr pVbe, vbeScanwidthCommand command, *max = R16(pVbe->pInt10->dx); } - return (TRUE); + return TRUE; } Bool @@ -781,9 +720,9 @@ VBESetDisplayStart(vbeInfoPtr pVbe, int x, int y, Bool wait_retrace) xf86ExecX86int10(pVbe->pInt10); if (R16(pVbe->pInt10->ax) != 0x4f) - return (FALSE); + return FALSE; - return (TRUE); + return TRUE; } Bool @@ -795,12 +734,12 @@ VBEGetDisplayStart(vbeInfoPtr pVbe, int *x, int *y) xf86ExecX86int10(pVbe->pInt10); if (R16(pVbe->pInt10->ax) != 0x4f) - return (FALSE); + return FALSE; *x = pVbe->pInt10->cx; *y = pVbe->pInt10->dx; - return (TRUE); + return TRUE; } int @@ -828,7 +767,7 @@ VBESetGetDACPaletteFormat(vbeInfoPtr pVbe, int bits) xf86ExecX86int10(pVbe->pInt10); if (R16(pVbe->pInt10->ax) != 0x4f) - return (0); + return 0; return (bits != 0 ? bits : (pVbe->pInt10->bx >> 8) & 0x00ff); } @@ -879,15 +818,15 @@ VBESetGetPaletteData(vbeInfoPtr pVbe, Bool set, int first, int num, xf86ExecX86int10(pVbe->pInt10); if (R16(pVbe->pInt10->ax) != 0x4f) - return (NULL); + return NULL; if (set) - return (data); + return data; - data = xalloc(num * sizeof(CARD32)); + data = malloc(num * sizeof(CARD32)); memcpy(data, pVbe->memory, num * sizeof(CARD32)); - return (data); + return data; } VBEpmi * @@ -916,14 +855,14 @@ VBEGetVBEpmi(vbeInfoPtr pVbe) xf86ExecX86int10(pVbe->pInt10); if (R16(pVbe->pInt10->ax) != 0x4f) - return (NULL); + return NULL; - pmi = xalloc(sizeof(VBEpmi)); + pmi = malloc(sizeof(VBEpmi)); pmi->seg_tbl = R16(pVbe->pInt10->es); pmi->tbl_off = R16(pVbe->pInt10->di); pmi->tbl_len = R16(pVbe->pInt10->cx); - return (pmi); + return pmi; } #if 0 @@ -995,7 +934,7 @@ VBEVesaSaveRestore(vbeInfoPtr pVbe, vbeSaveRestorePtr vbe_sr, vbe_sr->stateMode = -1; /* invalidate */ /* don't rely on the memory not being touched */ if (vbe_sr->pstate == NULL) - vbe_sr->pstate = xalloc(vbe_sr->stateSize); + vbe_sr->pstate = malloc(vbe_sr->stateSize); memcpy(vbe_sr->pstate, vbe_sr->state, vbe_sr->stateSize); } ErrorF("VBESaveRestore done with success\n"); @@ -1035,9 +974,9 @@ VBEGetPixelClock(vbeInfoPtr pVbe, int mode, int clock) xf86ExecX86int10(pVbe->pInt10); if (R16(pVbe->pInt10->ax) != 0x4f) - return (0); + return 0; - return (pVbe->pInt10->cx); + return pVbe->pInt10->cx; } Bool @@ -1099,7 +1038,7 @@ VBEInterpretPanelID(int scrnIndex, struct vbePanelID *data) pScrn->monitor->vrefresh[0].hi = (float)mode->Clock*1000.0 / (float)mode->HTotal / (float)mode->VTotal; - xfree(mode); + free(mode); } struct vbePanelID * diff --git a/xserver/hw/xfree86/vbe/vbe.h b/xserver/hw/xfree86/vbe/vbe.h index b1ec5a9fb..072621fa6 100644 --- a/xserver/hw/xfree86/vbe/vbe.h +++ b/xserver/hw/xfree86/vbe/vbe.h @@ -65,7 +65,7 @@ typedef struct vbeControllerInfoBlock { #pragma pack(0) #endif -#ifndef __GNUC__ +#if !( defined(__GNUC__) || (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x590)) ) #define __attribute__(a) #endif @@ -282,7 +282,7 @@ extern _X_EXPORT int VBESetGetDACPaletteFormat(vbeInfoPtr pVbe, int bits); */ extern _X_EXPORT CARD32 *VBESetGetPaletteData(vbeInfoPtr pVbe, Bool set, int first, int num, CARD32 *data, Bool secondary, Bool wait_retrace); -#define VBEFreePaletteData(data) xfree(data) +#define VBEFreePaletteData(data) free(data) /* * INT A @@ -295,7 +295,7 @@ typedef struct _VBEpmi { } VBEpmi; extern _X_EXPORT VBEpmi *VBEGetVBEpmi(vbeInfoPtr pVbe); -#define VESAFreeVBEpmi(pmi) xfree(pmi) +#define VESAFreeVBEpmi(pmi) free(pmi) /* high level helper functions */ diff --git a/xserver/hw/xfree86/vbe/vbeModes.c b/xserver/hw/xfree86/vbe/vbeModes.c index 1a4d2407c..3f2cae5bf 100644 --- a/xserver/hw/xfree86/vbe/vbeModes.c +++ b/xserver/hw/xfree86/vbe/vbeModes.c @@ -402,7 +402,7 @@ VBESetModeParameters(ScrnInfoPtr pScrn, vbeInfoPtr pVbe) xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Attempting to use %dHz refresh for mode \"%s\" (%x)\n", (int)pMode->VRefresh, pMode->name, data->mode); - data->block = xcalloc(sizeof(VbeCRTCInfoBlock), 1); + data->block = calloc(sizeof(VbeCRTCInfoBlock), 1); data->block->HorizontalTotal = best->HTotal; data->block->HorizontalSyncStart = best->HSyncStart; data->block->HorizontalSyncEnd = best->HSyncEnd; diff --git a/xserver/hw/xfree86/vgahw/Makefile.in b/xserver/hw/xfree86/vgahw/Makefile.in index de313a4ab..f1b1bdfb9 100644 --- a/xserver/hw/xfree86/vgahw/Makefile.in +++ b/xserver/hw/xfree86/vgahw/Makefile.in @@ -119,10 +119,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -210,6 +206,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -224,6 +222,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -241,10 +240,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -300,10 +303,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -321,17 +325,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -358,20 +356,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -463,6 +464,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/xfree86/vgahw/vgaCmap.c b/xserver/hw/xfree86/vgahw/vgaCmap.c index 5bd38b468..83c29c36e 100644 --- a/xserver/hw/xfree86/vgahw/vgaCmap.c +++ b/xserver/hw/xfree86/vgahw/vgaCmap.c @@ -50,8 +50,8 @@ vgaListInstalledColormaps(pScreen, pmaps) /* By the time we are processing requests, we can guarantee that there * is always a colormap installed */ - *pmaps = miInstalledMaps[pScreen->myNum]->mid; - return(1); + *pmaps = GetInstalledmiColormap(pScreen)->mid; + return 1; } int @@ -62,13 +62,13 @@ vgaGetInstalledColormaps(pScreen, pmaps) /* By the time we are processing requests, we can guarantee that there * is always a colormap installed */ - *pmaps = miInstalledMaps[pScreen->myNum]; - return(1); + *pmaps = GetInstalledmiColormap(pScreen); + return 1; } int vgaCheckColorMap(ColormapPtr pmap) { - return (pmap != miInstalledMaps[pmap->pScreen->myNum]); + return (pmap != GetInstalledmiColormap(pmap->pScreen)); } @@ -217,7 +217,7 @@ void vgaInstallColormap(pmap) ColormapPtr pmap; { - ColormapPtr oldmap = miInstalledMaps[pmap->pScreen->myNum]; + ColormapPtr oldmap = GetInstalledmiColormap(pmap->pScreen); int entries; Pixel * ppix; xrgb * prgb; @@ -235,18 +235,18 @@ vgaInstallColormap(pmap) else entries = pmap->pVisual->ColormapEntries; - ppix = (Pixel *)xalloc( entries * sizeof(Pixel)); - prgb = (xrgb *)xalloc( entries * sizeof(xrgb)); - defs = (xColorItem *)xalloc(entries * sizeof(xColorItem)); + ppix = (Pixel *)malloc( entries * sizeof(Pixel)); + prgb = (xrgb *)malloc( entries * sizeof(xrgb)); + defs = (xColorItem *)malloc(entries * sizeof(xColorItem)); if ( oldmap != NOMAPYET) WalkTree( pmap->pScreen, TellLostMap, &oldmap->mid); - miInstalledMaps[pmap->pScreen->myNum] = pmap; + SetInstalledmiColormap(pmap->pScreen, pmap); for ( i=0; ipScreen, TellGainedMap, &pmap->mid); - xfree(ppix); - xfree(prgb); - xfree(defs); + free(ppix); + free(prgb); + free(defs); } @@ -273,13 +273,13 @@ vgaUninstallColormap(pmap) ColormapPtr defColormap; - if ( pmap != miInstalledMaps[pmap->pScreen->myNum] ) + if ( pmap != GetInstalledmiColormap(pmap->pScreen)) return; dixLookupResourceByType((pointer *)&defColormap, pmap->pScreen->defColormap, RT_COLORMAP, serverClient, DixInstallAccess); - if (defColormap == miInstalledMaps[pmap->pScreen->myNum]) + if (defColormap == GetInstalledmiColormap(pmap->pScreen)) return; (*pmap->pScreen->InstallColormap) (defColormap); diff --git a/xserver/hw/xfree86/vgahw/vgaHW.c b/xserver/hw/xfree86/vgahw/vgaHW.c index 004376b75..ee045d15b 100644 --- a/xserver/hw/xfree86/vgahw/vgaHW.c +++ b/xserver/hw/xfree86/vgahw/vgaHW.c @@ -658,7 +658,7 @@ vgaHWSaveScreen(ScreenPtr pScreen, int mode) if ((pScrn != NULL) && pScrn->vtSema) { vgaHWBlankScreen(pScrn, on); } - return (TRUE); + return TRUE; } @@ -968,21 +968,21 @@ vgaHWSaveFonts(ScrnInfoPtr scrninfp, vgaRegPtr save) hwp->writeGr(hwp, 0x06, 0x05); /* set graphics */ #if SAVE_FONT1 - if (hwp->FontInfo1 || (hwp->FontInfo1 = xalloc(FONT_AMOUNT))) { + if (hwp->FontInfo1 || (hwp->FontInfo1 = malloc(FONT_AMOUNT))) { hwp->writeSeq(hwp, 0x02, 0x04); /* write to plane 2 */ hwp->writeGr(hwp, 0x04, 0x02); /* read plane 2 */ slowbcopy_frombus(hwp->Base, hwp->FontInfo1, FONT_AMOUNT); } #endif /* SAVE_FONT1 */ #if SAVE_FONT2 - if (hwp->FontInfo2 || (hwp->FontInfo2 = xalloc(FONT_AMOUNT))) { + if (hwp->FontInfo2 || (hwp->FontInfo2 = malloc(FONT_AMOUNT))) { hwp->writeSeq(hwp, 0x02, 0x08); /* write to plane 3 */ hwp->writeGr(hwp, 0x04, 0x03); /* read plane 3 */ slowbcopy_frombus(hwp->Base, hwp->FontInfo2, FONT_AMOUNT); } #endif /* SAVE_FONT2 */ #if SAVE_TEXT - if (hwp->TextInfo || (hwp->TextInfo = xalloc(2 * TEXT_AMOUNT))) { + if (hwp->TextInfo || (hwp->TextInfo = malloc(2 * TEXT_AMOUNT))) { hwp->writeSeq(hwp, 0x02, 0x01); /* write to plane 0 */ hwp->writeGr(hwp, 0x04, 0x00); /* read plane 0 */ slowbcopy_frombus(hwp->Base, hwp->TextInfo, TEXT_AMOUNT); @@ -1351,7 +1351,7 @@ vgaHWInit(ScrnInfoPtr scrninfp, DisplayModePtr mode) regp->Attribute[19] = 0x00; regp->Attribute[20] = 0x00; - return(TRUE); + return TRUE; } /* @@ -1479,8 +1479,7 @@ vgaHWGetHWRecPrivate(void) static void vgaHWFreeRegs(vgaRegPtr regp) { - if (regp->CRTC) - xfree (regp->CRTC); + free(regp->CRTC); regp->CRTC = regp->Sequencer = @@ -1504,7 +1503,7 @@ vgaHWAllocRegs(vgaRegPtr regp) regp->numAttribute) == 0) return FALSE; - buf = xcalloc(regp->numCRTC + + buf = calloc(regp->numCRTC + regp->numSequencer + regp->numGraphics + regp->numAttribute, 1); @@ -1643,7 +1642,7 @@ vgaHWGetHWRec(ScrnInfoPtr scrp) if ((!vgaHWAllocDefaultRegs(&VGAHWPTR(scrp)->SavedReg)) || (!vgaHWAllocDefaultRegs(&VGAHWPTR(scrp)->ModeReg))) { - xfree(hwp); + free(hwp); return FALSE; } @@ -1726,14 +1725,14 @@ vgaHWFreeHWRec(ScrnInfoPtr scrp) if (!hwp) return; - xfree(hwp->FontInfo1); - xfree(hwp->FontInfo2); - xfree(hwp->TextInfo); + free(hwp->FontInfo1); + free(hwp->FontInfo2); + free(hwp->TextInfo); vgaHWFreeRegs (&hwp->ModeReg); vgaHWFreeRegs (&hwp->SavedReg); - xfree(hwp); + free(hwp); VGAHWPTRLVAL(scrp) = NULL; } } @@ -1975,7 +1974,7 @@ vgaHWddc1SetSpeed(ScrnInfoPtr pScrn, xf86ddcSpeed speed) hwp->writeCrtc(hwp,0x15,save->cr15); hwp->writeCrtc(hwp,0x12,save->cr12); hwp->writeCrtc(hwp,0x03,save->cr03); - xfree(save); + free(save); hwp->ddc = NULL; break; default: diff --git a/xserver/hw/xfree86/vgahw/vgaHW.h b/xserver/hw/xfree86/vgahw/vgaHW.h index 7e63492d8..b31c00739 100644 --- a/xserver/hw/xfree86/vgahw/vgaHW.h +++ b/xserver/hw/xfree86/vgahw/vgaHW.h @@ -174,7 +174,7 @@ typedef struct _vgaHWRec { #define BITS_PER_GUN 6 #define COLORMAP_SIZE 256 -#if defined(__powerpc__) || defined(__arm__) || defined(__s390__) +#if defined(__powerpc__) || defined(__arm__) || defined(__s390__) || defined(__nds32__) #define DACDelay(hw) /* No legacy VGA support */ #else #define DACDelay(hw) \ diff --git a/xserver/hw/xfree86/x86emu/Makefile.in b/xserver/hw/xfree86/x86emu/Makefile.in index 0585fe6f5..f17900bd8 100644 --- a/xserver/hw/xfree86/x86emu/Makefile.in +++ b/xserver/hw/xfree86/x86emu/Makefile.in @@ -109,10 +109,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -200,6 +196,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -214,6 +212,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -231,10 +230,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -290,10 +293,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -311,17 +315,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -348,20 +346,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -453,6 +454,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/xfree86/xaa/Makefile.in b/xserver/hw/xfree86/xaa/Makefile.in index d0c8f784a..c92132eaa 100644 --- a/xserver/hw/xfree86/xaa/Makefile.in +++ b/xserver/hw/xfree86/xaa/Makefile.in @@ -139,10 +139,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -230,6 +226,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -244,6 +242,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -261,10 +260,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -320,10 +323,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -341,17 +345,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -378,20 +376,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -483,6 +484,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/xfree86/xaa/xaa.h b/xserver/hw/xfree86/xaa/xaa.h index 7db6b95d5..2af954fee 100644 --- a/xserver/hw/xfree86/xaa/xaa.h +++ b/xserver/hw/xfree86/xaa/xaa.h @@ -108,9 +108,7 @@ #include "regionstr.h" #include "xf86fbman.h" -#ifdef RENDER #include "picturestr.h" -#endif /* Flags */ #define PIXMAP_CACHE 0x00000001 @@ -1251,7 +1249,6 @@ typedef struct _XAAInfoRec { CARD32 FullPlanemasks[32]; -#ifdef RENDER Bool (*Composite) ( CARD8 op, PicturePtr pSrc, @@ -1336,13 +1333,10 @@ typedef struct _XAAInfoRec { CARD32 * CPUToScreenTextureFormats; -#endif - /* these were added for 4.3.0 */ BoxRec SolidLineLimits; BoxRec DashedLineLimits; -#ifdef RENDER /* These were added for X.Org 6.8.0 */ Bool (*SetupForCPUToScreenAlphaTexture2) ( ScrnInfoPtr pScrn, @@ -1373,7 +1367,6 @@ typedef struct _XAAInfoRec { int flags ); CARD32 *CPUToScreenTextureDstFormats; -#endif /* RENDER */ } XAAInfoRec, *XAAInfoRecPtr; #define SET_SYNC_FLAG(infoRec) (infoRec)->NeedToSync = TRUE diff --git a/xserver/hw/xfree86/xaa/xaaBitBlt.c b/xserver/hw/xfree86/xaa/xaaBitBlt.c index ebba74e55..5148ed4a2 100644 --- a/xserver/hw/xfree86/xaa/xaaBitBlt.c +++ b/xserver/hw/xfree86/xaa/xaaBitBlt.c @@ -118,8 +118,8 @@ XAABitBlt( fastExpose = 0; } } else { - REGION_INIT(pGC->pScreen, &rgnDst, &fastBox, 1); - REGION_INTERSECT(pGC->pScreen, &rgnDst, &rgnDst, prgnSrcClip); + RegionInit(&rgnDst, &fastBox, 1); + RegionIntersect(&rgnDst, &rgnDst, prgnSrcClip); } dstx += pDstDrawable->x; @@ -128,9 +128,9 @@ XAABitBlt( if (pDstDrawable->type == DRAWABLE_WINDOW) { if (!((WindowPtr)pDstDrawable)->realized) { if (!fastClip) - REGION_UNINIT(pGC->pScreen, &rgnDst); + RegionUninit(&rgnDst); if (freeSrcClip) - REGION_DESTROY(pGC->pScreen, prgnSrcClip); + RegionDestroy(prgnSrcClip); return NULL; } } @@ -153,8 +153,8 @@ XAABitBlt( blown region and call intersect */ cclip = pGC->pCompositeClip; - if (REGION_NUM_RECTS(cclip) == 1) { - BoxPtr pBox = REGION_RECTS(cclip); + if (RegionNumRects(cclip) == 1) { + BoxPtr pBox = RegionRects(cclip); if (fastBox.x1 < pBox->x1) fastBox.x1 = pBox->x1; if (fastBox.x2 > pBox->x2) fastBox.x2 = pBox->x2; @@ -163,37 +163,37 @@ XAABitBlt( /* Check to see if the region is empty */ if (fastBox.x1 >= fastBox.x2 || fastBox.y1 >= fastBox.y2) { - REGION_NULL(pGC->pScreen, &rgnDst); + RegionNull(&rgnDst); } else { - REGION_INIT(pGC->pScreen, &rgnDst, &fastBox, 1); + RegionInit(&rgnDst, &fastBox, 1); } } else { /* We must turn off fastClip now, since we must create a full blown region. It is intersected with the composite clip below. */ fastClip = 0; - REGION_INIT(pGC->pScreen, &rgnDst, &fastBox,1); + RegionInit(&rgnDst, &fastBox,1); } } else { - REGION_TRANSLATE(pGC->pScreen, &rgnDst, -dx, -dy); + RegionTranslate(&rgnDst, -dx, -dy); } if (!fastClip) { - REGION_INTERSECT(pGC->pScreen, &rgnDst, &rgnDst, + RegionIntersect(&rgnDst, &rgnDst, pGC->pCompositeClip); } /* Do bit blitting */ - numRects = REGION_NUM_RECTS(&rgnDst); + numRects = RegionNumRects(&rgnDst); if (numRects && width && height) { - if(!(pptSrc = (DDXPointPtr)xalloc(numRects * + if(!(pptSrc = (DDXPointPtr)malloc(numRects * sizeof(DDXPointRec)))) { - REGION_UNINIT(pGC->pScreen, &rgnDst); + RegionUninit(&rgnDst); if (freeSrcClip) - REGION_DESTROY(pGC->pScreen, prgnSrcClip); + RegionDestroy(prgnSrcClip); return NULL; } - pbox = REGION_RECTS(&rgnDst); + pbox = RegionRects(&rgnDst); ppt = pptSrc; for (i = numRects; --i >= 0; pbox++, ppt++) { ppt->x = pbox->x1 + dx; @@ -201,7 +201,7 @@ XAABitBlt( } (*doBitBlt) (pSrcDrawable, pDstDrawable, pGC, &rgnDst, pptSrc); - xfree(pptSrc); + free(pptSrc); } prgnExposed = NULL; @@ -214,8 +214,8 @@ XAABitBlt( (int)origSource.height, origDest.x, origDest.y, bitPlane); } - REGION_UNINIT(pGC->pScreen, &rgnDst); + RegionUninit(&rgnDst); if (freeSrcClip) - REGION_DESTROY(pGC->pScreen, prgnSrcClip); + RegionDestroy(prgnSrcClip); return prgnExposed; } diff --git a/xserver/hw/xfree86/xaa/xaaCpyArea.c b/xserver/hw/xfree86/xaa/xaaCpyArea.c index 6a898cd5f..bcf81ee99 100644 --- a/xserver/hw/xfree86/xaa/xaaCpyArea.c +++ b/xserver/hw/xfree86/xaa/xaaCpyArea.c @@ -95,8 +95,8 @@ XAADoBitBlt( ((pSrc->type == DRAWABLE_WINDOW) && (pDst->type == DRAWABLE_WINDOW))); - pbox = REGION_RECTS(prgnDst); - nbox = REGION_NUM_RECTS(prgnDst); + pbox = RegionRects(prgnDst); + nbox = RegionNumRects(prgnDst); pboxNew1 = NULL; pptNew1 = NULL; @@ -108,12 +108,12 @@ XAADoBitBlt( if (nbox > 1) { /* keep ordering in each band, reverse order of bands */ - pboxNew1 = (BoxPtr)xalloc(sizeof(BoxRec) * nbox); + pboxNew1 = (BoxPtr)malloc(sizeof(BoxRec) * nbox); if(!pboxNew1) return; - pptNew1 = (DDXPointPtr)xalloc(sizeof(DDXPointRec) * nbox); + pptNew1 = (DDXPointPtr)malloc(sizeof(DDXPointRec) * nbox); if(!pptNew1) { - xfree(pboxNew1); + free(pboxNew1); return; } pboxBase = pboxNext = pbox+nbox-1; @@ -145,14 +145,14 @@ XAADoBitBlt( if (nbox > 1) { /* reverse order of rects in each band */ - pboxNew2 = (BoxPtr)xalloc(sizeof(BoxRec) * nbox); - pptNew2 = (DDXPointPtr)xalloc(sizeof(DDXPointRec) * nbox); + pboxNew2 = (BoxPtr)malloc(sizeof(BoxRec) * nbox); + pptNew2 = (DDXPointPtr)malloc(sizeof(DDXPointRec) * nbox); if(!pboxNew2 || !pptNew2) { - if (pptNew2) xfree(pptNew2); - if (pboxNew2) xfree(pboxNew2); + free(pptNew2); + free(pboxNew2); if (pboxNew1) { - xfree(pptNew1); - xfree(pboxNew1); + free(pptNew1); + free(pboxNew1); } return; } @@ -183,12 +183,12 @@ XAADoBitBlt( xdir, ydir, pGC->alu, pGC->planemask); if (pboxNew2) { - xfree(pptNew2); - xfree(pboxNew2); + free(pptNew2); + free(pboxNew2); } if (pboxNew1) { - xfree(pptNew1); - xfree(pboxNew1); + free(pptNew1); + free(pboxNew1); } } @@ -204,8 +204,8 @@ XAADoImageWrite( int srcwidth; unsigned char* psrcBase; /* start of image */ unsigned char* srcPntr; /* index into the image */ - BoxPtr pbox = REGION_RECTS(prgnDst); - int nbox = REGION_NUM_RECTS(prgnDst); + BoxPtr pbox = RegionRects(prgnDst); + int nbox = RegionNumRects(prgnDst); XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); int Bpp = pSrc->bitsPerPixel >> 3; @@ -233,8 +233,8 @@ XAADoImageRead( int dstwidth; unsigned char* pdstBase; /* start of image */ unsigned char* dstPntr; /* index into the image */ - BoxPtr pbox = REGION_RECTS(prgnDst); - int nbox = REGION_NUM_RECTS(prgnDst); + BoxPtr pbox = RegionRects(prgnDst); + int nbox = RegionNumRects(prgnDst); XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); int Bpp = pSrc->bitsPerPixel >> 3; /* wouldn't get here unless both src and dst have same bpp */ diff --git a/xserver/hw/xfree86/xaa/xaaCpyPlane.c b/xserver/hw/xfree86/xaa/xaaCpyPlane.c index aa4c0407c..6d2b3a008 100644 --- a/xserver/hw/xfree86/xaa/xaaCpyPlane.c +++ b/xserver/hw/xfree86/xaa/xaaCpyPlane.c @@ -76,8 +76,8 @@ XAACopyPlane1toNColorExpand( DDXPointPtr pptSrc ) { XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); - BoxPtr pbox = REGION_RECTS(rgnDst); - int numrects = REGION_NUM_RECTS(rgnDst); + BoxPtr pbox = RegionRects(rgnDst); + int numrects = RegionNumRects(rgnDst); unsigned char *src = ((PixmapPtr)pSrc)->devPrivate.ptr; int srcwidth = ((PixmapPtr)pSrc)->devKind; @@ -101,8 +101,8 @@ XAACopyPlaneNtoNColorExpand( DDXPointPtr pptSrc ){ XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); - BoxPtr pbox = REGION_RECTS(rgnDst); - int numrects = REGION_NUM_RECTS(rgnDst); + BoxPtr pbox = RegionRects(rgnDst); + int numrects = RegionNumRects(rgnDst); unsigned char *src = ((PixmapPtr)pSrc)->devPrivate.ptr; unsigned char *data, *srcPtr, *dataPtr; int srcwidth = ((PixmapPtr)pSrc)->devKind; @@ -131,7 +131,7 @@ XAACopyPlaneNtoNColorExpand( h = height = pbox->y2 - pbox->y1; pitch = BitmapBytePad(width); - if(!(data = xcalloc(height, pitch))) + if(!(data = calloc(height, pitch))) goto ALLOC_FAILED; dataPtr = data; @@ -151,7 +151,7 @@ XAACopyPlaneNtoNColorExpand( pbox->x1, pbox->y1, width, height, data, pitch, 0, pGC->fgPixel, pGC->bgPixel, pGC->alu, pGC->planemask); - xfree(data); + free(data); ALLOC_FAILED: @@ -168,14 +168,14 @@ XAAPushPixelsSolidColorExpansion( int xOrg, int yOrg ) { XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); - int MaxBoxes = REGION_NUM_RECTS(pGC->pCompositeClip); + int MaxBoxes = RegionNumRects(pGC->pCompositeClip); BoxPtr pbox, pClipBoxes; int nboxes, srcx, srcy; xRectangle TheRect; unsigned char *src = pBitMap->devPrivate.ptr; int srcwidth = pBitMap->devKind; - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) + if(!RegionNumRects(pGC->pCompositeClip)) return; TheRect.x = xOrg; @@ -184,7 +184,7 @@ XAAPushPixelsSolidColorExpansion( TheRect.height = dy; if(MaxBoxes > (infoRec->PreAllocSize/sizeof(BoxRec))) { - pClipBoxes = xalloc(MaxBoxes * sizeof(BoxRec)); + pClipBoxes = malloc(MaxBoxes * sizeof(BoxRec)); if(!pClipBoxes) return; } else pClipBoxes = (BoxPtr)infoRec->PreAllocMem; @@ -203,6 +203,6 @@ XAAPushPixelsSolidColorExpansion( } if(pClipBoxes != (BoxPtr)infoRec->PreAllocMem) - xfree(pClipBoxes); + free(pClipBoxes); } diff --git a/xserver/hw/xfree86/xaa/xaaCpyWin.c b/xserver/hw/xfree86/xaa/xaaCpyWin.c index 31c421e65..c3c2690b2 100644 --- a/xserver/hw/xfree86/xaa/xaaCpyWin.c +++ b/xserver/hw/xfree86/xaa/xaaCpyWin.c @@ -47,20 +47,20 @@ XAACopyWindow( return; } - pwinRoot = WindowTable[pScreen->myNum]; + pwinRoot = pScreen->root; - REGION_NULL(pScreen, &rgnDst); + RegionNull(&rgnDst); dx = ptOldOrg.x - pWin->drawable.x; dy = ptOldOrg.y - pWin->drawable.y; - REGION_TRANSLATE(pScreen, prgnSrc, -dx, -dy); - REGION_INTERSECT(pScreen, &rgnDst, &pWin->borderClip, prgnSrc); + RegionTranslate(prgnSrc, -dx, -dy); + RegionIntersect(&rgnDst, &pWin->borderClip, prgnSrc); - pbox = REGION_RECTS(&rgnDst); - nbox = REGION_NUM_RECTS(&rgnDst); + pbox = RegionRects(&rgnDst); + nbox = RegionNumRects(&rgnDst); if(!nbox || - !(pptSrc = (DDXPointPtr )xalloc(nbox * sizeof(DDXPointRec)))) { - REGION_UNINIT(pScreen, &rgnDst); + !(pptSrc = (DDXPointPtr )malloc(nbox * sizeof(DDXPointRec)))) { + RegionUninit(&rgnDst); return; } ppt = pptSrc; @@ -77,6 +77,6 @@ XAACopyWindow( XAADoBitBlt((DrawablePtr)pwinRoot, (DrawablePtr)pwinRoot, &(infoRec->ScratchGC), &rgnDst, pptSrc); - xfree(pptSrc); - REGION_UNINIT(pScreen, &rgnDst); + free(pptSrc); + RegionUninit(&rgnDst); } diff --git a/xserver/hw/xfree86/xaa/xaaDashLine.c b/xserver/hw/xfree86/xaa/xaaDashLine.c index 63233e05d..e84708449 100644 --- a/xserver/hw/xfree86/xaa/xaaDashLine.c +++ b/xserver/hw/xfree86/xaa/xaaDashLine.c @@ -37,8 +37,8 @@ XAAPolyLinesDashed( XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&pGC->devPrivates, XAAGetGCKey()); - BoxPtr pboxInit = REGION_RECTS(pGC->pCompositeClip); - int nboxInit = REGION_NUM_RECTS(pGC->pCompositeClip); + BoxPtr pboxInit = RegionRects(pGC->pCompositeClip); + int nboxInit = RegionNumRects(pGC->pCompositeClip); unsigned int bias = miGetZeroLineBias(pDrawable->pScreen); int xorg = pDrawable->x; int yorg = pDrawable->y; diff --git a/xserver/hw/xfree86/xaa/xaaFillArc.c b/xserver/hw/xfree86/xaa/xaaFillArc.c index d83922ce0..47d804108 100644 --- a/xserver/hw/xfree86/xaa/xaaFillArc.c +++ b/xserver/hw/xfree86/xaa/xaaFillArc.c @@ -171,7 +171,7 @@ XAAPolyFillArcSolid(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs) cclip = pGC->pCompositeClip; - if(!REGION_NUM_RECTS(cclip)) + if(!RegionNumRects(cclip)) return; for (arc = parcs, i = narcs; --i >= 0; arc++) @@ -198,7 +198,7 @@ XAAPolyFillArcSolid(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs) y2 = box.y1 + (int)arc->height + 1; box.y2 = y2; if ( (x2 <= SHRT_MAX) && (y2 <= SHRT_MAX) && - (RECT_IN_REGION(pDraw->pScreen, cclip, &box) == rgnIN) ) + (RegionContainsRect(cclip, &box) == rgnIN) ) { if ((arc->angle2 >= FULLCIRCLE) || (arc->angle2 <= -FULLCIRCLE)) diff --git a/xserver/hw/xfree86/xaa/xaaFillPoly.c b/xserver/hw/xfree86/xaa/xaaFillPoly.c index 6f11e35ff..289a3cab1 100644 --- a/xserver/hw/xfree86/xaa/xaaFillPoly.c +++ b/xserver/hw/xfree86/xaa/xaaFillPoly.c @@ -213,7 +213,7 @@ XAAFillPolygonSolid( int c, y, maxy, h, yoffset; DDXPointPtr topPoint; - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) + if(!RegionNumRects(pGC->pCompositeClip)) return; if (mode == CoordModePrevious) { @@ -226,7 +226,7 @@ XAAFillPolygonSolid( mode = CoordModeOrigin; } - if (REGION_NUM_RECTS(pGC->pCompositeClip) != 1) { + if (RegionNumRects(pGC->pCompositeClip) != 1) { miFillPolygon (pDraw, pGC, shape, mode, count, ptsIn); return; } @@ -676,7 +676,7 @@ XAAFillPolygonStippled( RectFuncPtr RectFunc = NULL; TrapFuncPtr TrapFunc = NULL; - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) + if(!RegionNumRects(pGC->pCompositeClip)) return; if (mode == CoordModePrevious) { @@ -689,7 +689,7 @@ XAAFillPolygonStippled( mode = CoordModeOrigin; } - if (REGION_NUM_RECTS(pGC->pCompositeClip) != 1) { + if (RegionNumRects(pGC->pCompositeClip) != 1) { miFillPolygon (pDraw, pGC, shape, mode, count, ptsIn); return; } @@ -836,7 +836,7 @@ XAAFillPolygonTiled( RectFuncPtr RectFunc = NULL; TrapFuncPtr TrapFunc = NULL; - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) + if(!RegionNumRects(pGC->pCompositeClip)) return; if (mode == CoordModePrevious) { @@ -849,7 +849,7 @@ XAAFillPolygonTiled( mode = CoordModeOrigin; } - if (REGION_NUM_RECTS(pGC->pCompositeClip) != 1) { + if (RegionNumRects(pGC->pCompositeClip) != 1) { miFillPolygon (pDraw, pGC, shape, mode, count, ptsIn); return; } diff --git a/xserver/hw/xfree86/xaa/xaaFillRect.c b/xserver/hw/xfree86/xaa/xaaFillRect.c index 0b83ef3ee..e1fecab01 100644 --- a/xserver/hw/xfree86/xaa/xaaFillRect.c +++ b/xserver/hw/xfree86/xaa/xaaFillRect.c @@ -40,7 +40,7 @@ XAAPolyFillRect( if((nrectFill <= 0) || !pGC->planemask) return; - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) + if(!RegionNumRects(pGC->pCompositeClip)) return; switch(pGC->fillStyle) { @@ -944,8 +944,8 @@ XAAClipAndRenderRects( pboxClippedBase = (BoxPtr)infoRec->PreAllocMem; pboxClipped = pboxClippedBase; - if (REGION_NUM_RECTS(pGC->pCompositeClip) == 1) { - pextent = REGION_RECTS(pGC->pCompositeClip); + if (RegionNumRects(pGC->pCompositeClip) == 1) { + pextent = RegionRects(pGC->pCompositeClip); while (nrectFill--) { pboxClipped->x1 = max(pextent->x1, prect->x); pboxClipped->y1 = max(pextent->y1, prect->y); @@ -967,7 +967,7 @@ XAAClipAndRenderRects( } } } else { - pextent = REGION_EXTENTS(pGC->pScreen, pGC->pCompositeClip); + pextent = RegionExtents(pGC->pCompositeClip); while (nrectFill--) { int n; BoxRec box, *pbox; @@ -986,8 +986,8 @@ XAAClipAndRenderRects( if ((box.x1 >= box.x2) || (box.y1 >= box.y2)) continue; - n = REGION_NUM_RECTS (pGC->pCompositeClip); - pbox = REGION_RECTS(pGC->pCompositeClip); + n = RegionNumRects (pGC->pCompositeClip); + pbox = RegionRects(pGC->pCompositeClip); /* clip the rectangle to each box in the clip region this is logically equivalent to calling Intersect() @@ -1030,8 +1030,8 @@ XAAGetRectClipBoxes( xRectangle *prect = prectInit; RegionPtr prgnClip = pGC->pCompositeClip; - if (REGION_NUM_RECTS(prgnClip) == 1) { - pextent = REGION_RECTS(prgnClip); + if (RegionNumRects(prgnClip) == 1) { + pextent = RegionRects(prgnClip); while (nrectFill--) { pboxClipped->x1 = max(pextent->x1, prect->x); pboxClipped->y1 = max(pextent->y1, prect->y); @@ -1049,7 +1049,7 @@ XAAGetRectClipBoxes( } } } else { - pextent = REGION_EXTENTS(pGC->pScreen, prgnClip); + pextent = RegionExtents(prgnClip); while (nrectFill--) { int n; BoxRec box, *pbox; @@ -1068,8 +1068,8 @@ XAAGetRectClipBoxes( if ((box.x1 >= box.x2) || (box.y1 >= box.y2)) continue; - n = REGION_NUM_RECTS (prgnClip); - pbox = REGION_RECTS(prgnClip); + n = RegionNumRects (prgnClip); + pbox = RegionRects(prgnClip); /* clip the rectangle to each box in the clip region this is logically equivalent to calling Intersect() @@ -1090,6 +1090,6 @@ XAAGetRectClipBoxes( } } - return(pboxClipped - pboxClippedBase); + return pboxClipped - pboxClippedBase; } diff --git a/xserver/hw/xfree86/xaa/xaaGC.c b/xserver/hw/xfree86/xaa/xaaGC.c index e6083d529..fbef88d77 100644 --- a/xserver/hw/xfree86/xaa/xaaGC.c +++ b/xserver/hw/xfree86/xaa/xaaGC.c @@ -158,7 +158,7 @@ XAAValidateGC( /* If our Ops are still the default ones we need to allocate new ones */ if(pGC->ops == &XAAFallbackOps) { - if(!(pGCPriv->XAAOps = xalloc(sizeof(GCOps)))) { + if(!(pGCPriv->XAAOps = malloc(sizeof(GCOps)))) { pGCPriv->XAAOps = &XAAFallbackOps; return; } @@ -241,10 +241,9 @@ XAADestroyGC(GCPtr pGC) XAA_GC_FUNC_PROLOGUE (pGC); if(pGCPriv->XAAOps != &XAAFallbackOps) - xfree(pGCPriv->XAAOps); + free(pGCPriv->XAAOps); - if(pGCPriv->DashPattern) - xfree(pGCPriv->DashPattern); + free(pGCPriv->DashPattern); (*pGC->funcs->DestroyGC)(pGC); XAA_GC_FUNC_EPILOGUE (pGC); diff --git a/xserver/hw/xfree86/xaa/xaaImage.c b/xserver/hw/xfree86/xaa/xaaImage.c index 4933beea3..e88f45c55 100644 --- a/xserver/hw/xfree86/xaa/xaaImage.c +++ b/xserver/hw/xfree86/xaa/xaaImage.c @@ -406,7 +406,7 @@ XAAPutImage( Bool depthBug = FALSE; if(!w || !h) return; - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) + if(!RegionNumRects(pGC->pCompositeClip)) return; depthBug = XAA_DEPTH_BUG(pGC); @@ -431,7 +431,7 @@ XAAPutImage( !(infoRec->WriteBitmapFlags & NO_PLANEMASK) && !(infoRec->WriteBitmapFlags & TRANSPARENCY_ONLY))){ - int MaxBoxes = REGION_NUM_RECTS(pGC->pCompositeClip); + int MaxBoxes = RegionNumRects(pGC->pCompositeClip); BoxPtr pbox, pClipBoxes; int nboxes, srcx, srcy, srcwidth; xRectangle TheRect; @@ -442,7 +442,7 @@ XAAPutImage( TheRect.height = h; if(MaxBoxes > (infoRec->PreAllocSize/sizeof(BoxRec))) { - pClipBoxes = xalloc(MaxBoxes * sizeof(BoxRec)); + pClipBoxes = malloc(MaxBoxes * sizeof(BoxRec)); if(!pClipBoxes) return; } else pClipBoxes = (BoxPtr)infoRec->PreAllocMem; @@ -514,7 +514,7 @@ XAAPutImage( } if(pClipBoxes != (BoxPtr)infoRec->PreAllocMem) - xfree(pClipBoxes); + free(pClipBoxes); } else XAAFallbackOps.PutImage(pDraw, pGC, depth, x, y, w, h, leftPad, format, pImage); diff --git a/xserver/hw/xfree86/xaa/xaaInit.c b/xserver/hw/xfree86/xaa/xaaInit.c index 2ce2d9085..11443a60e 100644 --- a/xserver/hw/xfree86/xaa/xaaInit.c +++ b/xserver/hw/xfree86/xaa/xaaInit.c @@ -42,12 +42,12 @@ static int XAASetDGAMode(int index, int num, DGADevicePtr devRet); static void XAAEnableDisableFBAccess (int index, Bool enable); static Bool XAAChangeWindowAttributes (WindowPtr pWin, unsigned long mask); -static int XAAScreenKeyIndex; -static DevPrivateKey XAAScreenKey = &XAAScreenKeyIndex; -static int XAAGCKeyIndex; -static DevPrivateKey XAAGCKey = &XAAGCKeyIndex; -static int XAAPixmapKeyIndex; -static DevPrivateKey XAAPixmapKey = &XAAPixmapKeyIndex; +static DevPrivateKeyRec XAAScreenKeyRec; +#define XAAScreenKey (&XAAScreenKeyRec) +static DevPrivateKeyRec XAAGCKeyRec; +#define XAAGCKey (&XAAGCKeyRec) +static DevPrivateKeyRec XAAPixmapKeyRec; +#define XAAPixmapKey (&XAAPixmapKeyRec) DevPrivateKey XAAGetScreenKey(void) { return XAAScreenKey; @@ -69,7 +69,7 @@ XAACreateInfoRec(void) { XAAInfoRecPtr infoRec; - infoRec = xcalloc(1, sizeof(XAAInfoRec)); + infoRec = calloc(1, sizeof(XAAInfoRec)); if(infoRec) infoRec->CachePixelGranularity = -1; @@ -84,13 +84,11 @@ XAADestroyInfoRec(XAAInfoRecPtr infoRec) if(infoRec->ClosePixmapCache) (*infoRec->ClosePixmapCache)(infoRec->pScrn->pScreen); - if(infoRec->PreAllocMem) - xfree(infoRec->PreAllocMem); + free(infoRec->PreAllocMem); - if(infoRec->PixmapCachePrivate) - xfree(infoRec->PixmapCachePrivate); + free(infoRec->PixmapCachePrivate); - xfree(infoRec); + free(infoRec); } @@ -100,21 +98,22 @@ XAAInit(ScreenPtr pScreen, XAAInfoRecPtr infoRec) ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; XAAScreenPtr pScreenPriv; int i; -#ifdef RENDER PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); -#endif /* Return successfully if no acceleration wanted */ if (!infoRec) return TRUE; - if (!dixRequestPrivate(XAAGCKey, sizeof(XAAGCRec))) + if (!dixRegisterPrivateKey(&XAAGCKeyRec, PRIVATE_GC, sizeof(XAAGCRec))) return FALSE; - if (!dixRequestPrivate(XAAPixmapKey, sizeof(XAAPixmapRec))) + if (!dixRegisterPrivateKey(&XAAPixmapKeyRec, PRIVATE_PIXMAP, sizeof(XAAPixmapRec))) return FALSE; - if (!(pScreenPriv = xalloc(sizeof(XAAScreenRec)))) + if (!dixRegisterPrivateKey(&XAAScreenKeyRec, PRIVATE_SCREEN, 0)) + return FALSE; + + if (!(pScreenPriv = malloc(sizeof(XAAScreenRec)))) return FALSE; dixSetPrivate(&pScreen->devPrivates, XAAScreenKey, pScreenPriv); @@ -173,7 +172,6 @@ XAAInit(ScreenPtr pScreen, XAAInfoRecPtr infoRec) pScrn->EnableDisableFBAccess = XAAEnableDisableFBAccess; pScreenPriv->WindowExposures = pScreen->WindowExposures; -#ifdef RENDER if (ps) { pScreenPriv->Composite = ps->Composite; @@ -181,11 +179,10 @@ XAAInit(ScreenPtr pScreen, XAAInfoRecPtr infoRec) pScreenPriv->Glyphs = ps->Glyphs; ps->Glyphs = XAAGlyphs; } -#endif if(pScrn->overlayFlags & OVERLAY_8_32_PLANAR) XAASetupOverlay8_32Planar(pScreen); - infoRec->PreAllocMem = xalloc(MAX_PREALLOC_MEM); + infoRec->PreAllocMem = malloc(MAX_PREALLOC_MEM); if(infoRec->PreAllocMem) infoRec->PreAllocSize = MAX_PREALLOC_MEM; @@ -232,7 +229,7 @@ XAACloseScreen (int i, ScreenPtr pScreen) /* We leave it up to the client to free the XAAInfoRec */ - xfree ((pointer) pScreenPriv); + free((pointer) pScreenPriv); return (*pScreen->CloseScreen) (i, pScreen); } @@ -376,7 +373,7 @@ XAACreatePixmap(ScreenPtr pScreen, int w, int h, int depth, unsigned usage_hint) goto BAILOUT; } - if(!(pLink = xalloc(sizeof(PixmapLink)))) { + if(!(pLink = malloc(sizeof(PixmapLink)))) { xf86FreeOffscreenArea(area); goto BAILOUT; } @@ -386,7 +383,7 @@ XAACreatePixmap(ScreenPtr pScreen, int w, int h, int depth, unsigned usage_hint) XAA_SCREEN_EPILOGUE (pScreen, CreatePixmap, XAACreatePixmap); if (!pPix) { - xfree (pLink); + free(pLink); xf86FreeOffscreenArea(area); goto BAILOUT; } @@ -440,7 +437,7 @@ XAADestroyPixmap(PixmapPtr pPix) if(pPix->refcnt == 1) { if(pPriv->flags & OFFSCREEN) { if(pPriv->flags & DGA_PIXMAP) - xfree(pPriv->offscreenArea); + free(pPriv->offscreenArea); else { FBAreaPtr area = pPriv->offscreenArea; PixmapLinkPtr pLink = infoRec->OffscreenPixmaps; @@ -458,12 +455,12 @@ XAADestroyPixmap(PixmapPtr pPix) xf86FreeOffscreenArea(area); pPriv->offscreenArea = NULL; - xfree(pLink); + free(pLink); } } if(pPriv->freeData) { /* pixmaps that were once in video ram */ - xfree(pPix->devPrivate.ptr); + free(pPix->devPrivate.ptr); pPix->devPrivate.ptr = NULL; } } @@ -511,16 +508,23 @@ XAAChangeWindowAttributes (WindowPtr pWin, unsigned long mask) static Bool XAAEnterVT(int index, int flags) { + ScrnInfoPtr pScrn = xf86Screens[index]; + Bool ret; ScreenPtr pScreen = screenInfo.screens[index]; XAAScreenPtr pScreenPriv = (XAAScreenPtr)dixLookupPrivate(&pScreen->devPrivates, XAAScreenKey); - return((*pScreenPriv->EnterVT)(index, flags)); + pScrn->EnterVT = pScreenPriv->EnterVT; + ret = ((*pScreenPriv->EnterVT)(index, flags)); + pScreenPriv->EnterVT = pScrn->EnterVT; + pScrn->EnterVT = XAAEnterVT; + return ret; } static void XAALeaveVT(int index, int flags) { + ScrnInfoPtr pScrn = xf86Screens[index]; ScreenPtr pScreen = screenInfo.screens[index]; XAAScreenPtr pScreenPriv = (XAAScreenPtr)dixLookupPrivate(&pScreen->devPrivates, XAAScreenKey); @@ -531,7 +535,10 @@ XAALeaveVT(int index, int flags) infoRec->NeedToSync = FALSE; } + pScrn->LeaveVT = pScreenPriv->LeaveVT; (*pScreenPriv->LeaveVT)(index, flags); + pScreenPriv->LeaveVT = pScrn->LeaveVT; + pScrn->LeaveVT = XAALeaveVT; } typedef struct { @@ -555,7 +562,7 @@ XAASetDGAMode(int index, int num, DGADevicePtr devRet) infoRec->UsingPixmapCache = state->UsingPixmapCache; infoRec->CanDoColor8x8 = state->CanDoColor8x8; infoRec->CanDoMono8x8 = state->CanDoMono8x8; - xfree(infoRec->dgaSaves); + free(infoRec->dgaSaves); infoRec->dgaSaves = NULL; } @@ -566,7 +573,7 @@ XAASetDGAMode(int index, int num, DGADevicePtr devRet) XAAPixmapPtr pixPriv = XAA_GET_PIXMAP_PRIVATE(devRet->pPix); FBAreaPtr area; - if((area = xalloc(sizeof(FBArea)))) { + if((area = malloc(sizeof(FBArea)))) { area->pScreen = pScreen; area->box.x1 = 0; area->box.x2 = 0; @@ -581,7 +588,7 @@ XAASetDGAMode(int index, int num, DGADevicePtr devRet) pixPriv->offscreenArea = area; if(!infoRec->dgaSaves) { /* save pixmap cache state */ - SavedCacheStatePtr state = xalloc(sizeof(SavedCacheState)); + SavedCacheStatePtr state = malloc(sizeof(SavedCacheState)); state->UsingPixmapCache = infoRec->UsingPixmapCache; state->CanDoColor8x8 = infoRec->CanDoColor8x8; diff --git a/xserver/hw/xfree86/xaa/xaaInitAccel.c b/xserver/hw/xfree86/xaa/xaaInitAccel.c index 157325e4b..2f40c81a2 100644 --- a/xserver/hw/xfree86/xaa/xaaInitAccel.c +++ b/xserver/hw/xfree86/xaa/xaaInitAccel.c @@ -1251,7 +1251,6 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec) infoRec->ComputeDash = XAAComputeDash; } -#ifdef RENDER { Bool haveTexture = infoRec->CPUToScreenTextureFormats && infoRec->CPUToScreenTextureDstFormats && @@ -1271,7 +1270,6 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec) infoRec->Glyphs = XAADoGlyphs; } } -#endif /************ Validation Functions **************/ @@ -1478,7 +1476,7 @@ XAAInitAccel(ScreenPtr pScreen, XAAInfoRecPtr infoRec) infoRec->CachePixelGranularity *= 2; } - xfree(options); + free(options); if(!infoRec->CacheTile && infoRec->WritePixmapToCache) infoRec->CacheTile = XAACacheTile; diff --git a/xserver/hw/xfree86/xaa/xaaLine.c b/xserver/hw/xfree86/xaa/xaaLine.c index 7469de179..d6c06eba8 100644 --- a/xserver/hw/xfree86/xaa/xaaLine.c +++ b/xserver/hw/xfree86/xaa/xaaLine.c @@ -35,8 +35,8 @@ XAAPolyLines( #endif ){ XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); - BoxPtr pboxInit = REGION_RECTS(pGC->pCompositeClip); - int nboxInit = REGION_NUM_RECTS(pGC->pCompositeClip); + BoxPtr pboxInit = RegionRects(pGC->pCompositeClip); + int nboxInit = RegionNumRects(pGC->pCompositeClip); unsigned int bias = miGetZeroLineBias(pDrawable->pScreen); int xorg = pDrawable->x; int yorg = pDrawable->y; diff --git a/xserver/hw/xfree86/xaa/xaaLineMisc.c b/xserver/hw/xfree86/xaa/xaaLineMisc.c index 6cef4bcd5..ed3cd486b 100644 --- a/xserver/hw/xfree86/xaa/xaaLineMisc.c +++ b/xserver/hw/xfree86/xaa/xaaLineMisc.c @@ -74,8 +74,7 @@ XAAComputeDash(GCPtr pGC) int shift, value, direction; Bool set; - if(pGCPriv->DashPattern) - xfree(pGCPriv->DashPattern); + free(pGCPriv->DashPattern); pGCPriv->DashPattern = NULL; pGCPriv->DashLength = 0; @@ -93,7 +92,7 @@ XAAComputeDash(GCPtr pGC) (PatternLength & (PatternLength - 1))) return; - pGCPriv->DashPattern = xcalloc((PatternLength + 31) >> 5, 4); + pGCPriv->DashPattern = calloc((PatternLength + 31) >> 5, 4); if(!pGCPriv->DashPattern) return; pGCPriv->DashLength = PatternLength; diff --git a/xserver/hw/xfree86/xaa/xaaNonTEText.c b/xserver/hw/xfree86/xaa/xaaNonTEText.c index d32c0bbc5..7bfddcbcd 100644 --- a/xserver/hw/xfree86/xaa/xaaNonTEText.c +++ b/xserver/hw/xfree86/xaa/xaaNonTEText.c @@ -82,7 +82,7 @@ XAAPolyText8NonTEColorExpansion( infoRec->CharInfo); } - return (x + width); + return x + width; } @@ -112,7 +112,7 @@ XAAPolyText16NonTEColorExpansion( infoRec->CharInfo); } - return (x + width); + return x + width; } @@ -128,7 +128,7 @@ XAAImageText8NonTEColorExpansion( XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); unsigned long n; - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) + if(!RegionNumRects(pGC->pCompositeClip)) return; (*pGC->font->get_glyphs)(pGC->font, (unsigned long)count, @@ -153,7 +153,7 @@ XAAImageText16NonTEColorExpansion( XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); unsigned long n; - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) + if(!RegionNumRects(pGC->pCompositeClip)) return; (*pGC->font->get_glyphs)( @@ -188,7 +188,7 @@ XAAImageGlyphBltNonTEColorExpansion( ){ XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) + if(!RegionNumRects(pGC->pCompositeClip)) return; ImageGlyphBltNonTEColorExpansion( @@ -208,7 +208,7 @@ XAAPolyGlyphBltNonTEColorExpansion( ){ XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) + if(!RegionNumRects(pGC->pCompositeClip)) return; PolyGlyphBltNonTEColorExpansion( @@ -291,7 +291,7 @@ PolyGlyphBltAsSingleBitmap ( pitch = (Right - Left + 31) >> 5; size = (pitch << 2) * (Bottom - Top); - block = xcalloc(1, size); + block = calloc(1, size); topLine = 10000; botLine = -10000; @@ -349,7 +349,7 @@ PolyGlyphBltAsSingleBitmap ( nbox--; pbox++; } - xfree(block); + free(block); } static void @@ -368,8 +368,8 @@ ImageGlyphBltNonTEColorExpansion( int skippix, skipglyph, width, n, i; int Left, Right, Top, Bottom; int LeftEdge, RightEdge, ytop, ybot; - int nbox = REGION_NUM_RECTS(cclip); - BoxPtr pbox = REGION_RECTS(cclip); + int nbox = RegionNumRects(cclip); + BoxPtr pbox = RegionRects(cclip); Bool AlreadySetup = FALSE; width = CollectCharacterInfo(infoRec->GlyphInfo, nglyph, ppci, font); @@ -405,8 +405,8 @@ ImageGlyphBltNonTEColorExpansion( nbox--; pbox++; } - nbox = REGION_NUM_RECTS(cclip); - pbox = REGION_RECTS(cclip); + nbox = RegionNumRects(cclip); + pbox = RegionRects(cclip); if(infoRec->WriteBitmap && (nglyph > 1) && ((FONTMAXBOUNDS(font, rightSideBearing) - @@ -477,8 +477,8 @@ PolyGlyphBltNonTEColorExpansion( int skippix, skipglyph, width, n, i; int Left, Right, Top, Bottom; int LeftEdge, RightEdge; - int nbox = REGION_NUM_RECTS(cclip); - BoxPtr pbox = REGION_RECTS(cclip); + int nbox = RegionNumRects(cclip); + BoxPtr pbox = RegionRects(cclip); width = CollectCharacterInfo(infoRec->GlyphInfo, nglyph, ppci, font); diff --git a/xserver/hw/xfree86/xaa/xaaOffscreen.c b/xserver/hw/xfree86/xaa/xaaOffscreen.c index 7c9d53270..cd0d9a900 100644 --- a/xserver/hw/xfree86/xaa/xaaOffscreen.c +++ b/xserver/hw/xfree86/xaa/xaaOffscreen.c @@ -79,7 +79,7 @@ XAAMoveInOffscreenPixmaps(ScreenPtr pScreen) if(!tmpPix) { pPriv->offscreenArea = area; - xfree(data); + free(data); pLink = pLink->next; continue; } @@ -90,7 +90,7 @@ XAAMoveInOffscreenPixmaps(ScreenPtr pScreen) (*pGC->ops->CopyArea)((DrawablePtr)tmpPix, (DrawablePtr)pPix, pGC, 0, 0, pPix->drawable.width, pPix->drawable.height, 0, 0); - xfree(data); + free(data); tmpPix->devPrivate.ptr = NULL; FreeScratchGC(pGC); @@ -132,13 +132,13 @@ XAAMoveOutOffscreenPixmap(PixmapPtr pPix) bitsPerPixel = pPix->drawable.bitsPerPixel; devKind = BitmapBytePad(width * bitsPerPixel); - if(!(data = xalloc(devKind * height))) + if(!(data = malloc(devKind * height))) FatalError("Out of memory\n"); tmpPix = GetScratchPixmapHeader(pScreen, width, height, pPix->drawable.depth, bitsPerPixel, devKind, data); if(!tmpPix) { - xfree(data); + free(data); FatalError("Out of memory\n"); } diff --git a/xserver/hw/xfree86/xaa/xaaOverlay.c b/xserver/hw/xfree86/xaa/xaaOverlay.c index 2956a3dbf..4b52bf6fd 100644 --- a/xserver/hw/xfree86/xaa/xaaOverlay.c +++ b/xserver/hw/xfree86/xaa/xaaOverlay.c @@ -54,23 +54,23 @@ XAACopyWindow8_32( return; } - pwinRoot = WindowTable[pScreen->myNum]; + pwinRoot = pScreen->root; if(doUnderlay) freeReg = miOverlayCollectUnderlayRegions(pWin, &borderClip); - REGION_NULL(pScreen, &rgnDst); + RegionNull(&rgnDst); dx = ptOldOrg.x - pWin->drawable.x; dy = ptOldOrg.y - pWin->drawable.y; - REGION_TRANSLATE(pScreen, prgnSrc, -dx, -dy); - REGION_INTERSECT(pScreen, &rgnDst, borderClip, prgnSrc); + RegionTranslate(prgnSrc, -dx, -dy); + RegionIntersect(&rgnDst, borderClip, prgnSrc); - pbox = REGION_RECTS(&rgnDst); - nbox = REGION_NUM_RECTS(&rgnDst); + pbox = RegionRects(&rgnDst); + nbox = RegionNumRects(&rgnDst); if(!nbox || - !(pptSrc = (DDXPointPtr )xalloc(nbox * sizeof(DDXPointRec)))) { - REGION_UNINIT(pScreen, &rgnDst); + !(pptSrc = (DDXPointPtr )malloc(nbox * sizeof(DDXPointRec)))) { + RegionUninit(&rgnDst); return; } ppt = pptSrc; @@ -87,10 +87,10 @@ XAACopyWindow8_32( XAADoBitBlt((DrawablePtr)pwinRoot, (DrawablePtr)pwinRoot, &(infoRec->ScratchGC), &rgnDst, pptSrc); - xfree(pptSrc); - REGION_UNINIT(pScreen, &rgnDst); + free(pptSrc); + RegionUninit(&rgnDst); if(freeReg) - REGION_DESTROY(pScreen, borderClip); + RegionDestroy(borderClip); } static void diff --git a/xserver/hw/xfree86/xaa/xaaOverlayDF.c b/xserver/hw/xfree86/xaa/xaaOverlayDF.c index 8db816e1e..ca22368f4 100644 --- a/xserver/hw/xfree86/xaa/xaaOverlayDF.c +++ b/xserver/hw/xfree86/xaa/xaaOverlayDF.c @@ -151,8 +151,8 @@ typedef struct { int (*TiledFillChooser)(GCPtr); } XAAOverlayRec, *XAAOverlayPtr; -static int XAAOverlayKeyIndex; -static DevPrivateKey XAAOverlayKey = &XAAOverlayKeyIndex; +static DevPrivateKeyRec XAAOverlayKeyRec; +#define XAAOverlayKey (&XAAOverlayKeyRec) #define GET_OVERLAY_PRIV(pScreen) \ (XAAOverlayPtr)dixLookupPrivate(&(pScreen)->devPrivates, XAAOverlayKey) @@ -173,7 +173,10 @@ XAAInitDualFramebufferOverlay( XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen); XAAOverlayPtr pOverPriv; - if(!(pOverPriv = xalloc(sizeof(XAAOverlayRec)))) + if (!dixRegisterPrivateKey(&XAAOverlayKeyRec, PRIVATE_SCREEN, 0)) + return FALSE; + + if(!(pOverPriv = malloc(sizeof(XAAOverlayRec)))) return FALSE; dixSetPrivate(&pScreen->devPrivates, XAAOverlayKey, pOverPriv); @@ -324,7 +327,7 @@ XAAOverCopyWindow( RegionRec rgnDst; BoxPtr pbox; int i, nbox, dx, dy; - WindowPtr pRoot = WindowTable[pScreen->myNum]; + WindowPtr pRoot = pScreen->root; if (!pScrn->vtSema || !infoRec->ScreenToScreenBitBlt) { @@ -341,18 +344,18 @@ XAAOverCopyWindow( infoRec->ScratchGC.alu = GXcopy; infoRec->ScratchGC.planemask = ~0; - REGION_NULL(pScreen, &rgnDst); + RegionNull(&rgnDst); dx = ptOldOrg.x - pWin->drawable.x; dy = ptOldOrg.y - pWin->drawable.y; - REGION_TRANSLATE(pScreen, prgnSrc, -dx, -dy); - REGION_INTERSECT(pScreen, &rgnDst, &pWin->borderClip, prgnSrc); + RegionTranslate(prgnSrc, -dx, -dy); + RegionIntersect(&rgnDst, &pWin->borderClip, prgnSrc); - nbox = REGION_NUM_RECTS(&rgnDst); + nbox = RegionNumRects(&rgnDst); if(nbox && - (pptSrc = (DDXPointPtr )xalloc(nbox * sizeof(DDXPointRec)))) { + (pptSrc = (DDXPointPtr )malloc(nbox * sizeof(DDXPointRec)))) { - pbox = REGION_RECTS(&rgnDst); + pbox = RegionRects(&rgnDst); for (i = nbox, ppt = pptSrc; i--; ppt++, pbox++) { ppt->x = pbox->x1 + dx; ppt->y = pbox->y1 + dy; @@ -368,21 +371,21 @@ XAAOverCopyWindow( &(infoRec->ScratchGC), &rgnDst, pptSrc); } - xfree(pptSrc); + free(pptSrc); } - REGION_UNINIT(pScreen, &rgnDst); + RegionUninit(&rgnDst); if(pWin->drawable.depth == 8) { - REGION_NULL(pScreen, &rgnDst); + RegionNull(&rgnDst); miSegregateChildren(pWin, &rgnDst, pScrn->depth); - if(REGION_NOTEMPTY(pScreen, &rgnDst)) { - REGION_INTERSECT(pScreen, &rgnDst, &rgnDst, prgnSrc); - nbox = REGION_NUM_RECTS(&rgnDst); + if(RegionNotEmpty(&rgnDst)) { + RegionIntersect(&rgnDst, &rgnDst, prgnSrc); + nbox = RegionNumRects(&rgnDst); if(nbox && - (pptSrc = (DDXPointPtr )xalloc(nbox * sizeof(DDXPointRec)))){ + (pptSrc = (DDXPointPtr )malloc(nbox * sizeof(DDXPointRec)))){ - pbox = REGION_RECTS(&rgnDst); + pbox = RegionRects(&rgnDst); for (i = nbox, ppt = pptSrc; i--; ppt++, pbox++) { ppt->x = pbox->x1 + dx; ppt->y = pbox->y1 + dy; @@ -391,10 +394,10 @@ XAAOverCopyWindow( SWITCH_DEPTH(pScrn->depth); XAADoBitBlt((DrawablePtr)pRoot, (DrawablePtr)pRoot, &(infoRec->ScratchGC), &rgnDst, pptSrc); - xfree(pptSrc); + free(pptSrc); } } - REGION_UNINIT(pScreen, &rgnDst); + RegionUninit(&rgnDst); } } @@ -409,13 +412,13 @@ XAAOverWindowExposures( XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen); if((pWin->drawable.bitsPerPixel != 8) && infoRec->pScrn->vtSema) { - if(REGION_NUM_RECTS(pReg) && infoRec->FillSolidRects) { + if(RegionNumRects(pReg) && infoRec->FillSolidRects) { XAAOverlayPtr pOverPriv = GET_OVERLAY_PRIV(pScreen); SWITCH_DEPTH(8); (*infoRec->FillSolidRects)(infoRec->pScrn, infoRec->pScrn->colorKey, GXcopy, ~0, - REGION_NUM_RECTS(pReg), REGION_RECTS(pReg)); + RegionNumRects(pReg), RegionRects(pReg)); miWindowExposures(pWin, pReg, pOtherReg); return; } else if(infoRec->NeedToSync) { diff --git a/xserver/hw/xfree86/xaa/xaaPCache.c b/xserver/hw/xfree86/xaa/xaaPCache.c index 7e3011bd5..86ac1cd14 100644 --- a/xserver/hw/xfree86/xaa/xaaPCache.c +++ b/xserver/hw/xfree86/xaa/xaaPCache.c @@ -65,7 +65,7 @@ Enlist(CacheLinkPtr link, int x, int y, int w, int h) { CacheLinkPtr newLink; - newLink = xalloc(sizeof(CacheLink)); + newLink = malloc(sizeof(CacheLink)); newLink->next = link; newLink->x = x; newLink->y = y; newLink->w = w; newLink->h = h; @@ -80,7 +80,7 @@ Delist(CacheLinkPtr link) { if(link) { ret = link->next; - xfree(link); + free(link); } return ret; } @@ -94,7 +94,7 @@ FreeList(CacheLinkPtr link) { while(link) { tmp = link; link = link->next; - xfree(tmp); + free(tmp); } } @@ -144,20 +144,14 @@ FreePixmapCachePrivate(XAAPixmapCachePrivatePtr pPriv) { if(!pPriv) return; - if(pPriv->Info512) - xfree(pPriv->Info512); - if(pPriv->Info256) - xfree(pPriv->Info256); - if(pPriv->Info128) - xfree(pPriv->Info128); - if(pPriv->InfoColor) - xfree(pPriv->InfoColor); - if(pPriv->InfoMono) - xfree(pPriv->InfoMono); - if(pPriv->InfoPartial) - xfree(pPriv->InfoPartial); + free(pPriv->Info512); + free(pPriv->Info256); + free(pPriv->Info128); + free(pPriv->InfoColor); + free(pPriv->InfoMono); + free(pPriv->InfoPartial); - xfree(pPriv); + free(pPriv); } void @@ -212,7 +206,7 @@ ThinOutPartials( pCur->next = List8; List8 = pCur; Num8++; } else { - xfree(pCur); + free(pCur); } pCur = next; @@ -477,7 +471,7 @@ ConvertSomePartialsTo8x8( } } } - xfree(pCur); + free(pCur); } pCur = next; @@ -639,8 +633,8 @@ XAAInitPixmapCache( ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; XAAInfoRecPtr infoRec = (XAAInfoRecPtr)data; XAAPixmapCachePrivatePtr pCachePriv; - BoxPtr pBox = REGION_RECTS(areas); - int nBox = REGION_NUM_RECTS(areas); + BoxPtr pBox = RegionRects(areas); + int nBox = RegionNumRects(areas); int Num512, Num256, Num128, NumPartial, NumColor, NumMono; int Target512, Target256; CacheLinkPtr List512, List256, List128, ListPartial, ListColor, ListMono; @@ -955,7 +949,7 @@ XAAInitPixmapCache( } - pCachePriv = xcalloc(1,sizeof(XAAPixmapCachePrivate)); + pCachePriv = calloc(1,sizeof(XAAPixmapCachePrivate)); if(!pCachePriv) { if(Num512) FreeList(List512); if(Num256) FreeList(List256); @@ -969,21 +963,21 @@ XAAInitPixmapCache( infoRec->PixmapCachePrivate = (char*)pCachePriv; if(Num512) { - pCachePriv->Info512 = xcalloc(Num512,sizeof(XAACacheInfoRec)); + pCachePriv->Info512 = calloc(Num512,sizeof(XAACacheInfoRec)); if(!pCachePriv->Info512) Num512 = 0; if(Num512) TransferList(List512, pCachePriv->Info512, Num512); FreeList(List512); pCachePriv->Num512x512 = Num512; } if(Num256) { - pCachePriv->Info256 = xcalloc(Num256, sizeof(XAACacheInfoRec)); + pCachePriv->Info256 = calloc(Num256, sizeof(XAACacheInfoRec)); if(!pCachePriv->Info256) Num256 = 0; if(Num256) TransferList(List256, pCachePriv->Info256, Num256); FreeList(List256); pCachePriv->Num256x256 = Num256; } if(Num128) { - pCachePriv->Info128 = xcalloc(Num128, sizeof(XAACacheInfoRec)); + pCachePriv->Info128 = calloc(Num128, sizeof(XAACacheInfoRec)); if(!pCachePriv->Info128) Num128 = 0; if(Num128) TransferList(List128, pCachePriv->Info128, Num128); FreeList(List128); @@ -991,7 +985,7 @@ XAAInitPixmapCache( } if(NumPartial) { - pCachePriv->InfoPartial = xcalloc(NumPartial, sizeof(XAACacheInfoRec)); + pCachePriv->InfoPartial = calloc(NumPartial, sizeof(XAACacheInfoRec)); if(!pCachePriv->InfoPartial) NumPartial = 0; if(NumPartial) TransferList(ListPartial, pCachePriv->InfoPartial, NumPartial); @@ -1000,7 +994,7 @@ XAAInitPixmapCache( } if(NumColor) { - pCachePriv->InfoColor = xcalloc(NumColor, sizeof(XAACacheInfoRec)); + pCachePriv->InfoColor = calloc(NumColor, sizeof(XAACacheInfoRec)); if(!pCachePriv->InfoColor) NumColor = 0; if(NumColor) TransferList(ListColor, pCachePriv->InfoColor, NumColor); FreeList(ListColor); @@ -1008,7 +1002,7 @@ XAAInitPixmapCache( } if(NumMono) { - pCachePriv->InfoMono = xcalloc(NumMono, sizeof(XAACacheInfoRec)); + pCachePriv->InfoMono = calloc(NumMono, sizeof(XAACacheInfoRec)); if(!pCachePriv->InfoMono) NumMono = 0; if(NumMono) TransferList(ListMono, pCachePriv->InfoMono, NumMono); FreeList(ListMono); @@ -1557,7 +1551,7 @@ XAACacheMonoStipple(ScrnInfoPtr pScrn, PixmapPtr pPix) pad = BitmapBytePad(pCache->w * bpp); dwords = bytes_to_int32(pad); - dstPtr = data = (unsigned char*)xalloc(pad * pCache->h); + dstPtr = data = (unsigned char*)malloc(pad * pCache->h); srcPtr = (unsigned char*)pPix->devPrivate.ptr; if(infoRec->ScreenToScreenColorExpandFillFlags & BIT_ORDER_IN_BYTE_MSBFIRST) @@ -1588,7 +1582,7 @@ XAACacheMonoStipple(ScrnInfoPtr pScrn, PixmapPtr pPix) pScrn, pCache->x, pCache->y, pCache->w, pCache->h, data, pad, bpp, pScrn->depth); - xfree(data); + free(data); return pCache; } @@ -1867,7 +1861,7 @@ XAAWriteBitmapToCacheLinear( ){ ScreenPtr pScreen = pScrn->pScreen; PixmapPtr pScreenPix, pDstPix; - XID gcvals[2]; + ChangeGCVal gcvals[2]; GCPtr pGC; pScreenPix = (*pScreen->GetScreenPixmap)(pScreen); @@ -1879,9 +1873,9 @@ XAAWriteBitmapToCacheLinear( pScreenPix->devPrivate.ptr); pGC = GetScratchGC(pScreenPix->drawable.depth, pScreen); - gcvals[0] = fg; - gcvals[1] = bg; - DoChangeGC(pGC, GCForeground | GCBackground, gcvals, 0); + gcvals[0].val = fg; + gcvals[1].val = bg; + ChangeGC(NullClient, pGC, GCForeground | GCBackground, gcvals); ValidateGC((DrawablePtr)pDstPix, pGC); /* We've unwrapped already so these ops miss a sync */ @@ -1970,7 +1964,7 @@ XAAWriteMono8x8PatternToCache( pad = BitmapBytePad(pCache->w * pScrn->bitsPerPixel); - data = (unsigned char*)xalloc(pad * pCache->h); + data = (unsigned char*)malloc(pad * pCache->h); if(!data) return; if(infoRec->Mono8x8PatternFillFlags & HARDWARE_PATTERN_PROGRAMMED_ORIGIN) { @@ -1994,7 +1988,7 @@ XAAWriteMono8x8PatternToCache( (*infoRec->WritePixmapToCache)(pScrn, pCache->x, pCache->y, pCache->w, pCache->h, data, pad, pScrn->bitsPerPixel, pScrn->depth); - xfree(data); + free(data); } void @@ -2015,7 +2009,7 @@ XAAWriteColor8x8PatternToCache( if(pixPriv->flags & REDUCIBLE_TO_2_COLOR) { CARD32* ptr; pad = BitmapBytePad(pCache->w); - data = (unsigned char*)xalloc(pad * pCache->h); + data = (unsigned char*)malloc(pad * pCache->h); if(!data) return; if(infoRec->Color8x8PatternFillFlags & @@ -2040,7 +2034,7 @@ XAAWriteColor8x8PatternToCache( (*infoRec->WriteBitmapToCache)(pScrn, pCache->x, pCache->y, pCache->w, pCache->h, data, pad, pCache->fg, pCache->bg); - xfree(data); + free(data); return; } @@ -2049,7 +2043,7 @@ XAAWriteColor8x8PatternToCache( w = min(8,pPix->drawable.width); pad = BitmapBytePad(pCache->w * pScrn->bitsPerPixel); - data = (unsigned char*)xalloc(pad * pCache->h); + data = (unsigned char*)malloc(pad * pCache->h); if(!data) return; /* Write and expand horizontally. */ @@ -2088,7 +2082,7 @@ XAAWriteColor8x8PatternToCache( (*infoRec->WritePixmapToCache)(pScrn, pCache->x, pCache->y, pCache->w, pCache->h, data, pad, pScrn->bitsPerPixel, pScrn->depth); - xfree(data); + free(data); } diff --git a/xserver/hw/xfree86/xaa/xaaPict.c b/xserver/hw/xfree86/xaa/xaaPict.c index e059d3d65..aaafacba5 100644 --- a/xserver/hw/xfree86/xaa/xaaPict.c +++ b/xserver/hw/xfree86/xaa/xaaPict.c @@ -215,7 +215,7 @@ XAADoComposite ( BoxPtr pbox; int nbox, w, h; - if(!REGION_NUM_RECTS(pDst->pCompositeClip)) + if(!RegionNumRects(pDst->pCompositeClip)) return TRUE; if(!infoRec->pScrn->vtSema || !DRAWABLE_IS_ON_CARD(pDst->pDrawable)) @@ -273,8 +273,8 @@ XAADoComposite ( width, height)) return TRUE; - nbox = REGION_NUM_RECTS(®ion); - pbox = REGION_RECTS(®ion); + nbox = RegionNumRects(®ion); + pbox = RegionRects(®ion); if(!nbox) return TRUE; @@ -298,7 +298,7 @@ XAADoComposite ( } /* WriteBitmap sets the Sync flag */ - REGION_UNINIT(pScreen, ®ion); + RegionUninit(®ion); return TRUE; } @@ -340,11 +340,11 @@ XAADoComposite ( width, height)) return TRUE; - nbox = REGION_NUM_RECTS(®ion); - pbox = REGION_RECTS(®ion); + nbox = RegionNumRects(®ion); + pbox = RegionRects(®ion); if(!nbox) { - REGION_UNINIT(pScreen, ®ion); + RegionUninit(®ion); return TRUE; } @@ -355,7 +355,7 @@ XAADoComposite ( ((PixmapPtr)(pMask->pDrawable))->devKind, w, h, flags)) { - REGION_UNINIT(pScreen, ®ion); + RegionUninit(®ion); return FALSE; } @@ -371,7 +371,7 @@ XAADoComposite ( } SET_SYNC_FLAG(infoRec); - REGION_UNINIT(pScreen, ®ion); + RegionUninit(®ion); return TRUE; } } else { @@ -409,11 +409,11 @@ XAADoComposite ( width, height)) return TRUE; - nbox = REGION_NUM_RECTS(®ion); - pbox = REGION_RECTS(®ion); + nbox = RegionNumRects(®ion); + pbox = RegionRects(®ion); if(!nbox) { - REGION_UNINIT(pScreen, ®ion); + RegionUninit(®ion); return TRUE; } @@ -423,7 +423,7 @@ XAADoComposite ( ((PixmapPtr)(pSrc->pDrawable))->devKind, w, h, flags)) { - REGION_UNINIT(pScreen, ®ion); + RegionUninit(®ion); return FALSE; } @@ -440,7 +440,7 @@ XAADoComposite ( } SET_SYNC_FLAG(infoRec); - REGION_UNINIT(pScreen, ®ion); + RegionUninit(®ion); return TRUE; } @@ -476,16 +476,16 @@ XAACompositeSrcCopy (PicturePtr pSrc, width, height)) return; - nbox = REGION_NUM_RECTS(®ion); - pbox = REGION_RECTS(®ion); + nbox = RegionNumRects(®ion); + pbox = RegionRects(®ion); if(!nbox) { - REGION_UNINIT(pScreen, ®ion); + RegionUninit(®ion); return; } - pptSrc = xalloc(sizeof(DDXPointRec) * nbox); + pptSrc = malloc(sizeof(DDXPointRec) * nbox); if (!pptSrc) { - REGION_UNINIT(pScreen, ®ion); + RegionUninit(®ion); return; } xoff = xSrc - xDst; @@ -501,8 +501,8 @@ XAACompositeSrcCopy (PicturePtr pSrc, XAADoBitBlt(pSrc->pDrawable, pDst->pDrawable, &infoRec->ScratchGC, ®ion, pptSrc); - xfree(pptSrc); - REGION_UNINIT(pScreen, ®ion); + free(pptSrc); + RegionUninit(®ion); return; } @@ -588,7 +588,7 @@ XAADoGlyphs (CARD8 op, ScreenPtr pScreen = pDst->pDrawable->pScreen; XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_SCREEN(pScreen); - if(!REGION_NUM_RECTS(pDst->pCompositeClip)) + if(!RegionNumRects(pDst->pCompositeClip)) return TRUE; if(!infoRec->pScrn->vtSema || diff --git a/xserver/hw/xfree86/xaa/xaaRect.c b/xserver/hw/xfree86/xaa/xaaRect.c index 0a7e174b7..4a3912946 100644 --- a/xserver/hw/xfree86/xaa/xaaRect.c +++ b/xserver/hw/xfree86/xaa/xaaRect.c @@ -46,8 +46,8 @@ XAAPolyRectangleThinSolid( int clipYMax; /* lower right corner of clip rect */ int width, height; /* width and height of rect */ - nClipRects = REGION_NUM_RECTS(pGC->pCompositeClip); - pClipRects = REGION_RECTS(pGC->pCompositeClip); + nClipRects = RegionNumRects(pGC->pCompositeClip); + pClipRects = RegionRects(pGC->pCompositeClip); if(!nClipRects) return; diff --git a/xserver/hw/xfree86/xaa/xaaSpans.c b/xserver/hw/xfree86/xaa/xaaSpans.c index 46d6d0740..a742cba1b 100644 --- a/xserver/hw/xfree86/xaa/xaaSpans.c +++ b/xserver/hw/xfree86/xaa/xaaSpans.c @@ -49,7 +49,7 @@ XAAFillSpans( if((nInit <= 0) || !pGC->planemask) return; - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) + if(!RegionNumRects(pGC->pCompositeClip)) return; switch(pGC->fillStyle) { @@ -117,7 +117,7 @@ XAAFillSpans( } - if((nInit < 10) || (REGION_NUM_RECTS(pGC->pCompositeClip) != 1)) + if((nInit < 10) || (RegionNumRects(pGC->pCompositeClip) != 1)) fastClip = FALSE; if(fastClip) { @@ -797,10 +797,10 @@ XAAClipAndRenderSpans( pptNew = pptBase; pwidthNew = pwidthBase; - numRects = REGION_NUM_RECTS(pGC->pCompositeClip); + numRects = RegionNumRects(pGC->pCompositeClip); if(numRects == 1) { - BoxPtr pextent = REGION_RECTS(pGC->pCompositeClip); + BoxPtr pextent = RegionRects(pGC->pCompositeClip); while(nspans--) { if ((pextent->y1 <= ppt->y) && (ppt->y < pextent->y2)) { @@ -830,7 +830,7 @@ XAAClipAndRenderSpans( while(nspans--) { nbox = numRects; - pbox = REGION_RECTS(pGC->pCompositeClip); + pbox = RegionRects(pGC->pCompositeClip); /* find the first band */ while(nbox && (pbox->y2 <= ppt->y)) { diff --git a/xserver/hw/xfree86/xaa/xaaStateChange.c b/xserver/hw/xfree86/xaa/xaaStateChange.c index 57d8aa318..189441d0d 100644 --- a/xserver/hw/xfree86/xaa/xaaStateChange.c +++ b/xserver/hw/xfree86/xaa/xaaStateChange.c @@ -260,7 +260,6 @@ typedef struct _XAAStateWrapRec { GetImageProcPtr GetImage; GetSpansProcPtr GetSpans; CopyWindowProcPtr CopyWindow; -#ifdef RENDER Bool (*SetupForCPUToScreenAlphaTexture2)(ScrnInfoPtr pScrn, int op, CARD16 red, CARD16 green, CARD16 blue, CARD16 alpha, @@ -271,11 +270,10 @@ typedef struct _XAAStateWrapRec { CARD32 srcFormat, CARD32 dstFormat, CARD8 *texPtr, int texPitch, int width, int height, int flags); -#endif } XAAStateWrapRec, *XAAStateWrapPtr; -static int XAAStateKeyIndex; -static DevPrivateKey XAAStateKey = &XAAStateKeyIndex; +static DevPrivateKeyRec XAAStateKeyRec; +#define XAAStateKey (&XAAStateKeyRec) /* Wrap functions start here */ #define GET_STATEPRIV_GC(pGC) XAAStateWrapPtr pStatePriv =\ @@ -1457,7 +1455,6 @@ static void XAAStateWrapCopyWindow(WindowPtr pWindow, DDXPointRec ptOldOrg, prgnSrc); } -#ifdef RENDER static Bool XAAStateWrapSetupForCPUToScreenAlphaTexture2(ScrnInfoPtr pScrn, int op, CARD16 red, CARD16 green, @@ -1494,7 +1491,6 @@ static Bool XAAStateWrapSetupForCPUToScreenTexture2(ScrnInfoPtr pScrn, int op, dstFormat, texPtr, texPitch, width, height, flags); } -#endif /* Setup Function */ Bool @@ -1504,7 +1500,8 @@ XAAInitStateWrap(ScreenPtr pScreen, XAAInfoRecPtr infoRec) XAAStateWrapPtr pStatePriv; int i = 0; - if(!(pStatePriv = xalloc(sizeof(XAAStateWrapRec)))) return FALSE; + if (!dixRegisterPrivateKey(&XAAStateKeyRec, PRIVATE_SCREEN, 0)) return FALSE; + if(!(pStatePriv = malloc(sizeof(XAAStateWrapRec)))) return FALSE; dixSetPrivate(&pScreen->devPrivates, XAAStateKey, pStatePriv); pStatePriv->RestoreAccelState = infoRec->RestoreAccelState; pStatePriv->pScrn = pScrn; @@ -1624,9 +1621,7 @@ XAAInitStateWrap(ScreenPtr pScreen, XAAInfoRecPtr infoRec) XAA_STATE_WRAP(GetImage); XAA_STATE_WRAP(GetSpans); XAA_STATE_WRAP(CopyWindow); -#ifdef RENDER XAA_STATE_WRAP(SetupForCPUToScreenAlphaTexture2); XAA_STATE_WRAP(SetupForCPUToScreenTexture2); -#endif return TRUE; } diff --git a/xserver/hw/xfree86/xaa/xaaTEGlyph.c b/xserver/hw/xfree86/xaa/xaaTEGlyph.c index 41e638e5c..510c387b7 100644 --- a/xserver/hw/xfree86/xaa/xaaTEGlyph.c +++ b/xserver/hw/xfree86/xaa/xaaTEGlyph.c @@ -301,7 +301,7 @@ EXPNAME(XAATEGlyphRenderer3)( } dwords = ((3 * w + 31) >> 5) * h; - mem = (CARD32*)xalloc(((w + 31) >> 3) * sizeof(char)); + mem = (CARD32*)malloc(((w + 31) >> 3) * sizeof(char)); if (!mem) return; (*infoRec->SubsequentCPUToScreenColorExpandFill)(pScrn, x, y, w, h, 0); @@ -321,7 +321,7 @@ EXPNAME(XAATEGlyphRenderer3)( DrawTextScanline3(base, mem, w); } - xfree(mem); + free(mem); if((infoRec->TEGlyphRendererFlags & CPU_TRANSFER_PAD_QWORD) && (dwords & 1)) { @@ -478,7 +478,7 @@ EXPNAME(XAATEGlyphRendererScanline3)( w += skipleft; x -= skipleft; - mem = (CARD32*)xalloc(((w + 31) >> 3) * sizeof(char)); + mem = (CARD32*)malloc(((w + 31) >> 3) * sizeof(char)); if (!mem) return; (*infoRec->SubsequentScanlineCPUToScreenColorExpandFill)( @@ -495,7 +495,7 @@ EXPNAME(XAATEGlyphRendererScanline3)( bufferNo = 0; } - xfree(mem); + free(mem); THE_END: diff --git a/xserver/hw/xfree86/xaa/xaaTEText.c b/xserver/hw/xfree86/xaa/xaaTEText.c index fc445726f..41c0ebcfd 100644 --- a/xserver/hw/xfree86/xaa/xaaTEText.c +++ b/xserver/hw/xfree86/xaa/xaaTEText.c @@ -110,7 +110,7 @@ XAAImageText8TEColorExpansion( XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); unsigned long n; - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) + if(!RegionNumRects(pGC->pCompositeClip)) return; (*pGC->font->get_glyphs)(pGC->font, (unsigned long)count, @@ -134,7 +134,7 @@ XAAImageText16TEColorExpansion( XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); unsigned long n; - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) + if(!RegionNumRects(pGC->pCompositeClip)) return; (*pGC->font->get_glyphs)( @@ -169,7 +169,7 @@ XAAImageGlyphBltTEColorExpansion( { XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) + if(!RegionNumRects(pGC->pCompositeClip)) return; XAAGlyphBltTEColorExpansion( @@ -189,7 +189,7 @@ XAAPolyGlyphBltTEColorExpansion( { XAAInfoRecPtr infoRec = GET_XAAINFORECPTR_FROM_GC(pGC); - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) + if(!RegionNumRects(pGC->pCompositeClip)) return; XAAGlyphBltTEColorExpansion( @@ -229,8 +229,8 @@ XAAGlyphBltTEColorExpansion( int skippix, skipglyphs; int Left, Right, Top, Bottom; int LeftEdge, RightEdge, ytop, ybot; - int nbox = REGION_NUM_RECTS(cclip); - BoxPtr pbox = REGION_RECTS(cclip); + int nbox = RegionNumRects(cclip); + BoxPtr pbox = RegionRects(cclip); unsigned int **glyphs = NULL; int glyphWidth = FONTMAXBOUNDS(font, characterWidth); @@ -273,7 +273,7 @@ XAAGlyphBltTEColorExpansion( if (!fallbackBits) { int fontHeight = Bottom - Top + 1; - fallbackBits = xcalloc (glyphWidth * fontHeight, 1); + fallbackBits = calloc(glyphWidth * fontHeight, 1); if (!fallbackBits) return; } @@ -299,8 +299,7 @@ XAAGlyphBltTEColorExpansion( skippix, ytop - Top, glyphs + skipglyphs, glyphWidth, fg, bg, rop, planemask); - if (fallbackBits) - xfree (fallbackBits); + free(fallbackBits); } nbox--; pbox++; diff --git a/xserver/hw/xfree86/xaa/xaaWideLine.c b/xserver/hw/xfree86/xaa/xaaWideLine.c index a684d6676..79a6159cd 100644 --- a/xserver/hw/xfree86/xaa/xaaWideLine.c +++ b/xserver/hw/xfree86/xaa/xaaWideLine.c @@ -804,10 +804,10 @@ XAAPolylinesWideSolid ( int yorg = pDrawable->y; Bool hardClip = FALSE; - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) + if(!RegionNumRects(pGC->pCompositeClip)) return; - if(REGION_NUM_RECTS(pGC->pCompositeClip) != 1) { + if(RegionNumRects(pGC->pCompositeClip) != 1) { miWideLine(pDrawable, pGC, mode, npt, pPts); return; } diff --git a/xserver/hw/xfree86/xaa/xaaWrapper.c b/xserver/hw/xfree86/xaa/xaaWrapper.c index 88418946f..e91bac062 100644 --- a/xserver/hw/xfree86/xaa/xaaWrapper.c +++ b/xserver/hw/xfree86/xaa/xaaWrapper.c @@ -62,10 +62,8 @@ typedef struct { UninstallColormapProcPtr UninstallColormap; ListInstalledColormapsProcPtr ListInstalledColormaps; StoreColorsProcPtr StoreColors; -#ifdef RENDER CompositeProcPtr Composite; GlyphsProcPtr Glyphs; -#endif CloseScreenProcPtr wrapCloseScreen; CreateScreenResourcesProcPtr wrapCreateScreenResources; @@ -79,10 +77,8 @@ typedef struct { UninstallColormapProcPtr wrapUninstallColormap; ListInstalledColormapsProcPtr wrapListInstalledColormaps; StoreColorsProcPtr wrapStoreColors; -#ifdef RENDER CompositeProcPtr wrapComposite; GlyphsProcPtr wrapGlyphs; -#endif int depth; } xaaWrapperScrPrivRec, *xaaWrapperScrPrivPtr; @@ -129,10 +125,10 @@ typedef struct _xaaWrapperGCPriv { #define xaaWrapperGCPriv(pGC) xaaWrapperGCPrivPtr pGCPriv = xaaWrapperGetGCPriv(pGC) -static int xaaWrapperScrPrivateKeyIndex; -static DevPrivateKey xaaWrapperScrPrivateKey = &xaaWrapperScrPrivateKeyIndex; -static int xaaWrapperGCPrivateKeyIndex; -static DevPrivateKey xaaWrapperGCPrivateKey = &xaaWrapperGCPrivateKeyIndex; +static DevPrivateKeyRec xaaWrapperScrPrivateKeyRec; +#define xaaWrapperScrPrivateKey (&xaaWrapperScrPrivateKeyRec) +static DevPrivateKeyRec xaaWrapperGCPrivateKeyRec; +#define xaaWrapperGCPrivateKey (&xaaWrapperGCPrivateKeyRec) static Bool xaaWrapperCreateScreenResources(ScreenPtr pScreen) @@ -270,14 +266,15 @@ xaaSetupWrapper(ScreenPtr pScreen, XAAInfoRecPtr infoPtr, int depth, SyncFunc *f { Bool ret; xaaWrapperScrPrivPtr pScrPriv; -#ifdef RENDER PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); -#endif - if (!dixRequestPrivate(xaaWrapperGCPrivateKey, sizeof(xaaWrapperGCPrivRec))) + if (!dixRegisterPrivateKey(&xaaWrapperGCPrivateKeyRec, PRIVATE_GC, sizeof(xaaWrapperGCPrivRec))) return FALSE; - pScrPriv = (xaaWrapperScrPrivPtr) xalloc (sizeof (xaaWrapperScrPrivRec)); + if (!dixRegisterPrivateKey(&xaaWrapperScrPrivateKeyRec, PRIVATE_SCREEN, 0)) + return FALSE; + + pScrPriv = (xaaWrapperScrPrivPtr) malloc(sizeof (xaaWrapperScrPrivRec)); if (!pScrPriv) return FALSE; @@ -293,12 +290,10 @@ xaaSetupWrapper(ScreenPtr pScreen, XAAInfoRecPtr infoPtr, int depth, SyncFunc *f get (pScrPriv, pScreen, UninstallColormap, wrapUninstallColormap); get (pScrPriv, pScreen, ListInstalledColormaps, wrapListInstalledColormaps); get (pScrPriv, pScreen, StoreColors, wrapStoreColors); -#ifdef RENDER if (ps) { get (pScrPriv, ps, Glyphs, wrapGlyphs); get (pScrPriv, ps, Composite, wrapComposite); } -#endif if (!(ret = XAAInit(pScreen,infoPtr))) return FALSE; @@ -317,12 +312,10 @@ xaaSetupWrapper(ScreenPtr pScreen, XAAInfoRecPtr infoPtr, int depth, SyncFunc *f xaaWrapperListInstalledColormaps); wrap (pScrPriv, pScreen, StoreColors, xaaWrapperStoreColors); -#ifdef RENDER if (ps) { wrap (pScrPriv, ps, Glyphs, xaaWrapperGlyphs); wrap (pScrPriv, ps, Composite, xaaWrapperComposite); } -#endif pScrPriv->depth = depth; dixSetPrivate(&pScreen->devPrivates, xaaWrapperScrPrivateKey, pScrPriv); @@ -438,7 +431,6 @@ xaaWrapperDestroyClip(GCPtr pGC) XAAWRAPPER_GC_FUNC_EPILOGUE (pGC); } -#ifdef RENDER static void xaaWrapperComposite (CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, @@ -470,7 +462,6 @@ xaaWrapperGlyphs (CARD8 op, PicturePtr pSrc, PicturePtr pDst, wrap (pScrPriv, ps, Glyphs, xaaWrapperGlyphs); } -#endif void XAASync(ScreenPtr pScreen) diff --git a/xserver/hw/xfree86/xaa/xaalocal.h b/xserver/hw/xfree86/xaa/xaalocal.h index 5e3d373c6..a9a70da08 100644 --- a/xserver/hw/xfree86/xaa/xaalocal.h +++ b/xserver/hw/xfree86/xaa/xaalocal.h @@ -10,9 +10,7 @@ #include "xf86fbman.h" #include "xaa.h" #include "mi.h" -#ifdef RENDER #include "picturestr.h" -#endif #define GCWhenForced (GCArcMode << 1) @@ -55,10 +53,8 @@ typedef struct _XAAScreen { void (*LeaveVT)(int, int); int (*SetDGAMode)(int, int, DGADevicePtr); void (*EnableDisableFBAccess)(int, Bool); -#ifdef RENDER CompositeProcPtr Composite; GlyphsProcPtr Glyphs; -#endif } XAAScreenRec, *XAAScreenPtr; #define OPS_ARE_PIXMAP 0x00000001 @@ -1539,7 +1535,6 @@ extern _X_EXPORT void XAARemoveAreaCallback(FBAreaPtr area); extern _X_EXPORT void XAAMoveOutOffscreenPixmap(PixmapPtr pPix); extern _X_EXPORT Bool XAAInitStateWrap(ScreenPtr pScreen, XAAInfoRecPtr infoRec); -#ifdef RENDER extern _X_EXPORT void XAAComposite (CARD8 op, PicturePtr pSrc, @@ -1627,8 +1622,6 @@ XAAGetPixelFromRGBA ( CARD32 format ); -#endif - /* XXX should be static */ extern _X_EXPORT GCOps XAAFallbackOps; extern _X_EXPORT GCOps *XAAGetFallbackOps(void); @@ -1716,7 +1709,7 @@ extern _X_EXPORT CARD32 XAAReverseBitOrder(CARD32 data); if(_pLink->pPix == pPix) { \ if(_prev) _prev->next = _pLink->next; \ else infoRec->OffscreenPixmaps = _pLink->next; \ - xfree(_pLink); \ + free(_pLink); \ break; \ } \ _prev = _pLink; \ diff --git a/xserver/hw/xfree86/xaa/xaawrap.h b/xserver/hw/xfree86/xaa/xaawrap.h index 857dbc3ed..3f3c26171 100644 --- a/xserver/hw/xfree86/xaa/xaawrap.h +++ b/xserver/hw/xfree86/xaa/xaawrap.h @@ -32,7 +32,7 @@ #define XAA_GC_OP_PROLOGUE_WITH_RETURN(pGC)\ XAAGCPtr pGCPriv = (XAAGCPtr)dixLookupPrivate(&(pGC)->devPrivates, XAAGetGCKey()); \ GCFuncs *oldFuncs = pGC->funcs;\ - if(!REGION_NUM_RECTS(pGC->pCompositeClip)) return; \ + if(!RegionNumRects(pGC->pCompositeClip)) return; \ pGC->funcs = pGCPriv->wrapFuncs;\ pGC->ops = pGCPriv->wrapOps @@ -61,14 +61,12 @@ #include #endif -#ifdef RENDER #define XAA_RENDER_PROLOGUE(pScreen,field)\ (GetPictureScreen(pScreen)->field = \ ((XAAScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, XAAGetScreenKey()))->field) #define XAA_RENDER_EPILOGUE(pScreen, field, wrapper)\ (GetPictureScreen(pScreen)->field = wrapper) -#endif /* This also works fine for drawables */ diff --git a/xserver/hw/xfree86/xf8_16bpp/Makefile.in b/xserver/hw/xfree86/xf8_16bpp/Makefile.in index 8e9a0da88..b47a30042 100644 --- a/xserver/hw/xfree86/xf8_16bpp/Makefile.in +++ b/xserver/hw/xfree86/xf8_16bpp/Makefile.in @@ -119,10 +119,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -210,6 +206,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -224,6 +222,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -241,10 +240,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -300,10 +303,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -321,17 +325,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -358,20 +356,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -463,6 +464,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/xnest/Color.c b/xserver/hw/xnest/Color.c index dc749478f..883b77cb2 100644 --- a/xserver/hw/xnest/Color.c +++ b/xserver/hw/xnest/Color.c @@ -34,7 +34,11 @@ is" without express or implied warranty. #include "XNWindow.h" #include "Args.h" -static ColormapPtr InstalledMaps[MAXSCREENS]; +static DevPrivateKeyRec cmapScrPrivateKeyRec; +#define cmapScrPrivateKey (&cmapScrPrivateKeyRec) + +#define GetInstalledColormap(s) ((ColormapPtr) dixLookupPrivate(&(s)->devPrivates, cmapScrPrivateKey)) +#define SetInstalledColormap(s,c) (dixSetPrivate(&(s)->devPrivates, cmapScrPrivateKey, c)) Bool xnestCreateColormap(ColormapPtr pCmap) @@ -48,7 +52,7 @@ xnestCreateColormap(ColormapPtr pCmap) pVisual = pCmap->pVisual; ncolors = pVisual->ColormapEntries; - pCmap->devPriv = (pointer)xalloc(sizeof(xnestPrivColormap)); + pCmap->devPriv = (pointer)malloc(sizeof(xnestPrivColormap)); xnestColormapPriv(pCmap)->colormap = XCreateColormap(xnestDisplay, @@ -60,7 +64,7 @@ xnestCreateColormap(ColormapPtr pCmap) switch (pVisual->class) { case StaticGray: /* read only */ - colors = (XColor *)xalloc(ncolors * sizeof(XColor)); + colors = (XColor *)malloc(ncolors * sizeof(XColor)); for (i = 0; i < ncolors; i++) colors[i].pixel = i; XQueryColors(xnestDisplay, xnestColormap(pCmap), colors, ncolors); @@ -69,11 +73,11 @@ xnestCreateColormap(ColormapPtr pCmap) pCmap->red[i].co.local.green = colors[i].red; pCmap->red[i].co.local.blue = colors[i].red; } - xfree(colors); + free(colors); break; case StaticColor: /* read only */ - colors = (XColor *)xalloc(ncolors * sizeof(XColor)); + colors = (XColor *)malloc(ncolors * sizeof(XColor)); for (i = 0; i < ncolors; i++) colors[i].pixel = i; XQueryColors(xnestDisplay, xnestColormap(pCmap), colors, ncolors); @@ -82,11 +86,11 @@ xnestCreateColormap(ColormapPtr pCmap) pCmap->red[i].co.local.green = colors[i].green; pCmap->red[i].co.local.blue = colors[i].blue; } - xfree(colors); + free(colors); break; case TrueColor: /* read only */ - colors = (XColor *)xalloc(ncolors * sizeof(XColor)); + colors = (XColor *)malloc(ncolors * sizeof(XColor)); red = green = blue = 0L; redInc = lowbit(pVisual->redMask); greenInc = lowbit(pVisual->greenMask); @@ -106,7 +110,7 @@ xnestCreateColormap(ColormapPtr pCmap) pCmap->green[i].co.local.green = colors[i].green; pCmap->blue[i].co.local.blue = colors[i].blue; } - xfree(colors); + free(colors); break; case GrayScale: /* read and write */ @@ -126,7 +130,7 @@ void xnestDestroyColormap(ColormapPtr pCmap) { XFreeColormap(xnestDisplay, xnestColormap(pCmap)); - xfree(pCmap->devPriv); + free(pCmap->devPriv); } #define SEARCH_PREDICATE \ @@ -190,13 +194,13 @@ xnestSetInstalledColormapWindows(ScreenPtr pScreen) xnestInstalledColormapWindows icws; int numWindows; - icws.cmapIDs = (Colormap *)xalloc(pScreen->maxInstalledCmaps * + icws.cmapIDs = (Colormap *)malloc(pScreen->maxInstalledCmaps * sizeof(Colormap)); icws.numCmapIDs = xnestListInstalledColormaps(pScreen, icws.cmapIDs); icws.numWindows = 0; WalkTree(pScreen, xnestCountInstalledColormapWindows, (pointer)&icws); if (icws.numWindows) { - icws.windows = (Window *)xalloc((icws.numWindows + 1) * sizeof(Window)); + icws.windows = (Window *)malloc((icws.numWindows + 1) * sizeof(Window)); icws.index = 0; WalkTree(pScreen, xnestGetInstalledColormapWindows, (pointer)&icws); icws.windows[icws.numWindows] = xnestDefaultWindows[pScreen->myNum]; @@ -207,22 +211,21 @@ xnestSetInstalledColormapWindows(ScreenPtr pScreen) numWindows = 0; } - xfree(icws.cmapIDs); + free(icws.cmapIDs); if (!xnestSameInstalledColormapWindows(icws.windows, icws.numWindows)) { - if (xnestOldInstalledColormapWindows) - xfree(xnestOldInstalledColormapWindows); + free(xnestOldInstalledColormapWindows); #ifdef _XSERVER64 { int i; - Window64 *windows = (Window64 *)xalloc(numWindows * sizeof(Window64)); + Window64 *windows = (Window64 *)malloc(numWindows * sizeof(Window64)); for(i = 0; i < numWindows; ++i) windows[i] = icws.windows[i]; XSetWMColormapWindows(xnestDisplay, xnestDefaultWindows[pScreen->myNum], windows, numWindows); - xfree(windows); + free(windows); } #else XSetWMColormapWindows(xnestDisplay, xnestDefaultWindows[pScreen->myNum], @@ -260,14 +263,13 @@ xnestSetInstalledColormapWindows(ScreenPtr pScreen) #endif /* DUMB_WINDOW_MANAGERS */ } else - if (icws.windows) xfree(icws.windows); + free(icws.windows); } void xnestSetScreenSaverColormapWindow(ScreenPtr pScreen) { - if (xnestOldInstalledColormapWindows) - xfree(xnestOldInstalledColormapWindows); + free(xnestOldInstalledColormapWindows); #ifdef _XSERVER64 { @@ -332,11 +334,7 @@ xnestDirectUninstallColormaps(ScreenPtr pScreen) void xnestInstallColormap(ColormapPtr pCmap) { - int index; - ColormapPtr pOldCmap; - - index = pCmap->pScreen->myNum; - pOldCmap = InstalledMaps[index]; + ColormapPtr pOldCmap = GetInstalledColormap(pCmap->pScreen); if(pCmap != pOldCmap) { @@ -346,7 +344,7 @@ xnestInstallColormap(ColormapPtr pCmap) if(pOldCmap != (ColormapPtr)None) WalkTree(pCmap->pScreen, TellLostMap, (pointer)&pOldCmap->mid); - InstalledMaps[index] = pCmap; + SetInstalledColormap(pCmap->pScreen, pCmap); WalkTree(pCmap->pScreen, TellGainedMap, (pointer)&pCmap->mid); xnestSetInstalledColormapWindows(pCmap->pScreen); @@ -357,11 +355,7 @@ xnestInstallColormap(ColormapPtr pCmap) void xnestUninstallColormap(ColormapPtr pCmap) { - int index; - ColormapPtr pCurCmap; - - index = pCmap->pScreen->myNum; - pCurCmap = InstalledMaps[index]; + ColormapPtr pCurCmap = GetInstalledColormap(pCmap->pScreen); if(pCmap == pCurCmap) { @@ -382,7 +376,7 @@ int xnestListInstalledColormaps(ScreenPtr pScreen, Colormap *pCmapIDs) { if (xnestInstalledDefaultColormap) { - *pCmapIDs = InstalledMaps[pScreen->myNum]->mid; + *pCmapIDs = GetInstalledColormap(pScreen)->mid; return 1; } else @@ -396,7 +390,7 @@ xnestStoreColors(ColormapPtr pCmap, int nColors, xColorItem *pColors) #ifdef _XSERVER64 { int i; - XColor *pColors64 = (XColor *)xalloc(nColors * sizeof(XColor) ); + XColor *pColors64 = (XColor *)malloc(nColors * sizeof(XColor) ); for(i = 0; i < nColors; ++i) { @@ -407,7 +401,7 @@ xnestStoreColors(ColormapPtr pCmap, int nColors, xColorItem *pColors) pColors64[i].flags = pColors[i].flags; } XStoreColors(xnestDisplay, xnestColormap(pCmap), pColors64, nColors); - xfree(pColors64); + free(pColors64); } #else XStoreColors(xnestDisplay, xnestColormap(pCmap), @@ -473,6 +467,9 @@ xnestCreateDefaultColormap(ScreenPtr pScreen) unsigned short zero = 0, ones = 0xFFFF; Pixel wp, bp; + if (!dixRegisterPrivateKey(&cmapScrPrivateKeyRec, PRIVATE_SCREEN, 0)) + return FALSE; + for (pVisual = pScreen->visuals; pVisual->vid != pScreen->rootVisual; pVisual++); diff --git a/xserver/hw/xnest/Cursor.c b/xserver/hw/xnest/Cursor.c index d9f5dd6cb..5491ee97b 100644 --- a/xserver/hw/xnest/Cursor.c +++ b/xserver/hw/xnest/Cursor.c @@ -107,7 +107,7 @@ xnestRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) bg_color.green = pCursor->backGreen; bg_color.blue = pCursor->backBlue; - xnestSetCursorPriv(pCursor, pScreen, xalloc(sizeof(xnestPrivCursor))); + xnestSetCursorPriv(pCursor, pScreen, malloc(sizeof(xnestPrivCursor))); xnestCursor(pCursor, pScreen) = XCreatePixmapCursor(xnestDisplay, source, mask, &fg_color, &bg_color, pCursor->bits->xhot, pCursor->bits->yhot); @@ -122,7 +122,7 @@ Bool xnestUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) { XFreeCursor(xnestDisplay, xnestCursor(pCursor, pScreen)); - xfree(xnestGetCursorPriv(pCursor, pScreen)); + free(xnestGetCursorPriv(pCursor, pScreen)); return True; } diff --git a/xserver/hw/xnest/Display.c b/xserver/hw/xnest/Display.c index 01290417c..b78aff597 100644 --- a/xserver/hw/xnest/Display.c +++ b/xserver/hw/xnest/Display.c @@ -101,7 +101,7 @@ xnestOpenDisplay(int argc, char *argv[]) } xnestNumDefaultColormaps = xnestNumVisuals; - xnestDefaultColormaps = (Colormap *)xalloc(xnestNumDefaultColormaps * + xnestDefaultColormaps = (Colormap *)malloc(xnestNumDefaultColormaps * sizeof(Colormap)); for (i = 0; i < xnestNumDefaultColormaps; i++) xnestDefaultColormaps[i] = XCreateColormap(xnestDisplay, @@ -185,7 +185,7 @@ xnestCloseDisplay(void) the display connection. There is no need to generate extra protocol. */ - xfree(xnestDefaultColormaps); + free(xnestDefaultColormaps); XFree(xnestVisuals); XFree(xnestDepths); XFree(xnestPixmapFormats); diff --git a/xserver/hw/xnest/Drawable.h b/xserver/hw/xnest/Drawable.h index d94916ecd..4268b7b83 100644 --- a/xserver/hw/xnest/Drawable.h +++ b/xserver/hw/xnest/Drawable.h @@ -19,7 +19,7 @@ is" without express or implied warranty. #include "XNPixmap.h" #define xnestDrawable(pDrawable) \ - ((pDrawable)->type == DRAWABLE_WINDOW ? \ + (WindowDrawable((pDrawable)->type) ? \ xnestWindow((WindowPtr)pDrawable) : \ xnestPixmap((PixmapPtr)pDrawable)) diff --git a/xserver/hw/xnest/Events.c b/xserver/hw/xnest/Events.c index 277718ba3..62e17cb66 100644 --- a/xserver/hw/xnest/Events.c +++ b/xserver/hw/xnest/Events.c @@ -67,7 +67,7 @@ SetTimeSinceLastInputEvent(void) static Bool xnestExposurePredicate(Display *display, XEvent *event, char *args) { - return (event->type == Expose || event->type == ProcessedExpose); + return event->type == Expose || event->type == ProcessedExpose; } static Bool @@ -93,7 +93,7 @@ xnestCollectExposures(void) Box.x2 = Box.x1 + X.xexpose.width; Box.y2 = Box.y1 + X.xexpose.height; - REGION_INIT(pWin->drawable.pScreen, &Rgn, &Box, 1); + RegionInit(&Rgn, &Box, 1); miSendExposures(pWin, &Rgn, Box.x2, Box.y2); } diff --git a/xserver/hw/xnest/Font.c b/xserver/hw/xnest/Font.c index 7b388f0f4..f1ccd7e73 100644 --- a/xserver/hw/xnest/Font.c +++ b/xserver/hw/xnest/Font.c @@ -62,7 +62,7 @@ xnestRealizeFont(ScreenPtr pScreen, FontPtr pFont) if (!name) return False; - priv = (pointer)xalloc(sizeof(xnestPrivFont)); + priv = (pointer)malloc(sizeof(xnestPrivFont)); FontSetPrivate(pFont, xnestFontPrivateIndex, priv); xnestFontPriv(pFont)->font_struct = XLoadQueryFont(xnestDisplay, name); @@ -79,7 +79,7 @@ xnestUnrealizeFont(ScreenPtr pScreen, FontPtr pFont) if (xnestFontPriv(pFont)) { if (xnestFontStruct(pFont)) XFreeFont(xnestDisplay, xnestFontStruct(pFont)); - xfree(xnestFontPriv(pFont)); + free(xnestFontPriv(pFont)); FontSetPrivate(pFont, xnestFontPrivateIndex, NULL); } return True; diff --git a/xserver/hw/xnest/GC.c b/xserver/hw/xnest/GC.c index 65425e98f..2761583ec 100644 --- a/xserver/hw/xnest/GC.c +++ b/xserver/hw/xnest/GC.c @@ -35,8 +35,7 @@ is" without express or implied warranty. #include "XNFont.h" #include "Color.h" -static int xnestGCPrivateKeyIndex; -DevPrivateKey xnestGCPrivateKey = &xnestGCPrivateKeyIndex; +DevPrivateKeyRec xnestGCPrivateKeyRec; static GCFuncs xnestFuncs = { xnestValidateGC, @@ -210,10 +209,10 @@ xnestChangeClip(GCPtr pGC, int type, pointer pValue, int nRects) break; case CT_REGION: - nRects = REGION_NUM_RECTS((RegionPtr)pValue); + nRects = RegionNumRects((RegionPtr)pValue); size = nRects * sizeof(*pRects); - pRects = (XRectangle *) xalloc(size); - pBox = REGION_RECTS((RegionPtr)pValue); + pRects = (XRectangle *) malloc(size); + pBox = RegionRects((RegionPtr)pValue); for (i = nRects; i-- > 0; ) { pRects[i].x = pBox[i].x1; pRects[i].y = pBox[i].y1; @@ -222,7 +221,7 @@ xnestChangeClip(GCPtr pGC, int type, pointer pValue, int nRects) } XSetClipRectangles(xnestDisplay, xnestGC(pGC), 0, 0, pRects, nRects, Unsorted); - xfree((char *) pRects); + free((char *) pRects); break; case CT_PIXMAP: @@ -277,9 +276,9 @@ 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) RECTS_TO_REGION(pGC->pScreen, nRects, + pGC->clientClip = (pointer) RegionFromRects(nRects, (xRectangle *)pValue, type); - xfree(pValue); + free(pValue); pValue = pGC->clientClip; type = CT_REGION; @@ -313,7 +312,7 @@ xnestDestroyClipHelper(GCPtr pGC) break; case CT_REGION: - REGION_DESTROY(pGC->pScreen, pGC->clientClip); + RegionDestroy(pGC->clientClip); break; } } @@ -331,8 +330,8 @@ xnestCopyClip(GCPtr pGCDst, GCPtr pGCSrc) break; case CT_REGION: - pRgn = REGION_CREATE(pGCDst->pScreen, NULL, 1); - REGION_COPY(pGCDst->pScreen, pRgn, pGCSrc->clientClip); + pRgn = RegionCreate(NULL, 1); + RegionCopy(pRgn, pGCSrc->clientClip); xnestChangeClip(pGCDst, CT_REGION, pRgn, 0); break; } diff --git a/xserver/hw/xnest/GCOps.c b/xserver/hw/xnest/GCOps.c index ad9668ec1..829b86b2b 100644 --- a/xserver/hw/xnest/GCOps.c +++ b/xserver/hw/xnest/GCOps.c @@ -117,7 +117,7 @@ xnestGetImage(DrawablePtr pDrawable, int x, int y, int w, int h, static Bool xnestBitBlitPredicate(Display *display, XEvent *event, char *args) { - return (event->type == GraphicsExpose || event->type == NoExpose); + return event->type == GraphicsExpose || event->type == NoExpose; } static RegionPtr @@ -131,8 +131,8 @@ xnestBitBlitHelper(GCPtr pGC) BoxRec Box; Bool pending, overlap; - pReg = REGION_CREATE(pGC->pScreen, NULL, 1); - pTmpReg = REGION_CREATE(pGC->pScreen, NULL, 1); + pReg = RegionCreate(NULL, 1); + pTmpReg = RegionCreate(NULL, 1); if(!pReg || !pTmpReg) return NullRegion; pending = True; @@ -149,16 +149,16 @@ xnestBitBlitHelper(GCPtr pGC) Box.y1 = event.xgraphicsexpose.y; Box.x2 = event.xgraphicsexpose.x + event.xgraphicsexpose.width; Box.y2 = event.xgraphicsexpose.y + event.xgraphicsexpose.height; - REGION_RESET(pGC->pScreen, pTmpReg, &Box); - REGION_APPEND(pGC->pScreen, pReg, pTmpReg); + RegionReset(pTmpReg, &Box); + RegionAppend(pReg, pTmpReg); pending = event.xgraphicsexpose.count; break; } } - REGION_DESTROY(pGC->pScreen, pTmpReg); - REGION_VALIDATE(pGC->pScreen, pReg, &overlap); - return(pReg); + RegionDestroy(pTmpReg); + RegionValidate(pReg, &overlap); + return pReg; } } diff --git a/xserver/hw/xnest/Keyboard.c b/xserver/hw/xnest/Keyboard.c index 1835c7071..ec629dcaf 100644 --- a/xserver/hw/xnest/Keyboard.c +++ b/xserver/hw/xnest/Keyboard.c @@ -136,7 +136,7 @@ xnestKeyboardProc(DeviceIntPtr pDev, int onoff) max_keycode - min_keycode + 1, &mapWidth); len = (max_keycode - min_keycode + 1) * mapWidth; - keymap = (KeySym *)xalloc(len * sizeof(KeySym)); + keymap = (KeySym *)malloc(len * sizeof(KeySym)); for(i = 0; i < len; ++i) keymap[i] = keymap64[i]; XFree(keymap64); @@ -168,7 +168,7 @@ xnestKeyboardProc(DeviceIntPtr pDev, int onoff) xnestBell, xnestChangeKeyboardControl); XkbDDXChangeControls(pDev, xkb->ctrls, xkb->ctrls); XkbFreeKeyboard(xkb, 0, False); - xfree(keymap); + free(keymap); break; case DEVICE_ON: xnestEventMask |= XNEST_KEYBOARD_EVENT_MASK; @@ -193,7 +193,7 @@ XkbError: InitKeyboardDeviceStruct(pDev, NULL, xnestBell, xnestChangeKeyboardControl); - xfree(keymap); + free(keymap); return Success; } @@ -231,13 +231,7 @@ xnestUpdateModifierState(unsigned int state) for (key = 0; key < MAP_LENGTH; key++) if (keyc->xkbInfo->desc->map->modmap[key] & mask) { - int bit; - BYTE *kptr; - - kptr = &keyc->down[key >> 3]; - bit = 1 << (key & 7); - - if (*kptr & bit) + if (key_is_down(pDev, key, KEY_PROCESSED)) xnestQueueKeyEvent(KeyRelease, key); if (--count == 0) diff --git a/xserver/hw/xnest/Makefile.in b/xserver/hw/xnest/Makefile.in index 5ba579cab..18b45f677 100644 --- a/xserver/hw/xnest/Makefile.in +++ b/xserver/hw/xnest/Makefile.in @@ -138,10 +138,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -229,6 +225,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -243,6 +241,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -260,10 +259,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -319,10 +322,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -340,17 +344,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -377,20 +375,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -482,6 +483,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/xnest/Pixmap.c b/xserver/hw/xnest/Pixmap.c index 676a2ba95..3a92ffde8 100644 --- a/xserver/hw/xnest/Pixmap.c +++ b/xserver/hw/xnest/Pixmap.c @@ -33,8 +33,7 @@ is" without express or implied warranty. #include "Screen.h" #include "XNPixmap.h" -static int xnestPixmapPrivateKeyIndex; -DevPrivateKey xnestPixmapPrivateKey = &xnestPixmapPrivateKeyIndex; +DevPrivateKeyRec xnestPixmapPrivateKeyRec; PixmapPtr xnestCreatePixmap(ScreenPtr pScreen, int width, int height, int depth, @@ -42,7 +41,7 @@ xnestCreatePixmap(ScreenPtr pScreen, int width, int height, int depth, { PixmapPtr pPixmap; - pPixmap = AllocatePixmap(pScreen, sizeof(xnestPrivPixmap)); + pPixmap = AllocatePixmap(pScreen, 0); if (!pPixmap) return NullPixmap; pPixmap->drawable.type = DRAWABLE_PIXMAP; @@ -59,8 +58,6 @@ xnestCreatePixmap(ScreenPtr pScreen, int width, int height, int depth, pPixmap->refcnt = 1; pPixmap->devKind = PixmapBytePad(width, depth); pPixmap->usage_hint = usage_hint; - dixSetPrivate(&pPixmap->devPrivates, xnestPixmapPrivateKey, - (char *)pPixmap + pScreen->totalPixmapSize); if (width && height) xnestPixmapPriv(pPixmap)->pixmap = XCreatePixmap(xnestDisplay, @@ -78,8 +75,7 @@ xnestDestroyPixmap(PixmapPtr pPixmap) if(--pPixmap->refcnt) return TRUE; XFreePixmap(xnestDisplay, xnestPixmap(pPixmap)); - dixFreePrivates(pPixmap->devPrivates); - xfree(pPixmap); + FreePixmap(pPixmap); return TRUE; } @@ -97,8 +93,8 @@ xnestPixmapToRegion(PixmapPtr pPixmap) pPixmap->drawable.width, pPixmap->drawable.height, 1, XYPixmap); - pReg = REGION_CREATE(pPixmap->drawable.pScreen, NULL, 1); - pTmpReg = REGION_CREATE(pPixmap->drawable.pScreen, NULL, 1); + pReg = RegionCreate(NULL, 1); + pTmpReg = RegionCreate(NULL, 1); if(!pReg || !pTmpReg) { XDestroyImage(ximage); return NullRegion; @@ -118,8 +114,8 @@ xnestPixmapToRegion(PixmapPtr pPixmap) else if (currentPixel == 0L) { /* right edge */ Box.x2 = x; - REGION_RESET(pPixmap->drawable.pScreen, pTmpReg, &Box); - REGION_APPEND(pPixmap->drawable.pScreen, pReg, pTmpReg); + RegionReset(pTmpReg, &Box); + RegionAppend(pReg, pTmpReg); } previousPixel = currentPixel; } @@ -127,15 +123,15 @@ xnestPixmapToRegion(PixmapPtr pPixmap) if (previousPixel != 0L) { /* right edge because of the end of pixmap */ Box.x2 = pPixmap->drawable.width; - REGION_RESET(pPixmap->drawable.pScreen, pTmpReg, &Box); - REGION_APPEND(pPixmap->drawable.pScreen, pReg, pTmpReg); + RegionReset(pTmpReg, &Box); + RegionAppend(pReg, pTmpReg); } } - REGION_DESTROY(pPixmap->drawable.pScreen, pTmpReg); + RegionDestroy(pTmpReg); XDestroyImage(ximage); - REGION_VALIDATE(pPixmap->drawable.pScreen, pReg, &overlap); + RegionValidate(pReg, &overlap); - return(pReg); + return pReg; } diff --git a/xserver/hw/xnest/Screen.c b/xserver/hw/xnest/Screen.c index ca903d7ac..957fe4cdb 100644 --- a/xserver/hw/xnest/Screen.c +++ b/xserver/hw/xnest/Screen.c @@ -45,8 +45,7 @@ is" without express or implied warranty. Window xnestDefaultWindows[MAXSCREENS]; Window xnestScreenSaverWindows[MAXSCREENS]; -static int xnestCursorScreenKeyIndex; -DevPrivateKey xnestCursorScreenKey = &xnestCursorScreenKeyIndex; +DevPrivateKeyRec xnestCursorScreenKeyRec; ScreenPtr xnestScreen(Window window) @@ -146,18 +145,22 @@ xnestOpenScreen(int index, ScreenPtr pScreen, int argc, char *argv[]) int rootDepth; miPointerScreenPtr PointPriv; - if (!dixRequestPrivate(xnestWindowPrivateKey, sizeof(xnestPrivWin))) - return False; - if (!dixRequestPrivate(xnestGCPrivateKey, sizeof(xnestPrivGC))) - return False; + if (!dixRegisterPrivateKey(&xnestWindowPrivateKeyRec, PRIVATE_WINDOW, sizeof(xnestPrivWin))) + return FALSE; + if (!dixRegisterPrivateKey(&xnestGCPrivateKeyRec, PRIVATE_GC, sizeof(xnestPrivGC))) + return FALSE; + if (!dixRegisterPrivateKey(&xnestPixmapPrivateKeyRec, PRIVATE_PIXMAP, sizeof (xnestPrivPixmap))) + return FALSE; + if (!dixRegisterPrivateKey(&xnestCursorScreenKeyRec, PRIVATE_SCREEN, 0)) + return FALSE; - visuals = (VisualPtr)xalloc(xnestNumVisuals * sizeof(VisualRec)); + visuals = (VisualPtr)malloc(xnestNumVisuals * sizeof(VisualRec)); numVisuals = 0; - depths = (DepthPtr)xalloc(MAXDEPTH * sizeof(DepthRec)); + depths = (DepthPtr)malloc(MAXDEPTH * sizeof(DepthRec)); depths[0].depth = 1; depths[0].numVids = 0; - depths[0].vids = (VisualID *)xalloc(MAXVISUALSPERDEPTH * sizeof(VisualID)); + depths[0].vids = (VisualID *)malloc(MAXVISUALSPERDEPTH * sizeof(VisualID)); numDepths = 1; for (i = 0; i < xnestNumVisuals; i++) { @@ -203,7 +206,7 @@ xnestOpenScreen(int index, ScreenPtr pScreen, int argc, char *argv[]) depths[depthIndex].depth = xnestVisuals[i].depth; depths[depthIndex].numVids = 0; depths[depthIndex].vids = - (VisualID *)xalloc(MAXVISUALSPERDEPTH * sizeof(VisualID)); + (VisualID *)malloc(MAXVISUALSPERDEPTH * sizeof(VisualID)); numDepths++; } if (depths[depthIndex].numVids >= MAXVISUALSPERDEPTH) { @@ -215,7 +218,7 @@ xnestOpenScreen(int index, ScreenPtr pScreen, int argc, char *argv[]) numVisuals++; } - visuals = (VisualPtr)xrealloc(visuals, numVisuals * sizeof(VisualRec)); + visuals = (VisualPtr)realloc(visuals, numVisuals * sizeof(VisualRec)); defaultVisual = visuals[xnestDefaultVisualIndex].vid; rootDepth = visuals[xnestDefaultVisualIndex].nplanes; @@ -243,7 +246,6 @@ xnestOpenScreen(int index, ScreenPtr pScreen, int argc, char *argv[]) pScreen->saveUnderSupport = NotUseful; pScreen->whitePixel = xnestWhitePixel; pScreen->blackPixel = xnestBlackPixel; - /* rgf */ /* GCperDepth */ /* PixmapPerDepth */ pScreen->devPrivate = NULL; @@ -260,7 +262,6 @@ xnestOpenScreen(int index, ScreenPtr pScreen, int argc, char *argv[]) pScreen->SaveScreen = xnestSaveScreen; pScreen->GetImage = xnestGetImage; pScreen->GetSpans = xnestGetSpans; - pScreen->PointerNonInterestBox = NULL; pScreen->SourceValidate = NULL; /* Window Procedures */ @@ -407,10 +408,10 @@ xnestCloseScreen(int index, ScreenPtr pScreen) int i; for (i = 0; i < pScreen->numDepths; i++) - xfree(pScreen->allowedDepths[i].vids); - xfree(pScreen->allowedDepths); - xfree(pScreen->visuals); - xfree(pScreen->devPrivate); + free(pScreen->allowedDepths[i].vids); + free(pScreen->allowedDepths); + free(pScreen->visuals); + free(pScreen->devPrivate); /* If xnestDoFullGeneration all x resources will be destroyed upon closing diff --git a/xserver/hw/xnest/Window.c b/xserver/hw/xnest/Window.c index 48c870fac..9ed69ed74 100644 --- a/xserver/hw/xnest/Window.c +++ b/xserver/hw/xnest/Window.c @@ -39,8 +39,7 @@ is" without express or implied warranty. #include "Events.h" #include "Args.h" -static int xnestWindowPrivateKeyIndex; -DevPrivateKey xnestWindowPrivateKey = &xnestWindowPrivateKeyIndex; +DevPrivateKeyRec xnestWindowPrivateKeyRec; static int xnestFindWindowMatch(WindowPtr pWin, pointer ptr) @@ -135,9 +134,9 @@ xnestCreateWindow(WindowPtr pWin) if (pWin->nextSib) xnestWindowPriv(pWin->nextSib)->sibling_above = xnestWindow(pWin); xnestWindowPriv(pWin)->bounding_shape = - REGION_CREATE(pWin->drawable.pScreen, NULL, 1); + RegionCreate(NULL, 1); xnestWindowPriv(pWin)->clip_shape = - REGION_CREATE(pWin->drawable.pScreen, NULL, 1); + RegionCreate(NULL, 1); if (!pWin->parent) /* only the root window will have the right colormap */ xnestSetInstalledColormapWindows(pWin->drawable.pScreen); @@ -151,10 +150,8 @@ xnestDestroyWindow(WindowPtr pWin) if (pWin->nextSib) xnestWindowPriv(pWin->nextSib)->sibling_above = xnestWindowPriv(pWin)->sibling_above; - REGION_DESTROY(pWin->drawable.pScreen, - xnestWindowPriv(pWin)->bounding_shape); - REGION_DESTROY(pWin->drawable.pScreen, - xnestWindowPriv(pWin)->clip_shape); + RegionDestroy(xnestWindowPriv(pWin)->bounding_shape); + RegionDestroy(xnestWindowPriv(pWin)->clip_shape); XDestroyWindow(xnestDisplay, xnestWindow(pWin)); xnestWindowPriv(pWin)->window = None; @@ -415,7 +412,7 @@ xnestWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_exposed) event.xexpose.type = ProcessedExpose; - if (RECT_IN_REGION(pWin->drawable.pScreen, pRgn, &Box) != rgnIN) + if (RegionContainsRect(pRgn, &Box) != rgnIN) XPutBackEvent(xnestDisplay, &event); } @@ -423,10 +420,10 @@ xnestWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_exposed) } void -xnestSetShape(WindowPtr pWin) +xnestSetShape(WindowPtr pWin, int kind) { xnestShapeWindow(pWin); - miSetShape(pWin); + miSetShape(pWin, kind); } static Bool @@ -439,11 +436,11 @@ xnestRegionEqual(RegionPtr pReg1, RegionPtr pReg2) if (pReg1 == NullRegion || pReg2 == NullRegion) return False; - pBox1 = REGION_RECTS(pReg1); - n1 = REGION_NUM_RECTS(pReg1); + pBox1 = RegionRects(pReg1); + n1 = RegionNumRects(pReg1); - pBox2 = REGION_RECTS(pReg2); - n2 = REGION_NUM_RECTS(pReg2); + pBox2 = RegionRects(pReg2); + n2 = RegionNumRects(pReg2); if (n1 != n2) return False; @@ -466,13 +463,12 @@ xnestShapeWindow(WindowPtr pWin) wBoundingShape(pWin))) { if (wBoundingShape(pWin)) { - REGION_COPY(pWin->drawable.pScreen, - xnestWindowPriv(pWin)->bounding_shape, wBoundingShape(pWin)); + RegionCopy(xnestWindowPriv(pWin)->bounding_shape, wBoundingShape(pWin)); reg = XCreateRegion(); - pBox = REGION_RECTS(xnestWindowPriv(pWin)->bounding_shape); + pBox = RegionRects(xnestWindowPriv(pWin)->bounding_shape); for (i = 0; - i < REGION_NUM_RECTS(xnestWindowPriv(pWin)->bounding_shape); + i < RegionNumRects(xnestWindowPriv(pWin)->bounding_shape); i++) { rect.x = pBox[i].x1; rect.y = pBox[i].y1; @@ -485,8 +481,7 @@ xnestShapeWindow(WindowPtr pWin) XDestroyRegion(reg); } else { - REGION_EMPTY(pWin->drawable.pScreen, - xnestWindowPriv(pWin)->bounding_shape); + RegionEmpty(xnestWindowPriv(pWin)->bounding_shape); XShapeCombineMask(xnestDisplay, xnestWindow(pWin), ShapeBounding, 0, 0, None, ShapeSet); @@ -497,13 +492,12 @@ xnestShapeWindow(WindowPtr pWin) wClipShape(pWin))) { if (wClipShape(pWin)) { - REGION_COPY(pWin->drawable.pScreen, - xnestWindowPriv(pWin)->clip_shape, wClipShape(pWin)); + RegionCopy(xnestWindowPriv(pWin)->clip_shape, wClipShape(pWin)); reg = XCreateRegion(); - pBox = REGION_RECTS(xnestWindowPriv(pWin)->clip_shape); + pBox = RegionRects(xnestWindowPriv(pWin)->clip_shape); for (i = 0; - i < REGION_NUM_RECTS(xnestWindowPriv(pWin)->clip_shape); + i < RegionNumRects(xnestWindowPriv(pWin)->clip_shape); i++) { rect.x = pBox[i].x1; rect.y = pBox[i].y1; @@ -516,8 +510,7 @@ xnestShapeWindow(WindowPtr pWin) XDestroyRegion(reg); } else { - REGION_EMPTY(pWin->drawable.pScreen, - xnestWindowPriv(pWin)->clip_shape); + RegionEmpty(xnestWindowPriv(pWin)->clip_shape); XShapeCombineMask(xnestDisplay, xnestWindow(pWin), ShapeClip, 0, 0, None, ShapeSet); diff --git a/xserver/hw/xnest/XNCursor.h b/xserver/hw/xnest/XNCursor.h index ab2c3b1e6..d3b18bd3a 100644 --- a/xserver/hw/xnest/XNCursor.h +++ b/xserver/hw/xnest/XNCursor.h @@ -21,7 +21,8 @@ typedef struct { miPointerSpriteFuncPtr spriteFuncs; } xnestCursorFuncRec, *xnestCursorFuncPtr; -extern DevPrivateKey xnestCursorScreenKey; +extern DevPrivateKeyRec xnestCursorScreenKeyRec; +#define xnestCursorScreenKey (&xnestCursorScreenKeyRec) extern xnestCursorFuncRec xnestCursorFuncs; typedef struct { diff --git a/xserver/hw/xnest/XNGC.h b/xserver/hw/xnest/XNGC.h index 19535fe3a..9f1045611 100644 --- a/xserver/hw/xnest/XNGC.h +++ b/xserver/hw/xnest/XNGC.h @@ -22,7 +22,8 @@ typedef struct { int nClipRects; } xnestPrivGC; -extern DevPrivateKey xnestGCPrivateKey; +extern DevPrivateKeyRec xnestGCPrivateKeyRec; +#define xnestGCPrivateKey (&xnestGCPrivateKeyRec) #define xnestGCPriv(pGC) ((xnestPrivGC *) \ dixLookupPrivate(&(pGC)->devPrivates, xnestGCPrivateKey)) diff --git a/xserver/hw/xnest/XNPixmap.h b/xserver/hw/xnest/XNPixmap.h index 614827587..aa671ed1f 100644 --- a/xserver/hw/xnest/XNPixmap.h +++ b/xserver/hw/xnest/XNPixmap.h @@ -15,7 +15,8 @@ is" without express or implied warranty. #ifndef XNESTPIXMAP_H #define XNESTPIXMAP_H -extern DevPrivateKey xnestPixmapPrivateKey; +extern DevPrivateKeyRec xnestPixmapPrivateKeyRec; +#define xnestPixmapPrivateKey (&xnestPixmapPrivateKeyRec) typedef struct { Pixmap pixmap; diff --git a/xserver/hw/xnest/XNWindow.h b/xserver/hw/xnest/XNWindow.h index b59d86a97..f4d8fc7d6 100644 --- a/xserver/hw/xnest/XNWindow.h +++ b/xserver/hw/xnest/XNWindow.h @@ -33,7 +33,8 @@ typedef struct { Window window; } xnestWindowMatch; -extern DevPrivateKey xnestWindowPrivateKey; +extern DevPrivateKeyRec xnestWindowPrivateKeyRec; +#define xnestWindowPrivateKey (&xnestWindowPrivateKeyRec) #define xnestWindowPriv(pWin) ((xnestPrivWin *) \ dixLookupPrivate(&(pWin)->devPrivates, xnestWindowPrivateKey)) @@ -66,7 +67,7 @@ void xnestCopyWindow(WindowPtr pWin, xPoint oldOrigin, RegionPtr oldRegion); void xnestClipNotify(WindowPtr pWin, int dx, int dy); void xnestWindowExposures(WindowPtr pWin, RegionPtr pRgn, RegionPtr other_exposed); -void xnestSetShape(WindowPtr pWin); +void xnestSetShape(WindowPtr pWin, int kind); void xnestShapeWindow(WindowPtr pWin); #endif /* XNESTWINDOW_H */ diff --git a/xserver/hw/xquartz/GL/Makefile.in b/xserver/hw/xquartz/GL/Makefile.in index 9987c2e18..4e1872ff2 100644 --- a/xserver/hw/xquartz/GL/Makefile.in +++ b/xserver/hw/xquartz/GL/Makefile.in @@ -108,10 +108,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -199,6 +195,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -213,6 +211,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -230,10 +229,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -289,10 +292,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -310,17 +314,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -347,20 +345,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -452,6 +453,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/xquartz/GL/glcontextmodes.c b/xserver/hw/xquartz/GL/glcontextmodes.c index 326c8b235..eee7103ae 100644 --- a/xserver/hw/xquartz/GL/glcontextmodes.c +++ b/xserver/hw/xquartz/GL/glcontextmodes.c @@ -53,14 +53,14 @@ # ifdef XFree86Server # include # include -# define _mesa_malloc(b) xalloc(b) -# define _mesa_free(m) xfree(m) +# define _mesa_malloc(b) malloc(b) +# define _mesa_free(m) free(m) # define _mesa_memset memset # else # include # define _mesa_memset memset # define _mesa_malloc(b) Xmalloc(b) -# define _mesa_free(m) Xfree(m) +# define _mesa_free(m) free(m) # endif /* XFree86Server */ #endif /* !defined(IN_MINI_GLX) */ diff --git a/xserver/hw/xquartz/GL/indirect.c b/xserver/hw/xquartz/GL/indirect.c index ad9ebbdac..58f78fb80 100644 --- a/xserver/hw/xquartz/GL/indirect.c +++ b/xserver/hw/xquartz/GL/indirect.c @@ -169,7 +169,7 @@ void warn_func(void * p1, char *format, ...); // some prototypes static __GLXscreen * __glXAquaScreenProbe(ScreenPtr pScreen); -static __GLXdrawable * __glXAquaScreenCreateDrawable(__GLXscreen *screen, DrawablePtr pDraw, int type, XID drawId, __GLXconfig *conf); +static __GLXdrawable * __glXAquaScreenCreateDrawable(ClientPtr client, __GLXscreen *screen, DrawablePtr pDraw, XID drawId, int type, XID glxDrawId, __GLXconfig *conf); static void __glXAquaContextDestroy(__GLXcontext *baseContext); static int __glXAquaContextMakeCurrent(__GLXcontext *baseContext); @@ -222,7 +222,7 @@ __glXAquaScreenCreateContext(__GLXscreen *screen, GLAQUA_DEBUG_MSG("glXAquaScreenCreateContext\n"); - context = xcalloc(1, sizeof (__GLXAquaContext)); + context = calloc(1, sizeof (__GLXAquaContext)); if (context == NULL) return NULL; @@ -241,7 +241,7 @@ __glXAquaScreenCreateContext(__GLXscreen *screen, context->pixelFormat = makeFormat(conf); if (!context->pixelFormat) { - xfree(context); + free(context); return NULL; } @@ -253,7 +253,7 @@ __glXAquaScreenCreateContext(__GLXscreen *screen, if (gl_err != 0) { ErrorF("CGLCreateContext error: %s\n", CGLErrorString(gl_err)); CGLDestroyPixelFormat(context->pixelFormat); - xfree(context); + free(context); return NULL; } @@ -271,8 +271,7 @@ static void __glXAquaContextDestroy(__GLXcontext *baseContext) { __GLXAquaContext *context = (__GLXAquaContext *) baseContext; - GLAQUA_DEBUG_MSG("glAquaContextDestroy (ctx 0x%x)\n", - (unsigned int) baseContext); + GLAQUA_DEBUG_MSG("glAquaContextDestroy (ctx %p)\n", baseContext); if (context != NULL) { if (context->sid != 0 && surface_hash != NULL) { lst = x_hash_table_lookup(surface_hash, x_cvt_uint_to_vptr(context->sid), NULL); @@ -286,7 +285,7 @@ static void __glXAquaContextDestroy(__GLXcontext *baseContext) { if (context->pixelFormat != NULL) CGLDestroyPixelFormat(context->pixelFormat); - xfree(context); + free(context); } } @@ -321,7 +320,7 @@ static void surface_notify(void *_arg, void *data) { case AppleDRISurfaceNotifyDestroyed: if (surface_hash != NULL) x_hash_table_remove(surface_hash, x_cvt_uint_to_vptr(arg->id)); - draw->base.pDraw = NULL; + draw->pDraw = NULL; draw->sid = 0; break; @@ -566,7 +565,7 @@ static void __glXAquaScreenDestroy(__GLXscreen *screen) { GLAQUA_DEBUG_MSG("glXAquaScreenDestroy(%p)\n", screen); __glXScreenDestroy(screen); - xfree(screen); + free(screen); } /* This is called by __glXInitScreens(). */ @@ -578,7 +577,7 @@ static __GLXscreen * __glXAquaScreenProbe(ScreenPtr pScreen) { if (pScreen == NULL) return NULL; - screen = xcalloc(1, sizeof *screen); + screen = calloc(1, sizeof *screen); if(NULL == screen) return NULL; @@ -595,12 +594,12 @@ static __GLXscreen * __glXAquaScreenProbe(ScreenPtr pScreen) { __glXScreenInit(&screen->base, pScreen); - screen->base.GLXversion = xstrdup("1.4"); - screen->base.GLXextensions = xstrdup("GLX_SGIX_fbconfig " - "GLX_SGIS_multisample " - "GLX_ARB_multisample " - "GLX_EXT_visual_info " - "GLX_EXT_import_context "); + screen->base.GLXversion = strdup("1.4"); + screen->base.GLXextensions = strdup("GLX_SGIX_fbconfig " + "GLX_SGIS_multisample " + "GLX_ARB_multisample " + "GLX_EXT_visual_info " + "GLX_EXT_import_context "); /*We may be able to add more GLXextensions at a later time. */ @@ -635,26 +634,28 @@ static void __glXAquaDrawableDestroy(__GLXdrawable *base) { *to validate the test, beyond using gdb with print. */ - xfree(glxPriv); + free(glxPriv); } static __GLXdrawable * -__glXAquaScreenCreateDrawable(__GLXscreen *screen, +__glXAquaScreenCreateDrawable(ClientPtr client, + __GLXscreen *screen, DrawablePtr pDraw, - int type, XID drawId, + int type, + XID glxDrawId, __GLXconfig *conf) { __GLXAquaDrawable *glxPriv; - glxPriv = xalloc(sizeof *glxPriv); + glxPriv = malloc(sizeof *glxPriv); if(glxPriv == NULL) return NULL; memset(glxPriv, 0, sizeof *glxPriv); - if(!__glXDrawableInit(&glxPriv->base, screen, pDraw, type, drawId, conf)) { - xfree(glxPriv); + if(!__glXDrawableInit(&glxPriv->base, screen, pDraw, type, glxDrawId, conf)) { + free(glxPriv); return NULL; } diff --git a/xserver/hw/xquartz/GL/visualConfigs.c b/xserver/hw/xquartz/GL/visualConfigs.c index cecc90265..b209b7656 100644 --- a/xserver/hw/xquartz/GL/visualConfigs.c +++ b/xserver/hw/xquartz/GL/visualConfigs.c @@ -115,7 +115,7 @@ __GLXconfig *__glXAquaCreateVisualConfigs(int *numConfigsPtr, int screenNumber) if(numConfigsPtr) *numConfigsPtr = numConfigs; - visualConfigs = xcalloc(sizeof(*visualConfigs), numConfigs); + visualConfigs = calloc(sizeof(*visualConfigs), numConfigs); if(NULL == visualConfigs) { ErrorF("xcalloc failure when allocating visualConfigs\n"); diff --git a/xserver/hw/xquartz/Makefile.am b/xserver/hw/xquartz/Makefile.am index 96b139f97..721d2725e 100644 --- a/xserver/hw/xquartz/Makefile.am +++ b/xserver/hw/xquartz/Makefile.am @@ -34,6 +34,7 @@ libXquartz_la_SOURCES = \ quartzCocoa.m \ quartzKeyboard.c \ quartzStartup.c \ + quartzRandR.c \ threadSafety.c EXTRA_DIST = \ @@ -49,6 +50,7 @@ EXTRA_DIST = \ quartzAudio.h \ quartzCommon.h \ quartzKeyboard.h \ + quartzRandR.h \ sanitizedCarbon.h \ sanitizedCocoa.h \ threadSafety.h diff --git a/xserver/hw/xquartz/Makefile.in b/xserver/hw/xquartz/Makefile.in index 27f9d901f..b4bb9d8d0 100644 --- a/xserver/hw/xquartz/Makefile.in +++ b/xserver/hw/xquartz/Makefile.in @@ -59,7 +59,7 @@ am_libXquartz_la_OBJECTS = fbcmap_mi.lo miinitext.lo X11Application.lo \ X11Controller.lo applewm.lo darwin.lo darwinEvents.lo \ darwinXinput.lo keysym2ucs.lo pseudoramiX.lo quartz.lo \ quartzAudio.lo quartzCocoa.lo quartzKeyboard.lo \ - quartzStartup.lo threadSafety.lo + quartzStartup.lo quartzRandR.lo threadSafety.lo libXquartz_la_OBJECTS = $(am_libXquartz_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp @@ -123,10 +123,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -214,6 +210,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -228,6 +226,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -245,10 +244,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -304,10 +307,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -325,17 +329,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -362,20 +360,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -467,6 +468,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ @@ -643,6 +645,7 @@ libXquartz_la_SOURCES = \ quartzCocoa.m \ quartzKeyboard.c \ quartzStartup.c \ + quartzRandR.c \ threadSafety.c EXTRA_DIST = \ @@ -658,6 +661,7 @@ EXTRA_DIST = \ quartzAudio.h \ quartzCommon.h \ quartzKeyboard.h \ + quartzRandR.h \ sanitizedCarbon.h \ sanitizedCocoa.h \ threadSafety.h @@ -727,6 +731,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quartzAudio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quartzCocoa.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quartzKeyboard.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quartzRandR.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quartzStartup.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/threadSafety.Plo@am__quote@ diff --git a/xserver/hw/xquartz/X11Application.h b/xserver/hw/xquartz/X11Application.h index ce19e034a..462128464 100644 --- a/xserver/hw/xquartz/X11Application.h +++ b/xserver/hw/xquartz/X11Application.h @@ -75,9 +75,6 @@ void X11ApplicationLaunchClient (const char *cmd); void X11ApplicationMain(int argc, char **argv, char **envp); -extern int X11EnableKeyEquivalents; -extern int quartzHasRoot, quartzEnableRootless, quartzFullscreenMenu; - #define PREFS_APPSMENU "apps_menu" #define PREFS_FAKEBUTTONS "enable_fake_buttons" #define PREFS_SYSBEEP "enable_system_beep" diff --git a/xserver/hw/xquartz/X11Application.m b/xserver/hw/xquartz/X11Application.m index 805ed9933..8f4f23ff3 100644 --- a/xserver/hw/xquartz/X11Application.m +++ b/xserver/hw/xquartz/X11Application.m @@ -38,6 +38,7 @@ #import "X11Application.h" #include "darwin.h" +#include "quartz.h" #include "darwinEvents.h" #include "quartzKeyboard.h" #include "quartz.h" @@ -63,9 +64,6 @@ extern int xpbproxy_run (void); /* Stuck modifier / button state... force release when we context switch */ static NSEventType keyState[NUM_KEYCODES]; -int X11EnableKeyEquivalents = TRUE, quartzFullscreenMenu = FALSE; -int quartzHasRoot = FALSE, quartzEnableRootless = TRUE; - extern Bool noTestExtensions; #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050 @@ -287,23 +285,23 @@ static void message_kit_thread (SEL selector, NSObject *arg) { do_swallow = YES; for_x = NO; #if XPLUGIN_VERSION >= 1 - } else if(X11EnableKeyEquivalents && + } else if(XQuartzEnableKeyEquivalents && xp_is_symbolic_hotkey_event([e eventRef])) { swallow_keycode = [e keyCode]; do_swallow = YES; for_x = NO; #endif - } else if(X11EnableKeyEquivalents && + } else if(XQuartzEnableKeyEquivalents && [[self mainMenu] performKeyEquivalent:e]) { swallow_keycode = [e keyCode]; do_swallow = YES; for_appkit = NO; for_x = NO; - } else if(!quartzEnableRootless + } else if(!XQuartzIsRootless && ([e modifierFlags] & ALL_KEY_MASKS) == (NSCommandKeyMask | NSAlternateKeyMask) && ([e keyCode] == 0 /*a*/ || [e keyCode] == 53 /*Esc*/)) { /* We have this here to force processing fullscreen - * toggle even if X11EnableKeyEquivalents is disabled */ + * toggle even if XQuartzEnableKeyEquivalents is disabled */ swallow_keycode = [e keyCode]; do_swallow = YES; for_x = NO; @@ -337,7 +335,7 @@ static void message_kit_thread (SEL selector, NSObject *arg) { case NSApplicationActivatedEventType: for_x = NO; if ([self modalWindow] == nil) { - BOOL switch_on_activate, ok; + BOOL order_all_windows = YES, workspaces, ok; for_appkit = NO; /* FIXME: hack to avoid having to pass the event to appkit, @@ -347,18 +345,32 @@ static void message_kit_thread (SEL selector, NSObject *arg) { [self activateX:YES]; /* Get the Spaces preference for SwitchOnActivate */ - (void)CFPreferencesAppSynchronize(CFSTR(".GlobalPreferences")); - switch_on_activate = CFPreferencesGetAppBooleanValue(CFSTR("AppleSpacesSwitchOnActivate"), CFSTR(".GlobalPreferences"), &ok); - if(!ok) - switch_on_activate = YES; + (void)CFPreferencesAppSynchronize(CFSTR("com.apple.dock")); + workspaces = CFPreferencesGetAppBooleanValue(CFSTR("workspaces"), CFSTR("com.apple.dock"), &ok); + if (!ok) + workspaces = NO; + + if (workspaces) { + (void)CFPreferencesAppSynchronize(CFSTR(".GlobalPreferences")); + order_all_windows = CFPreferencesGetAppBooleanValue(CFSTR("AppleSpacesSwitchOnActivate"), CFSTR(".GlobalPreferences"), &ok); + if (!ok) + order_all_windows = YES; + } - if ([e data2] & 0x10 && switch_on_activate) // 0x10 is set when we use cmd-tab or the dock icon - DarwinSendDDXEvent(kXquartzBringAllToFront, 0); + /* TODO: In the workspaces && !AppleSpacesSwitchOnActivate case, the windows are ordered + * correctly, but we need to activate the top window on this space if there is + * none active. + * + * If there are no active windows, and there are minimized windows, we should + * be restoring one of them. + */ + if ([e data2] & 0x10) // 0x10 is set when we use cmd-tab or the dock icon + DarwinSendDDXEvent(kXquartzBringAllToFront, 1, order_all_windows); } break; case 18: /* ApplicationDidReactivate */ - if (quartzHasRoot) for_appkit = NO; + if (XQuartzFullscreenVisible) for_appkit = NO; break; case NSApplicationDeactivatedEventType: @@ -408,7 +420,7 @@ static void message_kit_thread (SEL selector, NSObject *arg) { if ([state boolValue]) SetSystemUIMode(kUIModeNormal, 0); else - SetSystemUIMode(kUIModeAllHidden, quartzFullscreenMenu ? kUIOptionAutoShowMenuBar : 0); // kUIModeAllSuppressed or kUIOptionAutoShowMenuBar can be used to allow "mouse-activation" + SetSystemUIMode(kUIModeAllHidden, XQuartzFullscreenMenu ? kUIOptionAutoShowMenuBar : 0); // kUIModeAllSuppressed or kUIOptionAutoShowMenuBar can be used to allow "mouse-activation" } - (void) launch_client:(NSString *)cmd { @@ -706,18 +718,18 @@ static NSMutableArray * cfarray_to_nsarray (CFArrayRef in) { NSString *nsstr; const char *tem; - quartzUseSysBeep = [self prefs_get_boolean:@PREFS_SYSBEEP - default:quartzUseSysBeep]; - quartzEnableRootless = [self prefs_get_boolean:@PREFS_ROOTLESS - default:quartzEnableRootless]; - quartzFullscreenMenu = [self prefs_get_boolean:@PREFS_FULLSCREEN_MENU - default:quartzFullscreenMenu]; - quartzFullscreenDisableHotkeys = ![self prefs_get_boolean:@PREFS_FULLSCREEN_HOTKEYS - default:!quartzFullscreenDisableHotkeys]; + XQuartzUseSysBeep = [self prefs_get_boolean:@PREFS_SYSBEEP + default:XQuartzUseSysBeep]; + XQuartzRootlessDefault = [self prefs_get_boolean:@PREFS_ROOTLESS + default:XQuartzRootlessDefault]; + XQuartzFullscreenMenu = [self prefs_get_boolean:@PREFS_FULLSCREEN_MENU + default:XQuartzFullscreenMenu]; + XQuartzFullscreenDisableHotkeys = ![self prefs_get_boolean:@PREFS_FULLSCREEN_HOTKEYS + default:!XQuartzFullscreenDisableHotkeys]; darwinFakeButtons = [self prefs_get_boolean:@PREFS_FAKEBUTTONS default:darwinFakeButtons]; - quartzOptionSendsAlt = [self prefs_get_boolean:@PREFS_OPTION_SENDS_ALT - default:quartzOptionSendsAlt]; + XQuartzOptionSendsAlt = [self prefs_get_boolean:@PREFS_OPTION_SENDS_ALT + default:XQuartzOptionSendsAlt]; if (darwinFakeButtons) { const char *fake2, *fake3; @@ -745,8 +757,8 @@ static NSMutableArray * cfarray_to_nsarray (CFArrayRef in) { } } - X11EnableKeyEquivalents = [self prefs_get_boolean:@PREFS_KEYEQUIVS - default:X11EnableKeyEquivalents]; + XQuartzEnableKeyEquivalents = [self prefs_get_boolean:@PREFS_KEYEQUIVS + default:XQuartzEnableKeyEquivalents]; darwinSyncKeymap = [self prefs_get_boolean:@PREFS_SYNC_KEYMAP default:darwinSyncKeymap]; @@ -1144,7 +1156,7 @@ static inline int ensure_flag(int flags, int device_independent, int device_depe pDev = darwinTabletCurrent; } - if(!quartzServerVisible && noTestExtensions) { + if(!XQuartzServerVisible && noTestExtensions) { #if defined(XPLUGIN_VERSION) && XPLUGIN_VERSION > 0 /* Older libXplugin (Tiger/"Stock" Leopard) aren't thread safe, so we can't call xp_find_window from the Appkit thread */ xp_window_id wid = 0; @@ -1204,7 +1216,7 @@ static inline int ensure_flag(int flags, int device_independent, int device_depe /* If we're in the background, we need to send a MotionNotify event * first, since we aren't getting them on background mouse motion */ - if(!quartzServerVisible && noTestExtensions) { + if(!XQuartzServerVisible && noTestExtensions) { bgMouseLocationUpdated = FALSE; DarwinSendPointerEvents(darwinPointer, MotionNotify, 0, location.x, location.y, pressure, tilt.x, tilt.y); diff --git a/xserver/hw/xquartz/X11Controller.m b/xserver/hw/xquartz/X11Controller.m index d66d039b0..13b63664f 100644 --- a/xserver/hw/xquartz/X11Controller.m +++ b/xserver/hw/xquartz/X11Controller.m @@ -609,13 +609,13 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row } - (IBAction) enable_fullscreen_changed:sender { - int value = ![enable_fullscreen intValue]; + XQuartzRootlessDefault = ![enable_fullscreen intValue]; - [enable_fullscreen_menu setEnabled:!value]; + [enable_fullscreen_menu setEnabled:!XQuartzRootlessDefault]; - DarwinSendDDXEvent(kXquartzSetRootless, 1, value); + DarwinSendDDXEvent(kXquartzSetRootless, 1, XQuartzRootlessDefault); - [NSApp prefs_set_boolean:@PREFS_ROOTLESS value:value]; + [NSApp prefs_set_boolean:@PREFS_ROOTLESS value:XQuartzRootlessDefault]; [NSApp prefs_synchronize]; } @@ -638,24 +638,24 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row darwinFakeButtons = [fake_buttons intValue]; [NSApp prefs_set_boolean:@PREFS_FAKEBUTTONS value:darwinFakeButtons]; } else if(sender == use_sysbeep) { - quartzUseSysBeep = [use_sysbeep intValue]; - [NSApp prefs_set_boolean:@PREFS_SYSBEEP value:quartzUseSysBeep]; + XQuartzUseSysBeep = [use_sysbeep intValue]; + [NSApp prefs_set_boolean:@PREFS_SYSBEEP value:XQuartzUseSysBeep]; } else if(sender == enable_keyequivs) { - X11EnableKeyEquivalents = [enable_keyequivs intValue]; - [NSApp prefs_set_boolean:@PREFS_KEYEQUIVS value:X11EnableKeyEquivalents]; + XQuartzEnableKeyEquivalents = [enable_keyequivs intValue]; + [NSApp prefs_set_boolean:@PREFS_KEYEQUIVS value:XQuartzEnableKeyEquivalents]; } else if(sender == sync_keymap) { darwinSyncKeymap = [sync_keymap intValue]; [NSApp prefs_set_boolean:@PREFS_SYNC_KEYMAP value:darwinSyncKeymap]; } else if(sender == enable_fullscreen_menu) { - quartzFullscreenMenu = [enable_fullscreen_menu intValue]; - [NSApp prefs_set_boolean:@PREFS_FULLSCREEN_MENU value:quartzFullscreenMenu]; + XQuartzFullscreenMenu = [enable_fullscreen_menu intValue]; + [NSApp prefs_set_boolean:@PREFS_FULLSCREEN_MENU value:XQuartzFullscreenMenu]; } else if(sender == option_sends_alt) { - BOOL prev_opt_sends_alt = quartzOptionSendsAlt; + BOOL prev_opt_sends_alt = XQuartzOptionSendsAlt; - quartzOptionSendsAlt = [option_sends_alt intValue]; - [NSApp prefs_set_boolean:@PREFS_OPTION_SENDS_ALT value:quartzOptionSendsAlt]; + XQuartzOptionSendsAlt = [option_sends_alt intValue]; + [NSApp prefs_set_boolean:@PREFS_OPTION_SENDS_ALT value:XQuartzOptionSendsAlt]; - if(prev_opt_sends_alt != quartzOptionSendsAlt) + if(prev_opt_sends_alt != XQuartzOptionSendsAlt) QuartsResyncKeymap(TRUE); } else if(sender == click_through) { [NSApp prefs_set_boolean:@PREFS_CLICK_THROUGH value:[click_through intValue]]; @@ -701,10 +701,10 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row BOOL pbproxy_active = [NSApp prefs_get_boolean:@PREFS_SYNC_PB default:YES]; [fake_buttons setIntValue:darwinFakeButtons]; - [use_sysbeep setIntValue:quartzUseSysBeep]; - [enable_keyequivs setIntValue:X11EnableKeyEquivalents]; + [use_sysbeep setIntValue:XQuartzUseSysBeep]; + [enable_keyequivs setIntValue:XQuartzEnableKeyEquivalents]; [sync_keymap setIntValue:darwinSyncKeymap]; - [option_sends_alt setIntValue:quartzOptionSendsAlt]; + [option_sends_alt setIntValue:XQuartzOptionSendsAlt]; [click_through setIntValue:[NSApp prefs_get_boolean:@PREFS_CLICK_THROUGH default:NO]]; [focus_follows_mouse setIntValue:[NSApp prefs_get_boolean:@PREFS_FFM default:NO]]; [focus_on_new_window setIntValue:[NSApp prefs_get_boolean:@PREFS_FOCUS_ON_NEW_WINDOW default:YES]]; @@ -729,9 +729,9 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row [sync_text1 setTextColor:pbproxy_active ? [NSColor controlTextColor] : [NSColor disabledControlTextColor]]; [sync_text2 setTextColor:pbproxy_active ? [NSColor controlTextColor] : [NSColor disabledControlTextColor]]; - [enable_fullscreen setIntValue:!quartzEnableRootless]; - [enable_fullscreen_menu setEnabled:!quartzEnableRootless]; - [enable_fullscreen_menu setIntValue:quartzFullscreenMenu]; + [enable_fullscreen setIntValue:!XQuartzRootlessDefault]; + [enable_fullscreen_menu setEnabled:!XQuartzRootlessDefault]; + [enable_fullscreen_menu setIntValue:XQuartzFullscreenMenu]; [prefs_panel makeKeyAndOrderFront:sender]; } @@ -752,7 +752,7 @@ objectValueForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row NSMenu *menu = [item menu]; if (item == toggle_fullscreen_item) - return !quartzEnableRootless; + return !XQuartzIsRootless; else if (menu == [X11App windowsMenu] || menu == dock_menu || (menu == [x11_about_item menu] && [item tag] == 42)) return (AppleWMSelectedEvents () & AppleWMControllerNotifyMask) != 0; diff --git a/xserver/hw/xquartz/applewm.c b/xserver/hw/xquartz/applewm.c index 15c86de00..1c77ad984 100644 --- a/xserver/hw/xquartz/applewm.c +++ b/xserver/hw/xquartz/applewm.c @@ -140,10 +140,8 @@ AppleWMSetScreenOrigin( { int32_t data[2]; - data[0] = (dixScreenOrigins[pWin->drawable.pScreen->myNum].x - + darwinMainScreenX); - data[1] = (dixScreenOrigins[pWin->drawable.pScreen->myNum].y - + darwinMainScreenY); + data[0] = pWin->drawable.pScreen->x + darwinMainScreenX; + data[1] = pWin->drawable.pScreen->y + darwinMainScreenY; dixChangeWindowProperty(serverClient, pWin, xa_native_screen_origin(), XA_INTEGER, 32, PropModeReplace, 2, data, TRUE); @@ -192,7 +190,7 @@ ProcAppleWMQueryVersion( swapl(&rep.length, n); } WriteToClient(client, sizeof(xAppleWMQueryVersionReply), (char *)&rep); - return (client->noClientException); + return Success; } @@ -229,7 +227,7 @@ WMFreeClient (pointer data, XID id) { } updateEventMask (pHead); } - xfree ((pointer) pEvent); + free((pointer) pEvent); return 1; } @@ -242,9 +240,9 @@ WMFreeEvents (pointer data, XID id) { for (pCur = *pHead; pCur; pCur = pNext) { pNext = pCur->next; FreeResource (pCur->clientResource, ClientType); - xfree ((pointer) pCur); + free((pointer) pCur); } - xfree ((pointer) pHead); + free((pointer) pHead); eventMask = 0; return 1; } @@ -274,7 +272,7 @@ ProcAppleWMSelectInput (register ClientPtr client) } /* build the entry */ - pNewEvent = (WMEventPtr) xalloc (sizeof (WMEventRec)); + pNewEvent = (WMEventPtr) malloc(sizeof (WMEventRec)); if (!pNewEvent) return BadAlloc; pNewEvent->next = 0; @@ -296,7 +294,7 @@ ProcAppleWMSelectInput (register ClientPtr client) */ if (i != Success || !pHead) { - pHead = (WMEventPtr *) xalloc (sizeof (WMEventPtr)); + pHead = (WMEventPtr *) malloc(sizeof (WMEventPtr)); if (!pHead || !AddResource (eventResource, EventType, (pointer)pHead)) { @@ -323,7 +321,7 @@ ProcAppleWMSelectInput (register ClientPtr client) pNewEvent->next = pEvent->next; else *pHead = pEvent->next; - xfree (pEvent); + free(pEvent); updateEventMask (pHead); } } @@ -341,7 +339,6 @@ ProcAppleWMSelectInput (register ClientPtr client) void AppleWMSendEvent (int type, unsigned int mask, int which, int arg) { WMEventPtr *pHead, pEvent; - ClientPtr client; xAppleWMNotifyEvent se; int i; @@ -349,18 +346,13 @@ AppleWMSendEvent (int type, unsigned int mask, int which, int arg) { if (i != Success || !pHead) return; for (pEvent = *pHead; pEvent; pEvent = pEvent->next) { - client = pEvent->client; - if ((pEvent->mask & mask) == 0 - || client == serverClient || client->clientGone) - { + if ((pEvent->mask & mask) == 0) continue; - } se.type = type + WMEventBase; se.kind = which; se.arg = arg; - se.sequenceNumber = client->sequence; se.time = currentTime.milliseconds; - WriteEventsToClient (client, 1, (xEvent *) &se); + WriteEventsToClient (pEvent->client, 1, (xEvent *) &se); } } @@ -383,7 +375,7 @@ ProcAppleWMDisableUpdate( appleWMProcs->DisableUpdate(); - return (client->noClientException); + return Success; } static int @@ -395,7 +387,7 @@ ProcAppleWMReenableUpdate( appleWMProcs->EnableUpdate(); - return (client->noClientException); + return Success; } @@ -414,8 +406,8 @@ ProcAppleWMSetWindowMenu( REQUEST_AT_LEAST_SIZE(xAppleWMSetWindowMenuReq); nitems = stuff->nitems; - items = xalloc (sizeof (char *) * nitems); - shortcuts = xalloc (sizeof (char) * nitems); + items = malloc(sizeof (char *) * nitems); + shortcuts = malloc(sizeof (char) * nitems); max_len = (stuff->length << 2) - sizeof(xAppleWMSetWindowMenuReq); bytes = (char *) &stuff[1]; @@ -435,7 +427,7 @@ ProcAppleWMSetWindowMenu( free(items); free(shortcuts); - return (client->noClientException); + return Success; } static int @@ -447,7 +439,7 @@ ProcAppleWMSetWindowMenuCheck( REQUEST_SIZE_MATCH(xAppleWMSetWindowMenuCheckReq); X11ApplicationSetWindowMenuCheck(stuff->index); - return (client->noClientException); + return Success; } static int @@ -458,7 +450,7 @@ ProcAppleWMSetFrontProcess( REQUEST_SIZE_MATCH(xAppleWMSetFrontProcessReq); X11ApplicationSetFrontProcess(); - return (client->noClientException); + return Success; } static int @@ -483,7 +475,7 @@ ProcAppleWMSetWindowLevel(register ClientPtr client) return err; } - return (client->noClientException); + return Success; } static int @@ -502,7 +494,7 @@ ProcAppleWMSendPSN(register ClientPtr client) return err; } - return (client->noClientException); + return Success; } static int @@ -532,7 +524,7 @@ ProcAppleWMAttachTransient(register ClientPtr client) return err; } - return (client->noClientException); + return Success; } static int @@ -545,7 +537,7 @@ ProcAppleWMSetCanQuit( REQUEST_SIZE_MATCH(xAppleWMSetCanQuitReq); X11ApplicationSetCanQuit(stuff->state); - return (client->noClientException); + return Success; } @@ -581,7 +573,7 @@ ProcAppleWMFrameGetRect( rep.h = rr.y2 - rr.y1; WriteToClient(client, sizeof(xAppleWMFrameGetRectReply), (char *)&rep); - return (client->noClientException); + return Success; } static int @@ -611,7 +603,7 @@ ProcAppleWMFrameHitTest( rep.ret = ret; WriteToClient(client, sizeof(xAppleWMFrameHitTestReply), (char *)&rep); - return (client->noClientException); + return Success; } static int @@ -649,7 +641,7 @@ ProcAppleWMFrameDraw( return errno; } - return (client->noClientException); + return Success; } diff --git a/xserver/hw/xquartz/bundle/Info.plist.cpp b/xserver/hw/xquartz/bundle/Info.plist.cpp index 91c8c0393..85b439ad4 100644 --- a/xserver/hw/xquartz/bundle/Info.plist.cpp +++ b/xserver/hw/xquartz/bundle/Info.plist.cpp @@ -19,9 +19,9 @@ CFBundlePackageType APPL CFBundleShortVersionString - 2.5.1 + 2.6.0 CFBundleVersion - 2.5.1 + 2.6.0 CFBundleSignature x11a CSResourcesFileMapped diff --git a/xserver/hw/xquartz/bundle/Makefile.in b/xserver/hw/xquartz/bundle/Makefile.in index a5400255f..5aeee9c9a 100644 --- a/xserver/hw/xquartz/bundle/Makefile.in +++ b/xserver/hw/xquartz/bundle/Makefile.in @@ -111,10 +111,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -202,6 +198,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -216,6 +214,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -233,10 +232,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -292,10 +295,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -313,17 +317,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -350,20 +348,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -455,6 +456,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/xquartz/bundle/Resources/Dutch.lproj/locversion.plist b/xserver/hw/xquartz/bundle/Resources/Dutch.lproj/locversion.plist index 4985b9029..b512569f8 100644 --- a/xserver/hw/xquartz/bundle/Resources/Dutch.lproj/locversion.plist +++ b/xserver/hw/xquartz/bundle/Resources/Dutch.lproj/locversion.plist @@ -3,12 +3,12 @@ LprojCompatibleVersion - 93 + 97 LprojLocale nl LprojRevisionLevel 1 LprojVersion - 93 + 97 diff --git a/xserver/hw/xquartz/bundle/Resources/Dutch.lproj/main.nib/designable.nib b/xserver/hw/xquartz/bundle/Resources/Dutch.lproj/main.nib/designable.nib index ec62e0293..e95db0cf6 100644 --- a/xserver/hw/xquartz/bundle/Resources/Dutch.lproj/main.nib/designable.nib +++ b/xserver/hw/xquartz/bundle/Resources/Dutch.lproj/main.nib/designable.nib @@ -1,33 +1,25 @@ - + - 1050 + 1040 11A79a - 732 + 784 1059 478.00 com.apple.InterfaceBuilder.CocoaPlugin - 732 + 784 - - YES - - - YES + + + + + + com.apple.InterfaceBuilder.CocoaPlugin - - - YES - - YES - - - YES - - - - YES + + + NSApplication @@ -41,8 +33,7 @@ MainMenu - - YES + X11 @@ -60,8 +51,7 @@ submenuAction: X11 - - YES + Over X11 @@ -101,9 +91,7 @@ submenuAction: Voorzieningen - - YES - + _NSServicesMenu @@ -187,7 +175,7 @@ - + _NSAppleMenu @@ -202,8 +190,7 @@ submenuAction: Programma's - - YES + YES @@ -224,7 +211,7 @@ - + @@ -238,8 +225,7 @@ submenuAction: Wijzig - - YES + Kopieer @@ -249,7 +235,7 @@ - + @@ -263,8 +249,7 @@ submenuAction: Venster - - YES + Sluit @@ -341,7 +326,7 @@ - + _NSWindowsMenu @@ -356,8 +341,7 @@ submenuAction: Help - - YES + X11 Help @@ -367,10 +351,10 @@ - + - + _NSMainMenu @@ -389,17 +373,15 @@ {1.7976931348623157e+308, 1.7976931348623157e+308} {320, 240} - + 256 - - YES + 256 {{13, 10}, {538, 292}} - - YES + 1 @@ -407,12 +389,11 @@ 256 - - YES + 256 - {{18, 210}, {402, 18}} + {{18, 215}, {402, 18}} YES @@ -427,7 +408,7 @@ 1211912703 2 - + NSImage NSSwitch @@ -443,7 +424,7 @@ 256 - {{36, 34}, {468, 42}} + {{36, 55}, {480, 42}} YES @@ -480,7 +461,7 @@ 256 - {{36, 170}, {468, 34}} + {{36, 179}, {468, 34}} YES @@ -499,7 +480,7 @@ ZW4uCg 256 - {{18, 82}, {402, 18}} + {{18, 99}, {402, 18}} YES @@ -510,7 +491,7 @@ ZW4uCg 1211912703 2 - + @@ -521,7 +502,7 @@ ZW4uCg 256 - {{36, 111}, {468, 29}} + {{36, 126}, {468, 29}} YES @@ -538,7 +519,7 @@ ZW4uCg 256 - {{18, 146}, {402, 18}} + {{18, 157}, {402, 18}} YES @@ -549,7 +530,7 @@ ZW4uCg 1211912703 2 - + @@ -557,7 +538,45 @@ ZW4uCg 25 - + + + 256 + {{36, 8}, {468, 31}} + + YES + + 67239424 + 4194304 + Indien ingeschakeld, worden met de Option-toetsen de X11-toetssymbolen Alt_L en Alt_R verstuurd in plaats van Mode_switch. + + + + + + + + + 256 + {{18, 41}, {402, 18}} + + YES + + 67239424 + 0 + Option-toetsen versturen Alt_L en Alt_R + + + 1211912703 + 2 + + + + + 200 + 25 + + + {{10, 33}, {518, 246}} @@ -572,8 +591,7 @@ ZW4uCg 256 - - YES + 256 @@ -588,7 +606,7 @@ ZW4uCg 1211912703 2 - + @@ -655,8 +673,7 @@ ZW4uCg OtherViews - - YES + @@ -694,7 +711,7 @@ ZW4uCg 24 - + 3 YES @@ -711,7 +728,7 @@ ZW4uCg 67239424 4194304 - S2xldXJlbjoKA + Kleuren: @@ -750,7 +767,7 @@ ZW4uCg 1211912703 2 - + @@ -772,7 +789,7 @@ ZW4uCg 1211912703 2 - + @@ -789,7 +806,7 @@ ZW4uCg 67239424 4194304 - Hiermee schakelt u het X11-rootvenster in. Gebruik de toetscombinatie Command + Option + A om de schermvullende weergave te starten en te stoppen. + Schakelt het X11-rootvenster in. Gebruik de toetscombinatie Command + Option + A om de schermvullende weergave te starten en te stoppen. @@ -797,7 +814,7 @@ ZW4uCg - + {{10, 33}, {518, 246}} Uitvoer @@ -811,12 +828,11 @@ ZW4uCg 256 - - YES + 256 - {{18, 222}, {409, 23}} + {{12, 222}, {409, 23}} YES @@ -827,7 +843,7 @@ ZW4uCg 1211912703 2 - + @@ -838,13 +854,13 @@ ZW4uCg 256 - {{36, 174}, {473, 42}} + {{30, 174}, {473, 42}} YES 67239424 4194304 - Hiermee schakelt u het menuonderdeel "kopieer" in en maakt u synchronisatie mogelijk tussen het klembord van OS X en de CLIPBOARD- en PRIMARY-buffer van X11. + Schakelt het menuonderdeel 'kopieer' in en maakt synchronisatie mogelijk tussen het klembord van OS X en de CLIPBOARD- en PRIMARY-buffer van X11. @@ -854,7 +870,7 @@ ZW4uCg 256 - {{34, 96}, {409, 23}} + {{28, 96}, {409, 23}} YES @@ -865,7 +881,7 @@ ZW4uCg 1211912703 2 - + @@ -876,7 +892,7 @@ ZW4uCg 256 - {{34, 71}, {409, 23}} + {{28, 71}, {409, 23}} YES @@ -887,7 +903,7 @@ ZW4uCg 1211912703 2 - + @@ -898,7 +914,7 @@ ZW4uCg 256 - {{34, 51}, {486, 18}} + {{28, 51}, {486, 18}} YES @@ -909,7 +925,7 @@ ZW4uCg 1211912703 2 - + @@ -920,7 +936,7 @@ ZW4uCg 256 - {{34, 159}, {409, 23}} + {{28, 159}, {409, 23}} YES @@ -931,7 +947,7 @@ ZW4uCg 1211912703 2 - + @@ -942,7 +958,7 @@ ZW4uCg 256 - {{48, 125}, {461, 28}} + {{42, 125}, {461, 28}} YES @@ -958,7 +974,7 @@ ZW4uCg 256 - {{48, 19}, {461, 28}} + {{42, 19}, {461, 28}} YES @@ -971,7 +987,7 @@ ZW4uCg - + {{10, 33}, {518, 246}} Plakbord @@ -985,8 +1001,7 @@ ZW4uCg 256 - - YES + 256 @@ -1001,7 +1016,7 @@ ZW4uCg 1211912703 2 - + @@ -1039,7 +1054,7 @@ ZW4uCg 1211912703 2 - + @@ -1077,7 +1092,7 @@ ZW4uCg 1211912703 2 - + @@ -1101,7 +1116,7 @@ ZW4uCg - + {{10, 33}, {518, 246}} Vensters @@ -1112,8 +1127,7 @@ ZW4uCg 256 - - YES + 256 @@ -1128,7 +1142,7 @@ ZW4uCg 1211912703 2 - + @@ -1150,7 +1164,7 @@ ZW4uCg 1211912703 2 - + @@ -1209,26 +1223,26 @@ ZW4uCg - + {{10, 33}, {518, 246}} Beveiliging - + 0 YES YES - - YES + - + - + {564, 308} + {{0, 0}, {1280, 938}} {320, 262} @@ -1248,10 +1262,9 @@ ZW4uCg {1.7976931348623157e+308, 1.7976931348623157e+308} {320, 240} - + 256 - - YES + 265 @@ -1305,13 +1318,11 @@ ZW4uCg 274 - - YES + 2304 - - YES + 256 @@ -1331,8 +1342,7 @@ ZW4uCg {{302, 0}, {16, 17}} - - YES + 121.73100280761719 62.730998992919922 @@ -1440,7 +1450,7 @@ ZW4uCg YES - + 3 2 @@ -1463,7 +1473,7 @@ ZW4uCg YES 0 - + {{1, 17}, {301, 198}} @@ -1493,10 +1503,9 @@ ZW4uCg 2304 - - YES + - + {{1, 0}, {301, 17}} @@ -1505,7 +1514,7 @@ ZW4uCg 4 - + {{20, 20}, {318, 231}} @@ -1540,8 +1549,9 @@ ZW4uCg 25 - + {454, 271} + {{0, 0}, {1280, 938}} {320, 262} @@ -1550,8 +1560,7 @@ ZW4uCg Menu - - YES + YES @@ -1574,8 +1583,7 @@ ZW4uCg submenuAction: Programma's - - YES + YES @@ -1596,16 +1604,15 @@ ZW4uCg - + - + - + - - YES + copy: @@ -2150,13 +2157,28 @@ ZW4uCg 300475 - + + + prefs_changed: + + + + 300480 + + + + option_sends_alt + + + + 300481 + + - - YES + 0 - + @@ -2181,31 +2203,28 @@ ZW4uCg 29 - - YES + - + MainMenu 19 - - YES + - + 24 - - YES + @@ -2214,7 +2233,7 @@ ZW4uCg - + @@ -2260,17 +2279,15 @@ ZW4uCg 56 - - YES + - + 57 - - YES + @@ -2283,7 +2300,7 @@ ZW4uCg - + @@ -2299,10 +2316,9 @@ ZW4uCg 131 - - YES + - + @@ -2358,19 +2374,17 @@ ZW4uCg 163 - - YES + - + 169 - - YES + - + @@ -2381,20 +2395,18 @@ ZW4uCg 269 - - YES + - + 270 - - YES + - + @@ -2410,19 +2422,17 @@ ZW4uCg 419 - - YES + - + 420 - - YES + - + @@ -2439,126 +2449,115 @@ ZW4uCg 244 - - YES + - + PrefsPanel 245 - - YES + - + 348 - - YES + - + 349 - - YES + - + 351 - - YES + - + + + 363 - - YES + - + 364 - - YES + - + 365 - - YES + - + 368 - - YES + - + 369 - - YES + - + 370 - - YES + - + 352 - - YES + - + 350 - - YES + @@ -2567,169 +2566,152 @@ ZW4uCg - + 371 - - YES + - + 372 - - YES + - + 382 - - YES + - + 385 - - YES + - + 386 - - YES + - + 541 - - YES + - + 543 - - YES + - + 353 - - YES + - + 354 - - YES + - + 374 - - YES + - + 375 - - YES + - + 376 - - YES + - + 377 - - YES + - + 379 - - YES + - + 285 - - YES + - + EditPrograms 286 - - YES + - + 423 - - YES + - + DockMenu @@ -2741,20 +2723,18 @@ ZW4uCg 526 - - YES + - + 527 - - YES + - + @@ -2810,10 +2790,9 @@ ZW4uCg 100382 - - YES + - + @@ -2864,13 +2843,12 @@ ZW4uCg 380 - - YES + - + @@ -2896,13 +2874,12 @@ ZW4uCg 295 - - YES + - + @@ -2923,21 +2900,19 @@ ZW4uCg 296 - - YES + - + 535 - - YES + - + @@ -2948,10 +2923,9 @@ ZW4uCg 298 - - YES + - + @@ -2962,10 +2936,9 @@ ZW4uCg 297 - - YES + - + @@ -2976,10 +2949,9 @@ ZW4uCg 310 - - YES + - + @@ -2990,10 +2962,9 @@ ZW4uCg 292 - - YES + - + @@ -3004,10 +2975,9 @@ ZW4uCg 293 - - YES + - + @@ -3018,42 +2988,38 @@ ZW4uCg 300337 - - YES + - + 300338 - - YES + - + 300358 - - YES + - + 300359 - - YES + - + @@ -3069,10 +3035,9 @@ ZW4uCg 300362 - - YES + - + @@ -3083,10 +3048,9 @@ ZW4uCg 300364 - - YES + - + @@ -3097,10 +3061,9 @@ ZW4uCg 300368 - - YES + - + @@ -3111,10 +3074,9 @@ ZW4uCg 300370 - - YES + - + @@ -3125,17 +3087,15 @@ ZW4uCg 300421 - - YES + - + 300422 - - YES + @@ -3144,25 +3104,23 @@ ZW4uCg - + 300423 - - YES + - + 300424 - - YES + - + @@ -3178,10 +3136,9 @@ ZW4uCg 300447 - - YES + - + @@ -3192,10 +3149,9 @@ ZW4uCg 300451 - - YES + - + @@ -3206,10 +3162,9 @@ ZW4uCg 300453 - - YES + - + @@ -3220,10 +3175,9 @@ ZW4uCg 300455 - - YES + - + @@ -3234,10 +3188,9 @@ ZW4uCg 300457 - - YES + - + @@ -3248,10 +3201,9 @@ ZW4uCg 300459 - - YES + - + @@ -3262,10 +3214,9 @@ ZW4uCg 300472 - - YES + - + @@ -3273,604 +3224,342 @@ ZW4uCg - - - - YES - - YES - -3.IBPluginDependency - -3.ImportedFromIB2 - 100292.IBPluginDependency - 100293.IBPluginDependency - 100295.IBPluginDependency - 100295.IBShouldRemoveOnLegacySave - 100310.IBPluginDependency - 100363.IBPluginDependency - 100364.IBPluginDependency - 100365.IBPluginDependency - 100368.IBPluginDependency - 100369.IBPluginDependency - 100370.IBPluginDependency - 100371.IBPluginDependency - 100372.IBPluginDependency - 100374.IBPluginDependency - 100375.IBPluginDependency - 100376.IBPluginDependency - 100377.IBPluginDependency - 100379.IBPluginDependency - 100382.IBPluginDependency - 100385.IBPluginDependency - 100386.IBPluginDependency - 100541.IBPluginDependency - 100543.IBPluginDependency - 129.IBPluginDependency - 129.ImportedFromIB2 - 130.IBPluginDependency - 130.ImportedFromIB2 - 131.IBPluginDependency - 131.ImportedFromIB2 - 134.IBPluginDependency - 134.ImportedFromIB2 - 136.IBPluginDependency - 136.ImportedFromIB2 - 143.IBPluginDependency - 143.ImportedFromIB2 - 144.IBPluginDependency - 144.ImportedFromIB2 - 145.IBPluginDependency - 145.ImportedFromIB2 - 149.IBPluginDependency - 149.ImportedFromIB2 - 150.IBPluginDependency - 150.ImportedFromIB2 - 157.IBPluginDependency - 157.ImportedFromIB2 - 163.IBPluginDependency - 163.ImportedFromIB2 - 169.IBEditorWindowLastContentRect - 169.IBPluginDependency - 169.ImportedFromIB2 - 169.editorWindowContentRectSynchronizationRect - 19.IBPluginDependency - 19.ImportedFromIB2 - 196.ImportedFromIB2 - 200295.IBPluginDependency - 200295.IBShouldRemoveOnLegacySave - 203.IBPluginDependency - 203.ImportedFromIB2 - 204.IBPluginDependency - 204.ImportedFromIB2 - 23.IBPluginDependency - 23.ImportedFromIB2 - 24.IBEditorWindowLastContentRect - 24.IBPluginDependency - 24.ImportedFromIB2 - 24.editorWindowContentRectSynchronizationRect - 244.IBEditorWindowLastContentRect - 244.IBPluginDependency - 244.IBWindowTemplateEditedContentRect - 244.ImportedFromIB2 - 244.editorWindowContentRectSynchronizationRect - 244.windowTemplate.hasMaxSize - 244.windowTemplate.hasMinSize - 244.windowTemplate.maxSize - 244.windowTemplate.minSize - 245.IBPluginDependency - 245.ImportedFromIB2 - 269.IBPluginDependency - 269.ImportedFromIB2 - 270.IBEditorWindowLastContentRect - 270.IBPluginDependency - 270.ImportedFromIB2 - 270.editorWindowContentRectSynchronizationRect - 272.IBPluginDependency - 272.ImportedFromIB2 - 285.IBEditorWindowLastContentRect - 285.IBPluginDependency - 285.IBViewEditorWindowController.showingBoundsRectangles - 285.IBViewEditorWindowController.showingLayoutRectangles - 285.IBWindowTemplateEditedContentRect - 285.ImportedFromIB2 - 285.editorWindowContentRectSynchronizationRect - 285.windowTemplate.hasMaxSize - 285.windowTemplate.hasMinSize - 285.windowTemplate.maxSize - 285.windowTemplate.minSize - 286.IBPluginDependency - 286.ImportedFromIB2 - 29.IBEditorWindowLastContentRect - 29.IBPluginDependency - 29.ImportedFromIB2 - 29.editorWindowContentRectSynchronizationRect - 292.IBPluginDependency - 292.ImportedFromIB2 - 293.IBPluginDependency - 293.ImportedFromIB2 - 295.IBPluginDependency - 295.ImportedFromIB2 - 296.IBPluginDependency - 296.ImportedFromIB2 - 297.IBPluginDependency - 297.ImportedFromIB2 - 298.IBPluginDependency - 298.ImportedFromIB2 - 300295.IBPluginDependency - 300295.IBShouldRemoveOnLegacySave - 300337.IBPluginDependency - 300337.ImportedFromIB2 - 300338.IBPluginDependency - 300338.ImportedFromIB2 - 300358.IBPluginDependency - 300358.ImportedFromIB2 - 300359.IBPluginDependency - 300359.ImportedFromIB2 - 300360.IBPluginDependency - 300361.IBPluginDependency - 300362.IBPluginDependency - 300362.ImportedFromIB2 - 300363.IBPluginDependency - 300364.IBPluginDependency - 300364.ImportedFromIB2 - 300365.IBPluginDependency - 300368.IBPluginDependency - 300368.ImportedFromIB2 - 300369.IBPluginDependency - 300370.IBPluginDependency - 300370.ImportedFromIB2 - 300371.IBPluginDependency - 300421.IBPluginDependency - 300421.ImportedFromIB2 - 300422.IBPluginDependency - 300422.ImportedFromIB2 - 300423.IBPluginDependency - 300423.ImportedFromIB2 - 300424.IBPluginDependency - 300424.ImportedFromIB2 - 300440.IBPluginDependency - 300441.IBPluginDependency - 300447.IBPluginDependency - 300447.ImportedFromIB2 - 300450.IBPluginDependency - 300451.IBPluginDependency - 300451.ImportedFromIB2 - 300452.IBPluginDependency - 300453.IBPluginDependency - 300453.ImportedFromIB2 - 300454.IBPluginDependency - 300455.IBPluginDependency - 300455.ImportedFromIB2 - 300456.IBPluginDependency - 300457.IBPluginDependency - 300457.ImportedFromIB2 - 300458.IBPluginDependency - 300459.IBPluginDependency - 300459.ImportedFromIB2 - 300460.IBPluginDependency - 300472.IBPluginDependency - 300472.ImportedFromIB2 - 300473.IBPluginDependency - 305.IBPluginDependency - 305.ImportedFromIB2 - 310.IBPluginDependency - 310.ImportedFromIB2 - 348.IBPluginDependency - 348.ImportedFromIB2 - 349.IBPluginDependency - 349.ImportedFromIB2 - 350.IBPluginDependency - 350.ImportedFromIB2 - 351.IBPluginDependency - 351.ImportedFromIB2 - 352.IBPluginDependency - 352.ImportedFromIB2 - 353.IBPluginDependency - 353.ImportedFromIB2 - 354.IBPluginDependency - 354.ImportedFromIB2 - 363.IBPluginDependency - 363.ImportedFromIB2 - 364.IBPluginDependency - 364.ImportedFromIB2 - 365.IBPluginDependency - 365.ImportedFromIB2 - 368.IBPluginDependency - 368.ImportedFromIB2 - 369.IBPluginDependency - 369.ImportedFromIB2 - 370.IBPluginDependency - 370.ImportedFromIB2 - 371.IBPluginDependency - 371.ImportedFromIB2 - 372.IBPluginDependency - 372.ImportedFromIB2 - 374.IBPluginDependency - 374.ImportedFromIB2 - 375.IBPluginDependency - 375.ImportedFromIB2 - 376.IBPluginDependency - 376.ImportedFromIB2 - 377.IBPluginDependency - 377.ImportedFromIB2 - 379.IBPluginDependency - 379.ImportedFromIB2 - 380.IBPluginDependency - 380.ImportedFromIB2 - 381.IBPluginDependency - 381.ImportedFromIB2 - 382.IBPluginDependency - 382.ImportedFromIB2 - 383.IBPluginDependency - 383.ImportedFromIB2 - 384.IBPluginDependency - 384.ImportedFromIB2 - 385.IBPluginDependency - 385.ImportedFromIB2 - 386.IBPluginDependency - 386.ImportedFromIB2 - 419.IBPluginDependency - 419.ImportedFromIB2 - 420.IBPluginDependency - 420.ImportedFromIB2 - 421.IBPluginDependency - 421.ImportedFromIB2 - 423.IBPluginDependency - 423.ImportedFromIB2 - 435.IBPluginDependency - 435.ImportedFromIB2 - 5.IBPluginDependency - 5.ImportedFromIB2 - 524.IBPluginDependency - 524.ImportedFromIB2 - 526.IBPluginDependency - 526.ImportedFromIB2 - 527.IBPluginDependency - 527.ImportedFromIB2 - 532.IBPluginDependency - 532.ImportedFromIB2 - 533.IBPluginDependency - 533.ImportedFromIB2 - 535.IBPluginDependency - 535.ImportedFromIB2 - 536.IBPluginDependency - 536.ImportedFromIB2 - 537.IBPluginDependency - 537.ImportedFromIB2 - 538.IBPluginDependency - 538.ImportedFromIB2 - 541.IBPluginDependency - 541.ImportedFromIB2 - 543.IBPluginDependency - 543.ImportedFromIB2 - 544.IBPluginDependency - 544.ImportedFromIB2 - 545.IBPluginDependency - 545.ImportedFromIB2 - 56.IBPluginDependency - 56.ImportedFromIB2 - 57.IBEditorWindowLastContentRect - 57.IBPluginDependency - 57.ImportedFromIB2 - 57.editorWindowContentRectSynchronizationRect - 573.IBPluginDependency - 573.ImportedFromIB2 - 574.IBPluginDependency - 574.ImportedFromIB2 - 575.IBPluginDependency - 575.ImportedFromIB2 - 58.IBPluginDependency - 58.ImportedFromIB2 - 92.IBPluginDependency - 92.ImportedFromIB2 - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{168, 821}, {113, 23}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{202, 626}, {154, 153}} - com.apple.InterfaceBuilder.CocoaPlugin - - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{349, 868}, {315, 143}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{271, 666}, {301, 153}} - {{437, 749}, {484, 308}} - com.apple.InterfaceBuilder.CocoaPlugin - {{437, 749}, {484, 308}} - - {{184, 290}, {481, 345}} - - - {3.40282e+38, 3.40282e+38} - {320, 240} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{58, 803}, {155, 33}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{100, 746}, {155, 33}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{68, 585}, {454, 271}} - com.apple.InterfaceBuilder.CocoaPlugin - - - {{68, 585}, {454, 271}} - - {{433, 406}, {486, 327}} - - - {3.40282e+38, 3.40282e+38} - {320, 240} - com.apple.InterfaceBuilder.CocoaPlugin - - {{145, 1011}, {336, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{67, 819}, {336, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{20, 641}, {218, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{79, 616}, {218, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - - - - YES - - - YES - + + 300476 + + + + + + + + 300477 + + + + + + + + 300478 + + + + + 300479 + + + + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{310, 988}, {127, 23}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{202, 626}, {154, 153}} + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{370, 868}, {313, 143}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{271, 666}, {301, 153}} + {{507, 565}, {564, 308}} + com.apple.InterfaceBuilder.CocoaPlugin + {{507, 565}, {564, 308}} + + {{184, 290}, {481, 345}} + + + {3.40282e+38, 3.40282e+38} + {320, 240} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{203, 978}, {131, 33}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{100, 746}, {155, 33}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{68, 585}, {454, 271}} + com.apple.InterfaceBuilder.CocoaPlugin + + + {{68, 585}, {454, 271}} + + {{433, 406}, {486, 327}} + + + {3.40282e+38, 3.40282e+38} + {320, 240} + com.apple.InterfaceBuilder.CocoaPlugin + + {{145, 1011}, {356, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{67, 819}, {336, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{440, 988}, {128, 23}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{84, 998}, {155, 33}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{157, 808}, {319, 203}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{79, 616}, {218, 203}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + - - YES - - - YES - - + - 300475 + 300481 - - YES + FirstResponder NSObject @@ -3895,19 +3584,21 @@ ZW4uCg - + 0 + IBCocoaFramework com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - - com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 - + YES ../X11.xcodeproj 3 + + {9, 8} + {7, 2} + {15, 15} + diff --git a/xserver/hw/xquartz/bundle/Resources/French.lproj/locversion.plist b/xserver/hw/xquartz/bundle/Resources/French.lproj/locversion.plist index 5e82f7fd1..877a10c9d 100644 --- a/xserver/hw/xquartz/bundle/Resources/French.lproj/locversion.plist +++ b/xserver/hw/xquartz/bundle/Resources/French.lproj/locversion.plist @@ -3,12 +3,12 @@ LprojCompatibleVersion - 93 + 98 LprojLocale fr LprojRevisionLevel 1 LprojVersion - 93 + 98 diff --git a/xserver/hw/xquartz/bundle/Resources/French.lproj/main.nib/designable.nib b/xserver/hw/xquartz/bundle/Resources/French.lproj/main.nib/designable.nib index 69f7075ac..d35e44f59 100644 --- a/xserver/hw/xquartz/bundle/Resources/French.lproj/main.nib/designable.nib +++ b/xserver/hw/xquartz/bundle/Resources/French.lproj/main.nib/designable.nib @@ -1,34 +1,21 @@ - + - 1050 - 10A432 - 732 - 1038 - 437.00 + 1040 + 11A194b + 787 + 1079 + 502.00 com.apple.InterfaceBuilder.CocoaPlugin - 732 + 787 - - YES - - - - YES + + com.apple.InterfaceBuilder.CocoaPlugin - - - YES - - YES - - - YES - - - - YES + + + NSApplication @@ -42,8 +29,7 @@ MainMenu - - YES + X11 @@ -61,8 +47,7 @@ submenuAction: X11 - - YES + À propos d’X11 @@ -104,9 +89,7 @@ Services - - YES - + _NSServicesMenu @@ -190,7 +173,7 @@ - + _NSAppleMenu @@ -205,8 +188,7 @@ submenuAction: Applications - - YES + YES @@ -227,7 +209,7 @@ - + @@ -241,8 +223,7 @@ submenuAction: Édition - - YES + Copier @@ -252,7 +233,7 @@ - + @@ -266,8 +247,7 @@ submenuAction: Fenêtre - - YES + Fermer @@ -344,7 +324,7 @@ - + _NSWindowsMenu @@ -359,8 +339,7 @@ submenuAction: Aide - - YES + Aide X11 @@ -370,10 +349,10 @@ - + - + _NSMainMenu @@ -382,40 +361,38 @@ 3 2 - {{414, 406}, {582, 308}} + {{414, 417}, {582, 329}} 1350041600 Préférences d’X11 NSPanel View - {3.40282e+38, 3.40282e+38} + + {1.7976931348623157e+308, 1.7976931348623157e+308} {320, 240} - + 256 - - YES + 256 - {{13, 10}, {556, 292}} + {{13, 10}, {556, 313}} - - YES + 1 - + 256 - - YES + 256 - {{67, 210}, {402, 18}} + {{67, 235}, {402, 18}} YES @@ -430,7 +407,7 @@ 1211912703 2 - + NSImage NSSwitch @@ -446,13 +423,13 @@ 256 - {{85, 39}, {369, 42}} + {{85, 64}, {385, 42}} YES 67239424 4194304 - Quand cette option est activée, les touches équivalentes de la barre des menus peuvent perturber les applications X11 qui utilisent le modificateur d'instructions virtuelles. + Quand cette option est activée, les touches équivalentes de la barre des menus peuvent perturber les applications X11 qui utilisent le modificateur d’instructions virtuelles. LucidaGrande 11 @@ -466,7 +443,7 @@ controlColor 3 - MC42NjY2NjY2ODY1AA + MC42NjY2NjY2NjY3AA @@ -483,7 +460,7 @@ 256 - {{85, 170}, {385, 34}} + {{85, 195}, {385, 34}} YES @@ -502,7 +479,7 @@ A 256 - {{67, 87}, {402, 18}} + {{67, 112}, {402, 18}} YES @@ -513,7 +490,7 @@ A 1211912703 2 - + @@ -524,13 +501,13 @@ A 256 - {{85, 111}, {385, 29}} + {{85, 136}, {385, 29}} YES 67239424 4194304 - Autorise les modifications du menu d'entrée pour remplacer la disposition des touches du clavier X11. + Autorise les modifications du menu d’entrée pour remplacer la disposition des touches du clavier X11. @@ -541,7 +518,7 @@ A 256 - {{67, 146}, {402, 18}} + {{67, 171}, {402, 18}} YES @@ -552,7 +529,7 @@ A 1211912703 2 - + @@ -560,9 +537,46 @@ A 25 - - {{10, 33}, {536, 246}} - + + + 256 + {{85, 6}, {385, 28}} + + YES + + 67239424 + 4194304 + Une fois activées, les touches option envoient les symboles Alt_L et Alt_R au lieu de Mode_switch. + + + + + + + + + 256 + {{67, 40}, {402, 18}} + + YES + + 67239424 + 0 + Les touches option envoient Alt_L et Alt_R + + + 1211912703 + 2 + + + + + 200 + 25 + + + + {{10, 33}, {536, 267}} Entrée @@ -575,23 +589,22 @@ A 256 - - YES + 256 - {{34, 63}, {402, 18}} + {{34, 84}, {402, 18}} YES 67239424 0 - Utiliser l'effet d'avertissement du système + Utiliser l’effet d’avertissement du système 1211912703 2 - + @@ -602,13 +615,13 @@ A 256 - {{52, 29}, {385, 28}} + {{52, 50}, {385, 28}} YES 67239424 4194304 - Les sons émis par X11 utiliseront l'avertissement standard du système, comme défini dans le panneau Effets sonores des Préférences Système. + Les sons émis par X11 utiliseront l’avertissement standard du système, comme défini dans le panneau Effets sonores des Préférences Système. @@ -619,7 +632,7 @@ A 256 - {{104, 202}, {128, 26}} + {{104, 223}, {128, 26}} YES @@ -658,8 +671,7 @@ A OtherViews - - YES + @@ -697,7 +709,7 @@ A 24 - + 3 YES @@ -708,13 +720,13 @@ A 256 - {{33, 205}, {71, 20}} + {{33, 226}, {71, 20}} YES 67239424 4194304 - Q291bGV1cnPCoDoKA + Couleurs : @@ -725,7 +737,7 @@ A 256 - {{52, 183}, {392, 14}} + {{52, 204}, {392, 14}} YES @@ -742,7 +754,7 @@ A 256 - {{34, 149}, {409, 23}} + {{34, 170}, {409, 23}} YES @@ -753,7 +765,7 @@ A 1211912703 2 - + @@ -764,7 +776,7 @@ A 256 - {{53, 88}, {445, 18}} + {{53, 109}, {445, 18}} YES @@ -775,7 +787,7 @@ A 1211912703 2 - + @@ -786,7 +798,7 @@ A 256 - {{52, 112}, {385, 31}} + {{52, 133}, {385, 31}} YES @@ -800,8 +812,8 @@ A - - {{10, 33}, {536, 246}} + + {{10, 33}, {536, 267}} Sortie @@ -814,12 +826,11 @@ A 256 - - YES + 256 - {{25, 222}, {409, 23}} + {{25, 235}, {409, 23}} YES @@ -830,7 +841,7 @@ A 1211912703 2 - + @@ -841,7 +852,7 @@ A 256 - {{43, 174}, {378, 42}} + {{43, 187}, {378, 42}} YES @@ -857,7 +868,7 @@ A 256 - {{41, 92}, {424, 18}} + {{41, 105}, {424, 18}} YES @@ -868,7 +879,7 @@ A 1211912703 2 - + @@ -879,7 +890,7 @@ A 256 - {{41, 70}, {489, 18}} + {{41, 83}, {489, 18}} YES @@ -890,7 +901,7 @@ A 1211912703 2 - + @@ -901,7 +912,7 @@ A 256 - {{41, 48}, {437, 18}} + {{41, 61}, {437, 18}} YES @@ -912,7 +923,7 @@ A 1211912703 2 - + @@ -923,7 +934,7 @@ A 256 - {{41, 150}, {424, 18}} + {{41, 163}, {424, 18}} YES @@ -934,7 +945,7 @@ A 1211912703 2 - + @@ -945,7 +956,7 @@ A 256 - {{55, 116}, {385, 28}} + {{55, 129}, {385, 28}} YES @@ -961,7 +972,7 @@ A 256 - {{55, 16}, {385, 28}} + {{55, 29}, {385, 28}} YES @@ -974,8 +985,8 @@ A - - {{10, 33}, {536, 246}} + + {{10, 33}, {536, 267}} Presse-papiers @@ -986,14 +997,13 @@ A 2 - + 256 - - YES + 256 - {{67, 212}, {402, 18}} + {{67, 235}, {402, 18}} YES @@ -1004,7 +1014,7 @@ A 1211912703 2 - + @@ -1015,7 +1025,7 @@ A 256 - {{75, 175}, {385, 31}} + {{75, 198}, {385, 31}} YES @@ -1032,7 +1042,7 @@ A 256 - {{67, 151}, {402, 18}} + {{67, 174}, {402, 18}} YES @@ -1043,7 +1053,7 @@ A 1211912703 2 - + @@ -1054,7 +1064,7 @@ A 256 - {{75, 117}, {381, 28}} + {{75, 140}, {381, 28}} YES @@ -1071,7 +1081,7 @@ A 256 - {{67, 93}, {402, 18}} + {{67, 116}, {402, 18}} YES @@ -1082,7 +1092,7 @@ A 1211912703 2 - + @@ -1093,7 +1103,7 @@ A 256 - {{75, 45}, {385, 42}} + {{75, 68}, {385, 42}} YES @@ -1107,8 +1117,9 @@ A - - {{10, 33}, {536, 246}} + + {{10, 33}, {536, 267}} + Fenêtres @@ -1118,12 +1129,11 @@ A 256 - - YES + 256 - {{67, 210}, {402, 18}} + {{67, 235}, {402, 18}} YES @@ -1134,7 +1144,7 @@ A 1211912703 2 - + @@ -1145,7 +1155,7 @@ A 256 - {{67, 133}, {402, 18}} + {{67, 158}, {402, 18}} YES @@ -1156,7 +1166,7 @@ A 1211912703 2 - + @@ -1167,13 +1177,13 @@ A 256 - {{85, 162}, {385, 42}} + {{85, 187}, {385, 42}} YES 67239424 4194304 - Le lancement d’X11 créera des touches de contrôle d'accès Xauthority. Si l'adresse IP du système change, ces touches ne seront plus valides, ce qui risquera d'empêcher le lancement des applications X11. + Le lancement d’X11 créera des touches de contrôle d’accès Xauthority. Si l’adresse IP du système change, ces touches ne seront plus valides, ce qui risquera d’empêcher le lancement des applications X11. @@ -1184,13 +1194,13 @@ A 256 - {{85, 71}, {385, 56}} + {{85, 96}, {385, 56}} YES 67239424 4194304 - En cas d'activation de cette option, « Authentifier les connexions » doit aussi être activée pour garantir la sécurité du système. En cas de désactivation, les connexions à partir d'applications distantes sont interdites. + En cas d’activation de cette option, « Authentifier les connexions » doit aussi être activée pour garantir la sécurité du système. En cas de désactivation, les connexions à partir d’applications distantes sont interdites. @@ -1201,7 +1211,7 @@ A 256 - {{20, -16}, {404, 14}} + {{20, 5}, {404, 14}} YES @@ -1215,31 +1225,29 @@ A - - {{10, 33}, {536, 246}} + + {{10, 33}, {536, 267}} Sécurité - - + + 0 YES YES - - YES - - + + + - - {582, 308} - + + {582, 329} {{0, 0}, {1440, 878}} {320, 262} - {3.40282e+38, 3.40282e+38} + {1.7976931348623157e+308, 1.7976931348623157e+308} x11_prefs @@ -1247,18 +1255,18 @@ A 2 {{302, 440}, {548, 271}} 1350041600 - Menu de l'application X11 + Menu de l’application X11 NSPanel View - {3.40282e+38, 3.40282e+38} + + {1.7976931348623157e+308, 1.7976931348623157e+308} {320, 240} 256 - - YES + 265 @@ -1312,13 +1320,11 @@ A 274 - - YES + 2304 - - YES + 256 @@ -1338,8 +1344,7 @@ A {{334, 0}, {16, 17}} - - YES + 155 62.730998992919922 @@ -1351,7 +1356,7 @@ A 3 - MC4zMzMzMzI5ODU2AA + MC4zMzMzMzI5OQA 6 @@ -1450,7 +1455,7 @@ A - + 3 2 @@ -1473,7 +1478,7 @@ A YES 0 - + {{1, 17}, {333, 198}} @@ -1488,7 +1493,7 @@ A _doScroller: - 0.99492377042770386 + 0.99492380000000002 @@ -1498,15 +1503,14 @@ A 1 _doScroller: - 0.97368419170379639 + 0.97368421052631582 2304 - - YES + - + {{1, 0}, {333, 17}} @@ -1515,7 +1519,7 @@ A 4 - + {{20, 20}, {350, 231}} @@ -1524,7 +1528,6 @@ A - QSAAAEEgAABBmAAAQZgAAA @@ -1550,18 +1553,17 @@ A 25 - + {548, 271} {{0, 0}, {1440, 878}} {320, 262} - {3.40282e+38, 3.40282e+38} + {1.7976931348623157e+308, 1.7976931348623157e+308} x11_apps Menu - - YES + YES @@ -1584,8 +1586,7 @@ A submenuAction: Applications - - YES + YES @@ -1606,16 +1607,15 @@ A - + - + - + - - YES + copy: @@ -2160,13 +2160,28 @@ A 300475 - + + + prefs_changed: + + + + 300480 + + + + option_sends_alt + + + + 300481 + + - - YES + 0 - + @@ -2191,31 +2206,28 @@ A 29 - - YES + - + MainMenu 19 - - YES + - + 24 - - YES + @@ -2224,7 +2236,7 @@ A - + @@ -2270,17 +2282,15 @@ A 56 - - YES + - + 57 - - YES + @@ -2293,7 +2303,7 @@ A - + @@ -2309,10 +2319,9 @@ A 131 - - YES + - + @@ -2368,19 +2377,17 @@ A 163 - - YES + - + 169 - - YES + - + @@ -2391,20 +2398,18 @@ A 269 - - YES + - + 270 - - YES + - + @@ -2420,19 +2425,17 @@ A 419 - - YES + - + 420 - - YES + - + @@ -2449,126 +2452,115 @@ A 244 - - YES + - + PrefsPanel 245 - - YES + - + 348 - - YES + - + 349 - - YES + - + 351 - - YES + - + + + 363 - - YES + - + 364 - - YES + - + 365 - - YES + - + 368 - - YES + - + 369 - - YES + - + 370 - - YES + - + 352 - - YES + - + 350 - - YES + @@ -2577,169 +2569,152 @@ A - + 371 - - YES + - + 372 - - YES + - + 382 - - YES + - + 385 - - YES + - + 386 - - YES + - + 541 - - YES + - + 543 - - YES + - + 353 - - YES + - + 354 - - YES + - + 374 - - YES + - + 375 - - YES + - + 376 - - YES + - + 377 - - YES + - + 379 - - YES + - + 285 - - YES + - + EditPrograms 286 - - YES + - + 423 - - YES + - + DockMenu @@ -2751,20 +2726,18 @@ A 526 - - YES + - + 527 - - YES + - + @@ -2820,10 +2793,9 @@ A 100382 - - YES + - + @@ -2874,13 +2846,12 @@ A 380 - - YES + - + @@ -2906,13 +2877,12 @@ A 295 - - YES + - + @@ -2933,21 +2903,19 @@ A 296 - - YES + - + 535 - - YES + - + @@ -2958,10 +2926,9 @@ A 298 - - YES + - + @@ -2972,10 +2939,9 @@ A 297 - - YES + - + @@ -2986,10 +2952,9 @@ A 310 - - YES + - + @@ -3000,10 +2965,9 @@ A 292 - - YES + - + @@ -3014,10 +2978,9 @@ A 293 - - YES + - + @@ -3028,42 +2991,38 @@ A 300337 - - YES + - + 300338 - - YES + - + 300358 - - YES + - + 300359 - - YES + - + @@ -3079,10 +3038,9 @@ A 300362 - - YES + - + @@ -3093,10 +3051,9 @@ A 300364 - - YES + - + @@ -3107,10 +3064,9 @@ A 300368 - - YES + - + @@ -3121,10 +3077,9 @@ A 300370 - - YES + - + @@ -3135,17 +3090,15 @@ A 300421 - - YES + - + 300422 - - YES + @@ -3154,25 +3107,23 @@ A - + 300423 - - YES + - + 300424 - - YES + - + @@ -3188,10 +3139,9 @@ A 300447 - - YES + - + @@ -3202,10 +3152,9 @@ A 300451 - - YES + - + @@ -3216,10 +3165,9 @@ A 300453 - - YES + - + @@ -3230,10 +3178,9 @@ A 300455 - - YES + - + @@ -3244,10 +3191,9 @@ A 300457 - - YES + - + @@ -3258,10 +3204,9 @@ A 300459 - - YES + - + @@ -3272,10 +3217,9 @@ A 300472 - - YES + - + @@ -3283,633 +3227,351 @@ A - - - - YES - - YES - -3.IBPluginDependency - -3.ImportedFromIB2 - 100292.IBPluginDependency - 100293.IBPluginDependency - 100295.IBPluginDependency - 100295.IBShouldRemoveOnLegacySave - 100310.IBPluginDependency - 100363.IBPluginDependency - 100364.IBPluginDependency - 100365.IBPluginDependency - 100368.IBPluginDependency - 100369.IBPluginDependency - 100370.IBPluginDependency - 100371.IBPluginDependency - 100372.IBPluginDependency - 100374.IBPluginDependency - 100375.IBPluginDependency - 100376.IBPluginDependency - 100377.IBPluginDependency - 100379.IBPluginDependency - 100382.IBPluginDependency - 100385.IBPluginDependency - 100386.IBPluginDependency - 100541.IBPluginDependency - 100543.IBPluginDependency - 129.IBPluginDependency - 129.ImportedFromIB2 - 130.IBPluginDependency - 130.ImportedFromIB2 - 131.IBPluginDependency - 131.ImportedFromIB2 - 134.IBPluginDependency - 134.ImportedFromIB2 - 136.IBPluginDependency - 136.ImportedFromIB2 - 143.IBPluginDependency - 143.ImportedFromIB2 - 144.IBPluginDependency - 144.ImportedFromIB2 - 145.IBPluginDependency - 145.ImportedFromIB2 - 149.IBPluginDependency - 149.ImportedFromIB2 - 150.IBPluginDependency - 150.ImportedFromIB2 - 157.IBPluginDependency - 157.ImportedFromIB2 - 163.IBPluginDependency - 163.ImportedFromIB2 - 169.IBEditorWindowLastContentRect - 169.IBPluginDependency - 169.ImportedFromIB2 - 169.editorWindowContentRectSynchronizationRect - 19.IBPluginDependency - 19.ImportedFromIB2 - 196.ImportedFromIB2 - 200295.IBPluginDependency - 200295.IBShouldRemoveOnLegacySave - 203.IBPluginDependency - 203.ImportedFromIB2 - 204.IBPluginDependency - 204.ImportedFromIB2 - 23.IBPluginDependency - 23.ImportedFromIB2 - 24.IBEditorWindowLastContentRect - 24.IBPluginDependency - 24.ImportedFromIB2 - 24.editorWindowContentRectSynchronizationRect - 244.IBEditorWindowLastContentRect - 244.IBPluginDependency - 244.IBViewEditorWindowController.showingLayoutRectangles - 244.IBWindowTemplateEditedContentRect - 244.ImportedFromIB2 - 244.editorWindowContentRectSynchronizationRect - 244.windowTemplate.hasMaxSize - 244.windowTemplate.hasMinSize - 244.windowTemplate.maxSize - 244.windowTemplate.minSize - 245.IBPluginDependency - 245.ImportedFromIB2 - 269.IBPluginDependency - 269.ImportedFromIB2 - 270.IBEditorWindowLastContentRect - 270.IBPluginDependency - 270.ImportedFromIB2 - 270.editorWindowContentRectSynchronizationRect - 272.IBPluginDependency - 272.ImportedFromIB2 - 285.IBEditorWindowLastContentRect - 285.IBPluginDependency - 285.IBViewEditorWindowController.showingBoundsRectangles - 285.IBViewEditorWindowController.showingLayoutRectangles - 285.IBWindowTemplateEditedContentRect - 285.ImportedFromIB2 - 285.editorWindowContentRectSynchronizationRect - 285.windowTemplate.hasMaxSize - 285.windowTemplate.hasMinSize - 285.windowTemplate.maxSize - 285.windowTemplate.minSize - 286.IBPluginDependency - 286.ImportedFromIB2 - 29.IBEditorWindowLastContentRect - 29.IBPluginDependency - 29.ImportedFromIB2 - 29.editorWindowContentRectSynchronizationRect - 292.IBPluginDependency - 292.ImportedFromIB2 - 293.IBPluginDependency - 293.ImportedFromIB2 - 295.IBPluginDependency - 295.ImportedFromIB2 - 296.IBPluginDependency - 296.ImportedFromIB2 - 297.IBPluginDependency - 297.ImportedFromIB2 - 298.IBPluginDependency - 298.ImportedFromIB2 - 300295.IBPluginDependency - 300295.IBShouldRemoveOnLegacySave - 300337.IBPluginDependency - 300337.ImportedFromIB2 - 300338.IBPluginDependency - 300338.ImportedFromIB2 - 300358.IBPluginDependency - 300358.ImportedFromIB2 - 300359.IBPluginDependency - 300359.ImportedFromIB2 - 300360.IBPluginDependency - 300361.IBPluginDependency - 300362.IBPluginDependency - 300362.ImportedFromIB2 - 300363.IBPluginDependency - 300364.IBPluginDependency - 300364.ImportedFromIB2 - 300365.IBPluginDependency - 300368.IBPluginDependency - 300368.ImportedFromIB2 - 300369.IBPluginDependency - 300370.IBPluginDependency - 300370.ImportedFromIB2 - 300371.IBPluginDependency - 300421.IBPluginDependency - 300421.ImportedFromIB2 - 300422.IBPluginDependency - 300422.ImportedFromIB2 - 300423.IBPluginDependency - 300423.ImportedFromIB2 - 300424.IBPluginDependency - 300424.ImportedFromIB2 - 300440.IBPluginDependency - 300441.IBPluginDependency - 300447.IBPluginDependency - 300447.ImportedFromIB2 - 300447.object.labelIdentifier - 300450.IBPluginDependency - 300450.object.labelIdentifier - 300451.IBPluginDependency - 300451.ImportedFromIB2 - 300451.object.labelIdentifier - 300452.IBPluginDependency - 300452.object.labelIdentifier - 300453.IBPluginDependency - 300453.ImportedFromIB2 - 300453.object.labelIdentifier - 300454.IBPluginDependency - 300454.object.labelIdentifier - 300455.IBPluginDependency - 300455.ImportedFromIB2 - 300456.IBPluginDependency - 300457.IBPluginDependency - 300457.ImportedFromIB2 - 300457.object.labelIdentifier - 300458.IBPluginDependency - 300458.object.labelIdentifier - 300459.IBPluginDependency - 300459.ImportedFromIB2 - 300460.IBPluginDependency - 300472.IBPluginDependency - 300472.ImportedFromIB2 - 300473.IBPluginDependency - 305.IBPluginDependency - 305.ImportedFromIB2 - 310.IBPluginDependency - 310.ImportedFromIB2 - 348.IBPluginDependency - 348.ImportedFromIB2 - 349.IBPluginDependency - 349.ImportedFromIB2 - 350.IBPluginDependency - 350.IBUserGuides - 350.ImportedFromIB2 - 351.IBPluginDependency - 351.ImportedFromIB2 - 352.IBPluginDependency - 352.ImportedFromIB2 - 353.IBPluginDependency - 353.ImportedFromIB2 - 354.IBPluginDependency - 354.ImportedFromIB2 - 363.IBPluginDependency - 363.ImportedFromIB2 - 364.IBPluginDependency - 364.ImportedFromIB2 - 365.IBPluginDependency - 365.ImportedFromIB2 - 368.IBPluginDependency - 368.ImportedFromIB2 - 369.IBPluginDependency - 369.ImportedFromIB2 - 370.IBPluginDependency - 370.ImportedFromIB2 - 371.IBPluginDependency - 371.ImportedFromIB2 - 372.IBPluginDependency - 372.ImportedFromIB2 - 374.IBPluginDependency - 374.ImportedFromIB2 - 375.IBPluginDependency - 375.ImportedFromIB2 - 376.IBPluginDependency - 376.ImportedFromIB2 - 377.IBPluginDependency - 377.ImportedFromIB2 - 379.IBPluginDependency - 379.ImportedFromIB2 - 380.IBEditorWindowLastContentRect - 380.IBPluginDependency - 380.ImportedFromIB2 - 381.IBPluginDependency - 381.ImportedFromIB2 - 382.IBPluginDependency - 382.ImportedFromIB2 - 383.IBPluginDependency - 383.ImportedFromIB2 - 384.IBPluginDependency - 384.ImportedFromIB2 - 385.IBPluginDependency - 385.ImportedFromIB2 - 386.IBPluginDependency - 386.ImportedFromIB2 - 419.IBPluginDependency - 419.ImportedFromIB2 - 420.IBPluginDependency - 420.ImportedFromIB2 - 421.IBPluginDependency - 421.ImportedFromIB2 - 423.IBPluginDependency - 423.ImportedFromIB2 - 435.IBPluginDependency - 435.ImportedFromIB2 - 5.IBPluginDependency - 5.ImportedFromIB2 - 524.IBPluginDependency - 524.ImportedFromIB2 - 526.IBPluginDependency - 526.ImportedFromIB2 - 527.IBPluginDependency - 527.ImportedFromIB2 - 532.IBPluginDependency - 532.ImportedFromIB2 - 533.IBPluginDependency - 533.ImportedFromIB2 - 535.IBPluginDependency - 535.ImportedFromIB2 - 536.IBPluginDependency - 536.ImportedFromIB2 - 537.IBPluginDependency - 537.ImportedFromIB2 - 538.IBPluginDependency - 538.ImportedFromIB2 - 541.IBPluginDependency - 541.ImportedFromIB2 - 543.IBPluginDependency - 543.ImportedFromIB2 - 544.IBPluginDependency - 544.ImportedFromIB2 - 545.IBPluginDependency - 545.ImportedFromIB2 - 56.IBPluginDependency - 56.ImportedFromIB2 - 57.IBEditorWindowLastContentRect - 57.IBPluginDependency - 57.ImportedFromIB2 - 57.editorWindowContentRectSynchronizationRect - 573.IBPluginDependency - 573.ImportedFromIB2 - 574.IBPluginDependency - 574.ImportedFromIB2 - 575.IBPluginDependency - 575.ImportedFromIB2 - 58.IBPluginDependency - 58.ImportedFromIB2 - 92.IBPluginDependency - 92.ImportedFromIB2 - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{168, 821}, {113, 23}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{202, 626}, {154, 153}} - com.apple.InterfaceBuilder.CocoaPlugin - - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{349, 868}, {315, 143}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{271, 666}, {301, 153}} - {{437, 749}, {582, 308}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{437, 749}, {582, 308}} - - {{184, 290}, {481, 345}} - - - {3.40282e+38, 3.40282e+38} - {320, 240} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{58, 803}, {155, 33}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{100, 746}, {155, 33}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{68, 585}, {454, 271}} - com.apple.InterfaceBuilder.CocoaPlugin - - - {{68, 585}, {454, 271}} - - {{433, 406}, {486, 327}} - - - {3.40282e+38, 3.40282e+38} - {320, 240} - com.apple.InterfaceBuilder.CocoaPlugin - - {{145, 1011}, {336, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{67, 819}, {336, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - IBBuiltInLabel-Red - com.apple.InterfaceBuilder.CocoaPlugin - IBBuiltInLabel-Red - com.apple.InterfaceBuilder.CocoaPlugin - - IBBuiltInLabel-Red - com.apple.InterfaceBuilder.CocoaPlugin - IBBuiltInLabel-Red - com.apple.InterfaceBuilder.CocoaPlugin - - IBBuiltInLabel-Red - com.apple.InterfaceBuilder.CocoaPlugin - IBBuiltInLabel-Red - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - IBBuiltInLabel-Red - com.apple.InterfaceBuilder.CocoaPlugin - IBBuiltInLabel-Red - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - YES - - - 36 - 0 - + + 300476 + + + + + - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{553, 917}, {155, 83}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{20, 641}, {218, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{79, 616}, {218, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - - - - YES - - - YES - + + 300477 + + + + + + + + 300478 + + + + + 300479 + + + + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + {{318, 756}, {64, 6}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{176, 789}, {120, 23}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{202, 626}, {154, 153}} + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{242, 669}, {365, 143}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{271, 666}, {301, 153}} + {{575, 463}, {582, 329}} + com.apple.InterfaceBuilder.CocoaPlugin + {{575, 463}, {582, 329}} + + {{184, 290}, {481, 345}} + + + {3.40282e+38, 3.40282e+38} + {320, 240} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{74, 779}, {171, 33}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{100, 746}, {155, 33}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{838, 503}, {548, 271}} + com.apple.InterfaceBuilder.CocoaPlugin + + + {{838, 503}, {548, 271}} + + {{433, 406}, {486, 327}} + + + {3.40282e+38, 3.40282e+38} + {320, 240} + com.apple.InterfaceBuilder.CocoaPlugin + + {{16, 812}, {356, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{67, 819}, {336, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{274, 290}, {155, 83}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{311, 789}, {128, 23}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{567, 341}, {150, 33}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{717, 331}, {171, 33}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{28, 609}, {290, 203}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{79, 616}, {218, 203}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + - - YES - - - YES - - + - 300475 + 300481 - - YES + FirstResponder NSObject @@ -3934,19 +3596,21 @@ A - + 0 + IBCocoaFramework com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - - com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 - + YES ../X11.xcodeproj 3 + + {9, 8} + {7, 2} + {15, 15} + diff --git a/xserver/hw/xquartz/bundle/Resources/German.lproj/locversion.plist b/xserver/hw/xquartz/bundle/Resources/German.lproj/locversion.plist index e10376e68..061f05311 100644 --- a/xserver/hw/xquartz/bundle/Resources/German.lproj/locversion.plist +++ b/xserver/hw/xquartz/bundle/Resources/German.lproj/locversion.plist @@ -3,12 +3,12 @@ LprojCompatibleVersion - 93 + 97 LprojLocale de LprojRevisionLevel 1 LprojVersion - 93 + 97 diff --git a/xserver/hw/xquartz/bundle/Resources/German.lproj/main.nib/designable.nib b/xserver/hw/xquartz/bundle/Resources/German.lproj/main.nib/designable.nib index 5fc898489..f2ae22d37 100644 --- a/xserver/hw/xquartz/bundle/Resources/German.lproj/main.nib/designable.nib +++ b/xserver/hw/xquartz/bundle/Resources/German.lproj/main.nib/designable.nib @@ -1,33 +1,24 @@ - + - 1050 - 11A79a + 1040 + 10A432 732 - 1059 - 478.00 + 1038 + 437.00 com.apple.InterfaceBuilder.CocoaPlugin 732 - - YES - - - YES + + com.apple.InterfaceBuilder.CocoaPlugin - + - YES - - YES - - - YES - + PluginDependencyRecalculationVersion + - - YES + NSApplication @@ -41,8 +32,7 @@ MainMenu - - YES + X11 @@ -60,8 +50,7 @@ submenuAction: X11 - - YES + Über X11 @@ -101,9 +90,7 @@ submenuAction: Dienste - - YES - + _NSServicesMenu @@ -187,7 +174,7 @@ - + _NSAppleMenu @@ -202,8 +189,7 @@ submenuAction: Programme - - YES + YES @@ -224,7 +210,7 @@ - + @@ -238,8 +224,7 @@ submenuAction: Bearbeiten - - YES + Kopieren @@ -249,7 +234,7 @@ - + @@ -263,8 +248,7 @@ submenuAction: Fenster - - YES + Schließen @@ -341,7 +325,7 @@ - + _NSWindowsMenu @@ -356,8 +340,7 @@ submenuAction: Hilfe - - YES + X11 Hilfe @@ -367,10 +350,10 @@ - + - + _NSMainMenu @@ -386,20 +369,19 @@ View - {1.7976931348623157e+308, 1.7976931348623157e+308} + {3.40282e+38, 3.40282e+38} {320, 240} - + 256 - - YES + 256 {{13, 10}, {579, 286}} - - YES + + 1 @@ -407,13 +389,13 @@ 256 - - YES + 256 - {{18, 204}, {402, 18}} + {{18, 211}, {402, 18}} + YES 67239424 @@ -427,7 +409,7 @@ 1211912703 2 - + NSImage NSSwitch @@ -443,8 +425,9 @@ 256 - {{36, 43}, {376, 28}} + {{36, 60}, {376, 28}} + YES 67239424 @@ -463,7 +446,7 @@ controlColor 3 - MC42NjY2NjY2NjY3AA + MC42NjY2NjY2ODY1AA @@ -480,8 +463,9 @@ 256 - {{36, 156}, {385, 42}} + {{36, 171}, {385, 34}} + YES 67239424 @@ -499,8 +483,9 @@ dmllcmVuLgo 256 - {{18, 77}, {402, 18}} + {{18, 94}, {402, 18}} + YES 67239424 @@ -510,7 +495,7 @@ dmllcmVuLgo 1211912703 2 - + @@ -521,8 +506,9 @@ dmllcmVuLgo 256 - {{36, 106}, {385, 28}} + {{36, 118}, {385, 28}} + YES 67239424 @@ -538,8 +524,9 @@ dmllcmVuLgo 256 - {{18, 140}, {402, 18}} + {{18, 152}, {402, 18}} + YES 67239424 @@ -549,7 +536,7 @@ dmllcmVuLgo 1211912703 2 - + @@ -557,9 +544,50 @@ dmllcmVuLgo 25 - + + + 256 + {{36, -1}, {385, 31}} + + + YES + + 67239424 + 4194304 + Bei Aktivierung entsprechen die Wahltasten Alt_L und Alt_R X11-Tastensymbolen anstatt „Mode_switch“. + + + + + + + + + 256 + {{18, 36}, {402, 18}} + + + YES + + 67239424 + 0 + Wahltasten entsprechen Alt_L und Alt_R + + + 1211912703 + 2 + + + + + 200 + 25 + + + {{10, 33}, {559, 240}} + Eingabe @@ -572,8 +600,7 @@ dmllcmVuLgo 256 - - YES + 256 @@ -588,7 +615,7 @@ dmllcmVuLgo 1211912703 2 - + @@ -655,8 +682,7 @@ dmllcmVuLgo OtherViews - - YES + @@ -694,7 +720,7 @@ dmllcmVuLgo 24 - + 3 YES @@ -711,7 +737,7 @@ dmllcmVuLgo 67239424 4194304 - RmFyYmVuOgo + Farben: @@ -750,7 +776,7 @@ dmllcmVuLgo 1211912703 2 - + @@ -772,7 +798,7 @@ dmllcmVuLgo 1211912703 2 - + @@ -797,7 +823,7 @@ dmllcmVuLgo - + {{10, 33}, {559, 240}} Ausgabe @@ -811,8 +837,7 @@ dmllcmVuLgo 256 - - YES + 256 @@ -827,7 +852,7 @@ dmllcmVuLgo 1211912703 2 - + @@ -865,7 +890,7 @@ dmllcmVuLgo 1211912703 2 - + @@ -882,12 +907,12 @@ dmllcmVuLgo 67239424 0 - PRIMARY (Middle-Click) aktualisieren, wenn Pasteboard geändert wird + PRIMARY (Mittel-Klick) aktualisieren, wenn Pasteboard geändert wird 1211912703 2 - + @@ -909,7 +934,7 @@ dmllcmVuLgo 1211912703 2 - + @@ -931,7 +956,7 @@ dmllcmVuLgo 1211912703 2 - + @@ -971,7 +996,7 @@ dmllcmVuLgo - + {{10, 33}, {559, 240}} Zwischenablage @@ -985,8 +1010,7 @@ dmllcmVuLgo 256 - - YES + 256 @@ -1001,7 +1025,7 @@ dmllcmVuLgo 1211912703 2 - + @@ -1039,7 +1063,7 @@ dmllcmVuLgo 1211912703 2 - + @@ -1077,7 +1101,7 @@ dmllcmVuLgo 1211912703 2 - + @@ -1101,7 +1125,7 @@ dmllcmVuLgo - + {{10, 33}, {559, 240}} Fenster @@ -1112,23 +1136,22 @@ dmllcmVuLgo 256 - - YES + 256 - {{18, 204}, {199, 18}} + {{18, 204}, {215, 18}} YES 67239424 0 - Verbindungen identifizieren + Verbindungen authentifizieren 1211912703 2 - + @@ -1139,7 +1162,7 @@ dmllcmVuLgo 256 - {{18, 113}, {312, 18}} + {{18, 121}, {312, 18}} YES @@ -1150,7 +1173,7 @@ dmllcmVuLgo 1211912703 2 - + @@ -1161,7 +1184,7 @@ dmllcmVuLgo 256 - {{36, 142}, {463, 56}} + {{36, 150}, {463, 48}} YES @@ -1178,13 +1201,13 @@ dmllcmVuLgo 256 - {{36, 51}, {463, 56}} + {{36, 59}, {463, 56}} YES 67239424 4194304 - Bei Aktivierung muss „Verbindungen Identifizieren“ ebenfalls aktiviert sein, damit die Sicherheit des System gewährleistet ist. Bei Deaktivierung sind Verbindungen von entfernten Programmen nicht erlaubt. + Bei Aktivierung muss „Verbindungen authentifizieren“ ebenfalls aktiviert sein, damit die Sicherheit des System gewährleistet ist. Bei Deaktivierung sind Verbindungen von entfernten Programmen nicht erlaubt. @@ -1209,30 +1232,31 @@ dmllcmVuLgo - + {{10, 33}, {559, 240}} Sicherheit - + 0 YES YES - - YES + - + - + {613, 302} + + {{0, 0}, {1440, 878}} {320, 262} - {1.7976931348623157e+308, 1.7976931348623157e+308} + {3.40282e+38, 3.40282e+38} x11_prefs @@ -1245,13 +1269,12 @@ dmllcmVuLgo View - {1.7976931348623157e+308, 1.7976931348623157e+308} - {320, 240} + {3.40282e+38, 3.40282e+38} + {512, 240} 256 - - YES + 265 @@ -1305,13 +1328,11 @@ dmllcmVuLgo 274 - - YES + 2304 - - YES + 256 @@ -1331,8 +1352,7 @@ dmllcmVuLgo {{302, 0}, {16, 17}} - - YES + 122.73100280761719 62.730998992919922 @@ -1344,7 +1364,7 @@ dmllcmVuLgo 3 - MC4zMzMzMzI5OQA + MC4zMzMzMzI5ODU2AA 6 @@ -1440,7 +1460,7 @@ dmllcmVuLgo YES - + 3 2 @@ -1463,10 +1483,9 @@ dmllcmVuLgo YES 0 - + {{1, 17}, {301, 198}} - 4 @@ -1478,7 +1497,7 @@ dmllcmVuLgo _doScroller: - 0.99492380000000002 + 0.99492377042770386 @@ -1488,27 +1507,24 @@ dmllcmVuLgo 1 _doScroller: - 0.68852460000000004 + 0.68852460384368896 2304 - - YES + - + {{1, 0}, {301, 17}} - 4 - + {{20, 20}, {318, 231}} - 50 @@ -1540,18 +1556,17 @@ dmllcmVuLgo 25 - + {512, 271} {{0, 0}, {1440, 878}} - {320, 262} - {1.7976931348623157e+308, 1.7976931348623157e+308} + {512, 262} + {3.40282e+38, 3.40282e+38} x11_apps Menü - - YES + YES @@ -1574,8 +1589,7 @@ dmllcmVuLgo submenuAction: Programme - - YES + YES @@ -1596,16 +1610,15 @@ dmllcmVuLgo - + - + - + - - YES + copy: @@ -2150,13 +2163,28 @@ dmllcmVuLgo 300475 - + + + prefs_changed: + + + + 300480 + + + + option_sends_alt + + + + 300481 + + - - YES + 0 - + @@ -2181,31 +2209,28 @@ dmllcmVuLgo 29 - - YES + - + MainMenu 19 - - YES + - + 24 - - YES + @@ -2214,7 +2239,7 @@ dmllcmVuLgo - + @@ -2260,17 +2285,15 @@ dmllcmVuLgo 56 - - YES + - + 57 - - YES + @@ -2283,7 +2306,7 @@ dmllcmVuLgo - + @@ -2299,10 +2322,9 @@ dmllcmVuLgo 131 - - YES + - + @@ -2358,19 +2380,17 @@ dmllcmVuLgo 163 - - YES + - + 169 - - YES + - + @@ -2381,20 +2401,18 @@ dmllcmVuLgo 269 - - YES + - + 270 - - YES + - + @@ -2410,19 +2428,17 @@ dmllcmVuLgo 419 - - YES + - + 420 - - YES + - + @@ -2439,126 +2455,115 @@ dmllcmVuLgo 244 - - YES + - + PrefsPanel 245 - - YES + - + 348 - - YES + - + 349 - - YES + - + 351 - - YES + - + + + 363 - - YES + - + 364 - - YES + - + 365 - - YES + - + 368 - - YES + - + 369 - - YES + - + 370 - - YES + - + 352 - - YES + - + 350 - - YES + @@ -2567,169 +2572,152 @@ dmllcmVuLgo - + 371 - - YES + - + 372 - - YES + - + 382 - - YES + - + 385 - - YES + - + 386 - - YES + - + 541 - - YES + - + 543 - - YES + - + 353 - - YES + - + 354 - - YES + - + 374 - - YES + - + 375 - - YES + - + 376 - - YES + - + 377 - - YES + - + 379 - - YES + - + 285 - - YES + - + EditPrograms 286 - - YES + - + 423 - - YES + - + DockMenu @@ -2741,20 +2729,18 @@ dmllcmVuLgo 526 - - YES + - + 527 - - YES + - + @@ -2810,10 +2796,9 @@ dmllcmVuLgo 100382 - - YES + - + @@ -2864,13 +2849,12 @@ dmllcmVuLgo 380 - - YES + - + @@ -2896,13 +2880,12 @@ dmllcmVuLgo 295 - - YES + - + @@ -2923,21 +2906,19 @@ dmllcmVuLgo 296 - - YES + - + 535 - - YES + - + @@ -2948,10 +2929,9 @@ dmllcmVuLgo 298 - - YES + - + @@ -2962,10 +2942,9 @@ dmllcmVuLgo 297 - - YES + - + @@ -2976,10 +2955,9 @@ dmllcmVuLgo 310 - - YES + - + @@ -2990,10 +2968,9 @@ dmllcmVuLgo 292 - - YES + - + @@ -3004,10 +2981,9 @@ dmllcmVuLgo 293 - - YES + - + @@ -3018,42 +2994,38 @@ dmllcmVuLgo 300337 - - YES + - + 300338 - - YES + - + 300358 - - YES + - + 300359 - - YES + - + @@ -3069,10 +3041,9 @@ dmllcmVuLgo 300362 - - YES + - + @@ -3083,10 +3054,9 @@ dmllcmVuLgo 300364 - - YES + - + @@ -3097,10 +3067,9 @@ dmllcmVuLgo 300368 - - YES + - + @@ -3111,10 +3080,9 @@ dmllcmVuLgo 300370 - - YES + - + @@ -3125,17 +3093,15 @@ dmllcmVuLgo 300421 - - YES + - + 300422 - - YES + @@ -3144,25 +3110,23 @@ dmllcmVuLgo - + 300423 - - YES + - + 300424 - - YES + - + @@ -3178,10 +3142,9 @@ dmllcmVuLgo 300447 - - YES + - + @@ -3192,10 +3155,9 @@ dmllcmVuLgo 300451 - - YES + - + @@ -3206,10 +3168,9 @@ dmllcmVuLgo 300453 - - YES + - + @@ -3220,10 +3181,9 @@ dmllcmVuLgo 300455 - - YES + - + @@ -3234,10 +3194,9 @@ dmllcmVuLgo 300457 - - YES + - + @@ -3248,10 +3207,9 @@ dmllcmVuLgo 300459 - - YES + - + @@ -3262,10 +3220,9 @@ dmllcmVuLgo 300472 - - YES + - + @@ -3273,604 +3230,333 @@ dmllcmVuLgo - - - - YES - - YES - -3.IBPluginDependency - -3.ImportedFromIB2 - 100292.IBPluginDependency - 100293.IBPluginDependency - 100295.IBPluginDependency - 100295.IBShouldRemoveOnLegacySave - 100310.IBPluginDependency - 100363.IBPluginDependency - 100364.IBPluginDependency - 100365.IBPluginDependency - 100368.IBPluginDependency - 100369.IBPluginDependency - 100370.IBPluginDependency - 100371.IBPluginDependency - 100372.IBPluginDependency - 100374.IBPluginDependency - 100375.IBPluginDependency - 100376.IBPluginDependency - 100377.IBPluginDependency - 100379.IBPluginDependency - 100382.IBPluginDependency - 100385.IBPluginDependency - 100386.IBPluginDependency - 100541.IBPluginDependency - 100543.IBPluginDependency - 129.IBPluginDependency - 129.ImportedFromIB2 - 130.IBPluginDependency - 130.ImportedFromIB2 - 131.IBPluginDependency - 131.ImportedFromIB2 - 134.IBPluginDependency - 134.ImportedFromIB2 - 136.IBPluginDependency - 136.ImportedFromIB2 - 143.IBPluginDependency - 143.ImportedFromIB2 - 144.IBPluginDependency - 144.ImportedFromIB2 - 145.IBPluginDependency - 145.ImportedFromIB2 - 149.IBPluginDependency - 149.ImportedFromIB2 - 150.IBPluginDependency - 150.ImportedFromIB2 - 157.IBPluginDependency - 157.ImportedFromIB2 - 163.IBPluginDependency - 163.ImportedFromIB2 - 169.IBEditorWindowLastContentRect - 169.IBPluginDependency - 169.ImportedFromIB2 - 169.editorWindowContentRectSynchronizationRect - 19.IBPluginDependency - 19.ImportedFromIB2 - 196.ImportedFromIB2 - 200295.IBPluginDependency - 200295.IBShouldRemoveOnLegacySave - 203.IBPluginDependency - 203.ImportedFromIB2 - 204.IBPluginDependency - 204.ImportedFromIB2 - 23.IBPluginDependency - 23.ImportedFromIB2 - 24.IBEditorWindowLastContentRect - 24.IBPluginDependency - 24.ImportedFromIB2 - 24.editorWindowContentRectSynchronizationRect - 244.IBEditorWindowLastContentRect - 244.IBPluginDependency - 244.IBWindowTemplateEditedContentRect - 244.ImportedFromIB2 - 244.editorWindowContentRectSynchronizationRect - 244.windowTemplate.hasMaxSize - 244.windowTemplate.hasMinSize - 244.windowTemplate.maxSize - 244.windowTemplate.minSize - 245.IBPluginDependency - 245.ImportedFromIB2 - 269.IBPluginDependency - 269.ImportedFromIB2 - 270.IBEditorWindowLastContentRect - 270.IBPluginDependency - 270.ImportedFromIB2 - 270.editorWindowContentRectSynchronizationRect - 272.IBPluginDependency - 272.ImportedFromIB2 - 285.IBEditorWindowLastContentRect - 285.IBPluginDependency - 285.IBViewEditorWindowController.showingBoundsRectangles - 285.IBViewEditorWindowController.showingLayoutRectangles - 285.IBWindowTemplateEditedContentRect - 285.ImportedFromIB2 - 285.editorWindowContentRectSynchronizationRect - 285.windowTemplate.hasMaxSize - 285.windowTemplate.hasMinSize - 285.windowTemplate.maxSize - 285.windowTemplate.minSize - 286.IBPluginDependency - 286.ImportedFromIB2 - 29.IBEditorWindowLastContentRect - 29.IBPluginDependency - 29.ImportedFromIB2 - 29.editorWindowContentRectSynchronizationRect - 292.IBPluginDependency - 292.ImportedFromIB2 - 293.IBPluginDependency - 293.ImportedFromIB2 - 295.IBPluginDependency - 295.ImportedFromIB2 - 296.IBPluginDependency - 296.ImportedFromIB2 - 297.IBPluginDependency - 297.ImportedFromIB2 - 298.IBPluginDependency - 298.ImportedFromIB2 - 300295.IBPluginDependency - 300295.IBShouldRemoveOnLegacySave - 300337.IBPluginDependency - 300337.ImportedFromIB2 - 300338.IBPluginDependency - 300338.ImportedFromIB2 - 300358.IBPluginDependency - 300358.ImportedFromIB2 - 300359.IBPluginDependency - 300359.ImportedFromIB2 - 300360.IBPluginDependency - 300361.IBPluginDependency - 300362.IBPluginDependency - 300362.ImportedFromIB2 - 300363.IBPluginDependency - 300364.IBPluginDependency - 300364.ImportedFromIB2 - 300365.IBPluginDependency - 300368.IBPluginDependency - 300368.ImportedFromIB2 - 300369.IBPluginDependency - 300370.IBPluginDependency - 300370.ImportedFromIB2 - 300371.IBPluginDependency - 300421.IBPluginDependency - 300421.ImportedFromIB2 - 300422.IBPluginDependency - 300422.ImportedFromIB2 - 300423.IBPluginDependency - 300423.ImportedFromIB2 - 300424.IBPluginDependency - 300424.ImportedFromIB2 - 300440.IBPluginDependency - 300441.IBPluginDependency - 300447.IBPluginDependency - 300447.ImportedFromIB2 - 300450.IBPluginDependency - 300451.IBPluginDependency - 300451.ImportedFromIB2 - 300452.IBPluginDependency - 300453.IBPluginDependency - 300453.ImportedFromIB2 - 300454.IBPluginDependency - 300455.IBPluginDependency - 300455.ImportedFromIB2 - 300456.IBPluginDependency - 300457.IBPluginDependency - 300457.ImportedFromIB2 - 300458.IBPluginDependency - 300459.IBPluginDependency - 300459.ImportedFromIB2 - 300460.IBPluginDependency - 300472.IBPluginDependency - 300472.ImportedFromIB2 - 300473.IBPluginDependency - 305.IBPluginDependency - 305.ImportedFromIB2 - 310.IBPluginDependency - 310.ImportedFromIB2 - 348.IBPluginDependency - 348.ImportedFromIB2 - 349.IBPluginDependency - 349.ImportedFromIB2 - 350.IBPluginDependency - 350.ImportedFromIB2 - 351.IBPluginDependency - 351.ImportedFromIB2 - 352.IBPluginDependency - 352.ImportedFromIB2 - 353.IBPluginDependency - 353.ImportedFromIB2 - 354.IBPluginDependency - 354.ImportedFromIB2 - 363.IBPluginDependency - 363.ImportedFromIB2 - 364.IBPluginDependency - 364.ImportedFromIB2 - 365.IBPluginDependency - 365.ImportedFromIB2 - 368.IBPluginDependency - 368.ImportedFromIB2 - 369.IBPluginDependency - 369.ImportedFromIB2 - 370.IBPluginDependency - 370.ImportedFromIB2 - 371.IBPluginDependency - 371.ImportedFromIB2 - 372.IBPluginDependency - 372.ImportedFromIB2 - 374.IBPluginDependency - 374.ImportedFromIB2 - 375.IBPluginDependency - 375.ImportedFromIB2 - 376.IBPluginDependency - 376.ImportedFromIB2 - 377.IBPluginDependency - 377.ImportedFromIB2 - 379.IBPluginDependency - 379.ImportedFromIB2 - 380.IBPluginDependency - 380.ImportedFromIB2 - 381.IBPluginDependency - 381.ImportedFromIB2 - 382.IBPluginDependency - 382.ImportedFromIB2 - 383.IBPluginDependency - 383.ImportedFromIB2 - 384.IBPluginDependency - 384.ImportedFromIB2 - 385.IBPluginDependency - 385.ImportedFromIB2 - 386.IBPluginDependency - 386.ImportedFromIB2 - 419.IBPluginDependency - 419.ImportedFromIB2 - 420.IBPluginDependency - 420.ImportedFromIB2 - 421.IBPluginDependency - 421.ImportedFromIB2 - 423.IBPluginDependency - 423.ImportedFromIB2 - 435.IBPluginDependency - 435.ImportedFromIB2 - 5.IBPluginDependency - 5.ImportedFromIB2 - 524.IBPluginDependency - 524.ImportedFromIB2 - 526.IBPluginDependency - 526.ImportedFromIB2 - 527.IBPluginDependency - 527.ImportedFromIB2 - 532.IBPluginDependency - 532.ImportedFromIB2 - 533.IBPluginDependency - 533.ImportedFromIB2 - 535.IBPluginDependency - 535.ImportedFromIB2 - 536.IBPluginDependency - 536.ImportedFromIB2 - 537.IBPluginDependency - 537.ImportedFromIB2 - 538.IBPluginDependency - 538.ImportedFromIB2 - 541.IBPluginDependency - 541.ImportedFromIB2 - 543.IBPluginDependency - 543.ImportedFromIB2 - 544.IBPluginDependency - 544.ImportedFromIB2 - 545.IBPluginDependency - 545.ImportedFromIB2 - 56.IBPluginDependency - 56.ImportedFromIB2 - 57.IBEditorWindowLastContentRect - 57.IBPluginDependency - 57.ImportedFromIB2 - 57.editorWindowContentRectSynchronizationRect - 573.IBPluginDependency - 573.ImportedFromIB2 - 574.IBPluginDependency - 574.ImportedFromIB2 - 575.IBPluginDependency - 575.ImportedFromIB2 - 58.IBPluginDependency - 58.ImportedFromIB2 - 92.IBPluginDependency - 92.ImportedFromIB2 - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{168, 821}, {113, 23}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{202, 626}, {154, 153}} - com.apple.InterfaceBuilder.CocoaPlugin - - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{349, 868}, {315, 143}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{271, 666}, {301, 153}} - {{437, 749}, {484, 308}} - com.apple.InterfaceBuilder.CocoaPlugin - {{437, 749}, {484, 308}} - - {{184, 290}, {481, 345}} - - - {3.40282e+38, 3.40282e+38} - {320, 240} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{58, 803}, {155, 33}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{100, 746}, {155, 33}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{68, 585}, {454, 271}} - com.apple.InterfaceBuilder.CocoaPlugin - - - {{68, 585}, {454, 271}} - - {{433, 406}, {486, 327}} - - - {3.40282e+38, 3.40282e+38} - {320, 240} - com.apple.InterfaceBuilder.CocoaPlugin - - {{145, 1011}, {336, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{67, 819}, {336, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{20, 641}, {218, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{79, 616}, {218, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - - - - YES - - - YES - + + 300476 + + + + + + + + 300477 + + + + + + + + 300478 + + + + + 300479 + + + + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{168, 821}, {113, 23}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{202, 626}, {154, 153}} + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{349, 868}, {315, 143}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{271, 666}, {301, 153}} + {{507, 554}, {613, 302}} + com.apple.InterfaceBuilder.CocoaPlugin + {{507, 554}, {613, 302}} + + {{184, 290}, {481, 345}} + + + {3.40282e+38, 3.40282e+38} + {320, 240} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{58, 803}, {155, 33}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{100, 746}, {155, 33}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{68, 585}, {512, 271}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{68, 585}, {512, 271}} + + {{433, 406}, {486, 327}} + + + {3.40282e+38, 3.40282e+38} + {512, 240} + com.apple.InterfaceBuilder.CocoaPlugin + + {{145, 1011}, {336, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{67, 819}, {336, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{20, 641}, {218, 203}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{79, 616}, {218, 203}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + - - YES - - - YES - - + - 300475 + 300481 - - YES + FirstResponder NSObject @@ -3895,16 +3581,12 @@ dmllcmVuLgo - + 0 com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - - com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 - + YES ../X11.xcodeproj diff --git a/xserver/hw/xquartz/bundle/Resources/Italian.lproj/locversion.plist b/xserver/hw/xquartz/bundle/Resources/Italian.lproj/locversion.plist index b170cc465..144d5da54 100644 --- a/xserver/hw/xquartz/bundle/Resources/Italian.lproj/locversion.plist +++ b/xserver/hw/xquartz/bundle/Resources/Italian.lproj/locversion.plist @@ -3,12 +3,12 @@ LprojCompatibleVersion - 93 + 97 LprojLocale it LprojRevisionLevel 1 LprojVersion - 93 + 97 diff --git a/xserver/hw/xquartz/bundle/Resources/Italian.lproj/main.nib/designable.nib b/xserver/hw/xquartz/bundle/Resources/Italian.lproj/main.nib/designable.nib index 90f8d4cb1..2993e3a3c 100644 --- a/xserver/hw/xquartz/bundle/Resources/Italian.lproj/main.nib/designable.nib +++ b/xserver/hw/xquartz/bundle/Resources/Italian.lproj/main.nib/designable.nib @@ -1,7 +1,7 @@ - + - 1050 + 1040 11A79a 732 1059 @@ -10,24 +10,12 @@ com.apple.InterfaceBuilder.CocoaPlugin 732 - - YES - - - YES + + com.apple.InterfaceBuilder.CocoaPlugin - - - YES - - YES - - - YES - - - - YES + + + NSApplication @@ -41,8 +29,7 @@ MainMenu - - YES + X11 @@ -60,8 +47,7 @@ submenuAction: X11 - - YES + Informazioni su X11 @@ -101,9 +87,7 @@ submenuAction: Servizi - - YES - + _NSServicesMenu @@ -187,7 +171,7 @@ - + _NSAppleMenu @@ -202,8 +186,7 @@ submenuAction: Applicazioni - - YES + YES @@ -224,7 +207,7 @@ - + @@ -238,8 +221,7 @@ submenuAction: Composizione - - YES + Copia @@ -249,7 +231,7 @@ - + @@ -263,8 +245,7 @@ submenuAction: Finestra - - YES + Chiudi @@ -341,7 +322,7 @@ - + _NSWindowsMenu @@ -356,8 +337,7 @@ submenuAction: Aiuto - - YES + Aiuto X11 @@ -367,10 +347,10 @@ - + - + _NSMainMenu @@ -391,15 +371,13 @@ 256 - - YES + 256 {{13, 10}, {638, 292}} - - YES + 1 @@ -407,8 +385,7 @@ 256 - - YES + 256 @@ -427,7 +404,7 @@ 1211912703 2 - + NSImage NSSwitch @@ -510,7 +487,7 @@ Q29tYW5kby4KA 1211912703 2 - + @@ -549,7 +526,7 @@ Q29tYW5kby4KA 1211912703 2 - + @@ -557,7 +534,45 @@ Q29tYW5kby4KA 25 - + + + 256 + {{93, -1}, {385, 31}} + + YES + + 67239424 + 4194304 + Se abilitati, i tasti Opzione inviano i simboli dei tasti X11 Alt_L e Alt_R anziché Mode_switch. + + + + + + + + + 256 + {{75, 32}, {402, 18}} + + YES + + 67239424 + 0 + I tasti Opzione inviano Alt_L e Alt_R + + + 1211912703 + 2 + + + + + 200 + 25 + + + {{10, 33}, {618, 246}} @@ -572,8 +587,7 @@ Q29tYW5kby4KA 256 - - YES + 256 @@ -588,7 +602,7 @@ Q29tYW5kby4KA 1211912703 2 - + @@ -655,8 +669,7 @@ Q29tYW5kby4KA OtherViews - - YES + @@ -694,7 +707,7 @@ Q29tYW5kby4KA 24 - + 3 YES @@ -711,7 +724,7 @@ Q29tYW5kby4KA 67239424 4194304 - Q29sb3JpOgo + Colori: @@ -750,7 +763,7 @@ Q29tYW5kby4KA 1211912703 2 - + @@ -772,7 +785,7 @@ Q29tYW5kby4KA 1211912703 2 - + @@ -797,7 +810,7 @@ Q29tYW5kby4KA - + {{10, 33}, {618, 246}} Uscita @@ -811,8 +824,7 @@ Q29tYW5kby4KA 256 - - YES + 256 @@ -827,7 +839,7 @@ Q29tYW5kby4KA 1211912703 2 - + @@ -865,7 +877,7 @@ Q29tYW5kby4KA 1211912703 2 - + @@ -887,7 +899,7 @@ Q29tYW5kby4KA 1211912703 2 - + @@ -909,7 +921,7 @@ Q29tYW5kby4KA 1211912703 2 - + @@ -931,7 +943,7 @@ Q29tYW5kby4KA 1211912703 2 - + @@ -971,7 +983,7 @@ Q29tYW5kby4KA - + {{10, 33}, {618, 246}} Appunti @@ -985,8 +997,7 @@ Q29tYW5kby4KA 256 - - YES + 256 @@ -1001,7 +1012,7 @@ Q29tYW5kby4KA 1211912703 2 - + @@ -1039,7 +1050,7 @@ Q29tYW5kby4KA 1211912703 2 - + @@ -1077,7 +1088,7 @@ Q29tYW5kby4KA 1211912703 2 - + @@ -1101,10 +1112,10 @@ Q29tYW5kby4KA - + {{10, 33}, {618, 246}} - Finestre + Windows @@ -1112,8 +1123,7 @@ Q29tYW5kby4KA 256 - - YES + 256 @@ -1128,7 +1138,7 @@ Q29tYW5kby4KA 1211912703 2 - + @@ -1150,7 +1160,7 @@ Q29tYW5kby4KA 1211912703 2 - + @@ -1209,25 +1219,24 @@ Q29tYW5kby4KA - + {{10, 33}, {618, 246}} Protezione - + 0 YES YES - - YES + - + - + {664, 308} {{0, 0}, {1280, 938}} @@ -1250,8 +1259,7 @@ Q29tYW5kby4KA 256 - - YES + 265 @@ -1305,13 +1313,11 @@ Q29tYW5kby4KA 274 - - YES + 2304 - - YES + 256 @@ -1331,8 +1337,7 @@ Q29tYW5kby4KA {{334, 0}, {16, 17}} - - YES + 132.73100280761719 62.730998992919922 @@ -1344,7 +1349,7 @@ Q29tYW5kby4KA 3 - MC4zMzMzMzI5OQA + MC4zMzMzMzI5ODU2AA 6 @@ -1443,7 +1448,7 @@ Q29tYW5kby4KA - + 3 2 @@ -1466,7 +1471,7 @@ Q29tYW5kby4KA YES 0 - + {{1, 17}, {333, 198}} @@ -1481,7 +1486,7 @@ Q29tYW5kby4KA _doScroller: - 0.99492380000000002 + 0.99492377042770386 @@ -1491,15 +1496,14 @@ Q29tYW5kby4KA 1 _doScroller: - 0.68852460000000004 + 0.68852460384368896 2304 - - YES + - + {{1, 0}, {333, 17}} @@ -1508,7 +1512,7 @@ Q29tYW5kby4KA 4 - + {{20, 20}, {350, 231}} @@ -1543,7 +1547,7 @@ Q29tYW5kby4KA 25 - + {546, 271} {{0, 0}, {1280, 938}} @@ -1553,8 +1557,7 @@ Q29tYW5kby4KA Menu - - YES + YES @@ -1577,8 +1580,7 @@ Q29tYW5kby4KA submenuAction: Applicazioni - - YES + YES @@ -1599,16 +1601,15 @@ Q29tYW5kby4KA - + - + - + - - YES + copy: @@ -2153,13 +2154,28 @@ Q29tYW5kby4KA 300475 - + + + prefs_changed: + + + + 300480 + + + + option_sends_alt + + + + 300481 + + - - YES + 0 - + @@ -2184,31 +2200,28 @@ Q29tYW5kby4KA 29 - - YES + - + MainMenu 19 - - YES + - + 24 - - YES + @@ -2217,7 +2230,7 @@ Q29tYW5kby4KA - + @@ -2263,17 +2276,15 @@ Q29tYW5kby4KA 56 - - YES + - + 57 - - YES + @@ -2286,7 +2297,7 @@ Q29tYW5kby4KA - + @@ -2302,10 +2313,9 @@ Q29tYW5kby4KA 131 - - YES + - + @@ -2361,19 +2371,17 @@ Q29tYW5kby4KA 163 - - YES + - + 169 - - YES + - + @@ -2384,20 +2392,18 @@ Q29tYW5kby4KA 269 - - YES + - + 270 - - YES + - + @@ -2413,19 +2419,17 @@ Q29tYW5kby4KA 419 - - YES + - + 420 - - YES + - + @@ -2442,126 +2446,115 @@ Q29tYW5kby4KA 244 - - YES + - + PrefsPanel 245 - - YES + - + 348 - - YES + - + 349 - - YES + - + 351 - - YES + - + + + 363 - - YES + - + 364 - - YES + - + 365 - - YES + - + 368 - - YES + - + 369 - - YES + - + 370 - - YES + - + 352 - - YES + - + 350 - - YES + @@ -2570,169 +2563,152 @@ Q29tYW5kby4KA - + 371 - - YES + - + 372 - - YES + - + 382 - - YES + - + 385 - - YES + - + 386 - - YES + - + 541 - - YES + - + 543 - - YES + - + 353 - - YES + - + 354 - - YES + - + 374 - - YES + - + 375 - - YES + - + 376 - - YES + - + 377 - - YES + - + 379 - - YES + - + 285 - - YES + - + EditPrograms 286 - - YES + - + 423 - - YES + - + DockMenu @@ -2744,20 +2720,18 @@ Q29tYW5kby4KA 526 - - YES + - + 527 - - YES + - + @@ -2813,10 +2787,9 @@ Q29tYW5kby4KA 100382 - - YES + - + @@ -2867,13 +2840,12 @@ Q29tYW5kby4KA 380 - - YES + - + @@ -2899,13 +2871,12 @@ Q29tYW5kby4KA 295 - - YES + - + @@ -2926,21 +2897,19 @@ Q29tYW5kby4KA 296 - - YES + - + 535 - - YES + - + @@ -2951,10 +2920,9 @@ Q29tYW5kby4KA 298 - - YES + - + @@ -2965,10 +2933,9 @@ Q29tYW5kby4KA 297 - - YES + - + @@ -2979,10 +2946,9 @@ Q29tYW5kby4KA 310 - - YES + - + @@ -2993,10 +2959,9 @@ Q29tYW5kby4KA 292 - - YES + - + @@ -3007,10 +2972,9 @@ Q29tYW5kby4KA 293 - - YES + - + @@ -3021,42 +2985,38 @@ Q29tYW5kby4KA 300337 - - YES + - + 300338 - - YES + - + 300358 - - YES + - + 300359 - - YES + - + @@ -3072,10 +3032,9 @@ Q29tYW5kby4KA 300362 - - YES + - + @@ -3086,10 +3045,9 @@ Q29tYW5kby4KA 300364 - - YES + - + @@ -3100,10 +3058,9 @@ Q29tYW5kby4KA 300368 - - YES + - + @@ -3114,10 +3071,9 @@ Q29tYW5kby4KA 300370 - - YES + - + @@ -3128,17 +3084,15 @@ Q29tYW5kby4KA 300421 - - YES + - + 300422 - - YES + @@ -3147,25 +3101,23 @@ Q29tYW5kby4KA - + 300423 - - YES + - + 300424 - - YES + - + @@ -3181,10 +3133,9 @@ Q29tYW5kby4KA 300447 - - YES + - + @@ -3195,10 +3146,9 @@ Q29tYW5kby4KA 300451 - - YES + - + @@ -3209,10 +3159,9 @@ Q29tYW5kby4KA 300453 - - YES + - + @@ -3223,10 +3172,9 @@ Q29tYW5kby4KA 300455 - - YES + - + @@ -3237,10 +3185,9 @@ Q29tYW5kby4KA 300457 - - YES + - + @@ -3251,10 +3198,9 @@ Q29tYW5kby4KA 300459 - - YES + - + @@ -3265,10 +3211,9 @@ Q29tYW5kby4KA 300472 - - YES + - + @@ -3276,604 +3221,338 @@ Q29tYW5kby4KA - - - - YES - - YES - -3.IBPluginDependency - -3.ImportedFromIB2 - 100292.IBPluginDependency - 100293.IBPluginDependency - 100295.IBPluginDependency - 100295.IBShouldRemoveOnLegacySave - 100310.IBPluginDependency - 100363.IBPluginDependency - 100364.IBPluginDependency - 100365.IBPluginDependency - 100368.IBPluginDependency - 100369.IBPluginDependency - 100370.IBPluginDependency - 100371.IBPluginDependency - 100372.IBPluginDependency - 100374.IBPluginDependency - 100375.IBPluginDependency - 100376.IBPluginDependency - 100377.IBPluginDependency - 100379.IBPluginDependency - 100382.IBPluginDependency - 100385.IBPluginDependency - 100386.IBPluginDependency - 100541.IBPluginDependency - 100543.IBPluginDependency - 129.IBPluginDependency - 129.ImportedFromIB2 - 130.IBPluginDependency - 130.ImportedFromIB2 - 131.IBPluginDependency - 131.ImportedFromIB2 - 134.IBPluginDependency - 134.ImportedFromIB2 - 136.IBPluginDependency - 136.ImportedFromIB2 - 143.IBPluginDependency - 143.ImportedFromIB2 - 144.IBPluginDependency - 144.ImportedFromIB2 - 145.IBPluginDependency - 145.ImportedFromIB2 - 149.IBPluginDependency - 149.ImportedFromIB2 - 150.IBPluginDependency - 150.ImportedFromIB2 - 157.IBPluginDependency - 157.ImportedFromIB2 - 163.IBPluginDependency - 163.ImportedFromIB2 - 169.IBEditorWindowLastContentRect - 169.IBPluginDependency - 169.ImportedFromIB2 - 169.editorWindowContentRectSynchronizationRect - 19.IBPluginDependency - 19.ImportedFromIB2 - 196.ImportedFromIB2 - 200295.IBPluginDependency - 200295.IBShouldRemoveOnLegacySave - 203.IBPluginDependency - 203.ImportedFromIB2 - 204.IBPluginDependency - 204.ImportedFromIB2 - 23.IBPluginDependency - 23.ImportedFromIB2 - 24.IBEditorWindowLastContentRect - 24.IBPluginDependency - 24.ImportedFromIB2 - 24.editorWindowContentRectSynchronizationRect - 244.IBEditorWindowLastContentRect - 244.IBPluginDependency - 244.IBWindowTemplateEditedContentRect - 244.ImportedFromIB2 - 244.editorWindowContentRectSynchronizationRect - 244.windowTemplate.hasMaxSize - 244.windowTemplate.hasMinSize - 244.windowTemplate.maxSize - 244.windowTemplate.minSize - 245.IBPluginDependency - 245.ImportedFromIB2 - 269.IBPluginDependency - 269.ImportedFromIB2 - 270.IBEditorWindowLastContentRect - 270.IBPluginDependency - 270.ImportedFromIB2 - 270.editorWindowContentRectSynchronizationRect - 272.IBPluginDependency - 272.ImportedFromIB2 - 285.IBEditorWindowLastContentRect - 285.IBPluginDependency - 285.IBViewEditorWindowController.showingBoundsRectangles - 285.IBViewEditorWindowController.showingLayoutRectangles - 285.IBWindowTemplateEditedContentRect - 285.ImportedFromIB2 - 285.editorWindowContentRectSynchronizationRect - 285.windowTemplate.hasMaxSize - 285.windowTemplate.hasMinSize - 285.windowTemplate.maxSize - 285.windowTemplate.minSize - 286.IBPluginDependency - 286.ImportedFromIB2 - 29.IBEditorWindowLastContentRect - 29.IBPluginDependency - 29.ImportedFromIB2 - 29.editorWindowContentRectSynchronizationRect - 292.IBPluginDependency - 292.ImportedFromIB2 - 293.IBPluginDependency - 293.ImportedFromIB2 - 295.IBPluginDependency - 295.ImportedFromIB2 - 296.IBPluginDependency - 296.ImportedFromIB2 - 297.IBPluginDependency - 297.ImportedFromIB2 - 298.IBPluginDependency - 298.ImportedFromIB2 - 300295.IBPluginDependency - 300295.IBShouldRemoveOnLegacySave - 300337.IBPluginDependency - 300337.ImportedFromIB2 - 300338.IBPluginDependency - 300338.ImportedFromIB2 - 300358.IBPluginDependency - 300358.ImportedFromIB2 - 300359.IBPluginDependency - 300359.ImportedFromIB2 - 300360.IBPluginDependency - 300361.IBPluginDependency - 300362.IBPluginDependency - 300362.ImportedFromIB2 - 300363.IBPluginDependency - 300364.IBPluginDependency - 300364.ImportedFromIB2 - 300365.IBPluginDependency - 300368.IBPluginDependency - 300368.ImportedFromIB2 - 300369.IBPluginDependency - 300370.IBPluginDependency - 300370.ImportedFromIB2 - 300371.IBPluginDependency - 300421.IBPluginDependency - 300421.ImportedFromIB2 - 300422.IBPluginDependency - 300422.ImportedFromIB2 - 300423.IBPluginDependency - 300423.ImportedFromIB2 - 300424.IBPluginDependency - 300424.ImportedFromIB2 - 300440.IBPluginDependency - 300441.IBPluginDependency - 300447.IBPluginDependency - 300447.ImportedFromIB2 - 300450.IBPluginDependency - 300451.IBPluginDependency - 300451.ImportedFromIB2 - 300452.IBPluginDependency - 300453.IBPluginDependency - 300453.ImportedFromIB2 - 300454.IBPluginDependency - 300455.IBPluginDependency - 300455.ImportedFromIB2 - 300456.IBPluginDependency - 300457.IBPluginDependency - 300457.ImportedFromIB2 - 300458.IBPluginDependency - 300459.IBPluginDependency - 300459.ImportedFromIB2 - 300460.IBPluginDependency - 300472.IBPluginDependency - 300472.ImportedFromIB2 - 300473.IBPluginDependency - 305.IBPluginDependency - 305.ImportedFromIB2 - 310.IBPluginDependency - 310.ImportedFromIB2 - 348.IBPluginDependency - 348.ImportedFromIB2 - 349.IBPluginDependency - 349.ImportedFromIB2 - 350.IBPluginDependency - 350.ImportedFromIB2 - 351.IBPluginDependency - 351.ImportedFromIB2 - 352.IBPluginDependency - 352.ImportedFromIB2 - 353.IBPluginDependency - 353.ImportedFromIB2 - 354.IBPluginDependency - 354.ImportedFromIB2 - 363.IBPluginDependency - 363.ImportedFromIB2 - 364.IBPluginDependency - 364.ImportedFromIB2 - 365.IBPluginDependency - 365.ImportedFromIB2 - 368.IBPluginDependency - 368.ImportedFromIB2 - 369.IBPluginDependency - 369.ImportedFromIB2 - 370.IBPluginDependency - 370.ImportedFromIB2 - 371.IBPluginDependency - 371.ImportedFromIB2 - 372.IBPluginDependency - 372.ImportedFromIB2 - 374.IBPluginDependency - 374.ImportedFromIB2 - 375.IBPluginDependency - 375.ImportedFromIB2 - 376.IBPluginDependency - 376.ImportedFromIB2 - 377.IBPluginDependency - 377.ImportedFromIB2 - 379.IBPluginDependency - 379.ImportedFromIB2 - 380.IBPluginDependency - 380.ImportedFromIB2 - 381.IBPluginDependency - 381.ImportedFromIB2 - 382.IBPluginDependency - 382.ImportedFromIB2 - 383.IBPluginDependency - 383.ImportedFromIB2 - 384.IBPluginDependency - 384.ImportedFromIB2 - 385.IBPluginDependency - 385.ImportedFromIB2 - 386.IBPluginDependency - 386.ImportedFromIB2 - 419.IBPluginDependency - 419.ImportedFromIB2 - 420.IBPluginDependency - 420.ImportedFromIB2 - 421.IBPluginDependency - 421.ImportedFromIB2 - 423.IBPluginDependency - 423.ImportedFromIB2 - 435.IBPluginDependency - 435.ImportedFromIB2 - 5.IBPluginDependency - 5.ImportedFromIB2 - 524.IBPluginDependency - 524.ImportedFromIB2 - 526.IBPluginDependency - 526.ImportedFromIB2 - 527.IBPluginDependency - 527.ImportedFromIB2 - 532.IBPluginDependency - 532.ImportedFromIB2 - 533.IBPluginDependency - 533.ImportedFromIB2 - 535.IBPluginDependency - 535.ImportedFromIB2 - 536.IBPluginDependency - 536.ImportedFromIB2 - 537.IBPluginDependency - 537.ImportedFromIB2 - 538.IBPluginDependency - 538.ImportedFromIB2 - 541.IBPluginDependency - 541.ImportedFromIB2 - 543.IBPluginDependency - 543.ImportedFromIB2 - 544.IBPluginDependency - 544.ImportedFromIB2 - 545.IBPluginDependency - 545.ImportedFromIB2 - 56.IBPluginDependency - 56.ImportedFromIB2 - 57.IBEditorWindowLastContentRect - 57.IBPluginDependency - 57.ImportedFromIB2 - 57.editorWindowContentRectSynchronizationRect - 573.IBPluginDependency - 573.ImportedFromIB2 - 574.IBPluginDependency - 574.ImportedFromIB2 - 575.IBPluginDependency - 575.ImportedFromIB2 - 58.IBPluginDependency - 58.ImportedFromIB2 - 92.IBPluginDependency - 92.ImportedFromIB2 - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{168, 821}, {113, 23}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{202, 626}, {154, 153}} - com.apple.InterfaceBuilder.CocoaPlugin - - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{349, 868}, {315, 143}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{271, 666}, {301, 153}} - {{437, 749}, {484, 308}} - com.apple.InterfaceBuilder.CocoaPlugin - {{437, 749}, {484, 308}} - - {{184, 290}, {481, 345}} - - - {3.40282e+38, 3.40282e+38} - {320, 240} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{58, 803}, {155, 33}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{100, 746}, {155, 33}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{68, 585}, {454, 271}} - com.apple.InterfaceBuilder.CocoaPlugin - - - {{68, 585}, {454, 271}} - - {{433, 406}, {486, 327}} - - - {3.40282e+38, 3.40282e+38} - {320, 240} - com.apple.InterfaceBuilder.CocoaPlugin - - {{145, 1011}, {336, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{67, 819}, {336, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{20, 641}, {218, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{79, 616}, {218, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - - - - YES - - - YES - + + 300476 + + + + + + + + 300477 + + + + + + + + 300478 + + + + + 300479 + + + + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{168, 821}, {113, 23}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{202, 626}, {154, 153}} + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{349, 868}, {315, 143}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{271, 666}, {301, 153}} + {{507, 548}, {664, 308}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{507, 548}, {664, 308}} + + {{184, 290}, {481, 345}} + + + {3.40282e+38, 3.40282e+38} + {320, 240} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{58, 803}, {155, 33}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{100, 746}, {155, 33}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{68, 585}, {546, 271}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{68, 585}, {546, 271}} + + {{433, 406}, {486, 327}} + + + {3.40282e+38, 3.40282e+38} + {320, 240} + com.apple.InterfaceBuilder.CocoaPlugin + + {{145, 1011}, {336, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{67, 819}, {336, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{20, 641}, {218, 203}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{79, 616}, {218, 203}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + - - YES - - - YES - - + - 300475 + 300481 - - YES + FirstResponder NSObject @@ -3898,16 +3577,12 @@ Q29tYW5kby4KA - + 0 com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - - com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 - + YES ../X11.xcodeproj diff --git a/xserver/hw/xquartz/bundle/Resources/Japanese.lproj/locversion.plist b/xserver/hw/xquartz/bundle/Resources/Japanese.lproj/locversion.plist index be26034a4..2f7e575e8 100644 --- a/xserver/hw/xquartz/bundle/Resources/Japanese.lproj/locversion.plist +++ b/xserver/hw/xquartz/bundle/Resources/Japanese.lproj/locversion.plist @@ -3,12 +3,12 @@ LprojCompatibleVersion - 93 + 97 LprojLocale ja LprojRevisionLevel 1 LprojVersion - 93 + 97 diff --git a/xserver/hw/xquartz/bundle/Resources/Japanese.lproj/main.nib/designable.nib b/xserver/hw/xquartz/bundle/Resources/Japanese.lproj/main.nib/designable.nib index b211f8037..d13f81fca 100644 --- a/xserver/hw/xquartz/bundle/Resources/Japanese.lproj/main.nib/designable.nib +++ b/xserver/hw/xquartz/bundle/Resources/Japanese.lproj/main.nib/designable.nib @@ -1,33 +1,21 @@ - + - 1050 - 10A432 - 732 - 1038 - 437.00 + 1040 + 11A79a + 784 + 1059 + 478.00 com.apple.InterfaceBuilder.CocoaPlugin - 732 + 784 - - YES - - - YES + + com.apple.InterfaceBuilder.CocoaPlugin - - - YES - - YES - - - YES - - - - YES + + + NSApplication @@ -41,8 +29,7 @@ MainMenu - - YES + X11 @@ -60,8 +47,7 @@ submenuAction: X11 - - YES + X11 について @@ -101,9 +87,7 @@ submenuAction: サービス - - YES - + _NSServicesMenu @@ -187,7 +171,7 @@ - + _NSAppleMenu @@ -202,8 +186,7 @@ submenuAction: アプリケーション - - YES + YES @@ -224,7 +207,7 @@ - + @@ -238,8 +221,7 @@ submenuAction: 編集 - - YES + コピー @@ -249,7 +231,7 @@ - + @@ -263,8 +245,7 @@ submenuAction: ウインドウ - - YES + 閉じる @@ -341,7 +322,7 @@ - + _NSWindowsMenu @@ -356,8 +337,7 @@ submenuAction: ヘルプ - - YES + X11 ヘルプ @@ -367,10 +347,10 @@ - + - + _NSMainMenu @@ -386,21 +366,18 @@ View - {3.40282e+38, 3.40282e+38} + {3.4028235e+38, 3.4028235e+38} {320, 240} - + 256 - - YES + 256 {{13, 10}, {558, 292}} - - - YES + 1 @@ -408,14 +385,12 @@ 256 - - YES + 256 {{18, 210}, {402, 18}} - YES 67239424 @@ -429,7 +404,7 @@ 1211912703 2 - + NSImage NSSwitch @@ -447,7 +422,6 @@ 256 {{36, 59}, {466, 28}} - YES 67239424 @@ -485,7 +459,6 @@ 256 {{36, 176}, {466, 28}} - YES 67239424 @@ -506,7 +479,6 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 256 {{18, 93}, {402, 18}} - YES 67239424 @@ -516,7 +488,7 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 1211912703 2 - + @@ -529,7 +501,6 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 256 {{36, 123}, {466, 17}} - YES 67239424 @@ -547,7 +518,6 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 256 {{18, 146}, {402, 18}} - YES 67239424 @@ -557,7 +527,7 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 1211912703 2 - + @@ -565,10 +535,47 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 25 - + + + 256 + {{36, -1}, {385, 31}} + + YES + + 67239424 + 4194304 + 有効にすると、option キー で Mode_switch の代わりに X11 キーシンボルの Alt_L と Alt_R が送信されます。 + + + + + + + + + 256 + {{18, 36}, {402, 18}} + + YES + + 67239424 + 0 + Option キーで Alt_L と Alt_R が送信されます + + + 1211912703 + 2 + + + + + 200 + 25 + + + {{10, 33}, {538, 246}} - 入力 @@ -581,8 +588,7 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 256 - - YES + 256 @@ -597,7 +603,7 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 1211912703 2 - + @@ -664,8 +670,7 @@ nOOBq+OBquOCiuOBvuOBmeOAggo OtherViews - - YES + @@ -703,7 +708,7 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 24 - + 3 YES @@ -720,7 +725,7 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 67239424 4194304 - 44Kr44Op44O877yaCg + カラー: @@ -759,7 +764,7 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 1211912703 2 - + @@ -781,7 +786,7 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 1211912703 2 - + @@ -806,7 +811,7 @@ nOOBq+OBquOCiuOBvuOBmeOAggo - + {{10, 33}, {538, 246}} 出力 @@ -820,8 +825,7 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 256 - - YES + 256 @@ -836,7 +840,7 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 1211912703 2 - + @@ -874,7 +878,7 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 1211912703 2 - + @@ -896,7 +900,7 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 1211912703 2 - + @@ -918,7 +922,7 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 1211912703 2 - + @@ -940,7 +944,7 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 1211912703 2 - + @@ -980,7 +984,7 @@ nOOBq+OBquOCiuOBvuOBmeOAggo - + {{10, 33}, {538, 246}} ペーストボード @@ -994,8 +998,7 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 256 - - YES + 256 @@ -1010,7 +1013,7 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 1211912703 2 - + @@ -1049,7 +1052,7 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 1211912703 2 - + @@ -1088,7 +1091,7 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 1211912703 2 - + @@ -1113,7 +1116,7 @@ nOOBq+OBquOCiuOBvuOBmeOAggo - + {{10, 33}, {538, 246}} ウインドウ @@ -1124,8 +1127,7 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 256 - - YES + 256 @@ -1140,7 +1142,7 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 1211912703 2 - + @@ -1162,7 +1164,7 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 1211912703 2 - + @@ -1221,32 +1223,29 @@ nOOBq+OBquOCiuOBvuOBmeOAggo - + {{10, 33}, {538, 246}} セキュリティ - + 0 YES YES - - YES + - + - + {584, 308} - - {{0, 0}, {1440, 878}} {320, 262} - {3.40282e+38, 3.40282e+38} + {3.4028235e+38, 3.4028235e+38} x11_prefs @@ -1259,18 +1258,18 @@ nOOBq+OBquOCiuOBvuOBmeOAggo View - {3.40282e+38, 3.40282e+38} + {3.4028235e+38, 3.4028235e+38} {454, 271} - + 256 - - YES + 265 {{340, 191}, {105, 32}} + YES 67239424 @@ -1298,6 +1297,7 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 265 {{340, 159}, {105, 32}} + YES 67239424 @@ -1319,24 +1319,24 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 274 - - YES + 2304 - - YES + 256 {301, 198} + YES 256 {301, 17} + @@ -1344,9 +1344,9 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 256 {{302, 0}, {16, 17}} + - - YES + 103 43 @@ -1457,7 +1457,7 @@ nOOBq+OBquOCiuOBvuOBmeOAggo - + 3 2 @@ -1480,9 +1480,11 @@ nOOBq+OBquOCiuOBvuOBmeOAggo YES 0 - + {{1, 17}, {301, 198}} + + 4 @@ -1492,6 +1494,7 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 256 {{302, 17}, {15, 198}} + _doScroller: 0.99492377042770386 @@ -1501,6 +1504,7 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 256 {{1, 215}, {301, 15}} + 1 _doScroller: @@ -1509,20 +1513,23 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 2304 - - YES + - + {{1, 0}, {301, 17}} + + 4 - + {{20, 20}, {318, 231}} + + 50 @@ -1536,6 +1543,7 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 265 {{340, 223}, {105, 32}} + YES -2080244224 @@ -1554,18 +1562,19 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 25 - + {454, 271} + + {{0, 0}, {1440, 878}} {454, 293} - {3.40282e+38, 3.40282e+38} + {3.4028235e+38, 3.4028235e+38} x11_apps メニュー - - YES + YES @@ -1588,8 +1597,7 @@ nOOBq+OBquOCiuOBvuOBmeOAggo submenuAction: アプリケーション - - YES + YES @@ -1610,16 +1618,15 @@ nOOBq+OBquOCiuOBvuOBmeOAggo - + - + - + - - YES + copy: @@ -2164,13 +2171,28 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 300475 - + + + prefs_changed: + + + + 300480 + + + + option_sends_alt + + + + 300481 + + - - YES + 0 - + @@ -2195,31 +2217,28 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 29 - - YES + - + MainMenu 19 - - YES + - + 24 - - YES + @@ -2228,7 +2247,7 @@ nOOBq+OBquOCiuOBvuOBmeOAggo - + @@ -2274,17 +2293,15 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 56 - - YES + - + 57 - - YES + @@ -2297,7 +2314,7 @@ nOOBq+OBquOCiuOBvuOBmeOAggo - + @@ -2313,10 +2330,9 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 131 - - YES + - + @@ -2372,19 +2388,17 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 163 - - YES + - + 169 - - YES + - + @@ -2395,20 +2409,18 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 269 - - YES + - + 270 - - YES + - + @@ -2424,19 +2436,17 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 419 - - YES + - + 420 - - YES + - + @@ -2453,126 +2463,115 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 244 - - YES + - + PrefsPanel 245 - - YES + - + 348 - - YES + - + 349 - - YES + - + 351 - - YES + - + + + 363 - - YES + - + 364 - - YES + - + 365 - - YES + - + 368 - - YES + - + 369 - - YES + - + 370 - - YES + - + 352 - - YES + - + 350 - - YES + @@ -2581,169 +2580,152 @@ nOOBq+OBquOCiuOBvuOBmeOAggo - + 371 - - YES + - + 372 - - YES + - + 382 - - YES + - + 385 - - YES + - + 386 - - YES + - + 541 - - YES + - + 543 - - YES + - + 353 - - YES + - + 354 - - YES + - + 374 - - YES + - + 375 - - YES + - + 376 - - YES + - + 377 - - YES + - + 379 - - YES + - + 285 - - YES + - + EditPrograms 286 - - YES + - + 423 - - YES + - + DockMenu @@ -2755,20 +2737,18 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 526 - - YES + - + 527 - - YES + - + @@ -2824,10 +2804,9 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 100382 - - YES + - + @@ -2878,13 +2857,12 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 380 - - YES + - + @@ -2910,13 +2888,12 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 295 - - YES + - + @@ -2937,21 +2914,19 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 296 - - YES + - + 535 - - YES + - + @@ -2962,10 +2937,9 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 298 - - YES + - + @@ -2976,10 +2950,9 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 297 - - YES + - + @@ -2990,10 +2963,9 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 310 - - YES + - + @@ -3004,10 +2976,9 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 292 - - YES + - + @@ -3018,10 +2989,9 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 293 - - YES + - + @@ -3032,42 +3002,38 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 300337 - - YES + - + 300338 - - YES + - + 300358 - - YES + - + 300359 - - YES + - + @@ -3083,10 +3049,9 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 300362 - - YES + - + @@ -3097,10 +3062,9 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 300364 - - YES + - + @@ -3111,10 +3075,9 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 300368 - - YES + - + @@ -3125,10 +3088,9 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 300370 - - YES + - + @@ -3139,17 +3101,15 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 300421 - - YES + - + 300422 - - YES + @@ -3158,25 +3118,23 @@ nOOBq+OBquOCiuOBvuOBmeOAggo - + 300423 - - YES + - + 300424 - - YES + - + @@ -3192,10 +3150,9 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 300447 - - YES + - + @@ -3206,10 +3163,9 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 300451 - - YES + - + @@ -3220,10 +3176,9 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 300453 - - YES + - + @@ -3234,10 +3189,9 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 300455 - - YES + - + @@ -3248,10 +3202,9 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 300457 - - YES + - + @@ -3262,10 +3215,9 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 300459 - - YES + - + @@ -3276,10 +3228,9 @@ nOOBq+OBquOCiuOBvuOBmeOAggo 300472 - - YES + - + @@ -3287,624 +3238,347 @@ nOOBq+OBquOCiuOBvuOBmeOAggo - - - - YES - - YES - -3.IBPluginDependency - -3.ImportedFromIB2 - 100292.IBPluginDependency - 100293.IBPluginDependency - 100295.IBPluginDependency - 100295.IBShouldRemoveOnLegacySave - 100310.IBPluginDependency - 100363.IBPluginDependency - 100364.IBPluginDependency - 100365.IBPluginDependency - 100368.IBPluginDependency - 100369.IBPluginDependency - 100370.IBPluginDependency - 100371.IBPluginDependency - 100372.IBPluginDependency - 100374.IBPluginDependency - 100375.IBPluginDependency - 100376.IBPluginDependency - 100377.IBPluginDependency - 100379.IBPluginDependency - 100382.IBPluginDependency - 100385.IBPluginDependency - 100386.IBPluginDependency - 100541.IBPluginDependency - 100543.IBPluginDependency - 129.IBPluginDependency - 129.ImportedFromIB2 - 130.IBPluginDependency - 130.ImportedFromIB2 - 131.IBPluginDependency - 131.ImportedFromIB2 - 134.IBPluginDependency - 134.ImportedFromIB2 - 136.IBPluginDependency - 136.ImportedFromIB2 - 143.IBPluginDependency - 143.ImportedFromIB2 - 144.IBPluginDependency - 144.ImportedFromIB2 - 145.IBPluginDependency - 145.ImportedFromIB2 - 149.IBPluginDependency - 149.ImportedFromIB2 - 150.IBPluginDependency - 150.ImportedFromIB2 - 157.IBPluginDependency - 157.ImportedFromIB2 - 163.IBPluginDependency - 163.ImportedFromIB2 - 169.IBEditorWindowLastContentRect - 169.IBPluginDependency - 169.ImportedFromIB2 - 169.editorWindowContentRectSynchronizationRect - 19.IBPluginDependency - 19.ImportedFromIB2 - 196.ImportedFromIB2 - 200295.IBPluginDependency - 200295.IBShouldRemoveOnLegacySave - 203.IBPluginDependency - 203.ImportedFromIB2 - 204.IBPluginDependency - 204.ImportedFromIB2 - 23.IBPluginDependency - 23.ImportedFromIB2 - 24.IBEditorWindowLastContentRect - 24.IBPluginDependency - 24.ImportedFromIB2 - 24.editorWindowContentRectSynchronizationRect - 244.IBEditorWindowLastContentRect - 244.IBPluginDependency - 244.IBWindowTemplateEditedContentRect - 244.ImportedFromIB2 - 244.editorWindowContentRectSynchronizationRect - 244.windowTemplate.hasMaxSize - 244.windowTemplate.hasMinSize - 244.windowTemplate.maxSize - 244.windowTemplate.minSize - 245.IBPluginDependency - 245.ImportedFromIB2 - 269.IBPluginDependency - 269.ImportedFromIB2 - 270.IBEditorWindowLastContentRect - 270.IBPluginDependency - 270.ImportedFromIB2 - 270.editorWindowContentRectSynchronizationRect - 272.IBPluginDependency - 272.ImportedFromIB2 - 285.IBEditorWindowLastContentRect - 285.IBPluginDependency - 285.IBViewEditorWindowController.showingBoundsRectangles - 285.IBViewEditorWindowController.showingLayoutRectangles - 285.IBWindowTemplateEditedContentRect - 285.ImportedFromIB2 - 285.editorWindowContentRectSynchronizationRect - 285.windowTemplate.hasMaxSize - 285.windowTemplate.hasMinSize - 285.windowTemplate.maxSize - 285.windowTemplate.minSize - 286.IBPluginDependency - 286.ImportedFromIB2 - 29.IBEditorWindowLastContentRect - 29.IBPluginDependency - 29.ImportedFromIB2 - 29.editorWindowContentRectSynchronizationRect - 292.IBPluginDependency - 292.ImportedFromIB2 - 293.IBPluginDependency - 293.ImportedFromIB2 - 295.IBPluginDependency - 295.ImportedFromIB2 - 296.IBPluginDependency - 296.ImportedFromIB2 - 297.IBPluginDependency - 297.ImportedFromIB2 - 298.IBPluginDependency - 298.ImportedFromIB2 - 300295.IBPluginDependency - 300295.IBShouldRemoveOnLegacySave - 300337.IBPluginDependency - 300337.ImportedFromIB2 - 300338.IBPluginDependency - 300338.ImportedFromIB2 - 300358.IBPluginDependency - 300358.ImportedFromIB2 - 300359.IBPluginDependency - 300359.ImportedFromIB2 - 300360.IBPluginDependency - 300361.IBPluginDependency - 300362.IBPluginDependency - 300362.ImportedFromIB2 - 300363.IBPluginDependency - 300364.IBPluginDependency - 300364.ImportedFromIB2 - 300365.IBPluginDependency - 300368.IBPluginDependency - 300368.ImportedFromIB2 - 300369.IBPluginDependency - 300370.IBPluginDependency - 300370.ImportedFromIB2 - 300371.IBPluginDependency - 300421.IBPluginDependency - 300421.ImportedFromIB2 - 300422.IBPluginDependency - 300422.ImportedFromIB2 - 300423.IBPluginDependency - 300423.ImportedFromIB2 - 300424.IBPluginDependency - 300424.ImportedFromIB2 - 300440.IBPluginDependency - 300441.IBPluginDependency - 300447.IBPluginDependency - 300447.ImportedFromIB2 - 300447.object.labelIdentifier - 300450.IBPluginDependency - 300450.object.labelIdentifier - 300451.IBPluginDependency - 300451.ImportedFromIB2 - 300451.object.labelIdentifier - 300452.IBPluginDependency - 300452.object.labelIdentifier - 300453.IBPluginDependency - 300453.ImportedFromIB2 - 300453.object.labelIdentifier - 300454.IBPluginDependency - 300454.object.labelIdentifier - 300455.IBPluginDependency - 300455.ImportedFromIB2 - 300456.IBPluginDependency - 300457.IBPluginDependency - 300457.ImportedFromIB2 - 300457.object.labelIdentifier - 300458.IBPluginDependency - 300458.object.labelIdentifier - 300459.IBPluginDependency - 300459.ImportedFromIB2 - 300460.IBPluginDependency - 300472.IBPluginDependency - 300472.ImportedFromIB2 - 300473.IBPluginDependency - 305.IBPluginDependency - 305.ImportedFromIB2 - 310.IBPluginDependency - 310.ImportedFromIB2 - 348.IBPluginDependency - 348.ImportedFromIB2 - 349.IBPluginDependency - 349.ImportedFromIB2 - 350.IBPluginDependency - 350.ImportedFromIB2 - 351.IBPluginDependency - 351.ImportedFromIB2 - 352.IBPluginDependency - 352.ImportedFromIB2 - 353.IBPluginDependency - 353.ImportedFromIB2 - 354.IBPluginDependency - 354.ImportedFromIB2 - 363.IBPluginDependency - 363.ImportedFromIB2 - 364.IBPluginDependency - 364.ImportedFromIB2 - 365.IBPluginDependency - 365.ImportedFromIB2 - 368.IBPluginDependency - 368.ImportedFromIB2 - 369.IBPluginDependency - 369.ImportedFromIB2 - 370.IBPluginDependency - 370.ImportedFromIB2 - 371.IBPluginDependency - 371.ImportedFromIB2 - 372.IBPluginDependency - 372.ImportedFromIB2 - 374.IBPluginDependency - 374.ImportedFromIB2 - 375.IBPluginDependency - 375.ImportedFromIB2 - 376.IBPluginDependency - 376.ImportedFromIB2 - 377.IBPluginDependency - 377.ImportedFromIB2 - 379.IBPluginDependency - 379.ImportedFromIB2 - 380.IBPluginDependency - 380.ImportedFromIB2 - 381.IBPluginDependency - 381.ImportedFromIB2 - 382.IBPluginDependency - 382.ImportedFromIB2 - 383.IBPluginDependency - 383.ImportedFromIB2 - 384.IBPluginDependency - 384.ImportedFromIB2 - 385.IBPluginDependency - 385.ImportedFromIB2 - 386.IBPluginDependency - 386.ImportedFromIB2 - 419.IBPluginDependency - 419.ImportedFromIB2 - 420.IBPluginDependency - 420.ImportedFromIB2 - 421.IBPluginDependency - 421.ImportedFromIB2 - 423.IBEditorWindowLastContentRect - 423.IBPluginDependency - 423.ImportedFromIB2 - 435.IBPluginDependency - 435.ImportedFromIB2 - 5.IBPluginDependency - 5.ImportedFromIB2 - 524.IBPluginDependency - 524.ImportedFromIB2 - 526.IBPluginDependency - 526.ImportedFromIB2 - 527.IBEditorWindowLastContentRect - 527.IBPluginDependency - 527.ImportedFromIB2 - 532.IBPluginDependency - 532.ImportedFromIB2 - 533.IBPluginDependency - 533.ImportedFromIB2 - 535.IBPluginDependency - 535.ImportedFromIB2 - 536.IBPluginDependency - 536.ImportedFromIB2 - 537.IBPluginDependency - 537.ImportedFromIB2 - 538.IBPluginDependency - 538.ImportedFromIB2 - 541.IBPluginDependency - 541.ImportedFromIB2 - 543.IBPluginDependency - 543.ImportedFromIB2 - 544.IBPluginDependency - 544.ImportedFromIB2 - 545.IBPluginDependency - 545.ImportedFromIB2 - 56.IBPluginDependency - 56.ImportedFromIB2 - 57.IBEditorWindowLastContentRect - 57.IBPluginDependency - 57.ImportedFromIB2 - 57.editorWindowContentRectSynchronizationRect - 573.IBPluginDependency - 573.ImportedFromIB2 - 574.IBPluginDependency - 574.ImportedFromIB2 - 575.IBPluginDependency - 575.ImportedFromIB2 - 58.IBPluginDependency - 58.ImportedFromIB2 - 92.IBPluginDependency - 92.ImportedFromIB2 - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{168, 821}, {113, 23}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{202, 626}, {154, 153}} - com.apple.InterfaceBuilder.CocoaPlugin - - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{349, 868}, {315, 143}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{271, 666}, {301, 153}} - {{437, 548}, {584, 308}} - com.apple.InterfaceBuilder.CocoaPlugin - {{437, 548}, {584, 308}} - - {{184, 290}, {481, 345}} - - - {3.40282e+38, 3.40282e+38} - {320, 240} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{58, 803}, {155, 33}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{100, 746}, {155, 33}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{68, 585}, {454, 271}} - com.apple.InterfaceBuilder.CocoaPlugin - - - {{68, 585}, {454, 271}} - - {{433, 406}, {486, 327}} - - - {3.40282e+38, 3.40282e+38} - {454, 271} - com.apple.InterfaceBuilder.CocoaPlugin - - {{145, 836}, {394, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{67, 819}, {336, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - IBBuiltInLabel-Red - com.apple.InterfaceBuilder.CocoaPlugin - IBBuiltInLabel-Red - com.apple.InterfaceBuilder.CocoaPlugin - - IBBuiltInLabel-Red - com.apple.InterfaceBuilder.CocoaPlugin - IBBuiltInLabel-Red - com.apple.InterfaceBuilder.CocoaPlugin - - IBBuiltInLabel-Red - com.apple.InterfaceBuilder.CocoaPlugin - IBBuiltInLabel-Red - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - IBBuiltInLabel-Red - com.apple.InterfaceBuilder.CocoaPlugin - IBBuiltInLabel-Red - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{717, 463}, {178, 33}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{895, 453}, {164, 33}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{20, 641}, {218, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{79, 616}, {218, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - - - - YES - - - YES - + + 300476 + + + + + + + + 300477 + + + + + + + + 300478 + + + + + 300479 + + + + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{168, 821}, {113, 23}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{202, 626}, {154, 153}} + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{349, 868}, {315, 143}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{271, 666}, {301, 153}} + {{507, 565}, {484, 308}} + com.apple.InterfaceBuilder.CocoaPlugin + {{507, 565}, {484, 308}} + + {{184, 290}, {481, 345}} + + + {3.40282e+38, 3.40282e+38} + {320, 240} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{58, 803}, {155, 33}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{100, 746}, {155, 33}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{68, 585}, {454, 271}} + com.apple.InterfaceBuilder.CocoaPlugin + + + {{68, 585}, {454, 271}} + + {{433, 406}, {486, 327}} + IBBuiltInLabel-Red + + + {3.40282e+38, 3.40282e+38} + {454, 271} + com.apple.InterfaceBuilder.CocoaPlugin + + {{145, 1011}, {336, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{67, 819}, {336, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{20, 641}, {218, 203}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{79, 616}, {218, 203}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + - - YES - - - YES - - + - 300475 + 300481 - - YES + FirstResponder NSObject @@ -3929,19 +3603,21 @@ nOOBq+OBquOCiuOBvuOBmeOAggo - + 0 + IBCocoaFramework com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - - com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 - + YES ../X11.xcodeproj 3 + + {9, 8} + {7, 2} + {15, 15} + diff --git a/xserver/hw/xquartz/bundle/Resources/Spanish.lproj/locversion.plist b/xserver/hw/xquartz/bundle/Resources/Spanish.lproj/locversion.plist index 687d53f1c..c648282a2 100644 --- a/xserver/hw/xquartz/bundle/Resources/Spanish.lproj/locversion.plist +++ b/xserver/hw/xquartz/bundle/Resources/Spanish.lproj/locversion.plist @@ -3,12 +3,12 @@ LprojCompatibleVersion - 93 + 97 LprojLocale es LprojRevisionLevel 1 LprojVersion - 93 + 97 diff --git a/xserver/hw/xquartz/bundle/Resources/Spanish.lproj/main.nib/designable.nib b/xserver/hw/xquartz/bundle/Resources/Spanish.lproj/main.nib/designable.nib index b315636bf..19e139bb7 100644 --- a/xserver/hw/xquartz/bundle/Resources/Spanish.lproj/main.nib/designable.nib +++ b/xserver/hw/xquartz/bundle/Resources/Spanish.lproj/main.nib/designable.nib @@ -1,34 +1,21 @@ - + - 1050 - 10A432 - 732 - 1038 - 437.00 + 1040 + 11A79a + 784 + 1059 + 478.00 com.apple.InterfaceBuilder.CocoaPlugin - 732 + 784 - - YES - - - - YES + + com.apple.InterfaceBuilder.CocoaPlugin - - - YES - - YES - - - YES - - - - YES + + + NSApplication @@ -42,8 +29,7 @@ MainMenu - - YES + X11 @@ -61,8 +47,7 @@ submenuAction: X11 - - YES + Acerca de X11 @@ -102,9 +87,7 @@ submenuAction: Servicios - - YES - + _NSServicesMenu @@ -188,7 +171,7 @@ - + _NSAppleMenu @@ -203,8 +186,7 @@ submenuAction: Aplicaciones - - YES + YES @@ -225,7 +207,7 @@ - + @@ -239,8 +221,7 @@ submenuAction: Edición - - YES + Copiar @@ -250,7 +231,7 @@ - + @@ -264,8 +245,7 @@ submenuAction: Ventana - - YES + Cerrar @@ -342,7 +322,7 @@ - + _NSWindowsMenu @@ -357,8 +337,7 @@ submenuAction: Ayuda - - YES + Ayuda X11 @@ -368,10 +347,10 @@ - + - + _NSMainMenu @@ -387,20 +366,19 @@ View - {1.79769e+308, 1.79769e+308} + {1.7976931348623157e+308, 1.7976931348623157e+308} {320, 240} 256 - - YES + 256 {{13, 10}, {593, 292}} - - YES + + 1 @@ -408,13 +386,13 @@ 256 - - YES + 256 - {{18, 210}, {402, 18}} + {{18, 215}, {402, 18}} + YES 67239424 @@ -428,7 +406,7 @@ 1211912703 2 - + NSImage NSSwitch @@ -444,8 +422,9 @@ 256 - {{36, 40}, {501, 42}} + {{36, 65}, {501, 28}} + YES 67239424 @@ -481,8 +460,9 @@ 256 - {{36, 170}, {501, 34}} + {{36, 181}, {501, 28}} + YES 67239424 @@ -499,8 +479,9 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 256 - {{18, 88}, {402, 18}} + {{18, 99}, {402, 18}} + YES 67239424 @@ -510,7 +491,7 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 1211912703 2 - + @@ -521,8 +502,9 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 256 - {{36, 112}, {501, 28}} + {{36, 123}, {501, 28}} + YES 67239424 @@ -538,8 +520,9 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 256 - {{18, 146}, {402, 18}} + {{18, 157}, {402, 18}} + YES 67239424 @@ -549,7 +532,7 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 1211912703 2 - + @@ -557,9 +540,50 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA25 - + + + 256 + {{36, 7}, {501, 28}} + + + YES + + 67239424 + 4194304 + Si esta opción está seleccionada, las teclas Opción envían los símbolos de tecla de X11 Alt_L y Alt_R en vez de Mode_switch. + + + + + + + + + 256 + {{18, 41}, {402, 18}} + + + YES + + 67239424 + 0 + Las teclas Opción envían Alt_L y Alt_R + + + 1211912703 + 2 + + + + + 200 + 25 + + + {{10, 33}, {573, 246}} + Entrada @@ -572,8 +596,7 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 256 - - YES + 256 @@ -588,7 +611,7 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 1211912703 2 - + @@ -655,8 +678,7 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA OtherViews - - YES + @@ -694,7 +716,7 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA24 - + 3 YES @@ -711,7 +733,7 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 67239424 4194304 - Q29sb3JlczoKA + Colores: @@ -750,7 +772,7 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 1211912703 2 - + @@ -772,7 +794,7 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 1211912703 2 - + @@ -797,7 +819,7 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA - + {{10, 33}, {573, 246}} Salida @@ -811,8 +833,7 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 256 - - YES + 256 @@ -827,7 +848,7 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 1211912703 2 - + @@ -865,7 +886,7 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 1211912703 2 - + @@ -887,7 +908,7 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 1211912703 2 - + @@ -909,7 +930,7 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 1211912703 2 - + @@ -931,7 +952,7 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 1211912703 2 - + @@ -971,7 +992,7 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA - + {{10, 33}, {573, 246}} Portapapeles @@ -985,8 +1006,7 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 256 - - YES + 256 @@ -1001,7 +1021,7 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 1211912703 2 - + @@ -1039,7 +1059,7 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 1211912703 2 - + @@ -1077,7 +1097,7 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 1211912703 2 - + @@ -1101,7 +1121,7 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA - + {{10, 33}, {573, 246}} Ventanas @@ -1112,8 +1132,7 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 256 - - YES + 256 @@ -1128,7 +1147,7 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 1211912703 2 - + @@ -1150,7 +1169,7 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 1211912703 2 - + @@ -1209,31 +1228,31 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA - + {{10, 33}, {573, 246}} Seguridad - + 0 YES YES - - YES + - + - + {619, 308} + {{0, 0}, {1280, 938}} {320, 262} - {1.79769e+308, 1.79769e+308} + {1.7976931348623157e+308, 1.7976931348623157e+308} x11_prefs @@ -1246,13 +1265,12 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA View - {1.79769e+308, 1.79769e+308} + {1.7976931348623157e+308, 1.7976931348623157e+308} {320, 240} 256 - - YES + 265 @@ -1306,13 +1324,11 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 274 - - YES + 2304 - - YES + 256 @@ -1332,8 +1348,7 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA{{302, 0}, {16, 17}} - - YES + 121.73100280761719 62.730998992919922 @@ -1444,7 +1459,7 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA - + 3 2 @@ -1467,7 +1482,7 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KAYES 0 - + {{1, 17}, {301, 198}} @@ -1497,10 +1512,9 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 2304 - - YES + - + {{1, 0}, {301, 17}} @@ -1509,7 +1523,7 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA4 - + {{20, 20}, {318, 231}} @@ -1518,7 +1532,6 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA - QSAAAEEgAABBmAAAQZgAAA @@ -1544,18 +1557,17 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA25 - + {454, 271} {{0, 0}, {1280, 938}} {320, 262} - {1.79769e+308, 1.79769e+308} + {1.7976931348623157e+308, 1.7976931348623157e+308} x11_apps Menú - - YES + YES @@ -1578,8 +1590,7 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KAsubmenuAction: Aplicaciones - - YES + YES @@ -1600,16 +1611,15 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA - + - + - + - - YES + copy: @@ -2154,13 +2164,28 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 300475 - + + + prefs_changed: + + + + 300480 + + + + option_sends_alt + + + + 300481 + + - - YES + 0 - + @@ -2185,31 +2210,28 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 29 - - YES + - + MainMenu 19 - - YES + - + 24 - - YES + @@ -2218,7 +2240,7 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA - + @@ -2264,17 +2286,15 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 56 - - YES + - + 57 - - YES + @@ -2287,7 +2307,7 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA - + @@ -2303,10 +2323,9 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 131 - - YES + - + @@ -2362,19 +2381,17 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 163 - - YES + - + 169 - - YES + - + @@ -2385,20 +2402,18 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 269 - - YES + - + 270 - - YES + - + @@ -2414,19 +2429,17 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 419 - - YES + - + 420 - - YES + - + @@ -2443,126 +2456,115 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 244 - - YES + - + PrefsPanel 245 - - YES + - + 348 - - YES + - + 349 - - YES + - + 351 - - YES + - + + + 363 - - YES + - + 364 - - YES + - + 365 - - YES + - + 368 - - YES + - + 369 - - YES + - + 370 - - YES + - + 352 - - YES + - + 350 - - YES + @@ -2571,169 +2573,152 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA - + 371 - - YES + - + 372 - - YES + - + 382 - - YES + - + 385 - - YES + - + 386 - - YES + - + 541 - - YES + - + 543 - - YES + - + 353 - - YES + - + 354 - - YES + - + 374 - - YES + - + 375 - - YES + - + 376 - - YES + - + 377 - - YES + - + 379 - - YES + - + 285 - - YES + - + EditPrograms 286 - - YES + - + 423 - - YES + - + DockMenu @@ -2745,20 +2730,18 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 526 - - YES + - + 527 - - YES + - + @@ -2814,10 +2797,9 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 100382 - - YES + - + @@ -2868,13 +2850,12 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 380 - - YES + - + @@ -2900,13 +2881,12 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 295 - - YES + - + @@ -2927,21 +2907,19 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 296 - - YES + - + 535 - - YES + - + @@ -2952,10 +2930,9 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 298 - - YES + - + @@ -2966,10 +2943,9 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 297 - - YES + - + @@ -2980,10 +2956,9 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 310 - - YES + - + @@ -2994,10 +2969,9 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 292 - - YES + - + @@ -3008,10 +2982,9 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 293 - - YES + - + @@ -3022,42 +2995,38 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 300337 - - YES + - + 300338 - - YES + - + 300358 - - YES + - + 300359 - - YES + - + @@ -3073,10 +3042,9 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 300362 - - YES + - + @@ -3087,10 +3055,9 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 300364 - - YES + - + @@ -3101,10 +3068,9 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 300368 - - YES + - + @@ -3115,10 +3081,9 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 300370 - - YES + - + @@ -3129,17 +3094,15 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 300421 - - YES + - + 300422 - - YES + @@ -3148,25 +3111,23 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA - + 300423 - - YES + - + 300424 - - YES + - + @@ -3182,10 +3143,9 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 300447 - - YES + - + @@ -3196,10 +3156,9 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 300451 - - YES + - + @@ -3210,10 +3169,9 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 300453 - - YES + - + @@ -3224,10 +3182,9 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 300455 - - YES + - + @@ -3238,10 +3195,9 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 300457 - - YES + - + @@ -3252,10 +3208,9 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 300459 - - YES + - + @@ -3266,10 +3221,9 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA 300472 - - YES + - + @@ -3277,606 +3231,338 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA - - - - YES - - YES - -3.IBPluginDependency - -3.ImportedFromIB2 - 100292.IBPluginDependency - 100293.IBPluginDependency - 100295.IBPluginDependency - 100295.IBShouldRemoveOnLegacySave - 100310.IBPluginDependency - 100363.IBPluginDependency - 100364.IBPluginDependency - 100365.IBPluginDependency - 100368.IBPluginDependency - 100369.IBPluginDependency - 100370.IBPluginDependency - 100371.IBPluginDependency - 100372.IBPluginDependency - 100374.IBPluginDependency - 100375.IBPluginDependency - 100376.IBPluginDependency - 100377.IBPluginDependency - 100379.IBPluginDependency - 100382.IBPluginDependency - 100385.IBPluginDependency - 100386.IBPluginDependency - 100541.IBPluginDependency - 100543.IBPluginDependency - 129.IBPluginDependency - 129.ImportedFromIB2 - 130.IBPluginDependency - 130.ImportedFromIB2 - 131.IBPluginDependency - 131.ImportedFromIB2 - 134.IBPluginDependency - 134.ImportedFromIB2 - 136.IBPluginDependency - 136.ImportedFromIB2 - 143.IBPluginDependency - 143.ImportedFromIB2 - 144.IBPluginDependency - 144.ImportedFromIB2 - 145.IBPluginDependency - 145.ImportedFromIB2 - 149.IBPluginDependency - 149.ImportedFromIB2 - 150.IBPluginDependency - 150.ImportedFromIB2 - 157.IBPluginDependency - 157.ImportedFromIB2 - 163.IBPluginDependency - 163.ImportedFromIB2 - 169.IBEditorWindowLastContentRect - 169.IBPluginDependency - 169.ImportedFromIB2 - 169.editorWindowContentRectSynchronizationRect - 19.IBPluginDependency - 19.ImportedFromIB2 - 196.ImportedFromIB2 - 200295.IBPluginDependency - 200295.IBShouldRemoveOnLegacySave - 203.IBPluginDependency - 203.ImportedFromIB2 - 204.IBPluginDependency - 204.ImportedFromIB2 - 23.IBPluginDependency - 23.ImportedFromIB2 - 24.IBEditorWindowLastContentRect - 24.IBPluginDependency - 24.ImportedFromIB2 - 24.editorWindowContentRectSynchronizationRect - 244.IBEditorWindowLastContentRect - 244.IBPluginDependency - 244.IBViewEditorWindowController.showingLayoutRectangles - 244.IBWindowTemplateEditedContentRect - 244.ImportedFromIB2 - 244.editorWindowContentRectSynchronizationRect - 244.windowTemplate.hasMaxSize - 244.windowTemplate.hasMinSize - 244.windowTemplate.maxSize - 244.windowTemplate.minSize - 245.IBPluginDependency - 245.ImportedFromIB2 - 269.IBPluginDependency - 269.ImportedFromIB2 - 270.IBEditorWindowLastContentRect - 270.IBPluginDependency - 270.ImportedFromIB2 - 270.editorWindowContentRectSynchronizationRect - 272.IBPluginDependency - 272.ImportedFromIB2 - 285.IBEditorWindowLastContentRect - 285.IBPluginDependency - 285.IBViewEditorWindowController.showingBoundsRectangles - 285.IBViewEditorWindowController.showingLayoutRectangles - 285.IBWindowTemplateEditedContentRect - 285.ImportedFromIB2 - 285.editorWindowContentRectSynchronizationRect - 285.windowTemplate.hasMaxSize - 285.windowTemplate.hasMinSize - 285.windowTemplate.maxSize - 285.windowTemplate.minSize - 286.IBPluginDependency - 286.ImportedFromIB2 - 29.IBEditorWindowLastContentRect - 29.IBPluginDependency - 29.ImportedFromIB2 - 29.editorWindowContentRectSynchronizationRect - 292.IBPluginDependency - 292.ImportedFromIB2 - 293.IBPluginDependency - 293.ImportedFromIB2 - 295.IBPluginDependency - 295.ImportedFromIB2 - 296.IBPluginDependency - 296.ImportedFromIB2 - 297.IBPluginDependency - 297.ImportedFromIB2 - 298.IBPluginDependency - 298.ImportedFromIB2 - 300295.IBPluginDependency - 300295.IBShouldRemoveOnLegacySave - 300337.IBPluginDependency - 300337.ImportedFromIB2 - 300338.IBPluginDependency - 300338.ImportedFromIB2 - 300358.IBPluginDependency - 300358.ImportedFromIB2 - 300359.IBPluginDependency - 300359.ImportedFromIB2 - 300360.IBPluginDependency - 300361.IBPluginDependency - 300362.IBPluginDependency - 300362.ImportedFromIB2 - 300363.IBPluginDependency - 300364.IBPluginDependency - 300364.ImportedFromIB2 - 300365.IBPluginDependency - 300368.IBPluginDependency - 300368.ImportedFromIB2 - 300369.IBPluginDependency - 300370.IBPluginDependency - 300370.ImportedFromIB2 - 300371.IBPluginDependency - 300421.IBPluginDependency - 300421.ImportedFromIB2 - 300422.IBPluginDependency - 300422.ImportedFromIB2 - 300423.IBPluginDependency - 300423.ImportedFromIB2 - 300424.IBPluginDependency - 300424.ImportedFromIB2 - 300440.IBPluginDependency - 300441.IBPluginDependency - 300447.IBPluginDependency - 300447.ImportedFromIB2 - 300450.IBPluginDependency - 300451.IBPluginDependency - 300451.ImportedFromIB2 - 300452.IBPluginDependency - 300453.IBPluginDependency - 300453.ImportedFromIB2 - 300454.IBPluginDependency - 300455.IBPluginDependency - 300455.ImportedFromIB2 - 300456.IBPluginDependency - 300457.IBPluginDependency - 300457.ImportedFromIB2 - 300458.IBPluginDependency - 300459.IBPluginDependency - 300459.ImportedFromIB2 - 300460.IBPluginDependency - 300472.IBPluginDependency - 300472.ImportedFromIB2 - 300473.IBPluginDependency - 305.IBPluginDependency - 305.ImportedFromIB2 - 310.IBPluginDependency - 310.ImportedFromIB2 - 348.IBPluginDependency - 348.ImportedFromIB2 - 349.IBPluginDependency - 349.ImportedFromIB2 - 350.IBPluginDependency - 350.ImportedFromIB2 - 351.IBPluginDependency - 351.ImportedFromIB2 - 352.IBPluginDependency - 352.ImportedFromIB2 - 353.IBPluginDependency - 353.ImportedFromIB2 - 354.IBPluginDependency - 354.ImportedFromIB2 - 363.IBPluginDependency - 363.ImportedFromIB2 - 364.IBPluginDependency - 364.ImportedFromIB2 - 365.IBPluginDependency - 365.ImportedFromIB2 - 368.IBPluginDependency - 368.ImportedFromIB2 - 369.IBPluginDependency - 369.ImportedFromIB2 - 370.IBPluginDependency - 370.ImportedFromIB2 - 371.IBPluginDependency - 371.ImportedFromIB2 - 372.IBPluginDependency - 372.ImportedFromIB2 - 374.IBPluginDependency - 374.ImportedFromIB2 - 375.IBPluginDependency - 375.ImportedFromIB2 - 376.IBPluginDependency - 376.ImportedFromIB2 - 377.IBPluginDependency - 377.ImportedFromIB2 - 379.IBPluginDependency - 379.ImportedFromIB2 - 380.IBPluginDependency - 380.ImportedFromIB2 - 381.IBPluginDependency - 381.ImportedFromIB2 - 382.IBPluginDependency - 382.ImportedFromIB2 - 383.IBPluginDependency - 383.ImportedFromIB2 - 384.IBPluginDependency - 384.ImportedFromIB2 - 385.IBPluginDependency - 385.ImportedFromIB2 - 386.IBPluginDependency - 386.ImportedFromIB2 - 419.IBPluginDependency - 419.ImportedFromIB2 - 420.IBPluginDependency - 420.ImportedFromIB2 - 421.IBPluginDependency - 421.ImportedFromIB2 - 423.IBPluginDependency - 423.ImportedFromIB2 - 435.IBPluginDependency - 435.ImportedFromIB2 - 5.IBPluginDependency - 5.ImportedFromIB2 - 524.IBPluginDependency - 524.ImportedFromIB2 - 526.IBPluginDependency - 526.ImportedFromIB2 - 527.IBPluginDependency - 527.ImportedFromIB2 - 532.IBPluginDependency - 532.ImportedFromIB2 - 533.IBPluginDependency - 533.ImportedFromIB2 - 535.IBPluginDependency - 535.ImportedFromIB2 - 536.IBPluginDependency - 536.ImportedFromIB2 - 537.IBPluginDependency - 537.ImportedFromIB2 - 538.IBPluginDependency - 538.ImportedFromIB2 - 541.IBPluginDependency - 541.ImportedFromIB2 - 543.IBPluginDependency - 543.ImportedFromIB2 - 544.IBPluginDependency - 544.ImportedFromIB2 - 545.IBPluginDependency - 545.ImportedFromIB2 - 56.IBPluginDependency - 56.ImportedFromIB2 - 57.IBEditorWindowLastContentRect - 57.IBPluginDependency - 57.ImportedFromIB2 - 57.editorWindowContentRectSynchronizationRect - 573.IBPluginDependency - 573.ImportedFromIB2 - 574.IBPluginDependency - 574.ImportedFromIB2 - 575.IBPluginDependency - 575.ImportedFromIB2 - 58.IBPluginDependency - 58.ImportedFromIB2 - 92.IBPluginDependency - 92.ImportedFromIB2 - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{168, 821}, {113, 23}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{202, 626}, {154, 153}} - com.apple.InterfaceBuilder.CocoaPlugin - - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{349, 868}, {315, 143}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{271, 666}, {301, 153}} - {{437, 698}, {619, 308}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{437, 698}, {619, 308}} - - {{184, 290}, {481, 345}} - - - {3.40282e+38, 3.40282e+38} - {320, 240} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{58, 803}, {155, 33}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{100, 746}, {155, 33}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{68, 585}, {454, 271}} - com.apple.InterfaceBuilder.CocoaPlugin - - - {{68, 585}, {454, 271}} - - {{433, 406}, {486, 327}} - - - {3.40282e+38, 3.40282e+38} - {320, 240} - com.apple.InterfaceBuilder.CocoaPlugin - - {{145, 1011}, {336, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{67, 819}, {336, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{20, 641}, {218, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{79, 616}, {218, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - - - - YES - - - YES - + + 300476 + + + + + + + + 300477 + + + + + + + + 300478 + + + + + 300479 + + + + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{168, 821}, {113, 23}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{202, 626}, {154, 153}} + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{349, 868}, {315, 143}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{271, 666}, {301, 153}} + {{507, 565}, {619, 308}} + com.apple.InterfaceBuilder.CocoaPlugin + {{507, 565}, {619, 308}} + + {{184, 290}, {481, 345}} + + + {3.40282e+38, 3.40282e+38} + {320, 240} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{58, 803}, {155, 33}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{100, 746}, {155, 33}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{68, 585}, {454, 271}} + com.apple.InterfaceBuilder.CocoaPlugin + + + {{68, 585}, {454, 271}} + + {{433, 406}, {486, 327}} + + + {3.40282e+38, 3.40282e+38} + {320, 240} + com.apple.InterfaceBuilder.CocoaPlugin + + {{145, 986}, {375, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{67, 819}, {336, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{20, 641}, {218, 203}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{79, 616}, {218, 203}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + - - YES - - - YES - - + - 300475 + 300481 - - YES + FirstResponder NSObject @@ -3901,19 +3587,21 @@ IHBhcmEgYWN0aXZhciBlbCBib3TDs24gY2VudHJhbCBvIGRlcmVjaG8gZGVsIHJhdMOzbi4KA - + 0 + IBCocoaFramework com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - - com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 - + YES ../X11.xcodeproj 3 + + {9, 8} + {7, 2} + {15, 15} + diff --git a/xserver/hw/xquartz/bundle/Resources/ar.lproj/locversion.plist b/xserver/hw/xquartz/bundle/Resources/ar.lproj/locversion.plist new file mode 100644 index 000000000..627fb3ea7 --- /dev/null +++ b/xserver/hw/xquartz/bundle/Resources/ar.lproj/locversion.plist @@ -0,0 +1,14 @@ + + + + + LprojCompatibleVersion + 98 + LprojLocale + ar + LprojRevisionLevel + 1 + LprojVersion + 98 + + diff --git a/xserver/hw/xquartz/bundle/Resources/ar.lproj/main.nib/designable.nib b/xserver/hw/xquartz/bundle/Resources/ar.lproj/main.nib/designable.nib index cf595d25e..8bc6b618d 100644 --- a/xserver/hw/xquartz/bundle/Resources/ar.lproj/main.nib/designable.nib +++ b/xserver/hw/xquartz/bundle/Resources/ar.lproj/main.nib/designable.nib @@ -1,35 +1,21 @@ - + - 1050 - 10A432 - 740 - 1038 - 437.00 + 1040 + 11A194b + 787 + 1079 + 502.00 com.apple.InterfaceBuilder.CocoaPlugin - 740 + 787 - - YES - - - - - YES + + com.apple.InterfaceBuilder.CocoaPlugin - - - YES - - YES - - - YES - - - - YES + + + NSApplication @@ -43,8 +29,7 @@ MainMenu - - YES + X11 @@ -62,8 +47,7 @@ submenuAction: X11 - - YES + حول X11 @@ -103,9 +87,7 @@ submenuAction: خدمات - - YES - + _NSServicesMenu @@ -152,7 +134,7 @@ - إخفاء الآخرين + إخفاء الأخرى h 1572864 2147483647 @@ -189,7 +171,7 @@ - + _NSAppleMenu @@ -204,8 +186,7 @@ submenuAction: التطبيقات - - YES + YES @@ -226,7 +207,7 @@ - + @@ -240,8 +221,7 @@ submenuAction: تحرير - - YES + نسخ @@ -251,12 +231,12 @@ - + - إطار + نافذة 1048576 2147483647 @@ -264,9 +244,8 @@ submenuAction: - إطار - - YES + نافذة + إغلاق @@ -307,7 +286,7 @@ - تدوير عبر إطارات + تدوير عبر النوافذ ` 1048840 2147483647 @@ -316,7 +295,7 @@ - عكس التدوير عبر الإطارات + عكس التدوير عبر النوافذ ~ 1179914 2147483647 @@ -343,24 +322,13 @@ - - - YES - YES - - - 1048576 - 2147483647 - - - - + _NSWindowsMenu - تعليمات + مساعدة 1048576 2147483647 @@ -368,22 +336,21 @@ submenuAction: - تعليمات - - YES + مساعدة + - تعليمات X11 + مساعدة X11 1048576 2147483647 - + - + _NSMainMenu @@ -399,48 +366,43 @@ View - {1.79769e+308, 1.79769e+308} + + {3.4028235e+38, 3.4028235e+38} {320, 240} - + 256 - - YES + 256 {{13, 10}, {458, 292}} - - YES - - - 1 - - - + + + + 256 - - YES - - + + + 256 - {{18, 207}, {402, 23}} - + {{18, 210}, {402, 18}} + YES - + 67239424 - 67125376 - مضاهاة ماوس ثلاثي الأزرار + 67108992 + مصادقة الاتصالات LucidaGrande 13 1044 - + 1210864127 2 - + NSImage NSSwitch @@ -453,30 +415,51 @@ 25 - - + + 256 - {{17, 60}, {385, 31}} - + {{18, 133}, {402, 18}} + YES - + 67239424 - 71319680 - في حالة التمكين، قد تتداخل مكافئات مفاتيح شريط القوائم مع تطبيقات X11 التي تستخدم مفتاح تعديل Meta. + 67108992 + السماح بالاتصالات من عملاء الشبكة + + + 1210864127 + 2 + + + + + 200 + 25 + + + + + 256 + {{17, 162}, {385, 42}} + + YES + + 67239424 + 71303296 + يؤدي بدء تشغيل X11 إلى إنشاء مفاتيح تحكم في وصول Xauthority. في حالة تغيير عنوان IP للنظام، تصبح هذه المفاتيح غير صالحة، مما قد يؤدي إلى الحيلولة دون بدء تشغيل تطبيقات X11. LucidaGrande 11 3100 - - + 6 System controlColor 3 - MC42NjY2NjY2NjY3AA + MC42NjY2NjY2ODY1AA @@ -490,92 +473,344 @@ - - + + 256 - {{17, 163}, {385, 42}} - + {{17, 85}, {385, 42}} + YES - + 67239424 - 71319680 - 2KfYtti62Lcg2YXYuSDYp9mE2KfYs9iq2YXYsdin2LEg2LnZhNmJINmF2YHYqtin2K0g2KfZhNin2K7Y -qtmK2KfYsSDYo9mIINmF2YHYqtin2K0g2KfZhNij2YjYp9mF2LEg2KPYq9mG2KfYoSDYp9mE2YbZgtix -INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF -2YYuCg + 71303296 + في حالة التمكين، يجب أيضًا تمكين مصادقة الاتصالات للتأكد من تأمين النظام. وفي حالة التعطيل، لا يتم السماح بالاتصالات من تطبيقات بعيدة. - - + - - + + 256 - {{18, 92}, {402, 25}} - + {{20, -16}, {404, 14}} + YES - + 67239424 - 67125376 - تمكين مكافئات المفاتيح في X11 - - - 1210864127 - 2 - - - - - 200 - 25 - - - - - 256 - {{17, 121}, {385, 19}} - - YES - - 67239424 - 71319680 - السماح بكتابة تغييرات قائمة الإدخال فوق مخطط مفاتيح X11 الحالي. + 71303296 + يتم تنفيذ هذه الخيارات في المرة التالية لبدء تشغيل X11. - - + - - - 256 - {{18, 142}, {402, 25}} - - YES - - 67239424 - 67125376 - اتباع تصميم لوحة مفاتيح النظام - - - 1210864127 - 2 - - - - - 200 - 25 - - - + {{10, 33}, {438, 246}} - - إدخال + أمان + + + + + + 2 + + + + 256 + + + + 256 + {{17, 212}, {402, 18}} + + YES + + 67239424 + 67108992 + النقر خلال النوافذ غير النشطة + + + 1210864127 + 2 + + + + + 200 + 25 + + + + + 256 + {{19, 175}, {385, 31}} + + YES + + 67239424 + 71303296 + عند تمكينه، سيؤدي النقر على نافذة غير نشطة إلى مرور نقرة الماوس هذه عبر هذه النافذة بالإضافة إلى تنشيطها. + + + + + + + + + 256 + {{17, 151}, {402, 18}} + + YES + + 67239424 + 67108992 + التركيز تبعًا لموضع مؤشر الماوس + + + 1210864127 + 2 + + + + + 200 + 25 + + + + + 256 + {{19, 128}, {385, 17}} + + YES + + 67239424 + 71303296 + يتبع تركيز نافذة X11 موضع المؤشر، ولهذا بعض الآثار السلبية. + + + + + + + + + 256 + {{17, 107}, {402, 18}} + + YES + + 67239424 + 67108992 + التركيز على النوافذ الجديدة + + + 1210864127 + 2 + + + + + 200 + 25 + + + + + 256 + {{19, 73}, {385, 28}} + + YES + + 67239424 + 71303296 + عند تمكينه، سيؤدي إنشاء نافذة X11 جديدة إلى انتقال تطبيق X11.app إلى المقدمة (بدلاً من Finder.app أو Terminal.app وما إلى ذلك) + + + + + + + + {{10, 33}, {438, 246}} + + Windows + + + + + + 2 + + + + 256 + + + + 256 + {{11, 222}, {409, 23}} + + YES + + 67239424 + 67108992 + تمكين المزامنة + + + 1210864127 + 2 + + + + + 200 + 25 + + + + + 256 + {{17, 188}, {385, 28}} + + YES + + 67239424 + 71303296 + يقوم بتمكين عنصر القائمة "نسخ" ويسمح بالمزامنة بين لوحة اللصق في OSX وحافظة X11 وذاكرات التخزين المؤقت الأساسية. + + + + + + + + + 256 + {{-8, 96}, {409, 23}} + + YES + + 67239424 + 67108992 + تحديث الحافظة عند إجراء تغييرات على لوحة اللصق + + + 1210864127 + 2 + + + + + 200 + 25 + + + + + 256 + {{-8, 71}, {409, 23}} + + YES + + 67239424 + 67108992 + تحديث الذاكرة الأساسية (نقر بالزر الأوسط) عند إجراء تغييرات على لوحة اللصق + + + 1210864127 + 2 + + + + + 200 + 25 + + + + + 256 + {{-8, 46}, {409, 23}} + + YES + + 67239424 + 67108992 + تحديث لوحة اللصق على الفور عند تحديد نص جديد + + + 1210864127 + 2 + + + + + 200 + 25 + + + + + 256 + {{-8, 159}, {409, 23}} + + YES + + 67239424 + 67108992 + تحديث لوحة اللصق عند إجراء تغييرات على الحافظة + + + 1210864127 + 2 + + + + + 200 + 25 + + + + + 256 + {{2, 125}, {385, 28}} + + YES + + 67239424 + 71303296 + قم بتعطيل هذا الخيار إذا كنت ترغب في استخدام xclipboard أوklipper أو أية أداة أخرى لإدارة حافظة X11. + + + + + + + + + 256 + {{17, 14}, {370, 28}} + + YES + + 67239424 + 71303296 + نظرًا للقيود الموجودة في بروتوكول X11، قد لا يعمل هذا الخيار دومًا في بعض التطبيقات. + + + + + + + + {{10, 33}, {438, 246}} + + لوحة اللصق @@ -586,23 +821,22 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 256 - - YES + 256 - {{16, 58}, {409, 25}} + {{18, 63}, {402, 18}} YES 67239424 - 67125376 + 67108992 استخدام تأثير تنبيه النظام 1210864127 2 - + @@ -613,15 +847,14 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 256 - {{22, 26}, {385, 31}} + {{17, 29}, {385, 28}} YES 67239424 - 71319680 + 71303296 تستخدم إشارات X11 الصوتية تنبيه النظام القياسي، كما هو محدد في لوحة تفضيلات النظام لمؤثرات الصوت. - @@ -630,22 +863,24 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 256 - {{238, 202}, {128, 26}} + {{253, 202}, {128, 26}} YES -2076049856 - 67126400 + 67110016 - 109199615 + 111821055 1 LucidaGrande 13 16 - + + + @@ -669,8 +904,7 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF OtherViews - - YES + @@ -708,8 +942,7 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 24 - - + 3 YES @@ -720,15 +953,14 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 256 - {{369, 205}, {55, 20}} + {{383, 205}, {55, 20}} YES 67239424 - 71303168 - 2KfZhNij2YTZiNin2YY6Cg + 4194432 + الألوان: - @@ -737,15 +969,14 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 256 - {{15, 178}, {392, 19}} + {{10, 183}, {392, 14}} YES 67239424 - 71319680 + 71303296 يتم تنفيذ هذا الخيار في المرة التالية لبدء تشغيل X11. - @@ -754,18 +985,18 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 256 - {{16, 149}, {409, 23}} + {{11, 149}, {409, 23}} YES 67239424 - 67125376 + 67108992 وضع ملء الشاشة 1210864127 2 - + @@ -776,18 +1007,18 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 256 - {{22, 84}, {384, 25}} + {{-8, 83}, {409, 23}} YES 67239424 - 67125376 - إظهار تلقائي لشريط القوائم في وضع ملء الشاشة + 67108992 + إظهار تلقائي لشريط القائمة في وضع ملء الشاشة 1210864127 2 - + @@ -798,51 +1029,49 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 256 - {{22, 113}, {385, 31}} + {{17, 112}, {385, 31}} YES 67239424 - 71319680 - تمكين إطار X11 الجذري. استخدم ضغط مفاتيح الأوامر-الاختيار-A لدخول ومغادرة وضع ملء الشاشة. + 71303296 + تمكين نافذة X11 الجذري. استخدم ضغط مفاتيح الأوامر-الاختيار-A لدخول ومغادرة وضع ملء الشاشة. - - + {{10, 33}, {438, 246}} الإخراج - + - 2 + 1 - - + + 256 - - YES - - + + + 256 - {{18, 221}, {409, 25}} - + {{18, 210}, {402, 18}} + YES - + 67239424 - 67125376 - تمكين المزامنة + 67108992 + مضاهاة ماوس ثلاثي الأزرار - + 1210864127 2 - + @@ -850,405 +1079,163 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 25 - - + + 256 - {{24, 184}, {385, 32}} - + {{17, 60}, {385, 31}} + YES - + 67239424 - 71319680 - يقوم بتمكين عنصر القائمة "نسخ" ويسمح بالمزامنة بين لوحة اللصق في OSX وحافظة X11 وذاكرات التخزين المؤقت الأساسية. + 71303296 + في حالة التمكين، قد تتداخل مكافئات مفاتيح شريط القائمة مع تطبيقات X11 التي تستخدم مفتاح تعديل Meta. - + - - + + 256 - {{14, 93}, {394, 26}} - + {{17, 162}, {385, 42}} + YES - + 67239424 - 67125376 - تحديث الحافظة عند إجراء تغييرات على لوحة اللصق - - - 1210864127 - 2 - - - - - 200 - 25 - - - - - 256 - {{14, 71}, {394, 23}} - - YES - - 67239424 - 67125376 - تحديث الذاكرة الأساسية (نقر بالزر الأوسط) عند إجراء تغييرات على لوحة اللصق - - - 1210864127 - 2 - - - - - 200 - 25 - - - - - 256 - {{14, 45}, {394, 25}} - - YES - - 67239424 - 67125376 - تحديث لوحة اللصق على الفور عند تحديد نص جديد - - - 1210864127 - 2 - - - - - 200 - 25 - - - - - 256 - {{-1, 157}, {409, 25}} - - YES - - 67239424 - 67125376 - تحديث لوحة اللصق عند إجراء تغييرات على الحافظة - - - 1210864127 - 2 - - - - - 200 - 25 - - - - - 256 - {{6, 122}, {385, 31}} - - YES - - 67239424 - 71319680 - قم بتعطيل هذا الخيار إذا كنت ترغب في استخدام xclipboard أوklipper أو أية أداة أخرى لإدارة حافظة X11. + 71303296 + 2KfYtti62Lcg2YXYuSDYp9mE2KfYs9iq2YXYsdin2LEg2LnZhNmJINmF2YHYqtin2K0g2KfZhNin2K7Y +qtmK2KfYsSDYo9mIINmF2YHYqtin2K0g2KfZhNij2YjYp9mF2LEg2KPYq9mG2KfYoSDYp9mE2YbZgtix +INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF +2YYuCg - + - - + + 256 - {{-5, 14}, {396, 28}} - + {{18, 97}, {402, 18}} + YES - + 67239424 - 71319680 - نظرًا للقيود الموجودة في بروتوكول X11، قد لا يعمل هذا الخيار دومًا في بعض التطبيقات. + 67108992 + تمكين مكافئات المفاتيح في X11 + + + 1210864127 + 2 + + + + + 200 + 25 + + + + + 256 + {{17, 126}, {385, 14}} + + YES + + 67239424 + 71303296 + السماح بكتابة تغييرات قائمة الإدخال فوق مخطط مفاتيح X11 الحالي. - + - + + + 256 + {{18, 146}, {402, 18}} + + YES + + 67239424 + 67108992 + اتباع تصميم لوحة مفاتيح النظام + + + 1210864127 + 2 + + + + + 200 + 25 + + + + + 256 + {{17, -1}, {385, 31}} + + YES + + 67239424 + 71303296 + عند التمكين، مفاتيح الخيار إرسال Alt_L و Alt_R X11 علامات المفتاح بدلًا من Mode_switch. + + + + + + + + + 256 + {{18, 36}, {402, 18}} + + YES + + 67239424 + 67108992 + مفاتيح الخيار إرسال Alt_L و Alt_R + + + 1210864127 + 2 + + + + + 200 + 25 + + + {{10, 33}, {438, 246}} + - لوحة اللصق + إدخال - - - 2 - - - - 256 - - YES - - - 256 - {{15, 209}, {402, 23}} - - YES - - 67239424 - 67125376 - النقر خلال الإطارات غير النشطة - - - 1210864127 - 2 - - - - - 200 - 25 - - - - - 256 - {{20, 175}, {385, 31}} - - YES - - 67239424 - 71319680 - عند تمكينه، سيؤدي النقر على إطار غير نشط إلى مرور نقرة الماوس هذه عبر هذا الإطار بالإضافة إلى تنشيطه. - - - - - - - - - 256 - {{15, 146}, {402, 23}} - - YES - - 67239424 - 67125376 - التركيز تبعًا لموضع مؤشر الماوس - - - 1210864127 - 2 - - - - - 200 - 25 - - - - - 256 - {{20, 127}, {385, 17}} - - YES - - 67239424 - 71319680 - يتبع تركيز إطار X11 موضع المؤشر. ولهذا بعض الآثار السلبية. - - - - - - - - - 256 - {{15, 99}, {402, 23}} - - YES - - 67239424 - 67125376 - التركيز على الإطارات الجديدة - - - 1210864127 - 2 - - - - - 200 - 25 - - - - - 256 - {{20, 65}, {385, 31}} - - YES - - 67239424 - 71319680 - عند تمكينه، سيؤدي إنشاء إطار X11 جديد إلى انتقال تطبيق X11.app إلى المقدمة (بدلاً من Finder.app أو Terminal.app وما إلى ذلك) - - - - - - - - {{10, 33}, {438, 246}} - - Windows - - - - - - - 256 - - YES - - - 256 - {{18, 207}, {402, 21}} - - YES - - 67239424 - 67125376 - مصادقة الاتصالات - - - 1210864127 - 2 - - - - - 200 - 25 - - - - - 256 - {{18, 128}, {402, 23}} - - YES - - 67239424 - 67125376 - السماح بالاتصالات من عملاء الشبكة - - - 1210864127 - 2 - - - - - 200 - 25 - - - - - 256 - {{18, 162}, {385, 42}} - - YES - - 67239424 - 71319680 - يؤدي بدء تشغيل X11 إلى إنشاء مفاتيح تحكم في وصول Xauthority. في حالة تغيير عنوان IP للنظام، تصبح هذه المفاتيح غير صالحة، مما قد يؤدي إلى الحيلولة دون بدء تشغيل تطبيقات X11. - - - - - - - - - - 256 - {{18, 85}, {385, 42}} - - YES - - 67239424 - 71319680 - في حالة التمكين، يجب أيضًا تمكين مصادقة الاتصالات للتأكد من تأمين النظام. وفي حالة التعطيل، لا يتم السماح بالاتصالات من تطبيقات بعيدة. - - - - - - - - - - 256 - {{20, -16}, {404, 14}} - - YES - - 67239424 - 71303168 - يتم تنفيذ هذه الخيارات في المرة التالية لبدء تشغيل X11. - - - - - - - - - {{10, 33}, {438, 246}} - - تأمين - - - - + 0 YES YES - - YES + - + - + {484, 308} - {{0, 0}, {1280, 938}} {320, 262} - {1.79769e+308, 1.79769e+308} + {3.4028235e+38, 3.4028235e+38} x11_prefs @@ -1261,22 +1248,23 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF View - {1.79769e+308, 1.79769e+308} + + {3.4028235e+38, 3.4028235e+38} {320, 240} 256 - - YES + - 265 - {{18, 191}, {100, 32}} + 268 + {{14, 191}, {100, 32}} + YES 67239424 - 137887744 + 137887872 تكرار @@ -1297,13 +1285,14 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF - 265 - {{18, 159}, {100, 32}} + 268 + {{14, 159}, {100, 32}} + YES 67239424 - 137887744 + 137887872 إزالة @@ -1321,24 +1310,24 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 274 - - YES + 2304 - - YES + 256 {301, 198} + YES 256 {301, 17} + @@ -1346,9 +1335,9 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 256 {{302, 0}, {16, 17}} + - - YES + 71 10 @@ -1376,14 +1365,13 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 338820672 - 67126400 + 67110016 Text Cell LucidaGrande 12 16 - YES @@ -1398,7 +1386,6 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF YES YES - 99 @@ -1417,10 +1404,9 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 338820672 - 67126400 + 67110016 Text Cell - @@ -1429,7 +1415,6 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF YES YES - 121.73100280761719 @@ -1445,10 +1430,9 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 338820672 - 67126400 + 67110016 Text Cell - @@ -1457,12 +1441,11 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF YES YES - - + 3 2 - + 6 System @@ -1482,9 +1465,10 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF YES 0 - + {{1, 17}, {301, 198}} + @@ -1495,6 +1479,7 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 256 {{302, 17}, {15, 198}} + _doScroller: 0.99492377042770386 @@ -1504,6 +1489,7 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 256 {{1, 215}, {301, 15}} + 1 _doScroller: @@ -1512,21 +1498,22 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 2304 - - YES + - + {{1, 0}, {301, 17}} + 4 - - {{122, 20}, {318, 231}} + + {{116, 20}, {318, 231}} + 50 @@ -1538,13 +1525,14 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF - 265 - {{18, 223}, {100, 32}} + 268 + {{14, 223}, {100, 32}} + YES -2080244224 - 137887744 + 137887872 إضافة عنصر @@ -1559,19 +1547,19 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 25 - + {454, 271} + {{0, 0}, {1280, 938}} {320, 262} - {1.79769e+308, 1.79769e+308} + {3.4028235e+38, 3.4028235e+38} x11_apps قائمة - - YES + YES @@ -1594,8 +1582,7 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF submenuAction: التطبيقات - - YES + YES @@ -1616,16 +1603,15 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF - + - + - + - - YES + copy: @@ -1986,14 +1972,6 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 549 - - - window_separator - - - - 300331 - menu @@ -2178,13 +2156,28 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 300475 - + + + prefs_changed: + + + + 300480 + + + + option_sends_alt + + + + 300481 + + - - YES + 0 - + @@ -2209,41 +2202,37 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 29 - - YES + - + MainMenu 19 - - YES + - + 24 - - YES + - - + @@ -2289,17 +2278,15 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 56 - - YES + - + 57 - - YES + @@ -2312,7 +2299,7 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF - + @@ -2328,10 +2315,9 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 131 - - YES + - + @@ -2387,19 +2373,17 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 163 - - YES + - + 169 - - YES + - + @@ -2410,20 +2394,18 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 269 - - YES + - + 270 - - YES + - + @@ -2439,19 +2421,17 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 419 - - YES + - + 420 - - YES + - + @@ -2468,126 +2448,115 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 244 - - YES + - + PrefsPanel 245 - - YES + - + 348 - - YES - - - - + - + + + + + 349 - - YES + - + 351 - - YES + - + + + 363 - - YES + - + 364 - - YES + - + 365 - - YES + - + 368 - - YES + - + 369 - - YES + - + 370 - - YES + - + 352 - - YES + - + 350 - - YES + @@ -2596,169 +2565,152 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF - + 371 - - YES + - + 372 - - YES + - + 382 - - YES + - + 385 - - YES + - + 386 - - YES + - + 541 - - YES + - + 543 - - YES + - + 353 - - YES + - + 354 - - YES + - + 374 - - YES + - + 375 - - YES + - + 376 - - YES + - + 377 - - YES + - + 379 - - YES + - + 285 - - YES + - + EditPrograms 286 - - YES + - + 423 - - YES + - + DockMenu @@ -2770,20 +2722,18 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 526 - - YES + - + 527 - - YES + - + @@ -2839,10 +2789,9 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 100382 - - YES + - + @@ -2893,13 +2842,12 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 380 - - YES + - + @@ -2925,13 +2873,12 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 295 - - YES + - + @@ -2952,21 +2899,19 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 296 - - YES + + - - + 535 - - YES + - + @@ -2977,10 +2922,9 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 298 - - YES + - + @@ -2991,10 +2935,9 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 297 - - YES + - + @@ -3005,10 +2948,9 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 310 - - YES + - + @@ -3019,10 +2961,9 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 292 - - YES + - + @@ -3033,10 +2974,9 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 293 - - YES + - + @@ -3044,50 +2984,41 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF - - 300330 - - - 300337 - - YES + - + 300338 - - YES + - + 300358 - - YES + - + 300359 - - YES + - + @@ -3103,10 +3034,9 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 300362 - - YES + - + @@ -3117,10 +3047,9 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 300364 - - YES + - + @@ -3131,10 +3060,9 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 300368 - - YES + - + @@ -3145,10 +3073,9 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 300370 - - YES + - + @@ -3159,17 +3086,15 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 300421 - - YES + - + 300422 - - YES + @@ -3178,25 +3103,23 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF - + 300423 - - YES + - + 300424 - - YES + - + @@ -3212,10 +3135,9 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 300447 - - YES + - + @@ -3226,10 +3148,9 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 300451 - - YES + - + @@ -3240,10 +3161,9 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 300453 - - YES + - + @@ -3254,10 +3174,9 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 300455 - - YES + - + @@ -3268,10 +3187,9 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 300457 - - YES + - + @@ -3282,10 +3200,9 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 300459 - - YES + - + @@ -3296,10 +3213,9 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF 300472 - - YES + - + @@ -3307,612 +3223,337 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF - - - - YES - - YES - -3.IBPluginDependency - -3.ImportedFromIB2 - 100292.IBPluginDependency - 100293.IBPluginDependency - 100295.IBPluginDependency - 100295.IBShouldRemoveOnLegacySave - 100310.IBPluginDependency - 100363.IBPluginDependency - 100364.IBPluginDependency - 100365.IBPluginDependency - 100368.IBPluginDependency - 100369.IBPluginDependency - 100370.IBPluginDependency - 100371.IBPluginDependency - 100372.IBPluginDependency - 100374.IBPluginDependency - 100375.IBPluginDependency - 100376.IBPluginDependency - 100377.IBPluginDependency - 100379.IBPluginDependency - 100382.IBPluginDependency - 100385.IBPluginDependency - 100386.IBPluginDependency - 100541.IBPluginDependency - 100543.IBPluginDependency - 129.IBPluginDependency - 129.ImportedFromIB2 - 130.IBPluginDependency - 130.ImportedFromIB2 - 131.IBPluginDependency - 131.ImportedFromIB2 - 134.IBPluginDependency - 134.ImportedFromIB2 - 136.IBPluginDependency - 136.ImportedFromIB2 - 143.IBPluginDependency - 143.ImportedFromIB2 - 144.IBPluginDependency - 144.ImportedFromIB2 - 145.IBPluginDependency - 145.ImportedFromIB2 - 149.IBPluginDependency - 149.ImportedFromIB2 - 150.IBPluginDependency - 150.ImportedFromIB2 - 157.IBPluginDependency - 157.ImportedFromIB2 - 163.IBPluginDependency - 163.ImportedFromIB2 - 169.IBEditorWindowLastContentRect - 169.IBPluginDependency - 169.ImportedFromIB2 - 169.editorWindowContentRectSynchronizationRect - 19.IBPluginDependency - 19.ImportedFromIB2 - 196.ImportedFromIB2 - 200295.IBPluginDependency - 200295.IBShouldRemoveOnLegacySave - 203.IBPluginDependency - 203.ImportedFromIB2 - 204.IBPluginDependency - 204.ImportedFromIB2 - 23.IBPluginDependency - 23.ImportedFromIB2 - 24.IBEditorWindowLastContentRect - 24.IBPluginDependency - 24.ImportedFromIB2 - 24.editorWindowContentRectSynchronizationRect - 244.IBEditorWindowLastContentRect - 244.IBPluginDependency - 244.IBViewEditorWindowController.showingLayoutRectangles - 244.IBWindowTemplateEditedContentRect - 244.ImportedFromIB2 - 244.editorWindowContentRectSynchronizationRect - 244.windowTemplate.hasMaxSize - 244.windowTemplate.hasMinSize - 244.windowTemplate.maxSize - 244.windowTemplate.minSize - 245.IBPluginDependency - 245.ImportedFromIB2 - 269.IBPluginDependency - 269.ImportedFromIB2 - 270.IBEditorWindowLastContentRect - 270.IBPluginDependency - 270.ImportedFromIB2 - 270.editorWindowContentRectSynchronizationRect - 272.IBPluginDependency - 272.ImportedFromIB2 - 285.IBEditorWindowLastContentRect - 285.IBPluginDependency - 285.IBViewEditorWindowController.showingBoundsRectangles - 285.IBViewEditorWindowController.showingLayoutRectangles - 285.IBWindowTemplateEditedContentRect - 285.ImportedFromIB2 - 285.editorWindowContentRectSynchronizationRect - 285.windowTemplate.hasMaxSize - 285.windowTemplate.hasMinSize - 285.windowTemplate.maxSize - 285.windowTemplate.minSize - 286.IBPluginDependency - 286.ImportedFromIB2 - 29.IBEditorWindowLastContentRect - 29.IBPluginDependency - 29.ImportedFromIB2 - 29.editorWindowContentRectSynchronizationRect - 292.IBPluginDependency - 292.ImportedFromIB2 - 293.IBPluginDependency - 293.ImportedFromIB2 - 295.IBPluginDependency - 295.ImportedFromIB2 - 296.IBPluginDependency - 296.ImportedFromIB2 - 297.IBPluginDependency - 297.ImportedFromIB2 - 298.IBPluginDependency - 298.ImportedFromIB2 - 300295.IBPluginDependency - 300295.IBShouldRemoveOnLegacySave - 300330.IBPluginDependency - 300330.ImportedFromIB2 - 300337.IBPluginDependency - 300337.ImportedFromIB2 - 300338.IBPluginDependency - 300338.ImportedFromIB2 - 300358.IBPluginDependency - 300358.ImportedFromIB2 - 300359.IBPluginDependency - 300359.ImportedFromIB2 - 300360.IBPluginDependency - 300361.IBPluginDependency - 300362.IBPluginDependency - 300362.ImportedFromIB2 - 300363.IBPluginDependency - 300364.IBPluginDependency - 300364.ImportedFromIB2 - 300365.IBPluginDependency - 300368.IBPluginDependency - 300368.ImportedFromIB2 - 300369.IBPluginDependency - 300370.IBPluginDependency - 300370.ImportedFromIB2 - 300371.IBPluginDependency - 300421.IBPluginDependency - 300421.ImportedFromIB2 - 300422.IBPluginDependency - 300422.ImportedFromIB2 - 300423.IBPluginDependency - 300423.ImportedFromIB2 - 300424.IBPluginDependency - 300424.ImportedFromIB2 - 300440.IBPluginDependency - 300441.IBPluginDependency - 300447.IBPluginDependency - 300447.ImportedFromIB2 - 300450.IBPluginDependency - 300451.IBPluginDependency - 300451.ImportedFromIB2 - 300452.IBPluginDependency - 300453.IBPluginDependency - 300453.ImportedFromIB2 - 300454.IBPluginDependency - 300455.IBPluginDependency - 300455.ImportedFromIB2 - 300456.IBPluginDependency - 300457.IBPluginDependency - 300457.ImportedFromIB2 - 300458.IBPluginDependency - 300459.IBPluginDependency - 300459.ImportedFromIB2 - 300460.IBPluginDependency - 300472.IBPluginDependency - 300472.ImportedFromIB2 - 300473.IBPluginDependency - 305.IBPluginDependency - 305.ImportedFromIB2 - 310.IBPluginDependency - 310.ImportedFromIB2 - 348.IBPluginDependency - 348.ImportedFromIB2 - 349.IBPluginDependency - 349.ImportedFromIB2 - 350.IBPluginDependency - 350.ImportedFromIB2 - 351.IBPluginDependency - 351.ImportedFromIB2 - 352.IBPluginDependency - 352.ImportedFromIB2 - 353.IBPluginDependency - 353.ImportedFromIB2 - 354.IBPluginDependency - 354.ImportedFromIB2 - 363.IBPluginDependency - 363.ImportedFromIB2 - 364.IBPluginDependency - 364.ImportedFromIB2 - 365.IBPluginDependency - 365.ImportedFromIB2 - 368.IBPluginDependency - 368.ImportedFromIB2 - 369.IBPluginDependency - 369.ImportedFromIB2 - 370.IBPluginDependency - 370.ImportedFromIB2 - 371.IBPluginDependency - 371.ImportedFromIB2 - 372.IBPluginDependency - 372.ImportedFromIB2 - 374.IBPluginDependency - 374.ImportedFromIB2 - 375.IBPluginDependency - 375.ImportedFromIB2 - 376.IBPluginDependency - 376.ImportedFromIB2 - 377.IBPluginDependency - 377.ImportedFromIB2 - 379.IBPluginDependency - 379.ImportedFromIB2 - 380.IBEditorWindowLastContentRect - 380.IBPluginDependency - 380.ImportedFromIB2 - 381.IBPluginDependency - 381.ImportedFromIB2 - 382.IBPluginDependency - 382.ImportedFromIB2 - 383.IBPluginDependency - 383.ImportedFromIB2 - 384.IBPluginDependency - 384.ImportedFromIB2 - 385.IBPluginDependency - 385.ImportedFromIB2 - 386.IBPluginDependency - 386.ImportedFromIB2 - 419.IBPluginDependency - 419.ImportedFromIB2 - 420.IBPluginDependency - 420.ImportedFromIB2 - 421.IBPluginDependency - 421.ImportedFromIB2 - 423.IBPluginDependency - 423.ImportedFromIB2 - 435.IBPluginDependency - 435.ImportedFromIB2 - 5.IBPluginDependency - 5.ImportedFromIB2 - 524.IBPluginDependency - 524.ImportedFromIB2 - 526.IBPluginDependency - 526.ImportedFromIB2 - 527.IBPluginDependency - 527.ImportedFromIB2 - 532.IBPluginDependency - 532.ImportedFromIB2 - 533.IBPluginDependency - 533.ImportedFromIB2 - 535.IBPluginDependency - 535.ImportedFromIB2 - 536.IBPluginDependency - 536.ImportedFromIB2 - 537.IBPluginDependency - 537.ImportedFromIB2 - 538.IBPluginDependency - 538.ImportedFromIB2 - 541.IBPluginDependency - 541.ImportedFromIB2 - 543.IBPluginDependency - 543.ImportedFromIB2 - 544.IBPluginDependency - 544.ImportedFromIB2 - 545.IBPluginDependency - 545.ImportedFromIB2 - 56.IBPluginDependency - 56.ImportedFromIB2 - 57.IBEditorWindowLastContentRect - 57.IBPluginDependency - 57.ImportedFromIB2 - 57.editorWindowContentRectSynchronizationRect - 573.IBPluginDependency - 573.ImportedFromIB2 - 574.IBPluginDependency - 574.ImportedFromIB2 - 575.IBPluginDependency - 575.ImportedFromIB2 - 58.IBPluginDependency - 58.ImportedFromIB2 - 92.IBPluginDependency - 92.ImportedFromIB2 - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{168, 821}, {113, 23}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{202, 626}, {154, 153}} - com.apple.InterfaceBuilder.CocoaPlugin - - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{349, 858}, {315, 153}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{271, 666}, {301, 153}} - {{537, 464}, {484, 308}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{537, 464}, {484, 308}} - - {{184, 290}, {481, 345}} - - - {3.40282e+38, 3.40282e+38} - {320, 240} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{58, 803}, {155, 33}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{100, 746}, {155, 33}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{339, 212}, {454, 271}} - com.apple.InterfaceBuilder.CocoaPlugin - - - {{339, 212}, {454, 271}} - - {{433, 406}, {486, 327}} - - - {3.40282e+38, 3.40282e+38} - {320, 240} - com.apple.InterfaceBuilder.CocoaPlugin - - {{145, 1011}, {274, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{67, 819}, {336, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{787, 632}, {152, 83}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{20, 641}, {218, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{79, 616}, {218, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - - - - YES - - - YES - + + 300476 + + + + + + + + 300477 + + + + + + + + 300478 + + + + + 300479 + + + + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{168, 821}, {113, 23}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{202, 626}, {154, 153}} + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{349, 868}, {315, 143}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{271, 666}, {301, 153}} + {{631, 535}, {484, 308}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{631, 535}, {484, 308}} + + {{184, 290}, {481, 345}} + + + {3.40282e+38, 3.40282e+38} + {320, 240} + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + + {{58, 803}, {155, 33}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{100, 746}, {155, 33}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{209, 293}, {454, 271}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{209, 293}, {454, 271}} + + {{433, 406}, {486, 327}} + + + {3.40282e+38, 3.40282e+38} + {320, 240} + com.apple.InterfaceBuilder.CocoaPlugin + + {{145, 1011}, {336, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{67, 819}, {336, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{20, 641}, {218, 203}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{79, 616}, {218, 203}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + - - YES - - - YES - - + - 300475 + 300481 - - YES + FirstResponder NSObject @@ -3937,19 +3578,21 @@ INmE2KrZhti02YrYtyDYstixINin2YTZhdin2YjYsyDYp9mE2KPZiNiz2Lcg2KPZiCDYp9mE2KPZitmF - + 0 + IBCocoaFramework com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - - com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 - + YES ../X11.xcodeproj 3 + + {9, 8} + {7, 2} + {15, 15} + diff --git a/xserver/hw/xquartz/bundle/Resources/da.lproj/locversion.plist b/xserver/hw/xquartz/bundle/Resources/da.lproj/locversion.plist index 9ca0dff29..c565c6f71 100644 --- a/xserver/hw/xquartz/bundle/Resources/da.lproj/locversion.plist +++ b/xserver/hw/xquartz/bundle/Resources/da.lproj/locversion.plist @@ -3,12 +3,12 @@ LprojCompatibleVersion - 93 + 97 LprojLocale da LprojRevisionLevel 1 LprojVersion - 93 + 97 diff --git a/xserver/hw/xquartz/bundle/Resources/da.lproj/main.nib/designable.nib b/xserver/hw/xquartz/bundle/Resources/da.lproj/main.nib/designable.nib index 2810e5269..087c79245 100644 --- a/xserver/hw/xquartz/bundle/Resources/da.lproj/main.nib/designable.nib +++ b/xserver/hw/xquartz/bundle/Resources/da.lproj/main.nib/designable.nib @@ -1,7 +1,7 @@ - + - 1050 + 1040 11A79a 732 1059 @@ -10,24 +10,12 @@ com.apple.InterfaceBuilder.CocoaPlugin 732 - - YES - - - YES + + com.apple.InterfaceBuilder.CocoaPlugin - - - YES - - YES - - - YES - - - - YES + + + NSApplication @@ -41,8 +29,7 @@ MainMenu - - YES + X11 @@ -60,8 +47,7 @@ submenuAction: X11 - - YES + Om X11 @@ -101,9 +87,7 @@ submenuAction: Tjenester - - YES - + _NSServicesMenu @@ -187,7 +171,7 @@ - + _NSAppleMenu @@ -202,8 +186,7 @@ submenuAction: Programmer - - YES + YES @@ -224,7 +207,7 @@ - + @@ -238,8 +221,7 @@ submenuAction: Rediger - - YES + Kopier @@ -249,7 +231,7 @@ - + @@ -263,8 +245,7 @@ submenuAction: Vindue - - YES + Luk @@ -341,7 +322,7 @@ - + _NSWindowsMenu @@ -356,8 +337,7 @@ submenuAction: Hjælp - - YES + X11-hjælp @@ -367,10 +347,10 @@ - + - + _NSMainMenu @@ -391,15 +371,13 @@ 256 - - YES + 256 {{13, 10}, {458, 292}} - - YES + 1 @@ -407,8 +385,7 @@ 256 - - YES + 256 @@ -427,7 +404,7 @@ 1211912703 2 - + NSImage NSSwitch @@ -510,7 +487,7 @@ ZW4uCg 1211912703 2 - + @@ -549,7 +526,7 @@ ZW4uCg 1211912703 2 - + @@ -557,7 +534,45 @@ ZW4uCg 25 - + + + 256 + {{36, -1}, {385, 31}} + + YES + + 67239424 + 4194304 + Når det er slået til, sender Alternativtasterne Alt_L og Alt_R X11-nøglesymboler i stedet for Mode_switch. + + + + + + + + + 256 + {{18, 36}, {402, 18}} + + YES + + 67239424 + 0 + Alternativtaster sender Alt_L og Alt_R + + + 1211912703 + 2 + + + + + 200 + 25 + + + {{10, 33}, {438, 246}} @@ -572,8 +587,7 @@ ZW4uCg 256 - - YES + 256 @@ -588,7 +602,7 @@ ZW4uCg 1211912703 2 - + @@ -655,8 +669,7 @@ ZW4uCg OtherViews - - YES + @@ -694,7 +707,7 @@ ZW4uCg 24 - + 3 YES @@ -711,7 +724,7 @@ ZW4uCg 67239424 4194304 - RmFydmVyOgo + Farver: @@ -750,7 +763,7 @@ ZW4uCg 1211912703 2 - + @@ -772,7 +785,7 @@ ZW4uCg 1211912703 2 - + @@ -797,7 +810,7 @@ ZW4uCg - + {{10, 33}, {438, 246}} Resultat @@ -811,8 +824,7 @@ ZW4uCg 256 - - YES + 256 @@ -827,7 +839,7 @@ ZW4uCg 1211912703 2 - + @@ -865,7 +877,7 @@ ZW4uCg 1211912703 2 - + @@ -887,7 +899,7 @@ ZW4uCg 1211912703 2 - + @@ -909,7 +921,7 @@ ZW4uCg 1211912703 2 - + @@ -931,7 +943,7 @@ ZW4uCg 1211912703 2 - + @@ -971,7 +983,7 @@ ZW4uCg - + {{10, 33}, {438, 246}} Opslagstavle @@ -985,8 +997,7 @@ ZW4uCg 256 - - YES + 256 @@ -1001,7 +1012,7 @@ ZW4uCg 1211912703 2 - + @@ -1039,7 +1050,7 @@ ZW4uCg 1211912703 2 - + @@ -1077,7 +1088,7 @@ ZW4uCg 1211912703 2 - + @@ -1101,7 +1112,7 @@ ZW4uCg - + {{10, 33}, {438, 246}} Vinduer @@ -1112,8 +1123,7 @@ ZW4uCg 256 - - YES + 256 @@ -1128,7 +1138,7 @@ ZW4uCg 1211912703 2 - + @@ -1150,7 +1160,7 @@ ZW4uCg 1211912703 2 - + @@ -1209,25 +1219,24 @@ ZW4uCg - + {{10, 33}, {438, 246}} Sikkerhed - + 0 YES YES - - YES + - + - + {484, 308} {{0, 0}, {1440, 878}} @@ -1250,8 +1259,7 @@ ZW4uCg 256 - - YES + 265 @@ -1305,13 +1313,11 @@ ZW4uCg 274 - - YES + 2304 - - YES + 256 @@ -1331,8 +1337,7 @@ ZW4uCg {{302, 0}, {16, 17}} - - YES + 122.73100280761719 62.730998992919922 @@ -1440,7 +1445,7 @@ ZW4uCg YES - + 3 2 @@ -1463,7 +1468,7 @@ ZW4uCg YES 0 - + {{1, 17}, {301, 198}} @@ -1493,10 +1498,9 @@ ZW4uCg 2304 - - YES + - + {{1, 0}, {301, 17}} @@ -1505,7 +1509,7 @@ ZW4uCg 4 - + {{20, 20}, {318, 231}} @@ -1540,7 +1544,7 @@ ZW4uCg 25 - + {454, 271} {{0, 0}, {1440, 878}} @@ -1550,8 +1554,7 @@ ZW4uCg Menu - - YES + YES @@ -1574,8 +1577,7 @@ ZW4uCg submenuAction: Programmer - - YES + YES @@ -1596,16 +1598,15 @@ ZW4uCg - + - + - + - - YES + copy: @@ -2150,13 +2151,28 @@ ZW4uCg 300475 - + + + prefs_changed: + + + + 300480 + + + + option_sends_alt + + + + 300481 + + - - YES + 0 - + @@ -2181,31 +2197,28 @@ ZW4uCg 29 - - YES + - + MainMenu 19 - - YES + - + 24 - - YES + @@ -2214,7 +2227,7 @@ ZW4uCg - + @@ -2260,17 +2273,15 @@ ZW4uCg 56 - - YES + - + 57 - - YES + @@ -2283,7 +2294,7 @@ ZW4uCg - + @@ -2299,10 +2310,9 @@ ZW4uCg 131 - - YES + - + @@ -2358,19 +2368,17 @@ ZW4uCg 163 - - YES + - + 169 - - YES + - + @@ -2381,20 +2389,18 @@ ZW4uCg 269 - - YES + - + 270 - - YES + - + @@ -2410,19 +2416,17 @@ ZW4uCg 419 - - YES + - + 420 - - YES + - + @@ -2439,126 +2443,115 @@ ZW4uCg 244 - - YES + - + PrefsPanel 245 - - YES + - + 348 - - YES + - + 349 - - YES + - + 351 - - YES + - + + + 363 - - YES + - + 364 - - YES + - + 365 - - YES + - + 368 - - YES + - + 369 - - YES + - + 370 - - YES + - + 352 - - YES + - + 350 - - YES + @@ -2567,169 +2560,152 @@ ZW4uCg - + 371 - - YES + - + 372 - - YES + - + 382 - - YES + - + 385 - - YES + - + 386 - - YES + - + 541 - - YES + - + 543 - - YES + - + 353 - - YES + - + 354 - - YES + - + 374 - - YES + - + 375 - - YES + - + 376 - - YES + - + 377 - - YES + - + 379 - - YES + - + 285 - - YES + - + EditPrograms 286 - - YES + - + 423 - - YES + - + DockMenu @@ -2741,20 +2717,18 @@ ZW4uCg 526 - - YES + - + 527 - - YES + - + @@ -2810,10 +2784,9 @@ ZW4uCg 100382 - - YES + - + @@ -2864,13 +2837,12 @@ ZW4uCg 380 - - YES + - + @@ -2896,13 +2868,12 @@ ZW4uCg 295 - - YES + - + @@ -2923,21 +2894,19 @@ ZW4uCg 296 - - YES + - + 535 - - YES + - + @@ -2948,10 +2917,9 @@ ZW4uCg 298 - - YES + - + @@ -2962,10 +2930,9 @@ ZW4uCg 297 - - YES + - + @@ -2976,10 +2943,9 @@ ZW4uCg 310 - - YES + - + @@ -2990,10 +2956,9 @@ ZW4uCg 292 - - YES + - + @@ -3004,10 +2969,9 @@ ZW4uCg 293 - - YES + - + @@ -3018,42 +2982,38 @@ ZW4uCg 300337 - - YES + - + 300338 - - YES + - + 300358 - - YES + - + 300359 - - YES + - + @@ -3069,10 +3029,9 @@ ZW4uCg 300362 - - YES + - + @@ -3083,10 +3042,9 @@ ZW4uCg 300364 - - YES + - + @@ -3097,10 +3055,9 @@ ZW4uCg 300368 - - YES + - + @@ -3111,10 +3068,9 @@ ZW4uCg 300370 - - YES + - + @@ -3125,17 +3081,15 @@ ZW4uCg 300421 - - YES + - + 300422 - - YES + @@ -3144,25 +3098,23 @@ ZW4uCg - + 300423 - - YES + - + 300424 - - YES + - + @@ -3178,10 +3130,9 @@ ZW4uCg 300447 - - YES + - + @@ -3192,10 +3143,9 @@ ZW4uCg 300451 - - YES + - + @@ -3206,10 +3156,9 @@ ZW4uCg 300453 - - YES + - + @@ -3220,10 +3169,9 @@ ZW4uCg 300455 - - YES + - + @@ -3234,10 +3182,9 @@ ZW4uCg 300457 - - YES + - + @@ -3248,10 +3195,9 @@ ZW4uCg 300459 - - YES + - + @@ -3262,10 +3208,9 @@ ZW4uCg 300472 - - YES + - + @@ -3273,604 +3218,333 @@ ZW4uCg - - - - YES - - YES - -3.IBPluginDependency - -3.ImportedFromIB2 - 100292.IBPluginDependency - 100293.IBPluginDependency - 100295.IBPluginDependency - 100295.IBShouldRemoveOnLegacySave - 100310.IBPluginDependency - 100363.IBPluginDependency - 100364.IBPluginDependency - 100365.IBPluginDependency - 100368.IBPluginDependency - 100369.IBPluginDependency - 100370.IBPluginDependency - 100371.IBPluginDependency - 100372.IBPluginDependency - 100374.IBPluginDependency - 100375.IBPluginDependency - 100376.IBPluginDependency - 100377.IBPluginDependency - 100379.IBPluginDependency - 100382.IBPluginDependency - 100385.IBPluginDependency - 100386.IBPluginDependency - 100541.IBPluginDependency - 100543.IBPluginDependency - 129.IBPluginDependency - 129.ImportedFromIB2 - 130.IBPluginDependency - 130.ImportedFromIB2 - 131.IBPluginDependency - 131.ImportedFromIB2 - 134.IBPluginDependency - 134.ImportedFromIB2 - 136.IBPluginDependency - 136.ImportedFromIB2 - 143.IBPluginDependency - 143.ImportedFromIB2 - 144.IBPluginDependency - 144.ImportedFromIB2 - 145.IBPluginDependency - 145.ImportedFromIB2 - 149.IBPluginDependency - 149.ImportedFromIB2 - 150.IBPluginDependency - 150.ImportedFromIB2 - 157.IBPluginDependency - 157.ImportedFromIB2 - 163.IBPluginDependency - 163.ImportedFromIB2 - 169.IBEditorWindowLastContentRect - 169.IBPluginDependency - 169.ImportedFromIB2 - 169.editorWindowContentRectSynchronizationRect - 19.IBPluginDependency - 19.ImportedFromIB2 - 196.ImportedFromIB2 - 200295.IBPluginDependency - 200295.IBShouldRemoveOnLegacySave - 203.IBPluginDependency - 203.ImportedFromIB2 - 204.IBPluginDependency - 204.ImportedFromIB2 - 23.IBPluginDependency - 23.ImportedFromIB2 - 24.IBEditorWindowLastContentRect - 24.IBPluginDependency - 24.ImportedFromIB2 - 24.editorWindowContentRectSynchronizationRect - 244.IBEditorWindowLastContentRect - 244.IBPluginDependency - 244.IBWindowTemplateEditedContentRect - 244.ImportedFromIB2 - 244.editorWindowContentRectSynchronizationRect - 244.windowTemplate.hasMaxSize - 244.windowTemplate.hasMinSize - 244.windowTemplate.maxSize - 244.windowTemplate.minSize - 245.IBPluginDependency - 245.ImportedFromIB2 - 269.IBPluginDependency - 269.ImportedFromIB2 - 270.IBEditorWindowLastContentRect - 270.IBPluginDependency - 270.ImportedFromIB2 - 270.editorWindowContentRectSynchronizationRect - 272.IBPluginDependency - 272.ImportedFromIB2 - 285.IBEditorWindowLastContentRect - 285.IBPluginDependency - 285.IBViewEditorWindowController.showingBoundsRectangles - 285.IBViewEditorWindowController.showingLayoutRectangles - 285.IBWindowTemplateEditedContentRect - 285.ImportedFromIB2 - 285.editorWindowContentRectSynchronizationRect - 285.windowTemplate.hasMaxSize - 285.windowTemplate.hasMinSize - 285.windowTemplate.maxSize - 285.windowTemplate.minSize - 286.IBPluginDependency - 286.ImportedFromIB2 - 29.IBEditorWindowLastContentRect - 29.IBPluginDependency - 29.ImportedFromIB2 - 29.editorWindowContentRectSynchronizationRect - 292.IBPluginDependency - 292.ImportedFromIB2 - 293.IBPluginDependency - 293.ImportedFromIB2 - 295.IBPluginDependency - 295.ImportedFromIB2 - 296.IBPluginDependency - 296.ImportedFromIB2 - 297.IBPluginDependency - 297.ImportedFromIB2 - 298.IBPluginDependency - 298.ImportedFromIB2 - 300295.IBPluginDependency - 300295.IBShouldRemoveOnLegacySave - 300337.IBPluginDependency - 300337.ImportedFromIB2 - 300338.IBPluginDependency - 300338.ImportedFromIB2 - 300358.IBPluginDependency - 300358.ImportedFromIB2 - 300359.IBPluginDependency - 300359.ImportedFromIB2 - 300360.IBPluginDependency - 300361.IBPluginDependency - 300362.IBPluginDependency - 300362.ImportedFromIB2 - 300363.IBPluginDependency - 300364.IBPluginDependency - 300364.ImportedFromIB2 - 300365.IBPluginDependency - 300368.IBPluginDependency - 300368.ImportedFromIB2 - 300369.IBPluginDependency - 300370.IBPluginDependency - 300370.ImportedFromIB2 - 300371.IBPluginDependency - 300421.IBPluginDependency - 300421.ImportedFromIB2 - 300422.IBPluginDependency - 300422.ImportedFromIB2 - 300423.IBPluginDependency - 300423.ImportedFromIB2 - 300424.IBPluginDependency - 300424.ImportedFromIB2 - 300440.IBPluginDependency - 300441.IBPluginDependency - 300447.IBPluginDependency - 300447.ImportedFromIB2 - 300450.IBPluginDependency - 300451.IBPluginDependency - 300451.ImportedFromIB2 - 300452.IBPluginDependency - 300453.IBPluginDependency - 300453.ImportedFromIB2 - 300454.IBPluginDependency - 300455.IBPluginDependency - 300455.ImportedFromIB2 - 300456.IBPluginDependency - 300457.IBPluginDependency - 300457.ImportedFromIB2 - 300458.IBPluginDependency - 300459.IBPluginDependency - 300459.ImportedFromIB2 - 300460.IBPluginDependency - 300472.IBPluginDependency - 300472.ImportedFromIB2 - 300473.IBPluginDependency - 305.IBPluginDependency - 305.ImportedFromIB2 - 310.IBPluginDependency - 310.ImportedFromIB2 - 348.IBPluginDependency - 348.ImportedFromIB2 - 349.IBPluginDependency - 349.ImportedFromIB2 - 350.IBPluginDependency - 350.ImportedFromIB2 - 351.IBPluginDependency - 351.ImportedFromIB2 - 352.IBPluginDependency - 352.ImportedFromIB2 - 353.IBPluginDependency - 353.ImportedFromIB2 - 354.IBPluginDependency - 354.ImportedFromIB2 - 363.IBPluginDependency - 363.ImportedFromIB2 - 364.IBPluginDependency - 364.ImportedFromIB2 - 365.IBPluginDependency - 365.ImportedFromIB2 - 368.IBPluginDependency - 368.ImportedFromIB2 - 369.IBPluginDependency - 369.ImportedFromIB2 - 370.IBPluginDependency - 370.ImportedFromIB2 - 371.IBPluginDependency - 371.ImportedFromIB2 - 372.IBPluginDependency - 372.ImportedFromIB2 - 374.IBPluginDependency - 374.ImportedFromIB2 - 375.IBPluginDependency - 375.ImportedFromIB2 - 376.IBPluginDependency - 376.ImportedFromIB2 - 377.IBPluginDependency - 377.ImportedFromIB2 - 379.IBPluginDependency - 379.ImportedFromIB2 - 380.IBPluginDependency - 380.ImportedFromIB2 - 381.IBPluginDependency - 381.ImportedFromIB2 - 382.IBPluginDependency - 382.ImportedFromIB2 - 383.IBPluginDependency - 383.ImportedFromIB2 - 384.IBPluginDependency - 384.ImportedFromIB2 - 385.IBPluginDependency - 385.ImportedFromIB2 - 386.IBPluginDependency - 386.ImportedFromIB2 - 419.IBPluginDependency - 419.ImportedFromIB2 - 420.IBPluginDependency - 420.ImportedFromIB2 - 421.IBPluginDependency - 421.ImportedFromIB2 - 423.IBPluginDependency - 423.ImportedFromIB2 - 435.IBPluginDependency - 435.ImportedFromIB2 - 5.IBPluginDependency - 5.ImportedFromIB2 - 524.IBPluginDependency - 524.ImportedFromIB2 - 526.IBPluginDependency - 526.ImportedFromIB2 - 527.IBPluginDependency - 527.ImportedFromIB2 - 532.IBPluginDependency - 532.ImportedFromIB2 - 533.IBPluginDependency - 533.ImportedFromIB2 - 535.IBPluginDependency - 535.ImportedFromIB2 - 536.IBPluginDependency - 536.ImportedFromIB2 - 537.IBPluginDependency - 537.ImportedFromIB2 - 538.IBPluginDependency - 538.ImportedFromIB2 - 541.IBPluginDependency - 541.ImportedFromIB2 - 543.IBPluginDependency - 543.ImportedFromIB2 - 544.IBPluginDependency - 544.ImportedFromIB2 - 545.IBPluginDependency - 545.ImportedFromIB2 - 56.IBPluginDependency - 56.ImportedFromIB2 - 57.IBEditorWindowLastContentRect - 57.IBPluginDependency - 57.ImportedFromIB2 - 57.editorWindowContentRectSynchronizationRect - 573.IBPluginDependency - 573.ImportedFromIB2 - 574.IBPluginDependency - 574.ImportedFromIB2 - 575.IBPluginDependency - 575.ImportedFromIB2 - 58.IBPluginDependency - 58.ImportedFromIB2 - 92.IBPluginDependency - 92.ImportedFromIB2 - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{168, 821}, {113, 23}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{202, 626}, {154, 153}} - com.apple.InterfaceBuilder.CocoaPlugin - - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{349, 868}, {315, 143}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{271, 666}, {301, 153}} - {{437, 749}, {484, 308}} - com.apple.InterfaceBuilder.CocoaPlugin - {{437, 749}, {484, 308}} - - {{184, 290}, {481, 345}} - - - {3.40282e+38, 3.40282e+38} - {320, 240} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{58, 803}, {155, 33}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{100, 746}, {155, 33}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{68, 585}, {454, 271}} - com.apple.InterfaceBuilder.CocoaPlugin - - - {{68, 585}, {454, 271}} - - {{433, 406}, {486, 327}} - - - {3.40282e+38, 3.40282e+38} - {320, 240} - com.apple.InterfaceBuilder.CocoaPlugin - - {{145, 1011}, {336, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{67, 819}, {336, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{20, 641}, {218, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{79, 616}, {218, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - - - - YES - - - YES - + + 300476 + + + + + + + + 300477 + + + + + + + + 300478 + + + + + 300479 + + + + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{168, 821}, {113, 23}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{202, 626}, {154, 153}} + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{349, 868}, {315, 143}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{271, 666}, {301, 153}} + {{507, 565}, {484, 308}} + com.apple.InterfaceBuilder.CocoaPlugin + {{507, 565}, {484, 308}} + + {{184, 290}, {481, 345}} + + + {3.40282e+38, 3.40282e+38} + {320, 240} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{58, 803}, {155, 33}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{100, 746}, {155, 33}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{68, 585}, {454, 271}} + com.apple.InterfaceBuilder.CocoaPlugin + + + {{68, 585}, {454, 271}} + + {{433, 406}, {486, 327}} + + + {3.40282e+38, 3.40282e+38} + {320, 240} + com.apple.InterfaceBuilder.CocoaPlugin + + {{145, 1011}, {336, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{67, 819}, {336, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{20, 641}, {218, 203}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{79, 616}, {218, 203}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + - - YES - - - YES - - + - 300475 + 300481 - - YES + FirstResponder NSObject @@ -3895,16 +3569,12 @@ ZW4uCg - + 0 com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - - com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 - + YES ../X11.xcodeproj diff --git a/xserver/hw/xquartz/bundle/Resources/fi.lproj/locversion.plist b/xserver/hw/xquartz/bundle/Resources/fi.lproj/locversion.plist index a14e32970..65cdba35c 100644 --- a/xserver/hw/xquartz/bundle/Resources/fi.lproj/locversion.plist +++ b/xserver/hw/xquartz/bundle/Resources/fi.lproj/locversion.plist @@ -3,12 +3,12 @@ LprojCompatibleVersion - 93 + 97 LprojLocale fi LprojRevisionLevel 1 LprojVersion - 93 + 97 diff --git a/xserver/hw/xquartz/bundle/Resources/fi.lproj/main.nib/designable.nib b/xserver/hw/xquartz/bundle/Resources/fi.lproj/main.nib/designable.nib index a67e3d769..0c7cee1fd 100644 --- a/xserver/hw/xquartz/bundle/Resources/fi.lproj/main.nib/designable.nib +++ b/xserver/hw/xquartz/bundle/Resources/fi.lproj/main.nib/designable.nib @@ -1,33 +1,21 @@ - + - 1050 - 10A432 + 1040 + 11A79a 732 - 1038 - 437.00 + 1059 + 478.00 com.apple.InterfaceBuilder.CocoaPlugin 732 - - YES - - - YES + + com.apple.InterfaceBuilder.CocoaPlugin - - - YES - - YES - - - YES - - - - YES + + + NSApplication @@ -41,8 +29,7 @@ MainMenu - - YES + X11 @@ -60,8 +47,7 @@ submenuAction: X11 - - YES + Tietoja: X11 @@ -101,9 +87,7 @@ submenuAction: Palvelut - - YES - + _NSServicesMenu @@ -187,7 +171,7 @@ - + _NSAppleMenu @@ -202,8 +186,7 @@ submenuAction: Ohjelmat - - YES + YES @@ -224,7 +207,7 @@ - + @@ -238,8 +221,7 @@ submenuAction: Muokkaa - - YES + Kopioi @@ -249,7 +231,7 @@ - + @@ -263,8 +245,7 @@ submenuAction: Ikkuna - - YES + Sulje @@ -341,7 +322,7 @@ - + _NSWindowsMenu @@ -356,8 +337,7 @@ submenuAction: Ohje - - YES + X11-ohje @@ -367,10 +347,10 @@ - + - + _NSMainMenu @@ -386,21 +366,18 @@ View - {3.40282e+38, 3.40282e+38} + {1.7976931348623157e+308, 1.7976931348623157e+308} {320, 240} - + 256 - - YES + 256 {{13, 10}, {604, 307}} - - - YES + 1 @@ -408,14 +385,12 @@ 256 - - YES + 256 - {{18, 225}, {402, 18}} + {{38, 225}, {402, 18}} - YES 67239424 @@ -429,7 +404,7 @@ 1211912703 2 - + NSImage NSSwitch @@ -445,9 +420,8 @@ 256 - {{36, 78}, {488, 28}} + {{56, 67}, {488, 28}} - YES 67239424 @@ -466,7 +440,7 @@ controlColor 3 - MC42NjY2NjY2ODY1AA + MC42NjY2NjY2NjY3AA @@ -483,15 +457,14 @@ 256 - {{36, 177}, {488, 42}} + {{56, 177}, {488, 42}} - YES 67239424 4194304 QWt0aXZvaSBoaWlyZW4ga2Vza2ktIHRhaSBvaWtlYSBwYWluaWtlIHBpdMOkbcOkbGzDpCBPcHRpby0g -dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo +dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgb3NvaXRldHRhZXNzYS4KA @@ -502,9 +475,8 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 256 - {{18, 112}, {402, 18}} + {{38, 101}, {402, 18}} - YES 67239424 @@ -514,7 +486,7 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 1211912703 2 - + @@ -525,9 +497,8 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 256 - {{36, 141}, {385, 14}} + {{56, 137}, {385, 14}} - YES 67239424 @@ -543,9 +514,8 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 256 - {{18, 161}, {402, 18}} + {{38, 157}, {402, 18}} - YES 67239424 @@ -555,7 +525,7 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 1211912703 2 - + @@ -563,10 +533,47 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 25 - + + + 256 + {{56, -1}, {385, 31}} + + YES + + 67239424 + 4194304 + Kun käytössä, Optio-näppäimet lähettävät Alt_L- ja Alt_R X11 -näppäinsymbolit Mode_switchin sijaan. + + + + + + + + + 256 + {{38, 36}, {402, 18}} + + YES + + 67239424 + 0 + Optio-näppäimet lähettävät Alt_L:n ja Alt_R:n + + + 1211912703 + 2 + + + + + 200 + 25 + + + {{10, 33}, {584, 261}} - Syöte @@ -579,12 +586,11 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 256 - - YES + 256 - {{18, 78}, {402, 18}} + {{42, 74}, {402, 18}} YES @@ -595,7 +601,7 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 1211912703 2 - + @@ -606,7 +612,7 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 256 - {{36, 44}, {488, 28}} + {{60, 40}, {488, 28}} YES @@ -623,7 +629,7 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 256 - {{74, 217}, {118, 26}} + {{83, 217}, {118, 26}} YES @@ -662,8 +668,7 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo OtherViews - - YES + @@ -701,7 +706,7 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 24 - + 3 YES @@ -712,13 +717,13 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 256 - {{17, 220}, {55, 20}} + {{41, 220}, {55, 20}} YES 67239424 4194304 - VsOkcmVqw6Q6Cg + Värit: @@ -729,7 +734,7 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 256 - {{36, 198}, {392, 14}} + {{60, 198}, {392, 14}} YES @@ -746,7 +751,7 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 256 - {{18, 164}, {409, 23}} + {{42, 164}, {409, 23}} YES @@ -757,7 +762,7 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 1211912703 2 - + @@ -768,7 +773,7 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 256 - {{37, 98}, {409, 23}} + {{61, 98}, {409, 23}} YES @@ -779,7 +784,7 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 1211912703 2 - + @@ -790,7 +795,7 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 256 - {{36, 130}, {488, 28}} + {{60, 130}, {496, 28}} YES @@ -804,7 +809,7 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo - + {{10, 33}, {584, 261}} Tuloste @@ -818,12 +823,11 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 256 - - YES + 256 - {{1, 237}, {409, 23}} + {{1, 229}, {409, 23}} YES @@ -834,7 +838,7 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 1211912703 2 - + @@ -845,7 +849,7 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 256 - {{19, 189}, {534, 42}} + {{20, 181}, {534, 42}} YES @@ -872,7 +876,7 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 1211912703 2 - + @@ -889,12 +893,12 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 67239424 0 - Päivitä X11:n ensisijainen valinta (keskinapsautus), kun Mac OS X:n leikepöytä muuttuu + Päivitä X11:n ensisijainen valinta (keskiosoitus), kun Mac OS X:n leikepöytä muuttuu 1211912703 2 - + @@ -916,7 +920,7 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 1211912703 2 - + @@ -938,7 +942,7 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 1211912703 2 - + @@ -978,7 +982,7 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo - + {{10, 33}, {584, 261}} Leikepöytä @@ -992,23 +996,22 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 256 - - YES + 256 - {{15, 227}, {318, 18}} + {{55, 227}, {318, 18}} YES 67239424 0 - Huomioi napsautukset ei-aktiivisiin ikkunoihin + Huomioi osoitukset ei-aktiivisiin ikkunoihin 1211912703 2 - + @@ -1019,13 +1022,13 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 256 - {{23, 190}, {488, 31}} + {{63, 190}, {488, 31}} YES 67239424 4194304 - Kun käytössä, ei-aktiivisen ikkunan napsauttaminen saa hiiren napsautuksen kulkemaan kyseiselle ikkunalle sen aktivoimisen lisäksi. + Kun käytössä, ei-aktiivisen ikkunan osoittaminen saa hiiren osoituksen kulkemaan kyseiselle ikkunalle sen aktivoimisen lisäksi. @@ -1035,7 +1038,7 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 256 - {{15, 166}, {402, 18}} + {{55, 166}, {402, 18}} YES @@ -1046,7 +1049,7 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 1211912703 2 - + @@ -1057,7 +1060,7 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 256 - {{23, 143}, {407, 17}} + {{63, 143}, {407, 17}} YES @@ -1073,7 +1076,7 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 256 - {{15, 119}, {402, 18}} + {{55, 119}, {402, 18}} YES @@ -1084,7 +1087,7 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 1211912703 2 - + @@ -1095,7 +1098,7 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 256 - {{23, 85}, {488, 28}} + {{63, 85}, {488, 28}} YES @@ -1108,7 +1111,7 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo - + {{10, 33}, {584, 261}} Ikkunat @@ -1119,12 +1122,11 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 256 - - YES + 256 - {{18, 225}, {402, 18}} + {{47, 225}, {402, 18}} YES @@ -1135,7 +1137,7 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 1211912703 2 - + @@ -1146,7 +1148,7 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 256 - {{18, 148}, {402, 18}} + {{47, 148}, {402, 18}} YES @@ -1157,7 +1159,7 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 1211912703 2 - + @@ -1168,7 +1170,7 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 256 - {{36, 177}, {488, 42}} + {{65, 177}, {488, 42}} YES @@ -1185,7 +1187,7 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 256 - {{36, 100}, {488, 42}} + {{65, 100}, {488, 42}} YES @@ -1202,7 +1204,7 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 256 - {{20, -16}, {363, 17}} + {{49, -16}, {363, 17}} YES @@ -1216,32 +1218,29 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo - + {{10, 33}, {584, 261}} Suojaus - + 0 YES YES - - YES + - + - + {625, 323} - - {{0, 0}, {1280, 938}} {320, 262} - {3.40282e+38, 3.40282e+38} + {1.7976931348623157e+308, 1.7976931348623157e+308} x11_prefs @@ -1254,13 +1253,12 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo View - {3.40282e+38, 3.40282e+38} + {1.7976931348623157e+308, 1.7976931348623157e+308} {320, 240} 256 - - YES + 265 @@ -1314,13 +1312,11 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 274 - - YES + 2304 - - YES + 256 @@ -1340,8 +1336,7 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo {{302, 0}, {16, 17}} - - YES + 121.73100280761719 62.730998992919922 @@ -1449,7 +1444,7 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo YES - + 3 2 @@ -1472,9 +1467,10 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo YES 0 - + {{1, 17}, {301, 198}} + 4 @@ -1501,20 +1497,21 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 2304 - - YES + - + {{1, 0}, {301, 17}} + 4 - + {{20, 20}, {318, 231}} + 50 @@ -1546,18 +1543,17 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 25 - + {469, 271} {{0, 0}, {1280, 938}} {320, 262} - {3.40282e+38, 3.40282e+38} + {1.7976931348623157e+308, 1.7976931348623157e+308} x11_apps Valikko - - YES + YES @@ -1580,8 +1576,7 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo submenuAction: Ohjelmat - - YES + YES @@ -1602,16 +1597,15 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo - + - + - + - - YES + copy: @@ -2156,13 +2150,28 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 300475 - + + + prefs_changed: + + + + 300480 + + + + option_sends_alt + + + + 300481 + + - - YES + 0 - + @@ -2187,31 +2196,28 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 29 - - YES + - + MainMenu 19 - - YES + - + 24 - - YES + @@ -2220,7 +2226,7 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo - + @@ -2266,17 +2272,15 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 56 - - YES + - + 57 - - YES + @@ -2289,7 +2293,7 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo - + @@ -2305,10 +2309,9 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 131 - - YES + - + @@ -2364,19 +2367,17 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 163 - - YES + - + 169 - - YES + - + @@ -2387,20 +2388,18 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 269 - - YES + - + 270 - - YES + - + @@ -2416,19 +2415,17 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 419 - - YES + - + 420 - - YES + - + @@ -2445,126 +2442,115 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 244 - - YES + - + PrefsPanel 245 - - YES + - + 348 - - YES + - + 349 - - YES + - + 351 - - YES + - + + + 363 - - YES + - + 364 - - YES + - + 365 - - YES + - + 368 - - YES + - + 369 - - YES + - + 370 - - YES + - + 352 - - YES + - + 350 - - YES + @@ -2573,169 +2559,152 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo - + 371 - - YES + - + 372 - - YES + - + 382 - - YES + - + 385 - - YES + - + 386 - - YES + - + 541 - - YES + - + 543 - - YES + - + 353 - - YES + - + 354 - - YES + - + 374 - - YES + - + 375 - - YES + - + 376 - - YES + - + 377 - - YES + - + 379 - - YES + - + 285 - - YES + - + EditPrograms 286 - - YES + - + 423 - - YES + - + DockMenu @@ -2747,20 +2716,18 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 526 - - YES + - + 527 - - YES + - + @@ -2816,10 +2783,9 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 100382 - - YES + - + @@ -2870,13 +2836,12 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 380 - - YES + - + @@ -2902,13 +2867,12 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 295 - - YES + - + @@ -2929,21 +2893,19 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 296 - - YES + - + 535 - - YES + - + @@ -2954,10 +2916,9 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 298 - - YES + - + @@ -2968,10 +2929,9 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 297 - - YES + - + @@ -2982,10 +2942,9 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 310 - - YES + - + @@ -2996,10 +2955,9 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 292 - - YES + - + @@ -3010,10 +2968,9 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 293 - - YES + - + @@ -3024,42 +2981,38 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 300337 - - YES + - + 300338 - - YES + - + 300358 - - YES + - + 300359 - - YES + - + @@ -3075,10 +3028,9 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 300362 - - YES + - + @@ -3089,10 +3041,9 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 300364 - - YES + - + @@ -3103,10 +3054,9 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 300368 - - YES + - + @@ -3117,10 +3067,9 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 300370 - - YES + - + @@ -3131,17 +3080,15 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 300421 - - YES + - + 300422 - - YES + @@ -3150,25 +3097,23 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo - + 300423 - - YES + - + 300424 - - YES + - + @@ -3184,10 +3129,9 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 300447 - - YES + - + @@ -3198,10 +3142,9 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 300451 - - YES + - + @@ -3212,10 +3155,9 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 300453 - - YES + - + @@ -3226,10 +3168,9 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 300455 - - YES + - + @@ -3240,10 +3181,9 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 300457 - - YES + - + @@ -3254,10 +3194,9 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 300459 - - YES + - + @@ -3268,10 +3207,9 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo 300472 - - YES + - + @@ -3279,638 +3217,354 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo - - - - YES - - YES - -3.IBPluginDependency - -3.ImportedFromIB2 - 100292.IBPluginDependency - 100293.IBPluginDependency - 100295.IBPluginDependency - 100295.IBShouldRemoveOnLegacySave - 100310.IBPluginDependency - 100363.IBPluginDependency - 100364.IBPluginDependency - 100365.IBPluginDependency - 100365.object.labelIdentifier - 100368.IBPluginDependency - 100369.IBPluginDependency - 100370.IBPluginDependency - 100371.IBPluginDependency - 100372.IBPluginDependency - 100374.IBPluginDependency - 100375.IBPluginDependency - 100376.IBPluginDependency - 100377.IBPluginDependency - 100379.IBPluginDependency - 100382.IBPluginDependency - 100385.IBPluginDependency - 100386.IBPluginDependency - 100541.IBPluginDependency - 100543.IBPluginDependency - 129.IBPluginDependency - 129.ImportedFromIB2 - 130.IBPluginDependency - 130.ImportedFromIB2 - 131.IBPluginDependency - 131.ImportedFromIB2 - 134.IBPluginDependency - 134.ImportedFromIB2 - 136.IBPluginDependency - 136.ImportedFromIB2 - 143.IBPluginDependency - 143.ImportedFromIB2 - 144.IBPluginDependency - 144.ImportedFromIB2 - 145.IBPluginDependency - 145.ImportedFromIB2 - 149.IBPluginDependency - 149.ImportedFromIB2 - 150.IBPluginDependency - 150.ImportedFromIB2 - 157.IBPluginDependency - 157.ImportedFromIB2 - 163.IBPluginDependency - 163.ImportedFromIB2 - 169.IBEditorWindowLastContentRect - 169.IBPluginDependency - 169.ImportedFromIB2 - 169.editorWindowContentRectSynchronizationRect - 169.object.labelIdentifier - 19.IBPluginDependency - 19.ImportedFromIB2 - 196.ImportedFromIB2 - 200295.IBPluginDependency - 200295.IBShouldRemoveOnLegacySave - 203.IBPluginDependency - 203.ImportedFromIB2 - 204.IBPluginDependency - 204.ImportedFromIB2 - 23.IBPluginDependency - 23.ImportedFromIB2 - 24.IBEditorWindowLastContentRect - 24.IBPluginDependency - 24.ImportedFromIB2 - 24.editorWindowContentRectSynchronizationRect - 244.IBEditorWindowLastContentRect - 244.IBPluginDependency - 244.IBWindowTemplateEditedContentRect - 244.ImportedFromIB2 - 244.editorWindowContentRectSynchronizationRect - 244.windowTemplate.hasMaxSize - 244.windowTemplate.hasMinSize - 244.windowTemplate.maxSize - 244.windowTemplate.minSize - 245.IBPluginDependency - 245.ImportedFromIB2 - 269.IBPluginDependency - 269.ImportedFromIB2 - 270.IBEditorWindowLastContentRect - 270.IBPluginDependency - 270.ImportedFromIB2 - 270.editorWindowContentRectSynchronizationRect - 272.IBPluginDependency - 272.ImportedFromIB2 - 285.IBEditorWindowLastContentRect - 285.IBPluginDependency - 285.IBViewEditorWindowController.showingBoundsRectangles - 285.IBViewEditorWindowController.showingLayoutRectangles - 285.IBWindowTemplateEditedContentRect - 285.ImportedFromIB2 - 285.editorWindowContentRectSynchronizationRect - 285.windowTemplate.hasMaxSize - 285.windowTemplate.hasMinSize - 285.windowTemplate.maxSize - 285.windowTemplate.minSize - 286.IBPluginDependency - 286.ImportedFromIB2 - 29.IBEditorWindowLastContentRect - 29.IBPluginDependency - 29.ImportedFromIB2 - 29.editorWindowContentRectSynchronizationRect - 292.IBPluginDependency - 292.ImportedFromIB2 - 293.IBPluginDependency - 293.ImportedFromIB2 - 295.IBPluginDependency - 295.ImportedFromIB2 - 296.IBPluginDependency - 296.ImportedFromIB2 - 297.IBPluginDependency - 297.ImportedFromIB2 - 298.IBPluginDependency - 298.ImportedFromIB2 - 300295.IBPluginDependency - 300295.IBShouldRemoveOnLegacySave - 300337.IBPluginDependency - 300337.ImportedFromIB2 - 300338.IBPluginDependency - 300338.ImportedFromIB2 - 300358.IBPluginDependency - 300358.ImportedFromIB2 - 300359.IBPluginDependency - 300359.ImportedFromIB2 - 300359.object.labelIdentifier - 300360.IBPluginDependency - 300360.object.labelIdentifier - 300361.IBPluginDependency - 300361.object.labelIdentifier - 300362.IBPluginDependency - 300362.ImportedFromIB2 - 300363.IBPluginDependency - 300364.IBPluginDependency - 300364.ImportedFromIB2 - 300365.IBPluginDependency - 300368.IBPluginDependency - 300368.ImportedFromIB2 - 300369.IBPluginDependency - 300370.IBPluginDependency - 300370.ImportedFromIB2 - 300371.IBPluginDependency - 300421.IBPluginDependency - 300421.ImportedFromIB2 - 300422.IBPluginDependency - 300422.ImportedFromIB2 - 300423.IBPluginDependency - 300423.ImportedFromIB2 - 300424.IBPluginDependency - 300424.ImportedFromIB2 - 300440.IBPluginDependency - 300441.IBPluginDependency - 300447.IBPluginDependency - 300447.ImportedFromIB2 - 300447.object.labelIdentifier - 300450.IBPluginDependency - 300450.object.labelIdentifier - 300451.IBPluginDependency - 300451.ImportedFromIB2 - 300451.object.labelIdentifier - 300452.IBPluginDependency - 300452.object.labelIdentifier - 300453.IBPluginDependency - 300453.ImportedFromIB2 - 300453.object.labelIdentifier - 300454.IBPluginDependency - 300454.object.labelIdentifier - 300455.IBPluginDependency - 300455.ImportedFromIB2 - 300456.IBPluginDependency - 300457.IBPluginDependency - 300457.ImportedFromIB2 - 300457.object.labelIdentifier - 300458.IBPluginDependency - 300458.object.labelIdentifier - 300459.IBPluginDependency - 300459.ImportedFromIB2 - 300460.IBPluginDependency - 300472.IBPluginDependency - 300472.ImportedFromIB2 - 300473.IBPluginDependency - 305.IBPluginDependency - 305.ImportedFromIB2 - 310.IBPluginDependency - 310.ImportedFromIB2 - 348.IBPluginDependency - 348.ImportedFromIB2 - 349.IBPluginDependency - 349.ImportedFromIB2 - 350.IBPluginDependency - 350.ImportedFromIB2 - 351.IBPluginDependency - 351.ImportedFromIB2 - 352.IBPluginDependency - 352.ImportedFromIB2 - 353.IBPluginDependency - 353.ImportedFromIB2 - 354.IBPluginDependency - 354.ImportedFromIB2 - 363.IBPluginDependency - 363.ImportedFromIB2 - 364.IBPluginDependency - 364.ImportedFromIB2 - 365.IBPluginDependency - 365.ImportedFromIB2 - 368.IBPluginDependency - 368.ImportedFromIB2 - 369.IBPluginDependency - 369.ImportedFromIB2 - 370.IBPluginDependency - 370.ImportedFromIB2 - 371.IBPluginDependency - 371.ImportedFromIB2 - 372.IBPluginDependency - 372.ImportedFromIB2 - 374.IBPluginDependency - 374.ImportedFromIB2 - 375.IBPluginDependency - 375.ImportedFromIB2 - 376.IBPluginDependency - 376.ImportedFromIB2 - 377.IBPluginDependency - 377.ImportedFromIB2 - 379.IBPluginDependency - 379.ImportedFromIB2 - 380.IBPluginDependency - 380.ImportedFromIB2 - 381.IBPluginDependency - 381.ImportedFromIB2 - 382.IBPluginDependency - 382.ImportedFromIB2 - 383.IBPluginDependency - 383.ImportedFromIB2 - 384.IBPluginDependency - 384.ImportedFromIB2 - 385.IBPluginDependency - 385.ImportedFromIB2 - 386.IBPluginDependency - 386.ImportedFromIB2 - 419.IBPluginDependency - 419.ImportedFromIB2 - 419.object.labelIdentifier - 420.IBPluginDependency - 420.ImportedFromIB2 - 420.object.labelIdentifier - 421.IBPluginDependency - 421.ImportedFromIB2 - 421.object.labelIdentifier - 423.IBEditorWindowLastContentRect - 423.IBPluginDependency - 423.ImportedFromIB2 - 435.IBPluginDependency - 435.ImportedFromIB2 - 5.IBPluginDependency - 5.ImportedFromIB2 - 524.IBPluginDependency - 524.ImportedFromIB2 - 526.IBPluginDependency - 526.ImportedFromIB2 - 527.IBPluginDependency - 527.ImportedFromIB2 - 532.IBPluginDependency - 532.ImportedFromIB2 - 533.IBPluginDependency - 533.ImportedFromIB2 - 535.IBPluginDependency - 535.ImportedFromIB2 - 536.IBPluginDependency - 536.ImportedFromIB2 - 537.IBPluginDependency - 537.ImportedFromIB2 - 538.IBPluginDependency - 538.ImportedFromIB2 - 541.IBPluginDependency - 541.ImportedFromIB2 - 543.IBPluginDependency - 543.ImportedFromIB2 - 544.IBPluginDependency - 544.ImportedFromIB2 - 545.IBPluginDependency - 545.ImportedFromIB2 - 56.IBPluginDependency - 56.ImportedFromIB2 - 57.IBEditorWindowLastContentRect - 57.IBPluginDependency - 57.ImportedFromIB2 - 57.editorWindowContentRectSynchronizationRect - 573.IBPluginDependency - 573.ImportedFromIB2 - 574.IBPluginDependency - 574.ImportedFromIB2 - 575.IBPluginDependency - 575.ImportedFromIB2 - 58.IBPluginDependency - 58.ImportedFromIB2 - 92.IBPluginDependency - 92.ImportedFromIB2 - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - IBBuiltInLabel-Red - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{168, 821}, {113, 23}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{202, 626}, {154, 153}} - IBBuiltInLabel-Red - com.apple.InterfaceBuilder.CocoaPlugin - - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{349, 868}, {315, 143}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{271, 666}, {301, 153}} - {{437, 533}, {625, 323}} - com.apple.InterfaceBuilder.CocoaPlugin - {{437, 533}, {625, 323}} - - {{184, 290}, {481, 345}} - - - {3.40282e+38, 3.40282e+38} - {320, 240} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{58, 803}, {155, 33}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{100, 746}, {155, 33}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{68, 585}, {469, 271}} - com.apple.InterfaceBuilder.CocoaPlugin - - - {{68, 585}, {469, 271}} - - {{433, 406}, {486, 327}} - - - {3.40282e+38, 3.40282e+38} - {320, 240} - com.apple.InterfaceBuilder.CocoaPlugin - - {{145, 836}, {344, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{67, 819}, {336, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - IBBuiltInLabel-Red - com.apple.InterfaceBuilder.CocoaPlugin - IBBuiltInLabel-Red - com.apple.InterfaceBuilder.CocoaPlugin - IBBuiltInLabel-Red - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - IBBuiltInLabel-Red - com.apple.InterfaceBuilder.CocoaPlugin - IBBuiltInLabel-Red - com.apple.InterfaceBuilder.CocoaPlugin - - IBBuiltInLabel-Red - com.apple.InterfaceBuilder.CocoaPlugin - IBBuiltInLabel-Red - com.apple.InterfaceBuilder.CocoaPlugin - - IBBuiltInLabel-Red - com.apple.InterfaceBuilder.CocoaPlugin - IBBuiltInLabel-Red - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - IBBuiltInLabel-Red - com.apple.InterfaceBuilder.CocoaPlugin - IBBuiltInLabel-Red - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - IBBuiltInLabel-Red - com.apple.InterfaceBuilder.CocoaPlugin - - IBBuiltInLabel-Red - com.apple.InterfaceBuilder.CocoaPlugin - - IBBuiltInLabel-Red - {{525, 477}, {128, 33}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{20, 641}, {218, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{79, 616}, {218, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - - - - YES - - - YES - + + 300476 + + + + + + + + 300477 + + + + + + + + 300478 + + + + + 300479 + + + + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{168, 821}, {113, 23}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{202, 626}, {154, 153}} + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{349, 868}, {315, 143}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{271, 666}, {301, 153}} + {{507, 533}, {625, 323}} + com.apple.InterfaceBuilder.CocoaPlugin + {{507, 533}, {625, 323}} + + {{184, 290}, {481, 345}} + + + {3.40282e+38, 3.40282e+38} + {320, 240} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{58, 803}, {155, 33}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{100, 746}, {155, 33}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{68, 585}, {469, 271}} + com.apple.InterfaceBuilder.CocoaPlugin + + + {{68, 585}, {469, 271}} + + {{433, 406}, {486, 327}} + + + {3.40282e+38, 3.40282e+38} + {320, 240} + com.apple.InterfaceBuilder.CocoaPlugin + + {{145, 1011}, {336, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{67, 819}, {336, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{20, 641}, {218, 203}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{79, 616}, {218, 203}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + - - YES - - - YES - - + - 300475 + 300481 - - YES + FirstResponder NSObject @@ -3935,16 +3589,12 @@ dGFpIEtvbWVudG8tbsOkcHDDpGltacOkIHBhaW5ldHR1bmEgbmFwc2F1dGV0dGFlc3NhLgo - + 0 com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - - com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 - + YES ../X11.xcodeproj diff --git a/xserver/hw/xquartz/bundle/Resources/ko.lproj/locversion.plist b/xserver/hw/xquartz/bundle/Resources/ko.lproj/locversion.plist index 832fcb47e..4b6a95abc 100644 --- a/xserver/hw/xquartz/bundle/Resources/ko.lproj/locversion.plist +++ b/xserver/hw/xquartz/bundle/Resources/ko.lproj/locversion.plist @@ -3,12 +3,12 @@ LprojCompatibleVersion - 93 + 97 LprojLocale ko LprojRevisionLevel 1 LprojVersion - 93 + 97 diff --git a/xserver/hw/xquartz/bundle/Resources/ko.lproj/main.nib/designable.nib b/xserver/hw/xquartz/bundle/Resources/ko.lproj/main.nib/designable.nib index 5ed9b42fe..ce6b2d171 100644 --- a/xserver/hw/xquartz/bundle/Resources/ko.lproj/main.nib/designable.nib +++ b/xserver/hw/xquartz/bundle/Resources/ko.lproj/main.nib/designable.nib @@ -1,7 +1,7 @@ - + - 1050 + 1040 11A79a 732 1059 @@ -10,24 +10,12 @@ com.apple.InterfaceBuilder.CocoaPlugin 732 - - YES - - - YES + + com.apple.InterfaceBuilder.CocoaPlugin - - - YES - - YES - - - YES - - - - YES + + + NSApplication @@ -41,8 +29,7 @@ MainMenu - - YES + X11 @@ -60,8 +47,7 @@ submenuAction: X11 - - YES + X11에 관하여 @@ -101,9 +87,7 @@ submenuAction: 서비스 - - YES - + _NSServicesMenu @@ -187,7 +171,7 @@ - + _NSAppleMenu @@ -202,8 +186,7 @@ submenuAction: 응용 프로그램 - - YES + YES @@ -224,7 +207,7 @@ - + @@ -238,18 +221,17 @@ submenuAction: 편집 - - YES + - 베껴두기 + 복사하기 c 1048576 2147483647 - + @@ -263,8 +245,7 @@ submenuAction: 윈도우 - - YES + 닫기 @@ -341,7 +322,7 @@ - + _NSWindowsMenu @@ -356,8 +337,7 @@ submenuAction: 도움말 - - YES + X11 도움말 @@ -367,10 +347,10 @@ - + - + _NSMainMenu @@ -391,15 +371,13 @@ 256 - - YES + 256 {{13, 10}, {458, 292}} - - YES + 1 @@ -407,8 +385,7 @@ 256 - - YES + 256 @@ -427,7 +404,7 @@ 1211912703 2 - + NSImage NSSwitch @@ -486,9 +463,9 @@ 67239424 4194304 - 7YG066at7ZWY7JesIOuniOyasOyKpCDspJHqsIQg65iQ64qUIOyYpOuluOyqvSDri6jstpTrpbwg7Zmc -7ISx7ZmU7ZWY64qUIOuPmeyViCBPcHRpb24g65iQ64qUIENvbW1hbmQg7YKk66W8IO2VqOq7mCDriITr -pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo + 66eI7Jqw7IqkIOykkeqwhCDrmJDripQg7Jik66W47Kq9IOuyhO2KvOydhCDtmZzshLHtmZTtlZjroKTr +qbQsIO2BtOumre2VmOuKlCDrj5nslYggT3B0aW9uIOuYkOuKlCBDb21tYW5kIO2CpOulvCDtlajqu5gg +64iE66W06rOgIOyeiOycvOyLreyLnOyYpC4KA @@ -510,7 +487,7 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 1211912703 2 - + @@ -549,7 +526,7 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 1211912703 2 - + @@ -557,7 +534,45 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 25 - + + + 256 + {{36, -1}, {385, 31}} + + YES + + 67239424 + 4194304 + 활성화하면, Option 키는 Mode_switch 대신에 Alt_L 및 Alt_R X11 키 기호를 보냅니다. + + + + + + + + + 256 + {{18, 36}, {402, 18}} + + YES + + 67239424 + 0 + Option 키로 Alt_L 및 Alt_R 보내기 + + + 1211912703 + 2 + + + + + 200 + 25 + + + {{10, 33}, {438, 246}} @@ -572,8 +587,7 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 256 - - YES + 256 @@ -588,7 +602,7 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 1211912703 2 - + @@ -655,8 +669,7 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo OtherViews - - YES + @@ -684,7 +697,7 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo - 수천만 색상 + 수백만 색상 1048576 2147483647 @@ -694,7 +707,7 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 24 - + 3 YES @@ -711,7 +724,7 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 67239424 4194304 - 7IOJ7IOBOgo + 색상: @@ -750,7 +763,7 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 1211912703 2 - + @@ -772,7 +785,7 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 1211912703 2 - + @@ -797,7 +810,7 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo - + {{10, 33}, {438, 246}} 출력 @@ -811,8 +824,7 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 256 - - YES + 256 @@ -827,7 +839,7 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 1211912703 2 - + @@ -844,7 +856,7 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 67239424 4194304 - "베껴두기" 메뉴 항목을 활성화하고 OSX 붙이기 보드, X11 클립보드 및 PRIMARY 버퍼 간의 동기화를 허용합니다. + "복사하기" 메뉴 항목을 활성화하고 OSX 붙이기 보드, X11 클립보드 및 PRIMARY 버퍼 간의 동기화를 허용합니다. @@ -865,7 +877,7 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 1211912703 2 - + @@ -887,7 +899,7 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 1211912703 2 - + @@ -909,7 +921,7 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 1211912703 2 - + @@ -931,7 +943,7 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 1211912703 2 - + @@ -971,7 +983,7 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo - + {{10, 33}, {438, 246}} 붙이기 보드 @@ -985,8 +997,7 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 256 - - YES + 256 @@ -1001,7 +1012,7 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 1211912703 2 - + @@ -1039,7 +1050,7 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 1211912703 2 - + @@ -1077,7 +1088,7 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 1211912703 2 - + @@ -1101,7 +1112,7 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo - + {{10, 33}, {438, 246}} 윈도우 @@ -1112,8 +1123,7 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 256 - - YES + 256 @@ -1128,7 +1138,7 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 1211912703 2 - + @@ -1150,7 +1160,7 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 1211912703 2 - + @@ -1209,25 +1219,24 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo - + {{10, 33}, {438, 246}} 보안 - + 0 YES YES - - YES + - + - + {484, 308} {{0, 0}, {1280, 938}} @@ -1250,8 +1259,7 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 256 - - YES + 265 @@ -1305,13 +1313,11 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 274 - - YES + 2304 - - YES + 256 @@ -1331,8 +1337,7 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo {{302, 0}, {16, 17}} - - YES + 121.73100280761719 62.730998992919922 @@ -1440,7 +1445,7 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo YES - + 3 2 @@ -1463,7 +1468,7 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo YES 0 - + {{1, 17}, {301, 198}} @@ -1493,10 +1498,9 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 2304 - - YES + - + {{1, 0}, {301, 17}} @@ -1505,7 +1509,7 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 4 - + {{20, 20}, {318, 231}} @@ -1540,7 +1544,7 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 25 - + {454, 271} {{0, 0}, {1280, 938}} @@ -1550,8 +1554,7 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 메뉴 - - YES + YES @@ -1574,8 +1577,7 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo submenuAction: 응용 프로그램 - - YES + YES @@ -1589,23 +1591,22 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo - 사용자화... + 사용자화… 1048576 2147483647 - + - + - + - - YES + copy: @@ -2150,13 +2151,28 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 300475 - + + + prefs_changed: + + + + 300480 + + + + option_sends_alt + + + + 300481 + + - - YES + 0 - + @@ -2181,31 +2197,28 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 29 - - YES + - + MainMenu 19 - - YES + - + 24 - - YES + @@ -2214,7 +2227,7 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo - + @@ -2260,17 +2273,15 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 56 - - YES + - + 57 - - YES + @@ -2283,7 +2294,7 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo - + @@ -2299,10 +2310,9 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 131 - - YES + - + @@ -2358,19 +2368,17 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 163 - - YES + - + 169 - - YES + - + @@ -2381,20 +2389,18 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 269 - - YES + - + 270 - - YES + - + @@ -2410,19 +2416,17 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 419 - - YES + - + 420 - - YES + - + @@ -2439,126 +2443,115 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 244 - - YES + - + PrefsPanel 245 - - YES + - + 348 - - YES + - + 349 - - YES + - + 351 - - YES + - + + + 363 - - YES + - + 364 - - YES + - + 365 - - YES + - + 368 - - YES + - + 369 - - YES + - + 370 - - YES + - + 352 - - YES + - + 350 - - YES + @@ -2567,169 +2560,152 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo - + 371 - - YES + - + 372 - - YES + - + 382 - - YES + - + 385 - - YES + - + 386 - - YES + - + 541 - - YES + - + 543 - - YES + - + 353 - - YES + - + 354 - - YES + - + 374 - - YES + - + 375 - - YES + - + 376 - - YES + - + 377 - - YES + - + 379 - - YES + - + 285 - - YES + - + EditPrograms 286 - - YES + - + 423 - - YES + - + DockMenu @@ -2741,20 +2717,18 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 526 - - YES + - + 527 - - YES + - + @@ -2810,10 +2784,9 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 100382 - - YES + - + @@ -2864,13 +2837,12 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 380 - - YES + - + @@ -2896,13 +2868,12 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 295 - - YES + - + @@ -2923,21 +2894,19 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 296 - - YES + - + 535 - - YES + - + @@ -2948,10 +2917,9 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 298 - - YES + - + @@ -2962,10 +2930,9 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 297 - - YES + - + @@ -2976,10 +2943,9 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 310 - - YES + - + @@ -2990,10 +2956,9 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 292 - - YES + - + @@ -3004,10 +2969,9 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 293 - - YES + - + @@ -3018,42 +2982,38 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 300337 - - YES + - + 300338 - - YES + - + 300358 - - YES + - + 300359 - - YES + - + @@ -3069,10 +3029,9 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 300362 - - YES + - + @@ -3083,10 +3042,9 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 300364 - - YES + - + @@ -3097,10 +3055,9 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 300368 - - YES + - + @@ -3111,10 +3068,9 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 300370 - - YES + - + @@ -3125,17 +3081,15 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 300421 - - YES + - + 300422 - - YES + @@ -3144,25 +3098,23 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo - + 300423 - - YES + - + 300424 - - YES + - + @@ -3178,10 +3130,9 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 300447 - - YES + - + @@ -3192,10 +3143,9 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 300451 - - YES + - + @@ -3206,10 +3156,9 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 300453 - - YES + - + @@ -3220,10 +3169,9 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 300455 - - YES + - + @@ -3234,10 +3182,9 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 300457 - - YES + - + @@ -3248,10 +3195,9 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 300459 - - YES + - + @@ -3262,10 +3208,9 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo 300472 - - YES + - + @@ -3273,604 +3218,333 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo - - - - YES - - YES - -3.IBPluginDependency - -3.ImportedFromIB2 - 100292.IBPluginDependency - 100293.IBPluginDependency - 100295.IBPluginDependency - 100295.IBShouldRemoveOnLegacySave - 100310.IBPluginDependency - 100363.IBPluginDependency - 100364.IBPluginDependency - 100365.IBPluginDependency - 100368.IBPluginDependency - 100369.IBPluginDependency - 100370.IBPluginDependency - 100371.IBPluginDependency - 100372.IBPluginDependency - 100374.IBPluginDependency - 100375.IBPluginDependency - 100376.IBPluginDependency - 100377.IBPluginDependency - 100379.IBPluginDependency - 100382.IBPluginDependency - 100385.IBPluginDependency - 100386.IBPluginDependency - 100541.IBPluginDependency - 100543.IBPluginDependency - 129.IBPluginDependency - 129.ImportedFromIB2 - 130.IBPluginDependency - 130.ImportedFromIB2 - 131.IBPluginDependency - 131.ImportedFromIB2 - 134.IBPluginDependency - 134.ImportedFromIB2 - 136.IBPluginDependency - 136.ImportedFromIB2 - 143.IBPluginDependency - 143.ImportedFromIB2 - 144.IBPluginDependency - 144.ImportedFromIB2 - 145.IBPluginDependency - 145.ImportedFromIB2 - 149.IBPluginDependency - 149.ImportedFromIB2 - 150.IBPluginDependency - 150.ImportedFromIB2 - 157.IBPluginDependency - 157.ImportedFromIB2 - 163.IBPluginDependency - 163.ImportedFromIB2 - 169.IBEditorWindowLastContentRect - 169.IBPluginDependency - 169.ImportedFromIB2 - 169.editorWindowContentRectSynchronizationRect - 19.IBPluginDependency - 19.ImportedFromIB2 - 196.ImportedFromIB2 - 200295.IBPluginDependency - 200295.IBShouldRemoveOnLegacySave - 203.IBPluginDependency - 203.ImportedFromIB2 - 204.IBPluginDependency - 204.ImportedFromIB2 - 23.IBPluginDependency - 23.ImportedFromIB2 - 24.IBEditorWindowLastContentRect - 24.IBPluginDependency - 24.ImportedFromIB2 - 24.editorWindowContentRectSynchronizationRect - 244.IBEditorWindowLastContentRect - 244.IBPluginDependency - 244.IBWindowTemplateEditedContentRect - 244.ImportedFromIB2 - 244.editorWindowContentRectSynchronizationRect - 244.windowTemplate.hasMaxSize - 244.windowTemplate.hasMinSize - 244.windowTemplate.maxSize - 244.windowTemplate.minSize - 245.IBPluginDependency - 245.ImportedFromIB2 - 269.IBPluginDependency - 269.ImportedFromIB2 - 270.IBEditorWindowLastContentRect - 270.IBPluginDependency - 270.ImportedFromIB2 - 270.editorWindowContentRectSynchronizationRect - 272.IBPluginDependency - 272.ImportedFromIB2 - 285.IBEditorWindowLastContentRect - 285.IBPluginDependency - 285.IBViewEditorWindowController.showingBoundsRectangles - 285.IBViewEditorWindowController.showingLayoutRectangles - 285.IBWindowTemplateEditedContentRect - 285.ImportedFromIB2 - 285.editorWindowContentRectSynchronizationRect - 285.windowTemplate.hasMaxSize - 285.windowTemplate.hasMinSize - 285.windowTemplate.maxSize - 285.windowTemplate.minSize - 286.IBPluginDependency - 286.ImportedFromIB2 - 29.IBEditorWindowLastContentRect - 29.IBPluginDependency - 29.ImportedFromIB2 - 29.editorWindowContentRectSynchronizationRect - 292.IBPluginDependency - 292.ImportedFromIB2 - 293.IBPluginDependency - 293.ImportedFromIB2 - 295.IBPluginDependency - 295.ImportedFromIB2 - 296.IBPluginDependency - 296.ImportedFromIB2 - 297.IBPluginDependency - 297.ImportedFromIB2 - 298.IBPluginDependency - 298.ImportedFromIB2 - 300295.IBPluginDependency - 300295.IBShouldRemoveOnLegacySave - 300337.IBPluginDependency - 300337.ImportedFromIB2 - 300338.IBPluginDependency - 300338.ImportedFromIB2 - 300358.IBPluginDependency - 300358.ImportedFromIB2 - 300359.IBPluginDependency - 300359.ImportedFromIB2 - 300360.IBPluginDependency - 300361.IBPluginDependency - 300362.IBPluginDependency - 300362.ImportedFromIB2 - 300363.IBPluginDependency - 300364.IBPluginDependency - 300364.ImportedFromIB2 - 300365.IBPluginDependency - 300368.IBPluginDependency - 300368.ImportedFromIB2 - 300369.IBPluginDependency - 300370.IBPluginDependency - 300370.ImportedFromIB2 - 300371.IBPluginDependency - 300421.IBPluginDependency - 300421.ImportedFromIB2 - 300422.IBPluginDependency - 300422.ImportedFromIB2 - 300423.IBPluginDependency - 300423.ImportedFromIB2 - 300424.IBPluginDependency - 300424.ImportedFromIB2 - 300440.IBPluginDependency - 300441.IBPluginDependency - 300447.IBPluginDependency - 300447.ImportedFromIB2 - 300450.IBPluginDependency - 300451.IBPluginDependency - 300451.ImportedFromIB2 - 300452.IBPluginDependency - 300453.IBPluginDependency - 300453.ImportedFromIB2 - 300454.IBPluginDependency - 300455.IBPluginDependency - 300455.ImportedFromIB2 - 300456.IBPluginDependency - 300457.IBPluginDependency - 300457.ImportedFromIB2 - 300458.IBPluginDependency - 300459.IBPluginDependency - 300459.ImportedFromIB2 - 300460.IBPluginDependency - 300472.IBPluginDependency - 300472.ImportedFromIB2 - 300473.IBPluginDependency - 305.IBPluginDependency - 305.ImportedFromIB2 - 310.IBPluginDependency - 310.ImportedFromIB2 - 348.IBPluginDependency - 348.ImportedFromIB2 - 349.IBPluginDependency - 349.ImportedFromIB2 - 350.IBPluginDependency - 350.ImportedFromIB2 - 351.IBPluginDependency - 351.ImportedFromIB2 - 352.IBPluginDependency - 352.ImportedFromIB2 - 353.IBPluginDependency - 353.ImportedFromIB2 - 354.IBPluginDependency - 354.ImportedFromIB2 - 363.IBPluginDependency - 363.ImportedFromIB2 - 364.IBPluginDependency - 364.ImportedFromIB2 - 365.IBPluginDependency - 365.ImportedFromIB2 - 368.IBPluginDependency - 368.ImportedFromIB2 - 369.IBPluginDependency - 369.ImportedFromIB2 - 370.IBPluginDependency - 370.ImportedFromIB2 - 371.IBPluginDependency - 371.ImportedFromIB2 - 372.IBPluginDependency - 372.ImportedFromIB2 - 374.IBPluginDependency - 374.ImportedFromIB2 - 375.IBPluginDependency - 375.ImportedFromIB2 - 376.IBPluginDependency - 376.ImportedFromIB2 - 377.IBPluginDependency - 377.ImportedFromIB2 - 379.IBPluginDependency - 379.ImportedFromIB2 - 380.IBPluginDependency - 380.ImportedFromIB2 - 381.IBPluginDependency - 381.ImportedFromIB2 - 382.IBPluginDependency - 382.ImportedFromIB2 - 383.IBPluginDependency - 383.ImportedFromIB2 - 384.IBPluginDependency - 384.ImportedFromIB2 - 385.IBPluginDependency - 385.ImportedFromIB2 - 386.IBPluginDependency - 386.ImportedFromIB2 - 419.IBPluginDependency - 419.ImportedFromIB2 - 420.IBPluginDependency - 420.ImportedFromIB2 - 421.IBPluginDependency - 421.ImportedFromIB2 - 423.IBPluginDependency - 423.ImportedFromIB2 - 435.IBPluginDependency - 435.ImportedFromIB2 - 5.IBPluginDependency - 5.ImportedFromIB2 - 524.IBPluginDependency - 524.ImportedFromIB2 - 526.IBPluginDependency - 526.ImportedFromIB2 - 527.IBPluginDependency - 527.ImportedFromIB2 - 532.IBPluginDependency - 532.ImportedFromIB2 - 533.IBPluginDependency - 533.ImportedFromIB2 - 535.IBPluginDependency - 535.ImportedFromIB2 - 536.IBPluginDependency - 536.ImportedFromIB2 - 537.IBPluginDependency - 537.ImportedFromIB2 - 538.IBPluginDependency - 538.ImportedFromIB2 - 541.IBPluginDependency - 541.ImportedFromIB2 - 543.IBPluginDependency - 543.ImportedFromIB2 - 544.IBPluginDependency - 544.ImportedFromIB2 - 545.IBPluginDependency - 545.ImportedFromIB2 - 56.IBPluginDependency - 56.ImportedFromIB2 - 57.IBEditorWindowLastContentRect - 57.IBPluginDependency - 57.ImportedFromIB2 - 57.editorWindowContentRectSynchronizationRect - 573.IBPluginDependency - 573.ImportedFromIB2 - 574.IBPluginDependency - 574.ImportedFromIB2 - 575.IBPluginDependency - 575.ImportedFromIB2 - 58.IBPluginDependency - 58.ImportedFromIB2 - 92.IBPluginDependency - 92.ImportedFromIB2 - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{168, 821}, {113, 23}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{202, 626}, {154, 153}} - com.apple.InterfaceBuilder.CocoaPlugin - - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{349, 868}, {315, 143}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{271, 666}, {301, 153}} - {{437, 749}, {484, 308}} - com.apple.InterfaceBuilder.CocoaPlugin - {{437, 749}, {484, 308}} - - {{184, 290}, {481, 345}} - - - {3.40282e+38, 3.40282e+38} - {320, 240} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{58, 803}, {155, 33}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{100, 746}, {155, 33}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{68, 585}, {454, 271}} - com.apple.InterfaceBuilder.CocoaPlugin - - - {{68, 585}, {454, 271}} - - {{433, 406}, {486, 327}} - - - {3.40282e+38, 3.40282e+38} - {320, 240} - com.apple.InterfaceBuilder.CocoaPlugin - - {{145, 1011}, {336, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{67, 819}, {336, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{20, 641}, {218, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{79, 616}, {218, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - - - - YES - - - YES - + + 300476 + + + + + + + + 300477 + + + + + + + + 300478 + + + + + 300479 + + + + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{168, 821}, {113, 23}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{202, 626}, {154, 153}} + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{349, 868}, {315, 143}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{271, 666}, {301, 153}} + {{507, 565}, {484, 308}} + com.apple.InterfaceBuilder.CocoaPlugin + {{507, 565}, {484, 308}} + + {{184, 290}, {481, 345}} + + + {3.40282e+38, 3.40282e+38} + {320, 240} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{58, 803}, {155, 33}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{100, 746}, {155, 33}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{68, 585}, {454, 271}} + com.apple.InterfaceBuilder.CocoaPlugin + + + {{68, 585}, {454, 271}} + + {{433, 406}, {486, 327}} + + + {3.40282e+38, 3.40282e+38} + {320, 240} + com.apple.InterfaceBuilder.CocoaPlugin + + {{145, 1011}, {336, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{67, 819}, {336, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{20, 641}, {218, 203}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{79, 616}, {218, 203}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + - - YES - - - YES - - + - 300475 + 300481 - - YES + FirstResponder NSObject @@ -3895,16 +3569,12 @@ pbTqs6Ag7J6I7Jy87Iut7Iuc7JikLgo - + 0 com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - - com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 - + YES ../X11.xcodeproj diff --git a/xserver/hw/xquartz/bundle/Resources/no.lproj/locversion.plist b/xserver/hw/xquartz/bundle/Resources/no.lproj/locversion.plist index e4d6608b9..417e57c02 100644 --- a/xserver/hw/xquartz/bundle/Resources/no.lproj/locversion.plist +++ b/xserver/hw/xquartz/bundle/Resources/no.lproj/locversion.plist @@ -3,12 +3,12 @@ LprojCompatibleVersion - 93 + 97 LprojLocale no LprojRevisionLevel 1 LprojVersion - 93 + 97 diff --git a/xserver/hw/xquartz/bundle/Resources/no.lproj/main.nib/designable.nib b/xserver/hw/xquartz/bundle/Resources/no.lproj/main.nib/designable.nib index 73faf775e..8d1b79128 100644 --- a/xserver/hw/xquartz/bundle/Resources/no.lproj/main.nib/designable.nib +++ b/xserver/hw/xquartz/bundle/Resources/no.lproj/main.nib/designable.nib @@ -1,33 +1,21 @@ - + - 1050 + 1040 11A79a - 732 + 784 1059 478.00 com.apple.InterfaceBuilder.CocoaPlugin - 732 + 784 - - YES - - - YES + + com.apple.InterfaceBuilder.CocoaPlugin - - - YES - - YES - - - YES - - - - YES + + + NSApplication @@ -41,8 +29,7 @@ MainMenu - - YES + X11 @@ -60,8 +47,7 @@ submenuAction: X11 - - YES + Om X11 @@ -101,9 +87,7 @@ submenuAction: Tjenester - - YES - + _NSServicesMenu @@ -187,7 +171,7 @@ - + _NSAppleMenu @@ -202,8 +186,7 @@ submenuAction: Programmer - - YES + YES @@ -224,7 +207,7 @@ - + @@ -238,8 +221,7 @@ submenuAction: Rediger - - YES + Kopier @@ -249,7 +231,7 @@ - + @@ -263,8 +245,7 @@ submenuAction: Vindu - - YES + Lukk @@ -341,7 +322,7 @@ - + _NSWindowsMenu @@ -356,8 +337,7 @@ submenuAction: Hjelp - - YES + X11-hjelp @@ -367,10 +347,10 @@ - + - + _NSMainMenu @@ -386,20 +366,19 @@ View - {1.7976931348623157e+308, 1.7976931348623157e+308} + {3.4028235e+38, 3.4028235e+38} {320, 240} - + 256 - - YES + 256 {{13, 10}, {458, 292}} - - YES + + 1 @@ -407,13 +386,13 @@ 256 - - YES + 256 {{18, 210}, {402, 18}} + YES 67239424 @@ -427,7 +406,7 @@ 1211912703 2 - + NSImage NSSwitch @@ -443,8 +422,9 @@ 256 - {{36, 49}, {385, 28}} + {{36, 60}, {385, 28}} + YES 67239424 @@ -463,7 +443,7 @@ controlColor 3 - MC42NjY2NjY2NjY3AA + MC42NjY2NjY2ODY1AA @@ -482,6 +462,7 @@ 256 {{36, 162}, {385, 42}} + YES 67239424 @@ -498,8 +479,9 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 256 - {{18, 83}, {402, 18}} + {{18, 94}, {402, 18}} + YES 67239424 @@ -509,7 +491,7 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 1211912703 2 - + @@ -520,8 +502,9 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 256 - {{36, 112}, {385, 28}} + {{36, 118}, {385, 28}} + YES 67239424 @@ -537,8 +520,9 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 256 - {{18, 146}, {402, 18}} + {{18, 152}, {402, 18}} + YES 67239424 @@ -548,7 +532,7 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 1211912703 2 - + @@ -556,9 +540,50 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 25 - + + + 256 + {{36, -1}, {385, 31}} + + + YES + + 67239424 + 4194304 + Når dette er aktivert, sender Tilvalg-tastene Alt_L og Alt_R X11-nøkkelsymboler i stedet for Mode_switch. + + + + + + + + + 256 + {{18, 36}, {402, 18}} + + + YES + + 67239424 + 0 + Tilvalg-tastene sender Alt_L og Alt_R + + + 1211912703 + 2 + + + + + 200 + 25 + + + {{10, 33}, {438, 246}} + Inndata @@ -571,8 +596,7 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 256 - - YES + 256 @@ -587,7 +611,7 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 1211912703 2 - + @@ -615,7 +639,7 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 256 - {{74, 202}, {128, 26}} + {{68, 202}, {134, 26}} YES @@ -654,8 +678,7 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo OtherViews - - YES + @@ -693,7 +716,7 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 24 - + 3 YES @@ -704,13 +727,13 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 256 - {{17, 205}, {55, 20}} + {{17, 208}, {49, 17}} YES 67239424 4194304 - RmFyZ2VyOgo + Farger: @@ -749,7 +772,7 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 1211912703 2 - + @@ -771,7 +794,7 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 1211912703 2 - + @@ -796,7 +819,7 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo - + {{10, 33}, {438, 246}} Utdata @@ -810,8 +833,7 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 256 - - YES + 256 @@ -826,7 +848,7 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 1211912703 2 - + @@ -864,7 +886,7 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 1211912703 2 - + @@ -886,7 +908,7 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 1211912703 2 - + @@ -908,7 +930,7 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 1211912703 2 - + @@ -930,7 +952,7 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 1211912703 2 - + @@ -970,7 +992,7 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo - + {{10, 33}, {438, 246}} Utklipp @@ -984,8 +1006,7 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 256 - - YES + 256 @@ -1000,7 +1021,7 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 1211912703 2 - + @@ -1038,7 +1059,7 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 1211912703 2 - + @@ -1076,7 +1097,7 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 1211912703 2 - + @@ -1100,7 +1121,7 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo - + {{10, 33}, {438, 246}} Vinduer @@ -1111,8 +1132,7 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 256 - - YES + 256 @@ -1127,7 +1147,7 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 1211912703 2 - + @@ -1149,7 +1169,7 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 1211912703 2 - + @@ -1208,30 +1228,31 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo - + {{10, 33}, {438, 246}} Sikkerhet - + 0 YES YES - - YES + - + - + {484, 308} + + {{0, 0}, {1280, 938}} {320, 262} - {1.7976931348623157e+308, 1.7976931348623157e+308} + {3.4028235e+38, 3.4028235e+38} x11_prefs @@ -1244,13 +1265,12 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo View - {1.7976931348623157e+308, 1.7976931348623157e+308} + {3.4028235e+38, 3.4028235e+38} {320, 240} 256 - - YES + 265 @@ -1304,13 +1324,11 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 274 - - YES + 2304 - - YES + 256 @@ -1330,8 +1348,7 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo {{302, 0}, {16, 17}} - - YES + 121.73100280761719 62.730998992919922 @@ -1343,7 +1360,7 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 3 - MC4zMzMzMzI5OQA + MC4zMzMzMzI5ODU2AA 6 @@ -1439,7 +1456,7 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo YES - + 3 2 @@ -1462,7 +1479,7 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo YES 0 - + {{1, 17}, {301, 198}} @@ -1477,7 +1494,7 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo _doScroller: - 0.99492380000000002 + 0.99492377042770386 @@ -1487,15 +1504,14 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 1 _doScroller: - 0.68852460000000004 + 0.68852460384368896 2304 - - YES + - + {{1, 0}, {301, 17}} @@ -1504,7 +1520,7 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 4 - + {{20, 20}, {318, 231}} @@ -1513,7 +1529,6 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo - QSAAAEEgAABBmAAAQZgAAA @@ -1539,18 +1554,17 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 25 - + {485, 271} {{0, 0}, {1280, 938}} {320, 262} - {1.7976931348623157e+308, 1.7976931348623157e+308} + {3.4028235e+38, 3.4028235e+38} x11_apps Meny - - YES + YES @@ -1573,8 +1587,7 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo submenuAction: Programmer - - YES + YES @@ -1595,16 +1608,15 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo - + - + - + - - YES + copy: @@ -2149,13 +2161,28 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 300475 - + + + prefs_changed: + + + + 300480 + + + + option_sends_alt + + + + 300481 + + - - YES + 0 - + @@ -2180,31 +2207,28 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 29 - - YES + - + MainMenu 19 - - YES + - + 24 - - YES + @@ -2213,7 +2237,7 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo - + @@ -2259,17 +2283,15 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 56 - - YES + - + 57 - - YES + @@ -2282,7 +2304,7 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo - + @@ -2298,10 +2320,9 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 131 - - YES + - + @@ -2357,19 +2378,17 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 163 - - YES + - + 169 - - YES + - + @@ -2380,20 +2399,18 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 269 - - YES + - + 270 - - YES + - + @@ -2409,19 +2426,17 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 419 - - YES + - + 420 - - YES + - + @@ -2438,126 +2453,115 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 244 - - YES + - + PrefsPanel 245 - - YES + - + 348 - - YES + - + 349 - - YES + - + 351 - - YES + - + + + 363 - - YES + - + 364 - - YES + - + 365 - - YES + - + 368 - - YES + - + 369 - - YES + - + 370 - - YES + - + 352 - - YES + - + 350 - - YES + @@ -2566,169 +2570,152 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo - + 371 - - YES + - + 372 - - YES + - + 382 - - YES + - + 385 - - YES + - + 386 - - YES + - + 541 - - YES + - + 543 - - YES + - + 353 - - YES + - + 354 - - YES + - + 374 - - YES + - + 375 - - YES + - + 376 - - YES + - + 377 - - YES + - + 379 - - YES + - + 285 - - YES + - + EditPrograms 286 - - YES + - + 423 - - YES + - + DockMenu @@ -2740,20 +2727,18 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 526 - - YES + - + 527 - - YES + - + @@ -2809,10 +2794,9 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 100382 - - YES + - + @@ -2863,13 +2847,12 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 380 - - YES + - + @@ -2895,13 +2878,12 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 295 - - YES + - + @@ -2922,21 +2904,19 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 296 - - YES + - + 535 - - YES + - + @@ -2947,10 +2927,9 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 298 - - YES + - + @@ -2961,10 +2940,9 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 297 - - YES + - + @@ -2975,10 +2953,9 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 310 - - YES + - + @@ -2989,10 +2966,9 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 292 - - YES + - + @@ -3003,10 +2979,9 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 293 - - YES + - + @@ -3017,42 +2992,38 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 300337 - - YES + - + 300338 - - YES + - + 300358 - - YES + - + 300359 - - YES + - + @@ -3068,10 +3039,9 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 300362 - - YES + - + @@ -3082,10 +3052,9 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 300364 - - YES + - + @@ -3096,10 +3065,9 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 300368 - - YES + - + @@ -3110,10 +3078,9 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 300370 - - YES + - + @@ -3124,17 +3091,15 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 300421 - - YES + - + 300422 - - YES + @@ -3143,25 +3108,23 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo - + 300423 - - YES + - + 300424 - - YES + - + @@ -3177,10 +3140,9 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 300447 - - YES + - + @@ -3191,10 +3153,9 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 300451 - - YES + - + @@ -3205,10 +3166,9 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 300453 - - YES + - + @@ -3219,10 +3179,9 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 300455 - - YES + - + @@ -3233,10 +3192,9 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 300457 - - YES + - + @@ -3247,10 +3205,9 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 300459 - - YES + - + @@ -3261,10 +3218,9 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo 300472 - - YES + - + @@ -3272,604 +3228,338 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo - - - - YES - - YES - -3.IBPluginDependency - -3.ImportedFromIB2 - 100292.IBPluginDependency - 100293.IBPluginDependency - 100295.IBPluginDependency - 100295.IBShouldRemoveOnLegacySave - 100310.IBPluginDependency - 100363.IBPluginDependency - 100364.IBPluginDependency - 100365.IBPluginDependency - 100368.IBPluginDependency - 100369.IBPluginDependency - 100370.IBPluginDependency - 100371.IBPluginDependency - 100372.IBPluginDependency - 100374.IBPluginDependency - 100375.IBPluginDependency - 100376.IBPluginDependency - 100377.IBPluginDependency - 100379.IBPluginDependency - 100382.IBPluginDependency - 100385.IBPluginDependency - 100386.IBPluginDependency - 100541.IBPluginDependency - 100543.IBPluginDependency - 129.IBPluginDependency - 129.ImportedFromIB2 - 130.IBPluginDependency - 130.ImportedFromIB2 - 131.IBPluginDependency - 131.ImportedFromIB2 - 134.IBPluginDependency - 134.ImportedFromIB2 - 136.IBPluginDependency - 136.ImportedFromIB2 - 143.IBPluginDependency - 143.ImportedFromIB2 - 144.IBPluginDependency - 144.ImportedFromIB2 - 145.IBPluginDependency - 145.ImportedFromIB2 - 149.IBPluginDependency - 149.ImportedFromIB2 - 150.IBPluginDependency - 150.ImportedFromIB2 - 157.IBPluginDependency - 157.ImportedFromIB2 - 163.IBPluginDependency - 163.ImportedFromIB2 - 169.IBEditorWindowLastContentRect - 169.IBPluginDependency - 169.ImportedFromIB2 - 169.editorWindowContentRectSynchronizationRect - 19.IBPluginDependency - 19.ImportedFromIB2 - 196.ImportedFromIB2 - 200295.IBPluginDependency - 200295.IBShouldRemoveOnLegacySave - 203.IBPluginDependency - 203.ImportedFromIB2 - 204.IBPluginDependency - 204.ImportedFromIB2 - 23.IBPluginDependency - 23.ImportedFromIB2 - 24.IBEditorWindowLastContentRect - 24.IBPluginDependency - 24.ImportedFromIB2 - 24.editorWindowContentRectSynchronizationRect - 244.IBEditorWindowLastContentRect - 244.IBPluginDependency - 244.IBWindowTemplateEditedContentRect - 244.ImportedFromIB2 - 244.editorWindowContentRectSynchronizationRect - 244.windowTemplate.hasMaxSize - 244.windowTemplate.hasMinSize - 244.windowTemplate.maxSize - 244.windowTemplate.minSize - 245.IBPluginDependency - 245.ImportedFromIB2 - 269.IBPluginDependency - 269.ImportedFromIB2 - 270.IBEditorWindowLastContentRect - 270.IBPluginDependency - 270.ImportedFromIB2 - 270.editorWindowContentRectSynchronizationRect - 272.IBPluginDependency - 272.ImportedFromIB2 - 285.IBEditorWindowLastContentRect - 285.IBPluginDependency - 285.IBViewEditorWindowController.showingBoundsRectangles - 285.IBViewEditorWindowController.showingLayoutRectangles - 285.IBWindowTemplateEditedContentRect - 285.ImportedFromIB2 - 285.editorWindowContentRectSynchronizationRect - 285.windowTemplate.hasMaxSize - 285.windowTemplate.hasMinSize - 285.windowTemplate.maxSize - 285.windowTemplate.minSize - 286.IBPluginDependency - 286.ImportedFromIB2 - 29.IBEditorWindowLastContentRect - 29.IBPluginDependency - 29.ImportedFromIB2 - 29.editorWindowContentRectSynchronizationRect - 292.IBPluginDependency - 292.ImportedFromIB2 - 293.IBPluginDependency - 293.ImportedFromIB2 - 295.IBPluginDependency - 295.ImportedFromIB2 - 296.IBPluginDependency - 296.ImportedFromIB2 - 297.IBPluginDependency - 297.ImportedFromIB2 - 298.IBPluginDependency - 298.ImportedFromIB2 - 300295.IBPluginDependency - 300295.IBShouldRemoveOnLegacySave - 300337.IBPluginDependency - 300337.ImportedFromIB2 - 300338.IBPluginDependency - 300338.ImportedFromIB2 - 300358.IBPluginDependency - 300358.ImportedFromIB2 - 300359.IBPluginDependency - 300359.ImportedFromIB2 - 300360.IBPluginDependency - 300361.IBPluginDependency - 300362.IBPluginDependency - 300362.ImportedFromIB2 - 300363.IBPluginDependency - 300364.IBPluginDependency - 300364.ImportedFromIB2 - 300365.IBPluginDependency - 300368.IBPluginDependency - 300368.ImportedFromIB2 - 300369.IBPluginDependency - 300370.IBPluginDependency - 300370.ImportedFromIB2 - 300371.IBPluginDependency - 300421.IBPluginDependency - 300421.ImportedFromIB2 - 300422.IBPluginDependency - 300422.ImportedFromIB2 - 300423.IBPluginDependency - 300423.ImportedFromIB2 - 300424.IBPluginDependency - 300424.ImportedFromIB2 - 300440.IBPluginDependency - 300441.IBPluginDependency - 300447.IBPluginDependency - 300447.ImportedFromIB2 - 300450.IBPluginDependency - 300451.IBPluginDependency - 300451.ImportedFromIB2 - 300452.IBPluginDependency - 300453.IBPluginDependency - 300453.ImportedFromIB2 - 300454.IBPluginDependency - 300455.IBPluginDependency - 300455.ImportedFromIB2 - 300456.IBPluginDependency - 300457.IBPluginDependency - 300457.ImportedFromIB2 - 300458.IBPluginDependency - 300459.IBPluginDependency - 300459.ImportedFromIB2 - 300460.IBPluginDependency - 300472.IBPluginDependency - 300472.ImportedFromIB2 - 300473.IBPluginDependency - 305.IBPluginDependency - 305.ImportedFromIB2 - 310.IBPluginDependency - 310.ImportedFromIB2 - 348.IBPluginDependency - 348.ImportedFromIB2 - 349.IBPluginDependency - 349.ImportedFromIB2 - 350.IBPluginDependency - 350.ImportedFromIB2 - 351.IBPluginDependency - 351.ImportedFromIB2 - 352.IBPluginDependency - 352.ImportedFromIB2 - 353.IBPluginDependency - 353.ImportedFromIB2 - 354.IBPluginDependency - 354.ImportedFromIB2 - 363.IBPluginDependency - 363.ImportedFromIB2 - 364.IBPluginDependency - 364.ImportedFromIB2 - 365.IBPluginDependency - 365.ImportedFromIB2 - 368.IBPluginDependency - 368.ImportedFromIB2 - 369.IBPluginDependency - 369.ImportedFromIB2 - 370.IBPluginDependency - 370.ImportedFromIB2 - 371.IBPluginDependency - 371.ImportedFromIB2 - 372.IBPluginDependency - 372.ImportedFromIB2 - 374.IBPluginDependency - 374.ImportedFromIB2 - 375.IBPluginDependency - 375.ImportedFromIB2 - 376.IBPluginDependency - 376.ImportedFromIB2 - 377.IBPluginDependency - 377.ImportedFromIB2 - 379.IBPluginDependency - 379.ImportedFromIB2 - 380.IBPluginDependency - 380.ImportedFromIB2 - 381.IBPluginDependency - 381.ImportedFromIB2 - 382.IBPluginDependency - 382.ImportedFromIB2 - 383.IBPluginDependency - 383.ImportedFromIB2 - 384.IBPluginDependency - 384.ImportedFromIB2 - 385.IBPluginDependency - 385.ImportedFromIB2 - 386.IBPluginDependency - 386.ImportedFromIB2 - 419.IBPluginDependency - 419.ImportedFromIB2 - 420.IBPluginDependency - 420.ImportedFromIB2 - 421.IBPluginDependency - 421.ImportedFromIB2 - 423.IBPluginDependency - 423.ImportedFromIB2 - 435.IBPluginDependency - 435.ImportedFromIB2 - 5.IBPluginDependency - 5.ImportedFromIB2 - 524.IBPluginDependency - 524.ImportedFromIB2 - 526.IBPluginDependency - 526.ImportedFromIB2 - 527.IBPluginDependency - 527.ImportedFromIB2 - 532.IBPluginDependency - 532.ImportedFromIB2 - 533.IBPluginDependency - 533.ImportedFromIB2 - 535.IBPluginDependency - 535.ImportedFromIB2 - 536.IBPluginDependency - 536.ImportedFromIB2 - 537.IBPluginDependency - 537.ImportedFromIB2 - 538.IBPluginDependency - 538.ImportedFromIB2 - 541.IBPluginDependency - 541.ImportedFromIB2 - 543.IBPluginDependency - 543.ImportedFromIB2 - 544.IBPluginDependency - 544.ImportedFromIB2 - 545.IBPluginDependency - 545.ImportedFromIB2 - 56.IBPluginDependency - 56.ImportedFromIB2 - 57.IBEditorWindowLastContentRect - 57.IBPluginDependency - 57.ImportedFromIB2 - 57.editorWindowContentRectSynchronizationRect - 573.IBPluginDependency - 573.ImportedFromIB2 - 574.IBPluginDependency - 574.ImportedFromIB2 - 575.IBPluginDependency - 575.ImportedFromIB2 - 58.IBPluginDependency - 58.ImportedFromIB2 - 92.IBPluginDependency - 92.ImportedFromIB2 - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{168, 821}, {113, 23}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{202, 626}, {154, 153}} - com.apple.InterfaceBuilder.CocoaPlugin - - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{349, 868}, {315, 143}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{271, 666}, {301, 153}} - {{437, 749}, {484, 308}} - com.apple.InterfaceBuilder.CocoaPlugin - {{437, 749}, {484, 308}} - - {{184, 290}, {481, 345}} - - - {3.40282e+38, 3.40282e+38} - {320, 240} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{58, 803}, {155, 33}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{100, 746}, {155, 33}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{68, 585}, {454, 271}} - com.apple.InterfaceBuilder.CocoaPlugin - - - {{68, 585}, {454, 271}} - - {{433, 406}, {486, 327}} - - - {3.40282e+38, 3.40282e+38} - {320, 240} - com.apple.InterfaceBuilder.CocoaPlugin - - {{145, 1011}, {336, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{67, 819}, {336, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{20, 641}, {218, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{79, 616}, {218, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - - - - YES - - - YES - + + 300476 + + + + + + + + 300477 + + + + + + + + 300478 + + + + + 300479 + + + + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{168, 821}, {113, 23}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{202, 626}, {154, 153}} + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{349, 868}, {315, 143}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{271, 666}, {301, 153}} + {{507, 548}, {484, 308}} + com.apple.InterfaceBuilder.CocoaPlugin + {{507, 548}, {484, 308}} + + {{184, 290}, {481, 345}} + + + {3.40282e+38, 3.40282e+38} + {320, 240} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{58, 803}, {155, 33}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{100, 746}, {155, 33}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{68, 585}, {485, 271}} + com.apple.InterfaceBuilder.CocoaPlugin + + + {{68, 585}, {485, 271}} + + {{433, 406}, {486, 327}} + + + {3.40282e+38, 3.40282e+38} + {320, 240} + com.apple.InterfaceBuilder.CocoaPlugin + + {{145, 1011}, {336, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{67, 819}, {336, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{20, 641}, {218, 203}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{79, 616}, {218, 203}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + - - YES - - - YES - - + - 300475 + 300481 - - YES + FirstResponder NSObject @@ -3894,19 +3584,21 @@ IMOlIGFrdGl2ZXJlIGRlbiBtaWR0cmUgZWxsZXIgaMO4eXJlIG11c2VrbmFwcGVuLgo - + 0 + IBCocoaFramework com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - - com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 - + YES ../X11.xcodeproj 3 + + {9, 8} + {7, 2} + {15, 15} + diff --git a/xserver/hw/xquartz/bundle/Resources/pl.lproj/locversion.plist b/xserver/hw/xquartz/bundle/Resources/pl.lproj/locversion.plist index 90966d8d7..6dc0d45c1 100644 --- a/xserver/hw/xquartz/bundle/Resources/pl.lproj/locversion.plist +++ b/xserver/hw/xquartz/bundle/Resources/pl.lproj/locversion.plist @@ -3,12 +3,12 @@ LprojCompatibleVersion - 93 + 97 LprojLocale pl LprojRevisionLevel 1 LprojVersion - 93 + 97 diff --git a/xserver/hw/xquartz/bundle/Resources/pl.lproj/main.nib/designable.nib b/xserver/hw/xquartz/bundle/Resources/pl.lproj/main.nib/designable.nib index 1428ba68d..dca6bb2bf 100644 --- a/xserver/hw/xquartz/bundle/Resources/pl.lproj/main.nib/designable.nib +++ b/xserver/hw/xquartz/bundle/Resources/pl.lproj/main.nib/designable.nib @@ -1,7 +1,7 @@ - + - 1050 + 1040 11A79a 732 1059 @@ -10,24 +10,12 @@ com.apple.InterfaceBuilder.CocoaPlugin 732 - - YES - - - YES + + com.apple.InterfaceBuilder.CocoaPlugin - - - YES - - YES - - - YES - - - - YES + + + NSApplication @@ -41,8 +29,7 @@ MainMenu - - YES + X11 @@ -60,8 +47,7 @@ submenuAction: X11 - - YES + X11… @@ -101,9 +87,7 @@ submenuAction: Usługi - - YES - + _NSServicesMenu @@ -187,7 +171,7 @@ - + _NSAppleMenu @@ -202,8 +186,7 @@ submenuAction: Programy - - YES + YES @@ -224,7 +207,7 @@ - + @@ -238,8 +221,7 @@ submenuAction: Edycja - - YES + Kopiuj @@ -249,7 +231,7 @@ - + @@ -263,8 +245,7 @@ submenuAction: Okno - - YES + Zamknij @@ -305,7 +286,7 @@ - Przełączaj pomiędzy oknami + Przełączaj między oknami ` 1048576 2147483647 @@ -341,7 +322,7 @@ - + _NSWindowsMenu @@ -356,8 +337,7 @@ submenuAction: Pomoc - - YES + Pomoc X11 @@ -367,10 +347,10 @@ - + - + _NSMainMenu @@ -391,15 +371,13 @@ 256 - - YES + 256 {{13, 10}, {558, 292}} - - YES + 1 @@ -407,8 +385,7 @@ 256 - - YES + 256 @@ -427,7 +404,7 @@ 1211912703 2 - + NSImage NSSwitch @@ -443,7 +420,7 @@ 256 - {{86, 48}, {385, 31}} + {{86, 58}, {385, 31}} YES @@ -480,7 +457,7 @@ 256 - {{86, 162}, {385, 42}} + {{86, 170}, {374, 34}} YES @@ -498,7 +475,7 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 256 - {{68, 85}, {402, 18}} + {{68, 92}, {402, 18}} YES @@ -509,7 +486,7 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 1211912703 2 - + @@ -520,7 +497,7 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 256 - {{86, 109}, {385, 31}} + {{86, 118}, {385, 31}} YES @@ -537,7 +514,7 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 256 - {{68, 146}, {402, 18}} + {{68, 151}, {402, 18}} YES @@ -548,7 +525,7 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 1211912703 2 - + @@ -556,7 +533,45 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 25 - + + + 256 + {{86, -1}, {385, 31}} + + YES + + 67239424 + 4194304 + Naciśnięcie klawisza Opcja spowoduje wysłanie symboli klawiszy X11 Alt_L i Alt_R X11, a nie Mode_switch. + + + + + + + + + 256 + {{68, 36}, {402, 18}} + + YES + + 67239424 + 0 + Klawisze Opcja działają jak prawy i lewy klawisz Alt + + + 1211912703 + 2 + + + + + 200 + 25 + + + {{10, 33}, {538, 246}} @@ -571,8 +586,7 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 256 - - YES + 256 @@ -587,7 +601,7 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 1211912703 2 - + @@ -654,8 +668,7 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg OtherViews - - YES + @@ -693,7 +706,7 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 24 - + 3 YES @@ -710,7 +723,7 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 67239424 4194304 - S29sb3J5Ogo + Kolory: @@ -749,7 +762,7 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 1211912703 2 - + @@ -771,7 +784,7 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 1211912703 2 - + @@ -796,7 +809,7 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg - + {{10, 33}, {538, 246}} Wyjście @@ -810,8 +823,7 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 256 - - YES + 256 @@ -826,7 +838,7 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 1211912703 2 - + @@ -864,7 +876,7 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 1211912703 2 - + @@ -886,7 +898,7 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 1211912703 2 - + @@ -908,7 +920,7 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 1211912703 2 - + @@ -930,7 +942,7 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 1211912703 2 - + @@ -970,7 +982,7 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg - + {{10, 33}, {538, 246}} Schowek @@ -984,8 +996,7 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 256 - - YES + 256 @@ -1000,7 +1011,7 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 1211912703 2 - + @@ -1039,7 +1050,7 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 1211912703 2 - + @@ -1078,7 +1089,7 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 1211912703 2 - + @@ -1103,7 +1114,7 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg - + {{10, 33}, {538, 246}} Okna @@ -1114,8 +1125,7 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 256 - - YES + 256 @@ -1130,7 +1140,7 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 1211912703 2 - + @@ -1152,7 +1162,7 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 1211912703 2 - + @@ -1211,25 +1221,24 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg - + {{10, 33}, {538, 246}} Zabezpieczenia - + 0 YES YES - - YES + - + - + {584, 308} {{0, 0}, {1440, 878}} @@ -1252,8 +1261,7 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 256 - - YES + 265 @@ -1307,13 +1315,11 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 274 - - YES + 2304 - - YES + 256 @@ -1333,8 +1339,7 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg {{302, 0}, {16, 17}} - - YES + 122.73100280761719 62.730998992919922 @@ -1346,7 +1351,7 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 3 - MC4zMzMzMzI5OQA + MC4zMzMzMzI5ODU2AA 6 @@ -1445,7 +1450,7 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg - + 3 2 @@ -1468,7 +1473,7 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg YES 0 - + {{1, 17}, {301, 198}} @@ -1483,7 +1488,7 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg _doScroller: - 0.99492380000000002 + 0.99492377042770386 @@ -1493,15 +1498,14 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 1 _doScroller: - 0.68852460000000004 + 0.68852460384368896 2304 - - YES + - + {{1, 0}, {301, 17}} @@ -1510,7 +1514,7 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 4 - + {{20, 20}, {318, 231}} @@ -1545,7 +1549,7 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 25 - + {454, 271} {{0, 0}, {1440, 878}} @@ -1555,8 +1559,7 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg Menu - - YES + YES @@ -1579,8 +1582,7 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg submenuAction: Programy - - YES + YES @@ -1601,16 +1603,15 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg - + - + - + - - YES + copy: @@ -2155,13 +2156,28 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 300475 - + + + prefs_changed: + + + + 300480 + + + + option_sends_alt + + + + 300481 + + - - YES + 0 - + @@ -2186,31 +2202,28 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 29 - - YES + - + MainMenu 19 - - YES + - + 24 - - YES + @@ -2219,7 +2232,7 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg - + @@ -2265,17 +2278,15 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 56 - - YES + - + 57 - - YES + @@ -2288,7 +2299,7 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg - + @@ -2304,10 +2315,9 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 131 - - YES + - + @@ -2363,19 +2373,17 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 163 - - YES + - + 169 - - YES + - + @@ -2386,20 +2394,18 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 269 - - YES + - + 270 - - YES + - + @@ -2415,19 +2421,17 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 419 - - YES + - + 420 - - YES + - + @@ -2444,126 +2448,115 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 244 - - YES + - + PrefsPanel 245 - - YES + - + 348 - - YES + - + 349 - - YES + - + 351 - - YES + - + + + 363 - - YES + - + 364 - - YES + - + 365 - - YES + - + 368 - - YES + - + 369 - - YES + - + 370 - - YES + - + 352 - - YES + - + 350 - - YES + @@ -2572,169 +2565,152 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg - + 371 - - YES + - + 372 - - YES + - + 382 - - YES + - + 385 - - YES + - + 386 - - YES + - + 541 - - YES + - + 543 - - YES + - + 353 - - YES + - + 354 - - YES + - + 374 - - YES + - + 375 - - YES + - + 376 - - YES + - + 377 - - YES + - + 379 - - YES + - + 285 - - YES + - + EditPrograms 286 - - YES + - + 423 - - YES + - + DockMenu @@ -2746,20 +2722,18 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 526 - - YES + - + 527 - - YES + - + @@ -2815,10 +2789,9 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 100382 - - YES + - + @@ -2869,13 +2842,12 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 380 - - YES + - + @@ -2901,13 +2873,12 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 295 - - YES + - + @@ -2928,21 +2899,19 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 296 - - YES + - + 535 - - YES + - + @@ -2953,10 +2922,9 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 298 - - YES + - + @@ -2967,10 +2935,9 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 297 - - YES + - + @@ -2981,10 +2948,9 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 310 - - YES + - + @@ -2995,10 +2961,9 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 292 - - YES + - + @@ -3009,10 +2974,9 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 293 - - YES + - + @@ -3023,42 +2987,38 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 300337 - - YES + - + 300338 - - YES + - + 300358 - - YES + - + 300359 - - YES + - + @@ -3074,10 +3034,9 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 300362 - - YES + - + @@ -3088,10 +3047,9 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 300364 - - YES + - + @@ -3102,10 +3060,9 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 300368 - - YES + - + @@ -3116,10 +3073,9 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 300370 - - YES + - + @@ -3130,17 +3086,15 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 300421 - - YES + - + 300422 - - YES + @@ -3149,25 +3103,23 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg - + 300423 - - YES + - + 300424 - - YES + - + @@ -3183,10 +3135,9 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 300447 - - YES + - + @@ -3197,10 +3148,9 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 300451 - - YES + - + @@ -3211,10 +3161,9 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 300453 - - YES + - + @@ -3225,10 +3174,9 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 300455 - - YES + - + @@ -3239,10 +3187,9 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 300457 - - YES + - + @@ -3253,10 +3200,9 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 300459 - - YES + - + @@ -3267,10 +3213,9 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg 300472 - - YES + - + @@ -3278,604 +3223,339 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg - - - - YES - - YES - -3.IBPluginDependency - -3.ImportedFromIB2 - 100292.IBPluginDependency - 100293.IBPluginDependency - 100295.IBPluginDependency - 100295.IBShouldRemoveOnLegacySave - 100310.IBPluginDependency - 100363.IBPluginDependency - 100364.IBPluginDependency - 100365.IBPluginDependency - 100368.IBPluginDependency - 100369.IBPluginDependency - 100370.IBPluginDependency - 100371.IBPluginDependency - 100372.IBPluginDependency - 100374.IBPluginDependency - 100375.IBPluginDependency - 100376.IBPluginDependency - 100377.IBPluginDependency - 100379.IBPluginDependency - 100382.IBPluginDependency - 100385.IBPluginDependency - 100386.IBPluginDependency - 100541.IBPluginDependency - 100543.IBPluginDependency - 129.IBPluginDependency - 129.ImportedFromIB2 - 130.IBPluginDependency - 130.ImportedFromIB2 - 131.IBPluginDependency - 131.ImportedFromIB2 - 134.IBPluginDependency - 134.ImportedFromIB2 - 136.IBPluginDependency - 136.ImportedFromIB2 - 143.IBPluginDependency - 143.ImportedFromIB2 - 144.IBPluginDependency - 144.ImportedFromIB2 - 145.IBPluginDependency - 145.ImportedFromIB2 - 149.IBPluginDependency - 149.ImportedFromIB2 - 150.IBPluginDependency - 150.ImportedFromIB2 - 157.IBPluginDependency - 157.ImportedFromIB2 - 163.IBPluginDependency - 163.ImportedFromIB2 - 169.IBEditorWindowLastContentRect - 169.IBPluginDependency - 169.ImportedFromIB2 - 169.editorWindowContentRectSynchronizationRect - 19.IBPluginDependency - 19.ImportedFromIB2 - 196.ImportedFromIB2 - 200295.IBPluginDependency - 200295.IBShouldRemoveOnLegacySave - 203.IBPluginDependency - 203.ImportedFromIB2 - 204.IBPluginDependency - 204.ImportedFromIB2 - 23.IBPluginDependency - 23.ImportedFromIB2 - 24.IBEditorWindowLastContentRect - 24.IBPluginDependency - 24.ImportedFromIB2 - 24.editorWindowContentRectSynchronizationRect - 244.IBEditorWindowLastContentRect - 244.IBPluginDependency - 244.IBWindowTemplateEditedContentRect - 244.ImportedFromIB2 - 244.editorWindowContentRectSynchronizationRect - 244.windowTemplate.hasMaxSize - 244.windowTemplate.hasMinSize - 244.windowTemplate.maxSize - 244.windowTemplate.minSize - 245.IBPluginDependency - 245.ImportedFromIB2 - 269.IBPluginDependency - 269.ImportedFromIB2 - 270.IBEditorWindowLastContentRect - 270.IBPluginDependency - 270.ImportedFromIB2 - 270.editorWindowContentRectSynchronizationRect - 272.IBPluginDependency - 272.ImportedFromIB2 - 285.IBEditorWindowLastContentRect - 285.IBPluginDependency - 285.IBViewEditorWindowController.showingBoundsRectangles - 285.IBViewEditorWindowController.showingLayoutRectangles - 285.IBWindowTemplateEditedContentRect - 285.ImportedFromIB2 - 285.editorWindowContentRectSynchronizationRect - 285.windowTemplate.hasMaxSize - 285.windowTemplate.hasMinSize - 285.windowTemplate.maxSize - 285.windowTemplate.minSize - 286.IBPluginDependency - 286.ImportedFromIB2 - 29.IBEditorWindowLastContentRect - 29.IBPluginDependency - 29.ImportedFromIB2 - 29.editorWindowContentRectSynchronizationRect - 292.IBPluginDependency - 292.ImportedFromIB2 - 293.IBPluginDependency - 293.ImportedFromIB2 - 295.IBPluginDependency - 295.ImportedFromIB2 - 296.IBPluginDependency - 296.ImportedFromIB2 - 297.IBPluginDependency - 297.ImportedFromIB2 - 298.IBPluginDependency - 298.ImportedFromIB2 - 300295.IBPluginDependency - 300295.IBShouldRemoveOnLegacySave - 300337.IBPluginDependency - 300337.ImportedFromIB2 - 300338.IBPluginDependency - 300338.ImportedFromIB2 - 300358.IBPluginDependency - 300358.ImportedFromIB2 - 300359.IBPluginDependency - 300359.ImportedFromIB2 - 300360.IBPluginDependency - 300361.IBPluginDependency - 300362.IBPluginDependency - 300362.ImportedFromIB2 - 300363.IBPluginDependency - 300364.IBPluginDependency - 300364.ImportedFromIB2 - 300365.IBPluginDependency - 300368.IBPluginDependency - 300368.ImportedFromIB2 - 300369.IBPluginDependency - 300370.IBPluginDependency - 300370.ImportedFromIB2 - 300371.IBPluginDependency - 300421.IBPluginDependency - 300421.ImportedFromIB2 - 300422.IBPluginDependency - 300422.ImportedFromIB2 - 300423.IBPluginDependency - 300423.ImportedFromIB2 - 300424.IBPluginDependency - 300424.ImportedFromIB2 - 300440.IBPluginDependency - 300441.IBPluginDependency - 300447.IBPluginDependency - 300447.ImportedFromIB2 - 300450.IBPluginDependency - 300451.IBPluginDependency - 300451.ImportedFromIB2 - 300452.IBPluginDependency - 300453.IBPluginDependency - 300453.ImportedFromIB2 - 300454.IBPluginDependency - 300455.IBPluginDependency - 300455.ImportedFromIB2 - 300456.IBPluginDependency - 300457.IBPluginDependency - 300457.ImportedFromIB2 - 300458.IBPluginDependency - 300459.IBPluginDependency - 300459.ImportedFromIB2 - 300460.IBPluginDependency - 300472.IBPluginDependency - 300472.ImportedFromIB2 - 300473.IBPluginDependency - 305.IBPluginDependency - 305.ImportedFromIB2 - 310.IBPluginDependency - 310.ImportedFromIB2 - 348.IBPluginDependency - 348.ImportedFromIB2 - 349.IBPluginDependency - 349.ImportedFromIB2 - 350.IBPluginDependency - 350.ImportedFromIB2 - 351.IBPluginDependency - 351.ImportedFromIB2 - 352.IBPluginDependency - 352.ImportedFromIB2 - 353.IBPluginDependency - 353.ImportedFromIB2 - 354.IBPluginDependency - 354.ImportedFromIB2 - 363.IBPluginDependency - 363.ImportedFromIB2 - 364.IBPluginDependency - 364.ImportedFromIB2 - 365.IBPluginDependency - 365.ImportedFromIB2 - 368.IBPluginDependency - 368.ImportedFromIB2 - 369.IBPluginDependency - 369.ImportedFromIB2 - 370.IBPluginDependency - 370.ImportedFromIB2 - 371.IBPluginDependency - 371.ImportedFromIB2 - 372.IBPluginDependency - 372.ImportedFromIB2 - 374.IBPluginDependency - 374.ImportedFromIB2 - 375.IBPluginDependency - 375.ImportedFromIB2 - 376.IBPluginDependency - 376.ImportedFromIB2 - 377.IBPluginDependency - 377.ImportedFromIB2 - 379.IBPluginDependency - 379.ImportedFromIB2 - 380.IBPluginDependency - 380.ImportedFromIB2 - 381.IBPluginDependency - 381.ImportedFromIB2 - 382.IBPluginDependency - 382.ImportedFromIB2 - 383.IBPluginDependency - 383.ImportedFromIB2 - 384.IBPluginDependency - 384.ImportedFromIB2 - 385.IBPluginDependency - 385.ImportedFromIB2 - 386.IBPluginDependency - 386.ImportedFromIB2 - 419.IBPluginDependency - 419.ImportedFromIB2 - 420.IBPluginDependency - 420.ImportedFromIB2 - 421.IBPluginDependency - 421.ImportedFromIB2 - 423.IBPluginDependency - 423.ImportedFromIB2 - 435.IBPluginDependency - 435.ImportedFromIB2 - 5.IBPluginDependency - 5.ImportedFromIB2 - 524.IBPluginDependency - 524.ImportedFromIB2 - 526.IBPluginDependency - 526.ImportedFromIB2 - 527.IBPluginDependency - 527.ImportedFromIB2 - 532.IBPluginDependency - 532.ImportedFromIB2 - 533.IBPluginDependency - 533.ImportedFromIB2 - 535.IBPluginDependency - 535.ImportedFromIB2 - 536.IBPluginDependency - 536.ImportedFromIB2 - 537.IBPluginDependency - 537.ImportedFromIB2 - 538.IBPluginDependency - 538.ImportedFromIB2 - 541.IBPluginDependency - 541.ImportedFromIB2 - 543.IBPluginDependency - 543.ImportedFromIB2 - 544.IBPluginDependency - 544.ImportedFromIB2 - 545.IBPluginDependency - 545.ImportedFromIB2 - 56.IBPluginDependency - 56.ImportedFromIB2 - 57.IBEditorWindowLastContentRect - 57.IBPluginDependency - 57.ImportedFromIB2 - 57.editorWindowContentRectSynchronizationRect - 573.IBPluginDependency - 573.ImportedFromIB2 - 574.IBPluginDependency - 574.ImportedFromIB2 - 575.IBPluginDependency - 575.ImportedFromIB2 - 58.IBPluginDependency - 58.ImportedFromIB2 - 92.IBPluginDependency - 92.ImportedFromIB2 - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{168, 821}, {113, 23}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{202, 626}, {154, 153}} - com.apple.InterfaceBuilder.CocoaPlugin - - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{349, 868}, {315, 143}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{271, 666}, {301, 153}} - {{437, 749}, {484, 308}} - com.apple.InterfaceBuilder.CocoaPlugin - {{437, 749}, {484, 308}} - - {{184, 290}, {481, 345}} - - - {3.40282e+38, 3.40282e+38} - {320, 240} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{58, 803}, {155, 33}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{100, 746}, {155, 33}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{68, 585}, {454, 271}} - com.apple.InterfaceBuilder.CocoaPlugin - - - {{68, 585}, {454, 271}} - - {{433, 406}, {486, 327}} - - - {3.40282e+38, 3.40282e+38} - {320, 240} - com.apple.InterfaceBuilder.CocoaPlugin - - {{145, 1011}, {336, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{67, 819}, {336, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{20, 641}, {218, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{79, 616}, {218, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - - - - YES - - - YES - + + 300476 + + + + + + + + 300477 + + + + + + + + 300478 + + + + + 300479 + + + + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{168, 821}, {113, 23}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{202, 626}, {154, 153}} + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{349, 868}, {315, 143}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{271, 666}, {301, 153}} + {{507, 548}, {584, 308}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{507, 548}, {584, 308}} + + {{184, 290}, {481, 345}} + + + {3.40282e+38, 3.40282e+38} + {320, 240} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{58, 803}, {155, 33}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{100, 746}, {155, 33}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{68, 585}, {454, 271}} + com.apple.InterfaceBuilder.CocoaPlugin + + + {{68, 585}, {454, 271}} + + {{433, 406}, {486, 327}} + + + {3.40282e+38, 3.40282e+38} + {320, 240} + com.apple.InterfaceBuilder.CocoaPlugin + + {{145, 1011}, {336, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{67, 819}, {336, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{20, 641}, {218, 203}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{79, 616}, {218, 203}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + - - YES - - - YES - - + - 300475 + 300481 - - YES + FirstResponder NSObject @@ -3900,16 +3580,12 @@ dWplIMWbcm9ka293eSBsdWIgcHJhd3kgcHJ6eWNpc2sgbXlzenkuCg - + 0 com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - - com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 - + YES ../X11.xcodeproj diff --git a/xserver/hw/xquartz/bundle/Resources/pt.lproj/locversion.plist b/xserver/hw/xquartz/bundle/Resources/pt.lproj/locversion.plist index 9c2dbad4b..3b46498b4 100644 --- a/xserver/hw/xquartz/bundle/Resources/pt.lproj/locversion.plist +++ b/xserver/hw/xquartz/bundle/Resources/pt.lproj/locversion.plist @@ -3,12 +3,12 @@ LprojCompatibleVersion - 93 + 97 LprojLocale pt LprojRevisionLevel 1 LprojVersion - 93 + 97 diff --git a/xserver/hw/xquartz/bundle/Resources/pt.lproj/main.nib/designable.nib b/xserver/hw/xquartz/bundle/Resources/pt.lproj/main.nib/designable.nib index 7d11f48eb..ea9f5f321 100644 --- a/xserver/hw/xquartz/bundle/Resources/pt.lproj/main.nib/designable.nib +++ b/xserver/hw/xquartz/bundle/Resources/pt.lproj/main.nib/designable.nib @@ -1,7 +1,7 @@ - + - 1050 + 1040 11A79a 732 1059 @@ -10,24 +10,12 @@ com.apple.InterfaceBuilder.CocoaPlugin 732 - - YES - - - YES + + com.apple.InterfaceBuilder.CocoaPlugin - - - YES - - YES - - - YES - - - - YES + + + NSApplication @@ -41,8 +29,7 @@ MainMenu - - YES + X11 @@ -60,8 +47,7 @@ submenuAction: X11 - - YES + Sobre o X11 @@ -101,9 +87,7 @@ submenuAction: Serviços - - YES - + _NSServicesMenu @@ -187,7 +171,7 @@ - + _NSAppleMenu @@ -202,8 +186,7 @@ submenuAction: Aplicativos - - YES + YES @@ -224,7 +207,7 @@ - + @@ -238,8 +221,7 @@ submenuAction: Editar - - YES + Copiar @@ -249,7 +231,7 @@ - + @@ -263,8 +245,7 @@ submenuAction: Janela - - YES + Fechar @@ -341,7 +322,7 @@ - + _NSWindowsMenu @@ -356,8 +337,7 @@ submenuAction: Ajuda - - YES + Ajuda X11 @@ -367,10 +347,10 @@ - + - + _NSMainMenu @@ -391,15 +371,13 @@ 256 - - YES + 256 {{13, 10}, {618, 292}} - - YES + 1 @@ -407,8 +385,7 @@ 256 - - YES + 256 @@ -427,7 +404,7 @@ 1211912703 2 - + NSImage NSSwitch @@ -510,7 +487,7 @@ ZS4KA 1211912703 2 - + @@ -549,7 +526,7 @@ ZS4KA 1211912703 2 - + @@ -557,7 +534,45 @@ ZS4KA 25 - + + + 256 + {{36, -1}, {385, 31}} + + YES + + 67239424 + 4194304 + Quando esta opção está marcada, as teclas opção enviam os símbolos de tecla do X11 Alt_L e Alt_R em vez de Mode_switch. + + + + + + + + + 256 + {{18, 36}, {402, 18}} + + YES + + 67239424 + 0 + As teclas Opção enviam Alt_L e Alt_R + + + 1211912703 + 2 + + + + + 200 + 25 + + + {{10, 33}, {598, 246}} @@ -572,8 +587,7 @@ ZS4KA 256 - - YES + 256 @@ -588,7 +602,7 @@ ZS4KA 1211912703 2 - + @@ -655,8 +669,7 @@ ZS4KA OtherViews - - YES + @@ -694,7 +707,7 @@ ZS4KA 24 - + 3 YES @@ -711,7 +724,7 @@ ZS4KA 67239424 4194304 - Q29yZXM6Cg + Cores: @@ -750,7 +763,7 @@ ZS4KA 1211912703 2 - + @@ -772,7 +785,7 @@ ZS4KA 1211912703 2 - + @@ -797,7 +810,7 @@ ZS4KA - + {{10, 33}, {598, 246}} Saída @@ -811,8 +824,7 @@ ZS4KA 256 - - YES + 256 @@ -827,7 +839,7 @@ ZS4KA 1211912703 2 - + @@ -865,7 +877,7 @@ ZS4KA 1211912703 2 - + @@ -887,7 +899,7 @@ ZS4KA 1211912703 2 - + @@ -909,7 +921,7 @@ ZS4KA 1211912703 2 - + @@ -931,7 +943,7 @@ ZS4KA 1211912703 2 - + @@ -971,7 +983,7 @@ ZS4KA - + {{10, 33}, {598, 246}} Área de Colagem @@ -985,8 +997,7 @@ ZS4KA 256 - - YES + 256 @@ -1001,7 +1012,7 @@ ZS4KA 1211912703 2 - + @@ -1039,7 +1050,7 @@ ZS4KA 1211912703 2 - + @@ -1077,7 +1088,7 @@ ZS4KA 1211912703 2 - + @@ -1101,7 +1112,7 @@ ZS4KA - + {{10, 33}, {598, 246}} Janelas @@ -1112,8 +1123,7 @@ ZS4KA 256 - - YES + 256 @@ -1128,7 +1138,7 @@ ZS4KA 1211912703 2 - + @@ -1150,7 +1160,7 @@ ZS4KA 1211912703 2 - + @@ -1209,25 +1219,24 @@ ZS4KA - + {{10, 33}, {598, 246}} Segurança - + 0 YES YES - - YES + - + - + {644, 308} {{0, 0}, {1280, 938}} @@ -1250,8 +1259,7 @@ ZS4KA 256 - - YES + 265 @@ -1305,13 +1313,11 @@ ZS4KA 274 - - YES + 2304 - - YES + 256 @@ -1331,8 +1337,7 @@ ZS4KA {{334, 0}, {16, 17}} - - YES + 132.73099999999999 62.731000000000002 @@ -1440,7 +1445,7 @@ ZS4KA YES - + 3 2 @@ -1463,7 +1468,7 @@ ZS4KA YES 0 - + {{1, 17}, {333, 198}} @@ -1493,10 +1498,9 @@ ZS4KA 2304 - - YES + - + {{1, 0}, {333, 17}} @@ -1505,7 +1509,7 @@ ZS4KA 4 - + {{20, 20}, {350, 231}} @@ -1540,7 +1544,7 @@ ZS4KA 25 - + {519, 271} {{0, 0}, {1280, 938}} @@ -1550,8 +1554,7 @@ ZS4KA Menu - - YES + YES @@ -1574,8 +1577,7 @@ ZS4KA submenuAction: Aplicativos - - YES + YES @@ -1596,16 +1598,15 @@ ZS4KA - + - + - + - - YES + copy: @@ -2150,13 +2151,28 @@ ZS4KA 300475 - + + + prefs_changed: + + + + 300480 + + + + option_sends_alt + + + + 300481 + + - - YES + 0 - + @@ -2181,31 +2197,28 @@ ZS4KA 29 - - YES + - + MainMenu 19 - - YES + - + 24 - - YES + @@ -2214,7 +2227,7 @@ ZS4KA - + @@ -2260,17 +2273,15 @@ ZS4KA 56 - - YES + - + 57 - - YES + @@ -2283,7 +2294,7 @@ ZS4KA - + @@ -2299,10 +2310,9 @@ ZS4KA 131 - - YES + - + @@ -2358,19 +2368,17 @@ ZS4KA 163 - - YES + - + 169 - - YES + - + @@ -2381,20 +2389,18 @@ ZS4KA 269 - - YES + - + 270 - - YES + - + @@ -2410,19 +2416,17 @@ ZS4KA 419 - - YES + - + 420 - - YES + - + @@ -2439,126 +2443,115 @@ ZS4KA 244 - - YES + - + PrefsPanel 245 - - YES + - + 348 - - YES + - + 349 - - YES + - + 351 - - YES + - + + + 363 - - YES + - + 364 - - YES + - + 365 - - YES + - + 368 - - YES + - + 369 - - YES + - + 370 - - YES + - + 352 - - YES + - + 350 - - YES + @@ -2567,169 +2560,152 @@ ZS4KA - + 371 - - YES + - + 372 - - YES + - + 382 - - YES + - + 385 - - YES + - + 386 - - YES + - + 541 - - YES + - + 543 - - YES + - + 353 - - YES + - + 354 - - YES + - + 374 - - YES + - + 375 - - YES + - + 376 - - YES + - + 377 - - YES + - + 379 - - YES + - + 285 - - YES + - + EditPrograms 286 - - YES + - + 423 - - YES + - + DockMenu @@ -2741,20 +2717,18 @@ ZS4KA 526 - - YES + - + 527 - - YES + - + @@ -2810,10 +2784,9 @@ ZS4KA 100382 - - YES + - + @@ -2864,13 +2837,12 @@ ZS4KA 380 - - YES + - + @@ -2896,13 +2868,12 @@ ZS4KA 295 - - YES + - + @@ -2923,21 +2894,19 @@ ZS4KA 296 - - YES + - + 535 - - YES + - + @@ -2948,10 +2917,9 @@ ZS4KA 298 - - YES + - + @@ -2962,10 +2930,9 @@ ZS4KA 297 - - YES + - + @@ -2976,10 +2943,9 @@ ZS4KA 310 - - YES + - + @@ -2990,10 +2956,9 @@ ZS4KA 292 - - YES + - + @@ -3004,10 +2969,9 @@ ZS4KA 293 - - YES + - + @@ -3018,42 +2982,38 @@ ZS4KA 300337 - - YES + - + 300338 - - YES + - + 300358 - - YES + - + 300359 - - YES + - + @@ -3069,10 +3029,9 @@ ZS4KA 300362 - - YES + - + @@ -3083,10 +3042,9 @@ ZS4KA 300364 - - YES + - + @@ -3097,10 +3055,9 @@ ZS4KA 300368 - - YES + - + @@ -3111,10 +3068,9 @@ ZS4KA 300370 - - YES + - + @@ -3125,17 +3081,15 @@ ZS4KA 300421 - - YES + - + 300422 - - YES + @@ -3144,25 +3098,23 @@ ZS4KA - + 300423 - - YES + - + 300424 - - YES + - + @@ -3178,10 +3130,9 @@ ZS4KA 300447 - - YES + - + @@ -3192,10 +3143,9 @@ ZS4KA 300451 - - YES + - + @@ -3206,10 +3156,9 @@ ZS4KA 300453 - - YES + - + @@ -3220,10 +3169,9 @@ ZS4KA 300455 - - YES + - + @@ -3234,10 +3182,9 @@ ZS4KA 300457 - - YES + - + @@ -3248,10 +3195,9 @@ ZS4KA 300459 - - YES + - + @@ -3262,10 +3208,9 @@ ZS4KA 300472 - - YES + - + @@ -3273,604 +3218,333 @@ ZS4KA - - - - YES - - YES - -3.IBPluginDependency - -3.ImportedFromIB2 - 100292.IBPluginDependency - 100293.IBPluginDependency - 100295.IBPluginDependency - 100295.IBShouldRemoveOnLegacySave - 100310.IBPluginDependency - 100363.IBPluginDependency - 100364.IBPluginDependency - 100365.IBPluginDependency - 100368.IBPluginDependency - 100369.IBPluginDependency - 100370.IBPluginDependency - 100371.IBPluginDependency - 100372.IBPluginDependency - 100374.IBPluginDependency - 100375.IBPluginDependency - 100376.IBPluginDependency - 100377.IBPluginDependency - 100379.IBPluginDependency - 100382.IBPluginDependency - 100385.IBPluginDependency - 100386.IBPluginDependency - 100541.IBPluginDependency - 100543.IBPluginDependency - 129.IBPluginDependency - 129.ImportedFromIB2 - 130.IBPluginDependency - 130.ImportedFromIB2 - 131.IBPluginDependency - 131.ImportedFromIB2 - 134.IBPluginDependency - 134.ImportedFromIB2 - 136.IBPluginDependency - 136.ImportedFromIB2 - 143.IBPluginDependency - 143.ImportedFromIB2 - 144.IBPluginDependency - 144.ImportedFromIB2 - 145.IBPluginDependency - 145.ImportedFromIB2 - 149.IBPluginDependency - 149.ImportedFromIB2 - 150.IBPluginDependency - 150.ImportedFromIB2 - 157.IBPluginDependency - 157.ImportedFromIB2 - 163.IBPluginDependency - 163.ImportedFromIB2 - 169.IBEditorWindowLastContentRect - 169.IBPluginDependency - 169.ImportedFromIB2 - 169.editorWindowContentRectSynchronizationRect - 19.IBPluginDependency - 19.ImportedFromIB2 - 196.ImportedFromIB2 - 200295.IBPluginDependency - 200295.IBShouldRemoveOnLegacySave - 203.IBPluginDependency - 203.ImportedFromIB2 - 204.IBPluginDependency - 204.ImportedFromIB2 - 23.IBPluginDependency - 23.ImportedFromIB2 - 24.IBEditorWindowLastContentRect - 24.IBPluginDependency - 24.ImportedFromIB2 - 24.editorWindowContentRectSynchronizationRect - 244.IBEditorWindowLastContentRect - 244.IBPluginDependency - 244.IBWindowTemplateEditedContentRect - 244.ImportedFromIB2 - 244.editorWindowContentRectSynchronizationRect - 244.windowTemplate.hasMaxSize - 244.windowTemplate.hasMinSize - 244.windowTemplate.maxSize - 244.windowTemplate.minSize - 245.IBPluginDependency - 245.ImportedFromIB2 - 269.IBPluginDependency - 269.ImportedFromIB2 - 270.IBEditorWindowLastContentRect - 270.IBPluginDependency - 270.ImportedFromIB2 - 270.editorWindowContentRectSynchronizationRect - 272.IBPluginDependency - 272.ImportedFromIB2 - 285.IBEditorWindowLastContentRect - 285.IBPluginDependency - 285.IBViewEditorWindowController.showingBoundsRectangles - 285.IBViewEditorWindowController.showingLayoutRectangles - 285.IBWindowTemplateEditedContentRect - 285.ImportedFromIB2 - 285.editorWindowContentRectSynchronizationRect - 285.windowTemplate.hasMaxSize - 285.windowTemplate.hasMinSize - 285.windowTemplate.maxSize - 285.windowTemplate.minSize - 286.IBPluginDependency - 286.ImportedFromIB2 - 29.IBEditorWindowLastContentRect - 29.IBPluginDependency - 29.ImportedFromIB2 - 29.editorWindowContentRectSynchronizationRect - 292.IBPluginDependency - 292.ImportedFromIB2 - 293.IBPluginDependency - 293.ImportedFromIB2 - 295.IBPluginDependency - 295.ImportedFromIB2 - 296.IBPluginDependency - 296.ImportedFromIB2 - 297.IBPluginDependency - 297.ImportedFromIB2 - 298.IBPluginDependency - 298.ImportedFromIB2 - 300295.IBPluginDependency - 300295.IBShouldRemoveOnLegacySave - 300337.IBPluginDependency - 300337.ImportedFromIB2 - 300338.IBPluginDependency - 300338.ImportedFromIB2 - 300358.IBPluginDependency - 300358.ImportedFromIB2 - 300359.IBPluginDependency - 300359.ImportedFromIB2 - 300360.IBPluginDependency - 300361.IBPluginDependency - 300362.IBPluginDependency - 300362.ImportedFromIB2 - 300363.IBPluginDependency - 300364.IBPluginDependency - 300364.ImportedFromIB2 - 300365.IBPluginDependency - 300368.IBPluginDependency - 300368.ImportedFromIB2 - 300369.IBPluginDependency - 300370.IBPluginDependency - 300370.ImportedFromIB2 - 300371.IBPluginDependency - 300421.IBPluginDependency - 300421.ImportedFromIB2 - 300422.IBPluginDependency - 300422.ImportedFromIB2 - 300423.IBPluginDependency - 300423.ImportedFromIB2 - 300424.IBPluginDependency - 300424.ImportedFromIB2 - 300440.IBPluginDependency - 300441.IBPluginDependency - 300447.IBPluginDependency - 300447.ImportedFromIB2 - 300450.IBPluginDependency - 300451.IBPluginDependency - 300451.ImportedFromIB2 - 300452.IBPluginDependency - 300453.IBPluginDependency - 300453.ImportedFromIB2 - 300454.IBPluginDependency - 300455.IBPluginDependency - 300455.ImportedFromIB2 - 300456.IBPluginDependency - 300457.IBPluginDependency - 300457.ImportedFromIB2 - 300458.IBPluginDependency - 300459.IBPluginDependency - 300459.ImportedFromIB2 - 300460.IBPluginDependency - 300472.IBPluginDependency - 300472.ImportedFromIB2 - 300473.IBPluginDependency - 305.IBPluginDependency - 305.ImportedFromIB2 - 310.IBPluginDependency - 310.ImportedFromIB2 - 348.IBPluginDependency - 348.ImportedFromIB2 - 349.IBPluginDependency - 349.ImportedFromIB2 - 350.IBPluginDependency - 350.ImportedFromIB2 - 351.IBPluginDependency - 351.ImportedFromIB2 - 352.IBPluginDependency - 352.ImportedFromIB2 - 353.IBPluginDependency - 353.ImportedFromIB2 - 354.IBPluginDependency - 354.ImportedFromIB2 - 363.IBPluginDependency - 363.ImportedFromIB2 - 364.IBPluginDependency - 364.ImportedFromIB2 - 365.IBPluginDependency - 365.ImportedFromIB2 - 368.IBPluginDependency - 368.ImportedFromIB2 - 369.IBPluginDependency - 369.ImportedFromIB2 - 370.IBPluginDependency - 370.ImportedFromIB2 - 371.IBPluginDependency - 371.ImportedFromIB2 - 372.IBPluginDependency - 372.ImportedFromIB2 - 374.IBPluginDependency - 374.ImportedFromIB2 - 375.IBPluginDependency - 375.ImportedFromIB2 - 376.IBPluginDependency - 376.ImportedFromIB2 - 377.IBPluginDependency - 377.ImportedFromIB2 - 379.IBPluginDependency - 379.ImportedFromIB2 - 380.IBPluginDependency - 380.ImportedFromIB2 - 381.IBPluginDependency - 381.ImportedFromIB2 - 382.IBPluginDependency - 382.ImportedFromIB2 - 383.IBPluginDependency - 383.ImportedFromIB2 - 384.IBPluginDependency - 384.ImportedFromIB2 - 385.IBPluginDependency - 385.ImportedFromIB2 - 386.IBPluginDependency - 386.ImportedFromIB2 - 419.IBPluginDependency - 419.ImportedFromIB2 - 420.IBPluginDependency - 420.ImportedFromIB2 - 421.IBPluginDependency - 421.ImportedFromIB2 - 423.IBPluginDependency - 423.ImportedFromIB2 - 435.IBPluginDependency - 435.ImportedFromIB2 - 5.IBPluginDependency - 5.ImportedFromIB2 - 524.IBPluginDependency - 524.ImportedFromIB2 - 526.IBPluginDependency - 526.ImportedFromIB2 - 527.IBPluginDependency - 527.ImportedFromIB2 - 532.IBPluginDependency - 532.ImportedFromIB2 - 533.IBPluginDependency - 533.ImportedFromIB2 - 535.IBPluginDependency - 535.ImportedFromIB2 - 536.IBPluginDependency - 536.ImportedFromIB2 - 537.IBPluginDependency - 537.ImportedFromIB2 - 538.IBPluginDependency - 538.ImportedFromIB2 - 541.IBPluginDependency - 541.ImportedFromIB2 - 543.IBPluginDependency - 543.ImportedFromIB2 - 544.IBPluginDependency - 544.ImportedFromIB2 - 545.IBPluginDependency - 545.ImportedFromIB2 - 56.IBPluginDependency - 56.ImportedFromIB2 - 57.IBEditorWindowLastContentRect - 57.IBPluginDependency - 57.ImportedFromIB2 - 57.editorWindowContentRectSynchronizationRect - 573.IBPluginDependency - 573.ImportedFromIB2 - 574.IBPluginDependency - 574.ImportedFromIB2 - 575.IBPluginDependency - 575.ImportedFromIB2 - 58.IBPluginDependency - 58.ImportedFromIB2 - 92.IBPluginDependency - 92.ImportedFromIB2 - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{168, 821}, {113, 23}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{202, 626}, {154, 153}} - com.apple.InterfaceBuilder.CocoaPlugin - - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{349, 868}, {315, 143}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{271, 666}, {301, 153}} - {{437, 749}, {484, 308}} - com.apple.InterfaceBuilder.CocoaPlugin - {{437, 749}, {484, 308}} - - {{184, 290}, {481, 345}} - - - {3.40282e+38, 3.40282e+38} - {320, 240} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{58, 803}, {155, 33}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{100, 746}, {155, 33}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{68, 585}, {454, 271}} - com.apple.InterfaceBuilder.CocoaPlugin - - - {{68, 585}, {454, 271}} - - {{433, 406}, {486, 327}} - - - {3.40282e+38, 3.40282e+38} - {320, 240} - com.apple.InterfaceBuilder.CocoaPlugin - - {{145, 1011}, {336, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{67, 819}, {336, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{20, 641}, {218, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{79, 616}, {218, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - - - - YES - - - YES - + + 300476 + + + + + + + + 300477 + + + + + + + + 300478 + + + + + 300479 + + + + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{168, 821}, {113, 23}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{202, 626}, {154, 153}} + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{349, 868}, {315, 143}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{271, 666}, {301, 153}} + {{507, 565}, {484, 308}} + com.apple.InterfaceBuilder.CocoaPlugin + {{507, 565}, {484, 308}} + + {{184, 290}, {481, 345}} + + + {3.40282e+38, 3.40282e+38} + {320, 240} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{58, 803}, {155, 33}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{100, 746}, {155, 33}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{68, 585}, {454, 271}} + com.apple.InterfaceBuilder.CocoaPlugin + + + {{68, 585}, {454, 271}} + + {{433, 406}, {486, 327}} + + + {3.40282e+38, 3.40282e+38} + {320, 240} + com.apple.InterfaceBuilder.CocoaPlugin + + {{145, 1011}, {336, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{67, 819}, {336, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{20, 641}, {218, 203}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{79, 616}, {218, 203}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + - - YES - - - YES - - + - 300475 + 300481 - - YES + FirstResponder NSObject @@ -3895,16 +3569,12 @@ ZS4KA - + 0 com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - - com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 - + YES ../X11.xcodeproj diff --git a/xserver/hw/xquartz/bundle/Resources/pt_PT.lproj/locversion.plist b/xserver/hw/xquartz/bundle/Resources/pt_PT.lproj/locversion.plist index 42ca3d2ff..cf6548ad2 100644 --- a/xserver/hw/xquartz/bundle/Resources/pt_PT.lproj/locversion.plist +++ b/xserver/hw/xquartz/bundle/Resources/pt_PT.lproj/locversion.plist @@ -3,12 +3,12 @@ LprojCompatibleVersion - 93 + 97 LprojLocale pt_PT LprojRevisionLevel 1 LprojVersion - 93 + 97 diff --git a/xserver/hw/xquartz/bundle/Resources/pt_PT.lproj/main.nib/designable.nib b/xserver/hw/xquartz/bundle/Resources/pt_PT.lproj/main.nib/designable.nib index d2b7c017c..710d9eaa8 100644 --- a/xserver/hw/xquartz/bundle/Resources/pt_PT.lproj/main.nib/designable.nib +++ b/xserver/hw/xquartz/bundle/Resources/pt_PT.lproj/main.nib/designable.nib @@ -1,7 +1,7 @@ - + - 1050 + 1040 11A79a 732 1059 @@ -10,24 +10,12 @@ com.apple.InterfaceBuilder.CocoaPlugin 732 - - YES - - - YES + + com.apple.InterfaceBuilder.CocoaPlugin - - - YES - - YES - - - YES - - - - YES + + + NSApplication @@ -41,8 +29,7 @@ MainMenu - - YES + X11 @@ -60,8 +47,7 @@ submenuAction: X11 - - YES + Acerca do X11 @@ -101,9 +87,7 @@ submenuAction: Serviços - - YES - + _NSServicesMenu @@ -187,7 +171,7 @@ - + _NSAppleMenu @@ -202,8 +186,7 @@ submenuAction: Aplicações - - YES + YES @@ -224,7 +207,7 @@ - + @@ -238,8 +221,7 @@ submenuAction: Edição - - YES + Copiar @@ -249,7 +231,7 @@ - + @@ -263,8 +245,7 @@ submenuAction: Janela - - YES + Fechar @@ -341,7 +322,7 @@ - + _NSWindowsMenu @@ -356,8 +337,7 @@ submenuAction: Ajuda - - YES + Ajuda do X11 @@ -367,10 +347,10 @@ - + - + _NSMainMenu @@ -391,15 +371,13 @@ 256 - - YES + 256 {{13, 10}, {607, 292}} - - YES + 1 @@ -407,8 +385,7 @@ 256 - - YES + 256 @@ -427,7 +404,7 @@ 1211912703 2 - + NSImage NSSwitch @@ -509,7 +486,7 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 1211912703 2 - + @@ -548,7 +525,7 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 1211912703 2 - + @@ -556,7 +533,45 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 25 - + + + 256 + {{36, -1}, {385, 31}} + + YES + + 67239424 + 4194304 + Quando activadas, as teclas de opção enviam símbolos de teclas X11 Alt_L e Alt_R em vez de alternar_modo. + + + + + + + + + 256 + {{18, 36}, {402, 18}} + + YES + + 67239424 + 0 + As teclas de opção enviam Alt_L e Alt_R + + + 1211912703 + 2 + + + + + 200 + 25 + + + {{10, 33}, {587, 246}} @@ -571,8 +586,7 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 256 - - YES + 256 @@ -587,7 +601,7 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 1211912703 2 - + @@ -654,8 +668,7 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo OtherViews - - YES + @@ -693,7 +706,7 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 24 - + 3 YES @@ -710,7 +723,7 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 67239424 4194304 - Q29yZXM6Cg + Cores: @@ -749,7 +762,7 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 1211912703 2 - + @@ -771,7 +784,7 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 1211912703 2 - + @@ -796,7 +809,7 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo - + {{10, 33}, {587, 246}} Saída @@ -810,8 +823,7 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 256 - - YES + 256 @@ -826,7 +838,7 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 1211912703 2 - + @@ -864,7 +876,7 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 1211912703 2 - + @@ -886,7 +898,7 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 1211912703 2 - + @@ -908,7 +920,7 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 1211912703 2 - + @@ -930,7 +942,7 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 1211912703 2 - + @@ -970,7 +982,7 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo - + {{10, 33}, {587, 246}} Área de colagem @@ -984,8 +996,7 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 256 - - YES + 256 @@ -1000,7 +1011,7 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 1211912703 2 - + @@ -1038,7 +1049,7 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 1211912703 2 - + @@ -1076,7 +1087,7 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 1211912703 2 - + @@ -1100,7 +1111,7 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo - + {{10, 33}, {587, 246}} Janelas @@ -1111,8 +1122,7 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 256 - - YES + 256 @@ -1127,7 +1137,7 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 1211912703 2 - + @@ -1149,7 +1159,7 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 1211912703 2 - + @@ -1208,25 +1218,24 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo - + {{10, 33}, {587, 246}} Segurança - + 0 YES YES - - YES + - + - + {633, 308} {{0, 0}, {1440, 878}} @@ -1249,8 +1258,7 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 256 - - YES + 265 @@ -1304,13 +1312,11 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 274 - - YES + 2304 - - YES + 256 @@ -1330,8 +1336,7 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo {{280, 0}, {16, 17}} - - YES + 99.731002807617188 62.730998992919922 @@ -1439,7 +1444,7 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo YES - + 3 2 @@ -1462,7 +1467,7 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo YES 0 - + {{1, 17}, {279, 198}} @@ -1492,10 +1497,9 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 2304 - - YES + - + {{1, 0}, {279, 17}} @@ -1504,7 +1508,7 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 4 - + {{20, 20}, {296, 231}} @@ -1539,7 +1543,7 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 25 - + {477, 271} {{0, 0}, {1440, 878}} @@ -1549,8 +1553,7 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo Menu - - YES + YES @@ -1573,8 +1576,7 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo submenuAction: Aplicações - - YES + YES @@ -1595,16 +1597,15 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo - + - + - + - - YES + copy: @@ -2149,13 +2150,28 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 300475 - + + + prefs_changed: + + + + 300480 + + + + option_sends_alt + + + + 300481 + + - - YES + 0 - + @@ -2180,31 +2196,28 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 29 - - YES + - + MainMenu 19 - - YES + - + 24 - - YES + @@ -2213,7 +2226,7 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo - + @@ -2259,17 +2272,15 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 56 - - YES + - + 57 - - YES + @@ -2282,7 +2293,7 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo - + @@ -2298,10 +2309,9 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 131 - - YES + - + @@ -2357,19 +2367,17 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 163 - - YES + - + 169 - - YES + - + @@ -2380,20 +2388,18 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 269 - - YES + - + 270 - - YES + - + @@ -2409,19 +2415,17 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 419 - - YES + - + 420 - - YES + - + @@ -2438,126 +2442,115 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 244 - - YES + - + PrefsPanel 245 - - YES + - + 348 - - YES + - + 349 - - YES + - + 351 - - YES + - + + + 363 - - YES + - + 364 - - YES + - + 365 - - YES + - + 368 - - YES + - + 369 - - YES + - + 370 - - YES + - + 352 - - YES + - + 350 - - YES + @@ -2566,169 +2559,152 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo - + 371 - - YES + - + 372 - - YES + - + 382 - - YES + - + 385 - - YES + - + 386 - - YES + - + 541 - - YES + - + 543 - - YES + - + 353 - - YES + - + 354 - - YES + - + 374 - - YES + - + 375 - - YES + - + 376 - - YES + - + 377 - - YES + - + 379 - - YES + - + 285 - - YES + - + EditPrograms 286 - - YES + - + 423 - - YES + - + DockMenu @@ -2740,20 +2716,18 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 526 - - YES + - + 527 - - YES + - + @@ -2809,10 +2783,9 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 100382 - - YES + - + @@ -2863,13 +2836,12 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 380 - - YES + - + @@ -2895,13 +2867,12 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 295 - - YES + - + @@ -2922,21 +2893,19 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 296 - - YES + - + 535 - - YES + - + @@ -2947,10 +2916,9 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 298 - - YES + - + @@ -2961,10 +2929,9 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 297 - - YES + - + @@ -2975,10 +2942,9 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 310 - - YES + - + @@ -2989,10 +2955,9 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 292 - - YES + - + @@ -3003,10 +2968,9 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 293 - - YES + - + @@ -3017,42 +2981,38 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 300337 - - YES + - + 300338 - - YES + - + 300358 - - YES + - + 300359 - - YES + - + @@ -3068,10 +3028,9 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 300362 - - YES + - + @@ -3082,10 +3041,9 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 300364 - - YES + - + @@ -3096,10 +3054,9 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 300368 - - YES + - + @@ -3110,10 +3067,9 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 300370 - - YES + - + @@ -3124,17 +3080,15 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 300421 - - YES + - + 300422 - - YES + @@ -3143,25 +3097,23 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo - + 300423 - - YES + - + 300424 - - YES + - + @@ -3177,10 +3129,9 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 300447 - - YES + - + @@ -3191,10 +3142,9 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 300451 - - YES + - + @@ -3205,10 +3155,9 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 300453 - - YES + - + @@ -3219,10 +3168,9 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 300455 - - YES + - + @@ -3233,10 +3181,9 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 300457 - - YES + - + @@ -3247,10 +3194,9 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 300459 - - YES + - + @@ -3261,10 +3207,9 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo 300472 - - YES + - + @@ -3272,604 +3217,333 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo - - - - YES - - YES - -3.IBPluginDependency - -3.ImportedFromIB2 - 100292.IBPluginDependency - 100293.IBPluginDependency - 100295.IBPluginDependency - 100295.IBShouldRemoveOnLegacySave - 100310.IBPluginDependency - 100363.IBPluginDependency - 100364.IBPluginDependency - 100365.IBPluginDependency - 100368.IBPluginDependency - 100369.IBPluginDependency - 100370.IBPluginDependency - 100371.IBPluginDependency - 100372.IBPluginDependency - 100374.IBPluginDependency - 100375.IBPluginDependency - 100376.IBPluginDependency - 100377.IBPluginDependency - 100379.IBPluginDependency - 100382.IBPluginDependency - 100385.IBPluginDependency - 100386.IBPluginDependency - 100541.IBPluginDependency - 100543.IBPluginDependency - 129.IBPluginDependency - 129.ImportedFromIB2 - 130.IBPluginDependency - 130.ImportedFromIB2 - 131.IBPluginDependency - 131.ImportedFromIB2 - 134.IBPluginDependency - 134.ImportedFromIB2 - 136.IBPluginDependency - 136.ImportedFromIB2 - 143.IBPluginDependency - 143.ImportedFromIB2 - 144.IBPluginDependency - 144.ImportedFromIB2 - 145.IBPluginDependency - 145.ImportedFromIB2 - 149.IBPluginDependency - 149.ImportedFromIB2 - 150.IBPluginDependency - 150.ImportedFromIB2 - 157.IBPluginDependency - 157.ImportedFromIB2 - 163.IBPluginDependency - 163.ImportedFromIB2 - 169.IBEditorWindowLastContentRect - 169.IBPluginDependency - 169.ImportedFromIB2 - 169.editorWindowContentRectSynchronizationRect - 19.IBPluginDependency - 19.ImportedFromIB2 - 196.ImportedFromIB2 - 200295.IBPluginDependency - 200295.IBShouldRemoveOnLegacySave - 203.IBPluginDependency - 203.ImportedFromIB2 - 204.IBPluginDependency - 204.ImportedFromIB2 - 23.IBPluginDependency - 23.ImportedFromIB2 - 24.IBEditorWindowLastContentRect - 24.IBPluginDependency - 24.ImportedFromIB2 - 24.editorWindowContentRectSynchronizationRect - 244.IBEditorWindowLastContentRect - 244.IBPluginDependency - 244.IBWindowTemplateEditedContentRect - 244.ImportedFromIB2 - 244.editorWindowContentRectSynchronizationRect - 244.windowTemplate.hasMaxSize - 244.windowTemplate.hasMinSize - 244.windowTemplate.maxSize - 244.windowTemplate.minSize - 245.IBPluginDependency - 245.ImportedFromIB2 - 269.IBPluginDependency - 269.ImportedFromIB2 - 270.IBEditorWindowLastContentRect - 270.IBPluginDependency - 270.ImportedFromIB2 - 270.editorWindowContentRectSynchronizationRect - 272.IBPluginDependency - 272.ImportedFromIB2 - 285.IBEditorWindowLastContentRect - 285.IBPluginDependency - 285.IBViewEditorWindowController.showingBoundsRectangles - 285.IBViewEditorWindowController.showingLayoutRectangles - 285.IBWindowTemplateEditedContentRect - 285.ImportedFromIB2 - 285.editorWindowContentRectSynchronizationRect - 285.windowTemplate.hasMaxSize - 285.windowTemplate.hasMinSize - 285.windowTemplate.maxSize - 285.windowTemplate.minSize - 286.IBPluginDependency - 286.ImportedFromIB2 - 29.IBEditorWindowLastContentRect - 29.IBPluginDependency - 29.ImportedFromIB2 - 29.editorWindowContentRectSynchronizationRect - 292.IBPluginDependency - 292.ImportedFromIB2 - 293.IBPluginDependency - 293.ImportedFromIB2 - 295.IBPluginDependency - 295.ImportedFromIB2 - 296.IBPluginDependency - 296.ImportedFromIB2 - 297.IBPluginDependency - 297.ImportedFromIB2 - 298.IBPluginDependency - 298.ImportedFromIB2 - 300295.IBPluginDependency - 300295.IBShouldRemoveOnLegacySave - 300337.IBPluginDependency - 300337.ImportedFromIB2 - 300338.IBPluginDependency - 300338.ImportedFromIB2 - 300358.IBPluginDependency - 300358.ImportedFromIB2 - 300359.IBPluginDependency - 300359.ImportedFromIB2 - 300360.IBPluginDependency - 300361.IBPluginDependency - 300362.IBPluginDependency - 300362.ImportedFromIB2 - 300363.IBPluginDependency - 300364.IBPluginDependency - 300364.ImportedFromIB2 - 300365.IBPluginDependency - 300368.IBPluginDependency - 300368.ImportedFromIB2 - 300369.IBPluginDependency - 300370.IBPluginDependency - 300370.ImportedFromIB2 - 300371.IBPluginDependency - 300421.IBPluginDependency - 300421.ImportedFromIB2 - 300422.IBPluginDependency - 300422.ImportedFromIB2 - 300423.IBPluginDependency - 300423.ImportedFromIB2 - 300424.IBPluginDependency - 300424.ImportedFromIB2 - 300440.IBPluginDependency - 300441.IBPluginDependency - 300447.IBPluginDependency - 300447.ImportedFromIB2 - 300450.IBPluginDependency - 300451.IBPluginDependency - 300451.ImportedFromIB2 - 300452.IBPluginDependency - 300453.IBPluginDependency - 300453.ImportedFromIB2 - 300454.IBPluginDependency - 300455.IBPluginDependency - 300455.ImportedFromIB2 - 300456.IBPluginDependency - 300457.IBPluginDependency - 300457.ImportedFromIB2 - 300458.IBPluginDependency - 300459.IBPluginDependency - 300459.ImportedFromIB2 - 300460.IBPluginDependency - 300472.IBPluginDependency - 300472.ImportedFromIB2 - 300473.IBPluginDependency - 305.IBPluginDependency - 305.ImportedFromIB2 - 310.IBPluginDependency - 310.ImportedFromIB2 - 348.IBPluginDependency - 348.ImportedFromIB2 - 349.IBPluginDependency - 349.ImportedFromIB2 - 350.IBPluginDependency - 350.ImportedFromIB2 - 351.IBPluginDependency - 351.ImportedFromIB2 - 352.IBPluginDependency - 352.ImportedFromIB2 - 353.IBPluginDependency - 353.ImportedFromIB2 - 354.IBPluginDependency - 354.ImportedFromIB2 - 363.IBPluginDependency - 363.ImportedFromIB2 - 364.IBPluginDependency - 364.ImportedFromIB2 - 365.IBPluginDependency - 365.ImportedFromIB2 - 368.IBPluginDependency - 368.ImportedFromIB2 - 369.IBPluginDependency - 369.ImportedFromIB2 - 370.IBPluginDependency - 370.ImportedFromIB2 - 371.IBPluginDependency - 371.ImportedFromIB2 - 372.IBPluginDependency - 372.ImportedFromIB2 - 374.IBPluginDependency - 374.ImportedFromIB2 - 375.IBPluginDependency - 375.ImportedFromIB2 - 376.IBPluginDependency - 376.ImportedFromIB2 - 377.IBPluginDependency - 377.ImportedFromIB2 - 379.IBPluginDependency - 379.ImportedFromIB2 - 380.IBPluginDependency - 380.ImportedFromIB2 - 381.IBPluginDependency - 381.ImportedFromIB2 - 382.IBPluginDependency - 382.ImportedFromIB2 - 383.IBPluginDependency - 383.ImportedFromIB2 - 384.IBPluginDependency - 384.ImportedFromIB2 - 385.IBPluginDependency - 385.ImportedFromIB2 - 386.IBPluginDependency - 386.ImportedFromIB2 - 419.IBPluginDependency - 419.ImportedFromIB2 - 420.IBPluginDependency - 420.ImportedFromIB2 - 421.IBPluginDependency - 421.ImportedFromIB2 - 423.IBPluginDependency - 423.ImportedFromIB2 - 435.IBPluginDependency - 435.ImportedFromIB2 - 5.IBPluginDependency - 5.ImportedFromIB2 - 524.IBPluginDependency - 524.ImportedFromIB2 - 526.IBPluginDependency - 526.ImportedFromIB2 - 527.IBPluginDependency - 527.ImportedFromIB2 - 532.IBPluginDependency - 532.ImportedFromIB2 - 533.IBPluginDependency - 533.ImportedFromIB2 - 535.IBPluginDependency - 535.ImportedFromIB2 - 536.IBPluginDependency - 536.ImportedFromIB2 - 537.IBPluginDependency - 537.ImportedFromIB2 - 538.IBPluginDependency - 538.ImportedFromIB2 - 541.IBPluginDependency - 541.ImportedFromIB2 - 543.IBPluginDependency - 543.ImportedFromIB2 - 544.IBPluginDependency - 544.ImportedFromIB2 - 545.IBPluginDependency - 545.ImportedFromIB2 - 56.IBPluginDependency - 56.ImportedFromIB2 - 57.IBEditorWindowLastContentRect - 57.IBPluginDependency - 57.ImportedFromIB2 - 57.editorWindowContentRectSynchronizationRect - 573.IBPluginDependency - 573.ImportedFromIB2 - 574.IBPluginDependency - 574.ImportedFromIB2 - 575.IBPluginDependency - 575.ImportedFromIB2 - 58.IBPluginDependency - 58.ImportedFromIB2 - 92.IBPluginDependency - 92.ImportedFromIB2 - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{168, 821}, {113, 23}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{202, 626}, {154, 153}} - com.apple.InterfaceBuilder.CocoaPlugin - - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{349, 868}, {315, 143}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{271, 666}, {301, 153}} - {{437, 749}, {484, 308}} - com.apple.InterfaceBuilder.CocoaPlugin - {{437, 749}, {484, 308}} - - {{184, 290}, {481, 345}} - - - {3.40282e+38, 3.40282e+38} - {320, 240} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{58, 803}, {155, 33}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{100, 746}, {155, 33}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{68, 585}, {454, 271}} - com.apple.InterfaceBuilder.CocoaPlugin - - - {{68, 585}, {454, 271}} - - {{433, 406}, {486, 327}} - - - {3.40282e+38, 3.40282e+38} - {320, 240} - com.apple.InterfaceBuilder.CocoaPlugin - - {{145, 1011}, {336, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{67, 819}, {336, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{20, 641}, {218, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{79, 616}, {218, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - - - - YES - - - YES - + + 300476 + + + + + + + + 300477 + + + + + + + + 300478 + + + + + 300479 + + + + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{168, 821}, {113, 23}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{202, 626}, {154, 153}} + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{349, 868}, {315, 143}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{271, 666}, {301, 153}} + {{507, 565}, {484, 308}} + com.apple.InterfaceBuilder.CocoaPlugin + {{507, 565}, {484, 308}} + + {{184, 290}, {481, 345}} + + + {3.40282e+38, 3.40282e+38} + {320, 240} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{58, 803}, {155, 33}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{100, 746}, {155, 33}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{68, 585}, {454, 271}} + com.apple.InterfaceBuilder.CocoaPlugin + + + {{68, 585}, {454, 271}} + + {{433, 406}, {486, 327}} + + + {3.40282e+38, 3.40282e+38} + {320, 240} + com.apple.InterfaceBuilder.CocoaPlugin + + {{145, 1011}, {336, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{67, 819}, {336, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{20, 641}, {218, 203}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{79, 616}, {218, 203}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + - - YES - - - YES - - + - 300475 + 300481 - - YES + FirstResponder NSObject @@ -3894,16 +3568,12 @@ cmEgYWN0aXZhciBvcyBib3TDtWVzIGNlbnRyYWwgb3UgZGlyZWl0byBkbyByYXRvLgo - + 0 com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - - com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 - + YES ../X11.xcodeproj diff --git a/xserver/hw/xquartz/bundle/Resources/ru.lproj/locversion.plist b/xserver/hw/xquartz/bundle/Resources/ru.lproj/locversion.plist index 6e924f4de..06b662be8 100644 --- a/xserver/hw/xquartz/bundle/Resources/ru.lproj/locversion.plist +++ b/xserver/hw/xquartz/bundle/Resources/ru.lproj/locversion.plist @@ -3,12 +3,12 @@ LprojCompatibleVersion - 93 + 97 LprojLocale ru LprojRevisionLevel 1 LprojVersion - 93 + 97 diff --git a/xserver/hw/xquartz/bundle/Resources/ru.lproj/main.nib/designable.nib b/xserver/hw/xquartz/bundle/Resources/ru.lproj/main.nib/designable.nib index c900cef44..bba4ce614 100644 --- a/xserver/hw/xquartz/bundle/Resources/ru.lproj/main.nib/designable.nib +++ b/xserver/hw/xquartz/bundle/Resources/ru.lproj/main.nib/designable.nib @@ -1,7 +1,7 @@ - + - 1050 + 1040 11A79a 732 1059 @@ -10,24 +10,12 @@ com.apple.InterfaceBuilder.CocoaPlugin 732 - - YES - - - YES + + com.apple.InterfaceBuilder.CocoaPlugin - - - YES - - YES - - - YES - - - - YES + + + NSApplication @@ -41,8 +29,7 @@ MainMenu - - YES + X11 @@ -60,8 +47,7 @@ submenuAction: X11 - - YES + О программе X11 @@ -101,9 +87,7 @@ submenuAction: Службы - - YES - + _NSServicesMenu @@ -187,7 +171,7 @@ - + _NSAppleMenu @@ -202,8 +186,7 @@ submenuAction: Программы - - YES + YES @@ -224,7 +207,7 @@ - + @@ -238,8 +221,7 @@ submenuAction: Правка - - YES + Копировать @@ -249,7 +231,7 @@ - + @@ -263,8 +245,7 @@ submenuAction: Окно - - YES + Закрыть @@ -305,7 +286,7 @@ - Последовательное переключение окон + Круговое переключение окон ` 1048576 2147483647 @@ -314,7 +295,7 @@ - Обратное последовательное переключение окон + Обратное круговое переключение окон ` 1179648 2147483647 @@ -334,14 +315,14 @@ - Все окна – на передний план + Все окна - на передний план 1048576 2147483647 - + _NSWindowsMenu @@ -356,8 +337,7 @@ submenuAction: Справка - - YES + Справка X11 @@ -367,10 +347,10 @@ - + - + _NSMainMenu @@ -391,15 +371,13 @@ 256 - - YES + 256 {{13, 10}, {578, 292}} - - YES + 1 @@ -407,8 +385,7 @@ 256 - - YES + 256 @@ -427,7 +404,7 @@ 1211912703 2 - + NSImage NSSwitch @@ -510,7 +487,7 @@ 1211912703 2 - + @@ -549,7 +526,7 @@ 1211912703 2 - + @@ -557,7 +534,45 @@ 25 - + + + 256 + {{62, -1}, {385, 31}} + + YES + + 67239424 + 4194304 + Если включено, клавиши Option отправляют символы X11 клавиш Alt_L и Alt_R X11, вместо Mode_switch. + + + + + + + + + 256 + {{44, 36}, {402, 18}} + + YES + + 67239424 + 0 + Клавиши Option отправляют Alt_L и Alt_R + + + 1211912703 + 2 + + + + + 200 + 25 + + + {{10, 33}, {558, 246}} @@ -572,8 +587,7 @@ 256 - - YES + 256 @@ -588,7 +602,7 @@ 1211912703 2 - + @@ -655,8 +669,7 @@ OtherViews - - YES + @@ -694,7 +707,7 @@ 24 - + 3 YES @@ -711,7 +724,7 @@ 67239424 4194304 - 0KbQstC10YLQsDoKA + Цвета: @@ -750,7 +763,7 @@ 1211912703 2 - + @@ -772,7 +785,7 @@ 1211912703 2 - + @@ -797,7 +810,7 @@ - + {{10, 33}, {558, 246}} Выход @@ -811,8 +824,7 @@ 256 - - YES + 256 @@ -827,7 +839,7 @@ 1211912703 2 - + @@ -865,7 +877,7 @@ 1211912703 2 - + @@ -887,7 +899,7 @@ 1211912703 2 - + @@ -909,7 +921,7 @@ 1211912703 2 - + @@ -931,7 +943,7 @@ 1211912703 2 - + @@ -971,7 +983,7 @@ - + {{10, 33}, {558, 246}} Буфер обмена @@ -985,8 +997,7 @@ 256 - - YES + 256 @@ -1001,7 +1012,7 @@ 1211912703 2 - + @@ -1039,7 +1050,7 @@ 1211912703 2 - + @@ -1077,7 +1088,7 @@ 1211912703 2 - + @@ -1101,7 +1112,7 @@ - + {{10, 33}, {558, 246}} Окна @@ -1112,8 +1123,7 @@ 256 - - YES + 256 @@ -1128,7 +1138,7 @@ 1211912703 2 - + @@ -1150,7 +1160,7 @@ 1211912703 2 - + @@ -1209,25 +1219,24 @@ - + {{10, 33}, {558, 246}} Безопасность - + 0 YES YES - - YES + - + - + {604, 308} {{0, 0}, {1280, 938}} @@ -1250,8 +1259,7 @@ 256 - - YES + 265 @@ -1305,13 +1313,11 @@ 274 - - YES + 2304 - - YES + 256 @@ -1331,8 +1337,7 @@ {{352, 0}, {16, 17}} - - YES + 138.73101806640625 62.730998992919922 @@ -1440,7 +1445,7 @@ YES - + 3 2 @@ -1463,7 +1468,7 @@ YES 0 - + {{1, 17}, {351, 198}} @@ -1493,10 +1498,9 @@ 2304 - - YES + - + {{1, 0}, {351, 17}} @@ -1505,7 +1509,7 @@ 4 - + {{10, 20}, {368, 231}} @@ -1540,7 +1544,7 @@ 25 - + {504, 271} {{0, 0}, {1280, 938}} @@ -1550,8 +1554,7 @@ Меню - - YES + YES @@ -1574,8 +1577,7 @@ submenuAction: Программы - - YES + YES @@ -1596,16 +1598,15 @@ - + - + - + - - YES + copy: @@ -2150,13 +2151,28 @@ 300475 - + + + prefs_changed: + + + + 300480 + + + + option_sends_alt + + + + 300481 + + - - YES + 0 - + @@ -2181,31 +2197,28 @@ 29 - - YES + - + MainMenu 19 - - YES + - + 24 - - YES + @@ -2214,7 +2227,7 @@ - + @@ -2260,17 +2273,15 @@ 56 - - YES + - + 57 - - YES + @@ -2283,7 +2294,7 @@ - + @@ -2299,10 +2310,9 @@ 131 - - YES + - + @@ -2358,19 +2368,17 @@ 163 - - YES + - + 169 - - YES + - + @@ -2381,20 +2389,18 @@ 269 - - YES + - + 270 - - YES + - + @@ -2410,19 +2416,17 @@ 419 - - YES + - + 420 - - YES + - + @@ -2439,126 +2443,115 @@ 244 - - YES + - + PrefsPanel 245 - - YES + - + 348 - - YES + - + 349 - - YES + - + 351 - - YES + - + + + 363 - - YES + - + 364 - - YES + - + 365 - - YES + - + 368 - - YES + - + 369 - - YES + - + 370 - - YES + - + 352 - - YES + - + 350 - - YES + @@ -2567,169 +2560,152 @@ - + 371 - - YES + - + 372 - - YES + - + 382 - - YES + - + 385 - - YES + - + 386 - - YES + - + 541 - - YES + - + 543 - - YES + - + 353 - - YES + - + 354 - - YES + - + 374 - - YES + - + 375 - - YES + - + 376 - - YES + - + 377 - - YES + - + 379 - - YES + - + 285 - - YES + - + EditPrograms 286 - - YES + - + 423 - - YES + - + DockMenu @@ -2741,20 +2717,18 @@ 526 - - YES + - + 527 - - YES + - + @@ -2810,10 +2784,9 @@ 100382 - - YES + - + @@ -2864,13 +2837,12 @@ 380 - - YES + - + @@ -2896,13 +2868,12 @@ 295 - - YES + - + @@ -2923,21 +2894,19 @@ 296 - - YES + - + 535 - - YES + - + @@ -2948,10 +2917,9 @@ 298 - - YES + - + @@ -2962,10 +2930,9 @@ 297 - - YES + - + @@ -2976,10 +2943,9 @@ 310 - - YES + - + @@ -2990,10 +2956,9 @@ 292 - - YES + - + @@ -3004,10 +2969,9 @@ 293 - - YES + - + @@ -3018,42 +2982,38 @@ 300337 - - YES + - + 300338 - - YES + - + 300358 - - YES + - + 300359 - - YES + - + @@ -3069,10 +3029,9 @@ 300362 - - YES + - + @@ -3083,10 +3042,9 @@ 300364 - - YES + - + @@ -3097,10 +3055,9 @@ 300368 - - YES + - + @@ -3111,10 +3068,9 @@ 300370 - - YES + - + @@ -3125,17 +3081,15 @@ 300421 - - YES + - + 300422 - - YES + @@ -3144,25 +3098,23 @@ - + 300423 - - YES + - + 300424 - - YES + - + @@ -3178,10 +3130,9 @@ 300447 - - YES + - + @@ -3192,10 +3143,9 @@ 300451 - - YES + - + @@ -3206,10 +3156,9 @@ 300453 - - YES + - + @@ -3220,10 +3169,9 @@ 300455 - - YES + - + @@ -3234,10 +3182,9 @@ 300457 - - YES + - + @@ -3248,10 +3195,9 @@ 300459 - - YES + - + @@ -3262,10 +3208,9 @@ 300472 - - YES + - + @@ -3273,604 +3218,334 @@ - - - - YES - - YES - -3.IBPluginDependency - -3.ImportedFromIB2 - 100292.IBPluginDependency - 100293.IBPluginDependency - 100295.IBPluginDependency - 100295.IBShouldRemoveOnLegacySave - 100310.IBPluginDependency - 100363.IBPluginDependency - 100364.IBPluginDependency - 100365.IBPluginDependency - 100368.IBPluginDependency - 100369.IBPluginDependency - 100370.IBPluginDependency - 100371.IBPluginDependency - 100372.IBPluginDependency - 100374.IBPluginDependency - 100375.IBPluginDependency - 100376.IBPluginDependency - 100377.IBPluginDependency - 100379.IBPluginDependency - 100382.IBPluginDependency - 100385.IBPluginDependency - 100386.IBPluginDependency - 100541.IBPluginDependency - 100543.IBPluginDependency - 129.IBPluginDependency - 129.ImportedFromIB2 - 130.IBPluginDependency - 130.ImportedFromIB2 - 131.IBPluginDependency - 131.ImportedFromIB2 - 134.IBPluginDependency - 134.ImportedFromIB2 - 136.IBPluginDependency - 136.ImportedFromIB2 - 143.IBPluginDependency - 143.ImportedFromIB2 - 144.IBPluginDependency - 144.ImportedFromIB2 - 145.IBPluginDependency - 145.ImportedFromIB2 - 149.IBPluginDependency - 149.ImportedFromIB2 - 150.IBPluginDependency - 150.ImportedFromIB2 - 157.IBPluginDependency - 157.ImportedFromIB2 - 163.IBPluginDependency - 163.ImportedFromIB2 - 169.IBEditorWindowLastContentRect - 169.IBPluginDependency - 169.ImportedFromIB2 - 169.editorWindowContentRectSynchronizationRect - 19.IBPluginDependency - 19.ImportedFromIB2 - 196.ImportedFromIB2 - 200295.IBPluginDependency - 200295.IBShouldRemoveOnLegacySave - 203.IBPluginDependency - 203.ImportedFromIB2 - 204.IBPluginDependency - 204.ImportedFromIB2 - 23.IBPluginDependency - 23.ImportedFromIB2 - 24.IBEditorWindowLastContentRect - 24.IBPluginDependency - 24.ImportedFromIB2 - 24.editorWindowContentRectSynchronizationRect - 244.IBEditorWindowLastContentRect - 244.IBPluginDependency - 244.IBWindowTemplateEditedContentRect - 244.ImportedFromIB2 - 244.editorWindowContentRectSynchronizationRect - 244.windowTemplate.hasMaxSize - 244.windowTemplate.hasMinSize - 244.windowTemplate.maxSize - 244.windowTemplate.minSize - 245.IBPluginDependency - 245.ImportedFromIB2 - 269.IBPluginDependency - 269.ImportedFromIB2 - 270.IBEditorWindowLastContentRect - 270.IBPluginDependency - 270.ImportedFromIB2 - 270.editorWindowContentRectSynchronizationRect - 272.IBPluginDependency - 272.ImportedFromIB2 - 285.IBEditorWindowLastContentRect - 285.IBPluginDependency - 285.IBViewEditorWindowController.showingBoundsRectangles - 285.IBViewEditorWindowController.showingLayoutRectangles - 285.IBWindowTemplateEditedContentRect - 285.ImportedFromIB2 - 285.editorWindowContentRectSynchronizationRect - 285.windowTemplate.hasMaxSize - 285.windowTemplate.hasMinSize - 285.windowTemplate.maxSize - 285.windowTemplate.minSize - 286.IBPluginDependency - 286.ImportedFromIB2 - 29.IBEditorWindowLastContentRect - 29.IBPluginDependency - 29.ImportedFromIB2 - 29.editorWindowContentRectSynchronizationRect - 292.IBPluginDependency - 292.ImportedFromIB2 - 293.IBPluginDependency - 293.ImportedFromIB2 - 295.IBPluginDependency - 295.ImportedFromIB2 - 296.IBPluginDependency - 296.ImportedFromIB2 - 297.IBPluginDependency - 297.ImportedFromIB2 - 298.IBPluginDependency - 298.ImportedFromIB2 - 300295.IBPluginDependency - 300295.IBShouldRemoveOnLegacySave - 300337.IBPluginDependency - 300337.ImportedFromIB2 - 300338.IBPluginDependency - 300338.ImportedFromIB2 - 300358.IBPluginDependency - 300358.ImportedFromIB2 - 300359.IBPluginDependency - 300359.ImportedFromIB2 - 300360.IBPluginDependency - 300361.IBPluginDependency - 300362.IBPluginDependency - 300362.ImportedFromIB2 - 300363.IBPluginDependency - 300364.IBPluginDependency - 300364.ImportedFromIB2 - 300365.IBPluginDependency - 300368.IBPluginDependency - 300368.ImportedFromIB2 - 300369.IBPluginDependency - 300370.IBPluginDependency - 300370.ImportedFromIB2 - 300371.IBPluginDependency - 300421.IBPluginDependency - 300421.ImportedFromIB2 - 300422.IBPluginDependency - 300422.ImportedFromIB2 - 300423.IBPluginDependency - 300423.ImportedFromIB2 - 300424.IBPluginDependency - 300424.ImportedFromIB2 - 300440.IBPluginDependency - 300441.IBPluginDependency - 300447.IBPluginDependency - 300447.ImportedFromIB2 - 300450.IBPluginDependency - 300451.IBPluginDependency - 300451.ImportedFromIB2 - 300452.IBPluginDependency - 300453.IBPluginDependency - 300453.ImportedFromIB2 - 300454.IBPluginDependency - 300455.IBPluginDependency - 300455.ImportedFromIB2 - 300456.IBPluginDependency - 300457.IBPluginDependency - 300457.ImportedFromIB2 - 300458.IBPluginDependency - 300459.IBPluginDependency - 300459.ImportedFromIB2 - 300460.IBPluginDependency - 300472.IBPluginDependency - 300472.ImportedFromIB2 - 300473.IBPluginDependency - 305.IBPluginDependency - 305.ImportedFromIB2 - 310.IBPluginDependency - 310.ImportedFromIB2 - 348.IBPluginDependency - 348.ImportedFromIB2 - 349.IBPluginDependency - 349.ImportedFromIB2 - 350.IBPluginDependency - 350.ImportedFromIB2 - 351.IBPluginDependency - 351.ImportedFromIB2 - 352.IBPluginDependency - 352.ImportedFromIB2 - 353.IBPluginDependency - 353.ImportedFromIB2 - 354.IBPluginDependency - 354.ImportedFromIB2 - 363.IBPluginDependency - 363.ImportedFromIB2 - 364.IBPluginDependency - 364.ImportedFromIB2 - 365.IBPluginDependency - 365.ImportedFromIB2 - 368.IBPluginDependency - 368.ImportedFromIB2 - 369.IBPluginDependency - 369.ImportedFromIB2 - 370.IBPluginDependency - 370.ImportedFromIB2 - 371.IBPluginDependency - 371.ImportedFromIB2 - 372.IBPluginDependency - 372.ImportedFromIB2 - 374.IBPluginDependency - 374.ImportedFromIB2 - 375.IBPluginDependency - 375.ImportedFromIB2 - 376.IBPluginDependency - 376.ImportedFromIB2 - 377.IBPluginDependency - 377.ImportedFromIB2 - 379.IBPluginDependency - 379.ImportedFromIB2 - 380.IBPluginDependency - 380.ImportedFromIB2 - 381.IBPluginDependency - 381.ImportedFromIB2 - 382.IBPluginDependency - 382.ImportedFromIB2 - 383.IBPluginDependency - 383.ImportedFromIB2 - 384.IBPluginDependency - 384.ImportedFromIB2 - 385.IBPluginDependency - 385.ImportedFromIB2 - 386.IBPluginDependency - 386.ImportedFromIB2 - 419.IBPluginDependency - 419.ImportedFromIB2 - 420.IBPluginDependency - 420.ImportedFromIB2 - 421.IBPluginDependency - 421.ImportedFromIB2 - 423.IBPluginDependency - 423.ImportedFromIB2 - 435.IBPluginDependency - 435.ImportedFromIB2 - 5.IBPluginDependency - 5.ImportedFromIB2 - 524.IBPluginDependency - 524.ImportedFromIB2 - 526.IBPluginDependency - 526.ImportedFromIB2 - 527.IBPluginDependency - 527.ImportedFromIB2 - 532.IBPluginDependency - 532.ImportedFromIB2 - 533.IBPluginDependency - 533.ImportedFromIB2 - 535.IBPluginDependency - 535.ImportedFromIB2 - 536.IBPluginDependency - 536.ImportedFromIB2 - 537.IBPluginDependency - 537.ImportedFromIB2 - 538.IBPluginDependency - 538.ImportedFromIB2 - 541.IBPluginDependency - 541.ImportedFromIB2 - 543.IBPluginDependency - 543.ImportedFromIB2 - 544.IBPluginDependency - 544.ImportedFromIB2 - 545.IBPluginDependency - 545.ImportedFromIB2 - 56.IBPluginDependency - 56.ImportedFromIB2 - 57.IBEditorWindowLastContentRect - 57.IBPluginDependency - 57.ImportedFromIB2 - 57.editorWindowContentRectSynchronizationRect - 573.IBPluginDependency - 573.ImportedFromIB2 - 574.IBPluginDependency - 574.ImportedFromIB2 - 575.IBPluginDependency - 575.ImportedFromIB2 - 58.IBPluginDependency - 58.ImportedFromIB2 - 92.IBPluginDependency - 92.ImportedFromIB2 - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{168, 821}, {113, 23}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{202, 626}, {154, 153}} - com.apple.InterfaceBuilder.CocoaPlugin - - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{349, 868}, {315, 143}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{271, 666}, {301, 153}} - {{437, 749}, {484, 308}} - com.apple.InterfaceBuilder.CocoaPlugin - {{437, 749}, {484, 308}} - - {{184, 290}, {481, 345}} - - - {3.40282e+38, 3.40282e+38} - {320, 240} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{58, 803}, {155, 33}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{100, 746}, {155, 33}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{68, 585}, {454, 271}} - com.apple.InterfaceBuilder.CocoaPlugin - - - {{68, 585}, {454, 271}} - - {{433, 406}, {486, 327}} - - - {3.40282e+38, 3.40282e+38} - {320, 240} - com.apple.InterfaceBuilder.CocoaPlugin - - {{145, 1011}, {336, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{67, 819}, {336, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{20, 641}, {218, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{79, 616}, {218, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - - - - YES - - - YES - + + 300476 + + + + + + + + 300477 + + + + + + + + 300478 + + + + + 300479 + + + + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{168, 821}, {113, 23}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{202, 626}, {154, 153}} + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{349, 868}, {315, 143}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{271, 666}, {301, 153}} + {{507, 548}, {604, 308}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{507, 548}, {604, 308}} + + {{184, 290}, {481, 345}} + + + {3.40282e+38, 3.40282e+38} + {320, 240} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{58, 803}, {155, 33}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{100, 746}, {155, 33}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{68, 585}, {454, 271}} + com.apple.InterfaceBuilder.CocoaPlugin + + + {{68, 585}, {454, 271}} + + {{433, 406}, {486, 327}} + + + {3.40282e+38, 3.40282e+38} + {320, 240} + com.apple.InterfaceBuilder.CocoaPlugin + + {{145, 1011}, {336, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{67, 819}, {336, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{20, 641}, {218, 203}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{79, 616}, {218, 203}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + - - YES - - - YES - - + - 300475 + 300481 - - YES + FirstResponder NSObject @@ -3895,16 +3570,12 @@ - + 0 com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - - com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 - + YES ../X11.xcodeproj diff --git a/xserver/hw/xquartz/bundle/Resources/sv.lproj/locversion.plist b/xserver/hw/xquartz/bundle/Resources/sv.lproj/locversion.plist index 6d62b54d2..43e790ad5 100644 --- a/xserver/hw/xquartz/bundle/Resources/sv.lproj/locversion.plist +++ b/xserver/hw/xquartz/bundle/Resources/sv.lproj/locversion.plist @@ -3,12 +3,12 @@ LprojCompatibleVersion - 93 + 97 LprojLocale sv LprojRevisionLevel 1 LprojVersion - 93 + 97 diff --git a/xserver/hw/xquartz/bundle/Resources/sv.lproj/main.nib/designable.nib b/xserver/hw/xquartz/bundle/Resources/sv.lproj/main.nib/designable.nib index a6a828905..601aca4ba 100644 --- a/xserver/hw/xquartz/bundle/Resources/sv.lproj/main.nib/designable.nib +++ b/xserver/hw/xquartz/bundle/Resources/sv.lproj/main.nib/designable.nib @@ -1,33 +1,21 @@ - + - 1050 + 1040 11A79a - 732 + 784 1059 478.00 com.apple.InterfaceBuilder.CocoaPlugin - 732 + 784 - - YES - - - YES + + com.apple.InterfaceBuilder.CocoaPlugin - - - YES - - YES - - - YES - - - - YES + + + NSApplication @@ -41,8 +29,7 @@ MainMenu - - YES + X11 @@ -60,8 +47,7 @@ submenuAction: X11 - - YES + Om X11 @@ -101,9 +87,7 @@ submenuAction: Tjänster - - YES - + _NSServicesMenu @@ -187,7 +171,7 @@ - + _NSAppleMenu @@ -202,8 +186,7 @@ submenuAction: Program - - YES + YES @@ -224,7 +207,7 @@ - + @@ -238,8 +221,7 @@ submenuAction: Redigera - - YES + Kopiera @@ -249,7 +231,7 @@ - + @@ -263,8 +245,7 @@ submenuAction: Fönster - - YES + Stäng @@ -341,7 +322,7 @@ - + _NSWindowsMenu @@ -356,8 +337,7 @@ submenuAction: Hjälp - - YES + X11 Hjälp @@ -367,10 +347,10 @@ - + - + _NSMainMenu @@ -386,20 +366,19 @@ View - {1.7976931348623157e+308, 1.7976931348623157e+308} + {3.4028235e+38, 3.4028235e+38} {320, 240} - + 256 - - YES + 256 {{13, 10}, {458, 292}} - - YES + + 1 @@ -407,13 +386,13 @@ 256 - - YES + 256 {{18, 210}, {402, 18}} + YES 67239424 @@ -427,7 +406,7 @@ 1211912703 2 - + NSImage NSSwitch @@ -443,8 +422,9 @@ 256 - {{36, 48}, {385, 31}} + {{36, 56}, {385, 31}} + YES 67239424 @@ -463,7 +443,7 @@ controlColor 3 - MC42NjY2NjY2NjY3AA + MC42NjY2NjY2ODY1AA @@ -480,8 +460,9 @@ 256 - {{36, 162}, {385, 42}} + {{36, 164}, {385, 42}} + YES 67239424 @@ -498,8 +479,9 @@ ciBzw6UgYWt0aXZlcmFzIG11c2VucyBtaXR0LSByZXNwZWt0aXZlIGjDtmdlcmtuYXBwLgo 256 - {{18, 85}, {402, 18}} + {{18, 91}, {402, 18}} + YES 67239424 @@ -509,7 +491,7 @@ ciBzw6UgYWt0aXZlcmFzIG11c2VucyBtaXR0LSByZXNwZWt0aXZlIGjDtmdlcmtuYXBwLgo 1211912703 2 - + @@ -520,8 +502,9 @@ ciBzw6UgYWt0aXZlcmFzIG11c2VucyBtaXR0LSByZXNwZWt0aXZlIGjDtmdlcmtuYXBwLgo 256 - {{36, 111}, {400, 29}} + {{36, 116}, {400, 29}} + YES 67239424 @@ -537,8 +520,9 @@ ciBzw6UgYWt0aXZlcmFzIG11c2VucyBtaXR0LSByZXNwZWt0aXZlIGjDtmdlcmtuYXBwLgo 256 - {{18, 146}, {402, 18}} + {{18, 149}, {402, 18}} + YES 67239424 @@ -548,7 +532,7 @@ ciBzw6UgYWt0aXZlcmFzIG11c2VucyBtaXR0LSByZXNwZWt0aXZlIGjDtmdlcmtuYXBwLgo 1211912703 2 - + @@ -556,9 +540,50 @@ ciBzw6UgYWt0aXZlcmFzIG11c2VucyBtaXR0LSByZXNwZWt0aXZlIGjDtmdlcmtuYXBwLgo 25 - + + + 256 + {{36, 1}, {385, 31}} + + + YES + + 67239424 + 4194304 + När aktiverad kommer alt-tangenterna att skicka tangentsymboler Alt_L och Alt_R X11 istället för Mode_switch. + + + + + + + + + 256 + {{18, 36}, {402, 18}} + + + YES + + 67239424 + 0 + Alt-tangenter sänder Alt_L och Alt_R + + + 1211912703 + 2 + + + + + 200 + 25 + + + {{10, 33}, {438, 246}} + Indata @@ -571,8 +596,7 @@ ciBzw6UgYWt0aXZlcmFzIG11c2VucyBtaXR0LSByZXNwZWt0aXZlIGjDtmdlcmtuYXBwLgo 256 - - YES + 256 @@ -587,7 +611,7 @@ ciBzw6UgYWt0aXZlcmFzIG11c2VucyBtaXR0LSByZXNwZWt0aXZlIGjDtmdlcmtuYXBwLgo 1211912703 2 - + @@ -654,8 +678,7 @@ ciBzw6UgYWt0aXZlcmFzIG11c2VucyBtaXR0LSByZXNwZWt0aXZlIGjDtmdlcmtuYXBwLgo OtherViews - - YES + @@ -693,7 +716,7 @@ ciBzw6UgYWt0aXZlcmFzIG11c2VucyBtaXR0LSByZXNwZWt0aXZlIGjDtmdlcmtuYXBwLgo 24 - + 3 YES @@ -710,7 +733,7 @@ ciBzw6UgYWt0aXZlcmFzIG11c2VucyBtaXR0LSByZXNwZWt0aXZlIGjDtmdlcmtuYXBwLgo 67239424 4194304 - RsOkcmdlcjoKA + Färger: @@ -749,7 +772,7 @@ ciBzw6UgYWt0aXZlcmFzIG11c2VucyBtaXR0LSByZXNwZWt0aXZlIGjDtmdlcmtuYXBwLgo 1211912703 2 - + @@ -771,7 +794,7 @@ ciBzw6UgYWt0aXZlcmFzIG11c2VucyBtaXR0LSByZXNwZWt0aXZlIGjDtmdlcmtuYXBwLgo 1211912703 2 - + @@ -796,7 +819,7 @@ ciBzw6UgYWt0aXZlcmFzIG11c2VucyBtaXR0LSByZXNwZWt0aXZlIGjDtmdlcmtuYXBwLgo - + {{10, 33}, {438, 246}} Utdata @@ -810,8 +833,7 @@ ciBzw6UgYWt0aXZlcmFzIG11c2VucyBtaXR0LSByZXNwZWt0aXZlIGjDtmdlcmtuYXBwLgo 256 - - YES + 256 @@ -826,7 +848,7 @@ ciBzw6UgYWt0aXZlcmFzIG11c2VucyBtaXR0LSByZXNwZWt0aXZlIGjDtmdlcmtuYXBwLgo 1211912703 2 - + @@ -864,7 +886,7 @@ ciBzw6UgYWt0aXZlcmFzIG11c2VucyBtaXR0LSByZXNwZWt0aXZlIGjDtmdlcmtuYXBwLgo 1211912703 2 - + @@ -886,7 +908,7 @@ ciBzw6UgYWt0aXZlcmFzIG11c2VucyBtaXR0LSByZXNwZWt0aXZlIGjDtmdlcmtuYXBwLgo 1211912703 2 - + @@ -908,7 +930,7 @@ ciBzw6UgYWt0aXZlcmFzIG11c2VucyBtaXR0LSByZXNwZWt0aXZlIGjDtmdlcmtuYXBwLgo 1211912703 2 - + @@ -930,7 +952,7 @@ ciBzw6UgYWt0aXZlcmFzIG11c2VucyBtaXR0LSByZXNwZWt0aXZlIGjDtmdlcmtuYXBwLgo 1211912703 2 - + @@ -970,7 +992,7 @@ ciBzw6UgYWt0aXZlcmFzIG11c2VucyBtaXR0LSByZXNwZWt0aXZlIGjDtmdlcmtuYXBwLgo - + {{10, 33}, {438, 246}} Urklipp @@ -984,8 +1006,7 @@ ciBzw6UgYWt0aXZlcmFzIG11c2VucyBtaXR0LSByZXNwZWt0aXZlIGjDtmdlcmtuYXBwLgo 256 - - YES + 256 @@ -1000,7 +1021,7 @@ ciBzw6UgYWt0aXZlcmFzIG11c2VucyBtaXR0LSByZXNwZWt0aXZlIGjDtmdlcmtuYXBwLgo 1211912703 2 - + @@ -1041,7 +1062,7 @@ cmthIGlubmVow6VsbGV0Lgo 1211912703 2 - + @@ -1080,7 +1101,7 @@ cmthIGlubmVow6VsbGV0Lgo 1211912703 2 - + @@ -1105,7 +1126,7 @@ cmthIGlubmVow6VsbGV0Lgo - + {{10, 33}, {438, 246}} Fönster @@ -1116,8 +1137,7 @@ cmthIGlubmVow6VsbGV0Lgo 256 - - YES + 256 @@ -1132,7 +1152,7 @@ cmthIGlubmVow6VsbGV0Lgo 1211912703 2 - + @@ -1154,7 +1174,7 @@ cmthIGlubmVow6VsbGV0Lgo 1211912703 2 - + @@ -1213,30 +1233,31 @@ cmthIGlubmVow6VsbGV0Lgo - + {{10, 33}, {438, 246}} Säkerhet - + 0 YES YES - - YES + - + - + {484, 308} + + {{0, 0}, {1440, 878}} {320, 262} - {1.7976931348623157e+308, 1.7976931348623157e+308} + {3.4028235e+38, 3.4028235e+38} x11_prefs @@ -1249,13 +1270,12 @@ cmthIGlubmVow6VsbGV0Lgo View - {1.7976931348623157e+308, 1.7976931348623157e+308} + {3.4028235e+38, 3.4028235e+38} {320, 240} 256 - - YES + 265 @@ -1309,13 +1329,11 @@ cmthIGlubmVow6VsbGV0Lgo 274 - - YES + 2304 - - YES + 256 @@ -1335,8 +1353,7 @@ cmthIGlubmVow6VsbGV0Lgo {{302, 0}, {16, 17}} - - YES + 122.73100280761719 62.730998992919922 @@ -1348,7 +1365,7 @@ cmthIGlubmVow6VsbGV0Lgo 3 - MC4zMzMzMzI5OQA + MC4zMzMzMzI5ODU2AA 6 @@ -1447,7 +1464,7 @@ cmthIGlubmVow6VsbGV0Lgo - + 3 2 @@ -1470,10 +1487,9 @@ cmthIGlubmVow6VsbGV0Lgo YES 0 - + {{1, 17}, {301, 198}} - 4 @@ -1485,7 +1501,7 @@ cmthIGlubmVow6VsbGV0Lgo _doScroller: - 0.99492380000000002 + 0.99492377042770386 @@ -1495,27 +1511,24 @@ cmthIGlubmVow6VsbGV0Lgo 1 _doScroller: - 0.68852460000000004 + 0.68852460384368896 2304 - - YES + - + {{1, 0}, {301, 17}} - 4 - + {{20, 20}, {318, 231}} - 50 @@ -1547,18 +1560,17 @@ cmthIGlubmVow6VsbGV0Lgo 25 - + {496, 271} {{0, 0}, {1440, 878}} {320, 262} - {1.7976931348623157e+308, 1.7976931348623157e+308} + {3.4028235e+38, 3.4028235e+38} x11_apps Meny - - YES + YES @@ -1581,8 +1593,7 @@ cmthIGlubmVow6VsbGV0Lgo submenuAction: Program - - YES + YES @@ -1603,16 +1614,15 @@ cmthIGlubmVow6VsbGV0Lgo - + - + - + - - YES + copy: @@ -2157,13 +2167,28 @@ cmthIGlubmVow6VsbGV0Lgo 300475 - + + + prefs_changed: + + + + 300480 + + + + option_sends_alt + + + + 300481 + + - - YES + 0 - + @@ -2188,31 +2213,28 @@ cmthIGlubmVow6VsbGV0Lgo 29 - - YES + - + MainMenu 19 - - YES + - + 24 - - YES + @@ -2221,7 +2243,7 @@ cmthIGlubmVow6VsbGV0Lgo - + @@ -2267,17 +2289,15 @@ cmthIGlubmVow6VsbGV0Lgo 56 - - YES + - + 57 - - YES + @@ -2290,7 +2310,7 @@ cmthIGlubmVow6VsbGV0Lgo - + @@ -2306,10 +2326,9 @@ cmthIGlubmVow6VsbGV0Lgo 131 - - YES + - + @@ -2365,19 +2384,17 @@ cmthIGlubmVow6VsbGV0Lgo 163 - - YES + - + 169 - - YES + - + @@ -2388,20 +2405,18 @@ cmthIGlubmVow6VsbGV0Lgo 269 - - YES + - + 270 - - YES + - + @@ -2417,19 +2432,17 @@ cmthIGlubmVow6VsbGV0Lgo 419 - - YES + - + 420 - - YES + - + @@ -2446,126 +2459,115 @@ cmthIGlubmVow6VsbGV0Lgo 244 - - YES + - + PrefsPanel 245 - - YES + - + 348 - - YES + - + 349 - - YES + - + 351 - - YES + - + + + 363 - - YES + - + 364 - - YES + - + 365 - - YES + - + 368 - - YES + - + 369 - - YES + - + 370 - - YES + - + 352 - - YES + - + 350 - - YES + @@ -2574,169 +2576,152 @@ cmthIGlubmVow6VsbGV0Lgo - + 371 - - YES + - + 372 - - YES + - + 382 - - YES + - + 385 - - YES + - + 386 - - YES + - + 541 - - YES + - + 543 - - YES + - + 353 - - YES + - + 354 - - YES + - + 374 - - YES + - + 375 - - YES + - + 376 - - YES + - + 377 - - YES + - + 379 - - YES + - + 285 - - YES + - + EditPrograms 286 - - YES + - + 423 - - YES + - + DockMenu @@ -2748,20 +2733,18 @@ cmthIGlubmVow6VsbGV0Lgo 526 - - YES + - + 527 - - YES + - + @@ -2817,10 +2800,9 @@ cmthIGlubmVow6VsbGV0Lgo 100382 - - YES + - + @@ -2871,13 +2853,12 @@ cmthIGlubmVow6VsbGV0Lgo 380 - - YES + - + @@ -2903,13 +2884,12 @@ cmthIGlubmVow6VsbGV0Lgo 295 - - YES + - + @@ -2930,21 +2910,19 @@ cmthIGlubmVow6VsbGV0Lgo 296 - - YES + - + 535 - - YES + - + @@ -2955,10 +2933,9 @@ cmthIGlubmVow6VsbGV0Lgo 298 - - YES + - + @@ -2969,10 +2946,9 @@ cmthIGlubmVow6VsbGV0Lgo 297 - - YES + - + @@ -2983,10 +2959,9 @@ cmthIGlubmVow6VsbGV0Lgo 310 - - YES + - + @@ -2997,10 +2972,9 @@ cmthIGlubmVow6VsbGV0Lgo 292 - - YES + - + @@ -3011,10 +2985,9 @@ cmthIGlubmVow6VsbGV0Lgo 293 - - YES + - + @@ -3025,42 +2998,38 @@ cmthIGlubmVow6VsbGV0Lgo 300337 - - YES + - + 300338 - - YES + - + 300358 - - YES + - + 300359 - - YES + - + @@ -3076,10 +3045,9 @@ cmthIGlubmVow6VsbGV0Lgo 300362 - - YES + - + @@ -3090,10 +3058,9 @@ cmthIGlubmVow6VsbGV0Lgo 300364 - - YES + - + @@ -3104,10 +3071,9 @@ cmthIGlubmVow6VsbGV0Lgo 300368 - - YES + - + @@ -3118,10 +3084,9 @@ cmthIGlubmVow6VsbGV0Lgo 300370 - - YES + - + @@ -3132,17 +3097,15 @@ cmthIGlubmVow6VsbGV0Lgo 300421 - - YES + - + 300422 - - YES + @@ -3151,25 +3114,23 @@ cmthIGlubmVow6VsbGV0Lgo - + 300423 - - YES + - + 300424 - - YES + - + @@ -3185,10 +3146,9 @@ cmthIGlubmVow6VsbGV0Lgo 300447 - - YES + - + @@ -3199,10 +3159,9 @@ cmthIGlubmVow6VsbGV0Lgo 300451 - - YES + - + @@ -3213,10 +3172,9 @@ cmthIGlubmVow6VsbGV0Lgo 300453 - - YES + - + @@ -3227,10 +3185,9 @@ cmthIGlubmVow6VsbGV0Lgo 300455 - - YES + - + @@ -3241,10 +3198,9 @@ cmthIGlubmVow6VsbGV0Lgo 300457 - - YES + - + @@ -3255,10 +3211,9 @@ cmthIGlubmVow6VsbGV0Lgo 300459 - - YES + - + @@ -3269,10 +3224,9 @@ cmthIGlubmVow6VsbGV0Lgo 300472 - - YES + - + @@ -3280,604 +3234,333 @@ cmthIGlubmVow6VsbGV0Lgo - - - - YES - - YES - -3.IBPluginDependency - -3.ImportedFromIB2 - 100292.IBPluginDependency - 100293.IBPluginDependency - 100295.IBPluginDependency - 100295.IBShouldRemoveOnLegacySave - 100310.IBPluginDependency - 100363.IBPluginDependency - 100364.IBPluginDependency - 100365.IBPluginDependency - 100368.IBPluginDependency - 100369.IBPluginDependency - 100370.IBPluginDependency - 100371.IBPluginDependency - 100372.IBPluginDependency - 100374.IBPluginDependency - 100375.IBPluginDependency - 100376.IBPluginDependency - 100377.IBPluginDependency - 100379.IBPluginDependency - 100382.IBPluginDependency - 100385.IBPluginDependency - 100386.IBPluginDependency - 100541.IBPluginDependency - 100543.IBPluginDependency - 129.IBPluginDependency - 129.ImportedFromIB2 - 130.IBPluginDependency - 130.ImportedFromIB2 - 131.IBPluginDependency - 131.ImportedFromIB2 - 134.IBPluginDependency - 134.ImportedFromIB2 - 136.IBPluginDependency - 136.ImportedFromIB2 - 143.IBPluginDependency - 143.ImportedFromIB2 - 144.IBPluginDependency - 144.ImportedFromIB2 - 145.IBPluginDependency - 145.ImportedFromIB2 - 149.IBPluginDependency - 149.ImportedFromIB2 - 150.IBPluginDependency - 150.ImportedFromIB2 - 157.IBPluginDependency - 157.ImportedFromIB2 - 163.IBPluginDependency - 163.ImportedFromIB2 - 169.IBEditorWindowLastContentRect - 169.IBPluginDependency - 169.ImportedFromIB2 - 169.editorWindowContentRectSynchronizationRect - 19.IBPluginDependency - 19.ImportedFromIB2 - 196.ImportedFromIB2 - 200295.IBPluginDependency - 200295.IBShouldRemoveOnLegacySave - 203.IBPluginDependency - 203.ImportedFromIB2 - 204.IBPluginDependency - 204.ImportedFromIB2 - 23.IBPluginDependency - 23.ImportedFromIB2 - 24.IBEditorWindowLastContentRect - 24.IBPluginDependency - 24.ImportedFromIB2 - 24.editorWindowContentRectSynchronizationRect - 244.IBEditorWindowLastContentRect - 244.IBPluginDependency - 244.IBWindowTemplateEditedContentRect - 244.ImportedFromIB2 - 244.editorWindowContentRectSynchronizationRect - 244.windowTemplate.hasMaxSize - 244.windowTemplate.hasMinSize - 244.windowTemplate.maxSize - 244.windowTemplate.minSize - 245.IBPluginDependency - 245.ImportedFromIB2 - 269.IBPluginDependency - 269.ImportedFromIB2 - 270.IBEditorWindowLastContentRect - 270.IBPluginDependency - 270.ImportedFromIB2 - 270.editorWindowContentRectSynchronizationRect - 272.IBPluginDependency - 272.ImportedFromIB2 - 285.IBEditorWindowLastContentRect - 285.IBPluginDependency - 285.IBViewEditorWindowController.showingBoundsRectangles - 285.IBViewEditorWindowController.showingLayoutRectangles - 285.IBWindowTemplateEditedContentRect - 285.ImportedFromIB2 - 285.editorWindowContentRectSynchronizationRect - 285.windowTemplate.hasMaxSize - 285.windowTemplate.hasMinSize - 285.windowTemplate.maxSize - 285.windowTemplate.minSize - 286.IBPluginDependency - 286.ImportedFromIB2 - 29.IBEditorWindowLastContentRect - 29.IBPluginDependency - 29.ImportedFromIB2 - 29.editorWindowContentRectSynchronizationRect - 292.IBPluginDependency - 292.ImportedFromIB2 - 293.IBPluginDependency - 293.ImportedFromIB2 - 295.IBPluginDependency - 295.ImportedFromIB2 - 296.IBPluginDependency - 296.ImportedFromIB2 - 297.IBPluginDependency - 297.ImportedFromIB2 - 298.IBPluginDependency - 298.ImportedFromIB2 - 300295.IBPluginDependency - 300295.IBShouldRemoveOnLegacySave - 300337.IBPluginDependency - 300337.ImportedFromIB2 - 300338.IBPluginDependency - 300338.ImportedFromIB2 - 300358.IBPluginDependency - 300358.ImportedFromIB2 - 300359.IBPluginDependency - 300359.ImportedFromIB2 - 300360.IBPluginDependency - 300361.IBPluginDependency - 300362.IBPluginDependency - 300362.ImportedFromIB2 - 300363.IBPluginDependency - 300364.IBPluginDependency - 300364.ImportedFromIB2 - 300365.IBPluginDependency - 300368.IBPluginDependency - 300368.ImportedFromIB2 - 300369.IBPluginDependency - 300370.IBPluginDependency - 300370.ImportedFromIB2 - 300371.IBPluginDependency - 300421.IBPluginDependency - 300421.ImportedFromIB2 - 300422.IBPluginDependency - 300422.ImportedFromIB2 - 300423.IBPluginDependency - 300423.ImportedFromIB2 - 300424.IBPluginDependency - 300424.ImportedFromIB2 - 300440.IBPluginDependency - 300441.IBPluginDependency - 300447.IBPluginDependency - 300447.ImportedFromIB2 - 300450.IBPluginDependency - 300451.IBPluginDependency - 300451.ImportedFromIB2 - 300452.IBPluginDependency - 300453.IBPluginDependency - 300453.ImportedFromIB2 - 300454.IBPluginDependency - 300455.IBPluginDependency - 300455.ImportedFromIB2 - 300456.IBPluginDependency - 300457.IBPluginDependency - 300457.ImportedFromIB2 - 300458.IBPluginDependency - 300459.IBPluginDependency - 300459.ImportedFromIB2 - 300460.IBPluginDependency - 300472.IBPluginDependency - 300472.ImportedFromIB2 - 300473.IBPluginDependency - 305.IBPluginDependency - 305.ImportedFromIB2 - 310.IBPluginDependency - 310.ImportedFromIB2 - 348.IBPluginDependency - 348.ImportedFromIB2 - 349.IBPluginDependency - 349.ImportedFromIB2 - 350.IBPluginDependency - 350.ImportedFromIB2 - 351.IBPluginDependency - 351.ImportedFromIB2 - 352.IBPluginDependency - 352.ImportedFromIB2 - 353.IBPluginDependency - 353.ImportedFromIB2 - 354.IBPluginDependency - 354.ImportedFromIB2 - 363.IBPluginDependency - 363.ImportedFromIB2 - 364.IBPluginDependency - 364.ImportedFromIB2 - 365.IBPluginDependency - 365.ImportedFromIB2 - 368.IBPluginDependency - 368.ImportedFromIB2 - 369.IBPluginDependency - 369.ImportedFromIB2 - 370.IBPluginDependency - 370.ImportedFromIB2 - 371.IBPluginDependency - 371.ImportedFromIB2 - 372.IBPluginDependency - 372.ImportedFromIB2 - 374.IBPluginDependency - 374.ImportedFromIB2 - 375.IBPluginDependency - 375.ImportedFromIB2 - 376.IBPluginDependency - 376.ImportedFromIB2 - 377.IBPluginDependency - 377.ImportedFromIB2 - 379.IBPluginDependency - 379.ImportedFromIB2 - 380.IBPluginDependency - 380.ImportedFromIB2 - 381.IBPluginDependency - 381.ImportedFromIB2 - 382.IBPluginDependency - 382.ImportedFromIB2 - 383.IBPluginDependency - 383.ImportedFromIB2 - 384.IBPluginDependency - 384.ImportedFromIB2 - 385.IBPluginDependency - 385.ImportedFromIB2 - 386.IBPluginDependency - 386.ImportedFromIB2 - 419.IBPluginDependency - 419.ImportedFromIB2 - 420.IBPluginDependency - 420.ImportedFromIB2 - 421.IBPluginDependency - 421.ImportedFromIB2 - 423.IBPluginDependency - 423.ImportedFromIB2 - 435.IBPluginDependency - 435.ImportedFromIB2 - 5.IBPluginDependency - 5.ImportedFromIB2 - 524.IBPluginDependency - 524.ImportedFromIB2 - 526.IBPluginDependency - 526.ImportedFromIB2 - 527.IBPluginDependency - 527.ImportedFromIB2 - 532.IBPluginDependency - 532.ImportedFromIB2 - 533.IBPluginDependency - 533.ImportedFromIB2 - 535.IBPluginDependency - 535.ImportedFromIB2 - 536.IBPluginDependency - 536.ImportedFromIB2 - 537.IBPluginDependency - 537.ImportedFromIB2 - 538.IBPluginDependency - 538.ImportedFromIB2 - 541.IBPluginDependency - 541.ImportedFromIB2 - 543.IBPluginDependency - 543.ImportedFromIB2 - 544.IBPluginDependency - 544.ImportedFromIB2 - 545.IBPluginDependency - 545.ImportedFromIB2 - 56.IBPluginDependency - 56.ImportedFromIB2 - 57.IBEditorWindowLastContentRect - 57.IBPluginDependency - 57.ImportedFromIB2 - 57.editorWindowContentRectSynchronizationRect - 573.IBPluginDependency - 573.ImportedFromIB2 - 574.IBPluginDependency - 574.ImportedFromIB2 - 575.IBPluginDependency - 575.ImportedFromIB2 - 58.IBPluginDependency - 58.ImportedFromIB2 - 92.IBPluginDependency - 92.ImportedFromIB2 - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{168, 821}, {113, 23}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{202, 626}, {154, 153}} - com.apple.InterfaceBuilder.CocoaPlugin - - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{349, 868}, {315, 143}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{271, 666}, {301, 153}} - {{437, 749}, {484, 308}} - com.apple.InterfaceBuilder.CocoaPlugin - {{437, 749}, {484, 308}} - - {{184, 290}, {481, 345}} - - - {3.40282e+38, 3.40282e+38} - {320, 240} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{58, 803}, {155, 33}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{100, 746}, {155, 33}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{68, 585}, {454, 271}} - com.apple.InterfaceBuilder.CocoaPlugin - - - {{68, 585}, {454, 271}} - - {{433, 406}, {486, 327}} - - - {3.40282e+38, 3.40282e+38} - {320, 240} - com.apple.InterfaceBuilder.CocoaPlugin - - {{145, 1011}, {336, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{67, 819}, {336, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{20, 641}, {218, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{79, 616}, {218, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - - - - YES - - - YES - + + 300476 + + + + + + + + 300477 + + + + + + + + 300478 + + + + + 300479 + + + + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{168, 821}, {113, 23}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{202, 626}, {154, 153}} + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{349, 868}, {315, 143}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{271, 666}, {301, 153}} + {{507, 548}, {484, 308}} + com.apple.InterfaceBuilder.CocoaPlugin + {{507, 548}, {484, 308}} + + {{184, 290}, {481, 345}} + + + {3.40282e+38, 3.40282e+38} + {320, 240} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{58, 803}, {155, 33}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{100, 746}, {155, 33}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{68, 585}, {496, 271}} + com.apple.InterfaceBuilder.CocoaPlugin + + + {{68, 585}, {496, 271}} + + {{433, 406}, {486, 327}} + + + {3.40282e+38, 3.40282e+38} + {320, 240} + com.apple.InterfaceBuilder.CocoaPlugin + + {{145, 1011}, {336, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{67, 819}, {336, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{20, 641}, {218, 203}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{79, 616}, {218, 203}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + - - YES - - - YES - - + - 300475 + 300481 - - YES + FirstResponder NSObject @@ -3902,19 +3585,21 @@ cmthIGlubmVow6VsbGV0Lgo - + 0 + IBCocoaFramework com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - - com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 - + YES ../X11.xcodeproj 3 + + {9, 8} + {7, 2} + {15, 15} + diff --git a/xserver/hw/xquartz/bundle/Resources/zh_CN.lproj/locversion.plist b/xserver/hw/xquartz/bundle/Resources/zh_CN.lproj/locversion.plist index 85fa1f2a6..c2c6a557a 100644 --- a/xserver/hw/xquartz/bundle/Resources/zh_CN.lproj/locversion.plist +++ b/xserver/hw/xquartz/bundle/Resources/zh_CN.lproj/locversion.plist @@ -3,12 +3,12 @@ LprojCompatibleVersion - 93 + 99 LprojLocale zh_CN LprojRevisionLevel 1 LprojVersion - 93 + 99 diff --git a/xserver/hw/xquartz/bundle/Resources/zh_CN.lproj/main.nib/designable.nib b/xserver/hw/xquartz/bundle/Resources/zh_CN.lproj/main.nib/designable.nib index 4ef22f024..13cf11e0d 100644 --- a/xserver/hw/xquartz/bundle/Resources/zh_CN.lproj/main.nib/designable.nib +++ b/xserver/hw/xquartz/bundle/Resources/zh_CN.lproj/main.nib/designable.nib @@ -1,33 +1,21 @@ - + - 1050 - 11A79a - 732 - 1059 - 478.00 + 1040 + 11A194b + 787 + 1079 + 502.00 com.apple.InterfaceBuilder.CocoaPlugin - 732 + 787 - - YES - - - YES + + com.apple.InterfaceBuilder.CocoaPlugin - - - YES - - YES - - - YES - - - - YES + + + NSApplication @@ -41,8 +29,7 @@ MainMenu - - YES + X11 @@ -60,8 +47,7 @@ submenuAction: X11 - - YES + 关于 X11 @@ -101,9 +87,7 @@ submenuAction: 服务 - - YES - + _NSServicesMenu @@ -187,7 +171,7 @@ - + _NSAppleMenu @@ -202,8 +186,7 @@ submenuAction: 应用程序 - - YES + YES @@ -224,7 +207,7 @@ - + @@ -238,8 +221,7 @@ submenuAction: 编辑 - - YES + 拷贝 @@ -249,7 +231,7 @@ - + @@ -263,8 +245,7 @@ submenuAction: 窗口 - - YES + 关闭 @@ -341,7 +322,7 @@ - + _NSWindowsMenu @@ -356,8 +337,7 @@ submenuAction: 帮助 - - YES + X11 帮助 @@ -367,10 +347,10 @@ - + - + _NSMainMenu @@ -386,20 +366,19 @@ View + {1.7976931348623157e+308, 1.7976931348623157e+308} {320, 240} 256 - - YES + 256 {{13, 10}, {458, 292}} - - YES + 1 @@ -407,8 +386,7 @@ 256 - - YES + 256 @@ -427,7 +405,7 @@ 1211912703 2 - + NSImage NSSwitch @@ -509,7 +487,7 @@ moTpvKDmoIfmjInplK7jgIIKA 1211912703 2 - + @@ -548,7 +526,7 @@ moTpvKDmoIfmjInplK7jgIIKA 1211912703 2 - + @@ -556,7 +534,45 @@ moTpvKDmoIfmjInplK7jgIIKA 25 - + + + 256 + {{36, -1}, {385, 31}} + + YES + + 67239424 + 4194304 + 如果已启用,则 Option 键会发送 Alt_L 和 Alt_R X11 键符号,而不是发送 Mode_switch。 + + + + + + + + + 256 + {{18, 36}, {402, 18}} + + YES + + 67239424 + 0 + Option 键会发送 Alt_L 和 Alt_R + + + 1211912703 + 2 + + + + + 200 + 25 + + + {{10, 33}, {438, 246}} @@ -571,8 +587,7 @@ moTpvKDmoIfmjInplK7jgIIKA 256 - - YES + 256 @@ -587,7 +602,7 @@ moTpvKDmoIfmjInplK7jgIIKA 1211912703 2 - + @@ -615,7 +630,7 @@ moTpvKDmoIfmjInplK7jgIIKA 256 - {{62, 202}, {128, 26}} + {{59, 202}, {128, 26}} YES @@ -654,8 +669,7 @@ moTpvKDmoIfmjInplK7jgIIKA OtherViews - - YES + @@ -693,7 +707,7 @@ moTpvKDmoIfmjInplK7jgIIKA 24 - + 3 YES @@ -710,7 +724,7 @@ moTpvKDmoIfmjInplK7jgIIKA 67239424 4194304 - 6aKc6Imy77yaCg + 颜色: @@ -749,7 +763,7 @@ moTpvKDmoIfmjInplK7jgIIKA 1211912703 2 - + @@ -771,7 +785,7 @@ moTpvKDmoIfmjInplK7jgIIKA 1211912703 2 - + @@ -796,7 +810,7 @@ moTpvKDmoIfmjInplK7jgIIKA - + {{10, 33}, {438, 246}} 输出 @@ -810,8 +824,7 @@ moTpvKDmoIfmjInplK7jgIIKA 256 - - YES + 256 @@ -826,7 +839,7 @@ moTpvKDmoIfmjInplK7jgIIKA 1211912703 2 - + @@ -864,7 +877,7 @@ moTpvKDmoIfmjInplK7jgIIKA 1211912703 2 - + @@ -886,7 +899,7 @@ moTpvKDmoIfmjInplK7jgIIKA 1211912703 2 - + @@ -908,7 +921,7 @@ moTpvKDmoIfmjInplK7jgIIKA 1211912703 2 - + @@ -930,7 +943,7 @@ moTpvKDmoIfmjInplK7jgIIKA 1211912703 2 - + @@ -970,7 +983,7 @@ moTpvKDmoIfmjInplK7jgIIKA - + {{10, 33}, {438, 246}} 粘贴板 @@ -984,8 +997,7 @@ moTpvKDmoIfmjInplK7jgIIKA 256 - - YES + 256 @@ -1000,7 +1012,7 @@ moTpvKDmoIfmjInplK7jgIIKA 1211912703 2 - + @@ -1038,7 +1050,7 @@ moTpvKDmoIfmjInplK7jgIIKA 1211912703 2 - + @@ -1076,7 +1088,7 @@ moTpvKDmoIfmjInplK7jgIIKA 1211912703 2 - + @@ -1100,7 +1112,7 @@ moTpvKDmoIfmjInplK7jgIIKA - + {{10, 33}, {438, 246}} 窗口 @@ -1111,8 +1123,7 @@ moTpvKDmoIfmjInplK7jgIIKA 256 - - YES + 256 @@ -1127,7 +1138,7 @@ moTpvKDmoIfmjInplK7jgIIKA 1211912703 2 - + @@ -1149,7 +1160,7 @@ moTpvKDmoIfmjInplK7jgIIKA 1211912703 2 - + @@ -1208,25 +1219,24 @@ moTpvKDmoIfmjInplK7jgIIKA - + {{10, 33}, {438, 246}} 安全性 - + 0 YES YES - - YES + - + - + {484, 308} {{0, 0}, {1280, 938}} @@ -1244,13 +1254,13 @@ moTpvKDmoIfmjInplK7jgIIKA View + {1.7976931348623157e+308, 1.7976931348623157e+308} {320, 240} 256 - - YES + 265 @@ -1287,7 +1297,7 @@ moTpvKDmoIfmjInplK7jgIIKA 67239424 137887744 - 去掉 + 移除 -2038284033 @@ -1304,13 +1314,11 @@ moTpvKDmoIfmjInplK7jgIIKA 274 - - YES + 2304 - - YES + 256 @@ -1330,8 +1338,7 @@ moTpvKDmoIfmjInplK7jgIIKA {{302, 0}, {16, 17}} - - YES + 121.73100280761719 62.730998992919922 @@ -1343,7 +1350,7 @@ moTpvKDmoIfmjInplK7jgIIKA 3 - MC4zMzMzMzI5OQA + MC4zMzMzMzI5ODU2AA 6 @@ -1442,7 +1449,7 @@ moTpvKDmoIfmjInplK7jgIIKA - + 3 2 @@ -1465,7 +1472,7 @@ moTpvKDmoIfmjInplK7jgIIKA YES 0 - + {{1, 17}, {301, 198}} @@ -1480,7 +1487,7 @@ moTpvKDmoIfmjInplK7jgIIKA _doScroller: - 0.99492380000000002 + 0.99492377042770386 @@ -1490,15 +1497,14 @@ moTpvKDmoIfmjInplK7jgIIKA 1 _doScroller: - 0.68852460000000004 + 0.68852460384368896 2304 - - YES + - + {{1, 0}, {301, 17}} @@ -1507,7 +1513,7 @@ moTpvKDmoIfmjInplK7jgIIKA 4 - + {{20, 20}, {318, 231}} @@ -1516,7 +1522,6 @@ moTpvKDmoIfmjInplK7jgIIKA - QSAAAEEgAABBmAAAQZgAAA @@ -1542,7 +1547,7 @@ moTpvKDmoIfmjInplK7jgIIKA 25 - + {454, 271} {{0, 0}, {1280, 938}} @@ -1552,8 +1557,7 @@ moTpvKDmoIfmjInplK7jgIIKA 菜单 - - YES + YES @@ -1576,8 +1580,7 @@ moTpvKDmoIfmjInplK7jgIIKA submenuAction: 应用程序 - - YES + YES @@ -1598,16 +1601,15 @@ moTpvKDmoIfmjInplK7jgIIKA - + - + - + - - YES + copy: @@ -2152,13 +2154,28 @@ moTpvKDmoIfmjInplK7jgIIKA 300475 - + + + prefs_changed: + + + + 300480 + + + + option_sends_alt + + + + 300481 + + - - YES + 0 - + @@ -2183,31 +2200,28 @@ moTpvKDmoIfmjInplK7jgIIKA 29 - - YES + - + MainMenu 19 - - YES + - + 24 - - YES + @@ -2216,7 +2230,7 @@ moTpvKDmoIfmjInplK7jgIIKA - + @@ -2262,17 +2276,15 @@ moTpvKDmoIfmjInplK7jgIIKA 56 - - YES + - + 57 - - YES + @@ -2285,7 +2297,7 @@ moTpvKDmoIfmjInplK7jgIIKA - + @@ -2301,10 +2313,9 @@ moTpvKDmoIfmjInplK7jgIIKA 131 - - YES + - + @@ -2360,19 +2371,17 @@ moTpvKDmoIfmjInplK7jgIIKA 163 - - YES + - + 169 - - YES + - + @@ -2383,20 +2392,18 @@ moTpvKDmoIfmjInplK7jgIIKA 269 - - YES + - + 270 - - YES + - + @@ -2412,19 +2419,17 @@ moTpvKDmoIfmjInplK7jgIIKA 419 - - YES + - + 420 - - YES + - + @@ -2441,126 +2446,115 @@ moTpvKDmoIfmjInplK7jgIIKA 244 - - YES + - + PrefsPanel 245 - - YES + - + 348 - - YES + - + 349 - - YES + - + 351 - - YES + - + + + 363 - - YES + - + 364 - - YES + - + 365 - - YES + - + 368 - - YES + - + 369 - - YES + - + 370 - - YES + - + 352 - - YES + - + 350 - - YES + @@ -2569,169 +2563,152 @@ moTpvKDmoIfmjInplK7jgIIKA - + 371 - - YES + - + 372 - - YES + - + 382 - - YES + - + 385 - - YES + - + 386 - - YES + - + 541 - - YES + - + 543 - - YES + - + 353 - - YES + - + 354 - - YES + - + 374 - - YES + - + 375 - - YES + - + 376 - - YES + - + 377 - - YES + - + 379 - - YES + - + 285 - - YES + - + EditPrograms 286 - - YES + - + 423 - - YES + - + DockMenu @@ -2743,20 +2720,18 @@ moTpvKDmoIfmjInplK7jgIIKA 526 - - YES + - + 527 - - YES + - + @@ -2812,10 +2787,9 @@ moTpvKDmoIfmjInplK7jgIIKA 100382 - - YES + - + @@ -2866,13 +2840,12 @@ moTpvKDmoIfmjInplK7jgIIKA 380 - - YES + - + @@ -2898,13 +2871,12 @@ moTpvKDmoIfmjInplK7jgIIKA 295 - - YES + - + @@ -2925,21 +2897,19 @@ moTpvKDmoIfmjInplK7jgIIKA 296 - - YES + - + 535 - - YES + - + @@ -2950,10 +2920,9 @@ moTpvKDmoIfmjInplK7jgIIKA 298 - - YES + - + @@ -2964,10 +2933,9 @@ moTpvKDmoIfmjInplK7jgIIKA 297 - - YES + - + @@ -2978,10 +2946,9 @@ moTpvKDmoIfmjInplK7jgIIKA 310 - - YES + - + @@ -2992,10 +2959,9 @@ moTpvKDmoIfmjInplK7jgIIKA 292 - - YES + - + @@ -3006,10 +2972,9 @@ moTpvKDmoIfmjInplK7jgIIKA 293 - - YES + - + @@ -3020,42 +2985,38 @@ moTpvKDmoIfmjInplK7jgIIKA 300337 - - YES + - + 300338 - - YES + - + 300358 - - YES + - + 300359 - - YES + - + @@ -3071,10 +3032,9 @@ moTpvKDmoIfmjInplK7jgIIKA 300362 - - YES + - + @@ -3085,10 +3045,9 @@ moTpvKDmoIfmjInplK7jgIIKA 300364 - - YES + - + @@ -3099,10 +3058,9 @@ moTpvKDmoIfmjInplK7jgIIKA 300368 - - YES + - + @@ -3113,10 +3071,9 @@ moTpvKDmoIfmjInplK7jgIIKA 300370 - - YES + - + @@ -3127,17 +3084,15 @@ moTpvKDmoIfmjInplK7jgIIKA 300421 - - YES + - + 300422 - - YES + @@ -3146,25 +3101,23 @@ moTpvKDmoIfmjInplK7jgIIKA - + 300423 - - YES + - + 300424 - - YES + - + @@ -3180,10 +3133,9 @@ moTpvKDmoIfmjInplK7jgIIKA 300447 - - YES + - + @@ -3194,10 +3146,9 @@ moTpvKDmoIfmjInplK7jgIIKA 300451 - - YES + - + @@ -3208,10 +3159,9 @@ moTpvKDmoIfmjInplK7jgIIKA 300453 - - YES + - + @@ -3222,10 +3172,9 @@ moTpvKDmoIfmjInplK7jgIIKA 300455 - - YES + - + @@ -3236,10 +3185,9 @@ moTpvKDmoIfmjInplK7jgIIKA 300457 - - YES + - + @@ -3250,10 +3198,9 @@ moTpvKDmoIfmjInplK7jgIIKA 300459 - - YES + - + @@ -3264,10 +3211,9 @@ moTpvKDmoIfmjInplK7jgIIKA 300472 - - YES + - + @@ -3275,604 +3221,338 @@ moTpvKDmoIfmjInplK7jgIIKA - - - - YES - - YES - -3.IBPluginDependency - -3.ImportedFromIB2 - 100292.IBPluginDependency - 100293.IBPluginDependency - 100295.IBPluginDependency - 100295.IBShouldRemoveOnLegacySave - 100310.IBPluginDependency - 100363.IBPluginDependency - 100364.IBPluginDependency - 100365.IBPluginDependency - 100368.IBPluginDependency - 100369.IBPluginDependency - 100370.IBPluginDependency - 100371.IBPluginDependency - 100372.IBPluginDependency - 100374.IBPluginDependency - 100375.IBPluginDependency - 100376.IBPluginDependency - 100377.IBPluginDependency - 100379.IBPluginDependency - 100382.IBPluginDependency - 100385.IBPluginDependency - 100386.IBPluginDependency - 100541.IBPluginDependency - 100543.IBPluginDependency - 129.IBPluginDependency - 129.ImportedFromIB2 - 130.IBPluginDependency - 130.ImportedFromIB2 - 131.IBPluginDependency - 131.ImportedFromIB2 - 134.IBPluginDependency - 134.ImportedFromIB2 - 136.IBPluginDependency - 136.ImportedFromIB2 - 143.IBPluginDependency - 143.ImportedFromIB2 - 144.IBPluginDependency - 144.ImportedFromIB2 - 145.IBPluginDependency - 145.ImportedFromIB2 - 149.IBPluginDependency - 149.ImportedFromIB2 - 150.IBPluginDependency - 150.ImportedFromIB2 - 157.IBPluginDependency - 157.ImportedFromIB2 - 163.IBPluginDependency - 163.ImportedFromIB2 - 169.IBEditorWindowLastContentRect - 169.IBPluginDependency - 169.ImportedFromIB2 - 169.editorWindowContentRectSynchronizationRect - 19.IBPluginDependency - 19.ImportedFromIB2 - 196.ImportedFromIB2 - 200295.IBPluginDependency - 200295.IBShouldRemoveOnLegacySave - 203.IBPluginDependency - 203.ImportedFromIB2 - 204.IBPluginDependency - 204.ImportedFromIB2 - 23.IBPluginDependency - 23.ImportedFromIB2 - 24.IBEditorWindowLastContentRect - 24.IBPluginDependency - 24.ImportedFromIB2 - 24.editorWindowContentRectSynchronizationRect - 244.IBEditorWindowLastContentRect - 244.IBPluginDependency - 244.IBWindowTemplateEditedContentRect - 244.ImportedFromIB2 - 244.editorWindowContentRectSynchronizationRect - 244.windowTemplate.hasMaxSize - 244.windowTemplate.hasMinSize - 244.windowTemplate.maxSize - 244.windowTemplate.minSize - 245.IBPluginDependency - 245.ImportedFromIB2 - 269.IBPluginDependency - 269.ImportedFromIB2 - 270.IBEditorWindowLastContentRect - 270.IBPluginDependency - 270.ImportedFromIB2 - 270.editorWindowContentRectSynchronizationRect - 272.IBPluginDependency - 272.ImportedFromIB2 - 285.IBEditorWindowLastContentRect - 285.IBPluginDependency - 285.IBViewEditorWindowController.showingBoundsRectangles - 285.IBViewEditorWindowController.showingLayoutRectangles - 285.IBWindowTemplateEditedContentRect - 285.ImportedFromIB2 - 285.editorWindowContentRectSynchronizationRect - 285.windowTemplate.hasMaxSize - 285.windowTemplate.hasMinSize - 285.windowTemplate.maxSize - 285.windowTemplate.minSize - 286.IBPluginDependency - 286.ImportedFromIB2 - 29.IBEditorWindowLastContentRect - 29.IBPluginDependency - 29.ImportedFromIB2 - 29.editorWindowContentRectSynchronizationRect - 292.IBPluginDependency - 292.ImportedFromIB2 - 293.IBPluginDependency - 293.ImportedFromIB2 - 295.IBPluginDependency - 295.ImportedFromIB2 - 296.IBPluginDependency - 296.ImportedFromIB2 - 297.IBPluginDependency - 297.ImportedFromIB2 - 298.IBPluginDependency - 298.ImportedFromIB2 - 300295.IBPluginDependency - 300295.IBShouldRemoveOnLegacySave - 300337.IBPluginDependency - 300337.ImportedFromIB2 - 300338.IBPluginDependency - 300338.ImportedFromIB2 - 300358.IBPluginDependency - 300358.ImportedFromIB2 - 300359.IBPluginDependency - 300359.ImportedFromIB2 - 300360.IBPluginDependency - 300361.IBPluginDependency - 300362.IBPluginDependency - 300362.ImportedFromIB2 - 300363.IBPluginDependency - 300364.IBPluginDependency - 300364.ImportedFromIB2 - 300365.IBPluginDependency - 300368.IBPluginDependency - 300368.ImportedFromIB2 - 300369.IBPluginDependency - 300370.IBPluginDependency - 300370.ImportedFromIB2 - 300371.IBPluginDependency - 300421.IBPluginDependency - 300421.ImportedFromIB2 - 300422.IBPluginDependency - 300422.ImportedFromIB2 - 300423.IBPluginDependency - 300423.ImportedFromIB2 - 300424.IBPluginDependency - 300424.ImportedFromIB2 - 300440.IBPluginDependency - 300441.IBPluginDependency - 300447.IBPluginDependency - 300447.ImportedFromIB2 - 300450.IBPluginDependency - 300451.IBPluginDependency - 300451.ImportedFromIB2 - 300452.IBPluginDependency - 300453.IBPluginDependency - 300453.ImportedFromIB2 - 300454.IBPluginDependency - 300455.IBPluginDependency - 300455.ImportedFromIB2 - 300456.IBPluginDependency - 300457.IBPluginDependency - 300457.ImportedFromIB2 - 300458.IBPluginDependency - 300459.IBPluginDependency - 300459.ImportedFromIB2 - 300460.IBPluginDependency - 300472.IBPluginDependency - 300472.ImportedFromIB2 - 300473.IBPluginDependency - 305.IBPluginDependency - 305.ImportedFromIB2 - 310.IBPluginDependency - 310.ImportedFromIB2 - 348.IBPluginDependency - 348.ImportedFromIB2 - 349.IBPluginDependency - 349.ImportedFromIB2 - 350.IBPluginDependency - 350.ImportedFromIB2 - 351.IBPluginDependency - 351.ImportedFromIB2 - 352.IBPluginDependency - 352.ImportedFromIB2 - 353.IBPluginDependency - 353.ImportedFromIB2 - 354.IBPluginDependency - 354.ImportedFromIB2 - 363.IBPluginDependency - 363.ImportedFromIB2 - 364.IBPluginDependency - 364.ImportedFromIB2 - 365.IBPluginDependency - 365.ImportedFromIB2 - 368.IBPluginDependency - 368.ImportedFromIB2 - 369.IBPluginDependency - 369.ImportedFromIB2 - 370.IBPluginDependency - 370.ImportedFromIB2 - 371.IBPluginDependency - 371.ImportedFromIB2 - 372.IBPluginDependency - 372.ImportedFromIB2 - 374.IBPluginDependency - 374.ImportedFromIB2 - 375.IBPluginDependency - 375.ImportedFromIB2 - 376.IBPluginDependency - 376.ImportedFromIB2 - 377.IBPluginDependency - 377.ImportedFromIB2 - 379.IBPluginDependency - 379.ImportedFromIB2 - 380.IBPluginDependency - 380.ImportedFromIB2 - 381.IBPluginDependency - 381.ImportedFromIB2 - 382.IBPluginDependency - 382.ImportedFromIB2 - 383.IBPluginDependency - 383.ImportedFromIB2 - 384.IBPluginDependency - 384.ImportedFromIB2 - 385.IBPluginDependency - 385.ImportedFromIB2 - 386.IBPluginDependency - 386.ImportedFromIB2 - 419.IBPluginDependency - 419.ImportedFromIB2 - 420.IBPluginDependency - 420.ImportedFromIB2 - 421.IBPluginDependency - 421.ImportedFromIB2 - 423.IBPluginDependency - 423.ImportedFromIB2 - 435.IBPluginDependency - 435.ImportedFromIB2 - 5.IBPluginDependency - 5.ImportedFromIB2 - 524.IBPluginDependency - 524.ImportedFromIB2 - 526.IBPluginDependency - 526.ImportedFromIB2 - 527.IBPluginDependency - 527.ImportedFromIB2 - 532.IBPluginDependency - 532.ImportedFromIB2 - 533.IBPluginDependency - 533.ImportedFromIB2 - 535.IBPluginDependency - 535.ImportedFromIB2 - 536.IBPluginDependency - 536.ImportedFromIB2 - 537.IBPluginDependency - 537.ImportedFromIB2 - 538.IBPluginDependency - 538.ImportedFromIB2 - 541.IBPluginDependency - 541.ImportedFromIB2 - 543.IBPluginDependency - 543.ImportedFromIB2 - 544.IBPluginDependency - 544.ImportedFromIB2 - 545.IBPluginDependency - 545.ImportedFromIB2 - 56.IBPluginDependency - 56.ImportedFromIB2 - 57.IBEditorWindowLastContentRect - 57.IBPluginDependency - 57.ImportedFromIB2 - 57.editorWindowContentRectSynchronizationRect - 573.IBPluginDependency - 573.ImportedFromIB2 - 574.IBPluginDependency - 574.ImportedFromIB2 - 575.IBPluginDependency - 575.ImportedFromIB2 - 58.IBPluginDependency - 58.ImportedFromIB2 - 92.IBPluginDependency - 92.ImportedFromIB2 - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{168, 821}, {113, 23}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{202, 626}, {154, 153}} - com.apple.InterfaceBuilder.CocoaPlugin - - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{349, 868}, {315, 143}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{271, 666}, {301, 153}} - {{437, 749}, {484, 308}} - com.apple.InterfaceBuilder.CocoaPlugin - {{437, 749}, {484, 308}} - - {{184, 290}, {481, 345}} - - - {3.40282e+38, 3.40282e+38} - {320, 240} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{58, 803}, {155, 33}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{100, 746}, {155, 33}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{68, 585}, {454, 271}} - com.apple.InterfaceBuilder.CocoaPlugin - - - {{68, 585}, {454, 271}} - - {{433, 406}, {486, 327}} - - - {3.40282e+38, 3.40282e+38} - {320, 240} - com.apple.InterfaceBuilder.CocoaPlugin - - {{145, 1011}, {336, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{67, 819}, {336, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{20, 641}, {218, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{79, 616}, {218, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - - - - YES - - - YES - + + 300476 + + + + + + + + 300477 + + + + + + + + 300478 + + + + + 300479 + + + + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{168, 821}, {113, 23}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{202, 626}, {154, 153}} + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{349, 868}, {315, 143}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{271, 666}, {301, 153}} + {{507, 548}, {484, 308}} + com.apple.InterfaceBuilder.CocoaPlugin + {{507, 548}, {484, 308}} + + {{184, 290}, {481, 345}} + + + {3.40282e+38, 3.40282e+38} + {320, 240} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{58, 803}, {155, 33}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{100, 746}, {155, 33}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{68, 585}, {454, 271}} + com.apple.InterfaceBuilder.CocoaPlugin + + + {{68, 585}, {454, 271}} + + {{433, 406}, {486, 327}} + + + {3.40282e+38, 3.40282e+38} + {320, 240} + com.apple.InterfaceBuilder.CocoaPlugin + + {{145, 1011}, {336, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{67, 819}, {336, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{20, 641}, {218, 203}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{79, 616}, {218, 203}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + - - YES - - - YES - - + - 300475 + 300481 - - YES + FirstResponder NSObject @@ -3897,19 +3577,21 @@ moTpvKDmoIfmjInplK7jgIIKA - + 0 + IBCocoaFramework com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - - com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 - + YES ../X11.xcodeproj 3 + + {9, 8} + {7, 2} + {15, 15} + diff --git a/xserver/hw/xquartz/bundle/Resources/zh_TW.lproj/locversion.plist b/xserver/hw/xquartz/bundle/Resources/zh_TW.lproj/locversion.plist index 5c24adfb9..77a4ffeab 100644 --- a/xserver/hw/xquartz/bundle/Resources/zh_TW.lproj/locversion.plist +++ b/xserver/hw/xquartz/bundle/Resources/zh_TW.lproj/locversion.plist @@ -3,12 +3,12 @@ LprojCompatibleVersion - 93 + 98 LprojLocale zh_TW LprojRevisionLevel 1 LprojVersion - 93 + 98 diff --git a/xserver/hw/xquartz/bundle/Resources/zh_TW.lproj/main.nib/designable.nib b/xserver/hw/xquartz/bundle/Resources/zh_TW.lproj/main.nib/designable.nib index 04ec5ce2d..0739b89a6 100644 --- a/xserver/hw/xquartz/bundle/Resources/zh_TW.lproj/main.nib/designable.nib +++ b/xserver/hw/xquartz/bundle/Resources/zh_TW.lproj/main.nib/designable.nib @@ -1,33 +1,23 @@ - + - 1050 - 11A79a - 732 - 1059 - 478.00 + 1040 + 11A194b + 787 + 1079 + 502.00 com.apple.InterfaceBuilder.CocoaPlugin - 732 + 787 - - YES - - - YES + + + + com.apple.InterfaceBuilder.CocoaPlugin - - - YES - - YES - - - YES - - - - YES + + + NSApplication @@ -41,8 +31,7 @@ MainMenu - - YES + X11 @@ -60,8 +49,7 @@ submenuAction: X11 - - YES + 關於 X11 @@ -101,9 +89,7 @@ submenuAction: 服務 - - YES - + _NSServicesMenu @@ -187,7 +173,7 @@ - + _NSAppleMenu @@ -202,8 +188,7 @@ submenuAction: 應用程式 - - YES + YES @@ -224,7 +209,7 @@ - + @@ -238,8 +223,7 @@ submenuAction: 編輯 - - YES + 拷貝 @@ -249,7 +233,7 @@ - + @@ -263,8 +247,7 @@ submenuAction: 視窗 - - YES + 關閉 @@ -341,7 +324,7 @@ - + _NSWindowsMenu @@ -356,8 +339,7 @@ submenuAction: 輔助說明 - - YES + X11 輔助說明 @@ -367,10 +349,10 @@ - + - + _NSMainMenu @@ -386,20 +368,20 @@ View - {1.7976931348623157e+308, 1.7976931348623157e+308} + + {3.4028235e+38, 3.4028235e+38} {320, 240} - + 256 - - YES + 256 {{13, 10}, {458, 292}} - - YES + + 1 @@ -407,13 +389,13 @@ 256 - - YES + 256 {{18, 210}, {402, 18}} + YES 67239424 @@ -427,7 +409,7 @@ 1211912703 2 - + NSImage NSSwitch @@ -445,6 +427,7 @@ 256 {{36, 92}, {399, 14}} + YES 67239424 @@ -463,7 +446,7 @@ controlColor 3 - MC42NjY2NjY2NjY3AA + MC42NjY2NjY2ODY1AA @@ -482,6 +465,7 @@ 256 {{36, 176}, {385, 28}} + YES 67239424 @@ -500,6 +484,7 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 256 {{18, 112}, {402, 18}} + YES 67239424 @@ -509,7 +494,7 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 1211912703 2 - + @@ -522,6 +507,7 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 256 {{36, 141}, {385, 14}} + YES 67239424 @@ -539,6 +525,7 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 256 {{18, 161}, {402, 18}} + YES 67239424 @@ -548,7 +535,7 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 1211912703 2 - + @@ -556,9 +543,50 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 25 - + + + 256 + {{36, 26}, {385, 31}} + + + YES + + 67239424 + 4194304 + 當啟用時,option 鍵會傳送 Alt_L 和 Alt_R X11 按鍵符號,而不是 Mode_switch。 + + + + + + + + + 256 + {{18, 63}, {402, 18}} + + + YES + + 67239424 + 0 + 讓 Option 鍵傳送 Alt_L 和 Alt_R + + + 1211912703 + 2 + + + + + 200 + 25 + + + {{10, 33}, {438, 246}} + 輸入 @@ -571,8 +599,7 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 256 - - YES + 256 @@ -587,7 +614,7 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 1211912703 2 - + @@ -615,7 +642,7 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 256 - {{63, 202}, {128, 26}} + {{55, 202}, {136, 26}} YES @@ -654,8 +681,7 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA OtherViews - - YES + @@ -693,7 +719,7 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 24 - + 3 YES @@ -710,7 +736,7 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 67239424 4194304 - 6aGP6Imy77yaCg + 顏色: @@ -749,7 +775,7 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 1211912703 2 - + @@ -771,7 +797,7 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 1211912703 2 - + @@ -796,7 +822,7 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA - + {{10, 33}, {438, 246}} 輸出 @@ -810,8 +836,7 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 256 - - YES + 256 @@ -826,7 +851,7 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 1211912703 2 - + @@ -864,7 +889,7 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 1211912703 2 - + @@ -886,7 +911,7 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 1211912703 2 - + @@ -908,7 +933,7 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 1211912703 2 - + @@ -930,7 +955,7 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 1211912703 2 - + @@ -970,7 +995,7 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA - + {{10, 33}, {438, 246}} 剪貼板 @@ -984,8 +1009,7 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 256 - - YES + 256 @@ -995,12 +1019,12 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 67239424 0 - 穿透至未啓用的視窗 + 穿透至未啟用的視窗 1211912703 2 - + @@ -1017,7 +1041,7 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 67239424 4194304 - 當啓用時,按一下未啓用的視窗將會使滑鼠按鍵穿透至該視窗並將其啓用。 + 當啟用時,按一下未啟用的視窗將會使滑鼠按鍵穿透至該視窗並將其啓用。 @@ -1038,7 +1062,7 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 1211912703 2 - + @@ -1076,7 +1100,7 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 1211912703 2 - + @@ -1093,14 +1117,14 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 67239424 4194304 - 當啓用時,新建的 X11 視窗將會使 X11.app(而不是 Finder.app、終端機.app 等)移至最前。 + 當啟用時,新增的 X11 視窗將會使 X11.app(而不是 Finder.app、終端機.app 等)移至最前。 - + {{10, 33}, {438, 246}} 視窗 @@ -1111,8 +1135,7 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 256 - - YES + 256 @@ -1127,7 +1150,7 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 1211912703 2 - + @@ -1149,7 +1172,7 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 1211912703 2 - + @@ -1208,30 +1231,31 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA - + {{10, 33}, {438, 246}} 安全性 - + 0 YES YES - - YES + - + - + {484, 308} + + {{0, 0}, {1440, 878}} {320, 262} - {1.7976931348623157e+308, 1.7976931348623157e+308} + {3.4028235e+38, 3.4028235e+38} x11_prefs @@ -1244,13 +1268,13 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA View - {1.7976931348623157e+308, 1.7976931348623157e+308} + + {3.4028235e+38, 3.4028235e+38} {320, 240} - + 256 - - YES + 265 @@ -1304,13 +1328,11 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 274 - - YES + 2304 - - YES + 256 @@ -1330,11 +1352,10 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA {{302, 0}, {16, 17}} - - YES + - 122.73099999999999 - 62.731000000000002 + 122.73100280761719 + 62.730998992919922 1000 75628096 @@ -1343,7 +1364,7 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 3 - MC4zMzMzMzI5OQA + MC4zMzMzMzI5ODU2AA 6 @@ -1439,7 +1460,7 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA YES - + 3 2 @@ -1462,7 +1483,7 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA YES 0 - + {{1, 17}, {301, 198}} @@ -1477,7 +1498,7 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA _doScroller: - 0.99492380000000002 + 0.99492377042770386 @@ -1487,15 +1508,14 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 1 _doScroller: - 0.68852460000000004 + 0.68852460384368896 2304 - - YES + - + {{1, 0}, {301, 17}} @@ -1504,7 +1524,7 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 4 - + {{20, 20}, {318, 231}} @@ -1539,18 +1559,18 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 25 - + {454, 271} + {{0, 0}, {1440, 878}} {320, 262} - {1.7976931348623157e+308, 1.7976931348623157e+308} + {3.4028235e+38, 3.4028235e+38} x11_apps 選單 - - YES + YES @@ -1573,8 +1593,7 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA submenuAction: 應用程式 - - YES + YES @@ -1595,16 +1614,15 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA - + - + - + - - YES + copy: @@ -2149,13 +2167,28 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 300475 - + + + prefs_changed: + + + + 300480 + + + + option_sends_alt + + + + 300481 + + - - YES + 0 - + @@ -2180,31 +2213,28 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 29 - - YES + - + MainMenu 19 - - YES + - + 24 - - YES + @@ -2213,7 +2243,7 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA - + @@ -2259,17 +2289,15 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 56 - - YES + - + 57 - - YES + @@ -2282,7 +2310,7 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA - + @@ -2298,10 +2326,9 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 131 - - YES + - + @@ -2357,19 +2384,17 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 163 - - YES + - + 169 - - YES + - + @@ -2380,20 +2405,18 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 269 - - YES + - + 270 - - YES + - + @@ -2409,19 +2432,17 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 419 - - YES + - + 420 - - YES + - + @@ -2438,126 +2459,115 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 244 - - YES + - + PrefsPanel 245 - - YES + - + 348 - - YES + - + 349 - - YES + - + 351 - - YES + - + + + 363 - - YES + - + 364 - - YES + - + 365 - - YES + - + 368 - - YES + - + 369 - - YES + - + 370 - - YES + - + 352 - - YES + - + 350 - - YES + @@ -2566,169 +2576,152 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA - + 371 - - YES + - + 372 - - YES + - + 382 - - YES + - + 385 - - YES + - + 386 - - YES + - + 541 - - YES + - + 543 - - YES + - + 353 - - YES + - + 354 - - YES + - + 374 - - YES + - + 375 - - YES + - + 376 - - YES + - + 377 - - YES + - + 379 - - YES + - + 285 - - YES + - + EditPrograms 286 - - YES + - + 423 - - YES + - + DockMenu @@ -2740,20 +2733,18 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 526 - - YES + - + 527 - - YES + - + @@ -2809,10 +2800,9 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 100382 - - YES + - + @@ -2863,13 +2853,12 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 380 - - YES + - + @@ -2895,13 +2884,12 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 295 - - YES + - + @@ -2922,21 +2910,19 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 296 - - YES + - + 535 - - YES + - + @@ -2947,10 +2933,9 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 298 - - YES + - + @@ -2961,10 +2946,9 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 297 - - YES + - + @@ -2975,10 +2959,9 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 310 - - YES + - + @@ -2989,10 +2972,9 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 292 - - YES + - + @@ -3003,10 +2985,9 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 293 - - YES + - + @@ -3017,42 +2998,38 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 300337 - - YES + - + 300338 - - YES + - + 300358 - - YES + - + 300359 - - YES + - + @@ -3068,10 +3045,9 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 300362 - - YES + - + @@ -3082,10 +3058,9 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 300364 - - YES + - + @@ -3096,10 +3071,9 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 300368 - - YES + - + @@ -3110,10 +3084,9 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 300370 - - YES + - + @@ -3124,17 +3097,15 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 300421 - - YES + - + 300422 - - YES + @@ -3143,25 +3114,23 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA - + 300423 - - YES + - + 300424 - - YES + - + @@ -3177,10 +3146,9 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 300447 - - YES + - + @@ -3191,10 +3159,9 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 300451 - - YES + - + @@ -3205,10 +3172,9 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 300453 - - YES + - + @@ -3219,10 +3185,9 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 300455 - - YES + - + @@ -3233,10 +3198,9 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 300457 - - YES + - + @@ -3247,10 +3211,9 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 300459 - - YES + - + @@ -3261,10 +3224,9 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA 300472 - - YES + - + @@ -3272,604 +3234,336 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA - - - - YES - - YES - -3.IBPluginDependency - -3.ImportedFromIB2 - 100292.IBPluginDependency - 100293.IBPluginDependency - 100295.IBPluginDependency - 100295.IBShouldRemoveOnLegacySave - 100310.IBPluginDependency - 100363.IBPluginDependency - 100364.IBPluginDependency - 100365.IBPluginDependency - 100368.IBPluginDependency - 100369.IBPluginDependency - 100370.IBPluginDependency - 100371.IBPluginDependency - 100372.IBPluginDependency - 100374.IBPluginDependency - 100375.IBPluginDependency - 100376.IBPluginDependency - 100377.IBPluginDependency - 100379.IBPluginDependency - 100382.IBPluginDependency - 100385.IBPluginDependency - 100386.IBPluginDependency - 100541.IBPluginDependency - 100543.IBPluginDependency - 129.IBPluginDependency - 129.ImportedFromIB2 - 130.IBPluginDependency - 130.ImportedFromIB2 - 131.IBPluginDependency - 131.ImportedFromIB2 - 134.IBPluginDependency - 134.ImportedFromIB2 - 136.IBPluginDependency - 136.ImportedFromIB2 - 143.IBPluginDependency - 143.ImportedFromIB2 - 144.IBPluginDependency - 144.ImportedFromIB2 - 145.IBPluginDependency - 145.ImportedFromIB2 - 149.IBPluginDependency - 149.ImportedFromIB2 - 150.IBPluginDependency - 150.ImportedFromIB2 - 157.IBPluginDependency - 157.ImportedFromIB2 - 163.IBPluginDependency - 163.ImportedFromIB2 - 169.IBEditorWindowLastContentRect - 169.IBPluginDependency - 169.ImportedFromIB2 - 169.editorWindowContentRectSynchronizationRect - 19.IBPluginDependency - 19.ImportedFromIB2 - 196.ImportedFromIB2 - 200295.IBPluginDependency - 200295.IBShouldRemoveOnLegacySave - 203.IBPluginDependency - 203.ImportedFromIB2 - 204.IBPluginDependency - 204.ImportedFromIB2 - 23.IBPluginDependency - 23.ImportedFromIB2 - 24.IBEditorWindowLastContentRect - 24.IBPluginDependency - 24.ImportedFromIB2 - 24.editorWindowContentRectSynchronizationRect - 244.IBEditorWindowLastContentRect - 244.IBPluginDependency - 244.IBWindowTemplateEditedContentRect - 244.ImportedFromIB2 - 244.editorWindowContentRectSynchronizationRect - 244.windowTemplate.hasMaxSize - 244.windowTemplate.hasMinSize - 244.windowTemplate.maxSize - 244.windowTemplate.minSize - 245.IBPluginDependency - 245.ImportedFromIB2 - 269.IBPluginDependency - 269.ImportedFromIB2 - 270.IBEditorWindowLastContentRect - 270.IBPluginDependency - 270.ImportedFromIB2 - 270.editorWindowContentRectSynchronizationRect - 272.IBPluginDependency - 272.ImportedFromIB2 - 285.IBEditorWindowLastContentRect - 285.IBPluginDependency - 285.IBViewEditorWindowController.showingBoundsRectangles - 285.IBViewEditorWindowController.showingLayoutRectangles - 285.IBWindowTemplateEditedContentRect - 285.ImportedFromIB2 - 285.editorWindowContentRectSynchronizationRect - 285.windowTemplate.hasMaxSize - 285.windowTemplate.hasMinSize - 285.windowTemplate.maxSize - 285.windowTemplate.minSize - 286.IBPluginDependency - 286.ImportedFromIB2 - 29.IBEditorWindowLastContentRect - 29.IBPluginDependency - 29.ImportedFromIB2 - 29.editorWindowContentRectSynchronizationRect - 292.IBPluginDependency - 292.ImportedFromIB2 - 293.IBPluginDependency - 293.ImportedFromIB2 - 295.IBPluginDependency - 295.ImportedFromIB2 - 296.IBPluginDependency - 296.ImportedFromIB2 - 297.IBPluginDependency - 297.ImportedFromIB2 - 298.IBPluginDependency - 298.ImportedFromIB2 - 300295.IBPluginDependency - 300295.IBShouldRemoveOnLegacySave - 300337.IBPluginDependency - 300337.ImportedFromIB2 - 300338.IBPluginDependency - 300338.ImportedFromIB2 - 300358.IBPluginDependency - 300358.ImportedFromIB2 - 300359.IBPluginDependency - 300359.ImportedFromIB2 - 300360.IBPluginDependency - 300361.IBPluginDependency - 300362.IBPluginDependency - 300362.ImportedFromIB2 - 300363.IBPluginDependency - 300364.IBPluginDependency - 300364.ImportedFromIB2 - 300365.IBPluginDependency - 300368.IBPluginDependency - 300368.ImportedFromIB2 - 300369.IBPluginDependency - 300370.IBPluginDependency - 300370.ImportedFromIB2 - 300371.IBPluginDependency - 300421.IBPluginDependency - 300421.ImportedFromIB2 - 300422.IBPluginDependency - 300422.ImportedFromIB2 - 300423.IBPluginDependency - 300423.ImportedFromIB2 - 300424.IBPluginDependency - 300424.ImportedFromIB2 - 300440.IBPluginDependency - 300441.IBPluginDependency - 300447.IBPluginDependency - 300447.ImportedFromIB2 - 300450.IBPluginDependency - 300451.IBPluginDependency - 300451.ImportedFromIB2 - 300452.IBPluginDependency - 300453.IBPluginDependency - 300453.ImportedFromIB2 - 300454.IBPluginDependency - 300455.IBPluginDependency - 300455.ImportedFromIB2 - 300456.IBPluginDependency - 300457.IBPluginDependency - 300457.ImportedFromIB2 - 300458.IBPluginDependency - 300459.IBPluginDependency - 300459.ImportedFromIB2 - 300460.IBPluginDependency - 300472.IBPluginDependency - 300472.ImportedFromIB2 - 300473.IBPluginDependency - 305.IBPluginDependency - 305.ImportedFromIB2 - 310.IBPluginDependency - 310.ImportedFromIB2 - 348.IBPluginDependency - 348.ImportedFromIB2 - 349.IBPluginDependency - 349.ImportedFromIB2 - 350.IBPluginDependency - 350.ImportedFromIB2 - 351.IBPluginDependency - 351.ImportedFromIB2 - 352.IBPluginDependency - 352.ImportedFromIB2 - 353.IBPluginDependency - 353.ImportedFromIB2 - 354.IBPluginDependency - 354.ImportedFromIB2 - 363.IBPluginDependency - 363.ImportedFromIB2 - 364.IBPluginDependency - 364.ImportedFromIB2 - 365.IBPluginDependency - 365.ImportedFromIB2 - 368.IBPluginDependency - 368.ImportedFromIB2 - 369.IBPluginDependency - 369.ImportedFromIB2 - 370.IBPluginDependency - 370.ImportedFromIB2 - 371.IBPluginDependency - 371.ImportedFromIB2 - 372.IBPluginDependency - 372.ImportedFromIB2 - 374.IBPluginDependency - 374.ImportedFromIB2 - 375.IBPluginDependency - 375.ImportedFromIB2 - 376.IBPluginDependency - 376.ImportedFromIB2 - 377.IBPluginDependency - 377.ImportedFromIB2 - 379.IBPluginDependency - 379.ImportedFromIB2 - 380.IBPluginDependency - 380.ImportedFromIB2 - 381.IBPluginDependency - 381.ImportedFromIB2 - 382.IBPluginDependency - 382.ImportedFromIB2 - 383.IBPluginDependency - 383.ImportedFromIB2 - 384.IBPluginDependency - 384.ImportedFromIB2 - 385.IBPluginDependency - 385.ImportedFromIB2 - 386.IBPluginDependency - 386.ImportedFromIB2 - 419.IBPluginDependency - 419.ImportedFromIB2 - 420.IBPluginDependency - 420.ImportedFromIB2 - 421.IBPluginDependency - 421.ImportedFromIB2 - 423.IBPluginDependency - 423.ImportedFromIB2 - 435.IBPluginDependency - 435.ImportedFromIB2 - 5.IBPluginDependency - 5.ImportedFromIB2 - 524.IBPluginDependency - 524.ImportedFromIB2 - 526.IBPluginDependency - 526.ImportedFromIB2 - 527.IBPluginDependency - 527.ImportedFromIB2 - 532.IBPluginDependency - 532.ImportedFromIB2 - 533.IBPluginDependency - 533.ImportedFromIB2 - 535.IBPluginDependency - 535.ImportedFromIB2 - 536.IBPluginDependency - 536.ImportedFromIB2 - 537.IBPluginDependency - 537.ImportedFromIB2 - 538.IBPluginDependency - 538.ImportedFromIB2 - 541.IBPluginDependency - 541.ImportedFromIB2 - 543.IBPluginDependency - 543.ImportedFromIB2 - 544.IBPluginDependency - 544.ImportedFromIB2 - 545.IBPluginDependency - 545.ImportedFromIB2 - 56.IBPluginDependency - 56.ImportedFromIB2 - 57.IBEditorWindowLastContentRect - 57.IBPluginDependency - 57.ImportedFromIB2 - 57.editorWindowContentRectSynchronizationRect - 573.IBPluginDependency - 573.ImportedFromIB2 - 574.IBPluginDependency - 574.ImportedFromIB2 - 575.IBPluginDependency - 575.ImportedFromIB2 - 58.IBPluginDependency - 58.ImportedFromIB2 - 92.IBPluginDependency - 92.ImportedFromIB2 - - - YES - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{168, 821}, {113, 23}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{202, 626}, {154, 153}} - com.apple.InterfaceBuilder.CocoaPlugin - - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{349, 868}, {315, 143}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{271, 666}, {301, 153}} - {{437, 749}, {484, 308}} - com.apple.InterfaceBuilder.CocoaPlugin - {{437, 749}, {484, 308}} - - {{184, 290}, {481, 345}} - - - {3.40282e+38, 3.40282e+38} - {320, 240} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{58, 803}, {155, 33}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{100, 746}, {155, 33}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{68, 585}, {454, 271}} - com.apple.InterfaceBuilder.CocoaPlugin - - - {{68, 585}, {454, 271}} - - {{433, 406}, {486, 327}} - - - {3.40282e+38, 3.40282e+38} - {320, 240} - com.apple.InterfaceBuilder.CocoaPlugin - - {{145, 1011}, {336, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{67, 819}, {336, 20}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - {{20, 641}, {218, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - {{79, 616}, {218, 203}} - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - com.apple.InterfaceBuilder.CocoaPlugin - - - - - YES - - - YES - + + 300476 + + + + + + + + 300477 + + + + + + + + 300478 + + + + + 300479 + + + + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{168, 821}, {113, 23}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{202, 626}, {154, 153}} + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{349, 868}, {315, 143}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{271, 666}, {301, 153}} + {{507, 548}, {484, 308}} + com.apple.InterfaceBuilder.CocoaPlugin + {{507, 548}, {484, 308}} + + {{184, 290}, {481, 345}} + + + {3.40282e+38, 3.40282e+38} + {320, 240} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{58, 803}, {155, 33}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{100, 746}, {155, 33}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{68, 585}, {454, 271}} + com.apple.InterfaceBuilder.CocoaPlugin + + + {{68, 585}, {454, 271}} + + {{433, 406}, {486, 327}} + + + {3.40282e+38, 3.40282e+38} + {320, 240} + com.apple.InterfaceBuilder.CocoaPlugin + + {{145, 1011}, {336, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{67, 819}, {336, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + IBBuiltInLabel-Red + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{20, 641}, {218, 203}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{79, 616}, {218, 203}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + + - - YES - - - YES - - + - 300475 + 300481 - - YES + FirstResponder NSObject @@ -3894,19 +3588,21 @@ vKDnmoTkuK3plpPmiJblj7PpgormjInpiJXjgIIKA - + 0 + IBCocoaFramework com.apple.InterfaceBuilder.CocoaPlugin.macosx - - - - com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 - + YES ../X11.xcodeproj 3 + + {9, 8} + {7, 2} + {15, 15} + diff --git a/xserver/hw/xquartz/darwin.c b/xserver/hw/xquartz/darwin.c index d3f448820..a99c0f155 100644 --- a/xserver/hw/xquartz/darwin.c +++ b/xserver/hw/xquartz/darwin.c @@ -84,8 +84,7 @@ FILE *debug_log_fp = NULL; * X server shared global variables */ int darwinScreensFound = 0; -static int darwinScreenKeyIndex; -DevPrivateKey darwinScreenKey = &darwinScreenKeyIndex; +DevPrivateKeyRec darwinScreenKeyRec; io_connect_t darwinParamConnect = 0; int darwinEventReadFD = -1; int darwinEventWriteFD = -1; @@ -185,6 +184,9 @@ static Bool DarwinScreenInit(int index, ScreenPtr pScreen, int argc, char **argv Bool ret; DarwinFramebufferPtr dfb; + if (!dixRegisterPrivateKey(&darwinScreenKeyRec, PRIVATE_SCREEN, 0)) + return FALSE; + // reset index of found screens for each server generation if (index == 0) { foundIndex = 0; @@ -194,7 +196,7 @@ static Bool DarwinScreenInit(int index, ScreenPtr pScreen, int argc, char **argv } // allocate space for private per screen storage - dfb = xalloc(sizeof(DarwinFramebufferRec)); + dfb = malloc(sizeof(DarwinFramebufferRec)); // SCREEN_PRIV(pScreen) = dfb; dixSetPrivate(&pScreen->devPrivates, darwinScreenKey, dfb); @@ -240,11 +242,9 @@ static Bool DarwinScreenInit(int index, ScreenPtr pScreen, int argc, char **argv return FALSE; } -#ifdef RENDER if (! fbPictureInit(pScreen, 0, 0)) { return FALSE; } -#endif #ifdef MITSHM ShmRegisterFbFuncs(pScreen); @@ -264,8 +264,8 @@ static Bool DarwinScreenInit(int index, ScreenPtr pScreen, int argc, char **argv return FALSE; } - dixScreenOrigins[index].x = dfb->x; - dixScreenOrigins[index].y = dfb->y; + pScreen->x = dfb->x; + pScreen->y = dfb->y; /* ErrorF("Screen %d added: %dx%d @ (%d,%d)\n", index, dfb->width, dfb->height, dfb->x, dfb->y); */ @@ -528,16 +528,16 @@ DarwinAdjustScreenOrigins(ScreenInfo *pScreenInfo) { int i, left, top; - left = dixScreenOrigins[0].x; - top = dixScreenOrigins[0].y; + left = pScreenInfo->screens[0]->x; + top = pScreenInfo->screens[0]->y; /* Find leftmost screen. If there's a tie, take the topmost of the two. */ for (i = 1; i < pScreenInfo->numScreens; i++) { - if (dixScreenOrigins[i].x < left || - (dixScreenOrigins[i].x == left && dixScreenOrigins[i].y < top)) + if (pScreenInfo->screens[i]->x < left || + (pScreenInfo->screens[i]->x == left && pScreenInfo->screens[i]->y < top)) { - left = dixScreenOrigins[i].x; - top = dixScreenOrigins[i].y; + left = pScreenInfo->screens[i]->x; + top = pScreenInfo->screens[i]->y; } } @@ -553,10 +553,10 @@ DarwinAdjustScreenOrigins(ScreenInfo *pScreenInfo) if (darwinMainScreenX != 0 || darwinMainScreenY != 0) { for (i = 0; i < pScreenInfo->numScreens; i++) { - dixScreenOrigins[i].x -= darwinMainScreenX; - dixScreenOrigins[i].y -= darwinMainScreenY; + pScreenInfo->screens[i]->x -= darwinMainScreenX; + pScreenInfo->screens[i]->y -= darwinMainScreenY; DEBUG_LOG("Screen %d placed at X11 coordinate (%d,%d).\n", - i, dixScreenOrigins[i].x, dixScreenOrigins[i].y); + i, pScreenInfo->screens[i]->x, pScreenInfo->screens[i]->y); } } } @@ -795,7 +795,7 @@ void AbortDDX( void ) void xf86SetRootClip (ScreenPtr pScreen, int enable) { - WindowPtr pWin = WindowTable[pScreen->myNum]; + WindowPtr pWin = pScreen->root; WindowPtr pChild; Bool WasViewable = (Bool)(pWin->viewable); Bool anyMarked = TRUE; @@ -819,8 +819,8 @@ xf86SetRootClip (ScreenPtr pScreen, int enable) { RegionPtr borderVisible; - borderVisible = REGION_CREATE(pScreen, NullBox, 1); - REGION_SUBTRACT(pScreen, borderVisible, + borderVisible = RegionCreate(NullBox, 1); + RegionSubtract(borderVisible, &pWin->borderClip, &pWin->winSize); pWin->valdata->before.borderVisible = borderVisible; } @@ -839,13 +839,13 @@ xf86SetRootClip (ScreenPtr pScreen, int enable) box.y1 = 0; box.x2 = pScreen->width; box.y2 = pScreen->height; - REGION_RESET(pScreen, &pWin->borderClip, &box); - REGION_BREAK (pWin->drawable.pScreen, &pWin->clipList); + RegionReset(&pWin->borderClip, &box); + RegionBreak(&pWin->clipList); } else { - REGION_EMPTY(pScreen, &pWin->borderClip); - REGION_BREAK (pWin->drawable.pScreen, &pWin->clipList); + RegionEmpty(&pWin->borderClip); + RegionBreak(&pWin->clipList); } ResizeChildrenWinSize (pWin, 0, 0, 0, 0); @@ -854,8 +854,8 @@ xf86SetRootClip (ScreenPtr pScreen, int enable) { if (pWin->backStorage) { - pOldClip = REGION_CREATE(pScreen, NullBox, 1); - REGION_COPY(pScreen, pOldClip, &pWin->clipList); + pOldClip = RegionCreate(NullBox, 1); + RegionCopy(pOldClip, &pWin->clipList); } if (pWin->firstChild) @@ -884,7 +884,7 @@ xf86SetRootClip (ScreenPtr pScreen, int enable) (pWin, 0, 0, pOldClip, pWin->drawable.x, pWin->drawable.y); if (WasViewable) - REGION_DESTROY(pScreen, pOldClip); + RegionDestroy(pOldClip); if (bsExposed) { RegionPtr valExposed = NullRegion; @@ -893,8 +893,8 @@ xf86SetRootClip (ScreenPtr pScreen, int enable) valExposed = &pWin->valdata->after.exposed; (*pScreen->WindowExposures) (pWin, valExposed, bsExposed); if (valExposed) - REGION_EMPTY(pScreen, valExposed); - REGION_DESTROY(pScreen, bsExposed); + RegionEmpty(valExposed); + RegionDestroy(bsExposed); } } if (WasViewable) diff --git a/xserver/hw/xquartz/darwin.h b/xserver/hw/xquartz/darwin.h index 8fa48bfeb..350eadeb6 100644 --- a/xserver/hw/xquartz/darwin.h +++ b/xserver/hw/xquartz/darwin.h @@ -50,7 +50,8 @@ void xf86SetRootClip (ScreenPtr pScreen, int enable); /* * Global variables from darwin.c */ -extern DevPrivateKey darwinScreenKey; // index into pScreen.devPrivates +extern DevPrivateKeyRec darwinScreenKeyRec; +#define darwinScreenKey (&darwinScreenKeyRec) extern int darwinScreensFound; extern io_connect_t darwinParamConnect; extern int darwinEventReadFD; diff --git a/xserver/hw/xquartz/darwinEvents.c b/xserver/hw/xquartz/darwinEvents.c index 421efcedf..74fadf465 100644 --- a/xserver/hw/xquartz/darwinEvents.c +++ b/xserver/hw/xquartz/darwinEvents.c @@ -52,6 +52,7 @@ in this Software without prior written authorization from The Open Group. #include "darwin.h" #include "quartz.h" #include "quartzKeyboard.h" +#include "quartzRandR.h" #include "darwinEvents.h" #include @@ -238,19 +239,19 @@ static void DarwinEventHandler(int screenNum, InternalEvent *ie, DeviceIntPtr de case kXquartzToggleFullscreen: DEBUG_LOG("kXquartzToggleFullscreen\n"); - if (quartzEnableRootless) - QuartzSetFullscreen(!quartzHasRoot); - else if (quartzHasRoot) - QuartzHide(); - else - QuartzShow(); + if(XQuartzIsRootless) + ErrorF("Ignoring kXquartzToggleFullscreen because of rootless mode."); + else + QuartzRandRToggleFullscreen(); break; case kXquartzSetRootless: DEBUG_LOG("kXquartzSetRootless\n"); - QuartzSetRootless(e->data[0]); - if (!quartzEnableRootless && !quartzHasRoot) - QuartzHide(); + if(e->data[0]) { + QuartzRandRSetFakeRootless(); + } else { + QuartzRandRSetFakeFullscreen(FALSE); + } break; case kXquartzSetRootClip: @@ -276,7 +277,12 @@ static void DarwinEventHandler(int screenNum, InternalEvent *ie, DeviceIntPtr de break; case kXquartzDisplayChanged: + DEBUG_LOG("kXquartzDisplayChanged\n"); QuartzUpdateScreens(); +#ifdef RANDR + /* Update our RandR info */ + QuartzRandRUpdateFakeModes(TRUE); +#endif break; default: @@ -377,8 +383,8 @@ static void DarwinPrepareValuators(DeviceIntPtr pDev, int *valuators, ScreenPtr float pointer_x, float pointer_y, float pressure, float tilt_x, float tilt_y) { /* Fix offset between darwin and X screens */ - pointer_x -= darwinMainScreenX + dixScreenOrigins[screen->myNum].x; - pointer_y -= darwinMainScreenY + dixScreenOrigins[screen->myNum].y; + pointer_x -= darwinMainScreenX + screen->x; + pointer_y -= darwinMainScreenY + screen->y; if(pointer_x < 0.0) pointer_x = 0.0; diff --git a/xserver/hw/xquartz/darwinXinput.c b/xserver/hw/xquartz/darwinXinput.c index 90e440e54..19aefb153 100644 --- a/xserver/hw/xquartz/darwinXinput.c +++ b/xserver/hw/xquartz/darwinXinput.c @@ -210,14 +210,14 @@ ChangeDeviceControl(ClientPtr client, DeviceIntPtr dev, DEBUG_LOG("ChangeDeviceControl(%p, %p, %p)\n", client, dev, control); switch (control->control) { case DEVICE_RESOLUTION: - return (BadMatch); + return BadMatch; case DEVICE_ABS_CALIB: case DEVICE_ABS_AREA: - return (BadMatch); + return BadMatch; case DEVICE_CORE: - return (BadMatch); + return BadMatch; default: - return (BadMatch); + return BadMatch; } } diff --git a/xserver/hw/xquartz/doc/Makefile.in b/xserver/hw/xquartz/doc/Makefile.in index d1c0f2441..1837673e7 100644 --- a/xserver/hw/xquartz/doc/Makefile.in +++ b/xserver/hw/xquartz/doc/Makefile.in @@ -107,10 +107,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -198,6 +194,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -212,6 +210,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -229,10 +228,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -288,10 +291,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -309,17 +313,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -346,20 +344,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -451,6 +452,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/xquartz/mach-startup/Makefile.in b/xserver/hw/xquartz/mach-startup/Makefile.in index 93a3cff6b..f8ba5b90d 100644 --- a/xserver/hw/xquartz/mach-startup/Makefile.in +++ b/xserver/hw/xquartz/mach-startup/Makefile.in @@ -145,10 +145,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -236,6 +232,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -250,6 +248,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -267,10 +266,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -326,10 +329,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -347,17 +351,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -384,20 +382,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -489,6 +490,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/xquartz/mach-startup/bundle-main.c b/xserver/hw/xquartz/mach-startup/bundle-main.c index 63a185fc8..6f7bbfdc2 100644 --- a/xserver/hw/xquartz/mach-startup/bundle-main.c +++ b/xserver/hw/xquartz/mach-startup/bundle-main.c @@ -641,7 +641,7 @@ static int execute(const char *command) { execvp (newargv[0], (char * const *) newargv); perror ("X11.app: Couldn't exec."); - return(1); + return 1; } static char *command_from_prefs(const char *key, const char *default_value) { diff --git a/xserver/hw/xquartz/mach-startup/launchd_fd.h b/xserver/hw/xquartz/mach-startup/launchd_fd.h index 5083fae21..12caf7193 100644 --- a/xserver/hw/xquartz/mach-startup/launchd_fd.h +++ b/xserver/hw/xquartz/mach-startup/launchd_fd.h @@ -33,4 +33,4 @@ int launchd_display_fd(void); -#endif /* _XQUARTZ_LAUNCHD_FD_H_ */ \ No newline at end of file +#endif /* _XQUARTZ_LAUNCHD_FD_H_ */ diff --git a/xserver/hw/xquartz/pbproxy/Makefile.in b/xserver/hw/xquartz/pbproxy/Makefile.in index 73b0df76d..d21311ac9 100644 --- a/xserver/hw/xquartz/pbproxy/Makefile.in +++ b/xserver/hw/xquartz/pbproxy/Makefile.in @@ -124,10 +124,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -215,6 +211,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -229,6 +227,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -246,10 +245,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -305,10 +308,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -326,17 +330,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -363,20 +361,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -468,6 +469,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/xquartz/pbproxy/main.m b/xserver/hw/xquartz/pbproxy/main.m index 560cf0182..bb0646502 100644 --- a/xserver/hw/xquartz/pbproxy/main.m +++ b/xserver/hw/xquartz/pbproxy/main.m @@ -75,6 +75,8 @@ static int x_io_error_handler (Display *dpy) { exit(EXIT_FAILURE); #endif + /* Prevent _XIOError from calling exit() */ + pthread_exit(NULL); return 0; } diff --git a/xserver/hw/xquartz/pseudoramiX.c b/xserver/hw/xquartz/pseudoramiX.c index 1de7af6dc..298ec2be9 100644 --- a/xserver/hw/xquartz/pseudoramiX.c +++ b/xserver/hw/xquartz/pseudoramiX.c @@ -94,7 +94,7 @@ PseudoramiXAddScreen(int x, int y, int w, int h) if (pseudoramiXNumScreens == pseudoramiXScreensAllocated) { pseudoramiXScreensAllocated += pseudoramiXScreensAllocated + 1; - pseudoramiXScreens = xrealloc(pseudoramiXScreens, + pseudoramiXScreens = realloc(pseudoramiXScreens, pseudoramiXScreensAllocated * sizeof(PseudoramiXScreenRec)); } @@ -202,7 +202,7 @@ static int ProcPseudoramiXGetState(ClientPtr client) swaps (&rep.state, n); } WriteToClient (client, sizeof (xPanoramiXGetStateReply), (char *) &rep); - return client->noClientException; + return Success; } @@ -231,7 +231,7 @@ static int ProcPseudoramiXGetScreenCount(ClientPtr client) swaps (&rep.ScreenCount, n); } WriteToClient (client, sizeof(xPanoramiXGetScreenCountReply), (char *)&rep); - return client->noClientException; + return Success; } @@ -255,9 +255,9 @@ static int ProcPseudoramiXGetScreenSize(ClientPtr client) rep.sequenceNumber = client->sequence; /* screen dimensions */ rep.width = pseudoramiXScreens[stuff->screen].w; - // was panoramiXdataPtr[stuff->screen].width; + // was screenInfo.screens[stuff->screen]->width; rep.height = pseudoramiXScreens[stuff->screen].h; - // was panoramiXdataPtr[stuff->screen].height; + // was screenInfo.screens[stuff->screen]->height; if (client->swapped) { swaps (&rep.sequenceNumber, n); swapl (&rep.length, n); @@ -265,7 +265,7 @@ static int ProcPseudoramiXGetScreenSize(ClientPtr client) swaps (&rep.height, n); } WriteToClient (client, sizeof(xPanoramiXGetScreenSizeReply), (char *)&rep); - return client->noClientException; + return Success; } @@ -290,7 +290,7 @@ static int ProcPseudoramiXIsActive(ClientPtr client) swapl (&rep.state, n); } WriteToClient (client, sizeof (xXineramaIsActiveReply), (char *) &rep); - return client->noClientException; + return Success; } @@ -337,7 +337,7 @@ static int ProcPseudoramiXQueryScreens(ClientPtr client) } } - return client->noClientException; + return Success; } diff --git a/xserver/hw/xquartz/quartz.c b/xserver/hw/xquartz/quartz.c index a8c0d4b47..e21303ccd 100644 --- a/xserver/hw/xquartz/quartz.c +++ b/xserver/hw/xquartz/quartz.c @@ -35,6 +35,7 @@ #endif #include "quartzCommon.h" +#include "quartzRandR.h" #include "inputstr.h" #include "quartz.h" #include "darwin.h" @@ -46,7 +47,6 @@ #include "X11Application.h" #include -#include // X headers #include "scrnintstr.h" @@ -56,6 +56,8 @@ #include "mi.h" // System headers +#include +#include #include #include #include @@ -64,46 +66,20 @@ #include #include -#define FAKE_RANDR 1 - -// Shared global variables for Quartz modes -int quartzEventWriteFD = -1; -int quartzUseSysBeep = 0; -int quartzUseAGL = 1; -int quartzEnableKeyEquivalents = 1; -int quartzServerVisible = FALSE; -int quartzServerQuitting = FALSE; -static int quartzScreenKeyIndex; -DevPrivateKey quartzScreenKey = &quartzScreenKeyIndex; +DevPrivateKeyRec quartzScreenKeyRec; int aquaMenuBarHeight = 0; QuartzModeProcsPtr quartzProcs = NULL; const char *quartzOpenGLBundle = NULL; -int quartzFullscreenDisableHotkeys = TRUE; -int quartzOptionSendsAlt = FALSE; -#if defined(RANDR) && !defined(FAKE_RANDR) -Bool QuartzRandRGetInfo (ScreenPtr pScreen, Rotation *rotations) { - return FALSE; -} - -Bool QuartzRandRSetConfig (ScreenPtr pScreen, - Rotation randr, - int rate, - RRScreenSizePtr pSize) { - return FALSE; -} - -Bool QuartzRandRInit (ScreenPtr pScreen) { - rrScrPrivPtr pScrPriv; - - if (!RRScreenInit (pScreen)) return FALSE; - - pScrPriv = rrGetScrPriv(pScreen); - pScrPriv->rrGetInfo = QuartzRandRGetInfo; - pScrPriv->rrSetConfig = QuartzRandRSetConfig; - return TRUE; -} -#endif +Bool XQuartzFullscreenDisableHotkeys = TRUE; +Bool XQuartzOptionSendsAlt = FALSE; +Bool XQuartzEnableKeyEquivalents = TRUE; +Bool XQuartzFullscreenVisible = FALSE; +Bool XQuartzRootlessDefault = TRUE; +Bool XQuartzIsRootless = TRUE; +Bool XQuartzServerVisible = FALSE; +Bool XQuartzFullscreenMenu = FALSE; +Bool XQuartzUseSysBeep = FALSE; /* =========================================================================== @@ -122,7 +98,7 @@ Bool QuartzAddScreen( ScreenPtr pScreen) { // allocate space for private per screen Quartz specific storage - QuartzScreenPtr displayInfo = xcalloc(sizeof(QuartzScreenRec), 1); + QuartzScreenPtr displayInfo = calloc(sizeof(QuartzScreenRec), 1); // QUARTZ_PRIV(pScreen) = displayInfo; dixSetPrivate(&pScreen->devPrivates, quartzScreenKey, displayInfo); @@ -148,6 +124,13 @@ Bool QuartzSetupScreen( if (! quartzProcs->InitCursor(pScreen)) return FALSE; +#if defined(RANDR) + if(!QuartzRandRInit(pScreen)) { + DEBUG_LOG("Failed to init RandR extension.\n"); + return FALSE; + } +#endif + return TRUE; } @@ -167,10 +150,8 @@ void QuartzInitOutput( FatalError("Could not register block and wakeup handlers."); } -#if defined(RANDR) && !defined(FAKE_RANDR) - if(!QuartzRandRInit(pScreen)) - FatalError("Failed to init RandR extension.\n"); -#endif + if (!dixRegisterPrivateKey(&quartzScreenKeyRec, PRIVATE_SCREEN, 0)) + FatalError("Failed to alloc quartz screen private.\n"); // Do display mode specific initialization quartzProcs->DisplayInit(); @@ -193,50 +174,6 @@ void QuartzInitInput( } -#ifdef FAKE_RANDR - -static const int padlength[4] = {0, 3, 2, 1}; - -static void -RREditConnectionInfo (ScreenPtr pScreen) -{ - xConnSetup *connSetup; - char *vendor; - xPixmapFormat *formats; - xWindowRoot *root; - xDepth *depth; - xVisualType *visual; - int screen = 0; - int d; - - connSetup = (xConnSetup *) ConnectionInfo; - vendor = (char *) connSetup + sizeof (xConnSetup); - formats = (xPixmapFormat *) ((char *) vendor + - connSetup->nbytesVendor + - padlength[connSetup->nbytesVendor & 3]); - root = (xWindowRoot *) ((char *) formats + - sizeof (xPixmapFormat) * screenInfo.numPixmapFormats); - while (screen != pScreen->myNum) - { - depth = (xDepth *) ((char *) root + - sizeof (xWindowRoot)); - for (d = 0; d < root->nDepths; d++) - { - visual = (xVisualType *) ((char *) depth + - sizeof (xDepth)); - depth = (xDepth *) ((char *) visual + - depth->nVisuals * sizeof (xVisualType)); - } - root = (xWindowRoot *) ((char *) depth); - screen++; - } - root->pixWidth = pScreen->width; - root->pixHeight = pScreen->height; - root->mmWidth = pScreen->mmWidth; - root->mmHeight = pScreen->mmHeight; -} -#endif - void QuartzUpdateScreens(void) { ScreenPtr pScreen; WindowPtr pRoot; @@ -257,29 +194,28 @@ void QuartzUpdateScreens(void) { pScreen = screenInfo.screens[0]; PseudoramiXResetScreens(); - quartzProcs->AddPseudoramiXScreens(&x, &y, &width, &height); + quartzProcs->AddPseudoramiXScreens(&x, &y, &width, &height, pScreen); - dixScreenOrigins[pScreen->myNum].x = x; - dixScreenOrigins[pScreen->myNum].y = y; + pScreen->x = x; + pScreen->y = y; pScreen->mmWidth = pScreen->mmWidth * ((double) width / pScreen->width); pScreen->mmHeight = pScreen->mmHeight * ((double) height / pScreen->height); pScreen->width = width; pScreen->height = height; DarwinAdjustScreenOrigins(&screenInfo); - quartzProcs->UpdateScreen(pScreen); - /* DarwinAdjustScreenOrigins or UpdateScreen may change dixScreenOrigins, + /* DarwinAdjustScreenOrigins or UpdateScreen may change pScreen->x/y, * so use it rather than x/y */ - sx = dixScreenOrigins[pScreen->myNum].x + darwinMainScreenX; - sy = dixScreenOrigins[pScreen->myNum].y + darwinMainScreenY; + sx = pScreen->x + darwinMainScreenX; + sy = pScreen->y + darwinMainScreenY; /* Adjust the root window. */ - pRoot = WindowTable[pScreen->myNum]; + pRoot = pScreen->root; AppleWMSetScreenOrigin(pRoot); pScreen->ResizeWindow(pRoot, x - sx, y - sy, width, height, NULL); - //pScreen->PaintWindowBackground (pRoot, &pRoot->borderClip, PW_BACKGROUND); + miPaintWindow(pRoot, &pRoot->borderClip, PW_BACKGROUND); /* pointer events are clipped to old display region after display reconfiguration @@ -293,7 +229,7 @@ void QuartzUpdateScreens(void) { inputInfo.pointer->spriteInfo->sprite->physLimits = bounds; inputInfo.pointer->spriteInfo->sprite->hotLimits = bounds; - DEBUG_LOG("Root Window: %dx%d @ (%d, %d) darwinMainScreen (%d, %d) xy (%d, %d) dixScreenOrigins (%d, %d)\n", width, height, x - sx, y - sy, darwinMainScreenX, darwinMainScreenY, x, y, dixScreenOrigins[pScreen->myNum].x, dixScreenOrigins[pScreen->myNum].y); + DEBUG_LOG("Root Window: %dx%d @ (%d, %d) darwinMainScreen (%d, %d) xy (%d, %d) dixScreenOrigins (%d, %d)\n", width, height, x - sx, y - sy, darwinMainScreenX, darwinMainScreenY, x, y, pScreen->x, pScreen->y); /* Send an event for the root reconfigure */ e.u.u.type = ConfigureNotify; @@ -306,71 +242,80 @@ void QuartzUpdateScreens(void) { e.u.configureNotify.borderWidth = wBorderWidth(pRoot); e.u.configureNotify.override = pRoot->overrideRedirect; DeliverEvents(pRoot, &e, 1, NullWindow); - -#ifdef FAKE_RANDR - RREditConnectionInfo(pScreen); -#endif + + quartzProcs->UpdateScreen(pScreen); } -void QuartzSetFullscreen(Bool state) { +void QuartzShowFullscreen(int state) { + int i; - DEBUG_LOG("QuartzSetFullscreen: state=%d\n", state); + DEBUG_LOG("QuartzShowFullscreen: state=%d\n", state); - if(quartzHasRoot == state) + if(XQuartzIsRootless) { + ErrorF("QuartzShowFullscreen called while in rootless mode.\n"); + return; + } + + if(XQuartzFullscreenVisible == state) return; - quartzHasRoot = state; + XQuartzFullscreenVisible = state; xp_disable_update (); - if (!quartzHasRoot && !quartzEnableRootless) + if (!XQuartzFullscreenVisible) RootlessHideAllWindows(); - RootlessUpdateRooted(quartzHasRoot); + RootlessUpdateRooted(XQuartzFullscreenVisible); - if (quartzHasRoot && !quartzEnableRootless) + if (XQuartzFullscreenVisible) { RootlessShowAllWindows (); - - if (quartzHasRoot || quartzEnableRootless) { - RootlessRepositionWindows(screenInfo.screens[0]); + for (i=0; i < screenInfo.numScreens; i++) { + ScreenPtr pScreen = screenInfo.screens[i]; + RootlessRepositionWindows(pScreen); + // JH: I don't think this is necessary, but keeping it here as a reminder + //RootlessUpdateScreenPixmap(pScreen); + } } /* Somehow the menubar manages to interfere with our event stream * in fullscreen mode, even though it's not visible. */ - X11ApplicationShowHideMenubar(!quartzHasRoot); + X11ApplicationShowHideMenubar(!XQuartzFullscreenVisible); xp_reenable_update (); - if (quartzFullscreenDisableHotkeys) - xp_disable_hot_keys(quartzHasRoot); + if (XQuartzFullscreenDisableHotkeys) + xp_disable_hot_keys(XQuartzFullscreenVisible); } -void QuartzSetRootless(Bool state) { - if(quartzEnableRootless == state) +void QuartzSetRootless(Bool state) { + DEBUG_LOG("QuartzSetRootless state=%d\n", state); + + if(XQuartzIsRootless == state) return; - quartzEnableRootless = state; + if(state) + QuartzShowFullscreen(FALSE); + + XQuartzIsRootless = state; xp_disable_update(); /* When in rootless, the menubar is not part of the screen, so we need to update our screens on toggle */ QuartzUpdateScreens(); - if(!quartzHasRoot) { - if(!quartzEnableRootless) { - RootlessHideAllWindows(); - } else { - RootlessShowAllWindows(); - } + if(XQuartzIsRootless) { + RootlessShowAllWindows(); + } else { + RootlessHideAllWindows(); } - X11ApplicationShowHideMenubar(!quartzHasRoot); + X11ApplicationShowHideMenubar(TRUE); xp_reenable_update(); - if (!quartzEnableRootless && quartzFullscreenDisableHotkeys) - xp_disable_hot_keys(quartzHasRoot); + xp_disable_hot_keys(FALSE); } /* @@ -382,18 +327,18 @@ void QuartzSetRootless(Bool state) { void QuartzShow(void) { int i; - if (quartzServerVisible) + if (XQuartzServerVisible) return; - quartzServerVisible = TRUE; + XQuartzServerVisible = TRUE; for (i = 0; i < screenInfo.numScreens; i++) { if (screenInfo.screens[i]) { quartzProcs->ResumeScreen(screenInfo.screens[i]); } } - if (!quartzEnableRootless) - QuartzSetFullscreen(TRUE); + if (!XQuartzIsRootless) + QuartzShowFullscreen(TRUE); } @@ -407,16 +352,17 @@ void QuartzHide(void) { int i; - if (quartzServerVisible) { + if (XQuartzServerVisible) { for (i = 0; i < screenInfo.numScreens; i++) { if (screenInfo.screens[i]) { quartzProcs->SuspendScreen(screenInfo.screens[i]); } } } - - QuartzSetFullscreen(FALSE); - quartzServerVisible = FALSE; + + if(!XQuartzIsRootless) + QuartzShowFullscreen(FALSE); + XQuartzServerVisible = FALSE; } @@ -429,7 +375,7 @@ void QuartzSetRootClip( { int i; - if (!quartzServerVisible) + if (!XQuartzServerVisible) return; for (i = 0; i < screenInfo.numScreens; i++) { @@ -447,3 +393,19 @@ void QuartzSpaceChanged(uint32_t space_id) { /* Do something special here, so we don't depend on quartz-wm for spaces to work... */ DEBUG_LOG("Space Changed (%u) ... do something interesting...\n", space_id); } + +/* + * QuartzCopyDisplayIDs + * Associate an X11 screen with one or more CoreGraphics display IDs by copying + * the list into a private array. Free the previously copied array, if present. + */ +void QuartzCopyDisplayIDs(ScreenPtr pScreen, + int displayCount, CGDirectDisplayID *displayIDs) { + QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen); + int size = displayCount * sizeof(CGDirectDisplayID); + + free(pQuartzScreen->displayIDs); + pQuartzScreen->displayIDs = malloc(size); + memcpy(pQuartzScreen->displayIDs, displayIDs, size); + pQuartzScreen->displayCount = displayCount; +} diff --git a/xserver/hw/xquartz/quartz.h b/xserver/hw/xquartz/quartz.h index b1a3f3183..7efb7e09b 100644 --- a/xserver/hw/xquartz/quartz.h +++ b/xserver/hw/xquartz/quartz.h @@ -35,6 +35,7 @@ #include "screenint.h" #include "window.h" +#include "pixmap.h" /*------------------------------------------ Quartz display mode function types @@ -62,7 +63,8 @@ typedef void (*ResumeScreenProc)(ScreenPtr pScreen); /* * Screen state change support */ -typedef void (*AddPseudoramiXScreensProc)(int *x, int *y, int *width, int *height); +typedef void (*AddPseudoramiXScreensProc) + (int *x, int *y, int *width, int *height, ScreenPtr pScreen); typedef void (*UpdateScreenProc)(ScreenPtr pScreen); /* @@ -112,7 +114,16 @@ typedef struct _QuartzModeProcs { } QuartzModeProcsRec, *QuartzModeProcsPtr; extern QuartzModeProcsPtr quartzProcs; -extern int quartzHasRoot, quartzEnableRootless; + +extern Bool XQuartzFullscreenVisible; /* Are the windows visible (predicated on !rootless) */ +extern Bool XQuartzServerVisible; /* Is the server visible ... TODO: Refactor to "active" */ +extern Bool XQuartzEnableKeyEquivalents; +extern Bool XQuartzRootlessDefault; /* Is our default mode rootless? */ +extern Bool XQuartzIsRootless; /* Is our current mode rootless (or FS)? */ +extern Bool XQuartzFullscreenMenu; /* Show the menu bar (autohide) while in FS */ +extern Bool XQuartzFullscreenDisableHotkeys; +extern Bool XQuartzOptionSendsAlt; /* Alt or Mode_switch? */ +extern Bool XQuartzUseSysBeep; /* Sys beep or our own? */ Bool QuartzAddScreen(int index, ScreenPtr pScreen); Bool QuartzSetupScreen(int index, ScreenPtr pScreen); @@ -128,8 +139,8 @@ void QuartzHide(void); void QuartzSetRootClip(BOOL enable); void QuartzSpaceChanged(uint32_t space_id); -void QuartzSetFullscreen(Bool state); void QuartzSetRootless(Bool state); +void QuartzShowFullscreen(Bool state); int server_main(int argc, char **argv, char **envp); #endif diff --git a/xserver/hw/xquartz/quartzAudio.c b/xserver/hw/xquartz/quartzAudio.c index 708202b5b..d0f7c53e5 100644 --- a/xserver/hw/xquartz/quartzAudio.c +++ b/xserver/hw/xquartz/quartzAudio.c @@ -42,7 +42,7 @@ #include #endif -#include "quartzCommon.h" +#include "quartz.h" #include "quartzAudio.h" #include @@ -220,7 +220,7 @@ void DDXRingBell( int pitch, // pitch is Hz int duration ) // duration is milliseconds { - if (quartzUseSysBeep) { + if (XQuartzUseSysBeep) { if (volume) NSBeep(); return; diff --git a/xserver/hw/xquartz/quartzCocoa.m b/xserver/hw/xquartz/quartzCocoa.m index 450147207..54c900dfa 100644 --- a/xserver/hw/xquartz/quartzCocoa.m +++ b/xserver/hw/xquartz/quartzCocoa.m @@ -43,17 +43,6 @@ #include "darwin.h" -/* - * QuartzFSUseQDCursor - * Return whether the screen should use a QuickDraw cursor. - */ -int QuartzFSUseQDCursor( - int depth) // screen depth -{ - return TRUE; -} - - /* * QuartzBlockHandler * Clean out any autoreleased objects. diff --git a/xserver/hw/xquartz/quartzCommon.h b/xserver/hw/xquartz/quartzCommon.h index 8ab70f22a..fbfe6f843 100644 --- a/xserver/hw/xquartz/quartzCommon.h +++ b/xserver/hw/xquartz/quartzCommon.h @@ -38,47 +38,14 @@ #include #include "privates.h" -// Quartz specific per screen storage structure -typedef struct { - // List of CoreGraphics displays that this X11 screen covers. - // This is more than one CG display for video mirroring and - // rootless PseudoramiX mode. - // No CG display will be covered by more than one X11 screen. - int displayCount; - CGDirectDisplayID *displayIDs; -} QuartzScreenRec, *QuartzScreenPtr; - -#define QUARTZ_PRIV(pScreen) \ - ((QuartzScreenPtr)dixLookupPrivate(&pScreen->devPrivates, quartzScreenKey)) - -// Data stored at startup for Cocoa front end -extern int quartzEventWriteFD; - -// User preferences used by Quartz modes -extern int quartzUseSysBeep; -extern int focusOnNewWindow; -extern int quartzUseAGL; -extern int quartzEnableKeyEquivalents; -extern int quartzFullscreenDisableHotkeys; -extern int quartzOptionSendsAlt; - // Other shared data -extern int quartzServerVisible; -extern int quartzServerQuitting; -extern DevPrivateKey quartzScreenKey; +extern DevPrivateKeyRec quartzScreenKeyRec; +#define quartzScreenKey (&quartzScreenKeyRec) extern int aquaMenuBarHeight; // Name of GLX bundle for native OpenGL extern const char *quartzOpenGLBundle; -void QuartzReadPreferences(void); -void QuartzMessageMainThread(unsigned msg, void *data, unsigned length); -void QuartzMessageServerThread(int type, int argc, ...); -void QuartzSetWindowMenu(int nitems, const char **items, - const char *shortcuts); -void QuartzFSCapture(void); -void QuartzFSRelease(void); -int QuartzFSUseQDCursor(int depth); void QuartzBlockHandler(pointer blockData, OSTimePtr pTimeout, pointer pReadmask); void QuartzWakeupHandler(pointer blockData, int result, pointer pReadmask); diff --git a/xserver/hw/xquartz/quartzKeyboard.c b/xserver/hw/xquartz/quartzKeyboard.c index 745333f03..f54c686d1 100644 --- a/xserver/hw/xquartz/quartzKeyboard.c +++ b/xserver/hw/xquartz/quartzKeyboard.c @@ -48,7 +48,7 @@ #include #include -#include "quartzCommon.h" +#include "quartz.h" #include "darwin.h" #include "darwinEvents.h" @@ -262,7 +262,7 @@ static void DarwinBuildModifierMaps(darwinKeyboardInfo *info) { case XK_Alt_L: info->modifierKeycodes[NX_MODIFIERKEY_ALTERNATE][0] = i; info->modMap[MIN_KEYCODE + i] = Mod1Mask; - if(!quartzOptionSendsAlt) + if(!XQuartzOptionSendsAlt) *k = XK_Mode_switch; // Yes, this is ugly. This needs to be cleaned up when we integrate quartzKeyboard with this code and refactor. break; @@ -272,7 +272,7 @@ static void DarwinBuildModifierMaps(darwinKeyboardInfo *info) { #else info->modifierKeycodes[NX_MODIFIERKEY_ALTERNATE][0] = i; #endif - if(!quartzOptionSendsAlt) + if(!XQuartzOptionSendsAlt) *k = XK_Mode_switch; // Yes, this is ugly. This needs to be cleaned up when we integrate quartzKeyboard with this code and refactor. info->modMap[MIN_KEYCODE + i] = Mod1Mask; break; @@ -427,20 +427,28 @@ void DarwinKeyboardReloadHandler(void) { } } pthread_mutex_unlock(&keyInfo_mutex); - /* Check for system .Xmodmap */ + /* Modify with xmodmap */ if (access(xmodmap, F_OK) == 0) { + /* Check for system .Xmodmap */ if (access(sysmodmap, F_OK) == 0) { - snprintf (cmd, sizeof(cmd), "%s %s", xmodmap, sysmodmap); - X11ApplicationLaunchClient(cmd); + if(snprintf (cmd, sizeof(cmd), "%s %s", xmodmap, sysmodmap) < sizeof(cmd)) { + X11ApplicationLaunchClient(cmd); + } else { + ErrorF("X11.app: Unable to create / execute xmodmap command line"); + } } - } - - /* Check for user's local .Xmodmap */ - if (homedir != NULL) { - snprintf (usermodmap, sizeof(usermodmap), "%s/.Xmodmap", homedir); - if (access(usermodmap, F_OK) == 0) { - snprintf (cmd, sizeof(cmd), "%s %s", xmodmap, usermodmap); - X11ApplicationLaunchClient(cmd); + + /* Check for user's local .Xmodmap */ + if ((homedir != NULL) && (snprintf (usermodmap, sizeof(usermodmap), "%s/.Xmodmap", homedir) < sizeof(usermodmap))) { + if (access(usermodmap, F_OK) == 0) { + if(snprintf (cmd, sizeof(cmd), "%s %s", xmodmap, usermodmap) < sizeof(cmd)) { + X11ApplicationLaunchClient(cmd); + } else { + ErrorF("X11.app: Unable to create / execute xmodmap command line"); + } + } + } else { + ErrorF("X11.app: Unable to determine path to user's .Xmodmap"); } } } diff --git a/xserver/hw/xquartz/quartzRandR.c b/xserver/hw/xquartz/quartzRandR.c new file mode 100644 index 000000000..298ec0a52 --- /dev/null +++ b/xserver/hw/xquartz/quartzRandR.c @@ -0,0 +1,560 @@ +/* + * Quartz-specific support for the XRandR extension + * + * Copyright (c) 2001-2004 Greg Parker and Torrey T. Lyons, + * 2010 Jan Hauffa. + * 2010 Apple Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Except as contained in this notice, the name(s) of the above copyright + * holders shall not be used in advertising or otherwise to promote the sale, + * use or other dealings in this Software without prior written authorization. + */ + +#include "sanitizedCarbon.h" + +#ifdef HAVE_DIX_CONFIG_H +#include +#endif + +#include "quartzCommon.h" +#include "quartzRandR.h" +#include "quartz.h" +#include "darwin.h" + +#include + +#include +#include +#include + +/* TODO: UGLY, find a better way! + * We want to ignore kXquartzDisplayChanged which are generated by us + */ +static Bool ignore_next_fake_mode_update = FALSE; + +#define FAKE_REFRESH_ROOTLESS 1 +#define FAKE_REFRESH_FULLSCREEN 2 + +#define DEFAULT_REFRESH 60 +#define kDisplayModeUsableFlags (kDisplayModeValidFlag | kDisplayModeSafeFlag) + +#define CALLBACK_SUCCESS 0 +#define CALLBACK_CONTINUE 1 +#define CALLBACK_ERROR -1 + +typedef int (*QuartzModeCallback) + (ScreenPtr, QuartzModeInfoPtr, void *); + +#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060 + +static long getDictLong (CFDictionaryRef dictRef, CFStringRef key) { + long value; + + CFNumberRef numRef = (CFNumberRef) CFDictionaryGetValue(dictRef, key); + if (!numRef) + return 0; + + if (!CFNumberGetValue(numRef, kCFNumberLongType, &value)) + return 0; + return value; +} + +static double getDictDouble (CFDictionaryRef dictRef, CFStringRef key) { + double value; + + CFNumberRef numRef = (CFNumberRef) CFDictionaryGetValue(dictRef, key); + if (!numRef) + return 0.0; + + if (!CFNumberGetValue(numRef, kCFNumberDoubleType, &value)) + return 0.0; + return value; +} + +static void QuartzRandRGetModeInfo (CFDictionaryRef modeRef, + QuartzModeInfoPtr pMode) { + pMode->width = (size_t) getDictLong(modeRef, kCGDisplayWidth); + pMode->height = (size_t) getDictLong(modeRef, kCGDisplayHeight); + pMode->refresh = (int)(getDictDouble(modeRef, kCGDisplayRefreshRate) + 0.5); + if (pMode->refresh == 0) + pMode->refresh = DEFAULT_REFRESH; + pMode->ref = NULL; + pMode->pSize = NULL; +} + +static Bool QuartzRandRCopyCurrentModeInfo (CGDirectDisplayID screenId, + QuartzModeInfoPtr pMode) { + CFDictionaryRef curModeRef = CGDisplayCurrentMode(screenId); + if (!curModeRef) + return FALSE; + + QuartzRandRGetModeInfo(curModeRef, pMode); + pMode->ref = (void *)curModeRef; + CFRetain(pMode->ref); + return TRUE; +} + +static Bool QuartzRandRSetCGMode (CGDirectDisplayID screenId, + QuartzModeInfoPtr pMode) { + CFDictionaryRef modeRef = (CFDictionaryRef) pMode->ref; + return (CGDisplaySwitchToMode(screenId, modeRef) == kCGErrorSuccess); +} + +static Bool QuartzRandREnumerateModes (ScreenPtr pScreen, + QuartzModeCallback callback, + void *data) { + CFDictionaryRef curModeRef, modeRef; + long curBpp; + CFArrayRef modes; + QuartzModeInfo modeInfo; + int i; + BOOL retval = FALSE; + QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen); + CGDirectDisplayID screenId = pQuartzScreen->displayIDs[0]; + + curModeRef = CGDisplayCurrentMode(screenId); + if (!curModeRef) + return FALSE; + curBpp = getDictLong(curModeRef, kCGDisplayBitsPerPixel); + + modes = CGDisplayAvailableModes(screenId); + if (!modes) + return FALSE; + for (i = 0; i < CFArrayGetCount(modes); i++) { + int cb; + modeRef = (CFDictionaryRef) CFArrayGetValueAtIndex(modes, i); + + /* Skip modes that are not usable on the current display or have a + different pixel encoding than the current mode. */ + if (((unsigned long) getDictLong(modeRef, kCGDisplayIOFlags) & + kDisplayModeUsableFlags) != kDisplayModeUsableFlags) + continue; + if (getDictLong(modeRef, kCGDisplayBitsPerPixel) != curBpp) + continue; + + QuartzRandRGetModeInfo(modeRef, &modeInfo); + modeInfo.ref = (void *)modeRef; + cb = callback(pScreen, &modeInfo, data); + if (cb == CALLBACK_CONTINUE) + retval = TRUE; + else if (cb == CALLBACK_SUCCESS) + return TRUE; + else if (cb == CALLBACK_ERROR) + return FALSE; + } + + switch(callback(pScreen, &pQuartzScreen->rootlessMode, data)) { + case CALLBACK_SUCCESS: + return TRUE; + case CALLBACK_ERROR: + return FALSE; + case CALLBACK_CONTINUE: + retval = TRUE; + default: + break; + } + + switch(callback(pScreen, &pQuartzScreen->fullscreenMode, data)) { + case CALLBACK_SUCCESS: + return TRUE; + case CALLBACK_ERROR: + return FALSE; + case CALLBACK_CONTINUE: + retval = TRUE; + default: + break; + } + + return retval; +} + +#else /* we have the new CG APIs from Snow Leopard */ + +static void QuartzRandRGetModeInfo (CGDisplayModeRef modeRef, + QuartzModeInfoPtr pMode) { + pMode->width = CGDisplayModeGetWidth(modeRef); + pMode->height = CGDisplayModeGetHeight(modeRef); + pMode->refresh = (int) (CGDisplayModeGetRefreshRate(modeRef) + 0.5); + if (pMode->refresh == 0) + pMode->refresh = DEFAULT_REFRESH; + pMode->ref = NULL; + pMode->pSize = NULL; +} + +static Bool QuartzRandRCopyCurrentModeInfo (CGDirectDisplayID screenId, + QuartzModeInfoPtr pMode) { + CGDisplayModeRef curModeRef = CGDisplayCopyDisplayMode(screenId); + if (!curModeRef) + return FALSE; + + QuartzRandRGetModeInfo(curModeRef, pMode); + pMode->ref = curModeRef; + return TRUE; +} + +static Bool QuartzRandRSetCGMode (CGDirectDisplayID screenId, + QuartzModeInfoPtr pMode) { + CGDisplayModeRef modeRef = (CGDisplayModeRef) pMode->ref; + if (!modeRef) + return FALSE; + + return (CGDisplaySetDisplayMode(screenId, modeRef, NULL) == kCGErrorSuccess); +} + +static Bool QuartzRandREnumerateModes (ScreenPtr pScreen, + QuartzModeCallback callback, + void *data) { + CGDisplayModeRef curModeRef, modeRef; + CFStringRef curPixelEnc, pixelEnc; + CFComparisonResult pixelEncEqual; + CFArrayRef modes; + QuartzModeInfo modeInfo; + int i; + Bool retval = FALSE; + + QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen); + CGDirectDisplayID screenId = pQuartzScreen->displayIDs[0]; + + curModeRef = CGDisplayCopyDisplayMode(screenId); + if (!curModeRef) + return FALSE; + curPixelEnc = CGDisplayModeCopyPixelEncoding(curModeRef); + CGDisplayModeRelease(curModeRef); + + modes = CGDisplayCopyAllDisplayModes(screenId, NULL); + if (!modes) { + CFRelease(curPixelEnc); + return FALSE; + } + for (i = 0; i < CFArrayGetCount(modes); i++) { + int cb; + modeRef = (CGDisplayModeRef) CFArrayGetValueAtIndex(modes, i); + + /* Skip modes that are not usable on the current display or have a + different pixel encoding than the current mode. */ + if ((CGDisplayModeGetIOFlags(modeRef) & kDisplayModeUsableFlags) != + kDisplayModeUsableFlags) + continue; + pixelEnc = CGDisplayModeCopyPixelEncoding(modeRef); + pixelEncEqual = CFStringCompare(pixelEnc, curPixelEnc, 0); + CFRelease(pixelEnc); + if (pixelEncEqual != kCFCompareEqualTo) + continue; + + QuartzRandRGetModeInfo(modeRef, &modeInfo); + modeInfo.ref = modeRef; + cb = callback(pScreen, &modeInfo, data); + if (cb == CALLBACK_CONTINUE) { + retval = TRUE; + } else if (cb == CALLBACK_SUCCESS) { + CFRelease(modes); + CFRelease(curPixelEnc); + return TRUE; + } else if (cb == CALLBACK_ERROR) { + CFRelease(modes); + CFRelease(curPixelEnc); + return FALSE; + } + } + + CFRelease(modes); + CFRelease(curPixelEnc); + + switch(callback(pScreen, &pQuartzScreen->rootlessMode, data)) { + case CALLBACK_SUCCESS: + return TRUE; + case CALLBACK_ERROR: + return FALSE; + case CALLBACK_CONTINUE: + retval = TRUE; + default: + break; + } + + switch(callback(pScreen, &pQuartzScreen->fullscreenMode, data)) { + case CALLBACK_SUCCESS: + return TRUE; + case CALLBACK_ERROR: + return FALSE; + case CALLBACK_CONTINUE: + retval = TRUE; + default: + break; + } + + return retval; +} + +#endif /* Snow Leopard CoreGraphics APIs */ + + +static Bool QuartzRandRModesEqual (QuartzModeInfoPtr pMode1, + QuartzModeInfoPtr pMode2) { + return (pMode1->width == pMode2->width) && + (pMode1->height == pMode2->height) && + (pMode1->refresh == pMode2->refresh); +} + +static Bool QuartzRandRRegisterMode (ScreenPtr pScreen, + QuartzModeInfoPtr pMode) { + QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen); + Bool isCurrentMode = QuartzRandRModesEqual(&pQuartzScreen->currentMode, pMode); + + /* TODO: DPI */ + pMode->pSize = RRRegisterSize(pScreen, pMode->width, pMode->height, pScreen->mmWidth, pScreen->mmHeight); + if (pMode->pSize) { + //DEBUG_LOG("registering: %d x %d @ %d %s\n", (int)pMode->width, (int)pMode->height, (int)pMode->refresh, isCurrentMode ? "*" : ""); + RRRegisterRate(pScreen, pMode->pSize, pMode->refresh); + + if (isCurrentMode) + RRSetCurrentConfig(pScreen, RR_Rotate_0, pMode->refresh, pMode->pSize); + + return TRUE; + } + return FALSE; +} + +static int QuartzRandRRegisterModeCallback (ScreenPtr pScreen, + QuartzModeInfoPtr pMode, + void *data __unused) { + if(QuartzRandRRegisterMode(pScreen, pMode)) { + return CALLBACK_CONTINUE; + } else { + return CALLBACK_ERROR; + } +} + +static Bool QuartzRandRSetMode(ScreenPtr pScreen, QuartzModeInfoPtr pMode, BOOL doRegister) { + QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen); + CGDirectDisplayID screenId = pQuartzScreen->displayIDs[0]; + + if (pQuartzScreen->currentMode.ref && CFEqual(pMode->ref, pQuartzScreen->currentMode.ref)) { + DEBUG_LOG("Requested RandR resolution matches current CG mode\n"); + } if (QuartzRandRSetCGMode(screenId, pMode)) { + ignore_next_fake_mode_update = TRUE; + } else { + DEBUG_LOG("Error while requesting CG resolution change.\n"); + return FALSE; + } + + /* If the client requested the fake rootless mode, switch to rootless. + * Otherwise, force fullscreen mode. + */ + QuartzSetRootless(pMode->refresh == FAKE_REFRESH_ROOTLESS); + if (pMode->refresh != FAKE_REFRESH_ROOTLESS) { + QuartzShowFullscreen(TRUE); + } + + if(pQuartzScreen->currentMode.ref) + CFRelease(pQuartzScreen->currentMode.ref); + pQuartzScreen->currentMode = *pMode; + CFRetain(pQuartzScreen->currentMode.ref); + + return TRUE; +} + +static int QuartzRandRSetModeCallback (ScreenPtr pScreen, + QuartzModeInfoPtr pMode, + void *data) { + QuartzModeInfoPtr pReqMode = (QuartzModeInfoPtr) data; + + if (!QuartzRandRModesEqual(pMode, pReqMode)) + return CALLBACK_CONTINUE; /* continue enumeration */ + + DEBUG_LOG("Found a match for requested RandR resolution (%dx%d@%d).\n", (int)pMode->width, (int)pMode->height, (int)pMode->refresh); + + if(QuartzRandRSetMode(pScreen, pMode, FALSE)) + return CALLBACK_SUCCESS; + else + return CALLBACK_ERROR; +} + +static Bool QuartzRandRGetInfo (ScreenPtr pScreen, Rotation *rotations) { + QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen); + + *rotations = RR_Rotate_0; /* TODO: support rotation */ + + if (pQuartzScreen->displayCount == 0) + return FALSE; + + if (pQuartzScreen->displayCount > 1) { + /* RandR operations are not well-defined for an X11 screen spanning + multiple CG displays. Create two entries for the current virtual + resolution including/excluding the menu bar. */ + + QuartzRandRRegisterMode(pScreen, &pQuartzScreen->rootlessMode); + QuartzRandRRegisterMode(pScreen, &pQuartzScreen->fullscreenMode); + return TRUE; + } + + return QuartzRandREnumerateModes(pScreen, QuartzRandRRegisterModeCallback, NULL); +} + +static Bool QuartzRandRSetConfig (ScreenPtr pScreen, + Rotation randr, + int rate, + RRScreenSizePtr pSize) { + QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen); + QuartzModeInfo reqMode; + + reqMode.width = pSize->width; + reqMode.height = pSize->height; + reqMode.refresh = rate; + + if (pQuartzScreen->displayCount == 0) + return FALSE; + + /* Do not switch modes if requested mode is equal to current mode. */ + if (QuartzRandRModesEqual(&reqMode, &pQuartzScreen->currentMode)) + return TRUE; + + if (QuartzRandREnumerateModes(pScreen, QuartzRandRSetModeCallback, &reqMode)) { + return TRUE; + } + + DEBUG_LOG("Unable to find a matching config: %d x %d @ %d\n", (int)reqMode.width, (int)reqMode.height, (int)reqMode.refresh); + return FALSE; +} + +static Bool _QuartzRandRUpdateFakeModes (ScreenPtr pScreen) { + QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen); + + if (pQuartzScreen->displayCount == 1) { + if(pQuartzScreen->fullscreenMode.ref) + CFRelease(pQuartzScreen->fullscreenMode.ref); + if(pQuartzScreen->currentMode.ref) + CFRelease(pQuartzScreen->currentMode.ref); + + if (!QuartzRandRCopyCurrentModeInfo(pQuartzScreen->displayIDs[0], + &pQuartzScreen->fullscreenMode)) + return FALSE; + + CFRetain(pQuartzScreen->fullscreenMode.ref); /* This extra retain is for currentMode's copy */ + } else { + pQuartzScreen->fullscreenMode.width = pScreen->width; + pQuartzScreen->fullscreenMode.height = pScreen->height; + if(XQuartzIsRootless) + pQuartzScreen->fullscreenMode.height += aquaMenuBarHeight; + } + + pQuartzScreen->fullscreenMode.refresh = FAKE_REFRESH_FULLSCREEN; + + pQuartzScreen->rootlessMode = pQuartzScreen->fullscreenMode; + pQuartzScreen->rootlessMode.refresh = FAKE_REFRESH_ROOTLESS; + pQuartzScreen->rootlessMode.height -= aquaMenuBarHeight; + + if(XQuartzIsRootless) { + pQuartzScreen->currentMode = pQuartzScreen->rootlessMode; + } else { + pQuartzScreen->currentMode = pQuartzScreen->fullscreenMode; + } + + DEBUG_LOG("rootlessMode: %d x %d\n", (int)pQuartzScreen->rootlessMode.width, (int)pQuartzScreen->rootlessMode.height); + DEBUG_LOG("fullscreenMode: %d x %d\n", (int)pQuartzScreen->fullscreenMode.width, (int)pQuartzScreen->fullscreenMode.height); + DEBUG_LOG("currentMode: %d x %d\n", (int)pQuartzScreen->currentMode.width, (int)pQuartzScreen->currentMode.height); + + return TRUE; +} + +Bool QuartzRandRUpdateFakeModes (BOOL force_update) { + ScreenPtr pScreen = screenInfo.screens[0]; + + if(ignore_next_fake_mode_update) { + DEBUG_LOG("Ignoring update request caused by RandR resolution change.\n"); + ignore_next_fake_mode_update = FALSE; + return TRUE; + } + + if(!_QuartzRandRUpdateFakeModes(pScreen)) + return FALSE; + + if(force_update) + RRGetInfo(pScreen, TRUE); + + return TRUE; +} + +Bool QuartzRandRInit (ScreenPtr pScreen) { + rrScrPrivPtr pScrPriv; + + if (!RRScreenInit (pScreen)) return FALSE; + if (!_QuartzRandRUpdateFakeModes (pScreen)) return FALSE; + + pScrPriv = rrGetScrPriv(pScreen); + pScrPriv->rrGetInfo = QuartzRandRGetInfo; + pScrPriv->rrSetConfig = QuartzRandRSetConfig; + return TRUE; +} + +void QuartzRandRSetFakeRootless (void) { + int i; + + DEBUG_LOG("QuartzRandRSetFakeRootless called.\n"); + + for (i=0; i < screenInfo.numScreens; i++) { + ScreenPtr pScreen = screenInfo.screens[i]; + QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen); + + QuartzRandRSetMode(pScreen, &pQuartzScreen->rootlessMode, TRUE); + } +} + +void QuartzRandRSetFakeFullscreen (BOOL state) { + int i; + + DEBUG_LOG("QuartzRandRSetFakeFullscreen called.\n"); + + for (i=0; i < screenInfo.numScreens; i++) { + ScreenPtr pScreen = screenInfo.screens[i]; + QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen); + + QuartzRandRSetMode(pScreen, &pQuartzScreen->fullscreenMode, TRUE); + } + + QuartzShowFullscreen(state); +} + +/* Toggle fullscreen mode. If "fake" fullscreen is the current mode, + * this will just show/hide the X11 windows. If we are in a RandR fullscreen + * mode, this will toggles us to the default fake mode and hide windows if + * it is fullscreen + */ +void QuartzRandRToggleFullscreen (void) { + ScreenPtr pScreen = screenInfo.screens[0]; + QuartzScreenPtr pQuartzScreen = QUARTZ_PRIV(pScreen); + + if (pQuartzScreen->currentMode.ref == NULL) { + ErrorF("Ignoring QuartzRandRToggleFullscreen because don't have a current mode set.\n"); + } else if (pQuartzScreen->currentMode.refresh == FAKE_REFRESH_ROOTLESS) { + ErrorF("Ignoring QuartzRandRToggleFullscreen because we are in rootless mode.\n"); + } else if (pQuartzScreen->currentMode.refresh == FAKE_REFRESH_FULLSCREEN) { + /* Legacy fullscreen mode. Hide/Show */ + QuartzShowFullscreen(!XQuartzFullscreenVisible); + } else { + /* RandR fullscreen mode. Return to default mode and hide if it is fullscreen. */ + if(XQuartzRootlessDefault) { + QuartzRandRSetFakeRootless(); + } else { + QuartzRandRSetFakeFullscreen(FALSE); + } + } +} diff --git a/xserver/hw/xquartz/quartzRandR.h b/xserver/hw/xquartz/quartzRandR.h new file mode 100644 index 000000000..fb0ce0c44 --- /dev/null +++ b/xserver/hw/xquartz/quartzRandR.h @@ -0,0 +1,80 @@ +/* + * quartzRandR.h + * + * Copyright (c) 2010 Jan Hauffa. + * 2010 Apple Inc. + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + * + * Except as contained in this notice, the name(s) of the above copyright + * holders shall not be used in advertising or otherwise to promote the sale, + * use or other dealings in this Software without prior written authorization. + */ + +#ifndef _QUARTZRANDR_H_ +#define _QUARTZRANDR_H_ + +#include "randrstr.h" + +typedef struct { + size_t width, height; + int refresh; + RRScreenSizePtr pSize; + void *ref; /* CGDisplayModeRef or CFDictionaryRef */ +} QuartzModeInfo, *QuartzModeInfoPtr; + +// Quartz specific per screen storage structure +typedef struct { + // List of CoreGraphics displays that this X11 screen covers. + // This is more than one CG display for video mirroring and + // rootless PseudoramiX mode. + // No CG display will be covered by more than one X11 screen. + int displayCount; + CGDirectDisplayID *displayIDs; + QuartzModeInfo rootlessMode, fullscreenMode, currentMode; +} QuartzScreenRec, *QuartzScreenPtr; + +#define QUARTZ_PRIV(pScreen) \ + ((QuartzScreenPtr)dixLookupPrivate(&pScreen->devPrivates, quartzScreenKey)) + +void QuartzCopyDisplayIDs(ScreenPtr pScreen, + int displayCount, CGDirectDisplayID *displayIDs); + +Bool QuartzRandRUpdateFakeModes (BOOL force_update); +Bool QuartzRandRInit (ScreenPtr pScreen); + +/* These two functions provide functionality expected by the legacy + * mode switching. They are equivalent to a client requesting one + * of the modes corresponding to these "fake" modes. + * QuartzRandRSetFakeFullscreen takes an argument which is used to determine + * the visibility of the windows after the change. + */ +void QuartzRandRSetFakeRootless (void); +void QuartzRandRSetFakeFullscreen (BOOL state); + + +/* Toggle fullscreen mode. If "fake" fullscreen is the current mode, + * this will just show/hide the X11 windows. If we are in a RandR fullscreen + * mode, this will toggles us to the default fake mode and hide windows if + * it is fullscreen + */ +void QuartzRandRToggleFullscreen (void); + +#endif diff --git a/xserver/hw/xquartz/xpr/Makefile.in b/xserver/hw/xquartz/xpr/Makefile.in index bd5c4be20..3b9eaf48f 100644 --- a/xserver/hw/xquartz/xpr/Makefile.in +++ b/xserver/hw/xquartz/xpr/Makefile.in @@ -109,10 +109,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -200,6 +196,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -214,6 +212,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -231,10 +230,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -290,10 +293,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -311,17 +315,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -348,20 +346,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -453,6 +454,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/hw/xquartz/xpr/appledri.c b/xserver/hw/xquartz/xpr/appledri.c index 74a4ec315..3afe2443c 100644 --- a/xserver/hw/xquartz/xpr/appledri.c +++ b/xserver/hw/xquartz/xpr/appledri.c @@ -128,7 +128,7 @@ ProcAppleDRIQueryVersion( swapl(&rep.length, n); } WriteToClient(client, sizeof(xAppleDRIQueryVersionReply), (char *)&rep); - return (client->noClientException); + return Success; } @@ -159,7 +159,7 @@ ProcAppleDRIQueryDirectRenderingCapable( WriteToClient(client, sizeof(xAppleDRIQueryDirectRenderingCapableReply), (char *)&rep); - return (client->noClientException); + return Success; } static int @@ -182,7 +182,7 @@ ProcAppleDRIAuthConnection( rep.authenticated = 0; } WriteToClient(client, sizeof(xAppleDRIAuthConnectionReply), (char *)&rep); - return (client->noClientException); + return Success; } static void surface_notify( @@ -192,22 +192,16 @@ static void surface_notify( { DRISurfaceNotifyArg *arg = _arg; int client_index = (int) x_cvt_vptr_to_uint(data); - ClientPtr client; xAppleDRINotifyEvent se; if (client_index < 0 || client_index >= currentMaxClients) return; - client = clients[client_index]; - if (client == NULL || client == serverClient || client->clientGone) - return; - se.type = DRIEventBase + AppleDRISurfaceNotify; se.kind = arg->kind; se.arg = arg->id; - se.sequenceNumber = client->sequence; se.time = currentTime.milliseconds; - WriteEventsToClient (client, 1, (xEvent *) &se); + WriteEventsToClient (clients[client_index], 1, (xEvent *) &se); } static int @@ -247,7 +241,7 @@ ProcAppleDRICreateSurface( rep.uid = sid; WriteToClient(client, sizeof(xAppleDRICreateSurfaceReply), (char *)&rep); - return (client->noClientException); + return Success; } static int @@ -271,7 +265,7 @@ ProcAppleDRIDestroySurface( return BadValue; } - return (client->noClientException); + return Success; } static int @@ -323,7 +317,7 @@ ProcAppleDRICreatePixmap(ClientPtr client) WriteReplyToClient(client, sizeof(rep), &rep); (void)WriteToClient(client, rep.stringLength, path); - return (client->noClientException); + return Success; } static int @@ -342,7 +336,7 @@ ProcAppleDRIDestroyPixmap(ClientPtr client) DRIDestroyPixmap(pDrawable); - return (client->noClientException); + return Success; } /* dispatch */ diff --git a/xserver/hw/xquartz/xpr/dri.c b/xserver/hw/xquartz/xpr/dri.c index 0a58b29f3..0d2c51a2a 100644 --- a/xserver/hw/xquartz/xpr/dri.c +++ b/xserver/hw/xquartz/xpr/dri.c @@ -74,14 +74,14 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include -static int DRIScreenPrivKeyIndex; -static DevPrivateKey DRIScreenPrivKey = &DRIScreenPrivKeyIndex; -static int DRIWindowPrivKeyIndex; -static DevPrivateKey DRIWindowPrivKey = &DRIWindowPrivKeyIndex; -static int DRIPixmapPrivKeyIndex; -static DevPrivateKey DRIPixmapPrivKey = &DRIPixmapPrivKeyIndex; -static int DRIPixmapBufferPrivKeyIndex; -static DevPrivateKey DRIPixmapBufferPrivKey = &DRIPixmapBufferPrivKeyIndex; +static DevPrivateKeyRec DRIScreenPrivKeyRec; +#define DRIScreenPrivKey (&DRIScreenPrivKeyRec) +static DevPrivateKeyRec DRIWindowPrivKeyRec; +#define DRIWindowPrivKey (&DRIWindowPrivKeyRec) +static DevPrivateKeyRec DRIPixmapPrivKeyRec; +#define DRIPixmapPrivKey (&DRIPixmapPrivKeyRec) +static DevPrivateKeyRec DRIPixmapBufferPrivKeyRec; +#define DRIPixmapBufferPrivKey (&DRIPixmapBufferPrivKeyRec) static RESTYPE DRIDrawablePrivResType; @@ -205,7 +205,16 @@ DRIScreenInit(ScreenPtr pScreen) DRIScreenPrivPtr pDRIPriv; int i; - pDRIPriv = (DRIScreenPrivPtr) xcalloc(1, sizeof(DRIScreenPrivRec)); + if (!dixRegisterPrivateKey(&DRIScreenPrivKeyRec, PRIVATE_SCREEN, 0)) + return FALSE; + if (!dixRegisterPrivateKey(&DRIWindowPrivKeyRec, PRIVATE_WINDOW, 0)) + return FALSE; + if (!dixRegisterPrivateKey(&DRIPixmapPrivKeyRec, PRIVATE_PIXMAP, 0)) + return FALSE; + if (!dixRegisterPrivateKey(&DRIPixmapBufferPrivKeyRec, PRIVATE_PIXMAP, 0)) + return FALSE; + + pDRIPriv = (DRIScreenPrivPtr) calloc(1, sizeof(DRIScreenPrivRec)); if (!pDRIPriv) { dixSetPrivate(&pScreen->devPrivates, DRIScreenPrivKey, NULL); return FALSE; @@ -269,7 +278,7 @@ DRICloseScreen(ScreenPtr pScreen) DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); if (pDRIPriv && pDRIPriv->directRenderingSupport) { - xfree(pDRIPriv); + free(pDRIPriv); dixSetPrivate(&pScreen->devPrivates, DRIScreenPrivKey, NULL); } } @@ -280,7 +289,7 @@ DRIExtensionInit(void) DRIDrawablePrivResType = CreateNewResourceType(DRIDrawablePrivDelete, "DRIDrawable"); - return (DRIDrawablePrivResType != 0); + return DRIDrawablePrivResType != 0; } void @@ -347,8 +356,8 @@ DRIUpdateSurface(DRIDrawablePrivPtr pDRIDrawablePriv, DrawablePtr pDraw) wc.height = pWin->drawable.height + 2 * pWin->borderWidth; wc.bit_gravity = XP_GRAVITY_NONE; - wc.shape_nrects = REGION_NUM_RECTS(&pWin->clipList); - wc.shape_rects = REGION_RECTS(&pWin->clipList); + wc.shape_nrects = RegionNumRects(&pWin->clipList); + wc.shape_rects = RegionRects(&pWin->clipList); wc.shape_tx = - (pTopWin->drawable.x - pTopWin->borderWidth); wc.shape_ty = - (pTopWin->drawable.y - pTopWin->borderWidth); @@ -381,7 +390,7 @@ CreateSurfaceForWindow(ScreenPtr pScreen, WindowPtr pWin, xp_window_id *widPtr) xp_window_changes wc; /* allocate a DRI Window Private record */ - if (!(pDRIDrawablePriv = xalloc(sizeof(*pDRIDrawablePriv)))) { + if (!(pDRIDrawablePriv = malloc(sizeof(*pDRIDrawablePriv)))) { return NULL; } @@ -395,7 +404,7 @@ CreateSurfaceForWindow(ScreenPtr pScreen, WindowPtr pWin, xp_window_id *widPtr) wid = x_cvt_vptr_to_uint(RootlessFrameForWindow(pWin, TRUE)); if (wid == 0) { - xfree(pDRIDrawablePriv); + free(pDRIDrawablePriv); return NULL; } @@ -403,7 +412,7 @@ CreateSurfaceForWindow(ScreenPtr pScreen, WindowPtr pWin, xp_window_id *widPtr) err = xp_create_surface(wid, &pDRIDrawablePriv->sid); if (err != Success) { - xfree(pDRIDrawablePriv); + free(pDRIDrawablePriv); return NULL; } @@ -414,7 +423,7 @@ CreateSurfaceForWindow(ScreenPtr pScreen, WindowPtr pWin, xp_window_id *widPtr) if (err != Success) { xp_destroy_surface(pDRIDrawablePriv->sid); - xfree(pDRIDrawablePriv); + free(pDRIDrawablePriv); return NULL; } @@ -439,7 +448,7 @@ CreateSurfaceForPixmap(ScreenPtr pScreen, PixmapPtr pPix) { xp_error err; /* allocate a DRI Window Private record */ - if (!(pDRIDrawablePriv = xcalloc(1, sizeof(*pDRIDrawablePriv)))) { + if (!(pDRIDrawablePriv = calloc(1, sizeof(*pDRIDrawablePriv)))) { return NULL; } @@ -454,7 +463,7 @@ CreateSurfaceForPixmap(ScreenPtr pScreen, PixmapPtr pPix) { err = xp_create_surface(0, &pDRIDrawablePriv->sid); if (err != Success) { - xfree(pDRIDrawablePriv); + free(pDRIDrawablePriv); return NULL; } @@ -519,7 +528,7 @@ DRICreateSurface(ScreenPtr pScreen, Drawable id, client_id, key); if (err != Success) { xp_destroy_surface(pDRIDrawablePriv->sid); - xfree(pDRIDrawablePriv); + free(pDRIDrawablePriv); /* * Now set the dix privates to NULL that were previously set. @@ -637,7 +646,7 @@ DRIDrawablePrivDelete(pointer pResource, XID id) if (pDRIDrawablePriv->notifiers != NULL) x_hook_free(pDRIDrawablePriv->notifiers); - xfree(pDRIDrawablePriv); + free(pDRIDrawablePriv); if (pDrawable->type == DRAWABLE_WINDOW) { dixSetPrivate(&pWin->devPrivates, DRIWindowPrivKey, NULL); @@ -828,7 +837,7 @@ Bool DRICreatePixmap(ScreenPtr pScreen, Drawable id, pPix = (PixmapPtr)pDrawable; - shared = xalloc(sizeof(*shared)); + shared = malloc(sizeof(*shared)); if(NULL == shared) { FatalError("failed to allocate DRIPixmapBuffer in %s\n", __func__); } @@ -856,7 +865,7 @@ Bool DRICreatePixmap(ScreenPtr pScreen, Drawable id, S_IRUSR | S_IWUSR | S_IROTH | S_IWOTH); if(-1 == shared->fd) { - xfree(shared); + free(shared); return FALSE; } @@ -866,7 +875,7 @@ Bool DRICreatePixmap(ScreenPtr pScreen, Drawable id, ErrorF("failed to ftruncate (extend) file."); shm_unlink(shared->shmPath); close(shared->fd); - xfree(shared); + free(shared); return FALSE; } @@ -878,7 +887,7 @@ Bool DRICreatePixmap(ScreenPtr pScreen, Drawable id, ErrorF("failed to mmap shared memory."); shm_unlink(shared->shmPath); close(shared->fd); - xfree(shared); + free(shared); return FALSE; } @@ -938,7 +947,7 @@ DRIFreePixmapImp(DrawablePtr pDrawable) { close(shared->fd); munmap(shared->buffer, shared->length); shm_unlink(shared->shmPath); - xfree(shared); + free(shared); dixSetPrivate(&pPix->devPrivates, DRIPixmapBufferPrivKey, (pointer)NULL); diff --git a/xserver/hw/xquartz/xpr/driWrap.c b/xserver/hw/xquartz/xpr/driWrap.c index 8c57fd4bd..65843b83f 100644 --- a/xserver/hw/xquartz/xpr/driWrap.c +++ b/xserver/hw/xquartz/xpr/driWrap.c @@ -55,11 +55,11 @@ typedef struct { DevUnion devPrivate; } DRISavedDrawableState; -static int driGCKeyIndex; -static DevPrivateKey driGCKey = &driGCKeyIndex; +static DevPrivateKeyRec driGCKeyRec; +#define driGCKey (&driGCKeyRec) -static int driWrapScreenKeyIndex; -static DevPrivateKey driWrapScreenKey = &driWrapScreenKeyIndex; +static DevPrivateKeyRec driWrapScreenKeyRec; +#define driWrapScreenKey (&driWrapScreenKeyRec) static GCOps driGCOps; @@ -527,21 +527,15 @@ Bool DRIWrapInit(ScreenPtr pScreen) { DRIWrapScreenRec *pScreenPriv; - if(!dixRequestPrivate(driGCKey, sizeof(DRIGCRec))) + if(!dixRegisterPrivateKey(&driGCKeyRec, PRIVATE_GC, sizeof(DRIGCRec))) return FALSE; - if(!dixRequestPrivate(driWrapScreenKey, sizeof(DRIWrapScreenRec))) - return FALSE; - - pScreenPriv = xalloc(sizeof(*pScreenPriv)); - - if(NULL == pScreenPriv) + if(!dixRegisterPrivateKey(&driWrapScreenKeyRec, PRIVATE_SCREEN, sizeof(DRIWrapScreenRec))) return FALSE; + pScreenPriv = dixGetPrivateAddr(&pScreen->devPrivates, &driWrapScreenKeyRec); pScreenPriv->CreateGC = pScreen->CreateGC; pScreen->CreateGC = DRICreateGC; - dixSetPrivate(&pScreen->devPrivates, driWrapScreenKey, pScreenPriv); - return TRUE; } diff --git a/xserver/hw/xquartz/xpr/x-hook.c b/xserver/hw/xquartz/xpr/x-hook.c index 5b850fe88..d9f011553 100644 --- a/xserver/hw/xquartz/xpr/x-hook.c +++ b/xserver/hw/xquartz/xpr/x-hook.c @@ -83,8 +83,8 @@ X_PFX (hook_run) (x_list *lst, void *arg) return; length = X_PFX (list_length) (lst); - fun = xalloc (sizeof (x_hook_function *) * length); - data = xalloc (sizeof (void *) * length); + fun = malloc(sizeof (x_hook_function *) * length); + data = malloc(sizeof (void *) * length); if(!fun || !data) { FatalError("Failed to allocate memory in %s\n", __func__); @@ -102,8 +102,8 @@ X_PFX (hook_run) (x_list *lst, void *arg) (*fun[i]) (arg, data[i]); } - xfree(fun); - xfree(data); + free(fun); + free(data); } X_EXTERN void diff --git a/xserver/hw/xquartz/xpr/xprAppleWM.c b/xserver/hw/xquartz/xpr/xprAppleWM.c index 4b31e3a11..1a3d427b7 100644 --- a/xserver/hw/xquartz/xpr/xprAppleWM.c +++ b/xserver/hw/xquartz/xpr/xprAppleWM.c @@ -67,7 +67,7 @@ static int xprSetWindowLevel( if(!winRec) return BadWindow; - if(quartzEnableRootless) + if(XQuartzIsRootless) wc.window_level = normal_window_levels[level]; else wc.window_level = rooted_window_levels[level]; diff --git a/xserver/hw/xquartz/xpr/xprCursor.c b/xserver/hw/xquartz/xpr/xprCursor.c index fbaf825de..216678e24 100644 --- a/xserver/hw/xquartz/xpr/xprCursor.c +++ b/xserver/hw/xquartz/xpr/xprCursor.c @@ -35,7 +35,7 @@ #include #endif -#include "quartzCommon.h" +#include "quartz.h" #include "xpr.h" #include "darwin.h" #include "darwinEvents.h" @@ -57,17 +57,17 @@ typedef struct { miPointerSpriteFuncPtr spriteFuncs; } QuartzCursorScreenRec, *QuartzCursorScreenPtr; -static int darwinCursorScreenKeyIndex; -static DevPrivateKey darwinCursorScreenKey = &darwinCursorScreenKeyIndex; +static DevPrivateKeyRec darwinCursorScreenKeyRec; +#define darwinCursorScreenKey (&darwinCursorScreenKeyRec) #define CURSOR_PRIV(pScreen) ((QuartzCursorScreenPtr) \ dixLookupPrivate(&pScreen->devPrivates, darwinCursorScreenKey)) - static Bool load_cursor(CursorPtr src, int screen) { uint32_t *data; + Bool free_data = FALSE; uint32_t rowbytes; int width, height; int hot_x, hot_y; @@ -95,7 +95,8 @@ load_cursor(CursorPtr src, int screen) const uint32_t *be_data=(uint32_t *) src->bits->argb; unsigned i; rowbytes = src->bits->width * sizeof (CARD32); - data = xalloc(rowbytes * src->bits->height); + data = malloc(rowbytes * src->bits->height); + free_data = TRUE; if(!data) { FatalError("Failed to allocate memory in %s\n", __func__); } @@ -121,7 +122,8 @@ load_cursor(CursorPtr src, int screen) /* round up to 8 pixel boundary so we can convert whole bytes */ rowbytes = ((src->bits->width * 4) + 31) & ~31; - data = xalloc(rowbytes * src->bits->height); + data = malloc(rowbytes * src->bits->height); + free_data = TRUE; if(!data) { FatalError("Failed to allocate memory in %s\n", __func__); } @@ -174,7 +176,8 @@ load_cursor(CursorPtr src, int screen) } err = xp_set_cursor(width, height, hot_x, hot_y, data, rowbytes); - xfree(data); + if(free_data) + free(data); return err == Success; } @@ -223,7 +226,7 @@ QuartzSetCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, int x, { QuartzCursorScreenPtr ScreenPriv = CURSOR_PRIV(pScreen); - if (!quartzServerVisible) + if (!XQuartzServerVisible) return; if (pCursor == NULL) @@ -292,12 +295,12 @@ QuartzCrossScreen(ScreenPtr pScreen, Bool entering) static void QuartzWarpCursor(DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) { - if (quartzServerVisible) + if (XQuartzServerVisible) { int sx, sy; - sx = dixScreenOrigins[pScreen->myNum].x + darwinMainScreenX; - sy = dixScreenOrigins[pScreen->myNum].y + darwinMainScreenY; + sx = pScreen->x + darwinMainScreenX; + sy = pScreen->y + darwinMainScreenY; CGWarpMouseCursorPosition(CGPointMake(sx + x, sy + y)); } @@ -360,7 +363,10 @@ QuartzInitCursor(ScreenPtr pScreen) if (!miDCInitialize(pScreen, &quartzScreenFuncsRec)) return FALSE; - ScreenPriv = xcalloc(1, sizeof(QuartzCursorScreenRec)); + if (!dixRegisterPrivateKey(&darwinCursorScreenKeyRec, PRIVATE_SCREEN, 0)) + return FALSE; + + ScreenPriv = calloc(1, sizeof(QuartzCursorScreenRec)); if (ScreenPriv == NULL) return FALSE; diff --git a/xserver/hw/xquartz/xpr/xprEvent.c b/xserver/hw/xquartz/xpr/xprEvent.c index 6245cce42..342b54c53 100644 --- a/xserver/hw/xquartz/xpr/xprEvent.c +++ b/xserver/hw/xquartz/xpr/xprEvent.c @@ -73,7 +73,7 @@ Bool QuartzModeEventHandler(int screenNum, XQuartzEvent *e, DeviceIntPtr dev) { case kXquartzBringAllToFront: DEBUG_LOG("kXquartzBringAllToFront\n"); - RootlessOrderAllWindows(); + RootlessOrderAllWindows(e->data[0]); return TRUE; default: return FALSE; diff --git a/xserver/hw/xquartz/xpr/xprFrame.c b/xserver/hw/xquartz/xpr/xprFrame.c index 53dde7acc..ede5af595 100644 --- a/xserver/hw/xquartz/xpr/xprFrame.c +++ b/xserver/hw/xquartz/xpr/xprFrame.c @@ -163,15 +163,15 @@ xprCreateFrame(RootlessWindowPtr pFrame, ScreenPtr pScreen, if (pShape != NULL) { - wc.shape_nrects = REGION_NUM_RECTS(pShape); - wc.shape_rects = REGION_RECTS(pShape); + wc.shape_nrects = RegionNumRects(pShape); + wc.shape_rects = RegionRects(pShape); wc.shape_tx = wc.shape_ty = 0; mask |= XP_SHAPE; } pFrame->level = !IsRoot (pWin) ? AppleWMWindowLevelNormal : AppleWMNumWindowLevels; - if(quartzEnableRootless) + if(XQuartzIsRootless) wc.window_level = normal_window_levels[pFrame->level]; else wc.window_level = rooted_window_levels[pFrame->level]; @@ -206,13 +206,16 @@ xprCreateFrame(RootlessWindowPtr pFrame, ScreenPtr pScreen, static void xprDestroyFrame(RootlessFrameID wid) { + xp_error err; TA_SERVER(); pthread_mutex_lock(&window_hash_mutex); x_hash_table_remove(window_hash, wid); pthread_mutex_unlock(&window_hash_mutex); - xp_destroy_window(x_cvt_vptr_to_uint(wid)); + err = xp_destroy_window(x_cvt_vptr_to_uint(wid)); + if (err != Success) + FatalError("Could not destroy window %i.", (int)x_cvt_vptr_to_uint(wid)); } @@ -282,7 +285,7 @@ static void xprRestackFrame(RootlessFrameID wid, RootlessFrameID nextWid) { RootlessWindowRec *winRec = x_hash_table_lookup(window_hash, wid, NULL); if(winRec) { - if(quartzEnableRootless) + if(XQuartzIsRootless) wc.window_level = normal_window_levels[winRec->level]; else wc.window_level = rooted_window_levels[winRec->level]; @@ -306,8 +309,8 @@ xprReshapeFrame(RootlessFrameID wid, RegionPtr pShape) if (pShape != NULL) { - wc.shape_nrects = REGION_NUM_RECTS(pShape); - wc.shape_rects = REGION_RECTS(pShape); + wc.shape_nrects = RegionNumRects(pShape); + wc.shape_rects = RegionRects(pShape); } else { @@ -366,9 +369,12 @@ xprStartDrawing(RootlessFrameID wid, char **pixelData, int *bytesPerRow) static void xprStopDrawing(RootlessFrameID wid, Bool flush) { + xp_error err; TA_SERVER(); - xp_unlock_window(x_cvt_vptr_to_uint(wid), flush); + err = xp_unlock_window(x_cvt_vptr_to_uint(wid), flush); + if(err != Success) + FatalError("Could not unlock window %i after drawing.", (int)x_cvt_vptr_to_uint(wid)); } @@ -576,7 +582,7 @@ xprHideWindows(Bool hide) for (screen = 0; screen < screenInfo.numScreens; screen++) { RootlessFrameID prevWid = NULL; - pRoot = WindowTable[screenInfo.screens[screen]->myNum]; + pRoot = screenInfo.screens[screen]->root; for (pWin = pRoot->firstChild; pWin; pWin = pWin->nextSib) { RootlessWindowRec *winRec = WINREC(pWin); diff --git a/xserver/hw/xquartz/xpr/xprScreen.c b/xserver/hw/xquartz/xpr/xprScreen.c index 735b2ba67..599ef6fee 100644 --- a/xserver/hw/xquartz/xpr/xprScreen.c +++ b/xserver/hw/xquartz/xpr/xprScreen.c @@ -36,6 +36,7 @@ #include "quartzCommon.h" #include "inputstr.h" #include "quartz.h" +#include "quartzRandR.h" #include "xpr.h" #include "xprEvent.h" #include "pseudoramiX.h" @@ -157,7 +158,7 @@ displayScreenBounds(CGDirectDisplayID id) (int)frame.origin.x, (int)frame.origin.y); /* Remove menubar to help standard X11 window managers. */ - if (quartzEnableRootless && + if (XQuartzIsRootless && frame.origin.x == 0 && frame.origin.y == 0) { frame.origin.y += aquaMenuBarHeight; frame.size.height -= aquaMenuBarHeight; @@ -176,7 +177,7 @@ displayScreenBounds(CGDirectDisplayID id) * with PseudoramiX. */ static void -xprAddPseudoramiXScreens(int *x, int *y, int *width, int *height) +xprAddPseudoramiXScreens(int *x, int *y, int *width, int *height, ScreenPtr pScreen) { CGDisplayCount i, displayCount; CGDirectDisplayID *displayList = NULL; @@ -195,10 +196,11 @@ xprAddPseudoramiXScreens(int *x, int *y, int *width, int *height) return; } - displayList = xalloc(displayCount * sizeof(CGDirectDisplayID)); + displayList = malloc(displayCount * sizeof(CGDirectDisplayID)); if(!displayList) FatalError("Unable to allocate memory for list of displays.\n"); CGGetActiveDisplayList(displayCount, displayList, &displayCount); + QuartzCopyDisplayIDs(pScreen, displayCount, displayList); /* Get the union of all screens */ for (i = 0; i < displayCount; i++) { @@ -232,7 +234,7 @@ xprAddPseudoramiXScreens(int *x, int *y, int *width, int *height) frame.size.width, frame.size.height); } - xfree(displayList); + free(displayList); } /* @@ -272,7 +274,8 @@ xprDisplayInit(void) AppleDRIExtensionInit(); xprAppleWMInit(); - if (!quartzEnableRootless) + XQuartzIsRootless = XQuartzRootlessDefault; + if (!XQuartzIsRootless) RootlessHideAllWindows(); } @@ -336,6 +339,7 @@ xprAddScreen(int index, ScreenPtr pScreen) ErrorF("Warning: noPseudoramiXExtension!\n"); dpy = displayAtIndex(index); + QuartzCopyDisplayIDs(pScreen, 1, &dpy); frame = displayScreenBounds(dpy); @@ -346,7 +350,7 @@ xprAddScreen(int index, ScreenPtr pScreen) } else { - xprAddPseudoramiXScreens(&dfb->x, &dfb->y, &dfb->width, &dfb->height); + xprAddPseudoramiXScreens(&dfb->x, &dfb->y, &dfb->width, &dfb->height, pScreen); } /* Passing zero width (pitch) makes miCreateScreenResources set the @@ -397,7 +401,7 @@ xprUpdateScreen(ScreenPtr pScreen) rootlessGlobalOffsetX = darwinMainScreenX; rootlessGlobalOffsetY = darwinMainScreenY; - AppleWMSetScreenOrigin(WindowTable[pScreen->myNum]); + AppleWMSetScreenOrigin(pScreen->root); RootlessRepositionWindows(pScreen); RootlessUpdateScreenPixmap(pScreen); @@ -416,7 +420,7 @@ xprInitInput(int argc, char **argv) rootlessGlobalOffsetY = darwinMainScreenY; for (i = 0; i < screenInfo.numScreens; i++) - AppleWMSetScreenOrigin(WindowTable[i]); + AppleWMSetScreenOrigin(screenInfo.screens[i]->root); } /* diff --git a/xserver/hw/xwin/InitOutput.c b/xserver/hw/xwin/InitOutput.c index 175cd9d81..73cc263bd 100644 --- a/xserver/hw/xwin/InitOutput.c +++ b/xserver/hw/xwin/InitOutput.c @@ -64,8 +64,7 @@ typedef HRESULT (*SHGETFOLDERPATHPROC)( */ extern int g_iNumScreens; -extern winScreenInfo g_ScreenInfo[]; -extern int g_iLastScreen; +extern winScreenInfo * g_ScreenInfo; extern char * g_pszCommandLine; extern Bool g_fSilentFatalError; @@ -99,8 +98,8 @@ extern HMODULE g_hmodCommonControls; extern FARPROC g_fpTrackMouseEvent; extern Bool g_fNoHelpMessageBox; extern Bool g_fSilentDupError; - - +extern Bool g_fNativeGl; + /* * Function prototypes */ @@ -115,9 +114,6 @@ void OsVendorVErrorF (const char *pszFormat, va_list va_args); #endif -void -winInitializeDefaultScreens (void); - static Bool winCheckDisplayNumber (void); @@ -155,9 +151,7 @@ static PixmapFormatRec g_PixmapFormats[] = { { 15, 16, BITMAP_SCANLINE_PAD }, { 16, 16, BITMAP_SCANLINE_PAD }, { 24, 32, BITMAP_SCANLINE_PAD }, -#ifdef RENDER { 32, 32, BITMAP_SCANLINE_PAD } -#endif }; const int NUMFORMATS = sizeof (g_PixmapFormats) / sizeof (g_PixmapFormats[0]); @@ -189,6 +183,17 @@ winClipboardShutdown (void) } #endif +void +ddxPushProviders(void) +{ +#ifdef XWIN_GLX_WINDOWS + if (g_fNativeGl) + { + /* install the native GL provider */ + glxWinPushNativeProvider(); + } +#endif +} #if defined(DDXBEFORERESET) /* @@ -270,11 +275,8 @@ ddxGiveUp (void) } /* Free concatenated command line */ - if (g_pszCommandLine) - { - free (g_pszCommandLine); - g_pszCommandLine = NULL; - } + free(g_pszCommandLine); + g_pszCommandLine = NULL; /* Remove our keyboard hook if it is installed */ winRemoveKeyboardHookLL (); @@ -436,7 +438,7 @@ winFixupPaths (void) int comment_block = FALSE; /* get defautl fontpath */ - char *fontpath = xstrdup(defaultFontPath); + char *fontpath = strdup(defaultFontPath); size_t size = strlen(fontpath); /* read all lines */ @@ -523,7 +525,7 @@ winFixupPaths (void) /* cleanup */ fclose(fontdirs); - defaultFontPath = xstrdup(fontpath); + defaultFontPath = strdup(fontpath); free(fontpath); changed_fontpath = TRUE; font_from = X_CONFIG; @@ -595,7 +597,7 @@ winFixupPaths (void) } } - defaultFontPath = xstrdup(newfp); + defaultFontPath = strdup(newfp); free(newfp); changed_fontpath = TRUE; } @@ -718,22 +720,16 @@ OsVendorInit (void) /* Add a default screen if no screens were specified */ if (g_iNumScreens == 0) { - winDebug ("OsVendorInit - Creating bogus screen 0\n"); - - /* - * We need to initialize default screens if no arguments - * were processed. Otherwise, the default screens would - * already have been initialized by ddxProcessArgument (). - */ - winInitializeDefaultScreens (); + winDebug ("OsVendorInit - Creating default screen 0\n"); /* - * Add a screen 0 using the defaults set by - * winInitializeDefaultScreens () and any additional parameters - * processed by ddxProcessArgument (). + * We need to initialize the default screen 0 if no -screen + * arguments were processed. + * + * Add a screen 0 using the defaults set by winInitializeDefaultScreens() + * and any additional default screen parameters given */ - g_iNumScreens = 1; - g_iLastScreen = 0; + winInitializeScreens(1); /* We have to flag this as an explicit screen, even though it isn't */ g_ScreenInfo[0].fExplicitScreen = TRUE; @@ -892,6 +888,11 @@ winUseMsg (void) ErrorF ("-[no]unixkill\n" "\tCtrl+Alt+Backspace exits the X Server.\n"); +#ifdef XWIN_GLX_WINDOWS + ErrorF ("-[no]wgl\n" + "\tEnable the GLX extension to use the native Windows WGL interface for accelerated OpenGL\n"); +#endif + ErrorF ("-[no]winkill\n" "\tAlt+F4 exits the X Server.\n"); diff --git a/xserver/hw/xwin/Makefile.am b/xserver/hw/xwin/Makefile.am index 89b021b22..03cb80824 100644 --- a/xserver/hw/xwin/Makefile.am +++ b/xserver/hw/xwin/Makefile.am @@ -13,9 +13,10 @@ DEFS_CLIPBOARD = -DXWIN_CLIPBOARD endif if XWIN_GLX_WINDOWS -SRCS_GLX_WINDOWS = \ - winpriv.c +GLX_DIR = glx DEFS_GLX_WINDOWS = -DXWIN_GLX_WINDOWS +XWIN_GLX_LIBS = $(top_builddir)/hw/xwin/glx/libXwinGLX.la +XWIN_GLX_LINK_FLAGS = -lopengl32 endif if XWIN_MULTIWINDOW @@ -116,7 +117,6 @@ SRCS = InitInput.c \ winms.h \ winmultiwindowclass.h \ winprefs.h \ - winpriv.h \ winresource.h \ winwindow.h \ XWin.rc \ @@ -125,7 +125,6 @@ SRCS = InitInput.c \ $(top_srcdir)/mi/miinitext.c \ $(top_srcdir)/fb/fbcmap_mi.c \ $(SRCS_CLIPBOARD) \ - $(SRCS_GLX_WINDOWS) \ $(SRCS_MULTIWINDOW) \ $(SRCS_MULTIWINDOWEXTWM) \ $(SRCS_NATIVEGDI) \ @@ -146,14 +145,13 @@ XWin_SOURCES = $(SRCS) INCLUDES = -I$(top_srcdir)/miext/rootless -XWin_DEPENDENCIES = $(XWIN_LIBS) -XWin_LDADD = $(MULTIWINDOWEXTWM_LIBS) $(XWIN_LIBS) $(MAIN_LIB) $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) $(XWIN_SYS_LIBS) +XWin_DEPENDENCIES = $(MULTIWINDOWEXTWM_LIBS) $(XWIN_GLX_LIBS) $(XWIN_LIBS) $(MAIN_LIB) $(XSERVER_LIBS) +XWin_LDADD = $(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 .rc.o: $(AM_V_GEN)$(WINDRES) --use-temp-file -i $< --input-format=rc -o $@ -O coff -I $(top_builddir)/include -XWin_LDFLAGS = -mwindows -static - winprefsyacc.h: winprefsyacc.c winprefslex.c: winprefslex.l winprefsyacc.c winprefsyacc.h @@ -164,12 +162,8 @@ AM_YFLAGS = -d AM_LFLAGS = -i AM_CFLAGS = -DHAVE_XWIN_CONFIG_H $(DIX_CFLAGS) \ $(XWINMODULES_CFLAGS) \ - -DXFree86Server - -GLX_EXTRAS = \ - glx/glwindows.h \ - glx/glwrap.c \ - glx/indirect.c + -DXFree86Server \ + -I$(top_srcdir) MAN_SRCS = XWin.man.pre XWinrc.man.pre @@ -198,7 +192,6 @@ install-exec-hook: (cd $(DESTDIR)$(bindir) && rm -f X && $(LN_S) XWin$(EXEEXT) X) EXTRA_DIST = \ - $(GLX_EXTRAS) \ $(MAN_SRCS) \ $(xwinconfig_DATA) \ X.ico \ @@ -226,3 +219,6 @@ EXTRA_DIST = \ relink: $(AM_V_at)rm -f XWin$(EXEEXT) && $(MAKE) XWin$(EXEEXT) + +SUBDIRS = $(GLX_DIR) . +DIST_SUBDIRS = glx . diff --git a/xserver/hw/xwin/Makefile.in b/xserver/hw/xwin/Makefile.in index 715538473..dcdb8ae9f 100644 --- a/xserver/hw/xwin/Makefile.in +++ b/xserver/hw/xwin/Makefile.in @@ -75,13 +75,13 @@ am__XWin_SOURCES_DIST = InitInput.c InitOutput.c winallpriv.c \ wintrayicon.c winvalargs.c winwakeup.c winwindow.c \ winwndproc.c ddraw.h winclipboard.h winconfig.h win.h \ winkeybd.h winkeynames.h winlayouts.h winmessages.h winmsg.h \ - winms.h winmultiwindowclass.h winprefs.h winpriv.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 \ - winclipboardinit.c winclipboardtextconv.c winclipboardthread.c \ + winms.h winmultiwindowclass.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 winclipboardinit.c \ + winclipboardtextconv.c winclipboardthread.c \ winclipboardunicode.c winclipboardwndproc.c \ - winclipboardwrappers.c winclipboardxevents.c winpriv.c \ + winclipboardwrappers.c winclipboardxevents.c \ winmultiwindowshape.c winmultiwindowwindow.c \ winmultiwindowwm.c winmultiwindowwndproc.c winwin32rootless.c \ winwin32rootlesswindow.c winwin32rootlesswndproc.c \ @@ -95,26 +95,25 @@ am__XWin_SOURCES_DIST = InitInput.c InitOutput.c winallpriv.c \ @XWIN_CLIPBOARD_TRUE@ winclipboardwndproc.$(OBJEXT) \ @XWIN_CLIPBOARD_TRUE@ winclipboardwrappers.$(OBJEXT) \ @XWIN_CLIPBOARD_TRUE@ winclipboardxevents.$(OBJEXT) -@XWIN_GLX_WINDOWS_TRUE@am__objects_2 = winpriv.$(OBJEXT) -@XWIN_MULTIWINDOW_TRUE@am__objects_3 = winmultiwindowshape.$(OBJEXT) \ +@XWIN_MULTIWINDOW_TRUE@am__objects_2 = winmultiwindowshape.$(OBJEXT) \ @XWIN_MULTIWINDOW_TRUE@ winmultiwindowwindow.$(OBJEXT) \ @XWIN_MULTIWINDOW_TRUE@ winmultiwindowwm.$(OBJEXT) \ @XWIN_MULTIWINDOW_TRUE@ winmultiwindowwndproc.$(OBJEXT) -@XWIN_MULTIWINDOWEXTWM_TRUE@am__objects_4 = \ +@XWIN_MULTIWINDOWEXTWM_TRUE@am__objects_3 = \ @XWIN_MULTIWINDOWEXTWM_TRUE@ winwin32rootless.$(OBJEXT) \ @XWIN_MULTIWINDOWEXTWM_TRUE@ winwin32rootlesswindow.$(OBJEXT) \ @XWIN_MULTIWINDOWEXTWM_TRUE@ winwin32rootlesswndproc.$(OBJEXT) \ @XWIN_MULTIWINDOWEXTWM_TRUE@ winwindowswm.$(OBJEXT) -@XWIN_NATIVEGDI_TRUE@am__objects_5 = winclip.$(OBJEXT) \ +@XWIN_NATIVEGDI_TRUE@am__objects_4 = winclip.$(OBJEXT) \ @XWIN_NATIVEGDI_TRUE@ winfillsp.$(OBJEXT) winfont.$(OBJEXT) \ @XWIN_NATIVEGDI_TRUE@ wingc.$(OBJEXT) wingetsp.$(OBJEXT) \ @XWIN_NATIVEGDI_TRUE@ winnativegdi.$(OBJEXT) \ @XWIN_NATIVEGDI_TRUE@ winpixmap.$(OBJEXT) winpolyline.$(OBJEXT) \ @XWIN_NATIVEGDI_TRUE@ winrop.$(OBJEXT) winsetsp.$(OBJEXT) -@XWIN_PRIMARYFB_TRUE@am__objects_6 = winpfbdd.$(OBJEXT) -@XWIN_RANDR_TRUE@am__objects_7 = winrandr.$(OBJEXT) -@XWIN_XV_TRUE@am__objects_8 = winvideo.$(OBJEXT) -am__objects_9 = InitInput.$(OBJEXT) InitOutput.$(OBJEXT) \ +@XWIN_PRIMARYFB_TRUE@am__objects_5 = winpfbdd.$(OBJEXT) +@XWIN_RANDR_TRUE@am__objects_6 = winrandr.$(OBJEXT) +@XWIN_XV_TRUE@am__objects_7 = winvideo.$(OBJEXT) +am__objects_8 = InitInput.$(OBJEXT) InitOutput.$(OBJEXT) \ winallpriv.$(OBJEXT) winauth.$(OBJEXT) winblock.$(OBJEXT) \ wincmap.$(OBJEXT) winconfig.$(OBJEXT) wincreatewnd.$(OBJEXT) \ wincursor.$(OBJEXT) windialogs.$(OBJEXT) winengine.$(OBJEXT) \ @@ -131,11 +130,12 @@ am__objects_9 = InitInput.$(OBJEXT) InitOutput.$(OBJEXT) \ stubs.$(OBJEXT) miinitext.$(OBJEXT) fbcmap_mi.$(OBJEXT) \ $(am__objects_1) $(am__objects_2) $(am__objects_3) \ $(am__objects_4) $(am__objects_5) $(am__objects_6) \ - $(am__objects_7) $(am__objects_8) -am_XWin_OBJECTS = $(am__objects_9) + $(am__objects_7) +am_XWin_OBJECTS = $(am__objects_8) XWin_OBJECTS = $(am_XWin_OBJECTS) @XWIN_MULTIWINDOWEXTWM_TRUE@am__DEPENDENCIES_1 = $(top_builddir)/miext/rootless/librootless.la -am__DEPENDENCIES_2 = +@XWIN_GLX_WINDOWS_TRUE@am__DEPENDENCIES_2 = $(top_builddir)/hw/xwin/glx/libXwinGLX.la +am__DEPENDENCIES_3 = DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @@ -151,6 +151,12 @@ LTYACCCOMPILE = $(LIBTOOL) --mode=compile $(YACC) $(YFLAGS) \ $(AM_YFLAGS) SOURCES = $(XWin_SOURCES) DIST_SOURCES = $(am__XWin_SOURCES_DIST) +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-exec-recursive install-info-recursive \ + install-recursive installcheck-recursive installdirs-recursive \ + pdf-recursive ps-recursive uninstall-info-recursive \ + uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -201,10 +207,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -300,6 +302,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -314,6 +318,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -331,10 +336,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -390,10 +399,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -411,17 +421,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -448,20 +452,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -553,6 +560,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ @@ -708,10 +716,10 @@ target_alias = @target_alias@ @XWIN_CLIPBOARD_TRUE@ winclipboardxevents.c @XWIN_CLIPBOARD_TRUE@DEFS_CLIPBOARD = -DXWIN_CLIPBOARD -@XWIN_GLX_WINDOWS_TRUE@SRCS_GLX_WINDOWS = \ -@XWIN_GLX_WINDOWS_TRUE@ winpriv.c - +@XWIN_GLX_WINDOWS_TRUE@GLX_DIR = glx @XWIN_GLX_WINDOWS_TRUE@DEFS_GLX_WINDOWS = -DXWIN_GLX_WINDOWS +@XWIN_GLX_WINDOWS_TRUE@XWIN_GLX_LIBS = $(top_builddir)/hw/xwin/glx/libXwinGLX.la +@XWIN_GLX_WINDOWS_TRUE@XWIN_GLX_LINK_FLAGS = -lopengl32 @XWIN_MULTIWINDOW_TRUE@SRCS_MULTIWINDOW = \ @XWIN_MULTIWINDOW_TRUE@ winmultiwindowshape.c \ @XWIN_MULTIWINDOW_TRUE@ winmultiwindowwindow.c \ @@ -798,7 +806,6 @@ SRCS = InitInput.c \ winms.h \ winmultiwindowclass.h \ winprefs.h \ - winpriv.h \ winresource.h \ winwindow.h \ XWin.rc \ @@ -807,7 +814,6 @@ SRCS = InitInput.c \ $(top_srcdir)/mi/miinitext.c \ $(top_srcdir)/fb/fbcmap_mi.c \ $(SRCS_CLIPBOARD) \ - $(SRCS_GLX_WINDOWS) \ $(SRCS_MULTIWINDOW) \ $(SRCS_MULTIWINDOWEXTWM) \ $(SRCS_NATIVEGDI) \ @@ -817,8 +823,8 @@ SRCS = InitInput.c \ XWin_SOURCES = $(SRCS) INCLUDES = -I$(top_srcdir)/miext/rootless -XWin_DEPENDENCIES = $(XWIN_LIBS) -XWin_LDADD = $(MULTIWINDOWEXTWM_LIBS) $(XWIN_LIBS) $(MAIN_LIB) $(XSERVER_LIBS) $(XSERVER_SYS_LIBS) $(XWIN_SYS_LIBS) +XWin_DEPENDENCIES = $(MULTIWINDOWEXTWM_LIBS) $(XWIN_GLX_LIBS) $(XWIN_LIBS) $(MAIN_LIB) $(XSERVER_LIBS) +XWin_LDADD = $(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 BUILT_SOURCES = winprefsyacc.h winprefsyacc.c winprefslex.c CLEANFILES = $(BUILT_SOURCES) $(appman_DATA) $(fileman_DATA) XWin.man XWinrc.man @@ -826,12 +832,8 @@ AM_YFLAGS = -d AM_LFLAGS = -i AM_CFLAGS = -DHAVE_XWIN_CONFIG_H $(DIX_CFLAGS) \ $(XWINMODULES_CFLAGS) \ - -DXFree86Server - -GLX_EXTRAS = \ - glx/glwindows.h \ - glx/glwrap.c \ - glx/indirect.c + -DXFree86Server \ + -I$(top_srcdir) MAN_SRCS = XWin.man.pre XWinrc.man.pre appmandir = $(APP_MAN_DIR) @@ -881,7 +883,6 @@ MANDEFS = \ -D__xlogfile__=$(XLOGFILE) -D__xservername__=$(XSERVERNAME) EXTRA_DIST = \ - $(GLX_EXTRAS) \ $(MAN_SRCS) \ $(xwinconfig_DATA) \ X.ico \ @@ -907,8 +908,10 @@ EXTRA_DIST = \ xlaunch/window/wizard.cc \ xlaunch/window/wizard.h +SUBDIRS = $(GLX_DIR) . +DIST_SUBDIRS = glx . all: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) all-am + $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .pre .man .man.pre .c .l .lo .o .obj .rc .y @@ -1026,7 +1029,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winprefs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winprefslex.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winprefsyacc.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winpriv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winprocarg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winrandr.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winregistry.Po@am__quote@ @@ -1211,6 +1213,77 @@ uninstall-xwinconfigDATA: rm -f "$(DESTDIR)$(xwinconfigdir)/$$f"; \ done +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +mostlyclean-recursive clean-recursive distclean-recursive \ +maintainer-clean-recursive: + @failcom='exit 1'; \ + for f in x $$MAKEFLAGS; do \ + case $$f in \ + *=* | --[!k]*);; \ + *k*) failcom='fail=yes';; \ + esac; \ + done; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ @@ -1221,10 +1294,23 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) mkid -fID $$unique tags: TAGS -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ @@ -1237,7 +1323,7 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$tags $$unique; \ fi ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ @@ -1260,7 +1346,7 @@ distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) - $(mkdir_p) $(distdir)/../.. $(distdir)/glx $(distdir)/xlaunch $(distdir)/xlaunch/resources $(distdir)/xlaunch/window + $(mkdir_p) $(distdir)/../.. $(distdir)/xlaunch $(distdir)/xlaunch/resources $(distdir)/xlaunch/window @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ @@ -1287,24 +1373,40 @@ distdir: $(DISTFILES) || exit 1; \ fi; \ done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || $(mkdir_p) "$(distdir)/$$subdir" \ + || exit 1; \ + distdir=`$(am__cd) $(distdir) && pwd`; \ + top_distdir=`$(am__cd) $(top_distdir) && pwd`; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$top_distdir" \ + distdir="$$distdir/$$subdir" \ + distdir) \ + || exit 1; \ + fi; \ + done check-am: all-am check: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) check-am + $(MAKE) $(AM_MAKEFLAGS) check-recursive all-am: Makefile $(PROGRAMS) $(DATA) -installdirs: +installdirs: installdirs-recursive +installdirs-am: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(appmandir)" "$(DESTDIR)$(filemandir)" "$(DESTDIR)$(xwinconfigdir)"; do \ test -z "$$dir" || $(mkdir_p) "$$dir"; \ done install: $(BUILT_SOURCES) - $(MAKE) $(AM_MAKEFLAGS) install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am + $(MAKE) $(AM_MAKEFLAGS) install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am -installcheck: installcheck-am +installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ @@ -1325,23 +1427,23 @@ maintainer-clean-generic: -rm -f winprefsyacc.c -rm -f winprefsyacc.h -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -clean: clean-am +clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am -distclean: distclean-am +distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-libtool distclean-tags -dvi: dvi-am +dvi: dvi-recursive dvi-am: -html: html-am +html: html-recursive -info: info-am +info: info-recursive info-am: @@ -1352,27 +1454,27 @@ install-exec-am: install-binPROGRAMS @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook -install-info: install-info-am +install-info: install-info-recursive install-man: installcheck-am: -maintainer-clean: maintainer-clean-am +maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic -mostlyclean: mostlyclean-am +mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool -pdf: pdf-am +pdf: pdf-recursive pdf-am: -ps: ps-am +ps: ps-recursive ps-am: @@ -1380,19 +1482,25 @@ uninstall-am: uninstall-appmanDATA uninstall-binPROGRAMS \ uninstall-filemanDATA uninstall-info-am \ uninstall-xwinconfigDATA -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ - clean-generic clean-libtool ctags distclean distclean-compile \ - distclean-generic distclean-libtool distclean-tags distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-appmanDATA install-binPROGRAMS install-data \ - install-data-am install-exec install-exec-am install-exec-hook \ - install-filemanDATA install-info install-info-am install-man \ - install-strip install-xwinconfigDATA 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-appmanDATA \ - uninstall-binPROGRAMS uninstall-filemanDATA uninstall-info-am \ +uninstall-info: uninstall-info-recursive + +.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ + clean clean-binPROGRAMS clean-generic clean-libtool \ + clean-recursive ctags ctags-recursive distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-recursive distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-appmanDATA \ + install-binPROGRAMS install-data install-data-am install-exec \ + install-exec-am install-exec-hook install-filemanDATA \ + install-info install-info-am install-man install-strip \ + install-xwinconfigDATA installcheck installcheck-am \ + installdirs installdirs-am maintainer-clean \ + maintainer-clean-generic maintainer-clean-recursive \ + mostlyclean mostlyclean-compile mostlyclean-generic \ + mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \ + tags tags-recursive uninstall uninstall-am \ + uninstall-appmanDATA uninstall-binPROGRAMS \ + uninstall-filemanDATA uninstall-info-am \ uninstall-xwinconfigDATA diff --git a/xserver/hw/xwin/glx/Makefile.am b/xserver/hw/xwin/glx/Makefile.am new file mode 100644 index 000000000..e9fea50a7 --- /dev/null +++ b/xserver/hw/xwin/glx/Makefile.am @@ -0,0 +1,60 @@ +noinst_LTLIBRARIES = libXwinGLX.la + +libXwinGLX_la_SOURCES = \ + winpriv.c \ + winpriv.h \ + glwindows.h \ + glwrap.c \ + indirect.c \ + wgl_ext_api.c + +if XWIN_MULTIWINDOW +DEFS_MULTIWINDOW = -DXWIN_MULTIWINDOW +endif + +if XWIN_MULTIWINDOWEXTWM +DEFS_MULTIWINDOWEXTWM = -DXWIN_MULTIWINDOWEXTWM +endif + +DEFS = $(DEFS_MULTIWINDOW) $(DEFS_MULTIWINDOWEXTWM) + +INCLUDES = -I$(top_srcdir)/miext/rootless + +AM_CFLAGS = -DHAVE_XWIN_CONFIG_H $(DIX_CFLAGS) \ + $(XWINMODULES_CFLAGS) \ + -I$(top_srcdir) \ + -I$(top_srcdir)/hw/xwin/ + +glwrap.c: generated_gl_wrappers.c +wgl_ext_api.c: generated_wgl_wrappers.c wglext.h +wgl_ext_api.h: wglext.h +indirect.c: wgl_ext_api.h + +SPEC_FILES = gl.spec gl.tm wglext.spec wgl.tm + +gl.spec: + wget http://www.opengl.org/registry/api/gl.spec + +gl.tm: + wget http://www.opengl.org/registry/api/gl.tm + +wglext.spec: + wget http://www.opengl.org/registry/api/wglext.spec + +wgl.tm: + wget http://www.opengl.org/registry/api/wgl.tm + +generated_gl_wrappers.c: gen_gl_wrappers.py gl.spec gl.tm + $(srcdir)/gen_gl_wrappers.py --spec=$(srcdir)/gl.spec --typemap=$(srcdir)/gl.tm --dispatch-header=$(top_srcdir)/glx/dispatch.h --staticwrappers >generated_gl_wrappers.c + +generated_wgl_wrappers.c: gen_gl_wrappers.py wglext.spec wgl.tm + $(srcdir)/gen_gl_wrappers.py --spec=$(srcdir)/wglext.spec --typemap=$(srcdir)/wgl.tm --prefix=wgl --preresolve >generated_wgl_wrappers.c + +wglext.h: + wget http://www.opengl.org/registry/api/wglext.h + +BUILT_SOURCES = generated_gl_wrappers.c generated_wgl_wrappers.c +CLEANFILES = $(BUILT_SOURCES) +DISTCLEANFILES = $(SPEC_FILES) wglext.h + +EXTRA_DIST = gen_gl_wrappers.py $(SPEC_FILES) wglext.h diff --git a/xserver/hw/xwin/glx/Makefile.in b/xserver/hw/xwin/glx/Makefile.in index ef5f713b4..d364a2766 100644 --- a/xserver/hw/xwin/glx/Makefile.in +++ b/xserver/hw/xwin/glx/Makefile.in @@ -231,7 +231,11 @@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ +HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ +HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ @@ -310,6 +314,7 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ +MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ @@ -382,6 +387,7 @@ SPECIAL_DTRACE_OBJECTS_TRUE = @SPECIAL_DTRACE_OBJECTS_TRUE@ STANDALONE_XPBPROXY_FALSE = @STANDALONE_XPBPROXY_FALSE@ STANDALONE_XPBPROXY_TRUE = @STANDALONE_XPBPROXY_TRUE@ STRIP = @STRIP@ +STYLESHEET_SRCDIR = @STYLESHEET_SRCDIR@ SYSCONFDIR = @SYSCONFDIR@ TSLIB_CFLAGS = @TSLIB_CFLAGS@ TSLIB_FALSE = @TSLIB_FALSE@ @@ -464,10 +470,12 @@ XORG_CFLAGS = @XORG_CFLAGS@ XORG_FALSE = @XORG_FALSE@ XORG_INCS = @XORG_INCS@ XORG_LIBS = @XORG_LIBS@ +XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MODULES_CFLAGS = @XORG_MODULES_CFLAGS@ XORG_MODULES_LIBS = @XORG_MODULES_LIBS@ XORG_OS = @XORG_OS@ XORG_OS_SUBDIR = @XORG_OS_SUBDIR@ +XORG_SGML_PATH = @XORG_SGML_PATH@ XORG_SYS_LIBS = @XORG_SYS_LIBS@ XORG_TRUE = @XORG_TRUE@ XPBPROXY_CFLAGS = @XPBPROXY_CFLAGS@ @@ -491,6 +499,7 @@ XSERVER_DTRACE_FALSE = @XSERVER_DTRACE_FALSE@ XSERVER_DTRACE_TRUE = @XSERVER_DTRACE_TRUE@ XSERVER_LIBS = @XSERVER_LIBS@ XSERVER_SYS_LIBS = @XSERVER_SYS_LIBS@ +XSL_STYLESHEET = @XSL_STYLESHEET@ XTSTEXAMPLES_DEP_CFLAGS = @XTSTEXAMPLES_DEP_CFLAGS@ XTSTEXAMPLES_DEP_LIBS = @XTSTEXAMPLES_DEP_LIBS@ XVFB_FALSE = @XVFB_FALSE@ diff --git a/xserver/hw/xwin/glx/gen_gl_wrappers.py b/xserver/hw/xwin/glx/gen_gl_wrappers.py new file mode 100644 index 000000000..d7fe98dec --- /dev/null +++ b/xserver/hw/xwin/glx/gen_gl_wrappers.py @@ -0,0 +1,319 @@ +#!/usr/bin/python +# +# Comedy python script to generate cdecl to stdcall wrappers for GL functions +# +# This is designed to operate on OpenGL spec files from +# http://www.opengl.org/registry/api/ +# +# +# Copyright (c) Jon TURNEY 2009 +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice shall be included in +# all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR +# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# +# Except as contained in this notice, the name(s) of the above copyright +# holders shall not be used in advertising or otherwise to promote the sale, +# use or other dealings in this Software without prior written authorization. +# + +import sys +import re +import getopt + +dispatchheader = '' +prefix = 'gl' +preresolve = False +staticwrappers = False + +opts, args = getopt.getopt(sys.argv[1:], "", ['spec=', 'typemap=', 'dispatch-header=', 'prefix=', 'preresolve', 'staticwrappers' ]) + +for o,a in opts: + if o == '--typemap' : + typemapfile = a + elif o == '--dispatch-header' : + dispatchheader = a + elif o == '--spec' : + specfile = a + elif o == '--prefix' : + prefix = a + elif o == '--preresolve' : + preresolve = True + elif o == '--staticwrappers' : + staticwrappers = True + +# +# look for all the SET_ macros in dispatch.h, this is the set of functions +# we need to generate +# + +dispatch = {} + +if dispatchheader : + fh = open(dispatchheader) + dispatchh = fh.readlines() + + dispatch_regex = re.compile(r'#define\sSET_(\S*)\(') + + for line in dispatchh : + line = line.strip() + m1 = dispatch_regex.search(line) + + if m1 : + dispatch[m1.group(1)] = 1 + + del dispatch['by_offset'] + +# +# read the typemap .tm file +# + +typemap = {} + +fh = open(typemapfile) +tm = fh.readlines() + +typemap_regex = re.compile(r'#define\sSET_(\S*)\(') + +for line in tm : + # ignore everything after a '#' as a comment + hash = line.find('#') + if hash != -1 : + line = line[:hash-1] + + # ignore blank lines + if line.startswith('#') or len(line) == 0 : + continue + + l = line.split(',') + typemap[l[0]] = l[3].strip() + +# interestingly, * is not a C type +if typemap['void'] == '*' : + typemap['void'] = 'void' + +# +# crudely parse the .spec file +# + +r1 = re.compile(r'\t(\S*)\s+(\S*.*)') +r2 = re.compile(r'(.*)\((.*)\)') +r3 = re.compile(r'glWindowPos.*MESA') +r4 = re.compile(r'gl.*Program(s|)NV') +r5 = re.compile(r'glGetVertexAttribfvNV') + +wrappers = {} + +fh = open(specfile) +glspec = fh.readlines() +param_count = 0 + +for line in glspec : + line = line.rstrip() + + # ignore everything after a '#' as a comment + hash = line.find('#') + if hash != -1 : + line = line[:hash-1] + + # ignore blank lines + if line.startswith('#') or len(line) == 0 : + continue + + # lines containing ':' aren't intersting to us + if line.count(':') != 0 : + continue + + # attributes of each function follow the name, indented by a tab + if not line.startswith('\t') : + m1 = r2.search(line) + if m1 : + function = m1.group(1) + arglist_use = m1.group(2) + wrappers[function] = {} + + # near and far might be reserved words or macros so can't be used as formal parameter names + arglist_use = arglist_use.replace('near','zNear') + arglist_use = arglist_use.replace('far','zFar') + + wrappers[function]['arglist_use'] = arglist_use + param_count = 0 + else : + m1 = r1.search(line) + if m1 : + attribute = m1.group(1) + value = m1.group(2) + + # make param attributes unique and ordered + if attribute == 'param' : + attribute = 'param' + '%02d' % param_count + param_count += 1 + + wrappers[function][attribute] = value + +# +# now emit code +# + +print '/* Automatically generated by ' + sys.argv[0] + ' DO NOT EDIT */' +print '/* from ' + specfile + ' and typemap ' + typemapfile + ' */' +print '' + +# +# if required, emit code for non-lazy function resolving +# + +if preresolve : + for w in sorted(wrappers.keys()) : + funcname = prefix + w + print 'RESOLVE_DECL(PFN' + funcname.upper() + 'PROC);' + + print '' + print 'void ' + prefix + 'ResolveExtensionProcs(void)' + print '{' + + for w in sorted(wrappers.keys()) : + funcname = prefix + w + print ' PRERESOLVE(PFN' + funcname.upper() + 'PROC, "' + funcname + '");' + + print '}\n' + +# +# now emit the wrappers +# for GL 1.0 and 1.1 functions, generate stdcall wrappers which call the function directly +# for GL 1.2+ functions, generate wrappers which use wglGetProcAddress() +# + +for w in sorted(wrappers.keys()) : + + funcname = prefix + w + returntype = wrappers[w]['return'] + if returntype != 'void' : + returntype = typemap[returntype] + + # Avoid generating wrappers which aren't referenced by the dispatch table + if dispatchheader and not dispatch.has_key(w) : + print '/* No wrapper for ' + funcname + ', not in dispatch table */' + continue + + # manufacture arglist + # if no param attributes were found, it should be 'void' + al = [] + for k in sorted(wrappers[w].keys()) : + if k.startswith('param') : + l = wrappers[w][k].split() + + # near and far might be reserved words or macros so can't be used as formal parameter names + l[0] = l[0].replace('near','zNear') + l[0] = l[0].replace('far','zFar') + + if l[2] == 'in' : + if l[3] == 'array' : + arg = 'const ' + typemap[l[1]] + ' *' + l[0] + else : + arg = typemap[l[1]] + ' ' + l[0] + elif l[2] == 'out' : + arg = typemap[l[1]] + ' *' + l[0] + + al.append(arg) + + if len(al) == 0 : + arglist = 'void' + else: + arglist = ', '.join(al) + + if wrappers[w]['category'].startswith('VERSION_1_0') or wrappers[w]['category'].startswith('VERSION_1_1') : + if staticwrappers : + print 'static', + print returntype + ' ' + funcname + 'Wrapper(' + arglist + ')' + print '{' + print ' if (glxWinDebugSettings.enable' + prefix.upper() + 'callTrace) ErrorF("'+ funcname + '\\n");' + print ' glWinDirectProcCalls++;' + if returntype.lower() == 'void' : + print ' ' + funcname + '(', + else : + print ' /* returntype was ' + returntype.lower() + '*/' + print ' return ' + funcname + '(', + + if arglist != 'void' : + print wrappers[w]['arglist_use'], + + print ');' + print "}\n" + else: + if staticwrappers : + print 'static', + print returntype + ' ' + funcname + 'Wrapper(' + arglist + ')' + print '{' + + stringname = funcname + +# +# special case: Windows OpenGL implementations are far more likely to have GL_ARB_window_pos than GL_MESA_window_pos, +# so arrange for the wrapper to use the ARB strings to find functions... +# + + m2 = r3.search(funcname) + if m2 : + stringname = stringname.replace('MESA','ARB') + +# +# special case: likewise, implementations are more likely to have GL_ARB_vertex_program than GL_NV_vertex_program, +# especially if they are not NV implementations, so arrange for the wrapper to use ARB strings to find functions +# + + m3 = r4.search(funcname) + if m3 : + stringname = stringname.replace('NV','ARB') + m4 = r5.search(funcname) + if m4 : + stringname = stringname.replace('NV','ARB') + + pfntypename = 'PFN' + funcname.upper() + 'PROC' + + if returntype.lower() == 'void' : + print ' RESOLVE(' + pfntypename + ', "' + stringname + '");' + print ' if (glxWinDebugSettings.enable' + prefix.upper() + 'callTrace) ErrorF("'+ funcname + '\\n");' + print ' RESOLVED_PROC(' + pfntypename + ')(', + else : + print ' RESOLVE_RET(' + pfntypename + ', "' + stringname + '", FALSE);' + print ' if (glxWinDebugSettings.enable' + prefix.upper() + 'callTrace) ErrorF("'+ funcname + '\\n");' + print ' return RESOLVED_PROC(' + pfntypename + ')(', + + if arglist != 'void' : + print wrappers[w]['arglist_use'], + + print ');' + print "}\n" + + +# generate function to setup the dispatch table, which sets each +# dispatch table entry to point to it's wrapper function +# (assuming we were able to make one) + +if dispatchheader : + print 'void glWinSetupDispatchTable(void)' + print '{' + print ' struct _glapi_table *disp = _glapi_get_dispatch();' + + for d in sorted(dispatch.keys()) : + if wrappers.has_key(d) : + print ' SET_'+ d + '(disp, ' + prefix + d + 'Wrapper);' + else : + print '#warning No wrapper for ' + prefix + d + ' !' + + print '}' diff --git a/xserver/hw/xwin/glx/glwindows.h b/xserver/hw/xwin/glx/glwindows.h index 74e81f24f..cc3f2e6ee 100644 --- a/xserver/hw/xwin/glx/glwindows.h +++ b/xserver/hw/xwin/glx/glwindows.h @@ -1,64 +1,58 @@ -#ifdef HAVE_DIX_CONFIG_H -#include -#endif +/* + * File: glwindows.h + * Purpose: Header for GLX implementation using native Windows OpenGL library + * + * Authors: Alexander Gottwald + * Jon TURNEY + * + * Copyright (c) Jon TURNEY 2009 + * Copyright (c) Alexander Gottwald 2004 + * + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + -#include #include -#include - -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - typedef struct { - unsigned enableDebug : 1; - unsigned enableTrace : 1; - unsigned dumpPFD : 1; - unsigned dumpHWND : 1; - unsigned dumpDC : 1; -} glWinDebugSettingsRec, *glWinDebugSettingsPtr; -extern glWinDebugSettingsRec glWinDebugSettings; + unsigned int enableDebug : 1; + unsigned int enableTrace : 1; + unsigned int dumpPFD : 1; + unsigned int dumpHWND : 1; + unsigned int dumpDC : 1; + unsigned int enableGLcallTrace : 1; + unsigned int enableWGLcallTrace :1; +} glxWinDebugSettingsRec; -typedef struct { - int num_vis; - __GLcontextModes *modes; - void **priv; +extern glxWinDebugSettingsRec glxWinDebugSettings; - /* wrapped screen functions */ - RealizeWindowProcPtr RealizeWindow; - UnrealizeWindowProcPtr UnrealizeWindow; - CopyWindowProcPtr CopyWindow; -} glWinScreenRec; - -extern glWinScreenRec glWinScreens[MAXSCREENS]; - -#define glWinGetScreenPriv(pScreen) &glWinScreens[pScreen->myNum] -#define glWinScreenPriv(pScreen) glWinScreenRec *pScreenPriv = glWinGetScreenPriv(pScreen); +void glWinCallDelta(void); +void glxWinPushNativeProvider(void); +const GLubyte* glGetStringWrapperNonstatic(GLenum name); +void glAddSwapHintRectWINWrapperNonstatic(GLint x, GLint y, GLsizei width, GLsizei height); +void glWinSetupDispatchTable(void); #if 1 -#define GLWIN_TRACE() if (glWinDebugSettings.enableTrace) ErrorF("%s:%d: Trace\n", __FUNCTION__, __LINE__ ) -#define GLWIN_TRACE_MSG(msg, args...) if (glWinDebugSettings.enableTrace) ErrorF("%s:%d: " msg, __FUNCTION__, __LINE__, ##args ) -#define GLWIN_DEBUG_MSG(msg, args...) if (glWinDebugSettings.enableDebug) ErrorF("%s:%d: " msg, __FUNCTION__, __LINE__, ##args ) -#define GLWIN_DEBUG_MSG2(msg, args...) if (glWinDebugSettings.enableDebug) ErrorF(msg, ##args ) +#define GLWIN_TRACE_MSG(msg, args...) if (glxWinDebugSettings.enableTrace) ErrorF(msg " [%s:%d]\n" , ##args , __FUNCTION__, __LINE__ ) +#define GLWIN_DEBUG_MSG(msg, args...) if (glxWinDebugSettings.enableDebug) ErrorF(msg " [%s:%d]\n" , ##args , __FUNCTION__, __LINE__ ) #else -#define GLWIN_TRACE() #define GLWIN_TRACE_MSG(a, ...) #define GLWIN_DEBUG_MSG(a, ...) -#define GLWIN_DEBUG_MSG2(a, ...) #endif - diff --git a/xserver/hw/xwin/glx/glwrap.c b/xserver/hw/xwin/glx/glwrap.c index f0b38b228..5190d36f7 100644 --- a/xserver/hw/xwin/glx/glwrap.c +++ b/xserver/hw/xwin/glx/glwrap.c @@ -1,583 +1,148 @@ /* - * GLX implementation that uses Win32's OpenGL - * Wrapper functions for Win32's OpenGL + * File: glwrap.c + * Purpose: Wrapper functions for Win32 OpenGL functions * * Authors: Alexander Gottwald + * Jon TURNEY + * + * Copyright (c) Jon TURNEY 2009 + * Copyright (c) Alexander Gottwald 2004 + * + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. */ -#ifdef HAVE_DIX_CONFIG_H -#include +// define USE_OPENGL32 makes gl.h declare gl*() function prototypes with stdcall linkage, +// so our generated wrappers will correctly link with the functions in opengl32.dll +#define USE_OPENGL32 + +#ifdef HAVE_XWIN_CONFIG_H +#include #endif #include #include #include -#include -#include +#include +#include +#include +#include +#include -#define RESOLVE_RET(procname, symbol, retval) \ - static Bool init = TRUE; \ - static procname proc = NULL; \ - if (init) { \ - proc = (procname)wglGetProcAddress(symbol); \ - init = FALSE; \ - if (proc == NULL) { \ - ErrorF("glwrap: Can't resolve \"%s\"\n", symbol); \ - } else \ - ErrorF("glwrap: resolved \"%s\"\n", symbol); \ - } \ - if (proc == NULL) { \ - __glXErrorCallBack(NULL, 0); \ - return retval; \ +static unsigned int glWinIndirectProcCalls = 0; +static unsigned int glWinDirectProcCalls = 0; + +void +glWinCallDelta(void) +{ + static unsigned int glWinIndirectProcCallsLast = 0; + static unsigned int glWinDirectProcCallsLast = 0; + if ((glWinIndirectProcCalls != glWinIndirectProcCallsLast) || + (glWinDirectProcCalls != glWinDirectProcCallsLast)) + { + if (glxWinDebugSettings.enableTrace) + { + ErrorF("after %d direct and %d indirect GL calls\n", + glWinDirectProcCalls - glWinDirectProcCallsLast, + glWinIndirectProcCalls - glWinIndirectProcCallsLast); + } + glWinDirectProcCallsLast = glWinDirectProcCalls; + glWinIndirectProcCallsLast = glWinIndirectProcCalls; } -#define RESOLVE(procname, symbol) RESOLVE_RET(procname, symbol,) - - +} + +static PROC +glWinResolveHelper(PROC *cache, char *symbol) +{ + PROC proc = NULL; + + /* If not yet cached, call wglGetProcAddress */ + if ((*cache) == NULL) + { + proc = wglGetProcAddress(symbol); + if (proc == NULL) + { + ErrorF("glwrap: Can't resolve \"%s\"\n", symbol); + (*cache) = (PROC)-1; + } + else + { + ErrorF("glwrap: Resolved \"%s\"\n", symbol); + (*cache) = proc; + } + } + /* Cached wglGetProcAddress failure */ + else if ((*cache) == (PROC)-1) + { + proc = 0; + } + /* Cached wglGetProcAddress result */ + else + { + proc = (*cache); + } + + return proc; +} + +#define RESOLVE_RET(proctype, symbol, retval) \ + static PROC cache = NULL; \ + __stdcall proctype proc = (proctype)glWinResolveHelper(&cache, symbol); \ + if (proc == NULL) { \ + __glXErrorCallBack(0); \ + return retval; \ + } \ + glWinIndirectProcCalls++; + +#define RESOLVE(proctype, symbol) RESOLVE_RET(proctype, symbol,) + +#define RESOLVED_PROC(proctype) proc + /* - * GL_ARB_imaging - */ + Include generated cdecl wrappers for stdcall gl*() functions in opengl32.dll + OpenGL 1.2 and upward is treated as extensions, function address must + found using wglGetProcAddress(), but also stdcall so still need wrappers... -GLAPI void GLAPIENTRY glColorTable( GLenum target, GLenum internalformat, - GLsizei width, GLenum format, - GLenum type, const GLvoid *table ) + Include generated dispatch table setup function +*/ + +#include "generated_gl_wrappers.c" + +/* + Special non-static wrapper for glGetString for debug output +*/ + +const GLubyte* glGetStringWrapperNonstatic(GLenum name) { - RESOLVE(PFNGLCOLORTABLEPROC, "glColorTable"); - proc(target, internalformat, width, format, type, table); -} - -GLAPI void GLAPIENTRY glColorSubTable( GLenum target, - GLsizei start, GLsizei count, - GLenum format, GLenum type, - const GLvoid *data ) -{ - RESOLVE(PFNGLCOLORSUBTABLEPROC, "glColorSubTable"); - proc(target, start, count, format, type, data); -} - -GLAPI void GLAPIENTRY glColorTableParameteriv(GLenum target, GLenum pname, - const GLint *params) -{ - RESOLVE(PFNGLCOLORTABLEPARAMETERIVPROC, "glColorTableParameteriv"); - proc(target, pname, params); -} - -GLAPI void GLAPIENTRY glColorTableParameterfv(GLenum target, GLenum pname, - const GLfloat *params) -{ - RESOLVE(PFNGLCOLORTABLEPARAMETERFVPROC, "glColorTableParameterfv"); - proc(target, pname, params); -} - -GLAPI void GLAPIENTRY glCopyColorSubTable( GLenum target, GLsizei start, - GLint x, GLint y, GLsizei width ) -{ - RESOLVE(PFNGLCOPYCOLORSUBTABLEPROC, "glCopyColorSubTable"); - proc(target, start, x, y, width); -} - -GLAPI void GLAPIENTRY glCopyColorTable( GLenum target, GLenum internalformat, - GLint x, GLint y, GLsizei width ) -{ - RESOLVE(PFNGLCOPYCOLORTABLEPROC, "glCopyColorTable"); - proc(target, internalformat, x, y, width); -} - - -GLAPI void GLAPIENTRY glGetColorTable( GLenum target, GLenum format, - GLenum type, GLvoid *table ) -{ - RESOLVE(PFNGLGETCOLORTABLEPROC, "glGetColorTable"); - proc(target, format, type, table); -} - -GLAPI void GLAPIENTRY glGetColorTableParameterfv( GLenum target, GLenum pname, - GLfloat *params ) -{ - RESOLVE(PFNGLGETCOLORTABLEPARAMETERFVPROC, "glGetColorTableParameterfv"); - proc(target, pname, params); -} - -GLAPI void GLAPIENTRY glGetColorTableParameteriv( GLenum target, GLenum pname, - GLint *params ) -{ - RESOLVE(PFNGLGETCOLORTABLEPARAMETERIVPROC, "glGetColorTableParameteriv"); - proc(target, pname, params); -} - -GLAPI void GLAPIENTRY glBlendEquation( GLenum mode ) -{ - RESOLVE(PFNGLBLENDEQUATIONPROC, "glBlendEquation"); - proc(mode); -} - -GLAPI void GLAPIENTRY glBlendColor( GLclampf red, GLclampf green, - GLclampf blue, GLclampf alpha ) -{ - RESOLVE(PFNGLBLENDCOLORPROC, "glBlendColor"); - proc(red, green, blue, alpha); -} - -GLAPI void GLAPIENTRY glHistogram( GLenum target, GLsizei width, - GLenum internalformat, GLboolean sink ) -{ - RESOLVE(PFNGLHISTOGRAMPROC, "glHistogram"); - proc(target, width, internalformat, sink); -} - -GLAPI void GLAPIENTRY glResetHistogram( GLenum target ) -{ - RESOLVE(PFNGLRESETHISTOGRAMPROC, "glResetHistogram"); - proc(target); -} - -GLAPI void GLAPIENTRY glGetHistogram( GLenum target, GLboolean reset, - GLenum format, GLenum type, - GLvoid *values ) -{ - RESOLVE(PFNGLGETHISTOGRAMPROC, "glGetHistogram"); - proc(target, reset, format, type, values); -}; - -GLAPI void GLAPIENTRY glGetHistogramParameterfv( GLenum target, GLenum pname, - GLfloat *params ) -{ - RESOLVE(PFNGLGETHISTOGRAMPARAMETERFVPROC, "glGetHistogramParameterfv"); - proc(target, pname, params); -} - -GLAPI void GLAPIENTRY glGetHistogramParameteriv( GLenum target, GLenum pname, - GLint *params ) -{ - RESOLVE(PFNGLGETHISTOGRAMPARAMETERIVPROC, "glGetHistogramParameteriv"); - proc(target, pname, params); -} - -GLAPI void GLAPIENTRY glMinmax( GLenum target, GLenum internalformat, - GLboolean sink ) -{ - RESOLVE(PFNGLMINMAXPROC, "glMinmax"); - proc(target, internalformat, sink); -} - -GLAPI void GLAPIENTRY glResetMinmax( GLenum target ) -{ - RESOLVE(PFNGLRESETMINMAXPROC, "glResetMinmax"); - proc(target); -} - -GLAPI void GLAPIENTRY glGetMinmax( GLenum target, GLboolean reset, - GLenum format, GLenum types, - GLvoid *values ) -{ - RESOLVE(PFNGLGETMINMAXPROC, "glGetMinmax"); - proc(target, reset, format, types, values); -} - -GLAPI void GLAPIENTRY glGetMinmaxParameterfv( GLenum target, GLenum pname, - GLfloat *params ) -{ - RESOLVE(PFNGLGETMINMAXPARAMETERFVPROC, "glGetMinmaxParameterfv"); - proc(target, pname, params); -} - -GLAPI void GLAPIENTRY glGetMinmaxParameteriv( GLenum target, GLenum pname, - GLint *params ) -{ - RESOLVE(PFNGLGETMINMAXPARAMETERIVPROC, "glGetMinmaxParameteriv"); - proc(target, pname, params); -} - -GLAPI void GLAPIENTRY glConvolutionFilter1D( GLenum target, - GLenum internalformat, GLsizei width, GLenum format, GLenum type, - const GLvoid *image ) -{ - RESOLVE(PFNGLCONVOLUTIONFILTER1DPROC, "glConvolutionFilter1D"); - proc(target, internalformat, width, format, type, image); -} - -GLAPI void GLAPIENTRY glConvolutionFilter2D( GLenum target, - GLenum internalformat, GLsizei width, GLsizei height, GLenum format, - GLenum type, const GLvoid *image ) -{ - RESOLVE(PFNGLCONVOLUTIONFILTER2DPROC, "glConvolutionFilter2D"); - proc(target, internalformat, width, height, format, type, image); -} - -GLAPI void GLAPIENTRY glConvolutionParameterf( GLenum target, GLenum pname, - GLfloat params ) -{ - RESOLVE(PFNGLCONVOLUTIONPARAMETERFPROC, "glConvolutionParameterf"); - proc(target, pname, params); -} - -GLAPI void GLAPIENTRY glConvolutionParameterfv( GLenum target, GLenum pname, - const GLfloat *params ) -{ - RESOLVE(PFNGLCONVOLUTIONPARAMETERFVPROC, "glConvolutionParameterfv"); - proc(target, pname, params); -} - -GLAPI void GLAPIENTRY glConvolutionParameteri( GLenum target, GLenum pname, - GLint params ) -{ - RESOLVE(PFNGLCONVOLUTIONPARAMETERIPROC, "glConvolutionParameteri"); - proc(target, pname, params); -} - -GLAPI void GLAPIENTRY glConvolutionParameteriv( GLenum target, GLenum pname, - const GLint *params ) -{ - RESOLVE(PFNGLCONVOLUTIONPARAMETERIVPROC, "glConvolutionParameteriv"); - proc(target, pname, params); -} - -GLAPI void GLAPIENTRY glCopyConvolutionFilter1D( GLenum target, - GLenum internalformat, GLint x, GLint y, GLsizei width ) -{ - RESOLVE(PFNGLCOPYCONVOLUTIONFILTER1DPROC, "glCopyConvolutionFilter1D"); - proc(target, internalformat, x, y, width); -} - -GLAPI void GLAPIENTRY glCopyConvolutionFilter2D( GLenum target, - GLenum internalformat, GLint x, GLint y, GLsizei width, - GLsizei height) -{ - RESOLVE(PFNGLCOPYCONVOLUTIONFILTER2DPROC, "glCopyConvolutionFilter2D"); - proc(target, internalformat, x, y, width, height); -} - -GLAPI void GLAPIENTRY glGetConvolutionFilter( GLenum target, GLenum format, - GLenum type, GLvoid *image ) -{ - RESOLVE(PFNGLGETCONVOLUTIONFILTERPROC, "glGetConvolutionFilter"); - proc(target, format, type, image); -} - -GLAPI void GLAPIENTRY glGetConvolutionParameterfv( GLenum target, GLenum pname, - GLfloat *params ) -{ - RESOLVE(PFNGLGETCONVOLUTIONPARAMETERFVPROC, "glGetConvolutionParameterfv"); - proc(target, pname, params); -} - -GLAPI void GLAPIENTRY glGetConvolutionParameteriv( GLenum target, GLenum pname, - GLint *params ) -{ - RESOLVE(PFNGLGETCONVOLUTIONPARAMETERIVPROC, "glGetConvolutionParameteriv"); - proc(target, pname, params); -} - -GLAPI void GLAPIENTRY glSeparableFilter2D( GLenum target, - GLenum internalformat, GLsizei width, GLsizei height, GLenum format, - GLenum type, const GLvoid *row, const GLvoid *column ) -{ - RESOLVE(PFNGLSEPARABLEFILTER2DPROC, "glSeparableFilter2D"); - proc(target, internalformat, width, height, format, type, row, column); -} - -GLAPI void GLAPIENTRY glGetSeparableFilter( GLenum target, GLenum format, - GLenum type, GLvoid *row, GLvoid *column, GLvoid *span ) -{ - RESOLVE(PFNGLGETSEPARABLEFILTERPROC, "glGetSeparableFilter"); - proc(target, format, type, row, column, span); + return glGetString(name); } /* - * OpenGL 1.2 - */ + Special non-static wrapper for glAddSwapHintRectWIN for copySubBuffers +*/ -GLAPI void GLAPIENTRY glTexImage3D( GLenum target, GLint level, - GLint internalFormat, - GLsizei width, GLsizei height, - GLsizei depth, GLint border, - GLenum format, GLenum type, - const GLvoid *pixels ) +typedef void (__stdcall *PFNGLADDSWAPHINTRECTWIN)(GLint x, GLint y, GLsizei width, GLsizei height); + +void glAddSwapHintRectWINWrapperNonstatic(GLint x, GLint y, GLsizei width, GLsizei height) { - RESOLVE(PFNGLTEXIMAGE3DPROC, "glTexImage3D"); - proc(target, level, internalFormat, width, height, depth, border, format, type, pixels); + RESOLVE(PFNGLADDSWAPHINTRECTWIN, "glAddSwapHintRectWIN"); + proc(x, y, width, height); } -GLAPI void GLAPIENTRY glTexSubImage3D( GLenum target, GLint level, - GLint xoffset, GLint yoffset, - GLint zoffset, GLsizei width, - GLsizei height, GLsizei depth, - GLenum format, - GLenum type, const GLvoid *pixels) -{ - RESOLVE(PFNGLTEXSUBIMAGE3DPROC, "glTexSubImage3D"); - proc(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); -} - -GLAPI void GLAPIENTRY glCopyTexSubImage3D( GLenum target, GLint level, - GLint xoffset, GLint yoffset, - GLint zoffset, GLint x, - GLint y, GLsizei width, - GLsizei height ) -{ - RESOLVE(PFNGLCOPYTEXSUBIMAGE3DPROC, "glCopyTexSubImage3D"); - proc(target, level, xoffset, yoffset, zoffset, x, y, width, height); -} - - -/* - * 20. GL_EXT_texture_object - */ -GLAPI void GLAPIENTRY glGenTexturesEXT( GLsizei n, GLuint *textures ) -{ - glGenTextures(n, textures); -} - -GLAPI void GLAPIENTRY glDeleteTexturesEXT( GLsizei n, const GLuint *textures) -{ - glDeleteTextures(n, textures); -} - -GLAPI void GLAPIENTRY glBindTextureEXT( GLenum target, GLuint texture ) -{ - glBindTexture(target, target); -} - -GLAPI void GLAPIENTRY glPrioritizeTexturesEXT( GLsizei n, const GLuint *textures, const GLclampf *priorities ) -{ - glPrioritizeTextures(n, textures, priorities); -} - -GLAPI GLboolean GLAPIENTRY glAreTexturesResidentEXT( GLsizei n, const GLuint *textures, GLboolean *residences ) -{ - return glAreTexturesResident(n, textures, residences); -} - -GLAPI GLboolean GLAPIENTRY glIsTextureEXT( GLuint texture ) -{ - return glIsTexture(texture); -} - -/* - * GL_ARB_multitexture (ARB extension 1 and OpenGL 1.2.1) - */ - -GLAPI void GLAPIENTRY glActiveTextureARB(GLenum texture) -{ - RESOLVE(PFNGLACTIVETEXTUREARBPROC, "glActiveTextureARB"); - proc(texture); -} - -GLAPI void GLAPIENTRY glMultiTexCoord1dvARB(GLenum target, const GLdouble *v) -{ - RESOLVE(PFNGLMULTITEXCOORD1DVARBPROC, "glMultiTexCoord1dvARB"); - proc(target, v); -} - -GLAPI void GLAPIENTRY glMultiTexCoord1fvARB(GLenum target, const GLfloat *v) -{ - RESOLVE(PFNGLMULTITEXCOORD1FVARBPROC, "glMultiTexCoord1fvARB"); - proc(target, v); -} - -GLAPI void GLAPIENTRY glMultiTexCoord1ivARB(GLenum target, const GLint *v) -{ - RESOLVE(PFNGLMULTITEXCOORD1IVARBPROC, "glMultiTexCoord1ivARB"); - proc(target, v); -} - -GLAPI void GLAPIENTRY glMultiTexCoord1svARB(GLenum target, const GLshort *v) -{ - RESOLVE(PFNGLMULTITEXCOORD1SVARBPROC, "glMultiTexCoord1svARB"); - proc(target, v); -} -GLAPI void GLAPIENTRY glMultiTexCoord2dvARB(GLenum target, const GLdouble *v) -{ - RESOLVE(PFNGLMULTITEXCOORD2DVARBPROC, "glMultiTexCoord2dvARB"); - proc(target, v); -} -GLAPI void GLAPIENTRY glMultiTexCoord2fvARB(GLenum target, const GLfloat *v) -{ - RESOLVE(PFNGLMULTITEXCOORD2FVARBPROC, "glMultiTexCoord2fvARB"); - proc(target, v); -} -GLAPI void GLAPIENTRY glMultiTexCoord2ivARB(GLenum target, const GLint *v) -{ - RESOLVE(PFNGLMULTITEXCOORD2IVARBPROC, "glMultiTexCoord2ivARB"); - proc(target, v); -} -GLAPI void GLAPIENTRY glMultiTexCoord2svARB(GLenum target, const GLshort *v) -{ - RESOLVE(PFNGLMULTITEXCOORD1SVARBPROC, "glMultiTexCoord1svARB"); - proc(target, v); -} -GLAPI void GLAPIENTRY glMultiTexCoord3dvARB(GLenum target, const GLdouble *v) -{ - RESOLVE(PFNGLMULTITEXCOORD3DVARBPROC, "glMultiTexCoord3dvARB"); - proc(target, v); -} -GLAPI void GLAPIENTRY glMultiTexCoord3fvARB(GLenum target, const GLfloat *v) -{ - RESOLVE(PFNGLMULTITEXCOORD3FVARBPROC, "glMultiTexCoord3fvARB"); - proc(target, v); -} -GLAPI void GLAPIENTRY glMultiTexCoord3ivARB(GLenum target, const GLint *v) -{ - RESOLVE(PFNGLMULTITEXCOORD3IVARBPROC, "glMultiTexCoord3ivARB"); - proc(target, v); -} -GLAPI void GLAPIENTRY glMultiTexCoord3svARB(GLenum target, const GLshort *v) -{ - RESOLVE(PFNGLMULTITEXCOORD1SVARBPROC, "glMultiTexCoord1svARB"); - proc(target, v); -} -GLAPI void GLAPIENTRY glMultiTexCoord4dvARB(GLenum target, const GLdouble *v) -{ - RESOLVE(PFNGLMULTITEXCOORD4DVARBPROC, "glMultiTexCoord4dvARB"); - proc(target, v); -} -GLAPI void GLAPIENTRY glMultiTexCoord4fvARB(GLenum target, const GLfloat *v) -{ - RESOLVE(PFNGLMULTITEXCOORD4FVARBPROC, "glMultiTexCoord4fvARB"); - proc(target, v); -} -GLAPI void GLAPIENTRY glMultiTexCoord4ivARB(GLenum target, const GLint *v) -{ - RESOLVE(PFNGLMULTITEXCOORD4IVARBPROC, "glMultiTexCoord4ivARB"); - proc(target, v); -} -GLAPI void GLAPIENTRY glMultiTexCoord4svARB(GLenum target, const GLshort *v) -{ - RESOLVE(PFNGLMULTITEXCOORD1SVARBPROC, "glMultiTexCoord1svARB"); - proc(target, v); -} - - -GLAPI void GLAPIENTRY glActiveStencilFaceEXT(GLenum face) -{ - RESOLVE(PFNGLACTIVESTENCILFACEEXTPROC, "glActiveStencilFaceEXT"); - proc(face); -} - -GLAPI void APIENTRY glPointParameterfARB(GLenum pname, GLfloat param) -{ - RESOLVE(PFNGLPOINTPARAMETERFARBPROC, "glPointParameterfARB"); - proc(pname, param); -} - -GLAPI void APIENTRY glPointParameterfvARB(GLenum pname, const GLfloat *params) -{ - RESOLVE(PFNGLPOINTPARAMETERFVARBPROC, "glPointParameterfvARB"); - proc(pname, params); -} - - -GLAPI void APIENTRY glWindowPos3fARB(GLfloat x, GLfloat y, GLfloat z) -{ - RESOLVE(PFNGLWINDOWPOS3FARBPROC, "glWindowPos3fARB"); - proc(x, y, z); -} - -GLAPI void APIENTRY glPointParameteri(GLenum pname, GLint param) -{ - RESOLVE(PFNGLPOINTPARAMETERIPROC, "glPointParameteri"); - proc(pname, param); -} - -GLAPI void APIENTRY glPointParameteriv(GLenum pname, const GLint *params) -{ - RESOLVE(PFNGLPOINTPARAMETERIVPROC, "glPointParameteriv"); - proc(pname, params); -} - -GLAPI void APIENTRY glPointParameteriNV(GLenum pname, GLint param) -{ - RESOLVE(PFNGLPOINTPARAMETERINVPROC, "glPointParameteriNV"); - proc(pname, param); -} - -GLAPI void APIENTRY glPointParameterivNV(GLenum pname, const GLint *params) -{ - RESOLVE(PFNGLPOINTPARAMETERIVNVPROC, "glPointParameterivNV"); - proc(pname, params); -} - -GLAPI void APIENTRY glSecondaryColor3bv(const GLbyte *v) -{ - RESOLVE(PFNGLSECONDARYCOLOR3BVPROC, "glSecondaryColor3bv"); - proc(v); -} -GLAPI void APIENTRY glSecondaryColor3dv(const GLdouble *v) -{ - RESOLVE(PFNGLSECONDARYCOLOR3DVPROC, "glSecondaryColor3dv"); - proc(v); -} -GLAPI void APIENTRY glSecondaryColor3fv(const GLfloat *v) -{ - RESOLVE(PFNGLSECONDARYCOLOR3FVPROC, "glSecondaryColor3fv"); - proc(v); -} -GLAPI void APIENTRY glSecondaryColor3iv(const GLint *v) -{ - RESOLVE(PFNGLSECONDARYCOLOR3IVPROC, "glSecondaryColor3iv"); - proc(v); -} -GLAPI void APIENTRY glSecondaryColor3sv(const GLshort *v) -{ - RESOLVE(PFNGLSECONDARYCOLOR3SVPROC, "glSecondaryColor3sv"); - proc(v); -} -GLAPI void APIENTRY glSecondaryColor3ubv(const GLubyte *v) -{ - RESOLVE(PFNGLSECONDARYCOLOR3UBVPROC, "glSecondaryColor3ubv"); - proc(v); -} -GLAPI void APIENTRY glSecondaryColor3uiv(const GLuint *v) -{ - RESOLVE(PFNGLSECONDARYCOLOR3UIVPROC, "glSecondaryColor3uiv"); - proc(v); -} -GLAPI void APIENTRY glSecondaryColor3usv(const GLushort *v) -{ - RESOLVE(PFNGLSECONDARYCOLOR3USVPROC, "glSecondaryColor3usv"); - proc(v); -} -GLAPI void APIENTRY glSecondaryColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) -{ - RESOLVE(PFNGLSECONDARYCOLORPOINTERPROC, "glSecondaryColorPointer"); - proc(size, type, stride, pointer); -} - - -GLAPI void APIENTRY glBlendFuncSeparate(GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha) -{ - RESOLVE(PFNGLBLENDFUNCSEPARATEPROC, "glBlendFuncSeparate"); - proc(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha); -} -GLAPI void APIENTRY glFogCoordfv(const GLfloat *coord) -{ - RESOLVE(PFNGLFOGCOORDFVPROC, "glFogCoordfv"); - proc(coord); -} -GLAPI void APIENTRY glFogCoorddv(const GLdouble *coord) -{ - RESOLVE(PFNGLFOGCOORDDVPROC, "glFogCoorddv"); - proc(coord); -} -GLAPI void APIENTRY glFogCoordPointer(GLenum type, GLsizei stride, const GLvoid *pointer) -{ - RESOLVE(PFNGLFOGCOORDPOINTERPROC, "glFogCoordPointer"); - proc(type, stride, pointer); -} - - -GLAPI void APIENTRY glSampleCoverageARB(GLclampf value, GLboolean invert) -{ - RESOLVE(PFNGLSAMPLECOVERAGEARBPROC, "glSampleCoverageARB"); - proc(value, invert); -} -GLAPI void APIENTRY glSampleMaskSGIS(GLclampf value, GLboolean invert) -{ - RESOLVE(PFNGLSAMPLEMASKSGISPROC, "glSampleMaskSGIS"); - proc(value, invert); -} -GLAPI void APIENTRY glSamplePatternSGIS(GLenum pattern) -{ - RESOLVE(PFNGLSAMPLEPATTERNSGISPROC, "glSamplePatternSGIS"); - proc(pattern); -} diff --git a/xserver/hw/xwin/glx/indirect.c b/xserver/hw/xwin/glx/indirect.c index 5e12022f4..1cf82a7cc 100644 --- a/xserver/hw/xwin/glx/indirect.c +++ b/xserver/hw/xwin/glx/indirect.c @@ -1,22 +1,27 @@ /* - * GLX implementation that uses Windows OpenGL library - * (Indirect rendering path) + * File: indirect.c + * Purpose: A GLX implementation that uses Windows OpenGL library + * + * Authors: Alexander Gottwald + * Jon TURNEY + * + * Copyright (c) Jon TURNEY 2009 + * Copyright (c) Alexander Gottwald 2004 * - * Authors: Alexander Gottwald - */ -/* * Portions of this file are copied from GL/apple/indirect.c, * which contains the following copyright: - * - * Copyright (c) 2002 Greg Parker. All Rights Reserved. - * Copyright (c) 2002 Apple Computer, Inc. * - * Portions of this file are copied from xf86glx.c, + * Copyright (c) 2007, 2008, 2009 Apple Inc. + * Copyright (c) 2004 Torrey T. Lyons. All Rights Reserved. + * Copyright (c) 2002 Greg Parker. All Rights Reserved. + * + * Portions of this file are copied from Mesa's xf86glx.c, * which contains the following copyright: * * Copyright 1998-1999 Precision Insight, Inc., Cedar Park, Texas. * All Rights Reserved. * + * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation @@ -34,575 +39,194 @@ * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. - * - * Except as contained in this notice, the name(s) of the above copyright - * holders shall not be used in advertising or otherwise to promote the sale, - * use or other dealings in this Software without prior written authorization. */ +/* + TODO: + - hook up remaining unimplemented extensions + - research what guarantees glXWaitX, glXWaitGL are supposed to offer, and implement then + using GdiFlush and/or glFinish + - pbuffer clobbering: we don't get async notification, but can we arrange to emit the + event when we notice it's been clobbered? at the very least, check if it's been clobbered + before using it? + - are the __GLXConfig * we get handed back ones we are made (so we can extend the structure + with privates?) Or are they created inside the GLX core as well? +*/ +/* + MSDN clarifications: -#ifdef HAVE_DIX_CONFIG_H -#include + It says SetPixelFormat()'s PIXELFORMATDESCRIPTOR pointer argument has no effect + except on metafiles, this seems to mean that as it's ok to supply NULL if the DC + is not for a metafile + + wglMakeCurrent ignores the hdc if hglrc is NULL, so wglMakeCurrent(NULL, NULL) + is used to make no context current + +*/ + +#ifdef HAVE_XWIN_CONFIG_H +#include #endif #include "glwindows.h" -#include -#include +#include +#include +#include +#include #include +#include + +#define NUM_ELEMENTS(x) (sizeof(x)/ sizeof(x[1])) + +/* ---------------------------------------------------------------------- */ +/* + * structure definitions + */ + +typedef struct __GLXWinContext __GLXWinContext; +typedef struct __GLXWinDrawable __GLXWinDrawable; +typedef struct __GLXWinScreen glxWinScreen; +typedef struct __GLXWinConfig GLXWinConfig; + +struct __GLXWinContext { + __GLXcontext base; + HGLRC ctx; /* Windows GL Context */ + __GLXWinContext *shareContext; /* Context with which we will share display lists and textures */ + HWND hwnd; /* For detecting when HWND has changed */ +}; + +struct __GLXWinDrawable +{ + __GLXdrawable base; + __GLXWinContext *drawContext; + __GLXWinContext *readContext; + + /* If this drawable is GLX_DRAWABLE_PBUFFER */ + HPBUFFERARB hPbuffer; + + /* If this drawable is GLX_DRAWABLE_PIXMAP */ + HDC dibDC; + HBITMAP hDIB; + HBITMAP hOldDIB; /* original DIB for DC */ + void *pOldBits; /* original pBits for this drawable's pixmap */ +}; + +struct __GLXWinScreen +{ + __GLXscreen base; + + /* Supported GLX extensions */ + unsigned char glx_enable_bits[__GLX_EXT_BYTES]; + + Bool has_WGL_ARB_multisample; + Bool has_WGL_ARB_pixel_format; + Bool has_WGL_ARB_pbuffer; + Bool has_WGL_ARB_render_texture; + + /* wrapped screen functions */ + RealizeWindowProcPtr RealizeWindow; + UnrealizeWindowProcPtr UnrealizeWindow; + CopyWindowProcPtr CopyWindow; +}; + +struct __GLXWinConfig +{ + __GLXconfig base; + int pixelFormatIndex; +}; + +/* ---------------------------------------------------------------------- */ +/* + * Various debug helpers + */ #define GLWIN_DEBUG_HWND(hwnd) \ - if (glWinDebugSettings.dumpHWND) { \ + if (glxWinDebugSettings.dumpHWND) { \ char buffer[1024]; \ if (GetWindowText(hwnd, buffer, sizeof(buffer))==0) *buffer=0; \ - GLWIN_DEBUG_MSG("Got HWND %s (%p)\n", buffer, hwnd); \ + GLWIN_DEBUG_MSG("Got HWND %p for window '%s'", hwnd, buffer); \ } +glxWinDebugSettingsRec glxWinDebugSettings = { 0, 0, 0, 0, 0, 0}; -/* ggs: needed to call back to glx with visual configs */ -extern void GlxSetVisualConfigs(int nconfigs, __GLXvisualConfig *configs, void **configprivs); - -glWinDebugSettingsRec glWinDebugSettings = { 1, 0, 0, 0, 0}; - -static void glWinInitDebugSettings(void) +static void glxWinInitDebugSettings(void) { char *envptr; envptr = getenv("GLWIN_ENABLE_DEBUG"); if (envptr != NULL) - glWinDebugSettings.enableDebug = (atoi(envptr) == 1); + glxWinDebugSettings.enableDebug = (atoi(envptr) == 1); envptr = getenv("GLWIN_ENABLE_TRACE"); if (envptr != NULL) - glWinDebugSettings.enableTrace = (atoi(envptr) == 1); + glxWinDebugSettings.enableTrace = (atoi(envptr) == 1); envptr = getenv("GLWIN_DUMP_PFD"); if (envptr != NULL) - glWinDebugSettings.dumpPFD = (atoi(envptr) == 1); - + glxWinDebugSettings.dumpPFD = (atoi(envptr) == 1); + envptr = getenv("GLWIN_DUMP_HWND"); if (envptr != NULL) - glWinDebugSettings.dumpHWND = (atoi(envptr) == 1); + glxWinDebugSettings.dumpHWND = (atoi(envptr) == 1); envptr = getenv("GLWIN_DUMP_DC"); if (envptr != NULL) - glWinDebugSettings.dumpDC = (atoi(envptr) == 1); + glxWinDebugSettings.dumpDC = (atoi(envptr) == 1); + + envptr = getenv("GLWIN_ENABLE_GLCALL_TRACE"); + if (envptr != NULL) + glxWinDebugSettings.enableGLcallTrace = (atoi(envptr) == 1); + + envptr = getenv("GLWIN_ENABLE_WGLCALL_TRACE"); + if (envptr != NULL) + glxWinDebugSettings.enableWGLcallTrace = (atoi(envptr) == 1); + + envptr = getenv("GLWIN_DEBUG_ALL"); + if (envptr != NULL) + { + glxWinDebugSettings.enableDebug = 1; + glxWinDebugSettings.enableTrace = 1; + glxWinDebugSettings.dumpPFD = 1; + glxWinDebugSettings.dumpHWND = 1; + glxWinDebugSettings.dumpDC = 1; + glxWinDebugSettings.enableGLcallTrace = 1; + glxWinDebugSettings.enableWGLcallTrace = 1; + } } -static char errorbuffer[1024]; -const char *glWinErrorMessage(void) +static +const char *glxWinErrorMessage(void) { - if (!FormatMessage( - FORMAT_MESSAGE_FROM_SYSTEM | - FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, - GetLastError(), - MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), - (LPTSTR) &errorbuffer, - sizeof(errorbuffer), - NULL )) + static char errorbuffer[1024]; + + if (!FormatMessage( + FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, + NULL, + GetLastError(), + MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + (LPTSTR) &errorbuffer, + sizeof(errorbuffer), + NULL )) { - snprintf(errorbuffer, sizeof(errorbuffer), "Unknown error in FormatMessage: %08x!\n", (unsigned)GetLastError()); + snprintf(errorbuffer, sizeof(errorbuffer), "Unknown error in FormatMessage: %08x!", (unsigned)GetLastError()); } - return errorbuffer; + + if (errorbuffer[strlen(errorbuffer)-1] == '\n') + errorbuffer[strlen(errorbuffer)-1] = 0; + + return errorbuffer; } -/* - * GLX implementation that uses Win32's OpenGL - */ - -/* - * Server-side GLX uses these functions which are normally defined - * in the OpenGL SI. - */ - -GLuint __glFloorLog2(GLuint val) -{ - int c = 0; - - while (val > 1) { - c++; - val >>= 1; - } - return c; -} - -/* some prototypes */ -static Bool glWinScreenProbe(int screen); -static Bool glWinInitVisuals(VisualPtr *visualp, DepthPtr *depthp, - int *nvisualp, int *ndepthp, - int *rootDepthp, VisualID *defaultVisp, - unsigned long sizes, int bitsPerRGB); -static void glWinSetVisualConfigs(int nconfigs, __GLXvisualConfig *configs, - void **privates); -static __GLinterface *glWinCreateContext(__GLimports *imports, - __GLcontextModes *mode, - __GLinterface *shareGC); -static void glWinCreateBuffer(__GLXdrawablePrivate *glxPriv); -static void glWinResetExtension(void); - -/* - * This structure is statically allocated in the __glXScreens[] - * structure. This struct is not used anywhere other than in - * __glXScreenInit to initialize each of the active screens - * (__glXActiveScreens[]). Several of the fields must be initialized by - * the screenProbe routine before they are copied to the active screens - * struct. In particular, the contextCreate, pGlxVisual, numVisuals, - * and numUsableVisuals fields must be initialized. - */ -static __GLXscreenInfo __glDDXScreenInfo = { - glWinScreenProbe, /* Must be generic and handle all screens */ - glWinCreateContext, /* Substitute screen's createContext routine */ - glWinCreateBuffer, /* Substitute screen's createBuffer routine */ - NULL, /* Set up pGlxVisual in probe */ - NULL, /* Set up pVisualPriv in probe */ - 0, /* Set up numVisuals in probe */ - 0, /* Set up numUsableVisuals in probe */ - "Vendor String", /* GLXvendor is overwritten by __glXScreenInit */ - "Version String", /* GLXversion is overwritten by __glXScreenInit */ - "Extensions String", /* GLXextensions is overwritten by __glXScreenInit */ - NULL /* WrappedPositionWindow is overwritten */ -}; - -void *__glXglDDXScreenInfo(void) { - return &__glDDXScreenInfo; -} - -static __GLXextensionInfo __glDDXExtensionInfo = { - GL_CORE_WINDOWS, - glWinResetExtension, - glWinInitVisuals, - glWinSetVisualConfigs -}; - -void *__glXglDDXExtensionInfo(void) { - return &__glDDXExtensionInfo; -} - -/* prototypes */ - -static GLboolean glWinDestroyContext(__GLcontext *gc); -static GLboolean glWinLoseCurrent(__GLcontext *gc); -static GLboolean glWinMakeCurrent(__GLcontext *gc); -static GLboolean glWinShareContext(__GLcontext *gc, __GLcontext *gcShare); -static GLboolean glWinCopyContext(__GLcontext *dst, const __GLcontext *src, - GLuint mask); -static GLboolean glWinForceCurrent(__GLcontext *gc); - -/* Drawing surface notification callbacks */ -static GLboolean glWinNotifyResize(__GLcontext *gc); -static void glWinNotifyDestroy(__GLcontext *gc); -static void glWinNotifySwapBuffers(__GLcontext *gc); - -/* Dispatch table override control for external agents like libGLS */ -static struct __GLdispatchStateRec* glWinDispatchExec(__GLcontext *gc); -static void glWinBeginDispatchOverride(__GLcontext *gc); -static void glWinEndDispatchOverride(__GLcontext *gc); - -/* Debug output */ static void pfdOut(const PIXELFORMATDESCRIPTOR *pfd); -static __GLexports glWinExports = { - glWinDestroyContext, - glWinLoseCurrent, - glWinMakeCurrent, - glWinShareContext, - glWinCopyContext, - glWinForceCurrent, - - glWinNotifyResize, - glWinNotifyDestroy, - glWinNotifySwapBuffers, - - glWinDispatchExec, - glWinBeginDispatchOverride, - glWinEndDispatchOverride -}; - -glWinScreenRec glWinScreens[MAXSCREENS]; - -/* __GLdrawablePrivate->private */ -typedef struct { - DrawablePtr pDraw; - /* xp_surface_id sid; */ -} GLWinDrawableRec; - -struct __GLcontextRec { - struct __GLinterfaceRec interface; /* required to be first */ - - HGLRC ctx; /* Windows GL Context */ - - HDC dc; /* Windows Device Context */ - winWindowInfoRec winInfo; /* Window info from XWin */ - - PIXELFORMATDESCRIPTOR pfd; /* Pixelformat flags */ - int pixelFormat; /* Pixelformat index */ - - unsigned isAttached :1; /* Flag to track if context is attached */ -}; - -static HDC glWinMakeDC(__GLcontext *gc) -{ - HDC dc; - - /*if (gc->winInfo.hrgn == NULL) - { - GLWIN_DEBUG_MSG("Creating region from RECT(%ld,%ld,%ld,%ld):", - gc->winInfo.rect.left, - gc->winInfo.rect.top, - gc->winInfo.rect.right, - gc->winInfo.rect.bottom); - gc->winInfo.hrgn = CreateRectRgnIndirect(&gc->winInfo.rect); - GLWIN_DEBUG_MSG2("%p\n", gc->winInfo.hrgn); - }*/ - - if (glWinDebugSettings.enableTrace) - GLWIN_DEBUG_HWND(gc->winInfo.hwnd); - - dc = GetDC(gc->winInfo.hwnd); - /*dc = GetDCEx(gc->winInfo.hwnd, gc->winInfo.hrgn, - DCX_WINDOW | DCX_NORESETATTRS ); */ - - if (dc == NULL) - ErrorF("GetDC error: %s\n", glWinErrorMessage()); - return dc; -} - -static void unattach(__GLcontext *gc) -{ - BOOL ret; - GLWIN_DEBUG_MSG("unattach (ctx %p)\n", gc->ctx); - if (!gc->isAttached) - { - ErrorF("called unattach on an unattached context\n"); - return; - } - - if (gc->ctx) - { - ret = wglDeleteContext(gc->ctx); - if (!ret) - ErrorF("wglDeleteContext error: %s\n", glWinErrorMessage()); - gc->ctx = NULL; - } - - if (gc->winInfo.hrgn) - { - ret = DeleteObject(gc->winInfo.hrgn); - if (!ret) - ErrorF("DeleteObject error: %s\n", glWinErrorMessage()); - gc->winInfo.hrgn = NULL; - } - - gc->isAttached = 0; -} - -static BOOL glWinAdjustHWND(__GLcontext *gc, WindowPtr pWin) -{ - HDC dc; - BOOL ret; - HGLRC newctx; - HWND oldhwnd; - - GLWIN_DEBUG_MSG("glWinAdjustHWND (ctx %p, pWin %p)\n", gc->ctx, pWin); - - if (pWin == NULL) - { - GLWIN_DEBUG_MSG("Deferring until window is created\n"); - return FALSE; - } - - oldhwnd = gc->winInfo.hwnd; - winGetWindowInfo(pWin, &gc->winInfo); - - GLWIN_DEBUG_HWND(gc->winInfo.hwnd); - if (gc->winInfo.hwnd == NULL) - { - GLWIN_DEBUG_MSG("Deferring until window is created\n"); - return FALSE; - } - - dc = glWinMakeDC(gc); - - if (glWinDebugSettings.dumpDC) - GLWIN_DEBUG_MSG("Got HDC %p\n", dc); - - gc->pixelFormat = ChoosePixelFormat(dc, &gc->pfd); - if (gc->pixelFormat == 0) - { - ErrorF("ChoosePixelFormat error: %s\n", glWinErrorMessage()); - ReleaseDC(gc->winInfo.hwnd, dc); - return FALSE; - } - - ret = SetPixelFormat(dc, gc->pixelFormat, &gc->pfd); - if (!ret) { - ErrorF("SetPixelFormat error: %s\n", glWinErrorMessage()); - ReleaseDC(gc->winInfo.hwnd, dc); - return FALSE; - } - - newctx = wglCreateContext(dc); - if (newctx == NULL) { - ErrorF("wglCreateContext error: %s\n", glWinErrorMessage()); - ReleaseDC(gc->winInfo.hwnd, dc); - return FALSE; - } - - GLWIN_DEBUG_MSG("wglCreateContext (ctx %p)\n", newctx); - - if (!wglShareLists(gc->ctx, newctx)) - { - ErrorF("wglShareLists error: %s\n", glWinErrorMessage()); - ReleaseDC(gc->winInfo.hwnd, dc); - return FALSE; - } - - if (oldhwnd != gc->winInfo.hwnd) - { - GLWIN_DEBUG_MSG("Trying wglCopyContext\n"); - if (!wglCopyContext(gc->ctx, newctx, GL_ALL_ATTRIB_BITS)) - { - ErrorF("wglCopyContext error: %s\n", glWinErrorMessage()); - ReleaseDC(gc->winInfo.hwnd, dc); - return FALSE; - } - } - - if (!wglDeleteContext(gc->ctx)) - { - ErrorF("wglDeleteContext error: %s\n", glWinErrorMessage()); - } - - gc->ctx = newctx; - - if (!wglMakeCurrent(dc, gc->ctx)) { - ErrorF("glMakeCurrent error: %s\n", glWinErrorMessage()); - ReleaseDC(gc->winInfo.hwnd, dc); - return FALSE; - } - - ReleaseDC(gc->winInfo.hwnd, dc); - - return TRUE; -} - -static BOOL glWinCreateContextReal(__GLcontext *gc, WindowPtr pWin) -{ - HDC dc; - BOOL ret; - - GLWIN_DEBUG_MSG("glWinCreateContextReal (pWin %p)\n", pWin); - - if (pWin == NULL) - { - GLWIN_DEBUG_MSG("Deferring until window is created\n"); - return FALSE; - } - - winGetWindowInfo(pWin, &gc->winInfo); - - GLWIN_DEBUG_HWND(gc->winInfo.hwnd); - if (gc->winInfo.hwnd == NULL) - { - GLWIN_DEBUG_MSG("Deferring until window is created\n"); - return FALSE; - } - - - dc = glWinMakeDC(gc); - - if (glWinDebugSettings.dumpDC) - GLWIN_DEBUG_MSG("Got HDC %p\n", dc); - - gc->pixelFormat = ChoosePixelFormat(dc, &gc->pfd); - if (gc->pixelFormat == 0) - { - ErrorF("ChoosePixelFormat error: %s\n", glWinErrorMessage()); - ReleaseDC(gc->winInfo.hwnd, dc); - return FALSE; - } - - ret = SetPixelFormat(dc, gc->pixelFormat, &gc->pfd); - if (!ret) { - ErrorF("SetPixelFormat error: %s\n", glWinErrorMessage()); - ReleaseDC(gc->winInfo.hwnd, dc); - return FALSE; - } - - gc->ctx = wglCreateContext(dc); - if (gc->ctx == NULL) { - ErrorF("wglCreateContext error: %s\n", glWinErrorMessage()); - ReleaseDC(gc->winInfo.hwnd, dc); - return FALSE; - } - - GLWIN_DEBUG_MSG("glWinCreateContextReal (ctx %p)\n", gc->ctx); - - if (!wglMakeCurrent(dc, gc->ctx)) { - ErrorF("glMakeCurrent error: %s\n", glWinErrorMessage()); - ReleaseDC(gc->winInfo.hwnd, dc); - return FALSE; - } - - ReleaseDC(gc->winInfo.hwnd, dc); - - return TRUE; -} - -static void attach(__GLcontext *gc, __GLdrawablePrivate *glPriv) -{ - __GLXdrawablePrivate *glxPriv = (__GLXdrawablePrivate *)glPriv->other; - - GLWIN_DEBUG_MSG("attach (ctx %p)\n", gc->ctx); - - if (gc->isAttached) - { - ErrorF("called attach on an attached context\n"); - return; - } - - if (glxPriv->type == DRAWABLE_WINDOW) - { - WindowPtr pWin = (WindowPtr) glxPriv->pDraw; - if (pWin == NULL) - { - GLWIN_DEBUG_MSG("Deferring ChoosePixelFormat until window is created\n"); - } else - { - if (glWinCreateContextReal(gc, pWin)) - { - gc->isAttached = TRUE; - GLWIN_DEBUG_MSG("attached\n"); - } - } - } -} - -static GLboolean glWinLoseCurrent(__GLcontext *gc) -{ - GLWIN_TRACE_MSG("glWinLoseCurrent (ctx %p)\n", gc->ctx); - - __glXLastContext = NULL; /* Mesa does this; why? */ - - return GL_TRUE; -} - -/* Context manipulation; return GL_FALSE on failure */ -static GLboolean glWinDestroyContext(__GLcontext *gc) -{ - GLWIN_DEBUG_MSG("glWinDestroyContext (ctx %p)\n", gc->ctx); - - if (gc != NULL) - { - if (gc->isAttached) - unattach(gc); - if (gc->dc != NULL) - DeleteDC(gc->dc); - free(gc); - } - - return GL_TRUE; -} - -static GLboolean glWinMakeCurrent(__GLcontext *gc) -{ - __GLdrawablePrivate *glPriv = gc->interface.imports.getDrawablePrivate(gc); - BOOL ret; - HDC dc; - - GLWIN_TRACE_MSG(" (ctx %p)\n", gc->ctx); - - if (!gc->isAttached) - attach(gc, glPriv); - - if (gc->ctx == NULL) { - ErrorF("Context is NULL\n"); - return GL_FALSE; - } - - dc = glWinMakeDC(gc); - ret = wglMakeCurrent(dc, gc->ctx); - if (!ret) - ErrorF("glMakeCurrent error: %s\n", glWinErrorMessage()); - ReleaseDC(gc->winInfo.hwnd, dc); - - return ret?GL_TRUE:GL_FALSE; -} - -static GLboolean glWinShareContext(__GLcontext *gc, __GLcontext *gcShare) -{ - GLWIN_DEBUG_MSG("glWinShareContext unimplemented\n"); - - return GL_TRUE; -} - -static GLboolean glWinCopyContext(__GLcontext *dst, const __GLcontext *src, - GLuint mask) -{ - BOOL ret; - - GLWIN_DEBUG_MSG("glWinCopyContext\n"); - - ret = wglCopyContext(src->ctx, dst->ctx, mask); - if (!ret) - { - ErrorF("wglCopyContext error: %s\n", glWinErrorMessage()); - return GL_FALSE; - } - - return GL_TRUE; -} - -static GLboolean glWinForceCurrent(__GLcontext *gc) -{ - GLWIN_TRACE_MSG(" (ctx %p)\n", gc->ctx); - - return GL_TRUE; -} - -/* Drawing surface notification callbacks */ - -static GLboolean glWinNotifyResize(__GLcontext *gc) -{ - GLWIN_DEBUG_MSG("unimplemented glWinNotifyResize"); - return GL_TRUE; -} - -static void glWinNotifyDestroy(__GLcontext *gc) -{ - GLWIN_DEBUG_MSG("unimplemented glWinNotifyDestroy"); -} - -static void glWinNotifySwapBuffers(__GLcontext *gc) -{ - GLWIN_DEBUG_MSG("unimplemented glWinNotifySwapBuffers"); -} - -/* Dispatch table override control for external agents like libGLS */ -static struct __GLdispatchStateRec* glWinDispatchExec(__GLcontext *gc) -{ - GLWIN_DEBUG_MSG("unimplemented glWinDispatchExec"); - return NULL; -} - -static void glWinBeginDispatchOverride(__GLcontext *gc) -{ - GLWIN_DEBUG_MSG("unimplemented glWinBeginDispatchOverride"); -} - -static void glWinEndDispatchOverride(__GLcontext *gc) -{ - GLWIN_DEBUG_MSG("unimplemented glWinEndDispatchOverride"); -} - #define DUMP_PFD_FLAG(flag) \ if (pfd->dwFlags & flag) { \ ErrorF("%s%s", pipesym, #flag); \ pipesym = " | "; \ } - + static void pfdOut(const PIXELFORMATDESCRIPTOR *pfd) { const char *pipesym = ""; /* will be set after first flag dump */ @@ -610,9 +234,6 @@ static void pfdOut(const PIXELFORMATDESCRIPTOR *pfd) ErrorF("nSize = %u\n", pfd->nSize); ErrorF("nVersion = %u\n", pfd->nVersion); ErrorF("dwFlags = %lu = {", pfd->dwFlags); - DUMP_PFD_FLAG(PFD_MAIN_PLANE); - DUMP_PFD_FLAG(PFD_OVERLAY_PLANE); - DUMP_PFD_FLAG(PFD_UNDERLAY_PLANE); DUMP_PFD_FLAG(PFD_DOUBLEBUFFER); DUMP_PFD_FLAG(PFD_STEREO); DUMP_PFD_FLAG(PFD_DRAW_TO_WINDOW); @@ -630,8 +251,8 @@ static void pfdOut(const PIXELFORMATDESCRIPTOR *pfd) DUMP_PFD_FLAG(PFD_DOUBLEBUFFER_DONTCARE); DUMP_PFD_FLAG(PFD_STEREO_DONTCARE); ErrorF("}\n"); - - ErrorF("iPixelType = %hu = %s\n", pfd->iPixelType, + + ErrorF("iPixelType = %hu = %s\n", pfd->iPixelType, (pfd->iPixelType == PFD_TYPE_RGBA ? "PFD_TYPE_RGBA" : "PFD_TYPE_COLORINDEX")); ErrorF("cColorBits = %hhu\n", pfd->cColorBits); ErrorF("cRedBits = %hhu\n", pfd->cRedBits); @@ -656,14 +277,1305 @@ static void pfdOut(const PIXELFORMATDESCRIPTOR *pfd) ErrorF("dwVisibleMask = %lu\n", pfd->dwVisibleMask); ErrorF("dwDamageMask = %lu\n", pfd->dwDamageMask); ErrorF("\n"); -} +} -static int makeFormat(__GLcontextModes *mode, PIXELFORMATDESCRIPTOR *pfdret) +static const char * +visual_class_name(int cls) +{ + switch (cls) { + case GLX_STATIC_COLOR: + return "StaticColor"; + case GLX_PSEUDO_COLOR: + return "PseudoColor"; + case GLX_STATIC_GRAY: + return "StaticGray"; + case GLX_GRAY_SCALE: + return "GrayScale"; + case GLX_TRUE_COLOR: + return "TrueColor"; + case GLX_DIRECT_COLOR: + return "DirectColor"; + default: + return "-none-"; + } +} + +static const char * +swap_method_name(int mthd) +{ + switch (mthd) + { + case GLX_SWAP_EXCHANGE_OML: + return "xchg"; + case GLX_SWAP_COPY_OML: + return "copy"; + case GLX_SWAP_UNDEFINED_OML: + return " "; + default: + return "????"; + } +} + +static void +fbConfigsDump(unsigned int n, __GLXconfig *c) +{ + ErrorF("%d fbConfigs\n", n); + ErrorF("pxf vis fb render Ste aux accum MS drawable Group/\n"); + ErrorF("idx ID ID VisualType Depth Lvl RGB CI DB Swap reo R G B A Z S buf AR AG AB AA bufs num W P Pb Float Trans Caveat\n"); + ErrorF("-----------------------------------------------------------------------------------------------------------------------------\n"); + + while (c != NULL) + { + unsigned int i = ((GLXWinConfig *)c)->pixelFormatIndex; + + ErrorF("%3d %2x %2x " + "%-11s" + " %3d %3d %s %s %s %s %s " + "%2d %2d %2d %2d " + "%2d %2d " + "%2d " + "%2d %2d %2d %2d" + " %2d %2d" + " %s %s %s " + " %s " + " %s " + " %d %s" + "\n", + i, c->visualID, c->fbconfigID, + visual_class_name(c->visualType), + c->rgbBits ? c->rgbBits : c->indexBits, + c->level, + (c->renderType & GLX_RGBA_BIT) ? "y" : ".", + (c->renderType & GLX_COLOR_INDEX_BIT) ? "y" : ".", + c->doubleBufferMode ? "y" : ".", + swap_method_name(c->swapMethod), + c->stereoMode ? "y" : ".", + c->redBits, c->greenBits, c->blueBits, c->alphaBits, + c->depthBits, c->stencilBits, + c->numAuxBuffers, + c->accumRedBits, c->accumGreenBits, c->accumBlueBits, c->accumAlphaBits, + c->sampleBuffers, c->samples, + (c->drawableType & GLX_WINDOW_BIT) ? "y" : ".", + (c->drawableType & GLX_PIXMAP_BIT) ? "y" : ".", + (c->drawableType & GLX_PBUFFER_BIT) ? "y" : ".", + ".", + (c->transparentPixel != GLX_NONE_EXT) ? "y" : ".", + c->visualSelectGroup, (c->visualRating == GLX_SLOW_VISUAL_EXT) ? "*" : " "); + + c = c->next; + } +} + +/* ---------------------------------------------------------------------- */ +/* + * Forward declarations + */ + +static __GLXscreen *glxWinScreenProbe(ScreenPtr pScreen); +static __GLXcontext *glxWinCreateContext(__GLXscreen *screen, + __GLXconfig *modes, + __GLXcontext *baseShareContext); +static __GLXdrawable *glxWinCreateDrawable(ClientPtr client, + __GLXscreen *screen, + DrawablePtr pDraw, + XID drawId, + int type, + XID glxDrawId, + __GLXconfig *conf); + +static Bool glxWinRealizeWindow(WindowPtr pWin); +static Bool glxWinUnrealizeWindow(WindowPtr pWin); +static void glxWinCopyWindow(WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc); + +static HDC glxWinMakeDC(__GLXWinContext *gc, __GLXWinDrawable *draw, HDC *hdc, HWND *hwnd); +static void glxWinReleaseDC(HWND hwnd, HDC hdc, __GLXWinDrawable *draw); + +static void glxWinCreateConfigs(HDC dc, glxWinScreen *screen); +static void glxWinCreateConfigsExt(HDC hdc, glxWinScreen *screen); +static int fbConfigToPixelFormat(__GLXconfig *mode, PIXELFORMATDESCRIPTOR *pfdret, int drawableTypeOverride); +static int fbConfigToPixelFormatIndex(HDC hdc, __GLXconfig *mode, int drawableTypeOverride, glxWinScreen *winScreen); + +/* ---------------------------------------------------------------------- */ +/* + * The GLX provider + */ + +__GLXprovider __glXWGLProvider = { + glxWinScreenProbe, + "Win32 native WGL", + NULL +}; + +void +glxWinPushNativeProvider(void) +{ + GlxPushProvider(&__glXWGLProvider); +} + +/* ---------------------------------------------------------------------- */ +/* + * Screen functions + */ + +static void +glxWinScreenDestroy(__GLXscreen *screen) +{ + GLWIN_DEBUG_MSG("glxWinScreenDestroy(%p)", screen); + __glXScreenDestroy(screen); + free(screen); +} + +static int +glxWinScreenSwapInterval(__GLXdrawable *drawable, int interval) +{ + BOOL ret = wglSwapIntervalEXTWrapper(interval); + if (!ret) + { + ErrorF("wglSwapIntervalEXT interval %d failed:%s\n", interval, glxWinErrorMessage()); + } + return ret; +} + +/* + Report the extensions split and formatted to avoid overflowing a line + */ +static void +glxLogExtensions(const char *prefix, const char *extensions) +{ + int length = 0; + char *strl; + char *str = malloc(strlen(extensions) + 1); + + if (str == NULL) + { + ErrorF("glxLogExtensions: xalloc error\n"); + return; + } + + str[strlen(extensions)] = '\0'; + strncpy (str, extensions, strlen(extensions)); + + strl = strtok(str, " "); + ErrorF("%s%s", prefix, strl); + length = strlen(prefix) + strlen(strl); + + while (1) + { + strl = strtok(NULL, " "); + if (strl == NULL) break; + + if (length + strlen(strl) + 1 > 120) + { + ErrorF("\n"); + ErrorF("%s",prefix); + length = strlen(prefix); + } + else + { + ErrorF(" "); + length++; + } + + ErrorF("%s", strl); + length = length + strlen(strl); + } + + ErrorF("\n"); + + free(str); +} + +/* This is called by GlxExtensionInit() asking the GLX provider if it can handle the screen... */ +static __GLXscreen * +glxWinScreenProbe(ScreenPtr pScreen) +{ + glxWinScreen *screen; + const char *gl_extensions; + const char *wgl_extensions; + HWND hwnd; + HDC hdc; + HGLRC hglrc; + + GLWIN_DEBUG_MSG("glxWinScreenProbe"); + + glxWinInitDebugSettings(); + + if (pScreen == NULL) + return NULL; + + if (!winCheckScreenAiglxIsSupported(pScreen)) + { + LogMessage(X_ERROR,"AIGLX: No native OpenGL in modes with a root window\n"); + return NULL; + } + + screen = calloc(1, sizeof(glxWinScreen)); + + if (NULL == screen) + return NULL; + + /* Wrap RealizeWindow, UnrealizeWindow and CopyWindow on this screen */ + screen->RealizeWindow = pScreen->RealizeWindow; + pScreen->RealizeWindow = glxWinRealizeWindow; + screen->UnrealizeWindow = pScreen->UnrealizeWindow; + pScreen->UnrealizeWindow = glxWinUnrealizeWindow; + screen->CopyWindow = pScreen->CopyWindow; + pScreen->CopyWindow = glxWinCopyWindow; + + /* Dump out some useful information about the native renderer */ + + // create window class +#define WIN_GL_TEST_WINDOW_CLASS "XWinGLTest" + { + static wATOM glTestWndClass = 0; + if (glTestWndClass == 0) + { + WNDCLASSEX wc; + wc.cbSize = sizeof(WNDCLASSEX); + wc.style = CS_HREDRAW | CS_VREDRAW; + wc.lpfnWndProc = DefWindowProc; + wc.cbClsExtra = 0; + wc.cbWndExtra = 0; + wc.hInstance = GetModuleHandle(NULL); + wc.hIcon = 0; + wc.hCursor = 0; + wc.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH); + wc.lpszMenuName = NULL; + wc.lpszClassName = WIN_GL_TEST_WINDOW_CLASS; + wc.hIconSm = 0; + RegisterClassEx (&wc); + } + } + + // create an invisible window for a scratch DC + hwnd = CreateWindowExA(0, + WIN_GL_TEST_WINDOW_CLASS, + "XWin GL Renderer Capabilities Test Window", + 0, 0, 0, 0, 0, NULL, NULL, GetModuleHandle(NULL), NULL); + if (hwnd == NULL) + LogMessage(X_ERROR,"AIGLX: Couldn't create a window for render capabilities testing\n"); + + hdc = GetDC(hwnd); + + // we must set a pixel format before we can create a context, just use the first one... + SetPixelFormat(hdc, 1, NULL); + hglrc = wglCreateContext(hdc); + wglMakeCurrent(hdc, hglrc); + + // initialize wgl extension proc pointers (don't call them before here...) + // (but we need to have a current context for them to be resolvable) + wglResolveExtensionProcs(); + + ErrorF("GL_VERSION: %s\n", glGetStringWrapperNonstatic(GL_VERSION)); + ErrorF("GL_VENDOR: %s\n", glGetStringWrapperNonstatic(GL_VENDOR)); + ErrorF("GL_RENDERER: %s\n", glGetStringWrapperNonstatic(GL_RENDERER)); + gl_extensions = (const char *)glGetStringWrapperNonstatic(GL_EXTENSIONS); + glxLogExtensions("GL_EXTENSIONS: ", gl_extensions); + wgl_extensions = wglGetExtensionsStringARBWrapper(hdc); + if (!wgl_extensions) wgl_extensions = ""; + glxLogExtensions("WGL_EXTENSIONS: ", wgl_extensions); + + // Can you see the problem here? The extensions string is DC specific + // Different DCs for windows on a multimonitor system driven by multiple cards + // might have completely different capabilities. Of course, good luck getting + // those screens to be accelerated in XP and earlier... + + { + // testing facility to not use any WGL extensions + char *envptr = getenv("GLWIN_NO_WGL_EXTENSIONS"); + if ((envptr != NULL) && (atoi(envptr) != 0)) + { + ErrorF("GLWIN_NO_WGL_EXTENSIONS is set, ignoring WGL_EXTENSIONS\n"); + wgl_extensions = ""; + } + } + + { + Bool glx_sgi_make_current_read = FALSE; + + // + // Based on the WGL extensions available, enable various GLX extensions + // XXX: make this table-driven ? + // + memset(screen->glx_enable_bits, 0, __GLX_EXT_BYTES); + + __glXEnableExtension(screen->glx_enable_bits, "GLX_EXT_visual_info"); + __glXEnableExtension(screen->glx_enable_bits, "GLX_EXT_visual_rating"); + __glXEnableExtension(screen->glx_enable_bits, "GLX_EXT_import_context"); + __glXEnableExtension(screen->glx_enable_bits, "GLX_OML_swap_method"); + __glXEnableExtension(screen->glx_enable_bits, "GLX_SGIX_fbconfig"); + + if (strstr(wgl_extensions, "WGL_ARB_make_current_read")) + { + __glXEnableExtension(screen->glx_enable_bits, "GLX_SGI_make_current_read"); + LogMessage(X_INFO, "AIGLX: enabled GLX_SGI_make_current_read\n"); + glx_sgi_make_current_read = TRUE; + } + + if (strstr(gl_extensions, "GL_WIN_swap_hint")) + { + __glXEnableExtension(screen->glx_enable_bits, "GLX_MESA_copy_sub_buffer"); + LogMessage(X_INFO, "AIGLX: enabled GLX_MESA_copy_sub_buffer\n"); + } + + if (strstr(wgl_extensions, "WGL_EXT_swap_control")) + { + __glXEnableExtension(screen->glx_enable_bits, "GLX_SGI_swap_control"); + __glXEnableExtension(screen->glx_enable_bits, "GLX_MESA_swap_control"); + LogMessage(X_INFO, "AIGLX: enabled GLX_SGI_swap_control and GLX_MESA_swap_control\n"); + } + +/* // Hmm? screen->texOffset */ +/* if (strstr(wgl_extensions, "WGL_ARB_render_texture")) */ +/* { */ +/* __glXEnableExtension(screen->glx_enable_bits, "GLX_EXT_texture_from_pixmap"); */ +/* LogMessage(X_INFO, "AIGLX: GLX_EXT_texture_from_pixmap backed by buffer objects\n"); */ +/* screen->has_WGL_ARB_render_texture = TRUE; */ +/* } */ + + if (strstr(wgl_extensions, "WGL_ARB_pbuffer")) + { + __glXEnableExtension(screen->glx_enable_bits, "GLX_SGIX_pbuffer"); + LogMessage(X_INFO, "AIGLX: enabled GLX_SGIX_pbuffer\n"); + screen->has_WGL_ARB_pbuffer = TRUE; + } + + if (strstr(wgl_extensions, "WGL_ARB_multisample")) + { + __glXEnableExtension(screen->glx_enable_bits, "GLX_ARB_multisample"); + __glXEnableExtension(screen->glx_enable_bits, "GLX_SGIS_multisample"); + LogMessage(X_INFO, "AIGLX: enabled GLX_ARB_multisample and GLX_SGIS_multisample\n"); + screen->has_WGL_ARB_multisample = TRUE; + } + + screen->base.destroy = glxWinScreenDestroy; + screen->base.createContext = glxWinCreateContext; + screen->base.createDrawable = glxWinCreateDrawable; + screen->base.swapInterval = glxWinScreenSwapInterval; + screen->base.hyperpipeFuncs = NULL; + screen->base.swapBarrierFuncs = NULL; + screen->base.pScreen = pScreen; + + if (strstr(wgl_extensions, "WGL_ARB_pixel_format")) + { + glxWinCreateConfigsExt(hdc, screen); + screen->has_WGL_ARB_pixel_format = TRUE; + } + else + { + glxWinCreateConfigs(hdc, screen); + screen->has_WGL_ARB_pixel_format = FALSE; + } + // Initializes screen->base.fbconfigs and screen->base.numFBConfigs + + /* These will be set by __glXScreenInit */ + screen->base.visuals = NULL; + screen->base.numVisuals = 0; + + __glXScreenInit(&screen->base, pScreen); + + // dump out fbConfigs now fbConfigIds and visualIDs have been assigned + fbConfigsDump(screen->base.numFBConfigs, screen->base.fbconfigs); + + // Override the GL extensions string set by __glXScreenInit() + screen->base.GLextensions = strdup(gl_extensions); + + // Generate the GLX extensions string (overrides that set by __glXScreenInit()) + { + unsigned int buffer_size = __glXGetExtensionString(screen->glx_enable_bits, NULL); + if (buffer_size > 0) + { + if (screen->base.GLXextensions != NULL) + { + free(screen->base.GLXextensions); + } + + screen->base.GLXextensions = xnfalloc(buffer_size); + __glXGetExtensionString(screen->glx_enable_bits, screen->base.GLXextensions); + } + } + + // + // Override the GLX version (__glXScreenInit() sets it to "1.2") + // if we have all the needed extensionsto operate as a higher version + // + // SGIX_fbconfig && SGIX_pbuffer && SGI_make_current_read -> 1.3 + // ARB_multisample -> 1.4 + // + if (screen->has_WGL_ARB_pbuffer && glx_sgi_make_current_read) + { + free(screen->base.GLXversion); + + if (screen->has_WGL_ARB_multisample) + { + screen->base.GLXversion = strdup("1.4"); + screen->base.GLXmajor = 1; + screen->base.GLXminor = 4; + } + else + { + screen->base.GLXversion = strdup("1.3"); + screen->base.GLXmajor = 1; + screen->base.GLXminor = 3; + } + LogMessage(X_INFO, "AIGLX: Set GLX version to %s\n", screen->base.GLXversion); + } + } + + wglMakeCurrent(NULL, NULL); + wglDeleteContext(hglrc); + ReleaseDC(hwnd, hdc); + DestroyWindow(hwnd); + + return &screen->base; +} + +/* ---------------------------------------------------------------------- */ +/* + * Window functions + */ + +static Bool +glxWinRealizeWindow(WindowPtr pWin) +{ + Bool result; + ScreenPtr pScreen = pWin->drawable.pScreen; + glxWinScreen *screenPriv = (glxWinScreen *) glxGetScreen(pScreen); + + GLWIN_DEBUG_MSG("glxWinRealizeWindow"); + + /* Allow the window to be created (RootlessRealizeWindow is inside our wrap) */ + pScreen->RealizeWindow = screenPriv->RealizeWindow; + result = pScreen->RealizeWindow(pWin); + pScreen->RealizeWindow = glxWinRealizeWindow; + + return result; +} + + +static void +glxWinCopyWindow(WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc) +{ + __GLXWinDrawable *pGlxDraw; + ScreenPtr pScreen = pWindow->drawable.pScreen; + glxWinScreen *screenPriv = (glxWinScreen *) glxGetScreen(pScreen); + + GLWIN_TRACE_MSG("glxWinCopyWindow pWindow %p", pWindow); + + dixLookupResourceByType((pointer) &pGlxDraw, pWindow->drawable.id, __glXDrawableRes, + NullClient, DixUnknownAccess); + + + /* + Discard any CopyWindow requests if a GL drawing context is pointing at the window + + For regions which are being drawn by GL, the shadow framebuffer doesn't have the + correct bits, so we wish to avoid shadow framebuffer damage occuring, which will + cause those incorrect bits to be transferred to the display.... + */ + if (pGlxDraw && pGlxDraw->drawContext) + { + GLWIN_DEBUG_MSG("glxWinCopyWindow: discarding"); + return; + } + + GLWIN_DEBUG_MSG("glxWinCopyWindow - passing to hw layer"); + + pScreen->CopyWindow = screenPriv->CopyWindow; + pScreen->CopyWindow(pWindow, ptOldOrg, prgnSrc); + pScreen->CopyWindow = glxWinCopyWindow; +} + +static Bool +glxWinUnrealizeWindow(WindowPtr pWin) +{ + Bool result; + ScreenPtr pScreen = pWin->drawable.pScreen; + glxWinScreen *screenPriv = (glxWinScreen *)glxGetScreen(pScreen); + + GLWIN_DEBUG_MSG("glxWinUnrealizeWindow"); + + pScreen->UnrealizeWindow = screenPriv->UnrealizeWindow; + result = pScreen->UnrealizeWindow(pWin); + pScreen->UnrealizeWindow = glxWinUnrealizeWindow; + + return result; +} + +/* ---------------------------------------------------------------------- */ +/* + * Drawable functions + */ + +static GLboolean +glxWinDrawableSwapBuffers(ClientPtr client, __GLXdrawable *base) +{ + HDC dc; + HWND hwnd; + BOOL ret; + __GLXWinDrawable *draw = (__GLXWinDrawable *)base; + + /* Swap buffers on the last active context for drawing on the drawable */ + if (draw->drawContext == NULL) + { + GLWIN_TRACE_MSG("glxWinSwapBuffers - no context for drawable"); + return GL_FALSE; + } + + GLWIN_TRACE_MSG("glxWinSwapBuffers on drawable %p, last context %p (native ctx %p)", base, draw->drawContext, draw->drawContext->ctx); + + /* + draw->drawContext->base.drawPriv will not be set if the context is not current anymore, + but if it is, it should point to this drawable.... + */ + assert((draw->drawContext->base.drawPriv == NULL) || (draw->drawContext->base.drawPriv == base)); + + dc = glxWinMakeDC(draw->drawContext, draw, &dc, &hwnd); + if (dc == NULL) + return GL_FALSE; + + ret = wglSwapLayerBuffers(dc, WGL_SWAP_MAIN_PLANE); + + glxWinReleaseDC(hwnd, dc, draw); + + if (!ret) + { + ErrorF("wglSwapBuffers failed: %s\n", glxWinErrorMessage()); + return GL_FALSE; + } + + return GL_TRUE; +} + +static void +glxWinDrawableCopySubBuffer(__GLXdrawable *drawable, + int x, int y, int w, int h) +{ + glAddSwapHintRectWINWrapperNonstatic(x, y, w, h); + glxWinDrawableSwapBuffers(NULL, drawable); +} + +static void +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..) + __GLX_NOTE_FLUSHED_CMDS(__glXLastContext); + __glXLastContext = NULL; + } + + if (glxPriv->hPbuffer) + if (!wglDestroyPbufferARBWrapper(glxPriv->hPbuffer)) + { + ErrorF("wglDestroyPbufferARB failed: %s\n", glxWinErrorMessage()); + } + + if (glxPriv->dibDC) + { + // restore the default DIB + SelectObject(glxPriv->dibDC, glxPriv->hOldDIB); + + if (!DeleteDC(glxPriv->dibDC)) + { + ErrorF("DeleteDC failed: %s\n", glxWinErrorMessage()); + } + } + + if (glxPriv->hDIB) + { + if (!DeleteObject(glxPriv->hDIB)) + { + ErrorF("DeleteObject failed: %s\n", glxWinErrorMessage()); + } + + ((PixmapPtr)glxPriv->base.pDraw)->devPrivate.ptr = glxPriv->pOldBits; + } + + GLWIN_DEBUG_MSG("glxWinDestroyDrawable"); + free(glxPriv); +} + +static __GLXdrawable * +glxWinCreateDrawable(ClientPtr client, + __GLXscreen *screen, + DrawablePtr pDraw, + XID drawId, + int type, + XID glxDrawId, + __GLXconfig *conf) +{ + __GLXWinDrawable *glxPriv; + + glxPriv = malloc(sizeof *glxPriv); + + if (glxPriv == NULL) + return NULL; + + memset(glxPriv, 0, sizeof *glxPriv); + + if(!__glXDrawableInit(&glxPriv->base, screen, pDraw, type, glxDrawId, conf)) { + free(glxPriv); + return NULL; + } + + glxPriv->base.destroy = glxWinDrawableDestroy; + glxPriv->base.swapBuffers = glxWinDrawableSwapBuffers; + glxPriv->base.copySubBuffer = glxWinDrawableCopySubBuffer; + // glxPriv->base.waitX what are these for? + // glxPriv->base.waitGL + + GLWIN_DEBUG_MSG("glxWinCreateDrawable %p", glxPriv); + + return &glxPriv->base; +} + +/* ---------------------------------------------------------------------- */ +/* + * Texture functions + */ + +static +int glxWinBindTexImage(__GLXcontext *baseContext, + int buffer, + __GLXdrawable *pixmap) +{ + ErrorF("glxWinBindTexImage: not implemented\n"); + return FALSE; +} + +static +int glxWinReleaseTexImage(__GLXcontext *baseContext, + int buffer, + __GLXdrawable *pixmap) +{ + ErrorF(" glxWinReleaseTexImage: not implemented\n"); + return FALSE; +} + +/* ---------------------------------------------------------------------- */ +/* + * Lazy update context implementation + * + * WGL contexts are created for a specific HDC, so we cannot create the WGL + * context in glxWinCreateContext(), we must defer creation until the context + * is actually used on a specifc drawable which is connected to a native window, + * pbuffer or DIB + * + * The WGL context may be used on other, compatible HDCs, so we don't need to + * recreate it for every new native window + * + * XXX: I wonder why we can't create the WGL context on the screen HDC ? + * Basically we assume all HDCs are compatible at the moment: if they are not + * we are in a muddle, there was some code in the old implementation to attempt + * to transparently migrate a context to a new DC by copying state and sharing + * lists with the old one... + */ + +static void +glxWinSetPixelFormat(__GLXWinContext *gc, HDC hdc, int bppOverride, int drawableTypeOverride) +{ + __GLXscreen *screen = gc->base.pGlxScreen; + glxWinScreen *winScreen = (glxWinScreen *)screen; + + __GLXconfig *config = gc->base.config; + GLXWinConfig *winConfig = (GLXWinConfig *)config; + + GLWIN_DEBUG_MSG("glxWinSetPixelFormat: pixelFormatIndex %d", winConfig->pixelFormatIndex); + + /* + Normally, we can just use the the pixelFormatIndex corresponding + to the fbconfig which has been specified by the client + */ + + if (!((bppOverride && (bppOverride != (config->redBits + config->greenBits + config->blueBits) )) + || ((config->drawableType & drawableTypeOverride) == 0))) + { + if (!SetPixelFormat(hdc, winConfig->pixelFormatIndex, NULL)) + { + ErrorF("SetPixelFormat error: %s\n", glxWinErrorMessage()); + return; + } + + return; + } + + /* + However, in certain special cases this pixel format will be incompatible with the + use we are going to put it to, so we need to re-evaluate the pixel format to use: + + 1) When PFD_DRAW_TO_BITMAP is set, ChoosePixelFormat() always returns a format with + the cColorBits we asked for, so we need to ensure it matches the bpp of the bitmap + + 2) Applications may assume that visuals selected with glXChooseVisual() work with + pixmap drawables (there is no attribute to explicitly query for pixmap drawable + support as there is for glXChooseFBConfig()) + (it's arguable this is an error in the application, but we try to make it work) + + pixmap rendering is always slow for us, so we don't want to choose those visuals + by default, but if the actual drawable type we're trying to select the context + on (drawableTypeOverride) isn't supported by the selected fbConfig, reconsider + and see if we can find a suitable one... + */ + ErrorF("glxWinSetPixelFormat: having second thoughts: cColorbits %d, bppOveride %d; config->drawableType %d, drawableTypeOverride %d\n", + (config->redBits + config->greenBits + config->blueBits), bppOverride, config->drawableType, drawableTypeOverride); + + if (!winScreen->has_WGL_ARB_pixel_format) + { + PIXELFORMATDESCRIPTOR pfd; + int pixelFormat; + + /* convert fbConfig to PFD */ + if (fbConfigToPixelFormat(gc->base.config, &pfd, drawableTypeOverride)) + { + ErrorF("glxWinSetPixelFormat: fbConfigToPixelFormat failed\n"); + return; + } + + if (glxWinDebugSettings.dumpPFD) + pfdOut(&pfd); + + if (bppOverride) + { + GLWIN_DEBUG_MSG("glxWinSetPixelFormat: Forcing bpp from %d to %d\n", pfd.cColorBits, bppOverride); + pfd.cColorBits = bppOverride; + } + + pixelFormat = ChoosePixelFormat(hdc, &pfd); + if (pixelFormat == 0) + { + ErrorF("ChoosePixelFormat error: %s\n", glxWinErrorMessage()); + return; + } + + GLWIN_DEBUG_MSG("ChoosePixelFormat: chose pixelFormatIndex %d", pixelFormat); + ErrorF("ChoosePixelFormat: chose pixelFormatIndex %d (rather than %d as originally planned)\n", pixelFormat, winConfig->pixelFormatIndex); + + if (!SetPixelFormat(hdc, pixelFormat, &pfd)) + { + ErrorF("SetPixelFormat error: %s\n", glxWinErrorMessage()); + return; + } + } + else + { + int pixelFormat = fbConfigToPixelFormatIndex(hdc, gc->base.config, drawableTypeOverride, winScreen); + if (pixelFormat == 0) + { + ErrorF("wglChoosePixelFormat error: %s\n", glxWinErrorMessage()); + return; + } + + GLWIN_DEBUG_MSG("wglChoosePixelFormat: chose pixelFormatIndex %d", pixelFormat); + ErrorF("wglChoosePixelFormat: chose pixelFormatIndex %d (rather than %d as originally planned)\n", pixelFormat, winConfig->pixelFormatIndex); + + if (!SetPixelFormat(hdc, pixelFormat, NULL)) + { + ErrorF("SetPixelFormat error: %s\n", glxWinErrorMessage()); + return; + } + } +} + +static HDC +glxWinMakeDC(__GLXWinContext *gc, __GLXWinDrawable *draw, HDC *hdc, HWND *hwnd) +{ + *hdc = NULL; + *hwnd = NULL; + + if (draw == NULL) + { + GLWIN_TRACE_MSG("No drawable for context %p (native ctx %p)", gc, gc->ctx); + return NULL; + } + + switch (draw->base.type) + { + case GLX_DRAWABLE_WINDOW: + { + WindowPtr pWin; + + pWin = (WindowPtr) draw->base.pDraw; + if (pWin == NULL) + { + GLWIN_TRACE_MSG("for drawable %p, no WindowPtr", pWin); + return NULL; + } + + *hwnd = winGetWindowInfo(pWin); + + if (*hwnd == NULL) + { + ErrorF("No HWND error: %s\n", glxWinErrorMessage()); + return NULL; + } + + *hdc = GetDC(*hwnd); + + if (*hdc == NULL) + ErrorF("GetDC error: %s\n", glxWinErrorMessage()); + + /* Check if the hwnd has changed... */ + if (*hwnd != gc->hwnd) + { + if (glxWinDebugSettings.enableTrace) + GLWIN_DEBUG_HWND(*hwnd); + + GLWIN_TRACE_MSG("for context %p (native ctx %p), hWnd changed from %p to %p", gc, gc->ctx, gc->hwnd, *hwnd); + gc->hwnd = *hwnd; + + /* We must select a pixelformat, but SetPixelFormat can only be called once for a window... */ + glxWinSetPixelFormat(gc, *hdc, 0, GLX_WINDOW_BIT); + } + } + break; + + case GLX_DRAWABLE_PBUFFER: + { + *hdc = wglGetPbufferDCARBWrapper(draw->hPbuffer); + + if (*hdc == NULL) + ErrorF("GetDC (pbuffer) error: %s\n", glxWinErrorMessage()); + } + break; + + case GLX_DRAWABLE_PIXMAP: + { + *hdc = draw->dibDC; + } + break; + + default: + { + ErrorF("glxWinMakeDC: tried to makeDC for unhandled drawable type %d\n", draw->base.type); + } + } + + if (glxWinDebugSettings.dumpDC) + GLWIN_DEBUG_MSG("Got HDC %p", *hdc); + + return *hdc; +} + +static void +glxWinReleaseDC(HWND hwnd, HDC hdc,__GLXWinDrawable *draw) +{ + switch (draw->base.type) + { + case GLX_DRAWABLE_WINDOW: + { + ReleaseDC(hwnd, hdc); + } + break; + + case GLX_DRAWABLE_PBUFFER: + { + if (!wglReleasePbufferDCARBWrapper(draw->hPbuffer, hdc)) + { + ErrorF("wglReleasePbufferDCARB error: %s\n", glxWinErrorMessage()); + } + } + break; + + case GLX_DRAWABLE_PIXMAP: + { + // don't release DC, the memory DC lives as long as the bitmap + + // We must ensure that all GDI drawing into the bitmap has completed + // in case we subsequently access the bits from it + GdiFlush(); + } + break; + + default: + { + ErrorF("glxWinReleaseDC: tried to releaseDC for unhandled drawable type %d\n", draw->base.type); + } + } +} + +static void +glxWinDeferredCreateContext(__GLXWinContext *gc, __GLXWinDrawable *draw) +{ + HDC dc; + HWND hwnd; + GLWIN_DEBUG_MSG("glxWinDeferredCreateContext: attach context %p to drawable %p", gc, draw); + + switch (draw->base.type) + { + case GLX_DRAWABLE_WINDOW: + { + WindowPtr pWin = (WindowPtr) draw->base.pDraw; + + if (!(gc->base.config->drawableType & GLX_WINDOW_BIT)) + { + ErrorF("glxWinDeferredCreateContext: tried to attach a context whose fbConfig doesn't have drawableType GLX_WINDOW_BIT to a GLX_DRAWABLE_WINDOW drawable\n"); + } + + if (pWin == NULL) + { + GLWIN_DEBUG_MSG("Deferring until X window is created"); + return; + } + + GLWIN_DEBUG_MSG("glxWinDeferredCreateContext: pWin %p", pWin); + + if (winGetWindowInfo(pWin) == NULL) + { + GLWIN_DEBUG_MSG("Deferring until native window is created"); + return; + } + } + break; + + case GLX_DRAWABLE_PBUFFER: + { + if (draw->hPbuffer == NULL) + { + __GLXscreen *screen; + glxWinScreen *winScreen; + int pixelFormat; + // XXX: which DC are supposed to use??? + HDC screenDC = GetDC(NULL); + + if (!(gc->base.config->drawableType & GLX_PBUFFER_BIT)) + { + ErrorF("glxWinDeferredCreateContext: tried to attach a context whose fbConfig doesn't have drawableType GLX_PBUFFER_BIT to a GLX_DRAWABLE_PBUFFER drawable\n"); + } + + screen = gc->base.pGlxScreen; + winScreen = (glxWinScreen *)screen; + + pixelFormat = fbConfigToPixelFormatIndex(screenDC, gc->base.config, GLX_DRAWABLE_PBUFFER, winScreen); + if (pixelFormat == 0) + { + ErrorF("wglChoosePixelFormat error: %s\n", glxWinErrorMessage()); + return; + } + + draw->hPbuffer = wglCreatePbufferARBWrapper(screenDC, pixelFormat, draw->base.pDraw->width, draw->base.pDraw->height, NULL); + ReleaseDC(NULL, screenDC); + + if (draw->hPbuffer == NULL) + { + ErrorF("wglCreatePbufferARBWrapper error: %s\n", glxWinErrorMessage()); + return; + } + + GLWIN_DEBUG_MSG("glxWinDeferredCreateContext: pBuffer %p created for drawable %p", draw->hPbuffer, draw); + } + } + break; + + case GLX_DRAWABLE_PIXMAP: + { + if (draw->dibDC == NULL) + { + BITMAPINFOHEADER bmpHeader; + void *pBits; + + memset (&bmpHeader, 0, sizeof(BITMAPINFOHEADER)); + bmpHeader.biSize = sizeof(BITMAPINFOHEADER); + bmpHeader.biWidth = draw->base.pDraw->width; + bmpHeader.biHeight = draw->base.pDraw->height; + bmpHeader.biPlanes = 1; + bmpHeader.biBitCount = draw->base.pDraw->bitsPerPixel; + bmpHeader.biCompression = BI_RGB; + + if (!(gc->base.config->drawableType & GLX_PIXMAP_BIT)) + { + ErrorF("glxWinDeferredCreateContext: tried to attach a context whose fbConfig doesn't have drawableType GLX_PIXMAP_BIT to a GLX_DRAWABLE_PIXMAP drawable\n"); + } + + draw->dibDC = CreateCompatibleDC(NULL); + if (draw->dibDC == NULL) + { + ErrorF("CreateCompatibleDC error: %s\n", glxWinErrorMessage()); + return; + } + + draw->hDIB = CreateDIBSection(draw->dibDC, (BITMAPINFO *)&bmpHeader, DIB_RGB_COLORS, &pBits, 0, 0); + if (draw->dibDC == NULL) + { + ErrorF("CreateDIBSection error: %s\n", glxWinErrorMessage()); + return; + } + + // XXX: CreateDIBSection insists on allocating the bitmap memory for us, so we're going to + // need some jiggery pokery to point the underlying X Drawable's bitmap at the same set of bits + // so that they can be read with XGetImage as well as glReadPixels, assuming the formats are + // even compatible ... + draw->pOldBits = ((PixmapPtr)draw->base.pDraw)->devPrivate.ptr; + ((PixmapPtr)draw->base.pDraw)->devPrivate.ptr = pBits; + + // Select the DIB into the DC + draw->hOldDIB = SelectObject(draw->dibDC, draw->hDIB); + if (!draw->hOldDIB) + { + ErrorF("SelectObject error: %s\n", glxWinErrorMessage()); + } + + // Set the pixel format of the bitmap + glxWinSetPixelFormat(gc, draw->dibDC, draw->base.pDraw->bitsPerPixel, GLX_PIXMAP_BIT); + + GLWIN_DEBUG_MSG("glxWinDeferredCreateContext: DIB bitmap %p created for drawable %p", draw->hDIB, draw); + } + } + break; + + default: + { + ErrorF("glxWinDeferredCreateContext: tried to attach unhandled drawable type %d\n", draw->base.type); + return; + } + } + + dc = glxWinMakeDC(gc, draw, &dc, &hwnd); + gc->ctx = wglCreateContext(dc); + glxWinReleaseDC(hwnd, dc, draw); + + if (gc->ctx == NULL) + { + ErrorF("wglCreateContext error: %s\n", glxWinErrorMessage()); + return; + } + + GLWIN_DEBUG_MSG("glxWinDeferredCreateContext: attached context %p to native context %p drawable %p", gc, gc->ctx, draw); + + // if the native context was created successfully, shareLists if needed + if (gc->ctx && gc->shareContext) + { + GLWIN_DEBUG_MSG("glxWinCreateContextReal shareLists with context %p (native ctx %p)", gc->shareContext, gc->shareContext->ctx); + + if (!wglShareLists(gc->shareContext->ctx, gc->ctx)) + { + ErrorF("wglShareLists error: %s\n", glxWinErrorMessage()); + } + } +} + +/* ---------------------------------------------------------------------- */ +/* + * Context functions + */ + + +/* Context manipulation routines should return TRUE on success, FALSE on failure */ +static int +glxWinContextMakeCurrent(__GLXcontext *base) +{ + __GLXWinContext *gc = (__GLXWinContext *)base; + BOOL ret; + HDC drawDC; + HDC readDC = NULL; + __GLXdrawable *drawPriv; + __GLXdrawable *readPriv = NULL; + HWND hDrawWnd; + HWND hReadWnd; + + GLWIN_TRACE_MSG("glxWinContextMakeCurrent context %p (native ctx %p)", gc, gc->ctx); + glWinCallDelta(); + + /* Keep a note of the last active context in the drawable */ + drawPriv = gc->base.drawPriv; + ((__GLXWinDrawable *)drawPriv)->drawContext = gc; + + if (gc->ctx == NULL) + { + glxWinDeferredCreateContext(gc, (__GLXWinDrawable *)drawPriv); + } + + if (gc->ctx == NULL) + { + ErrorF("glxWinContextMakeCurrent: Native context is NULL\n"); + return FALSE; + } + + drawDC = glxWinMakeDC(gc, (__GLXWinDrawable *)drawPriv, &drawDC, &hDrawWnd); + if (drawDC == NULL) + { + ErrorF("glxWinMakeDC failed for drawDC\n"); + return FALSE; + } + + if ((gc->base.readPriv != NULL) && (gc->base.readPriv != gc->base.drawPriv)) + { + // XXX: should only occur with WGL_ARB_make_current_read + /* + If there is a separate read drawable, create a separate read DC, and + use the wglMakeContextCurrent extension to make the context current drawing + to one DC and reading from the other + */ + readPriv = gc->base.readPriv; + readDC = glxWinMakeDC(gc, (__GLXWinDrawable *)readPriv, &readDC, &hReadWnd); + if (readDC == NULL) + { + ErrorF("glxWinMakeDC failed for readDC\n"); + glxWinReleaseDC(hDrawWnd, drawDC, (__GLXWinDrawable *)drawPriv); + return FALSE; + } + + ret = wglMakeContextCurrentARBWrapper(drawDC, readDC, gc->ctx); + if (!ret) + { + ErrorF("wglMakeContextCurrentARBWrapper error: %s\n", glxWinErrorMessage()); + } + } + else + { + /* Otherwise, just use wglMakeCurrent */ + ret = wglMakeCurrent(drawDC, gc->ctx); + if (!ret) + { + ErrorF("wglMakeCurrent error: %s\n", glxWinErrorMessage()); + } + } + + // apparently make current could fail if the context is current in a different thread, + // but that shouldn't be able to happen in the current server... + + glxWinReleaseDC(hDrawWnd, drawDC, (__GLXWinDrawable *)drawPriv); + if (readDC) + glxWinReleaseDC(hReadWnd, readDC, (__GLXWinDrawable *)readPriv); + + return ret; +} + +static int +glxWinContextLoseCurrent(__GLXcontext *base) +{ + BOOL ret; + __GLXWinContext *gc = (__GLXWinContext *)base; + + GLWIN_TRACE_MSG("glxWinContextLoseCurrent context %p (native ctx %p)", gc, gc->ctx); + glWinCallDelta(); + + /* + 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) + { + ret = wglMakeCurrent(NULL, NULL); /* We don't need a DC when setting no current context */ + if (!ret) + ErrorF("glxWinContextLoseCurrent error: %s\n", glxWinErrorMessage()); + } + + return TRUE; +} + +static int +glxWinContextCopy(__GLXcontext *dst_base, __GLXcontext *src_base, unsigned long mask) +{ + __GLXWinContext *dst = (__GLXWinContext *)dst_base; + __GLXWinContext *src = (__GLXWinContext *)src_base; + BOOL ret; + + GLWIN_DEBUG_MSG("glxWinContextCopy"); + + ret = wglCopyContext(src->ctx, dst->ctx, mask); + if (!ret) + { + ErrorF("wglCopyContext error: %s\n", glxWinErrorMessage()); + } + + return ret; +} + +static int +glxWinContextForceCurrent(__GLXcontext *base) +{ + /* wglMakeCurrent always flushes the previous context, so this is equivalent to glxWinContextMakeCurrent */ + return glxWinContextMakeCurrent(base); +} + +static void +glxWinContextDestroy(__GLXcontext *base) +{ + __GLXWinContext *gc = (__GLXWinContext *)base; + + if (gc != NULL) + { + GLWIN_DEBUG_MSG("GLXcontext %p destroyed (native ctx %p)", base, gc->ctx); + + if (gc->ctx) + { + /* It's bad style to delete the context while it's still current */ + if (wglGetCurrentContext() == gc->ctx) + { + wglMakeCurrent(NULL, NULL); + } + + { + BOOL ret = wglDeleteContext(gc->ctx); + if (!ret) + ErrorF("wglDeleteContext error: %s\n", glxWinErrorMessage()); + } + + gc->ctx = NULL; + } + + free(gc); + } +} + +static __GLXcontext * +glxWinCreateContext(__GLXscreen *screen, + __GLXconfig *modes, + __GLXcontext *baseShareContext) +{ + __GLXWinContext *context; + __GLXWinContext *shareContext = (__GLXWinContext *)baseShareContext; + + static __GLXtextureFromPixmap glxWinTextureFromPixmap = + { + glxWinBindTexImage, + glxWinReleaseTexImage + }; + + context = (__GLXWinContext *)calloc(1, sizeof(__GLXWinContext)); + + if (!context) + return NULL; + + memset(context, 0, sizeof *context); + context->base.destroy = glxWinContextDestroy; + context->base.makeCurrent = glxWinContextMakeCurrent; + context->base.loseCurrent = glxWinContextLoseCurrent; + context->base.copy = glxWinContextCopy; + context->base.forceCurrent = glxWinContextForceCurrent; + context->base.textureFromPixmap = &glxWinTextureFromPixmap; + context->base.config = modes; + context->base.pGlxScreen = screen; + + // actual native GL context creation is deferred until attach() + context->ctx = NULL; + context->shareContext = shareContext; + + glWinSetupDispatchTable(); + + GLWIN_DEBUG_MSG("GLXcontext %p created", context); + + return &(context->base); +} + +/* ---------------------------------------------------------------------- */ +/* + * Utility functions + */ + +static int +fbConfigToPixelFormat(__GLXconfig *mode, PIXELFORMATDESCRIPTOR *pfdret, int drawableTypeOverride) { PIXELFORMATDESCRIPTOR pfd = { sizeof(PIXELFORMATDESCRIPTOR), /* size of this pfd */ 1, /* version number */ - PFD_DRAW_TO_WINDOW | /* support window */ PFD_SUPPORT_OPENGL, /* support OpenGL */ PFD_TYPE_RGBA, /* RGBA type */ 24, /* 24-bit color depth */ @@ -672,72 +1584,49 @@ static int makeFormat(__GLcontextModes *mode, PIXELFORMATDESCRIPTOR *pfdret) 0, /* shift bit ignored */ 0, /* no accumulation buffer */ 0, 0, 0, 0, /* accum bits ignored */ - 0, /* 32-bit z-buffer */ + 32, /* 32-bit z-buffer */ 0, /* no stencil buffer */ 0, /* no auxiliary buffer */ PFD_MAIN_PLANE, /* main layer */ 0, /* reserved */ 0, 0, 0 /* layer masks ignored */ - }, *result = &pfd; + }; + + if ((mode->drawableType | drawableTypeOverride) & GLX_WINDOW_BIT) + pfd.dwFlags |= PFD_DRAW_TO_WINDOW; /* support window */ + + if ((mode->drawableType | drawableTypeOverride) & GLX_PIXMAP_BIT) + pfd.dwFlags |= (PFD_DRAW_TO_BITMAP | PFD_SUPPORT_GDI); /* supports software rendering to bitmap */ - /* disable anything but rgba. must get rgba to work first */ - if (!mode->rgbMode) - return -1; - if (mode->stereoMode) { - result->dwFlags |= PFD_STEREO; + pfd.dwFlags |= PFD_STEREO; } if (mode->doubleBufferMode) { - result->dwFlags |= PFD_DOUBLEBUFFER; + pfd.dwFlags |= PFD_DOUBLEBUFFER; } - if (mode->colorIndexMode) { - /* ignored, see above */ - result->iPixelType = PFD_TYPE_COLORINDEX; - result->cColorBits = mode->redBits + mode->greenBits + mode->blueBits; - result->cRedBits = mode->redBits; - result->cRedShift = 0; /* FIXME */ - result->cGreenBits = mode->greenBits; - result->cGreenShift = 0; /* FIXME */ - result->cBlueBits = mode->blueBits; - result->cBlueShift = 0; /* FIXME */ - result->cAlphaBits = mode->alphaBits; - result->cAlphaShift = 0; /* FIXME */ - } + pfd.iPixelType = PFD_TYPE_RGBA; + pfd.cColorBits = mode->redBits + mode->greenBits + mode->blueBits; + pfd.cRedBits = mode->redBits; + pfd.cRedShift = 0; /* FIXME */ + pfd.cGreenBits = mode->greenBits; + pfd.cGreenShift = 0; /* FIXME */ + pfd.cBlueBits = mode->blueBits; + pfd.cBlueShift = 0; /* FIXME */ + pfd.cAlphaBits = mode->alphaBits; + pfd.cAlphaShift = 0; /* FIXME */ - if (mode->rgbMode) { - result->iPixelType = PFD_TYPE_RGBA; - result->cColorBits = mode->redBits + mode->greenBits + mode->blueBits; - result->cRedBits = mode->redBits; - result->cRedShift = 0; /* FIXME */ - result->cGreenBits = mode->greenBits; - result->cGreenShift = 0; /* FIXME */ - result->cBlueBits = mode->blueBits; - result->cBlueShift = 0; /* FIXME */ - result->cAlphaBits = mode->alphaBits; - result->cAlphaShift = 0; /* FIXME */ - } + pfd.cAccumBits = mode->accumRedBits + mode->accumGreenBits + mode->accumBlueBits + mode->accumAlphaBits; + pfd.cAccumRedBits = mode->accumRedBits; + pfd.cAccumGreenBits = mode->accumGreenBits; + pfd.cAccumBlueBits = mode->accumBlueBits; + pfd.cAccumAlphaBits = mode->accumAlphaBits; - if (mode->haveAccumBuffer) { - result->cAccumBits = mode->accumRedBits + mode->accumGreenBits - + mode->accumBlueBits + mode->accumAlphaBits; - result->cAccumRedBits = mode->accumRedBits; - result->cAccumGreenBits = mode->accumGreenBits; - result->cAccumBlueBits = mode->accumBlueBits; - result->cAccumAlphaBits = mode->accumAlphaBits; - } - - if (mode->haveDepthBuffer) { - result->cDepthBits = mode->depthBits; - } - if (mode->haveStencilBuffer) { - result->cStencilBits = mode->stencilBits; - } - - /* result->cAuxBuffers = mode->numAuxBuffers; */ - - /* mode->level ignored */ + pfd.cDepthBits = mode->depthBits; + pfd.cStencilBits = mode->stencilBits; + pfd.cAuxBuffers = mode->numAuxBuffers; + /* mode->level ? */ /* mode->pixmapMode ? */ *pfdret = pfd; @@ -745,861 +1634,687 @@ static int makeFormat(__GLcontextModes *mode, PIXELFORMATDESCRIPTOR *pfdret) return 0; } -static __GLinterface *glWinCreateContext(__GLimports *imports, - __GLcontextModes *mode, - __GLinterface *shareGC) +#define SET_ATTR_VALUE(attr, value) { attribList[i++] = attr; attribList[i++] = value; assert(i < NUM_ELEMENTS(attribList)); } + +static int +fbConfigToPixelFormatIndex(HDC hdc, __GLXconfig *mode, int drawableTypeOverride, glxWinScreen *winScreen) { - __GLcontext *result; + UINT numFormats; + unsigned int i = 0; - GLWIN_DEBUG_MSG("glWinCreateContext\n"); + /* convert fbConfig to attr-value list */ + int attribList[60]; - result = (__GLcontext *)calloc(1, sizeof(__GLcontext)); - if (!result) - return NULL; + SET_ATTR_VALUE(WGL_SUPPORT_OPENGL_ARB, TRUE); + SET_ATTR_VALUE(WGL_PIXEL_TYPE_ARB, (mode->visualType == GLX_TRUE_COLOR) ? WGL_TYPE_RGBA_ARB : WGL_TYPE_COLORINDEX_ARB); + SET_ATTR_VALUE(WGL_COLOR_BITS_ARB, (mode->visualType == GLX_TRUE_COLOR) ? mode->rgbBits : mode->indexBits); + SET_ATTR_VALUE(WGL_RED_BITS_ARB, mode->redBits); + SET_ATTR_VALUE(WGL_GREEN_BITS_ARB, mode->greenBits); + SET_ATTR_VALUE(WGL_BLUE_BITS_ARB, mode->blueBits); + SET_ATTR_VALUE(WGL_ALPHA_BITS_ARB, mode->alphaBits); + SET_ATTR_VALUE(WGL_ACCUM_RED_BITS_ARB, mode->accumRedBits); + SET_ATTR_VALUE(WGL_ACCUM_GREEN_BITS_ARB, mode->accumGreenBits); + SET_ATTR_VALUE(WGL_ACCUM_BLUE_BITS_ARB, mode->accumBlueBits); + SET_ATTR_VALUE(WGL_ACCUM_ALPHA_BITS_ARB, mode->accumAlphaBits); + SET_ATTR_VALUE(WGL_DEPTH_BITS_ARB, mode->depthBits); + SET_ATTR_VALUE(WGL_STENCIL_BITS_ARB, mode->stencilBits); + SET_ATTR_VALUE(WGL_AUX_BUFFERS_ARB, mode->numAuxBuffers); - result->interface.imports = *imports; - result->interface.exports = glWinExports; + if (mode->doubleBufferMode) + SET_ATTR_VALUE(WGL_DOUBLE_BUFFER_ARB, TRUE); - if (makeFormat(mode, &result->pfd)) + if (mode->stereoMode) + SET_ATTR_VALUE(WGL_STEREO_ARB, TRUE); + + // Some attributes are only added to the list if the value requested is not 'don't care', as exactly matching that is daft.. + if (mode->swapMethod == GLX_SWAP_EXCHANGE_OML) + SET_ATTR_VALUE(WGL_SWAP_METHOD_ARB, WGL_SWAP_EXCHANGE_ARB); + + if (mode->swapMethod == GLX_SWAP_COPY_OML) + SET_ATTR_VALUE(WGL_SWAP_COPY_ARB, TRUE); + + // XXX: this should probably be the other way around, but that messes up drawableTypeOverride + if (mode->visualRating == GLX_SLOW_VISUAL_EXT) + SET_ATTR_VALUE(WGL_ACCELERATION_ARB, WGL_NO_ACCELERATION_ARB); + + // must support all the drawable types the mode supports + if ((mode->drawableType | drawableTypeOverride) & GLX_WINDOW_BIT) + SET_ATTR_VALUE(WGL_DRAW_TO_WINDOW_ARB,TRUE); + + // XXX: this is a horrible hacky heuristic, in fact this whole drawableTypeOverride thing is a bad idea + // try to avoid asking for formats which don't exist (by not asking for all when adjusting the config to include the drawableTypeOverride) + if (drawableTypeOverride == GLX_WINDOW_BIT) { - ErrorF("makeFormat failed\n"); - free(result); - return NULL; + if (mode->drawableType & GLX_PIXMAP_BIT) + SET_ATTR_VALUE(WGL_DRAW_TO_BITMAP_ARB, TRUE); + + if (mode->drawableType & GLX_PBUFFER_BIT) + if (winScreen->has_WGL_ARB_pbuffer) + SET_ATTR_VALUE(WGL_DRAW_TO_PBUFFER_ARB, TRUE); + } + else + { + if (drawableTypeOverride & GLX_PIXMAP_BIT) + SET_ATTR_VALUE(WGL_DRAW_TO_BITMAP_ARB, TRUE); + + if (drawableTypeOverride & GLX_PBUFFER_BIT) + if (winScreen->has_WGL_ARB_pbuffer) + SET_ATTR_VALUE(WGL_DRAW_TO_PBUFFER_ARB, TRUE); } - if (glWinDebugSettings.dumpPFD) - pfdOut(&result->pfd); + SET_ATTR_VALUE(0, 0); // terminator - GLWIN_DEBUG_MSG("glWinCreateContext done\n"); - return (__GLinterface *)result; -} - -Bool -glWinRealizeWindow(WindowPtr pWin) -{ - /* If this window has GL contexts, tell them to reattach */ - /* reattaching is bad: display lists and parameters get lost */ - Bool result; - ScreenPtr pScreen = pWin->drawable.pScreen; - glWinScreenRec *screenPriv = &glWinScreens[pScreen->myNum]; - __GLXdrawablePrivate *glxPriv; - - GLWIN_DEBUG_MSG("glWinRealizeWindow\n"); - - /* Allow the window to be created (RootlessRealizeWindow is inside our wrap) */ - pScreen->RealizeWindow = screenPriv->RealizeWindow; - result = pScreen->RealizeWindow(pWin); - pScreen->RealizeWindow = glWinRealizeWindow; - - /* Re-attach this window's GL contexts, if any. */ - glxPriv = __glXFindDrawablePrivate(pWin->drawable.id); - if (glxPriv) { - __GLXcontext *gx; - __GLcontext *gc; - __GLdrawablePrivate *glPriv = &glxPriv->glPriv; - GLWIN_DEBUG_MSG("glWinRealizeWindow is GL drawable!\n"); - - /* GL contexts bound to this window for drawing */ - for (gx = glxPriv->drawGlxc; gx != NULL; gx = gx->next) { - gc = (__GLcontext *)gx->gc; - if (gc->isAttached) -#if 1 - { - GLWIN_DEBUG_MSG("context is already bound! Adjusting HWND.\n"); - glWinAdjustHWND(gc, pWin); - continue; - } -#else - unattach(gc); -#endif - attach(gc, glPriv); - } - - /* GL contexts bound to this window for reading */ - for (gx = glxPriv->readGlxc; gx != NULL; gx = gx->next) { - gc = (__GLcontext *)gx->gc; - if (gc->isAttached) -#if 1 - { - GLWIN_DEBUG_MSG("context is already bound! Adjusting HWND.\n"); - glWinAdjustHWND(gc, pWin); - continue; - } -#else - unattach(gc); -#endif - attach(gc, glPriv); - } - } - - return result; -} - - -void -glWinCopyWindow(WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc) -{ - ScreenPtr pScreen = pWindow->drawable.pScreen; - glWinScreenRec *screenPriv = &glWinScreens[pScreen->myNum]; - __GLXdrawablePrivate *glxPriv; - - GLWIN_TRACE_MSG(" (pWindow %p)\n", pWindow); - - /* Check if the window is attached and discard any drawing request */ - glxPriv = __glXFindDrawablePrivate(pWindow->drawable.id); - if (glxPriv) { - __GLXcontext *gx; - - /* GL contexts bound to this window for drawing */ - for (gx = glxPriv->drawGlxc; gx != NULL; gx = gx->next) { -/* - GLWIN_DEBUG_MSG("glWinCopyWindow - calling glDrawBuffer\n"); - glDrawBuffer(GL_FRONT); - */ - - return; - } - - /* GL contexts bound to this window for reading */ - for (gx = glxPriv->readGlxc; gx != NULL; gx = gx->next) { - return; - } - } - - GLWIN_DEBUG_MSG("glWinCopyWindow - passing to hw layer\n"); - - pScreen->CopyWindow = screenPriv->CopyWindow; - pScreen->CopyWindow(pWindow, ptOldOrg, prgnSrc); - pScreen->CopyWindow = glWinCopyWindow; -} - -Bool -glWinUnrealizeWindow(WindowPtr pWin) -{ - /* If this window has GL contexts, tell them to unattach */ - Bool result; - ScreenPtr pScreen = pWin->drawable.pScreen; - glWinScreenRec *screenPriv = &glWinScreens[pScreen->myNum]; - __GLXdrawablePrivate *glxPriv; - - GLWIN_DEBUG_MSG("glWinUnrealizeWindow\n"); - - /* The Aqua window may have already been destroyed (windows - * are unrealized from top down) - */ - - /* Unattach this window's GL contexts, if any. */ - glxPriv = __glXFindDrawablePrivate(pWin->drawable.id); - if (glxPriv) { - __GLXcontext *gx; - __GLcontext *gc; - GLWIN_DEBUG_MSG("glWinUnealizeWindow is GL drawable!\n"); - - /* GL contexts bound to this window for drawing */ - for (gx = glxPriv->drawGlxc; gx != NULL; gx = gx->next) { - gc = (__GLcontext *)gx->gc; - unattach(gc); - } - - /* GL contexts bound to this window for reading */ - for (gx = glxPriv->readGlxc; gx != NULL; gx = gx->next) { - gc = (__GLcontext *)gx->gc; - unattach(gc); - } - } - - pScreen->UnrealizeWindow = screenPriv->UnrealizeWindow; - result = pScreen->UnrealizeWindow(pWin); - pScreen->UnrealizeWindow = glWinUnrealizeWindow; - - return result; -} - - -/* - * In the case the driver has no GLX visuals we'll use these. - * [0] = RGB, double buffered - * [1] = RGB, double buffered, stencil, accum - */ -/* Originally copied from Mesa */ - -static int numConfigs = 0; -static __GLXvisualConfig *visualConfigs = NULL; -static void **visualPrivates = NULL; - -#define NUM_FALLBACK_CONFIGS 2 -static __GLXvisualConfig FallbackConfigs[NUM_FALLBACK_CONFIGS] = { + /* choose the first match */ { - -1, /* vid */ - -1, /* class */ - True, /* rgba */ - -1, -1, -1, 0, /* rgba sizes */ - -1, -1, -1, 0, /* rgba masks */ - 0, 0, 0, 0, /* rgba accum sizes */ - True, /* doubleBuffer */ - False, /* stereo */ - -1, /* bufferSize */ - 16, /* depthSize */ - 0, /* stencilSize */ - 0, /* auxBuffers */ - 0, /* level */ - GLX_NONE_EXT, /* visualRating */ - 0, /* transparentPixel */ - 0, 0, 0, 0, /* transparent rgba color (floats scaled to ints) */ - 0 /* transparentIndex */ - }, - { - -1, /* vid */ - -1, /* class */ - True, /* rgba */ - -1, -1, -1, 0, /* rgba sizes */ - -1, -1, -1, 0, /* rgba masks */ - 16, 16, 16, 0, /* rgba accum sizes */ - True, /* doubleBuffer */ - False, /* stereo */ - -1, /* bufferSize */ - 16, /* depthSize */ - 8, /* stencilSize */ - 0, /* auxBuffers */ - 0, /* level */ - GLX_NONE_EXT, /* visualRating */ - 0, /* transparentPixel */ - 0, 0, 0, 0, /* transparent rgba color (floats scaled to ints) */ - 0 /* transparentIndex */ - } -}; + int pixelFormatIndex; -static __GLXvisualConfig NullConfig = { - -1, /* vid */ - -1, /* class */ - False, /* rgba */ - -1, -1, -1, 0, /* rgba sizes */ - -1, -1, -1, 0, /* rgba masks */ - 0, 0, 0, 0, /* rgba accum sizes */ - False, /* doubleBuffer */ - False, /* stereo */ - -1, /* bufferSize */ - 16, /* depthSize */ - 0, /* stencilSize */ - 0, /* auxBuffers */ - 0, /* level */ - GLX_NONE_EXT, /* visualRating */ - 0, /* transparentPixel */ - 0, 0, 0, 0, /* transparent rgba color (floats scaled to ints) */ - 0 /* transparentIndex */ -}; - -static inline int count_bits(uint32_t x) -{ - x = x - ((x >> 1) & 0x55555555); - x = (x & 0x33333333) + ((x >> 2) & 0x33333333); - x = (x + (x >> 4)) & 0x0f0f0f0f; - x = x + (x >> 8); - x = x + (x >> 16); - return x & 63; -} - -/* Mostly copied from Mesa's xf86glx.c */ -static Bool init_visuals(int *nvisualp, VisualPtr *visualp, - VisualID *defaultVisp, - int ndepth, DepthPtr pdepth, - int rootDepth) -{ - int numRGBconfigs; - int numCIconfigs; - int numVisuals = *nvisualp; - int numNewVisuals; - int numNewConfigs; - VisualPtr pVisual = *visualp; - VisualPtr pVisualNew = NULL; - VisualID *orig_vid = NULL; - __GLcontextModes *modes = NULL; - __GLXvisualConfig *pNewVisualConfigs = NULL; - void **glXVisualPriv; - void **pNewVisualPriv; - int found_default; - int i, j, k; - - GLWIN_DEBUG_MSG("init_visuals\n"); - - if (numConfigs > 0) - numNewConfigs = numConfigs; + if (!wglChoosePixelFormatARBWrapper(hdc, attribList, NULL, 1, &pixelFormatIndex, &numFormats)) + { + ErrorF("wglChoosePixelFormat error: %s\n", glxWinErrorMessage()); + } else - numNewConfigs = NUM_FALLBACK_CONFIGS; - - /* Alloc space for the list of new GLX visuals */ - pNewVisualConfigs = (__GLXvisualConfig *) - __glXMalloc(numNewConfigs * sizeof(__GLXvisualConfig)); - if (!pNewVisualConfigs) { - return FALSE; - } - - /* Alloc space for the list of new GLX visual privates */ - pNewVisualPriv = (void **) __glXMalloc(numNewConfigs * sizeof(void *)); - if (!pNewVisualPriv) { - __glXFree(pNewVisualConfigs); - return FALSE; - } - - /* - ** If SetVisualConfigs was not called, then use default GLX - ** visual configs. - */ - if (numConfigs == 0) { - memcpy(pNewVisualConfigs, FallbackConfigs, - NUM_FALLBACK_CONFIGS * sizeof(__GLXvisualConfig)); - memset(pNewVisualPriv, 0, NUM_FALLBACK_CONFIGS * sizeof(void *)); - } - else { - /* copy driver's visual config info */ - for (i = 0; i < numConfigs; i++) { - pNewVisualConfigs[i] = visualConfigs[i]; - pNewVisualPriv[i] = visualPrivates[i]; - } - } - - /* Count the number of RGB and CI visual configs */ - numRGBconfigs = 0; - numCIconfigs = 0; - for (i = 0; i < numNewConfigs; i++) { - if (pNewVisualConfigs[i].rgba) - numRGBconfigs++; + { + if (numFormats > 0) + { + GLWIN_DEBUG_MSG("wglChoosePixelFormat: chose pixelFormatIndex %d)", pixelFormatIndex); + return pixelFormatIndex; + } else - numCIconfigs++; - } + ErrorF("wglChoosePixelFormat couldn't decide\n"); + } + } - /* Count the total number of visuals to compute */ - numNewVisuals = 0; - for (i = 0; i < numVisuals; i++) { - int count; - - count = ((pVisual[i].class == TrueColor - || pVisual[i].class == DirectColor) - ? numRGBconfigs : numCIconfigs); - if (count == 0) - count = 1; /* preserve the existing visual */ - - numNewVisuals += count; - } - - /* Reset variables for use with the next screen/driver's visual configs */ - visualConfigs = NULL; - numConfigs = 0; - - /* Alloc temp space for the list of orig VisualIDs for each new visual */ - orig_vid = (VisualID *)__glXMalloc(numNewVisuals * sizeof(VisualID)); - if (!orig_vid) { - __glXFree(pNewVisualPriv); - __glXFree(pNewVisualConfigs); - return FALSE; - } - - /* Alloc space for the list of glXVisuals */ - modes = _gl_context_modes_create(numNewVisuals, sizeof(__GLcontextModes)); - if (modes == NULL) { - __glXFree(orig_vid); - __glXFree(pNewVisualPriv); - __glXFree(pNewVisualConfigs); - return FALSE; - } - - /* Alloc space for the list of glXVisualPrivates */ - glXVisualPriv = (void **)__glXMalloc(numNewVisuals * sizeof(void *)); - if (!glXVisualPriv) { - _gl_context_modes_destroy( modes ); - __glXFree(orig_vid); - __glXFree(pNewVisualPriv); - __glXFree(pNewVisualConfigs); - return FALSE; - } - - /* Alloc space for the new list of the X server's visuals */ - pVisualNew = (VisualPtr)__glXMalloc(numNewVisuals * sizeof(VisualRec)); - if (!pVisualNew) { - __glXFree(glXVisualPriv); - _gl_context_modes_destroy( modes ); - __glXFree(orig_vid); - __glXFree(pNewVisualPriv); - __glXFree(pNewVisualConfigs); - return FALSE; - } - - /* Initialize the new visuals */ - found_default = FALSE; - glWinScreens[screenInfo.numScreens-1].modes = modes; - for (i = j = 0; i < numVisuals; i++) { - int is_rgb = (pVisual[i].class == TrueColor || - pVisual[i].class == DirectColor); - - if (!is_rgb) - { - /* We don't support non-rgb visuals for GL. But we don't - want to remove them either, so just pass them through - with null glX configs */ - - pVisualNew[j] = pVisual[i]; - pVisualNew[j].vid = FakeClientID(0); - - /* Check for the default visual */ - if (!found_default && pVisual[i].vid == *defaultVisp) { - *defaultVisp = pVisualNew[j].vid; - found_default = TRUE; - } - - /* Save the old VisualID */ - orig_vid[j] = pVisual[i].vid; - - /* Initialize the glXVisual */ - _gl_copy_visual_to_context_mode( modes, & NullConfig ); - modes->visualID = pVisualNew[j].vid; - - j++; - - continue; - } - - for (k = 0; k < numNewConfigs; k++) { - if (pNewVisualConfigs[k].rgba != is_rgb) - continue; - - assert( modes != NULL ); - - /* Initialize the new visual */ - pVisualNew[j] = pVisual[i]; - pVisualNew[j].vid = FakeClientID(0); - - /* Check for the default visual */ - if (!found_default && pVisual[i].vid == *defaultVisp) { - *defaultVisp = pVisualNew[j].vid; - found_default = TRUE; - } - - /* Save the old VisualID */ - orig_vid[j] = pVisual[i].vid; - - /* Initialize the glXVisual */ - _gl_copy_visual_to_context_mode( modes, & pNewVisualConfigs[k] ); - modes->visualID = pVisualNew[j].vid; - - /* - * If the class is -1, then assume the X visual information - * is identical to what GLX needs, and take them from the X - * visual. NOTE: if class != -1, then all other fields MUST - * be initialized. - */ - if (modes->visualType == GLX_NONE) { - modes->visualType = _gl_convert_from_x_visual_type( pVisual[i].class ); - modes->redBits = count_bits(pVisual[i].redMask); - modes->greenBits = count_bits(pVisual[i].greenMask); - modes->blueBits = count_bits(pVisual[i].blueMask); - modes->alphaBits = modes->alphaBits; - modes->redMask = pVisual[i].redMask; - modes->greenMask = pVisual[i].greenMask; - modes->blueMask = pVisual[i].blueMask; - modes->alphaMask = modes->alphaMask; - modes->rgbBits = (is_rgb) - ? (modes->redBits + modes->greenBits + - modes->blueBits + modes->alphaBits) - : rootDepth; - } - - /* Save the device-dependent private for this visual */ - glXVisualPriv[j] = pNewVisualPriv[k]; - - j++; - modes = modes->next; - } - } - - assert(j <= numNewVisuals); - - /* Save the GLX visuals in the screen structure */ - glWinScreens[screenInfo.numScreens-1].num_vis = numNewVisuals; - glWinScreens[screenInfo.numScreens-1].priv = glXVisualPriv; - - /* Set up depth's VisualIDs */ - for (i = 0; i < ndepth; i++) { - int numVids = 0; - VisualID *pVids = NULL; - int k, n = 0; - - /* Count the new number of VisualIDs at this depth */ - for (j = 0; j < pdepth[i].numVids; j++) - for (k = 0; k < numNewVisuals; k++) - if (pdepth[i].vids[j] == orig_vid[k]) - numVids++; - - /* Allocate a new list of VisualIDs for this depth */ - pVids = (VisualID *)__glXMalloc(numVids * sizeof(VisualID)); - - /* Initialize the new list of VisualIDs for this depth */ - for (j = 0; j < pdepth[i].numVids; j++) - for (k = 0; k < numNewVisuals; k++) - if (pdepth[i].vids[j] == orig_vid[k]) - pVids[n++] = pVisualNew[k].vid; - - /* Update this depth's list of VisualIDs */ - __glXFree(pdepth[i].vids); - pdepth[i].vids = pVids; - pdepth[i].numVids = numVids; - } - - /* Update the X server's visuals */ - *nvisualp = numNewVisuals; - *visualp = pVisualNew; - - /* Free the old list of the X server's visuals */ - __glXFree(pVisual); - - /* Clean up temporary allocations */ - __glXFree(orig_vid); - __glXFree(pNewVisualPriv); - __glXFree(pNewVisualConfigs); - - /* Free the private list created by DDX HW driver */ - if (visualPrivates) - xfree(visualPrivates); - visualPrivates = NULL; - - return TRUE; + return 0; } +/* ---------------------------------------------------------------------- */ -static void fixup_visuals(int screen) -{ - ScreenPtr pScreen = screenInfo.screens[screen]; - glWinScreenRec *pScr = &glWinScreens[screen]; - __GLcontextModes *modes; - int j; +#define BITS_AND_SHIFT_TO_MASK(bits,mask) (((1<<(bits))-1) << (mask)) - GLWIN_DEBUG_MSG("fixup_visuals\n"); - - for (modes = pScr->modes; modes != NULL; modes = modes->next ) { - const int vis_class = _gl_convert_to_x_visual_type( modes->visualType ); - const int nplanes = (modes->rgbBits - modes->alphaBits); - VisualPtr pVis = pScreen->visuals; - - /* Find a visual that matches the GLX visual's class and size */ - for (j = 0; j < pScreen->numVisuals; j++) { - if (pVis[j].class == vis_class && - pVis[j].nplanes == nplanes) { - - /* Fixup the masks */ - modes->redMask = pVis[j].redMask; - modes->greenMask = pVis[j].greenMask; - modes->blueMask = pVis[j].blueMask; - - /* Recalc the sizes */ - modes->redBits = count_bits(modes->redMask); - modes->greenBits = count_bits(modes->greenMask); - modes->blueBits = count_bits(modes->blueMask); - } - } - } -} - -static void init_screen_visuals(int screen) -{ - ScreenPtr pScreen = screenInfo.screens[screen]; - __GLcontextModes *modes; - int *used; - int i, j; - - GLWIN_DEBUG_MSG("init_screen_visuals\n"); - - used = (int *)__glXMalloc(pScreen->numVisuals * sizeof(int)); - __glXMemset(used, 0, pScreen->numVisuals * sizeof(int)); - - i = 0; - for ( modes = glWinScreens[screen].modes - ; modes != NULL - ; modes = modes->next) { - const int vis_class = _gl_convert_to_x_visual_type( modes->visualType ); - const int nplanes = (modes->rgbBits - modes->alphaBits); - const VisualPtr pVis = pScreen->visuals; - - for (j = 0; j < pScreen->numVisuals; j++) { - - if (pVis[j].class == vis_class && - pVis[j].nplanes == nplanes && - pVis[j].redMask == modes->redMask && - pVis[j].greenMask == modes->greenMask && - pVis[j].blueMask == modes->blueMask && - !used[j]) { - -#if 0 - /* Create the XMesa visual */ - pXMesaVisual[i] = - XMesaCreateVisual(pScreen, - pVis, - modes->rgbMode, - (modes->alphaBits > 0), - modes->doubleBufferMode, - modes->stereoMode, - GL_TRUE, /* ximage_flag */ - modes->depthBits, - modes->stencilBits, - modes->accumRedBits, - modes->accumGreenBits, - modes->accumBlueBits, - modes->accumAlphaBits, - modes->samples, - modes->level, - modes->visualRating); -#endif - - /* Set the VisualID */ - modes->visualID = pVis[j].vid; - - /* Mark this visual used */ - used[j] = 1; - break; - } - } - - if ( j == pScreen->numVisuals ) { - ErrorF("No matching visual for __GLcontextMode with " - "visual class = %d (%d), nplanes = %u\n", - vis_class, - modes->visualType, - (modes->rgbBits - modes->alphaBits) ); - } - else if ( modes->visualID == -1 ) { - FatalError( "Matching visual found, but visualID still -1!\n" ); - } - - i++; - - } - - __glXFree(used); - - /* glWinScreens[screen].xm_vis = pXMesaVisual; */ -} - -static Bool glWinScreenProbe(int screen) -{ - ScreenPtr pScreen; - glWinScreenRec *screenPriv; - - GLWIN_DEBUG_MSG("glWinScreenProbe\n"); - - /* - * Set up the current screen's visuals. - */ - __glDDXScreenInfo.modes = glWinScreens[screen].modes; - __glDDXScreenInfo.pVisualPriv = glWinScreens[screen].priv; - __glDDXScreenInfo.numVisuals = - __glDDXScreenInfo.numUsableVisuals = glWinScreens[screen].num_vis; - - /* - * Set the current screen's createContext routine. This could be - * wrapped by a DDX GLX context creation routine. - */ - __glDDXScreenInfo.createContext = glWinCreateContext; - - /* - * The ordering of the rgb compenents might have been changed by the - * driver after mi initialized them. - */ - fixup_visuals(screen); - - /* - * Find the GLX visuals that are supported by this screen and create - * XMesa's visuals. - */ - init_screen_visuals(screen); - - /* Wrap RealizeWindow and UnrealizeWindow on this screen */ - pScreen = screenInfo.screens[screen]; - screenPriv = &glWinScreens[screen]; - screenPriv->RealizeWindow = pScreen->RealizeWindow; - pScreen->RealizeWindow = glWinRealizeWindow; - screenPriv->UnrealizeWindow = pScreen->UnrealizeWindow; - pScreen->UnrealizeWindow = glWinUnrealizeWindow; - screenPriv->CopyWindow = pScreen->CopyWindow; - pScreen->CopyWindow = glWinCopyWindow; - - return TRUE; -} - -static GLboolean glWinSwapBuffers(__GLXdrawablePrivate *glxPriv) -{ - /* swap buffers on only *one* of the contexts - * (e.g. the last one for drawing) - */ - __GLcontext *gc = (__GLcontext *)glxPriv->drawGlxc->gc; - HDC dc; - BOOL ret; - - GLWIN_TRACE_MSG("glWinSwapBuffers (ctx %p)\n", (gc!=NULL?gc->ctx:NULL)); - - if (gc != NULL && gc->ctx != NULL) - { - dc = glWinMakeDC(gc); - if (dc == NULL) - return GL_FALSE; - - ret = SwapBuffers(dc); - if (!ret) - ErrorF("SwapBuffers failed: %s\n", glWinErrorMessage()); - - ReleaseDC(gc->winInfo.hwnd, dc); - if (!ret) - return GL_FALSE; - } - - return GL_TRUE; -} - -static void glWinDestroyDrawablePrivate(__GLdrawablePrivate *glPriv) -{ - GLWIN_DEBUG_MSG("glWinDestroyDrawablePrivate\n"); - - /* It doesn't work to call DRIDestroySurface here, the drawable's - already gone.. But dri.c notices the window destruction and - frees the surface itself. */ - - free(glPriv->private); - glPriv->private = NULL; -} - - -static void glWinCreateBuffer(__GLXdrawablePrivate *glxPriv) -{ - GLWinDrawableRec *winPriv = malloc(sizeof(GLWinDrawableRec)); - __GLdrawablePrivate *glPriv = &glxPriv->glPriv; - - /*winPriv->sid = 0; */ - winPriv->pDraw = NULL; - - GLWIN_DEBUG_MSG("glWinCreateBuffer\n"); - - /* replace swapBuffers (original is never called) */ - glxPriv->swapBuffers = glWinSwapBuffers; - - /* stash private data */ - glPriv->private = winPriv; - glPriv->freePrivate = glWinDestroyDrawablePrivate; -} - -static void glWinResetExtension(void) -{ - GLWIN_DEBUG_MSG("glWinResetExtension\n"); -} - -/* based on code in apples/indirect.c which is based on i830_dri.c */ +// +// Create the GLXconfigs using DescribePixelFormat() +// static void -glWinInitVisualConfigs(void) +glxWinCreateConfigs(HDC hdc, glxWinScreen *screen) { - int lclNumConfigs = 0; - __GLXvisualConfig *lclVisualConfigs = NULL; - void **lclVisualPrivates = NULL; + GLXWinConfig *c, *result, *prev = NULL; + int numConfigs = 0; + int i = 0; + int n = 0; + PIXELFORMATDESCRIPTOR pfd; - int depth, aux, buffers, stencil, accum; - int i = 0; + GLWIN_DEBUG_MSG("glxWinCreateConfigs"); - GLWIN_DEBUG_MSG("glWinInitVisualConfigs "); - - /* count num configs: - 2 Z buffer (0, 24 bit) - 2 AUX buffer (0, 2) - 2 buffers (single, double) - 2 stencil (0, 8 bit) - 2 accum (0, 64 bit) - = 32 configs */ + screen->base.numFBConfigs = 0; + screen->base.fbconfigs = NULL; - lclNumConfigs = 2 * 2 * 2 * 2 * 2; /* 32 */ + // get the number of pixelformats + numConfigs = DescribePixelFormat(hdc, 1, sizeof(PIXELFORMATDESCRIPTOR), NULL); + GLWIN_DEBUG_MSG("DescribePixelFormat says %d possible pixel formats", numConfigs); - /* alloc */ - lclVisualConfigs = xcalloc(sizeof(__GLXvisualConfig), lclNumConfigs); - lclVisualPrivates = xcalloc(sizeof(void *), lclNumConfigs); + /* alloc */ + result = malloc(sizeof(GLXWinConfig) * numConfigs); - /* fill in configs */ - if (NULL != lclVisualConfigs) { - i = 0; /* current buffer */ - for (depth = 0; depth < 2; depth++) { - for (aux = 0; aux < 2; aux++) { - for (buffers = 0; buffers < 2; buffers++) { - for (stencil = 0; stencil < 2; stencil++) { - for (accum = 0; accum < 2; accum++) { - lclVisualConfigs[i].vid = -1; - lclVisualConfigs[i].class = -1; - lclVisualConfigs[i].rgba = TRUE; - lclVisualConfigs[i].redSize = -1; - lclVisualConfigs[i].greenSize = -1; - lclVisualConfigs[i].blueSize = -1; - lclVisualConfigs[i].redMask = -1; - lclVisualConfigs[i].greenMask = -1; - lclVisualConfigs[i].blueMask = -1; - lclVisualConfigs[i].alphaMask = 0; - if (accum) { - lclVisualConfigs[i].accumRedSize = 16; - lclVisualConfigs[i].accumGreenSize = 16; - lclVisualConfigs[i].accumBlueSize = 16; - lclVisualConfigs[i].accumAlphaSize = 16; - } - else { - lclVisualConfigs[i].accumRedSize = 0; - lclVisualConfigs[i].accumGreenSize = 0; - lclVisualConfigs[i].accumBlueSize = 0; - lclVisualConfigs[i].accumAlphaSize = 0; - } - lclVisualConfigs[i].doubleBuffer = buffers ? TRUE : FALSE; - lclVisualConfigs[i].stereo = FALSE; - lclVisualConfigs[i].bufferSize = -1; - - lclVisualConfigs[i].depthSize = depth? 24 : 0; - lclVisualConfigs[i].stencilSize = stencil ? 8 : 0; - lclVisualConfigs[i].auxBuffers = aux ? 2 : 0; - lclVisualConfigs[i].level = 0; - lclVisualConfigs[i].visualRating = GLX_NONE_EXT; - lclVisualConfigs[i].transparentPixel = 0; - lclVisualConfigs[i].transparentRed = 0; - lclVisualConfigs[i].transparentGreen = 0; - lclVisualConfigs[i].transparentBlue = 0; - lclVisualConfigs[i].transparentAlpha = 0; - lclVisualConfigs[i].transparentIndex = 0; - i++; - } - } - } + if (NULL == result) + { + return; + } + + memset(result, 0, sizeof(GLXWinConfig) * numConfigs); + n = 0; + + /* fill in configs */ + for (i = 0; i < numConfigs; i++) + { + int rc; + + c = &(result[i]); + c->base.next = NULL; + c->pixelFormatIndex = i+1; + + rc = DescribePixelFormat(hdc, i+1, sizeof(PIXELFORMATDESCRIPTOR), &pfd); + + if (!rc) + { + ErrorF("DescribePixelFormat failed for index %d, error %s\n", i+1, glxWinErrorMessage()); + break; + } + + if (glxWinDebugSettings.dumpPFD) + pfdOut(&pfd); + + if (!(pfd.dwFlags & (PFD_DRAW_TO_WINDOW | PFD_DRAW_TO_BITMAP)) || !(pfd.dwFlags & PFD_SUPPORT_OPENGL)) + { + GLWIN_DEBUG_MSG("pixelFormat %d has unsuitable flags 0x%08lx, skipping", i+1, pfd.dwFlags); + continue; + } + + c->base.doubleBufferMode = (pfd.dwFlags & PFD_DOUBLEBUFFER) ? GL_TRUE : GL_FALSE; + c->base.stereoMode = (pfd.dwFlags & PFD_STEREO) ? GL_TRUE : GL_FALSE; + + c->base.redBits = pfd.cRedBits; + c->base.greenBits = pfd.cGreenBits; + c->base.blueBits = pfd.cBlueBits; + c->base.alphaBits = pfd.cAlphaBits; + + c->base.redMask = BITS_AND_SHIFT_TO_MASK(pfd.cRedBits, pfd.cRedShift); + c->base.greenMask = BITS_AND_SHIFT_TO_MASK(pfd.cGreenBits, pfd.cGreenShift); + c->base.blueMask = BITS_AND_SHIFT_TO_MASK(pfd.cBlueBits, pfd.cBlueShift); + c->base.alphaMask = BITS_AND_SHIFT_TO_MASK(pfd.cAlphaBits, pfd.cAlphaShift); + + c->base.rgbBits = pfd.cColorBits; + + if (pfd.iPixelType == PFD_TYPE_COLORINDEX) + { + c->base.indexBits = pfd.cColorBits; + } + else + { + c->base.indexBits = 0; + } + + c->base.accumRedBits = pfd.cAccumRedBits; + c->base.accumGreenBits = pfd.cAccumGreenBits; + c->base.accumBlueBits = pfd.cAccumBlueBits; + c->base.accumAlphaBits = pfd.cAccumAlphaBits; + // pfd.cAccumBits; + + c->base.depthBits = pfd.cDepthBits; + c->base.stencilBits = pfd.cStencilBits; + c->base.numAuxBuffers = pfd.cAuxBuffers; + + // pfd.iLayerType; // ignored + c->base.level = 0; + // pfd.dwLayerMask; // ignored + // pfd.dwDamageMask; // ignored + + c->base.pixmapMode = 0; + c->base.visualID = -1; // will be set by __glXScreenInit() + + /* EXT_visual_rating / GLX 1.2 */ + if (pfd.dwFlags & PFD_GENERIC_FORMAT) + { + c->base.visualRating = GLX_SLOW_VISUAL_EXT; + } + else + { + // PFD_GENERIC_ACCELERATED is not considered, so this may be MCD or ICD acclerated... + c->base.visualRating = GLX_NONE_EXT; + } + + /* EXT_visual_info / GLX 1.2 */ + if (pfd.iPixelType == PFD_TYPE_COLORINDEX) + { + c->base.visualType = GLX_STATIC_COLOR; + + if (!getenv("GLWIN_ENABLE_COLORINDEX_FBCONFIGS")) + { + GLWIN_DEBUG_MSG("pixelFormat %d is PFD_TYPE_COLORINDEX, skipping", i+1); + continue; } } + else + { + c->base.visualType = GLX_TRUE_COLOR; + } + + // pfd.dwVisibleMask; ??? + c->base.transparentPixel = GLX_NONE; + c->base.transparentRed = GLX_NONE; + c->base.transparentGreen = GLX_NONE; + c->base.transparentBlue = GLX_NONE; + c->base.transparentAlpha = GLX_NONE; + c->base.transparentIndex = GLX_NONE; + + /* ARB_multisample / SGIS_multisample */ + c->base.sampleBuffers = 0; + c->base.samples = 0; + + /* SGIX_fbconfig / GLX 1.3 */ + c->base.drawableType = (((pfd.dwFlags & PFD_DRAW_TO_WINDOW) ? GLX_WINDOW_BIT : 0) + | ((pfd.dwFlags & PFD_DRAW_TO_BITMAP) ? GLX_PIXMAP_BIT : 0)); + + if (pfd.iPixelType == PFD_TYPE_COLORINDEX) + { + c->base.renderType = GLX_RGBA_BIT | GLX_COLOR_INDEX_BIT; + } + else + { + c->base.renderType = GLX_RGBA_BIT; + } + + c->base.xRenderable = GL_TRUE; + c->base.fbconfigID = -1; // will be set by __glXScreenInit() + + /* SGIX_pbuffer / GLX 1.3 */ + // XXX: How can we find these values out ??? + c->base.maxPbufferWidth = -1; + c->base.maxPbufferHeight = -1; + c->base.maxPbufferPixels = -1; + c->base.optimalPbufferWidth = 0; // there is no optimal value + c->base.optimalPbufferHeight = 0; + + /* SGIX_visual_select_group */ + // arrange for visuals with the best acceleration to be preferred in selection + switch (pfd.dwFlags & (PFD_GENERIC_FORMAT | PFD_GENERIC_ACCELERATED)) + { + case 0: + c->base.visualSelectGroup = 2; + break; + + case PFD_GENERIC_ACCELERATED: + c->base.visualSelectGroup = 1; + break; + + case PFD_GENERIC_FORMAT: + c->base.visualSelectGroup = 0; + break; + + default: + ; + // "can't happen" + } + + /* OML_swap_method */ + if (pfd.dwFlags & PFD_SWAP_EXCHANGE) + c->base.swapMethod = GLX_SWAP_EXCHANGE_OML; + else if (pfd.dwFlags & PFD_SWAP_COPY) + c->base.swapMethod = GLX_SWAP_COPY_OML; + else + c->base.swapMethod = GLX_SWAP_UNDEFINED_OML; + + /* EXT_import_context */ + c->base.screen = screen->base.pScreen->myNum; + + /* EXT_texture_from_pixmap */ + c->base.bindToTextureRgb = -1; + c->base.bindToTextureRgba = -1; + c->base.bindToMipmapTexture = -1; + c->base.bindToTextureTargets = -1; + c->base.yInverted = -1; + + n++; + + // update previous config to point to this config + if (prev) + prev->base.next = &(c->base); + + prev = c; } - if (i != lclNumConfigs) - GLWIN_DEBUG_MSG("glWinInitVisualConfigs failed to alloc visual configs"); - GlxSetVisualConfigs(lclNumConfigs, lclVisualConfigs, lclVisualPrivates); + GLWIN_DEBUG_MSG("found %d pixelFormats suitable for conversion to fbConfigs", n); + + screen->base.numFBConfigs = n; + screen->base.fbconfigs = &(result->base); } -/* Copied from Mesa */ -static void glWinSetVisualConfigs(int nconfigs, __GLXvisualConfig *configs, - void **privates) +// helper function to access an attribute value from an attribute value array by attribute +static +int getAttrValue(const int attrs[], int values[], unsigned int num, int attr, int fallback) { - GLWIN_DEBUG_MSG("glWinSetVisualConfigs\n"); + unsigned int i; + for (i = 0; i < num; i++) + { + if (attrs[i] == attr) + { + GLWIN_TRACE_MSG("getAttrValue attr 0x%x, value %d", attr, values[i]); + return values[i]; + } + } - numConfigs = nconfigs; - visualConfigs = configs; - visualPrivates = privates; + ErrorF("getAttrValue failed to find attr 0x%x, using default value %d\n", attr, fallback); + return fallback; } -/* Copied from Mesa */ -static Bool glWinInitVisuals(VisualPtr *visualp, DepthPtr *depthp, - int *nvisualp, int *ndepthp, - int *rootDepthp, VisualID *defaultVisp, - unsigned long sizes, int bitsPerRGB) +// +// Create the GLXconfigs using wglGetPixelFormatAttribfvARB() extension +// +static void +glxWinCreateConfigsExt(HDC hdc, glxWinScreen *screen) { - glWinInitDebugSettings(); + GLXWinConfig *c, *result, *prev = NULL; + int i = 0; + int n = 0; - GLWIN_DEBUG_MSG("glWinInitVisuals\n"); + const int attr = WGL_NUMBER_PIXEL_FORMATS_ARB; + int numConfigs; - if (0 == numConfigs) /* if no configs */ - glWinInitVisualConfigs(); /* ensure the visula configs are setup */ + int attrs[50]; + unsigned int num_attrs = 0; - /* - * Setup the visuals supported by this particular screen. - */ - return init_visuals(nvisualp, visualp, defaultVisp, - *ndepthp, *depthp, *rootDepthp); + GLWIN_DEBUG_MSG("glxWinCreateConfigsExt"); + + screen->base.numFBConfigs = 0; + screen->base.fbconfigs = NULL; + + if (!wglGetPixelFormatAttribivARBWrapper(hdc, 0, 0, 1, &attr, &numConfigs)) + { + ErrorF("wglGetPixelFormatAttribivARB failed for WGL_NUMBER_PIXEL_FORMATS_ARB: %s\n", glxWinErrorMessage()); + return; + } + + GLWIN_DEBUG_MSG("wglGetPixelFormatAttribivARB says %d possible pixel formats", numConfigs); + + /* alloc */ + result = malloc(sizeof(GLXWinConfig) * numConfigs); + + if (NULL == result) + { + return; + } + + memset(result, 0, sizeof(GLXWinConfig) * numConfigs); + n = 0; + +#define ADD_ATTR(a) { attrs[num_attrs++] = a; assert(num_attrs < NUM_ELEMENTS(attrs)); } + + ADD_ATTR(WGL_DRAW_TO_WINDOW_ARB); + ADD_ATTR(WGL_DRAW_TO_BITMAP_ARB); + ADD_ATTR(WGL_ACCELERATION_ARB); + ADD_ATTR(WGL_SWAP_LAYER_BUFFERS_ARB); + ADD_ATTR(WGL_NUMBER_OVERLAYS_ARB); + ADD_ATTR(WGL_NUMBER_UNDERLAYS_ARB); + ADD_ATTR(WGL_TRANSPARENT_ARB); + ADD_ATTR(WGL_TRANSPARENT_RED_VALUE_ARB); + ADD_ATTR(WGL_TRANSPARENT_GREEN_VALUE_ARB); + ADD_ATTR(WGL_TRANSPARENT_GREEN_VALUE_ARB); + ADD_ATTR(WGL_TRANSPARENT_ALPHA_VALUE_ARB); + ADD_ATTR(WGL_SUPPORT_OPENGL_ARB); + ADD_ATTR(WGL_DOUBLE_BUFFER_ARB); + ADD_ATTR(WGL_STEREO_ARB); + ADD_ATTR(WGL_PIXEL_TYPE_ARB); + ADD_ATTR(WGL_COLOR_BITS_ARB); + ADD_ATTR(WGL_RED_BITS_ARB); + ADD_ATTR(WGL_RED_SHIFT_ARB); + ADD_ATTR(WGL_GREEN_BITS_ARB); + ADD_ATTR(WGL_GREEN_SHIFT_ARB); + ADD_ATTR(WGL_BLUE_BITS_ARB); + ADD_ATTR(WGL_BLUE_SHIFT_ARB); + ADD_ATTR(WGL_ALPHA_BITS_ARB); + ADD_ATTR(WGL_ALPHA_SHIFT_ARB); + ADD_ATTR(WGL_ACCUM_RED_BITS_ARB); + ADD_ATTR(WGL_ACCUM_GREEN_BITS_ARB); + ADD_ATTR(WGL_ACCUM_BLUE_BITS_ARB); + ADD_ATTR(WGL_ACCUM_ALPHA_BITS_ARB); + ADD_ATTR(WGL_DEPTH_BITS_ARB); + ADD_ATTR(WGL_STENCIL_BITS_ARB); + ADD_ATTR(WGL_AUX_BUFFERS_ARB); + ADD_ATTR(WGL_SWAP_METHOD_ARB); + + if (screen->has_WGL_ARB_multisample) + { + // we may not query these attrs if WGL_ARB_multisample is not offered + ADD_ATTR(WGL_SAMPLE_BUFFERS_ARB); + ADD_ATTR(WGL_SAMPLES_ARB); + } + + if (screen->has_WGL_ARB_render_texture) + { + // we may not query these attrs if WGL_ARB_render_texture is not offered + ADD_ATTR(WGL_BIND_TO_TEXTURE_RGB_ARB); + ADD_ATTR(WGL_BIND_TO_TEXTURE_RGBA_ARB); + } + + if (screen->has_WGL_ARB_pbuffer) + { + // we may not query these attrs if WGL_ARB_pbuffer is not offered + ADD_ATTR(WGL_DRAW_TO_PBUFFER_ARB); + ADD_ATTR(WGL_MAX_PBUFFER_PIXELS_ARB); + ADD_ATTR(WGL_MAX_PBUFFER_WIDTH_ARB); + ADD_ATTR(WGL_MAX_PBUFFER_HEIGHT_ARB); + } + + /* fill in configs */ + for (i = 0; i < numConfigs; i++) + { + int values[num_attrs]; + + c = &(result[i]); + c->base.next = NULL; + c->pixelFormatIndex = i+1; + + if (!wglGetPixelFormatAttribivARBWrapper(hdc, i+1, 0, num_attrs, attrs, values)) + { + ErrorF("wglGetPixelFormatAttribivARB failed for index %d, error %s\n", i+1, glxWinErrorMessage()); + break; + } + +#define ATTR_VALUE(a, d) getAttrValue(attrs, values, num_attrs, (a), (d)) + + if (!ATTR_VALUE(WGL_SUPPORT_OPENGL_ARB, 0)) + { + GLWIN_DEBUG_MSG("pixelFormat %d isn't WGL_SUPPORT_OPENGL_ARB, skipping", i+1); + continue; + } + + c->base.doubleBufferMode = ATTR_VALUE(WGL_DOUBLE_BUFFER_ARB, 0) ? GL_TRUE : GL_FALSE; + c->base.stereoMode = ATTR_VALUE(WGL_STEREO_ARB, 0) ? GL_TRUE : GL_FALSE; + + c->base.redBits = ATTR_VALUE(WGL_RED_BITS_ARB, 0); + c->base.greenBits = ATTR_VALUE(WGL_GREEN_BITS_ARB, 0); + c->base.blueBits = ATTR_VALUE(WGL_BLUE_BITS_ARB, 0); + c->base.alphaBits = ATTR_VALUE(WGL_ALPHA_BITS_ARB, 0); + + c->base.redMask = BITS_AND_SHIFT_TO_MASK(c->base.redBits, ATTR_VALUE(WGL_RED_SHIFT_ARB, 0)); + c->base.greenMask = BITS_AND_SHIFT_TO_MASK(c->base.greenBits, ATTR_VALUE(WGL_GREEN_SHIFT_ARB, 0)); + c->base.blueMask = BITS_AND_SHIFT_TO_MASK(c->base.blueBits, ATTR_VALUE(WGL_BLUE_SHIFT_ARB, 0)); + c->base.alphaMask = BITS_AND_SHIFT_TO_MASK(c->base.alphaBits, ATTR_VALUE(WGL_ALPHA_SHIFT_ARB, 0)); + + switch (ATTR_VALUE(WGL_PIXEL_TYPE_ARB, 0)) + { + case WGL_TYPE_COLORINDEX_ARB: + c->base.indexBits = ATTR_VALUE(WGL_COLOR_BITS_ARB, 0); + c->base.rgbBits = 0; + c->base.visualType = GLX_STATIC_COLOR; + + if (!getenv("GLWIN_ENABLE_COLORINDEX_FBCONFIGS")) + { + GLWIN_DEBUG_MSG("pixelFormat %d is WGL_TYPE_COLORINDEX_ARB, skipping", i+1); + continue; + } + + break; + + case WGL_TYPE_RGBA_FLOAT_ARB: + GLWIN_DEBUG_MSG("pixelFormat %d is WGL_TYPE_RGBA_FLOAT_ARB, skipping", i+1); + continue; + + case WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT: + GLWIN_DEBUG_MSG("pixelFormat %d is WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT, skipping", i+1); + continue; + + case WGL_TYPE_RGBA_ARB: + c->base.indexBits = 0; + c->base.rgbBits = ATTR_VALUE(WGL_COLOR_BITS_ARB, 0); + c->base.visualType = GLX_TRUE_COLOR; + break; + + default: + ErrorF("wglGetPixelFormatAttribivARB returned unknown value 0x%x for WGL_PIXEL_TYPE_ARB\n", ATTR_VALUE(WGL_PIXEL_TYPE_ARB, 0)); + continue; + } + + c->base.accumRedBits = ATTR_VALUE(WGL_ACCUM_RED_BITS_ARB, 0); + c->base.accumGreenBits = ATTR_VALUE(WGL_ACCUM_GREEN_BITS_ARB, 0); + c->base.accumBlueBits = ATTR_VALUE(WGL_ACCUM_BLUE_BITS_ARB, 0); + c->base.accumAlphaBits = ATTR_VALUE(WGL_ACCUM_ALPHA_BITS_ARB, 0); + + c->base.depthBits = ATTR_VALUE(WGL_DEPTH_BITS_ARB, 0); + c->base.stencilBits = ATTR_VALUE(WGL_STENCIL_BITS_ARB, 0); + c->base.numAuxBuffers = ATTR_VALUE(WGL_AUX_BUFFERS_ARB, 0); + + { + int layers = ATTR_VALUE(WGL_NUMBER_OVERLAYS_ARB,0) + ATTR_VALUE(WGL_NUMBER_UNDERLAYS_ARB, 0); + + if (layers > 0) + { + ErrorF("pixelFormat %d: has %d overlay, %d underlays which aren't currently handled", i, ATTR_VALUE(WGL_NUMBER_OVERLAYS_ARB,0), ATTR_VALUE(WGL_NUMBER_UNDERLAYS_ARB, 0)); + // XXX: need to iterate over layers? + } + } + c->base.level = 0; + + c->base.pixmapMode = 0; // ??? + c->base.visualID = -1; // will be set by __glXScreenInit() + + /* EXT_visual_rating / GLX 1.2 */ + switch (ATTR_VALUE(WGL_ACCELERATION_ARB, 0)) + { + default: + ErrorF("wglGetPixelFormatAttribivARB returned unknown value 0x%x for WGL_ACCELERATION_ARB\n", ATTR_VALUE(WGL_ACCELERATION_ARB, 0)); + + case WGL_NO_ACCELERATION_ARB: + c->base.visualRating = GLX_SLOW_VISUAL_EXT; + break; + + case WGL_GENERIC_ACCELERATION_ARB: + case WGL_FULL_ACCELERATION_ARB: + c->base.visualRating = GLX_NONE_EXT; + break; + } + + /* EXT_visual_info / GLX 1.2 */ + // c->base.visualType is set above + if (ATTR_VALUE(WGL_TRANSPARENT_ARB, 0)) + { + c->base.transparentPixel = (c->base.visualType == GLX_TRUE_COLOR) ? GLX_TRANSPARENT_RGB_EXT : GLX_TRANSPARENT_INDEX_EXT; + c->base.transparentRed = ATTR_VALUE(WGL_TRANSPARENT_RED_VALUE_ARB, 0); + c->base.transparentGreen = ATTR_VALUE(WGL_TRANSPARENT_GREEN_VALUE_ARB, 0); + c->base.transparentBlue = ATTR_VALUE(WGL_TRANSPARENT_BLUE_VALUE_ARB, 0); + c->base.transparentAlpha = ATTR_VALUE(WGL_TRANSPARENT_ALPHA_VALUE_ARB, 0); + c->base.transparentIndex = ATTR_VALUE(WGL_TRANSPARENT_INDEX_VALUE_ARB, 0); + } + else + { + c->base.transparentPixel = GLX_NONE_EXT; + c->base.transparentRed = GLX_NONE; + c->base.transparentGreen = GLX_NONE; + c->base.transparentBlue = GLX_NONE; + c->base.transparentAlpha = GLX_NONE; + c->base.transparentIndex = GLX_NONE; + } + + /* ARB_multisample / SGIS_multisample */ + if (screen->has_WGL_ARB_multisample) + { + c->base.sampleBuffers = ATTR_VALUE(WGL_SAMPLE_BUFFERS_ARB, 0); + c->base.samples = ATTR_VALUE(WGL_SAMPLES_ARB, 0); + } + else + { + c->base.sampleBuffers = 0; + c->base.samples = 0; + } + + /* SGIX_fbconfig / GLX 1.3 */ + c->base.drawableType = ((ATTR_VALUE(WGL_DRAW_TO_WINDOW_ARB, 0) ? GLX_WINDOW_BIT : 0) + | (ATTR_VALUE(WGL_DRAW_TO_BITMAP_ARB, 0) ? GLX_PIXMAP_BIT : 0) + | (ATTR_VALUE(WGL_DRAW_TO_PBUFFER_ARB, 0) ? GLX_PBUFFER_BIT : 0)); + + /* + Assume OpenGL RGBA rendering is available on all visuals + (it is specified to render to red component in single-channel visuals, + if supported, but there doesn't seem to be any mechanism to check if it + is supported) + + Color index rendering is only supported on single-channel visuals + */ + if (c->base.visualType == GLX_STATIC_COLOR) + { + c->base.renderType = GLX_RGBA_BIT | GLX_COLOR_INDEX_BIT; + } + else + { + c->base.renderType = GLX_RGBA_BIT; + } + + c->base.xRenderable = GL_TRUE; + c->base.fbconfigID = -1; // will be set by __glXScreenInit() + + /* SGIX_pbuffer / GLX 1.3 */ + if (screen->has_WGL_ARB_pbuffer) + { + c->base.maxPbufferWidth = ATTR_VALUE(WGL_MAX_PBUFFER_WIDTH_ARB, -1); + c->base.maxPbufferHeight = ATTR_VALUE(WGL_MAX_PBUFFER_HEIGHT_ARB, -1); + c->base.maxPbufferPixels = ATTR_VALUE(WGL_MAX_PBUFFER_PIXELS_ARB, -1); + } + else + { + c->base.maxPbufferWidth = -1; + c->base.maxPbufferHeight = -1; + c->base.maxPbufferPixels = -1; + } + c->base.optimalPbufferWidth = 0; // there is no optimal value + c->base.optimalPbufferHeight = 0; + + /* SGIX_visual_select_group */ + // arrange for visuals with the best acceleration to be preferred in selection + switch (ATTR_VALUE(WGL_ACCELERATION_ARB, 0)) + { + case WGL_FULL_ACCELERATION_ARB: + c->base.visualSelectGroup = 2; + break; + + case WGL_GENERIC_ACCELERATION_ARB: + c->base.visualSelectGroup = 1; + break; + + default: + case WGL_NO_ACCELERATION_ARB: + c->base.visualSelectGroup = 0; + break; + } + + /* OML_swap_method */ + switch (ATTR_VALUE(WGL_SWAP_METHOD_ARB, 0)) + { + case WGL_SWAP_EXCHANGE_ARB: + c->base.swapMethod = GLX_SWAP_EXCHANGE_OML; + break; + + case WGL_SWAP_COPY_ARB: + c->base.swapMethod = GLX_SWAP_COPY_OML; + break; + + default: + ErrorF("wglGetPixelFormatAttribivARB returned unknown value 0x%x for WGL_SWAP_METHOD_ARB\n", ATTR_VALUE(WGL_SWAP_METHOD_ARB, 0)); + + case WGL_SWAP_UNDEFINED_ARB: + c->base.swapMethod = GLX_SWAP_UNDEFINED_OML; + } + + /* EXT_import_context */ + c->base.screen = screen->base.pScreen->myNum; + + /* EXT_texture_from_pixmap */ + /* + Mesa's DRI configs always have bindToTextureRgb/Rgba TRUE (see driCreateConfigs(), so setting + bindToTextureRgb/bindToTextureRgba to FALSE means that swrast can't find any fbConfigs to use, + so setting these to 0, even if we know bindToTexture isn't available, isn't a good idea... + */ + if (screen->has_WGL_ARB_render_texture) + { + c->base.bindToTextureRgb = ATTR_VALUE(WGL_BIND_TO_TEXTURE_RGB_ARB, -1); + c->base.bindToTextureRgba = ATTR_VALUE(WGL_BIND_TO_TEXTURE_RGBA_ARB, -1); + } + else + { + c->base.bindToTextureRgb = -1; + c->base.bindToTextureRgba = -1; + } + c->base.bindToMipmapTexture = -1; + c->base.bindToTextureTargets = GLX_TEXTURE_1D_BIT_EXT | GLX_TEXTURE_2D_BIT_EXT | GLX_TEXTURE_RECTANGLE_BIT_EXT; + c->base.yInverted = -1; + + n++; + + // update previous config to point to this config + if (prev) + prev->base.next = &(c->base); + + prev = c; + } + + screen->base.numFBConfigs = n; + screen->base.fbconfigs = &(result->base); } diff --git a/xserver/hw/xwin/glx/wgl_ext_api.c b/xserver/hw/xwin/glx/wgl_ext_api.c new file mode 100644 index 000000000..4b8359fb1 --- /dev/null +++ b/xserver/hw/xwin/glx/wgl_ext_api.c @@ -0,0 +1,75 @@ +/* + * File: wgl_ext_api.c + * Purpose: Wrapper functions for Win32 OpenGL wgl extension functions + * + * Authors: Jon TURNEY + * + * Copyright (c) Jon TURNEY 2009 + * + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +#ifdef HAVE_XWIN_CONFIG_H +#include +#endif + +#include +#include +#include +#include +#include +#include "wglext.h" +#include +#include "glwindows.h" + +#define RESOLVE_DECL(type) \ + static type type##proc = NULL; + +#define PRERESOLVE(type, symbol) \ + type##proc = (type)wglGetProcAddress(symbol); \ + if (type##proc == NULL) \ + ErrorF("wglwrap: Can't resolve \"%s\"\n", symbol); \ + else \ + ErrorF("wglwrap: Resolved \"%s\"\n", symbol); + +#define RESOLVE_RET(type, symbol, retval) \ + if (type##proc == NULL) { \ + __glXErrorCallBack(0); \ + return retval; \ + } + +#define RESOLVE(procname, symbol) RESOLVE_RET(procname, symbol,) + +#define RESOLVED_PROC(type) type##proc + +/* + * Include generated cdecl wrappers for stdcall WGL functions + * + * There are extensions to the wgl*() API as well; again we call + * these functions by using wglGetProcAddress() to get a pointer + * to the function, and wrapping it for cdecl/stdcall conversion + * + * We arrange to resolve the functions up front, as they need a + * context to work, as we like to use them to be able to select + * a context. Again, this assumption fails badly on multimontor + * systems... + */ + +#include "generated_wgl_wrappers.c" diff --git a/xserver/hw/xwin/glx/wgl_ext_api.h b/xserver/hw/xwin/glx/wgl_ext_api.h new file mode 100644 index 000000000..e4462ac5c --- /dev/null +++ b/xserver/hw/xwin/glx/wgl_ext_api.h @@ -0,0 +1,87 @@ +/* + * File: wgl_ext_api.h + * Purpose: Wrapper functions for Win32 OpenGL wgl extension functions + * + * Authors: Jon TURNEY + * + * Copyright (c) Jon TURNEY 2009 + * + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL + * THE ABOVE LISTED COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR + * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + * DEALINGS IN THE SOFTWARE. + */ + +#ifndef wgl_ext_api_h +#define wgl_ext_api_h + +#include "wglext.h" + +void wglResolveExtensionProcs(void); + +/* + Prototypes for wrapper functions we actually use + XXX: should be automatically generated as well +*/ + +const char *wglGetExtensionsStringARBWrapper(HDC hdc); +BOOL wglMakeContextCurrentARBWrapper(HDC hDrawDC, HDC hReadDC, HGLRC hglrc); +HDC wglGetCurrentReadDCARBWrapper(VOID); + +BOOL wglGetPixelFormatAttribivARBWrapper(HDC hdc, + int iPixelFormat, + int iLayerPlane, + UINT nAttributes, + const int *piAttributes, + int *piValues); + +BOOL wglGetPixelFormatAttribfvARBWrapper(HDC hdc, + int iPixelFormat, + int iLayerPlane, + UINT nAttributes, + const int *piAttributes, + FLOAT *pfValues); + +BOOL wglChoosePixelFormatARBWrapper(HDC hdc, + const int *piAttribIList, + const FLOAT *pfAttribFList, + UINT nMaxFormats, + int *piFormats, + UINT *nNumFormats); + +HPBUFFERARB wglCreatePbufferARBWrapper(HDC hDC, + int iPixelFormat, + int iWidth, + int iHeight, + const int *piAttribList); + +HDC wglGetPbufferDCARBWrapper(HPBUFFERARB hPbuffer); + +int wglReleasePbufferDCARBWrapper(HPBUFFERARB hPbuffer, + HDC hDC); + +BOOL wglDestroyPbufferARBWrapper(HPBUFFERARB hPbuffer); + +BOOL wglQueryPbufferARBWrapper(HPBUFFERARB hPbuffer, + int iAttribute, + int *piValue); + +BOOL wglSwapIntervalEXTWrapper(int interval); + +int wglGetSwapIntervalEXTWrapper(void); + +#endif /* wgl_ext_api_h */ diff --git a/xserver/hw/xwin/winpriv.c b/xserver/hw/xwin/glx/winpriv.c similarity index 51% rename from xserver/hw/xwin/winpriv.c rename to xserver/hw/xwin/glx/winpriv.c index 29221cf2b..a35392b26 100644 --- a/xserver/hw/xwin/winpriv.c +++ b/xserver/hw/xwin/glx/winpriv.c @@ -16,43 +16,27 @@ winCreateWindowsWindow (WindowPtr pWin); /** * Return size and handles of a window. * If pWin is NULL, then the information for the root window is requested. - */ -extern void winGetWindowInfo(WindowPtr pWin, winWindowInfoPtr pWinInfo) + */ +HWND winGetWindowInfo(WindowPtr pWin) { - /* Sanity check */ - if (pWinInfo == NULL) - return; - - winDebug("%s:%d pWin=%p\n", __FUNCTION__, __LINE__, pWin); + winDebug("%s: pWin=%p\n", __FUNCTION__, pWin); /* a real window was requested */ - if (pWin != NULL) + if (pWin != NULL) { - /* Initialize the size information */ - RECT rect = { - pWin->drawable.x, - pWin->drawable.y, - pWin->drawable.x + pWin->drawable.width, - pWin->drawable.y + pWin->drawable.height - }, rect_extends; /* Get the window and screen privates */ ScreenPtr pScreen = pWin->drawable.pScreen; winPrivScreenPtr pWinScreen = winGetScreenPriv(pScreen); winScreenInfoPtr pScreenInfo = NULL; + HWND hwnd = NULL; - rect_extends = rect; - OffsetRect(&rect_extends, -pWin->drawable.x, -pWin->drawable.y); - - if (pWinScreen == NULL) + if (pWinScreen == NULL) { ErrorF("winGetWindowInfo: screen has no privates\n"); - return; + return NULL; } - - pWinInfo->hwnd = pWinScreen->hwndScreen; - pWinInfo->hrgn = NULL; - pWinInfo->rect = rect; - + + hwnd = pWinScreen->hwndScreen; pScreenInfo = pWinScreen->pScreenInfo; #ifdef XWIN_MULTIWINDOW @@ -64,28 +48,22 @@ extern void winGetWindowInfo(WindowPtr pWin, winWindowInfoPtr pWinInfo) if (pWinPriv == NULL) { ErrorF("winGetWindowInfo: window has no privates\n"); - return; + return hwnd; } if (pWinPriv->hWnd == NULL) { - winCreateWindowsWindow(pWin); + winCreateWindowsWindow(pWin); + ErrorF("winGetWindowInfo: forcing window to exist...\n"); } - if (pWinPriv->hWnd != NULL) { - - /* copy size and window handle */ - pWinInfo->rect = rect_extends; - pWinInfo->hwnd = pWinPriv->hWnd; - /* Copy window region */ - if (pWinInfo->hrgn) - DeleteObject(pWinInfo->hrgn); - pWinInfo->hrgn = CreateRectRgn(0,0,0,0); - CombineRgn(pWinInfo->hrgn, pWinPriv->hRgn, pWinPriv->hRgn, - RGN_COPY); - } - - return; + if (pWinPriv->hWnd != NULL) + { + /* copy window handle */ + hwnd = pWinPriv->hWnd; + } + + return hwnd; } #endif #ifdef XWIN_MULTIWINDOWEXTWM @@ -97,38 +75,52 @@ extern void winGetWindowInfo(WindowPtr pWin, winWindowInfoPtr pWinInfo) if (pRLWinPriv == NULL) { ErrorF("winGetWindowInfo: window has no privates\n"); - return; + return hwnd; } - + if (pRLWinPriv->hWnd != NULL) { - /* copy size and window handle */ - pWinInfo->rect = rect_extends; - pWinInfo->hwnd = pRLWinPriv->hWnd; + /* copy window handle */ + hwnd = pRLWinPriv->hWnd; } - return; + return hwnd; } #endif - } - else + } + else { - RECT rect = {0, 0, 0, 0}; ScreenPtr pScreen = g_ScreenInfo[0].pScreen; winPrivScreenPtr pWinScreen = winGetScreenPriv(pScreen); - pWinInfo->hwnd = NULL; - pWinInfo->hrgn = NULL; - pWinInfo->rect = rect; - if (pWinScreen == NULL) { ErrorF("winGetWindowInfo: screen has no privates\n"); - return; + return NULL; } ErrorF("winGetWindowInfo: returning root window\n"); - pWinInfo->hwnd = pWinScreen->hwndScreen; + return pWinScreen->hwndScreen; } - return; + + return NULL; +} + +Bool +winCheckScreenAiglxIsSupported(ScreenPtr pScreen) +{ + winPrivScreenPtr pWinScreen = winGetScreenPriv(pScreen); + winScreenInfoPtr pScreenInfo = pWinScreen->pScreenInfo; + +#ifdef XWIN_MULTIWINDOW + if (pScreenInfo->fMultiWindow) + return TRUE; +#endif + +#ifdef XWIN_MULTIWINDOWEXTWM + if (pScreenInfo->fMWExtWM) + return TRUE; +#endif + + return FALSE; } diff --git a/xserver/hw/xwin/glx/winpriv.h b/xserver/hw/xwin/glx/winpriv.h new file mode 100644 index 000000000..dce1edf48 --- /dev/null +++ b/xserver/hw/xwin/glx/winpriv.h @@ -0,0 +1,11 @@ +/* + * Export window information for the Windows-OpenGL GLX implementation. + * + * Authors: Alexander Gottwald + */ + +#include +#include + +HWND winGetWindowInfo(WindowPtr pWin); +Bool winCheckScreenAiglxIsSupported(ScreenPtr pScreen); diff --git a/xserver/hw/xwin/win.h b/xserver/hw/xwin/win.h index 5cda9701c..8c4b67f17 100644 --- a/xserver/hw/xwin/win.h +++ b/xserver/hw/xwin/win.h @@ -183,10 +183,8 @@ #include "fb.h" #include "rootless.h" -#ifdef RENDER #include "mipict.h" #include "picturestr.h" -#endif #ifdef RANDR #include "randrstr.h" @@ -225,7 +223,7 @@ if (fDebugProcMsg) \ int iLength; \ pszTemp = Xprintf (str, ##__VA_ARGS__); \ MessageBox (NULL, pszTemp, szFunctionName, MB_OK); \ - xfree (pszTemp); \ + free(pszTemp); \ } #else #define DEBUG_MSG(str,...) @@ -624,17 +622,23 @@ typedef struct { * Extern declares for general global variables */ -extern winScreenInfo g_ScreenInfo[]; +extern winScreenInfo * g_ScreenInfo; extern miPointerScreenFuncRec g_winPointerCursorFuncs; extern DWORD g_dwEvents; #ifdef HAS_DEVWINDOWS extern int g_fdMessageQueue; #endif -extern DevPrivateKey g_iScreenPrivateKey; -extern DevPrivateKey g_iCmapPrivateKey; -extern DevPrivateKey g_iGCPrivateKey; -extern DevPrivateKey g_iPixmapPrivateKey; -extern DevPrivateKey g_iWindowPrivateKey; +extern DevPrivateKeyRec g_iScreenPrivateKeyRec; +#define g_iScreenPrivateKey (&g_iScreenPrivateKeyRec) +extern DevPrivateKeyRec g_iCmapPrivateKeyRec; +#define g_iCmapPrivateKey (&g_iCmapPrivateKeyRec) +extern DevPrivateKeyRec g_iGCPrivateKeyRec; +#define g_iGCPrivateKey (&g_iGCPrivateKeyRec) +extern DevPrivateKeyRec g_iPixmapPrivateKeyRec; +#define g_iPixmapPrivateKey (&g_iPixmapPrivateKeyRec) +extern DevPrivateKeyRec g_iWindowPrivateKeyRec; +#define g_iWindowPrivateKey (&g_iWindowPrivateKeyRec) + extern unsigned long g_ulServerGeneration; extern DWORD g_dwEnginesSupported; extern HINSTANCE g_hInstance; @@ -1206,7 +1210,7 @@ Bool winMapWindowRootless (WindowPtr pWindow); void -winSetShapeRootless (WindowPtr pWindow); +winSetShapeRootless (WindowPtr pWindow, int kind); /* @@ -1228,7 +1232,7 @@ void winReshapeMultiWindow (WindowPtr pWin); void -winSetShapeMultiWindow (WindowPtr pWindow); +winSetShapeMultiWindow (WindowPtr pWindow, int kind); void winUpdateRgnMultiWindow (WindowPtr pWindow); @@ -1452,6 +1456,12 @@ winWindowsWMExtensionInit (void); Bool winInitCursor (ScreenPtr pScreen); +/* + * winprocarg.c + */ +void +winInitializeScreens(int maxscreens); + /* * END DDX and DIX Function Prototypes */ diff --git a/xserver/hw/xwin/winallpriv.c b/xserver/hw/xwin/winallpriv.c index 21ccd9b3b..ef42d71f4 100644 --- a/xserver/hw/xwin/winallpriv.c +++ b/xserver/hw/xwin/winallpriv.c @@ -74,25 +74,32 @@ winAllocatePrivates (ScreenPtr pScreen) /* Intialize private structure members */ pScreenPriv->fActive = TRUE; + /* Register our screen private */ + if (!dixRegisterPrivateKey(g_iScreenPrivateKey, PRIVATE_SCREEN, 0)) + { + ErrorF ("winAllocatePrivates - AllocateScreenPrivate () failed\n"); + return FALSE; + } + /* Save the screen private pointer */ winSetScreenPriv (pScreen, pScreenPriv); /* Reserve GC memory for our privates */ - if (!dixRequestPrivate(g_iGCPrivateKey, sizeof (winPrivGCRec))) + if (!dixRegisterPrivateKey(g_iGCPrivateKey, PRIVATE_GC, sizeof (winPrivGCRec))) { ErrorF ("winAllocatePrivates - AllocateGCPrivate () failed\n"); return FALSE; } /* Reserve Pixmap memory for our privates */ - if (!dixRequestPrivate(g_iPixmapPrivateKey, sizeof (winPrivPixmapRec))) + if (!dixRegisterPrivateKey(g_iPixmapPrivateKey, PRIVATE_PIXMAP, sizeof (winPrivPixmapRec))) { ErrorF ("winAllocatePrivates - AllocatePixmapPrivates () failed\n"); return FALSE; } /* Reserve Window memory for our privates */ - if (!dixRequestPrivate(g_iWindowPrivateKey, sizeof (winPrivWinRec))) + if (!dixRegisterPrivateKey(g_iWindowPrivateKey, PRIVATE_WINDOW, sizeof (winPrivWinRec))) { ErrorF ("winAllocatePrivates () - AllocateWindowPrivates () failed\n"); return FALSE; @@ -161,6 +168,13 @@ winAllocateCmapPrivates (ColormapPtr pCmap) /* Initialize the memory of the private structure */ ZeroMemory (pCmapPriv, sizeof (winPrivCmapRec)); + /* Register our colourmap private */ + if (!dixRegisterPrivateKey(g_iCmapPrivateKey, PRIVATE_COLORMAP, 0)) + { + ErrorF ("winAllocateCmapPrivates - AllocateCmapPrivate () failed\n"); + return FALSE; + } + /* Save the cmap private pointer */ winSetCmapPriv (pCmap, pCmapPriv); diff --git a/xserver/hw/xwin/winauth.c b/xserver/hw/xwin/winauth.c index f4c400582..f0eec0446 100644 --- a/xserver/hw/xwin/winauth.c +++ b/xserver/hw/xwin/winauth.c @@ -150,7 +150,7 @@ winGenerateAuthorization (void) #ifdef XCSECURITY /* Allocate structure for additional auth information */ pAuth = (SecurityAuthorizationPtr) - xalloc (sizeof (SecurityAuthorizationRec)); + malloc(sizeof (SecurityAuthorizationRec)); if (!(pAuth)) { ErrorF ("winGenerateAuthorization - Failed allocating " @@ -186,7 +186,7 @@ winGenerateAuthorization (void) auth_bailout: if (fFreeAuth) - xfree (pAuth); + free(pAuth); return FALSE; } diff --git a/xserver/hw/xwin/winclipboardxevents.c b/xserver/hw/xwin/winclipboardxevents.c index ae8262ebf..edb6ac4bd 100644 --- a/xserver/hw/xwin/winclipboardxevents.c +++ b/xserver/hw/xwin/winclipboardxevents.c @@ -411,8 +411,7 @@ winClipboardFlushXEvents (HWND hwnd, xtpText.value = NULL; xtpText.nitems = 0; } - if (pszConvertData) - free (pszConvertData); + free(pszConvertData); if (hGlobal && pszGlobalData) GlobalUnlock (hGlobal); @@ -773,10 +772,8 @@ winClipboardFlushXEvents (HWND hwnd, xtpText.value = NULL; xtpText.nitems = 0; } - if (pszConvertData) - free (pszConvertData); - if (pwszUnicodeStr) - free (pwszUnicodeStr); + free(pszConvertData); + free(pwszUnicodeStr); if (hGlobal && pszGlobalData) GlobalUnlock (hGlobal); if (fSetClipboardData && g_fUnicodeSupport) diff --git a/xserver/hw/xwin/winconfig.c b/xserver/hw/xwin/winconfig.c index b05867ba9..a88b6f1cf 100644 --- a/xserver/hw/xwin/winconfig.c +++ b/xserver/hw/xwin/winconfig.c @@ -393,10 +393,10 @@ winConfigKeyboard (DeviceIntPtr pDevice) (1000 / g_winInfo.keyboard.rate) < 1) { winErrorFVerb (2, "\"%s\" is not a valid AutoRepeat value", s); - xfree(s); + free(s); return FALSE; } - xfree(s); + free(s); winMsg (X_CONFIG, "AutoRepeat: %ld %ld\n", g_winInfo.keyboard.delay, g_winInfo.keyboard.rate); } @@ -583,7 +583,7 @@ winConfigFiles () else if (filesptr != NULL && filesptr->file_fontpath) { from = X_CONFIG; - defaultFontPath = xstrdup (filesptr->file_fontpath); + defaultFontPath = strdup (filesptr->file_fontpath); } winMsg (from, "FontPath set to \"%s\"\n", defaultFontPath); @@ -630,7 +630,7 @@ winSetStrOption (pointer optlist, const char *name, char *deflt) if (ParseOptionValue (-1, optlist, &o)) deflt = o.value.str; if (deflt) - return xstrdup (deflt); + return strdup (deflt); else return NULL; } @@ -673,6 +673,18 @@ winSetRealOption (pointer optlist, const char *name, double deflt) deflt = o.value.realnum; return deflt; } + +double +winSetPercentOption (pointer optlist, const char *name, double deflt) +{ + OptionInfoRec o; + + o.name = name; + o.type = OPTV_PERCENT; + if (ParseOptionValue (-1, optlist, &o)) + deflt = o.value.realnum; + return deflt; +} #endif @@ -718,7 +730,7 @@ winNameCompare (const char *s1, const char *s2) c1 = (isupper (*s1) ? tolower (*s1) : *s1); c2 = (isupper (*s2) ? tolower (*s2) : *s2); } - return (c1 - c2); + return c1 - c2; } @@ -753,11 +765,11 @@ winFindOptionValue (XF86OptionPtr list, const char *name) if (list) { if (list->opt_val) - return (list->opt_val); + return list->opt_val; else return ""; } - return (NULL); + return NULL; } @@ -851,6 +863,31 @@ ParseOptionValue (int scrnIndex, pointer options, OptionInfoPtr p) p->found = FALSE; } break; + case OPTV_PERCENT: + if (*s == '\0') + { + winDrvMsg (scrnIndex, X_WARNING, + "Option \"%s\" requires a percent value\n", + p->name); + p->found = FALSE; + } + else + { + double percent = strtod (s, &end); + + if (end != s && winNameCompare (end, "%")) + { + p->found = TRUE; + p->value.realnum = percent; + } + else + { + winDrvMsg (scrnIndex, X_WARNING, + "Option \"%s\" requires a frequency value\n", + p->name); + p->found = FALSE; + } + } case OPTV_FREQ: if (*s == '\0') { diff --git a/xserver/hw/xwin/winconfig.h b/xserver/hw/xwin/winconfig.h index 058884abc..4699ca8ef 100644 --- a/xserver/hw/xwin/winconfig.h +++ b/xserver/hw/xwin/winconfig.h @@ -256,6 +256,7 @@ typedef enum OPTV_ANYSTR, /* Any string, including an empty one */ OPTV_REAL, OPTV_BOOLEAN, + OPTV_PERCENT, OPTV_FREQ } OptionValueType; @@ -289,6 +290,7 @@ 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); #ifdef XWIN_XF86CONFIG XF86OptionPtr winFindOption (XF86OptionPtr list, const char *name); char *winFindOptionValue (XF86OptionPtr list, const char *name); diff --git a/xserver/hw/xwin/windialogs.c b/xserver/hw/xwin/windialogs.c index a8153535f..3ec9b78ff 100644 --- a/xserver/hw/xwin/windialogs.c +++ b/xserver/hw/xwin/windialogs.c @@ -365,7 +365,7 @@ winExitDlgProc (HWND hDialog, UINT message, /* Set the number of connected clients */ SetWindowText (GetDlgItem (hDialog, IDC_CLIENTS_CONNECTED), pszConnectedClients); - xfree (pszConnectedClients); + free(pszConnectedClients); } return TRUE; diff --git a/xserver/hw/xwin/winerror.c b/xserver/hw/xwin/winerror.c index 191b9a921..cb69c57c2 100644 --- a/xserver/hw/xwin/winerror.c +++ b/xserver/hw/xwin/winerror.c @@ -144,9 +144,7 @@ winMessageBoxF (const char *pszError, UINT uType, ...) MB_OK | uType); winMessageBoxF_Cleanup: - if (pszErrorF) - xfree (pszErrorF); - if (pszMsgBox) - xfree (pszMsgBox); + free(pszErrorF); + free(pszMsgBox); #undef MESSAGEBOXF } diff --git a/xserver/hw/xwin/winfillsp.c b/xserver/hw/xwin/winfillsp.c index 702f34f96..1e8e3e6f1 100644 --- a/xserver/hw/xwin/winfillsp.c +++ b/xserver/hw/xwin/winfillsp.c @@ -80,8 +80,8 @@ winFillSpansNativeGDI (DrawablePtr pDrawable, int fullX1, fullX2, fullY1; HRGN hrgn = NULL, combined = NULL; - nbox = REGION_NUM_RECTS (pClip); - pbox = REGION_RECTS (pClip); + nbox = RegionNumRects (pClip); + pbox = RegionRects (pClip); if (!nbox) return; @@ -97,7 +97,7 @@ winFillSpansNativeGDI (DrawablePtr pDrawable, pbox++; } - pextent = REGION_EXTENTS (pGC->pScreen, pClip); + pextent = RegionExtents(pClip); extentX1 = pextent->x1; extentY1 = pextent->y1; extentX2 = pextent->x2; diff --git a/xserver/hw/xwin/wingc.c b/xserver/hw/xwin/wingc.c index 1f3775263..196b5b5dd 100644 --- a/xserver/hw/xwin/wingc.c +++ b/xserver/hw/xwin/wingc.c @@ -210,7 +210,7 @@ winDestroyGCNativeGDI (GCPtr pGC) winScreenPriv(pGC->pScreen); if (pGC->freeCompClip) - REGION_DESTROY (pGC->pScreen, pGC->pCompositeClip); + RegionDestroy(pGC->pCompositeClip); /* Free the memory DC */ if (pGCPriv->hdcMem != NULL) diff --git a/xserver/hw/xwin/winglobals.c b/xserver/hw/xwin/winglobals.c index 926ce69b8..f3f01d7da 100644 --- a/xserver/hw/xwin/winglobals.c +++ b/xserver/hw/xwin/winglobals.c @@ -41,23 +41,16 @@ */ int g_iNumScreens = 0; -winScreenInfo g_ScreenInfo[MAXSCREENS]; -int g_iLastScreen = -1; +winScreenInfo * g_ScreenInfo = 0; #ifdef HAS_DEVWINDOWS int g_fdMessageQueue = WIN_FD_INVALID; #endif -static int g_iScreenPrivateKeyIndex; -DevPrivateKey g_iScreenPrivateKey = &g_iScreenPrivateKeyIndex; -static int g_iCmapPrivateKeyIndex; -DevPrivateKey g_iCmapPrivateKey = &g_iCmapPrivateKeyIndex; -static int g_iGCPrivateKeyIndex; -DevPrivateKey g_iGCPrivateKey = &g_iGCPrivateKeyIndex; -static int g_iPixmapPrivateKeyIndex; -DevPrivateKey g_iPixmapPrivateKey = &g_iPixmapPrivateKeyIndex; -static int g_iWindowPrivateKeyIndex; -DevPrivateKey g_iWindowPrivateKey = &g_iWindowPrivateKeyIndex; +DevPrivateKeyRec g_iScreenPrivateKeyRec; +DevPrivateKeyRec g_iCmapPrivateKeyRec; +DevPrivateKeyRec g_iGCPrivateKeyRec; +DevPrivateKeyRec g_iPixmapPrivateKeyRec; +DevPrivateKeyRec g_iWindowPrivateKeyRec; unsigned long g_ulServerGeneration = 0; -Bool g_fInitializedDefaultScreens = FALSE; DWORD g_dwEnginesSupported = 0; HINSTANCE g_hInstance = 0; HWND g_hDlgDepthChange = NULL; @@ -85,7 +78,7 @@ HWND g_hwndKeyboardFocus = NULL; Bool g_fNoHelpMessageBox = FALSE; Bool g_fSoftwareCursor = FALSE; Bool g_fSilentDupError = FALSE; - +Bool g_fNativeGl = FALSE; /* * Global variables for dynamically loaded libraries and diff --git a/xserver/hw/xwin/winkeybd.c b/xserver/hw/xwin/winkeybd.c index ad9e66a0b..6d91ce0d6 100644 --- a/xserver/hw/xwin/winkeybd.c +++ b/xserver/hw/xwin/winkeybd.c @@ -262,7 +262,7 @@ winRestoreModeKeyStates (void) /* Only process events if the rootwindow is mapped. The keyboard events * will cause segfaults otherwise */ - if (WindowTable && WindowTable[0] && WindowTable[0]->mapped == FALSE) + if (screenInfo.screens[0]->root && screenInfo.screens[0]->root->mapped == FALSE) processEvents = FALSE; /* Force to process all pending events in the mi event queue */ diff --git a/xserver/hw/xwin/winkeynames.h b/xserver/hw/xwin/winkeynames.h index 7c16337de..3d5938348 100644 --- a/xserver/hw/xwin/winkeynames.h +++ b/xserver/hw/xwin/winkeynames.h @@ -38,7 +38,6 @@ #define KanaMask Mod4Mask #define ScrollLockMask Mod5Mask -#define KeyPressed(k) (keyc->down[k >> 3] & (1 << (k & 7))) #define ModifierDown(k) ((keyc->state & (k)) == (k)) /* diff --git a/xserver/hw/xwin/winmultiwindowshape.c b/xserver/hw/xwin/winmultiwindowshape.c index 353235760..6b7042e09 100644 --- a/xserver/hw/xwin/winmultiwindowshape.c +++ b/xserver/hw/xwin/winmultiwindowshape.c @@ -41,17 +41,17 @@ */ void -winSetShapeMultiWindow (WindowPtr pWin) +winSetShapeMultiWindow (WindowPtr pWin, int kind) { ScreenPtr pScreen = pWin->drawable.pScreen; winScreenPriv(pScreen); #if CYGMULTIWINDOW_DEBUG - ErrorF ("winSetShapeMultiWindow - pWin: %08x\n", pWin); + ErrorF ("winSetShapeMultiWindow - pWin: %08x kind: %i\n", pWin, kind); #endif WIN_UNWRAP(SetShape); - (*pScreen->SetShape)(pWin); + (*pScreen->SetShape)(pWin, kind); WIN_WRAP(SetShape, winSetShapeMultiWindow); /* Update the Windows window's shape */ @@ -117,15 +117,12 @@ winReshapeMultiWindow (WindowPtr pWin) if (!wBoundingShape (pWin)) return; - REGION_NULL(pWin->drawable.pScreen, &rrNewShape); - REGION_COPY(pWin->drawable.pScreen, &rrNewShape, wBoundingShape(pWin)); - REGION_TRANSLATE(pWin->drawable.pScreen, - &rrNewShape, - pWin->borderWidth, - pWin->borderWidth); + RegionNull(&rrNewShape); + RegionCopy(&rrNewShape, wBoundingShape(pWin)); + RegionTranslate(&rrNewShape, pWin->borderWidth, pWin->borderWidth); - nRects = REGION_NUM_RECTS(&rrNewShape); - pShape = REGION_RECTS(&rrNewShape); + nRects = RegionNumRects(&rrNewShape); + pShape = RegionRects(&rrNewShape); /* Don't do anything if there are no rectangles in the region */ if (nRects > 0) @@ -205,7 +202,7 @@ winReshapeMultiWindow (WindowPtr pWin) pWinPriv->hRgn = hRgn; } - REGION_UNINIT(pWin->drawable.pScreen, &rrNewShape); + RegionUninit(&rrNewShape); return; } diff --git a/xserver/hw/xwin/winmultiwindowwindow.c b/xserver/hw/xwin/winmultiwindowwindow.c index 87ffc6d6b..95d9d71fc 100644 --- a/xserver/hw/xwin/winmultiwindowwindow.c +++ b/xserver/hw/xwin/winmultiwindowwindow.c @@ -47,6 +47,7 @@ extern HICON g_hIconX; extern HICON g_hSmallIconX; extern HWND g_hDlgDepthChange; +extern Bool g_fNativeGl; /* * Prototypes for local functions @@ -74,7 +75,7 @@ void winInitMultiWindowClass(void) { /* Setup our window class */ wcx.cbSize=sizeof(WNDCLASSEX); - wcx.style = CS_HREDRAW | CS_VREDRAW; + wcx.style = CS_HREDRAW | CS_VREDRAW | (g_fNativeGl ? CS_OWNDC : 0); wcx.lpfnWndProc = winTopLevelWindowProc; wcx.cbClsExtra = 0; wcx.cbWndExtra = 0; diff --git a/xserver/hw/xwin/winprefs.c b/xserver/hw/xwin/winprefs.c index 93901cac7..1996ef0ef 100644 --- a/xserver/hw/xwin/winprefs.c +++ b/xserver/hw/xwin/winprefs.c @@ -672,8 +672,7 @@ winOverrideIcon (unsigned long longWin) { free (res_name); free (res_class); - if (wmName) - free (wmName); + free(wmName); if (pref.icon[i].hicon) return pref.icon[i].hicon; @@ -691,8 +690,7 @@ winOverrideIcon (unsigned long longWin) /* Didn't find the icon, fail gracefully */ free (res_name); free (res_class); - if (wmName) - free (wmName); + free(wmName); return 0; } @@ -849,8 +847,7 @@ winOverrideStyle (unsigned long longpWin) { free (res_name); free (res_class); - if (wmName) - free (wmName); + free(wmName); if (pref.style[i].type) return pref.style[i].type; @@ -860,8 +857,7 @@ winOverrideStyle (unsigned long longpWin) /* Didn't find the style, fail gracefully */ free (res_name); free (res_class); - if (wmName) - free (wmName); + free(wmName); return STYLE_NONE; } diff --git a/xserver/hw/xwin/winpriv.h b/xserver/hw/xwin/winpriv.h deleted file mode 100644 index d4505c83e..000000000 --- a/xserver/hw/xwin/winpriv.h +++ /dev/null @@ -1,15 +0,0 @@ -/* - * Export window information for the Windows-OpenGL GLX implementation. - * - * Authors: Alexander Gottwald - */ -#include - -typedef struct -{ - HWND hwnd; - HRGN hrgn; - RECT rect; -} winWindowInfoRec, *winWindowInfoPtr; - -extern void winGetWindowInfo(WindowPtr pWin, winWindowInfoPtr pWinInfo); diff --git a/xserver/hw/xwin/winprocarg.c b/xserver/hw/xwin/winprocarg.c index 66da76f6c..66a0503f2 100644 --- a/xserver/hw/xwin/winprocarg.c +++ b/xserver/hw/xwin/winprocarg.c @@ -45,9 +45,7 @@ from The Open Group. */ extern int g_iNumScreens; -extern winScreenInfo g_ScreenInfo[]; -extern int g_iLastScreen; -extern Bool g_fInitializedDefaultScreens; +extern winScreenInfo * g_ScreenInfo; #ifdef XWIN_CLIPBOARD extern Bool g_fUnicodeClipboard; extern Bool g_fClipboard; @@ -64,6 +62,7 @@ extern Bool g_fKeyboardHookLL; extern Bool g_fNoHelpMessageBox; extern Bool g_fSoftwareCursor; extern Bool g_fSilentDupError; +extern Bool g_fNativeGl; /* globals required by callback function for monitor information */ struct GetMonitorInfoData { @@ -129,25 +128,25 @@ winLogVersionInfo (void); void OsVendorVErrorF (const char *pszFormat, va_list va_args); #endif -void -winInitializeDefaultScreens (void); - /* * Process arguments on the command line */ -void -winInitializeDefaultScreens (void) -{ - int i; - DWORD dwWidth, dwHeight; +static int iLastScreen = -1; +static winScreenInfo defaultScreenInfo; - /* Bail out early if default screens have already been initialized */ - if (g_fInitializedDefaultScreens) +static void +winInitializeScreenDefaults(void) +{ + DWORD dwWidth, dwHeight; + static Bool fInitializedScreenDefaults = FALSE; + + /* Bail out early if default screen has already been initialized */ + if (fInitializedScreenDefaults) return; /* Zero the memory used for storing the screen info */ - ZeroMemory (g_ScreenInfo, MAXSCREENS * sizeof (winScreenInfo)); + memset(&defaultScreenInfo, 0, sizeof(winScreenInfo)); /* Get default width and height */ /* @@ -157,62 +156,88 @@ winInitializeDefaultScreens (void) dwWidth = GetSystemMetrics (SM_CXSCREEN); dwHeight = GetSystemMetrics (SM_CYSCREEN); - winErrorFVerb (2, "winInitializeDefaultScreens - w %d h %d\n", + winErrorFVerb (2, "winInitializeScreenDefaults - w %d h %d\n", (int) dwWidth, (int) dwHeight); /* Set a default DPI, if no parameter was passed */ if (monitorResolution == 0) monitorResolution = WIN_DEFAULT_DPI; - for (i = 0; i < MAXSCREENS; ++i) - { - g_ScreenInfo[i].dwScreen = i; - g_ScreenInfo[i].dwWidth = dwWidth; - g_ScreenInfo[i].dwHeight = dwHeight; - g_ScreenInfo[i].dwUserWidth = dwWidth; - g_ScreenInfo[i].dwUserHeight = dwHeight; - g_ScreenInfo[i].fUserGaveHeightAndWidth - = WIN_DEFAULT_USER_GAVE_HEIGHT_AND_WIDTH; - g_ScreenInfo[i].fUserGavePosition = FALSE; - g_ScreenInfo[i].dwBPP = WIN_DEFAULT_BPP; - g_ScreenInfo[i].dwClipUpdatesNBoxes = WIN_DEFAULT_CLIP_UPDATES_NBOXES; + defaultScreenInfo.dwWidth = dwWidth; + defaultScreenInfo.dwHeight = dwHeight; + defaultScreenInfo.dwUserWidth = dwWidth; + defaultScreenInfo.dwUserHeight = dwHeight; + defaultScreenInfo.fUserGaveHeightAndWidth = WIN_DEFAULT_USER_GAVE_HEIGHT_AND_WIDTH; + defaultScreenInfo.fUserGavePosition = FALSE; + defaultScreenInfo.dwBPP = WIN_DEFAULT_BPP; + defaultScreenInfo.dwClipUpdatesNBoxes = WIN_DEFAULT_CLIP_UPDATES_NBOXES; #ifdef XWIN_EMULATEPSEUDO - g_ScreenInfo[i].fEmulatePseudo = WIN_DEFAULT_EMULATE_PSEUDO; + defaultScreenInfo.fEmulatePseudo = WIN_DEFAULT_EMULATE_PSEUDO; #endif - g_ScreenInfo[i].dwRefreshRate = WIN_DEFAULT_REFRESH; - g_ScreenInfo[i].pfb = NULL; - g_ScreenInfo[i].fFullScreen = FALSE; - g_ScreenInfo[i].fDecoration = TRUE; + defaultScreenInfo.dwRefreshRate = WIN_DEFAULT_REFRESH; + defaultScreenInfo.pfb = NULL; + defaultScreenInfo.fFullScreen = FALSE; + defaultScreenInfo.fDecoration = TRUE; #ifdef XWIN_MULTIWINDOWEXTWM - g_ScreenInfo[i].fMWExtWM = FALSE; - g_ScreenInfo[i].fInternalWM = FALSE; + defaultScreenInfo.fMWExtWM = FALSE; + defaultScreenInfo.fInternalWM = FALSE; #endif - g_ScreenInfo[i].fRootless = FALSE; + defaultScreenInfo.fRootless = FALSE; #ifdef XWIN_MULTIWINDOW - g_ScreenInfo[i].fMultiWindow = FALSE; + defaultScreenInfo.fMultiWindow = FALSE; #endif #if defined(XWIN_MULTIWINDOW) || defined(XWIN_MULTIWINDOWEXTWM) - g_ScreenInfo[i].fMultiMonitorOverride = FALSE; + defaultScreenInfo.fMultiMonitorOverride = FALSE; #endif - g_ScreenInfo[i].fMultipleMonitors = FALSE; - g_ScreenInfo[i].fLessPointer = FALSE; - g_ScreenInfo[i].fScrollbars = FALSE; - g_ScreenInfo[i].fNoTrayIcon = FALSE; - g_ScreenInfo[i].iE3BTimeout = WIN_E3B_OFF; - g_ScreenInfo[i].dwWidth_mm = (dwWidth / WIN_DEFAULT_DPI) - * 25.4; - g_ScreenInfo[i].dwHeight_mm = (dwHeight / WIN_DEFAULT_DPI) - * 25.4; - g_ScreenInfo[i].fUseWinKillKey = WIN_DEFAULT_WIN_KILL; - g_ScreenInfo[i].fUseUnixKillKey = WIN_DEFAULT_UNIX_KILL; - g_ScreenInfo[i].fIgnoreInput = FALSE; - g_ScreenInfo[i].fExplicitScreen = FALSE; + defaultScreenInfo.fMultipleMonitors = FALSE; + defaultScreenInfo.fLessPointer = FALSE; + defaultScreenInfo.fScrollbars = FALSE; + defaultScreenInfo.fNoTrayIcon = FALSE; + defaultScreenInfo.iE3BTimeout = WIN_E3B_OFF; + defaultScreenInfo.dwWidth_mm = (dwWidth / WIN_DEFAULT_DPI) * 25.4; + defaultScreenInfo.dwHeight_mm = (dwHeight / WIN_DEFAULT_DPI) * 25.4; + defaultScreenInfo.fUseWinKillKey = WIN_DEFAULT_WIN_KILL; + defaultScreenInfo.fUseUnixKillKey = WIN_DEFAULT_UNIX_KILL; + defaultScreenInfo.fIgnoreInput = FALSE; + defaultScreenInfo.fExplicitScreen = FALSE; + + /* Note that the default screen has been initialized */ + fInitializedScreenDefaults = TRUE; +} + +static void +winInitializeScreen(int i) +{ + winErrorFVerb (2, "winInitializeScreen - %d\n",i); + + /* Initialize default screen values, if needed */ + winInitializeScreenDefaults(); + + /* Copy the default screen info */ + g_ScreenInfo[i] = defaultScreenInfo; + + /* Set the screen number */ + g_ScreenInfo[i].dwScreen = i; +} + +void +winInitializeScreens(int maxscreens) +{ + int i; + winErrorFVerb (2, "winInitializeScreens - %i\n", maxscreens); + + if (maxscreens > g_iNumScreens) + { + /* Reallocate the memory for DDX-specific screen info */ + g_ScreenInfo = realloc(g_ScreenInfo, maxscreens * sizeof (winScreenInfo)); + + /* Set default values for any new screens */ + for (i = g_iNumScreens; i < maxscreens ; i++) + winInitializeScreen(i); + + /* Keep a count of the number of screens */ + g_iNumScreens = maxscreens; } - - /* Signal that the default screens have been initialized */ - g_fInitializedDefaultScreens = TRUE; - - winErrorFVerb (2, "winInitializeDefaultScreens - Returning\n"); } /* See Porting Layer Definition - p. 57 */ @@ -244,6 +269,7 @@ int ddxProcessArgument (int argc, char *argv[], int i) { static Bool s_fBeenHere = FALSE; + winScreenInfo *screenInfoPtr = NULL; /* Initialize once */ if (!s_fBeenHere) @@ -276,7 +302,7 @@ ddxProcessArgument (int argc, char *argv[], int i) */ winErrorFVerb (2, "ddxProcessArgument - Initializing default " "screens\n"); - winInitializeDefaultScreens (); + winInitializeScreenDefaults(); } } @@ -331,7 +357,7 @@ ddxProcessArgument (int argc, char *argv[], int i) nScreenNum = atoi (argv[i + 1]); /* Validate the specified screen number */ - if (nScreenNum < 0 || nScreenNum >= MAXSCREENS) + if (nScreenNum < 0) { ErrorF ("ddxProcessArgument - screen - Invalid screen number %d\n", nScreenNum); @@ -339,6 +365,14 @@ ddxProcessArgument (int argc, char *argv[], int i) return 0; } + /* + Initialize default values for any new screens + + Note that default values can't change after a -screen option is + seen, so it's safe to do this for each screen as it is introduced + */ + winInitializeScreens(nScreenNum+1); + /* look for @m where m is monitor number */ if (i + 2 < argc && 1 == sscanf(argv[i + 2], "@%d", (int *) &iMonitor)) @@ -505,14 +539,33 @@ ddxProcessArgument (int argc, char *argv[], int i) * before a screen number apply to all screens, whereas parameters * seen after a screen number apply to that screen number only. */ - g_iLastScreen = nScreenNum; - - /* Keep a count of the number of screens */ - ++g_iNumScreens; + iLastScreen = nScreenNum; return iArgsProcessed; } + + /* + * Is this parameter attached to a screen or global? + * + * If the parameter is for all screens (appears before + * any -screen option), store it in the default screen + * info + * + * If the parameter is for a single screen (appears + * after a -screen option), store it in the screen info + * for that screen + * + */ + if (iLastScreen == -1) + { + screenInfoPtr = &defaultScreenInfo; + } + else + { + screenInfoPtr = &(g_ScreenInfo[iLastScreen]); + } + /* * Look for the '-engine n' argument */ @@ -541,22 +594,7 @@ ddxProcessArgument (int argc, char *argv[], int i) return 0; } - /* Is this parameter attached to a screen or global? */ - if (-1 == g_iLastScreen) - { - int j; - - /* Parameter is for all screens */ - for (j = 0; j < MAXSCREENS; j++) - { - g_ScreenInfo[j].dwEnginePreferred = dwEngine; - } - } - else - { - /* Parameter is for a single screen */ - g_ScreenInfo[g_iLastScreen].dwEnginePreferred = dwEngine; - } + screenInfoPtr->dwEnginePreferred = dwEngine; /* Indicate that we have processed the argument */ return 2; @@ -567,30 +605,11 @@ ddxProcessArgument (int argc, char *argv[], int i) */ if (IS_OPTION ("-fullscreen")) { - /* Is this parameter attached to a screen or is it global? */ - if (-1 == g_iLastScreen) - { - int j; - - /* Parameter is for all screens */ - for (j = 0; j < MAXSCREENS; j++) - { #if defined(XWIN_MULTIWINDOW) || defined(XWIN_MULTIWINDOWEXTWM) - if (!g_ScreenInfo[j].fMultiMonitorOverride) - g_ScreenInfo[j].fMultipleMonitors = FALSE; + if (!screenInfoPtr->fMultiMonitorOverride) + screenInfoPtr->fMultipleMonitors = FALSE; #endif - g_ScreenInfo[j].fFullScreen = TRUE; - } - } - else - { - /* Parameter is for a single screen */ -#if defined(XWIN_MULTIWINDOW) || defined(XWIN_MULTIWINDOWEXTWM) - if (!g_ScreenInfo[g_iLastScreen].fMultiMonitorOverride) - g_ScreenInfo[g_iLastScreen].fMultipleMonitors = FALSE; -#endif - g_ScreenInfo[g_iLastScreen].fFullScreen = TRUE; - } + screenInfoPtr->fFullScreen = TRUE; /* Indicate that we have processed this argument */ return 1; @@ -601,22 +620,7 @@ ddxProcessArgument (int argc, char *argv[], int i) */ if (IS_OPTION ("-lesspointer")) { - /* Is this parameter attached to a screen or is it global? */ - if (-1 == g_iLastScreen) - { - int j; - - /* Parameter is for all screens */ - for (j = 0; j < MAXSCREENS; j++) - { - g_ScreenInfo[j].fLessPointer = TRUE; - } - } - else - { - /* Parameter is for a single screen */ - g_ScreenInfo[g_iLastScreen].fLessPointer = TRUE; - } + screenInfoPtr->fLessPointer = TRUE; /* Indicate that we have processed this argument */ return 1; @@ -627,30 +631,11 @@ ddxProcessArgument (int argc, char *argv[], int i) */ if (IS_OPTION ("-nodecoration")) { - /* Is this parameter attached to a screen or is it global? */ - if (-1 == g_iLastScreen) - { - int j; - - /* Parameter is for all screens */ - for (j = 0; j < MAXSCREENS; j++) - { #if defined(XWIN_MULTIWINDOW) || defined(XWIN_MULTIWINDOWEXTWM) - if (!g_ScreenInfo[j].fMultiMonitorOverride) - g_ScreenInfo[j].fMultipleMonitors = FALSE; + if (!screenInfoPtr->fMultiMonitorOverride) + screenInfoPtr->fMultipleMonitors = FALSE; #endif - g_ScreenInfo[j].fDecoration = FALSE; - } - } - else - { - /* Parameter is for a single screen */ -#if defined(XWIN_MULTIWINDOW) || defined(XWIN_MULTIWINDOWEXTWM) - if (!g_ScreenInfo[g_iLastScreen].fMultiMonitorOverride) - g_ScreenInfo[g_iLastScreen].fMultipleMonitors = FALSE; -#endif - g_ScreenInfo[g_iLastScreen].fDecoration = FALSE; - } + screenInfoPtr->fDecoration = FALSE; /* Indicate that we have processed this argument */ return 1; @@ -662,26 +647,9 @@ ddxProcessArgument (int argc, char *argv[], int i) */ if (IS_OPTION ("-mwextwm")) { - /* Is this parameter attached to a screen or is it global? */ - if (-1 == g_iLastScreen) - { - int j; - - /* Parameter is for all screens */ - for (j = 0; j < MAXSCREENS; j++) - { - if (!g_ScreenInfo[j].fMultiMonitorOverride) - g_ScreenInfo[j].fMultipleMonitors = TRUE; - g_ScreenInfo[j].fMWExtWM = TRUE; - } - } - else - { - /* Parameter is for a single screen */ - if (!g_ScreenInfo[g_iLastScreen].fMultiMonitorOverride) - g_ScreenInfo[g_iLastScreen].fMultipleMonitors = TRUE; - g_ScreenInfo[g_iLastScreen].fMWExtWM = TRUE; - } + if (!screenInfoPtr->fMultiMonitorOverride) + screenInfoPtr->fMultipleMonitors = TRUE; + screenInfoPtr->fMWExtWM = TRUE; /* Indicate that we have processed this argument */ return 1; @@ -691,28 +659,10 @@ ddxProcessArgument (int argc, char *argv[], int i) */ if (IS_OPTION ("-internalwm")) { - /* Is this parameter attached to a screen or is it global? */ - if (-1 == g_iLastScreen) - { - int j; - - /* Parameter is for all screens */ - for (j = 0; j < MAXSCREENS; j++) - { - if (!g_ScreenInfo[j].fMultiMonitorOverride) - g_ScreenInfo[j].fMultipleMonitors = TRUE; - g_ScreenInfo[j].fMWExtWM = TRUE; - g_ScreenInfo[j].fInternalWM = TRUE; - } - } - else - { - /* Parameter is for a single screen */ - if (!g_ScreenInfo[g_iLastScreen].fMultiMonitorOverride) - g_ScreenInfo[g_iLastScreen].fMultipleMonitors = TRUE; - g_ScreenInfo[g_iLastScreen].fMWExtWM = TRUE; - g_ScreenInfo[g_iLastScreen].fInternalWM = TRUE; - } + if (!screenInfoPtr->fMultiMonitorOverride) + screenInfoPtr->fMultipleMonitors = TRUE; + screenInfoPtr->fMWExtWM = TRUE; + screenInfoPtr->fInternalWM = TRUE; /* Indicate that we have processed this argument */ return 1; @@ -724,30 +674,11 @@ ddxProcessArgument (int argc, char *argv[], int i) */ if (IS_OPTION ("-rootless")) { - /* Is this parameter attached to a screen or is it global? */ - if (-1 == g_iLastScreen) - { - int j; - - /* Parameter is for all screens */ - for (j = 0; j < MAXSCREENS; j++) - { #if defined(XWIN_MULTIWINDOW) || defined(XWIN_MULTIWINDOWEXTWM) - if (!g_ScreenInfo[j].fMultiMonitorOverride) - g_ScreenInfo[j].fMultipleMonitors = FALSE; + if (!screenInfoPtr->fMultiMonitorOverride) + screenInfoPtr->fMultipleMonitors = FALSE; #endif - g_ScreenInfo[j].fRootless = TRUE; - } - } - else - { - /* Parameter is for a single screen */ -#if defined(XWIN_MULTIWINDOW) || defined(XWIN_MULTIWINDOWEXTWM) - if (!g_ScreenInfo[g_iLastScreen].fMultiMonitorOverride) - g_ScreenInfo[g_iLastScreen].fMultipleMonitors = FALSE; -#endif - g_ScreenInfo[g_iLastScreen].fRootless = TRUE; - } + screenInfoPtr->fRootless = TRUE; /* Indicate that we have processed this argument */ return 1; @@ -759,30 +690,11 @@ ddxProcessArgument (int argc, char *argv[], int i) */ if (IS_OPTION ("-multiwindow")) { - /* Is this parameter attached to a screen or is it global? */ - if (-1 == g_iLastScreen) - { - int j; - - /* Parameter is for all screens */ - for (j = 0; j < MAXSCREENS; j++) - { #if defined(XWIN_MULTIWINDOW) || defined(XWIN_MULTIWINDOWEXTWM) - if (!g_ScreenInfo[j].fMultiMonitorOverride) - g_ScreenInfo[j].fMultipleMonitors = TRUE; + if (!screenInfoPtr->fMultiMonitorOverride) + screenInfoPtr->fMultipleMonitors = TRUE; #endif - g_ScreenInfo[j].fMultiWindow = TRUE; - } - } - else - { - /* Parameter is for a single screen */ -#if defined(XWIN_MULTIWINDOW) || defined(XWIN_MULTIWINDOWEXTWM) - if (!g_ScreenInfo[g_iLastScreen].fMultiMonitorOverride) - g_ScreenInfo[g_iLastScreen].fMultipleMonitors = TRUE; -#endif - g_ScreenInfo[g_iLastScreen].fMultiWindow = TRUE; - } + screenInfoPtr->fMultiWindow = TRUE; /* Indicate that we have processed this argument */ return 1; @@ -795,28 +707,10 @@ ddxProcessArgument (int argc, char *argv[], int i) if (IS_OPTION ("-multiplemonitors") || IS_OPTION ("-multimonitors")) { - /* Is this parameter attached to a screen or is it global? */ - if (-1 == g_iLastScreen) - { - int j; - - /* Parameter is for all screens */ - for (j = 0; j < MAXSCREENS; j++) - { #if defined(XWIN_MULTIWINDOW) || defined(XWIN_MULTIWINDOWEXTWM) - g_ScreenInfo[j].fMultiMonitorOverride = TRUE; + screenInfoPtr->fMultiMonitorOverride = TRUE; #endif - g_ScreenInfo[j].fMultipleMonitors = TRUE; - } - } - else - { - /* Parameter is for a single screen */ -#if defined(XWIN_MULTIWINDOW) || defined(XWIN_MULTIWINDOWEXTWM) - g_ScreenInfo[g_iLastScreen].fMultiMonitorOverride = TRUE; -#endif - g_ScreenInfo[g_iLastScreen].fMultipleMonitors = TRUE; - } + screenInfoPtr->fMultipleMonitors = TRUE; /* Indicate that we have processed this argument */ return 1; @@ -828,28 +722,10 @@ ddxProcessArgument (int argc, char *argv[], int i) if (IS_OPTION ("-nomultiplemonitors") || IS_OPTION ("-nomultimonitors")) { - /* Is this parameter attached to a screen or is it global? */ - if (-1 == g_iLastScreen) - { - int j; - - /* Parameter is for all screens */ - for (j = 0; j < MAXSCREENS; j++) - { #if defined(XWIN_MULTIWINDOW) || defined(XWIN_MULTIWINDOWEXTWM) - g_ScreenInfo[j].fMultiMonitorOverride = TRUE; + screenInfoPtr->fMultiMonitorOverride = TRUE; #endif - g_ScreenInfo[j].fMultipleMonitors = FALSE; - } - } - else - { - /* Parameter is for a single screen */ -#if defined(XWIN_MULTIWINDOW) || defined(XWIN_MULTIWINDOWEXTWM) - g_ScreenInfo[g_iLastScreen].fMultiMonitorOverride = TRUE; -#endif - g_ScreenInfo[g_iLastScreen].fMultipleMonitors = FALSE; - } + screenInfoPtr->fMultipleMonitors = FALSE; /* Indicate that we have processed this argument */ return 1; @@ -861,22 +737,7 @@ ddxProcessArgument (int argc, char *argv[], int i) */ if (IS_OPTION ("-scrollbars")) { - /* Is this parameter attached to a screen or is it global? */ - if (-1 == g_iLastScreen) - { - int j; - - /* Parameter is for all screens */ - for (j = 0; j < MAXSCREENS; j++) - { - g_ScreenInfo[j].fScrollbars = TRUE; - } - } - else - { - /* Parameter is for a single screen */ - g_ScreenInfo[g_iLastScreen].fScrollbars = TRUE; - } + screenInfoPtr->fScrollbars = TRUE; /* Indicate that we have processed this argument */ return 1; @@ -914,22 +775,7 @@ ddxProcessArgument (int argc, char *argv[], int i) */ if (IS_OPTION ("-ignoreinput")) { - /* Is this parameter attached to a screen or is it global? */ - if (-1 == g_iLastScreen) - { - int j; - - /* Parameter is for all screens */ - for (j = 0; j < MAXSCREENS; j++) - { - g_ScreenInfo[j].fIgnoreInput = TRUE; - } - } - else - { - /* Parameter is for a single screen */ - g_ScreenInfo[g_iLastScreen].fIgnoreInput = TRUE; - } + screenInfoPtr->fIgnoreInput = TRUE; /* Indicate that we have processed this argument */ return 1; @@ -962,22 +808,7 @@ ddxProcessArgument (int argc, char *argv[], int i) iE3BTimeout = WIN_DEFAULT_E3B_TIME; } - /* Is this parameter attached to a screen or is it global? */ - if (-1 == g_iLastScreen) - { - int j; - - /* Parameter is for all screens */ - for (j = 0; j < MAXSCREENS; j++) - { - g_ScreenInfo[j].iE3BTimeout = iE3BTimeout; - } - } - else - { - /* Parameter is for a single screen */ - g_ScreenInfo[g_iLastScreen].iE3BTimeout = iE3BTimeout; - } + screenInfoPtr->iE3BTimeout = iE3BTimeout; /* Indicate that we have processed this argument */ return iArgsProcessed; @@ -1000,23 +831,8 @@ ddxProcessArgument (int argc, char *argv[], int i) /* Grab the argument */ dwBPP = atoi (argv[i]); - /* Is this parameter attached to a screen or global? */ - if (-1 == g_iLastScreen) - { - int j; + screenInfoPtr->dwBPP = dwBPP; - /* Parameter is for all screens */ - for (j = 0; j < MAXSCREENS; j++) - { - g_ScreenInfo[j].dwBPP = dwBPP; - } - } - else - { - /* Parameter is for a single screen */ - g_ScreenInfo[g_iLastScreen].dwBPP = dwBPP; - } - /* Indicate that we have processed the argument */ return 2; } @@ -1038,23 +854,8 @@ ddxProcessArgument (int argc, char *argv[], int i) /* Grab the argument */ dwRefreshRate = atoi (argv[i]); - /* Is this parameter attached to a screen or global? */ - if (-1 == g_iLastScreen) - { - int j; + screenInfoPtr->dwRefreshRate = dwRefreshRate; - /* Parameter is for all screens */ - for (j = 0; j < MAXSCREENS; j++) - { - g_ScreenInfo[j].dwRefreshRate = dwRefreshRate; - } - } - else - { - /* Parameter is for a single screen */ - g_ScreenInfo[g_iLastScreen].dwRefreshRate = dwRefreshRate; - } - /* Indicate that we have processed the argument */ return 2; } @@ -1076,23 +877,8 @@ ddxProcessArgument (int argc, char *argv[], int i) /* Grab the argument */ dwNumBoxes = atoi (argv[i]); - /* Is this parameter attached to a screen or global? */ - if (-1 == g_iLastScreen) - { - int j; + screenInfoPtr->dwClipUpdatesNBoxes = dwNumBoxes; - /* Parameter is for all screens */ - for (j = 0; j < MAXSCREENS; j++) - { - g_ScreenInfo[j].dwClipUpdatesNBoxes = dwNumBoxes; - } - } - else - { - /* Parameter is for a single screen */ - g_ScreenInfo[g_iLastScreen].dwClipUpdatesNBoxes = dwNumBoxes; - } - /* Indicate that we have processed the argument */ return 2; } @@ -1103,22 +889,7 @@ ddxProcessArgument (int argc, char *argv[], int i) */ if (IS_OPTION ("-emulatepseudo")) { - /* Is this parameter attached to a screen or is it global? */ - if (-1 == g_iLastScreen) - { - int j; - - /* Parameter is for all screens */ - for (j = 0; j < MAXSCREENS; j++) - { - g_ScreenInfo[j].fEmulatePseudo = TRUE; - } - } - else - { - /* Parameter is for a single screen */ - g_ScreenInfo[g_iLastScreen].fEmulatePseudo = TRUE; - } + screenInfoPtr->fEmulatePseudo = TRUE; /* Indicate that we have processed this argument */ return 1; @@ -1130,22 +901,7 @@ ddxProcessArgument (int argc, char *argv[], int i) */ if (IS_OPTION ("-nowinkill")) { - /* Is this parameter attached to a screen or is it global? */ - if (-1 == g_iLastScreen) - { - int j; - - /* Parameter is for all screens */ - for (j = 0; j < MAXSCREENS; j++) - { - g_ScreenInfo[j].fUseWinKillKey = FALSE; - } - } - else - { - /* Parameter is for a single screen */ - g_ScreenInfo[g_iLastScreen].fUseWinKillKey = FALSE; - } + screenInfoPtr->fUseWinKillKey = FALSE; /* Indicate that we have processed this argument */ return 1; @@ -1156,22 +912,7 @@ ddxProcessArgument (int argc, char *argv[], int i) */ if (IS_OPTION ("-winkill")) { - /* Is this parameter attached to a screen or is it global? */ - if (-1 == g_iLastScreen) - { - int j; - - /* Parameter is for all screens */ - for (j = 0; j < MAXSCREENS; j++) - { - g_ScreenInfo[j].fUseWinKillKey = TRUE; - } - } - else - { - /* Parameter is for a single screen */ - g_ScreenInfo[g_iLastScreen].fUseWinKillKey = TRUE; - } + screenInfoPtr->fUseWinKillKey = TRUE; /* Indicate that we have processed this argument */ return 1; @@ -1182,22 +923,7 @@ ddxProcessArgument (int argc, char *argv[], int i) */ if (IS_OPTION ("-nounixkill")) { - /* Is this parameter attached to a screen or is it global? */ - if (-1 == g_iLastScreen) - { - int j; - - /* Parameter is for all screens */ - for (j = 0; j < MAXSCREENS; j++) - { - g_ScreenInfo[j].fUseUnixKillKey = FALSE; - } - } - else - { - /* Parameter is for a single screen */ - g_ScreenInfo[g_iLastScreen].fUseUnixKillKey = FALSE; - } + screenInfoPtr->fUseUnixKillKey = FALSE; /* Indicate that we have processed this argument */ return 1; @@ -1208,22 +934,7 @@ ddxProcessArgument (int argc, char *argv[], int i) */ if (IS_OPTION ("-unixkill")) { - /* Is this parameter attached to a screen or is it global? */ - if (-1 == g_iLastScreen) - { - int j; - - /* Parameter is for all screens */ - for (j = 0; j < MAXSCREENS; j++) - { - g_ScreenInfo[j].fUseUnixKillKey = TRUE; - } - } - else - { - /* Parameter is for a single screen */ - g_ScreenInfo[g_iLastScreen].fUseUnixKillKey = TRUE; - } + screenInfoPtr->fUseUnixKillKey = TRUE; /* Indicate that we have processed this argument */ return 1; @@ -1234,22 +945,7 @@ ddxProcessArgument (int argc, char *argv[], int i) */ if (IS_OPTION ("-notrayicon")) { - /* Is this parameter attached to a screen or is it global? */ - if (-1 == g_iLastScreen) - { - int j; - - /* Parameter is for all screens */ - for (j = 0; j < MAXSCREENS; j++) - { - g_ScreenInfo[j].fNoTrayIcon = TRUE; - } - } - else - { - /* Parameter is for a single screen */ - g_ScreenInfo[g_iLastScreen].fNoTrayIcon = TRUE; - } + screenInfoPtr->fNoTrayIcon = TRUE; /* Indicate that we have processed this argument */ return 1; @@ -1260,22 +956,7 @@ ddxProcessArgument (int argc, char *argv[], int i) */ if (IS_OPTION ("-trayicon")) { - /* Is this parameter attached to a screen or is it global? */ - if (-1 == g_iLastScreen) - { - int j; - - /* Parameter is for all screens */ - for (j = 0; j < MAXSCREENS; j++) - { - g_ScreenInfo[j].fNoTrayIcon = FALSE; - } - } - else - { - /* Parameter is for a single screen */ - g_ScreenInfo[g_iLastScreen].fNoTrayIcon = FALSE; - } + screenInfoPtr->fNoTrayIcon = FALSE; /* Indicate that we have processed this argument */ return 1; @@ -1464,6 +1145,19 @@ ddxProcessArgument (int argc, char *argv[], int i) g_fSilentDupError = TRUE; return 1; } + + if (IS_OPTION("-wgl")) + { + g_fNativeGl = TRUE; + return 1; + } + + if (IS_OPTION("-nowgl")) + { + g_fNativeGl = FALSE; + return 1; + } + return 0; } diff --git a/xserver/hw/xwin/winscrinit.c b/xserver/hw/xwin/winscrinit.c index c8cd64625..7add0e3f4 100644 --- a/xserver/hw/xwin/winscrinit.c +++ b/xserver/hw/xwin/winscrinit.c @@ -196,7 +196,7 @@ winScreenInit (int index, /* * In this case, some of the defaults set in - * winInitializeDefaultScreens () are not correct ... + * winInitializeScreenDefaults() are not correct ... */ if (!pScreenInfo->fUserGaveHeightAndWidth) { @@ -243,11 +243,11 @@ winScreenInit (int index, Note the screen origin in a normalized coordinate space where (0,0) is at the top left of the native virtual desktop area */ - dixScreenOrigins[index].x = pScreenInfo->dwInitialX - GetSystemMetrics(SM_XVIRTUALSCREEN); - dixScreenOrigins[index].y = pScreenInfo->dwInitialY - GetSystemMetrics(SM_YVIRTUALSCREEN); + pScreen->x = pScreenInfo->dwInitialX - GetSystemMetrics(SM_XVIRTUALSCREEN); + pScreen->y = pScreenInfo->dwInitialY - GetSystemMetrics(SM_YVIRTUALSCREEN); ErrorF("Screen %d added at virtual desktop coordinate (%d,%d).\n", - index, dixScreenOrigins[index].x, dixScreenOrigins[index].y); + index, pScreen->x, pScreen->y); #if CYGDEBUG || YES winDebug ("winScreenInit - returning\n"); @@ -390,14 +390,12 @@ winFinishScreenInitFB (int index, pScreen->blockData = pScreen; pScreen->wakeupData = pScreen; -#ifdef RENDER /* Render extension initialization, calls miPictureInit */ if (!fbPictureInit (pScreen, NULL, 0)) { ErrorF ("winFinishScreenInitFB - fbPictureInit () failed\n"); return FALSE; } -#endif #ifdef RANDR /* Initialize resize and rotate support */ diff --git a/xserver/hw/xwin/winsetsp.c b/xserver/hw/xwin/winsetsp.c index f894d6cda..d1bf90b57 100644 --- a/xserver/hw/xwin/winsetsp.c +++ b/xserver/hw/xwin/winsetsp.c @@ -54,8 +54,8 @@ winSetSpansNativeGDI (DrawablePtr pDrawable, int nbox; BoxPtr pbox; - nbox = REGION_NUM_RECTS (pGC->pCompositeClip); - pbox = REGION_RECTS (pGC->pCompositeClip); + nbox = RegionNumRects (pGC->pCompositeClip); + pbox = RegionRects (pGC->pCompositeClip); if (!nbox) return; diff --git a/xserver/hw/xwin/winshaddd.c b/xserver/hw/xwin/winshaddd.c index 85dc10f53..8dd1084e6 100644 --- a/xserver/hw/xwin/winshaddd.c +++ b/xserver/hw/xwin/winshaddd.c @@ -525,8 +525,8 @@ winShadowUpdateDD (ScreenPtr pScreen, HRESULT ddrval = DD_OK; RECT rcDest, rcSrc; POINT ptOrigin; - DWORD dwBox = REGION_NUM_RECTS (damage); - BoxPtr pBox = REGION_RECTS (damage); + DWORD dwBox = RegionNumRects (damage); + BoxPtr pBox = RegionRects (damage); HRGN hrgnTemp = NULL, hrgnCombined = NULL; /* @@ -588,7 +588,7 @@ winShadowUpdateDD (ScreenPtr pScreen, } else { - BoxPtr pBoxExtents = REGION_EXTENTS (pScreen, damage); + BoxPtr pBoxExtents = RegionExtents(damage); /* Compute a GDI region from the damaged region */ hrgnCombined = CreateRectRgn (pBox->x1, pBox->y1, pBox->x2, pBox->y2); diff --git a/xserver/hw/xwin/winshadddnl.c b/xserver/hw/xwin/winshadddnl.c index e78fbd9e6..5ca3e4f62 100644 --- a/xserver/hw/xwin/winshadddnl.c +++ b/xserver/hw/xwin/winshadddnl.c @@ -601,8 +601,8 @@ winShadowUpdateDDNL (ScreenPtr pScreen, HRESULT ddrval = DD_OK; RECT rcDest, rcSrc; POINT ptOrigin; - DWORD dwBox = REGION_NUM_RECTS (damage); - BoxPtr pBox = REGION_RECTS (damage); + DWORD dwBox = RegionNumRects (damage); + BoxPtr pBox = RegionRects (damage); HRGN hrgnTemp = NULL, hrgnCombined = NULL; /* @@ -677,7 +677,7 @@ winShadowUpdateDDNL (ScreenPtr pScreen, } else { - BoxPtr pBoxExtents = REGION_EXTENTS (pScreen, damage); + BoxPtr pBoxExtents = RegionExtents(damage); /* Compute a GDI region from the damaged region */ hrgnCombined = CreateRectRgn (pBox->x1, pBox->y1, pBox->x2, pBox->y2); diff --git a/xserver/hw/xwin/winshadgdi.c b/xserver/hw/xwin/winshadgdi.c index d38e4f76b..96d149c2b 100644 --- a/xserver/hw/xwin/winshadgdi.c +++ b/xserver/hw/xwin/winshadgdi.c @@ -499,8 +499,8 @@ winShadowUpdateGDI (ScreenPtr pScreen, winScreenPriv(pScreen); winScreenInfo *pScreenInfo = pScreenPriv->pScreenInfo; RegionPtr damage = shadowDamage(pBuf); - DWORD dwBox = REGION_NUM_RECTS (damage); - BoxPtr pBox = REGION_RECTS (damage); + DWORD dwBox = RegionNumRects (damage); + BoxPtr pBox = RegionRects (damage); int x, y, w, h; HRGN hrgnTemp = NULL, hrgnCombined = NULL; #ifdef XWIN_UPDATESTATS @@ -508,7 +508,7 @@ winShadowUpdateGDI (ScreenPtr pScreen, static DWORD s_dwTotalUpdates = 0; static DWORD s_dwTotalBoxes = 0; #endif - BoxPtr pBoxExtents = REGION_EXTENTS (pScreen, damage); + BoxPtr pBoxExtents = RegionExtents(damage); /* * Return immediately if the app is not active diff --git a/xserver/hw/xwin/winvalargs.c b/xserver/hw/xwin/winvalargs.c index 038e097a5..6f8d1c994 100644 --- a/xserver/hw/xwin/winvalargs.c +++ b/xserver/hw/xwin/winvalargs.c @@ -40,17 +40,24 @@ */ extern int g_iNumScreens; -extern winScreenInfo g_ScreenInfo[]; +extern winScreenInfo * g_ScreenInfo; extern Bool g_fXdmcpEnabled; /* - * Prototypes + * Verify all screens have been explicitly specified */ +static BOOL +isEveryScreenExplicit(void) +{ + int i; -Bool -winValidateArgs (void); + for (i = 0; i < g_iNumScreens; i++) + if (!g_ScreenInfo[i].fExplicitScreen) + return FALSE; + return TRUE; +} /* * winValidateArgs - Look for invalid argument combinations @@ -62,6 +69,7 @@ winValidateArgs (void) int i; int iMaxConsecutiveScreen = 0; BOOL fHasNormalScreen0 = FALSE; + BOOL fImplicitScreenFound = FALSE; /* * Check for a malformed set of -screen parameters. @@ -70,23 +78,14 @@ winValidateArgs (void) * XWin -screen 0 -screen 2 * XWin -screen 1 -screen 2 */ - for (i = 0; i < MAXSCREENS; i++) - { - if (g_ScreenInfo[i].fExplicitScreen) - iMaxConsecutiveScreen = i + 1; - } - winErrorFVerb (2, "winValidateArgs - g_iNumScreens: %d " - "iMaxConsecutiveScreen: %d\n", - g_iNumScreens, iMaxConsecutiveScreen); - if (g_iNumScreens < iMaxConsecutiveScreen) + if (!isEveryScreenExplicit()) { ErrorF ("winValidateArgs - Malformed set of screen parameter(s). " "Screens must be specified consecutively starting with " "screen 0. That is, you cannot have only a screen 1, nor " "could you have screen 0 and screen 2. You instead must " - "have screen 0, or screen 0 and screen 1, respectively. Of " - "you can specify as many screens as you want from 0 up to " - "%d.\n", MAXSCREENS - 1); + "have screen 0, or screen 0 and screen 1, respectively. " + "You can specify as many screens as you want.\n"); return FALSE; } diff --git a/xserver/hw/xwin/winvideo.c b/xserver/hw/xwin/winvideo.c index 529ca76d3..0438e5f54 100644 --- a/xserver/hw/xwin/winvideo.c +++ b/xserver/hw/xwin/winvideo.c @@ -143,7 +143,7 @@ winSetupImageVideo (ScreenPtr pScreen) #endif XF86VideoAdaptorPtr adapt; - if (!(adapt = xcalloc (1, sizeof(XF86VideoAdaptorRec)))) + if (!(adapt = calloc(1, sizeof(XF86VideoAdaptorRec)))) return NULL; adapt->type = XvWindowMask | XvInputMask | XvImageMask; @@ -185,7 +185,7 @@ winSetupImageVideo (ScreenPtr pScreen) #if 0 /* gotta uninit this someplace */ - REGION_NULL(pScreen, &pPriv->clip); + RegionNull(&pPriv->clip); #endif #if 0 diff --git a/xserver/hw/xwin/winwin32rootless.c b/xserver/hw/xwin/winwin32rootless.c index c225a4495..9749861fd 100644 --- a/xserver/hw/xwin/winwin32rootless.c +++ b/xserver/hw/xwin/winwin32rootless.c @@ -150,8 +150,8 @@ winMWExtWMCreateRgnFromRegion (RegionPtr pShape) if (pShape == NULL) return NULL; - nRects = REGION_NUM_RECTS(pShape); - pRects = REGION_RECTS(pShape); + nRects = RegionNumRects(pShape); + pRects = RegionRects(pShape); hRgn = CreateRectRgn (0, 0, 0, 0); if (hRgn == NULL) diff --git a/xserver/hw/xwin/winwin32rootlesswindow.c b/xserver/hw/xwin/winwin32rootlesswindow.c index 3a49ead69..214e8954b 100644 --- a/xserver/hw/xwin/winwin32rootlesswindow.c +++ b/xserver/hw/xwin/winwin32rootlesswindow.c @@ -407,7 +407,7 @@ void winMWExtWMRestackWindows (ScreenPtr pScreen) { winScreenPriv(pScreen); - WindowPtr pRoot = WindowTable[pScreen->myNum]; + WindowPtr pRoot = pScreen->root; WindowPtr pWin = NULL; WindowPtr pWinPrev = NULL; win32RootlessWindowPtr pRLWin = NULL; diff --git a/xserver/hw/xwin/winwindow.c b/xserver/hw/xwin/winwindow.c index 0e75a2c6a..783760f4b 100644 --- a/xserver/hw/xwin/winwindow.c +++ b/xserver/hw/xwin/winwindow.c @@ -144,28 +144,28 @@ winCopyWindowNativeGDI (WindowPtr pWin, #endif /* Get a pointer to the root window */ - pwinRoot = WindowTable[pWin->drawable.pScreen->myNum]; + pwinRoot = pWin->drawable.pScreen->root; /* Create a region for the destination */ - prgnDst = REGION_CREATE(pWin->drawable.pScreen, NULL, 1); + prgnDst = RegionCreate(NULL, 1); /* Calculate the shift from the source to the destination */ dx = ptOldOrg.x - pWin->drawable.x; dy = ptOldOrg.y - pWin->drawable.y; /* Translate the region from the destination to the source? */ - REGION_TRANSLATE(pWin->drawable.pScreen, prgnSrc, -dx, -dy); - REGION_INTERSECT(pWin->drawable.pScreen, prgnDst, &pWin->borderClip, + RegionTranslate(prgnSrc, -dx, -dy); + RegionIntersect(prgnDst, &pWin->borderClip, prgnSrc); /* Get a pointer to the first box in the region to be copied */ - pBox = REGION_RECTS(prgnDst); + pBox = RegionRects(prgnDst); /* Get the number of boxes in the region */ - nbox = REGION_NUM_RECTS(prgnDst); + nbox = RegionNumRects(prgnDst); /* Allocate source points for each box */ - if(!(pptSrc = (DDXPointPtr )xalloc(nbox * sizeof(DDXPointRec)))) + if(!(pptSrc = (DDXPointPtr )malloc(nbox * sizeof(DDXPointRec)))) return; /* Set an iterator pointer */ @@ -179,7 +179,7 @@ winCopyWindowNativeGDI (WindowPtr pWin, } /* Setup loop pointers again */ - pBoxDst = REGION_RECTS(prgnDst); + pBoxDst = RegionRects(prgnDst); ppt = pptSrc; #if 0 @@ -204,8 +204,8 @@ winCopyWindowNativeGDI (WindowPtr pWin, } /* Cleanup the regions, etc. */ - xfree(pptSrc); - REGION_DESTROY(pWin->drawable.pScreen, prgnDst); + free(pptSrc); + RegionDestroy(prgnDst); } @@ -451,17 +451,17 @@ winMapWindowRootless (WindowPtr pWin) void -winSetShapeRootless (WindowPtr pWin) +winSetShapeRootless (WindowPtr pWin, int kind) { ScreenPtr pScreen = pWin->drawable.pScreen; winScreenPriv(pScreen); #if CYGDEBUG - winTrace ("winSetShapeRootless (%p)\n", pWin); + winTrace ("winSetShapeRootless (%p, %i)\n", pWin, kind); #endif WIN_UNWRAP(SetShape); - (*pScreen->SetShape)(pWin); + (*pScreen->SetShape)(pWin, kind); WIN_WRAP(SetShape, winSetShapeRootless); winReshapeRootless (pWin); @@ -564,7 +564,6 @@ void winReshapeRootless (WindowPtr pWin) { int nRects; - /* ScreenPtr pScreen = pWin->drawable.pScreen;*/ RegionRec rrNewShape; BoxPtr pShape, pRects, pEnd; HRGN hRgn, hRgnRect; @@ -593,13 +592,13 @@ winReshapeRootless (WindowPtr pWin) if (!wBoundingShape (pWin)) return; - REGION_NULL(pScreen, &rrNewShape); - REGION_COPY(pScreen, &rrNewShape, wBoundingShape(pWin)); - REGION_TRANSLATE(pScreen, &rrNewShape, pWin->borderWidth, + RegionNull(&rrNewShape); + RegionCopy(&rrNewShape, wBoundingShape(pWin)); + RegionTranslate(&rrNewShape, pWin->borderWidth, pWin->borderWidth); - nRects = REGION_NUM_RECTS(&rrNewShape); - pShape = REGION_RECTS(&rrNewShape); + nRects = RegionNumRects(&rrNewShape); + pShape = RegionRects(&rrNewShape); if (nRects > 0) { @@ -631,7 +630,7 @@ winReshapeRootless (WindowPtr pWin) pWinPriv->hRgn = hRgn; } - REGION_UNINIT(pScreen, &rrNewShape); + RegionUninit(&rrNewShape); return; } diff --git a/xserver/hw/xwin/winwindowswm.c b/xserver/hw/xwin/winwindowswm.c index 7dce7e379..34d7f4b5c 100644 --- a/xserver/hw/xwin/winwindowswm.c +++ b/xserver/hw/xwin/winwindowswm.c @@ -124,7 +124,7 @@ ProcWindowsWMQueryVersion(register ClientPtr client) swapl(&rep.length, n); } WriteToClient(client, sizeof(xWindowsWMQueryVersionReply), (char *)&rep); - return (client->noClientException); + return Success; } @@ -164,7 +164,7 @@ WMFreeClient (pointer data, XID id) } updateEventMask (pHead); } - xfree ((pointer) pEvent); + free((pointer) pEvent); return 1; } @@ -179,9 +179,9 @@ WMFreeEvents (pointer data, XID id) { pNext = pCur->next; FreeResource (pCur->clientResource, ClientType); - xfree ((pointer) pCur); + free((pointer) pCur); } - xfree ((pointer) pHead); + free((pointer) pHead); eventMask = 0; return 1; } @@ -212,7 +212,7 @@ ProcWindowsWMSelectInput (register ClientPtr client) } /* build the entry */ - pNewEvent = (WMEventPtr) xalloc (sizeof (WMEventRec)); + pNewEvent = (WMEventPtr) malloc(sizeof (WMEventRec)); if (!pNewEvent) return BadAlloc; pNewEvent->next = 0; @@ -234,7 +234,7 @@ ProcWindowsWMSelectInput (register ClientPtr client) */ if (!pHead) { - pHead = (WMEventPtr *) xalloc (sizeof (WMEventPtr)); + pHead = (WMEventPtr *) malloc(sizeof (WMEventPtr)); if (!pHead || !AddResource (eventResource, eventResourceType, (pointer)pHead)) { @@ -266,7 +266,7 @@ ProcWindowsWMSelectInput (register ClientPtr client) pNewEvent->next = pEvent->next; else *pHead = pEvent->next; - xfree (pEvent); + free(pEvent); updateEventMask (pHead); } } @@ -304,8 +304,7 @@ winWindowsWMSendEvent (int type, unsigned int mask, int which, int arg, #if CYGMULTIWINDOW_DEBUG ErrorF ("winWindowsWMSendEvent - x%08x\n", (int) client); #endif - if ((pEvent->mask & mask) == 0 - || client == serverClient || client->clientGone) + if ((pEvent->mask & mask) == 0) { continue; } @@ -320,7 +319,6 @@ winWindowsWMSendEvent (int type, unsigned int mask, int which, int arg, se.y = y; se.w = w; se.h = h; - se.sequenceNumber = client->sequence; se.time = currentTime.milliseconds; WriteEventsToClient (client, 1, (xEvent *) &se); } @@ -335,7 +333,7 @@ ProcWindowsWMDisableUpdate (register ClientPtr client) //winDisableUpdate(); - return (client->noClientException); + return Success; } static int @@ -345,7 +343,7 @@ ProcWindowsWMReenableUpdate (register ClientPtr client) //winEnableUpdate(); - return (client->noClientException); + return Success; } @@ -358,7 +356,7 @@ ProcWindowsWMSetFrontProcess (register ClientPtr client) //QuartzMessageMainThread(kWindowsSetFrontProcess, NULL, 0); - return (client->noClientException); + return Success; } @@ -414,7 +412,7 @@ ProcWindowsWMFrameGetRect (register ClientPtr client) #endif WriteToClient(client, sizeof(xWindowsWMFrameGetRectReply), (char *)&rep); - return (client->noClientException); + return Success; } @@ -427,7 +425,6 @@ ProcWindowsWMFrameDraw (register ClientPtr client) RECT rcNew; int nCmdShow, rc; RegionRec newShape; - ScreenPtr pScreen; REQUEST_SIZE_MATCH (xWindowsWMFrameDrawReq); @@ -493,21 +490,20 @@ ProcWindowsWMFrameDraw (register ClientPtr client) if (wBoundingShape(pWin) != NULL) { - pScreen = pWin->drawable.pScreen; /* wBoundingShape is relative to *inner* origin of window. Translate by borderWidth to get the outside-relative position. */ - REGION_NULL(pScreen, &newShape); - REGION_COPY(pScreen, &newShape, wBoundingShape(pWin)); - REGION_TRANSLATE(pScreen, &newShape, pWin->borderWidth, pWin->borderWidth); + RegionNull(&newShape); + RegionCopy(&newShape, wBoundingShape(pWin)); + RegionTranslate(&newShape, pWin->borderWidth, pWin->borderWidth); winMWExtWMReshapeFrame (pRLWinPriv, &newShape); - REGION_UNINIT(pScreen, &newShape); + RegionUninit(&newShape); } #if CYGMULTIWINDOW_DEBUG ErrorF ("ProcWindowsWMFrameDraw - done\n"); #endif - return (client->noClientException); + return Success; } static int @@ -566,7 +562,7 @@ ProcWindowsWMFrameSetTitle( ErrorF ("ProcWindowsWMFrameSetTitle - done\n"); #endif - return (client->noClientException); + return Success; } diff --git a/xserver/include/Makefile.am b/xserver/include/Makefile.am index eddc86cb3..e76de05c3 100644 --- a/xserver/include/Makefile.am +++ b/xserver/include/Makefile.am @@ -3,6 +3,7 @@ sdk_HEADERS = \ XIstubs.h \ bstore.h \ bstorestr.h \ + callback.h \ closestr.h \ closure.h \ colormap.h \ diff --git a/xserver/include/Makefile.in b/xserver/include/Makefile.in index 97d8a4877..6dc36fab3 100644 --- a/xserver/include/Makefile.in +++ b/xserver/include/Makefile.in @@ -63,9 +63,9 @@ am__vpath_adj = case $$p in \ am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; am__installdirs = "$(DESTDIR)$(sdkdir)" "$(DESTDIR)$(sdkdir)" nodist_sdkHEADERS_INSTALL = $(INSTALL_HEADER) -am__sdk_HEADERS_DIST = XIstubs.h bstore.h bstorestr.h closestr.h \ - closure.h colormap.h colormapst.h hotplug.h cursor.h \ - cursorstr.h dix.h dixaccess.h dixevents.h dixfont.h \ +am__sdk_HEADERS_DIST = XIstubs.h bstore.h bstorestr.h callback.h \ + closestr.h closure.h colormap.h colormapst.h hotplug.h \ + cursor.h cursorstr.h dix.h dixaccess.h dixevents.h dixfont.h \ dixfontstr.h dixgrabs.h dixstruct.h events.h exevents.h \ extension.h extinit.h extnsionst.h gc.h gcstruct.h globals.h \ input.h inputstr.h list.h misc.h miscstruct.h opaque.h os.h \ @@ -116,10 +116,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -207,6 +203,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -221,6 +219,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -238,10 +237,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -297,10 +300,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -318,17 +322,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -355,20 +353,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -460,6 +461,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ @@ -609,6 +611,7 @@ target_alias = @target_alias@ @XORG_TRUE@ XIstubs.h \ @XORG_TRUE@ bstore.h \ @XORG_TRUE@ bstorestr.h \ +@XORG_TRUE@ callback.h \ @XORG_TRUE@ closestr.h \ @XORG_TRUE@ closure.h \ @XORG_TRUE@ colormap.h \ diff --git a/xserver/include/callback.h b/xserver/include/callback.h new file mode 100644 index 000000000..632ed4f32 --- /dev/null +++ b/xserver/include/callback.h @@ -0,0 +1,87 @@ +/*********************************************************** + +Copyright 1987, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + + +Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts. + + All Rights Reserved + +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both that copyright notice and this permission notice appear in +supporting documentation, and that the name of Digital not be +used in advertising or publicity pertaining to distribution of the +software without specific, written prior permission. + +DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING +ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL +DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR +ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS +SOFTWARE. + +******************************************************************/ + +#ifndef CALLBACK_H +#define CALLBACK_H + +#include /* for GContext, Mask */ +#include /* for Bool */ +#include +#include + +/* + * callback manager stuff + */ + +#ifndef _XTYPEDEF_CALLBACKLISTPTR +typedef struct _CallbackList *CallbackListPtr; /* also in misc.h */ +#define _XTYPEDEF_CALLBACKLISTPTR +#endif + +typedef void (*CallbackProcPtr) ( + CallbackListPtr *, pointer, pointer); + +extern _X_EXPORT Bool AddCallback( + CallbackListPtr * /*pcbl*/, + CallbackProcPtr /*callback*/, + pointer /*data*/); + +extern _X_EXPORT Bool DeleteCallback( + CallbackListPtr * /*pcbl*/, + CallbackProcPtr /*callback*/, + pointer /*data*/); + +extern _X_EXPORT void CallCallbacks( + CallbackListPtr * /*pcbl*/, + pointer /*call_data*/); + +extern _X_EXPORT void DeleteCallbackList( + CallbackListPtr * /*pcbl*/); + +extern _X_EXPORT void InitCallbackManager(void); + +#endif /* CALLBACK_H */ diff --git a/xserver/include/closestr.h b/xserver/include/closestr.h index 2cd67b1d3..7ca2613e7 100644 --- a/xserver/include/closestr.h +++ b/xserver/include/closestr.h @@ -46,7 +46,6 @@ typedef struct _OFclosure { short num_fpes; FontPathElementPtr *fpe_list; Mask flags; - Bool slept; /* XXX -- get these from request buffer instead? */ char *origFontName; @@ -79,7 +78,6 @@ typedef struct _LFWIclosure { LFWIstateRec saved; int savedNumFonts; Bool haveSaved; - Bool slept; char *savedName; } LFWIclosureRec; @@ -93,7 +91,6 @@ typedef struct _LFclosure { LFWIstateRec current; LFWIstateRec saved; Bool haveSaved; - Bool slept; char *savedName; int savedNameLen; } LFclosureRec; @@ -124,7 +121,6 @@ typedef struct _PTclosure { int itemSize; XID did; int err; - Bool slept; } PTclosureRec; /* ImageText */ @@ -151,6 +147,5 @@ typedef struct _ITclosure { ImageTextPtr imageText; int itemSize; XID did; - Bool slept; } ITclosureRec; #endif /* CLOSESTR_H */ diff --git a/xserver/include/colormap.h b/xserver/include/colormap.h index de48ce8d8..1b1574839 100644 --- a/xserver/include/colormap.h +++ b/xserver/include/colormap.h @@ -135,7 +135,8 @@ extern _X_EXPORT int QueryColors( ColormapPtr /*pmap*/, int /*count*/, Pixel* /*ppixIn*/, - xrgb* /*prgbList*/); + xrgb* /*prgbList*/, + ClientPtr client); extern _X_EXPORT int FreeClientPixels( pointer /*pcr*/, @@ -173,7 +174,8 @@ extern _X_EXPORT int FreeColors( extern _X_EXPORT int StoreColors( ColormapPtr /*pmap*/, int /*count*/, - xColorItem* /*defs*/); + xColorItem* /*defs*/, + ClientPtr client); extern _X_EXPORT int IsMapInstalled( Colormap /*map*/, diff --git a/xserver/include/cursor.h b/xserver/include/cursor.h index acc95c3b3..59978d4ca 100644 --- a/xserver/include/cursor.h +++ b/xserver/include/cursor.h @@ -51,20 +51,19 @@ SOFTWARE. #include "misc.h" #include "screenint.h" #include "window.h" +#include "privates.h" #define NullCursor ((CursorPtr)NULL) /* Provide support for alpha composited cursors */ -#ifdef RENDER #define ARGB_CURSOR -#endif struct _DeviceIntRec; typedef struct _Cursor *CursorPtr; typedef struct _CursorMetric *CursorMetricPtr; -extern _X_EXPORT int cursorScreenDevPriv[MAXSCREENS]; +extern _X_EXPORT DevPrivateKeyRec cursorScreenDevPriv[MAXSCREENS]; #define CursorScreenKey(pScreen) (cursorScreenDevPriv + (pScreen)->myNum) extern _X_EXPORT CursorPtr rootCursor; diff --git a/xserver/include/cursorstr.h b/xserver/include/cursorstr.h index 3ff56e2bf..6a4d0db52 100644 --- a/xserver/include/cursorstr.h +++ b/xserver/include/cursorstr.h @@ -70,6 +70,8 @@ typedef struct _CursorBits { #endif } CursorBits, *CursorBitsPtr; +#define CURSOR_BITS_SIZE (sizeof(CursorBits) + dixPrivatesSize(PRIVATE_CURSOR_BITS)) + typedef struct _Cursor { CursorBitsPtr bits; unsigned short foreRed, foreGreen, foreBlue; /* device-independent color */ @@ -83,6 +85,8 @@ typedef struct _Cursor { #endif } CursorRec; +#define CURSOR_REC_SIZE (sizeof(CursorRec) + dixPrivatesSize(PRIVATE_CURSOR)) + typedef struct _CursorMetric { unsigned short width, height, xhot, yhot; } CursorMetricRec; diff --git a/xserver/include/dix-config.h.in b/xserver/include/dix-config.h.in index 1f39092e1..a618f94b4 100644 --- a/xserver/include/dix-config.h.in +++ b/xserver/include/dix-config.h.in @@ -222,6 +222,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_UTSNAME_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_VM86_H @@ -360,9 +363,6 @@ /* Support Xv extension */ #undef XV -/* Build Multibuffer extension */ -#undef MULTIBUFFER - /* Support DRI extension */ #undef XF86DRI @@ -411,9 +411,6 @@ /* Support HAL for hotplug */ #undef CONFIG_HAL -/* Use only built-in fonts */ -#undef BUILTIN_FONTS - /* Have a monotonic clock from clock_gettime() */ #undef MONOTONIC_CLOCK diff --git a/xserver/include/dix.h b/xserver/include/dix.h index 19108b143..dce6ec991 100644 --- a/xserver/include/dix.h +++ b/xserver/include/dix.h @@ -48,6 +48,7 @@ SOFTWARE. #ifndef DIX_H #define DIX_H +#include "callback.h" #include "gc.h" #include "window.h" #include "input.h" @@ -82,7 +83,7 @@ SOFTWARE. if (!LegalNewID(id,client)) \ {\ client->errorValue = id;\ - return(BadIDChoice);\ + return BadIDChoice;\ } #define VALIDATE_DRAWABLE_AND_GC(drawID, pDraw, mode)\ @@ -94,7 +95,7 @@ SOFTWARE. if (rc != Success)\ return rc;\ if ((pGC->depth != pDraw->depth) || (pGC->pScreen != pDraw->pScreen))\ - return (BadMatch);\ + return BadMatch;\ }\ if (pGC->serialNumber != pDraw->serialNumber)\ ValidateGC(pDraw, pGC); @@ -198,6 +199,12 @@ extern _X_EXPORT int dixLookupGC( ClientPtr client, Mask access_mode); +extern _X_EXPORT int dixLookupFontable( + FontPtr *result, + XID id, + ClientPtr client, + Mask access_mode); + extern _X_EXPORT int dixLookupClient( ClientPtr *result, XID id, @@ -293,7 +300,7 @@ extern _X_EXPORT Bool ValidAtom( extern _X_EXPORT const char *NameForAtom( Atom /*atom*/); -extern _X_EXPORT void AtomError(void); +extern _X_EXPORT void AtomError(void) _X_NORETURN; extern _X_EXPORT void FreeAllAtoms(void); @@ -512,36 +519,6 @@ ScreenRestructured (ScreenPtr pScreen); extern _X_EXPORT int ffs(int i); -/* - * callback manager stuff - */ - -#ifndef _XTYPEDEF_CALLBACKLISTPTR -typedef struct _CallbackList *CallbackListPtr; /* also in misc.h */ -#define _XTYPEDEF_CALLBACKLISTPTR -#endif - -typedef void (*CallbackProcPtr) ( - CallbackListPtr *, pointer, pointer); - -extern _X_EXPORT Bool AddCallback( - CallbackListPtr * /*pcbl*/, - CallbackProcPtr /*callback*/, - pointer /*data*/); - -extern _X_EXPORT Bool DeleteCallback( - CallbackListPtr * /*pcbl*/, - CallbackProcPtr /*callback*/, - pointer /*data*/); - -extern _X_EXPORT void CallCallbacks( - CallbackListPtr * /*pcbl*/, - pointer /*call_data*/); - -extern _X_EXPORT void DeleteCallbackList( - CallbackListPtr * /*pcbl*/); - -extern _X_EXPORT void InitCallbackManager(void); /* * ServerGrabCallback stuff diff --git a/xserver/include/dixfont.h b/xserver/include/dixfont.h index e444a2024..617b94a22 100644 --- a/xserver/include/dixfont.h +++ b/xserver/include/dixfont.h @@ -96,8 +96,7 @@ extern _X_EXPORT int ImageText(ClientPtr /*client*/, extern _X_EXPORT int SetFontPath(ClientPtr /*client*/, int /*npaths*/, - unsigned char * /*paths*/, - int * /*error*/); + unsigned char * /*paths*/); extern _X_EXPORT int SetDefaultFontPath(char * /*path*/); @@ -142,10 +141,7 @@ extern _X_EXPORT void InitGlyphCaching(void); extern _X_EXPORT void SetGlyphCachingMode(int /*newmode*/); -/* - * libXfont/src/builtins/builtin.h - */ -extern _X_EXPORT void BuiltinRegisterFpeFunctions(void); +extern _X_EXPORT void register_fpe_functions(void); /* * libXfont stubs. diff --git a/xserver/include/dixstruct.h b/xserver/include/dixstruct.h index 696b793ff..efa2577f8 100644 --- a/xserver/include/dixstruct.h +++ b/xserver/include/dixstruct.h @@ -53,7 +53,7 @@ typedef void (*ReplySwapPtr) ( extern _X_EXPORT void ReplyNotSwappd ( ClientPtr /* pClient */, int /* size */, - void * /* pbuf */); + void * /* pbuf */) _X_NORETURN; typedef enum {ClientStateInitial, ClientStateAuthenticating, @@ -85,7 +85,6 @@ typedef struct _Window *SaveSetElt; #define SaveSetAssignMap(ss,m) #endif -/* The unused_ members are ABI spacing. Please reuse them. */ typedef struct _Client { int index; Mask clientAsMask; @@ -99,9 +98,9 @@ typedef struct _Client { int clientGone; int noClientException; /* this client died or needs to be * killed */ + int ignoreCount; /* count for Attend/IgnoreClient */ SaveSetElt *saveSet; int numSaved; - void *unused_screenPrivate[16]; int (**requestVector) ( ClientPtr /* pClient */); CARD32 req_len; /* length of current request */ @@ -116,8 +115,6 @@ typedef struct _Client { KeyCode minKC,maxKC; unsigned long replyBytesRemaining; - void *unused_appgroup; - void *unused_fontResFunc; int smart_priority; long smart_start_tick; long smart_stop_tick; diff --git a/xserver/include/do-not-use-config.h.in b/xserver/include/do-not-use-config.h.in index 801c03ede..11bd3b625 100644 --- a/xserver/include/do-not-use-config.h.in +++ b/xserver/include/do-not-use-config.h.in @@ -363,6 +363,9 @@ /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H +/* Define to 1 if you have the header file. */ +#undef HAVE_SYS_UTSNAME_H + /* Define to 1 if you have the header file. */ #undef HAVE_SYS_VM86_H @@ -414,9 +417,6 @@ /* Have monotonic clock from clock_gettime() */ #undef MONOTONIC_CLOCK -/* Build Multibuffer extension */ -#undef MULTIBUFFER - /* Do not have 'strcasecmp'. */ #undef NEED_STRCASECMP @@ -587,6 +587,9 @@ /* Version number of package */ #undef VERSION +/* Building with libdrm support */ +#undef WITH_LIBDRM + /* Building vgahw module */ #undef WITH_VGAHW diff --git a/xserver/include/extnsionst.h b/xserver/include/extnsionst.h index 19c76fcc4..bb66dfb6e 100644 --- a/xserver/include/extnsionst.h +++ b/xserver/include/extnsionst.h @@ -84,7 +84,7 @@ extern _X_EXPORT EventSwapPtr EventSwapVector[128]; extern _X_EXPORT void NotImplemented ( /* FIXME: this may move to another file... */ xEvent *, - xEvent *); + xEvent *) _X_NORETURN; #define SetGCVector(pGC, VectorElement, NewRoutineAddress, Atom) \ pGC->VectorElement = NewRoutineAddress; diff --git a/xserver/include/gc.h b/xserver/include/gc.h index e75cc5e83..63eecbd66 100644 --- a/xserver/include/gc.h +++ b/xserver/include/gc.h @@ -88,27 +88,21 @@ extern _X_EXPORT void ValidateGC( DrawablePtr /*pDraw*/, GCPtr /*pGC*/); -extern _X_EXPORT int ChangeGC( - GCPtr/*pGC*/, - BITS32 /*mask*/, - XID* /*pval*/); - -extern _X_EXPORT int DoChangeGC( - GCPtr/*pGC*/, - BITS32 /*mask*/, - XID* /*pval*/, - int /*fPointer*/); - typedef union { CARD32 val; pointer ptr; } ChangeGCVal, *ChangeGCValPtr; -extern _X_EXPORT int dixChangeGC( +extern int ChangeGCXIDs( + ClientPtr /*client*/, + GCPtr /*pGC*/, + BITS32 /*mask*/, + CARD32 * /*pval*/); + +extern _X_EXPORT int ChangeGC( ClientPtr /*client*/, GCPtr /*pGC*/, BITS32 /*mask*/, - CARD32 * /*pval*/, ChangeGCValPtr /*pCGCV*/); extern _X_EXPORT GCPtr CreateGC( diff --git a/xserver/include/gcstruct.h b/xserver/include/gcstruct.h index 8d9b05575..3f70eada4 100644 --- a/xserver/include/gcstruct.h +++ b/xserver/include/gcstruct.h @@ -59,6 +59,8 @@ SOFTWARE. #include "privates.h" #include +#define GCAllBits ((1 << (GCLastBit + 1)) - 1) + /* * functions which modify the state of the GC */ @@ -290,7 +292,8 @@ typedef struct _GC { unsigned int tileIsPixel:1; /* tile is solid pixel */ unsigned int fExpose:1; /* Call exposure handling */ unsigned int freeCompClip:1; /* Free composite clip */ - unsigned int unused:14; /* see comment above */ + unsigned int scratch_inuse:1; /* is this GC in a pool for reuse? */ + unsigned int unused:13; /* see comment above */ unsigned long planemask; unsigned long fgPixel; unsigned long bgPixel; diff --git a/xserver/include/globals.h b/xserver/include/globals.h index 52c19a490..8b80a652b 100644 --- a/xserver/include/globals.h +++ b/xserver/include/globals.h @@ -19,12 +19,9 @@ extern _X_EXPORT char *defaultFontPath; extern _X_EXPORT int monitorResolution; extern _X_EXPORT int defaultColorVisualClass; -extern _X_EXPORT WindowPtr WindowTable[MAXSCREENS]; extern _X_EXPORT int GrabInProgress; extern _X_EXPORT Bool noTestExtensions; -extern _X_EXPORT DDXPointRec dixScreenOrigins[MAXSCREENS]; - extern _X_EXPORT char *ConnectionInfo; #ifdef DPMSExtension @@ -69,17 +66,11 @@ extern _X_EXPORT Bool noScreenSaverExtension; extern _X_EXPORT Bool noMITShmExtension; #endif -#ifdef MULTIBUFFER -extern _X_EXPORT Bool noMultibufferExtension; -#endif - #ifdef RANDR extern _X_EXPORT Bool noRRExtension; #endif -#ifdef RENDER extern _X_EXPORT Bool noRenderExtension; -#endif #ifdef XCSECURITY extern _X_EXPORT Bool noSecurityExtension; diff --git a/xserver/include/input.h b/xserver/include/input.h index 63f981ef0..ffb1c33fa 100644 --- a/xserver/include/input.h +++ b/xserver/include/input.h @@ -215,6 +215,8 @@ typedef struct _InputAttributes { char *product; char *vendor; char *device; + char *pnp_id; + char *usb_id; char **tags; /* null-terminated */ uint32_t flags; } InputAttributes; @@ -226,14 +228,19 @@ typedef struct _InputAttributes { #define ATTR_TOUCHPAD (1<<4) #define ATTR_TOUCHSCREEN (1<<5) -/* Key has been run through all input processing and events sent to clients. */ +/* Key/Button has been run through all input processing and events sent to clients. */ #define KEY_PROCESSED 1 -/* Key has not been fully processed, no events have been sent. */ +#define BUTTON_PROCESSED 1 +/* Key/Button has not been fully processed, no events have been sent. */ #define KEY_POSTED 2 +#define BUTTON_POSTED 2 extern void set_key_down(DeviceIntPtr pDev, int key_code, int type); extern void set_key_up(DeviceIntPtr pDev, int key_code, int type); extern int key_is_down(DeviceIntPtr pDev, int key_code, int type); +extern void set_button_down(DeviceIntPtr pDev, int button, int type); +extern void set_button_up(DeviceIntPtr pDev, int button, int type); +extern int button_is_down(DeviceIntPtr pDev, int button, int type); extern void InitCoreDevices(void); extern void InitXTestDevices(void); @@ -432,6 +439,12 @@ extern void CreateClassesChangedEvent(EventListPtr event, DeviceIntPtr master, DeviceIntPtr slave, int type); +extern EventListPtr UpdateFromMaster( + EventListPtr events, + DeviceIntPtr pDev, + int type, + int *num_events); + extern _X_EXPORT int GetPointerEvents( EventListPtr events, DeviceIntPtr pDev, @@ -518,6 +531,8 @@ extern int AllocXTestDevice(ClientPtr client, extern BOOL IsXTestDevice(DeviceIntPtr dev, DeviceIntPtr master); extern DeviceIntPtr GetXTestDevice(DeviceIntPtr master); extern void SendDevicePresenceEvent(int deviceid, int type); +extern _X_EXPORT InputAttributes *DuplicateInputAttributes(InputAttributes *attrs); +extern _X_EXPORT void FreeInputAttributes(InputAttributes *attrs); /* misc event helpers */ extern Mask GetEventFilter(DeviceIntPtr dev, xEvent *event); diff --git a/xserver/include/inputstr.h b/xserver/include/inputstr.h index de4026cb7..1b504e939 100644 --- a/xserver/include/inputstr.h +++ b/xserver/include/inputstr.h @@ -49,6 +49,7 @@ SOFTWARE. #ifndef INPUTSTRUCT_H #define INPUTSTRUCT_H +#include #include "input.h" #include "window.h" #include "dixstruct.h" @@ -477,6 +478,14 @@ typedef struct _SpriteInfoRec { DeviceIntPtr paired; /* The paired device. Keyboard if spriteOwner is TRUE, otherwise the pointer that owns the sprite. */ + + /* keep states for animated cursor */ + struct { + CursorPtr pCursor; + ScreenPtr pScreen; + int elt; + CARD32 time; + } anim; } SpriteInfoRec, *SpriteInfoPtr; /* device types */ @@ -514,8 +523,9 @@ typedef struct _DeviceIntRec { LedFeedbackPtr leds; struct _XkbInterest *xkb_interest; char *config_info; /* used by the hotplug layer */ + ClassesPtr unused_classes; /* for master devices */ + int saved_master_id; /* for slaves while grabbed */ PrivateRec *devPrivates; - int nPrivates; DeviceUnwrapProc unwrapProc; SpriteInfoPtr spriteInfo; union { @@ -541,6 +551,12 @@ typedef struct _DeviceIntRec { XIPropertyPtr properties; XIPropertyHandlerPtr handlers; /* NULL-terminated */ } properties; + + /* coordinate transformation matrix for absolute input devices */ + struct pixman_f_transform transform; + + /* XTest related master device id */ + int xtest_master_id; } DeviceIntRec; typedef struct { diff --git a/xserver/include/list.h b/xserver/include/list.h index 89dc29dd0..4ce20a866 100644 --- a/xserver/include/list.h +++ b/xserver/include/list.h @@ -94,10 +94,10 @@ list_is_empty(struct list *head) &pos->member != (head); \ pos = __container_of(pos->member.next, pos, member)) -#define list_for_each_entry_safe(pos, next, head, member) \ +#define list_for_each_entry_safe(pos, tmp, head, member) \ for (pos = __container_of((head)->next, pos, member), \ - next = __container_of(pos->member.next, pos, member); \ + tmp = __container_of(pos->member.next, pos, member); \ &pos->member != (head); \ - pos = next, next = __container_of(next->member.next, next, member)) + pos = tmp, tmp = __container_of(pos->member.next, tmp, member)) #endif diff --git a/xserver/include/os.h b/xserver/include/os.h index b1c76ae06..8c59a4bf6 100644 --- a/xserver/include/os.h +++ b/xserver/include/os.h @@ -214,21 +214,58 @@ extern _X_EXPORT int set_font_authorizations( #ifndef _HAVE_XALLOC_DECLS #define _HAVE_XALLOC_DECLS -extern _X_EXPORT pointer Xalloc(unsigned long /*amount*/); -extern _X_EXPORT pointer Xcalloc(unsigned long /*amount*/); -extern _X_EXPORT pointer Xrealloc(pointer /*ptr*/, unsigned long /*amount*/); -extern _X_EXPORT void Xfree(pointer /*ptr*/); + +/* + * Use malloc(3) instead. + */ +extern _X_EXPORT void *Xalloc(unsigned long /*amount*/) _X_DEPRECATED; +/* + * Use calloc(3) instead + */ +extern _X_EXPORT void *Xcalloc(unsigned long /*amount*/) _X_DEPRECATED; +/* + * Use realloc(3) instead + */ +extern _X_EXPORT void *Xrealloc(void * /*ptr*/, unsigned long /*amount*/) + _X_DEPRECATED; +/* + * Use free(3) instead + */ +extern _X_EXPORT void Xfree(void * /*ptr*/) _X_DEPRECATED; + #endif -extern _X_EXPORT pointer XNFalloc(unsigned long /*amount*/); -extern _X_EXPORT pointer XNFcalloc(unsigned long /*amount*/); -extern _X_EXPORT pointer XNFrealloc(pointer /*ptr*/, unsigned long /*amount*/); +/* + * This function malloc(3)s buffer, terminating the server if there is not + * enough memory. + */ +extern _X_EXPORT void *XNFalloc(unsigned long /*amount*/); +/* + * This function calloc(3)s buffer, terminating the server if there is not + * enough memory. + */ +extern _X_EXPORT void *XNFcalloc(unsigned long /*amount*/); +/* + * This function realloc(3)s passed buffer, terminating the server if there is + * not enough memory. + */ +extern _X_EXPORT void *XNFrealloc(void * /*ptr*/, unsigned long /*amount*/); +/* + * This function strdup(3)s passed string. The only difference from the library + * function that it is safe to pass NULL, as NULL will be returned. + */ extern _X_EXPORT char *Xstrdup(const char *s); + +/* + * This function strdup(3)s passed string, terminating the server if there is + * not enough memory. If NULL is passed to this function, NULL is returned. + */ extern _X_EXPORT char *XNFstrdup(const char *s); -extern _X_EXPORT char *Xprintf(const char *fmt, ...); + +extern _X_EXPORT char *Xprintf(const char *fmt, ...) _X_ATTRIBUTE_PRINTF(1,2); extern _X_EXPORT char *Xvprintf(const char *fmt, va_list va); -extern _X_EXPORT char *XNFprintf(const char *fmt, ...); +extern _X_EXPORT char *XNFprintf(const char *fmt, ...) _X_ATTRIBUTE_PRINTF(1,2); extern _X_EXPORT char *XNFvprintf(const char *fmt, va_list va); typedef void (*OsSigHandlerPtr)(int /* sig */); @@ -266,7 +303,7 @@ extern _X_EXPORT void OsBlockSignals (void); extern _X_EXPORT void OsReleaseSignals (void); -extern _X_EXPORT void OsAbort (void); +extern _X_EXPORT void OsAbort (void) _X_NORETURN; #if !defined(WIN32) extern _X_EXPORT int System(char *); @@ -289,7 +326,7 @@ extern _X_EXPORT int AddHost( ClientPtr /*client*/, int /*family*/, unsigned /*length*/, - pointer /*pAddr*/); + const void */*pAddr*/); extern _X_EXPORT Bool ForEachHostInFamily ( int /*family*/, @@ -373,9 +410,9 @@ extern _X_EXPORT int AuthorizationFromID ( extern _X_EXPORT XID CheckAuthorization( unsigned int /*namelength*/, - char * /*name*/, + const char * /*name*/, unsigned int /*datalength*/, - char * /*data*/, + const char * /*data*/, ClientPtr /*client*/, char ** /*reason*/ ); @@ -384,22 +421,22 @@ extern _X_EXPORT void ResetAuthorization(void); extern _X_EXPORT int RemoveAuthorization ( unsigned short name_length, - char *name, + const char *name, unsigned short data_length, - char *data); + const char *data); extern _X_EXPORT int AddAuthorization( unsigned int /*name_length*/, - char * /*name*/, + const char * /*name*/, unsigned int /*data_length*/, char * /*data*/); #ifdef XCSECURITY extern _X_EXPORT XID GenerateAuthorization( unsigned int /* name_length */, - char * /* name */, + const char * /* name */, unsigned int /* data_length */, - char * /* data */, + const char * /* data */, unsigned int * /* data_length_return */, char ** /* data_return */); #endif @@ -492,32 +529,21 @@ typedef enum { X_UNKNOWN = -1 /* unknown -- this must always be last */ } MessageType; -/* XXX Need to check which GCC versions have the format(printf) attribute. */ -#if defined(__GNUC__) && (__GNUC__ > 2) -#define _printf_attribute(a,b) __attribute((format(__printf__,a,b))) -#else -#define _printf_attribute(a,b) /**/ -#endif - extern _X_EXPORT const char *LogInit(const char *fname, const char *backup); extern _X_EXPORT void LogClose(void); extern _X_EXPORT Bool LogSetParameter(LogParameter param, int value); extern _X_EXPORT void LogVWrite(int verb, const char *f, va_list args); -extern _X_EXPORT void LogWrite(int verb, const char *f, ...) _printf_attribute(2,3); +extern _X_EXPORT void LogWrite(int verb, const char *f, ...) _X_ATTRIBUTE_PRINTF(2,3); extern _X_EXPORT void LogVMessageVerb(MessageType type, int verb, const char *format, va_list args); extern _X_EXPORT void LogMessageVerb(MessageType type, int verb, const char *format, - ...) _printf_attribute(3,4); + ...) _X_ATTRIBUTE_PRINTF(3,4); extern _X_EXPORT void LogMessage(MessageType type, const char *format, ...) - _printf_attribute(2,3); + _X_ATTRIBUTE_PRINTF(2,3); extern _X_EXPORT void FreeAuditTimer(void); -extern _X_EXPORT void AuditF(const char *f, ...) _printf_attribute(1,2); +extern _X_EXPORT void AuditF(const char *f, ...) _X_ATTRIBUTE_PRINTF(1,2); extern _X_EXPORT void VAuditF(const char *f, va_list args); -extern _X_EXPORT void FatalError(const char *f, ...) _printf_attribute(1,2) -#if defined(__GNUC__) && (__GNUC__ > 2) -__attribute((noreturn)) -#endif -; +extern _X_EXPORT void FatalError(const char *f, ...) _X_ATTRIBUTE_PRINTF(1,2) _X_NORETURN; #ifdef DEBUG #define DebugF ErrorF @@ -526,7 +552,7 @@ __attribute((noreturn)) #endif extern _X_EXPORT void VErrorF(const char *f, va_list args); -extern _X_EXPORT void ErrorF(const char *f, ...) _printf_attribute(1,2); +extern _X_EXPORT void ErrorF(const char *f, ...) _X_ATTRIBUTE_PRINTF(1,2); extern _X_EXPORT void Error(char *str); extern _X_EXPORT void LogPrintMarkers(void); diff --git a/xserver/include/pixmap.h b/xserver/include/pixmap.h index 55a9c818a..5cf42d1fb 100644 --- a/xserver/include/pixmap.h +++ b/xserver/include/pixmap.h @@ -115,4 +115,7 @@ extern _X_EXPORT PixmapPtr AllocatePixmap( ScreenPtr /*pScreen*/, int /*pixDataSize*/); +extern _X_EXPORT void FreePixmap( + PixmapPtr /*pPixmap*/); + #endif /* PIXMAP_H */ diff --git a/xserver/include/privates.h b/xserver/include/privates.h index 3c5c32175..d3c0e1325 100644 --- a/xserver/include/privates.h +++ b/xserver/include/privates.h @@ -12,101 +12,257 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #ifndef PRIVATES_H #define PRIVATES_H 1 -#include "dix.h" -#include "resource.h" +#include +#include +#include +#include "misc.h" /***************************************************************** * STUFF FOR PRIVATES *****************************************************************/ -typedef int *DevPrivateKey; -struct _Private; -typedef struct _Private PrivateRec; +typedef struct _Private PrivateRec, *PrivatePtr; + +typedef enum { + /* XSELinux uses the same private keys for numerous objects */ + PRIVATE_XSELINUX, + + /* Otherwise, you get a private in just the requested structure + */ + /* These can have objects created before all of the keys are registered */ + PRIVATE_SCREEN, + PRIVATE_EXTENSION, + PRIVATE_COLORMAP, + + /* These cannot have any objects before all relevant keys are registered */ + PRIVATE_DEVICE, + PRIVATE_CLIENT, + PRIVATE_PROPERTY, + PRIVATE_SELECTION, + PRIVATE_WINDOW, + PRIVATE_PIXMAP, + PRIVATE_GC, + PRIVATE_CURSOR, + PRIVATE_CURSOR_BITS, + + /* extension privates */ + PRIVATE_DBE_WINDOW, + PRIVATE_DAMAGE, + PRIVATE_GLYPH, + PRIVATE_GLYPHSET, + PRIVATE_PICTURE, + + /* last private type */ + PRIVATE_LAST, +} DevPrivateType; + +typedef struct _DevPrivateKeyRec { + int offset; + int size; + Bool initialized; + Bool allocated; + DevPrivateType type; + struct _DevPrivateKeyRec *next; +} DevPrivateKeyRec, *DevPrivateKey; /* - * Request pre-allocated private space for your driver/module. - * Calling this is not necessary if only a pointer by itself is needed. + * Let drivers know how to initialize private keys */ -extern _X_EXPORT int -dixRequestPrivate(const DevPrivateKey key, unsigned size); + +#define HAS_DEVPRIVATEKEYREC 1 +#define HAS_DIXREGISTERPRIVATEKEY 1 /* - * Allocates a new private and attaches it to an existing object. + * Register a new private index for the private type. + * + * This initializes the specified key and optionally requests pre-allocated + * private space for your driver/module. If you request no extra space, you + * may set and get a single pointer value using this private key. Otherwise, + * you can get the address of the extra space and store whatever data you like + * there. + * + * You may call dixRegisterPrivateKey more than once on the same key, but the + * size and type must match or the server will abort. + * + * dixRegisterPrivateKey returns FALSE if it fails to allocate memory + * during its operation. */ -extern _X_EXPORT pointer * -dixAllocatePrivate(PrivateRec **privates, const DevPrivateKey key); +extern _X_EXPORT Bool +dixRegisterPrivateKey(DevPrivateKey key, DevPrivateType type, unsigned size); /* - * Look up a private pointer. + * Check whether a private key has been registered */ -extern _X_EXPORT pointer -dixLookupPrivate(PrivateRec **privates, const DevPrivateKey key); +static inline Bool +dixPrivateKeyRegistered(DevPrivateKey key) +{ + return key->initialized; +} /* - * Look up the address of a private pointer. + * Allocate a new private key. + * + * This manages the storage of the key object itself, freeing it when the + * privates system is restarted at server reset time. All other keys + * are expected to be statically allocated as the privates must be + * reset after all objects have been freed */ -extern _X_EXPORT pointer * -dixLookupPrivateAddr(PrivateRec **privates, const DevPrivateKey key); +extern _X_EXPORT DevPrivateKey +dixCreatePrivateKey(DevPrivateType type, unsigned size); /* - * Set a private pointer. + * Get the address of the private storage. + * + * For keys with pre-defined storage, this gets the base of that storage + * Otherwise, it returns the place where the private pointer is stored. */ -extern _X_EXPORT int -dixSetPrivate(PrivateRec **privates, const DevPrivateKey key, pointer val); +static inline void * +dixGetPrivateAddr(PrivatePtr *privates, const DevPrivateKey key) +{ + assert(key->initialized); + return (char *) (*privates) + key->offset; +} /* - * Register callbacks to be called on private allocation/freeing. - * The calldata argument to the callbacks is a PrivateCallbackPtr. + * Fetch a private pointer stored in the object + * + * Returns the pointer stored with dixSetPrivate. + * This must only be used with keys that have + * no pre-defined storage */ -typedef struct _PrivateCallback { - DevPrivateKey key; /* private registration key */ - pointer *value; /* address of private pointer */ -} PrivateCallbackRec; - -extern _X_EXPORT int -dixRegisterPrivateInitFunc(const DevPrivateKey key, - CallbackProcPtr callback, pointer userdata); - -extern _X_EXPORT int -dixRegisterPrivateDeleteFunc(const DevPrivateKey key, - CallbackProcPtr callback, pointer userdata); +static inline void * +dixGetPrivate(PrivatePtr *privates, const DevPrivateKey key) +{ + assert (key->size == 0); + return *(void **) dixGetPrivateAddr(privates, key); +} /* - * Frees private data. + * Associate 'val' with 'key' in 'privates' so that later calls to + * dixLookupPrivate(privates, key) will return 'val'. + */ +static inline void +dixSetPrivate(PrivatePtr *privates, const DevPrivateKey key, pointer val) +{ + assert (key->size == 0); + *(pointer *) dixGetPrivateAddr(privates, key) = val; +} + +#include "dix.h" +#include "resource.h" + +/* + * Lookup a pointer to the private record. + * + * For privates with defined storage, return the address of the + * storage. For privates without defined storage, return the pointer + * contents + */ +static inline pointer +dixLookupPrivate(PrivatePtr *privates, const DevPrivateKey key) +{ + if (key->size) + return dixGetPrivateAddr(privates, key); + else + return dixGetPrivate(privates, key); +} + +/* + * Look up the address of the pointer to the storage + * + * This returns the place where the private pointer is stored, + * which is only valid for privates without predefined storage. + */ +static inline pointer * +dixLookupPrivateAddr(PrivatePtr *privates, const DevPrivateKey key) +{ + assert (key->size == 0); + return (pointer *)dixGetPrivateAddr(privates, key); +} + +/* + * Allocates private data separately from main object. + * + * For objects created during server initialization, this allows those + * privates to be re-allocated as new private keys are registered. + * + * This includes screens, the serverClient, default colormaps and + * extensions entries. + */ +extern _X_EXPORT Bool +dixAllocatePrivates(PrivatePtr *privates, DevPrivateType type); + +/* + * Frees separately allocated private data */ extern _X_EXPORT void -dixFreePrivates(PrivateRec *privates); +dixFreePrivates(PrivatePtr privates, DevPrivateType type); /* - * Resets the subsystem, called from the main loop. + * Initialize privates by zeroing them + */ +extern _X_EXPORT void +_dixInitPrivates(PrivatePtr *privates, void *addr, DevPrivateType type); + +#define dixInitPrivates(o, v, type) _dixInitPrivates(&(o)->devPrivates, (v), type); + +/* + * Clean up privates + */ +extern _X_EXPORT void +_dixFiniPrivates(PrivatePtr privates, DevPrivateType type); + +#define dixFiniPrivates(o,t) _dixFiniPrivates((o)->devPrivates,t) + +/* + * Allocates private data at object creation time. Required + * for almost all objects, except for the list described + * above for dixAllocatePrivates. + */ +extern _X_EXPORT void * +_dixAllocateObjectWithPrivates(unsigned size, unsigned clear, unsigned offset, DevPrivateType type); + +#define dixAllocateObjectWithPrivates(t, type) (t *) _dixAllocateObjectWithPrivates(sizeof(t), sizeof(t), offsetof(t, devPrivates), type) + +extern _X_EXPORT void +_dixFreeObjectWithPrivates(void *object, PrivatePtr privates, DevPrivateType type); + +#define dixFreeObjectWithPrivates(o,t) _dixFreeObjectWithPrivates(o, (o)->devPrivates, t) + +/* + * Return size of privates for the specified type */ extern _X_EXPORT int +dixPrivatesSize(DevPrivateType type); + +/* + * Dump out private stats to ErrorF + */ +extern void +dixPrivateUsage(void); + +/* + * Resets the privates subsystem. dixResetPrivates is called from the main loop + * before each server generation. This function must only be called by main(). + */ +extern _X_EXPORT void dixResetPrivates(void); -/* - * These next two functions are necessary because the position of - * the devPrivates field varies by structure and calling code might - * only know the resource type, not the structure definition. - */ - /* * Looks up the offset where the devPrivates field is located. - * Returns -1 if no offset has been registered for the resource type. + * + * Returns -1 if the specified resource has no dev privates. + * The position of the devPrivates field varies by structure + * and calling code might only know the resource type, not the + * structure definition. */ extern _X_EXPORT int dixLookupPrivateOffset(RESTYPE type); -/* - * Specifies the offset where the devPrivates field is located. - * A negative value indicates no devPrivates field is available. - */ -extern _X_EXPORT int -dixRegisterPrivateOffset(RESTYPE type, int offset); - /* * Convenience macro for adding an offset to an object pointer * when making a call to one of the devPrivates functions */ -#define DEVPRIV_AT(ptr, offset) ((PrivateRec **)((char *)ptr + offset)) +#define DEVPRIV_AT(ptr, offset) ((PrivatePtr *)((char *)(ptr) + offset)) #endif /* PRIVATES_H */ diff --git a/xserver/include/protocol-versions.h b/xserver/include/protocol-versions.h index 97ef5dad5..c67446548 100644 --- a/xserver/include/protocol-versions.h +++ b/xserver/include/protocol-versions.h @@ -73,7 +73,7 @@ /* Render */ #define SERVER_RENDER_MAJOR_VERSION 0 -#define SERVER_RENDER_MINOR_VERSION 10 +#define SERVER_RENDER_MINOR_VERSION 11 /* RandR Xinerama */ #define SERVER_RRXINERAMA_MAJOR_VERSION 1 diff --git a/xserver/include/ptrveloc.h b/xserver/include/ptrveloc.h index 676c46419..6f999a88f 100644 --- a/xserver/include/ptrveloc.h +++ b/xserver/include/ptrveloc.h @@ -62,6 +62,9 @@ typedef struct _MotionTracker { int dir; /* initial direction bitfield */ } MotionTracker, *MotionTrackerPtr; +/* number of properties for predictable acceleration */ +#define NPROPS_PREDICTABLE_ACCEL 4 + /** * Contains all data needed to implement mouse ballistics */ @@ -88,9 +91,9 @@ typedef struct _DeviceVelocityRec { struct { /* to be able to query this information */ int profile_number; } statistics; + long prop_handlers[NPROPS_PREDICTABLE_ACCEL]; } DeviceVelocityRec, *DeviceVelocityPtr; - extern _X_EXPORT void InitVelocityData(DeviceVelocityPtr vel); diff --git a/xserver/include/regionstr.h b/xserver/include/regionstr.h index eead1a1f2..627941b36 100644 --- a/xserver/include/regionstr.h +++ b/xserver/include/regionstr.h @@ -66,228 +66,305 @@ typedef struct pixman_region16 RegionRec, *RegionPtr; typedef struct pixman_region16_data RegDataRec, *RegDataPtr; -extern _X_EXPORT BoxRec miEmptyBox; -extern _X_EXPORT RegDataRec miEmptyData; -extern _X_EXPORT RegDataRec miBrokenData; +extern _X_EXPORT BoxRec RegionEmptyBox; +extern _X_EXPORT RegDataRec RegionEmptyData; +extern _X_EXPORT RegDataRec RegionBrokenData; +static inline Bool RegionNil(RegionPtr reg) { + return ((reg)->data && !(reg)->data->numRects); +} -#define REGION_NIL(reg) ((reg)->data && !(reg)->data->numRects) /* not a region */ -#define REGION_NAR(reg) ((reg)->data == &miBrokenData) -#define REGION_NUM_RECTS(reg) ((reg)->data ? (reg)->data->numRects : 1) -#define REGION_SIZE(reg) ((reg)->data ? (reg)->data->size : 0) -#define REGION_RECTS(reg) ((reg)->data ? (BoxPtr)((reg)->data + 1) \ - : &(reg)->extents) -#define REGION_BOXPTR(reg) ((BoxPtr)((reg)->data + 1)) -#define REGION_BOX(reg,i) (®ION_BOXPTR(reg)[i]) -#define REGION_TOP(reg) REGION_BOX(reg, (reg)->data->numRects) -#define REGION_END(reg) REGION_BOX(reg, (reg)->data->numRects - 1) -#define REGION_SZOF(n) (sizeof(RegDataRec) + ((n) * sizeof(BoxRec))) -#define REGION_CREATE(_pScreen, _rect, _size) \ - miRegionCreate(_rect, _size) - -#define REGION_COPY(_pScreen, dst, src) \ - miRegionCopy(dst, src) - -#define REGION_DESTROY(_pScreen, _pReg) \ - miRegionDestroy(_pReg) - -#define REGION_INTERSECT(_pScreen, newReg, reg1, reg2) \ - miIntersect(newReg, reg1, reg2) - -#define REGION_UNION(_pScreen, newReg, reg1, reg2) \ - miUnion(newReg, reg1, reg2) - -#define REGION_SUBTRACT(_pScreen, newReg, reg1, reg2) \ - miSubtract(newReg, reg1, reg2) - -#define REGION_INVERSE(_pScreen, newReg, reg1, invRect) \ - miInverse(newReg, reg1, invRect) - -#define REGION_TRANSLATE(_pScreen, _pReg, _x, _y) \ - miTranslateRegion(_pReg, _x, _y) - -#define RECT_IN_REGION(_pScreen, _pReg, prect) \ - miRectIn(_pReg, prect) - -#define POINT_IN_REGION(_pScreen, _pReg, _x, _y, prect) \ - miPointInRegion(_pReg, _x, _y, prect) - -#define REGION_APPEND(_pScreen, dstrgn, rgn) \ - miRegionAppend(dstrgn, rgn) - -#define REGION_VALIDATE(_pScreen, badreg, pOverlap) \ - miRegionValidate(badreg, pOverlap) - -#define BITMAP_TO_REGION(_pScreen, pPix) \ - (*(_pScreen)->BitmapToRegion)(pPix) /* no mi version?! */ - -#define RECTS_TO_REGION(_pScreen, nrects, prect, ctype) \ - miRectsToRegion(nrects, prect, ctype) - -#define REGION_EQUAL(_pScreen, _pReg1, _pReg2) \ - miRegionEqual(_pReg1, _pReg2) - -#define REGION_BREAK(_pScreen, _pReg) \ - miRegionBreak(_pReg) - -#define REGION_INIT(_pScreen, _pReg, _rect, _size) \ -{ \ - if ((_rect) != NULL) \ - { \ - (_pReg)->extents = *(_rect); \ - (_pReg)->data = (RegDataPtr)NULL; \ - } \ - else \ - { \ - (_pReg)->extents = miEmptyBox; \ - if (((_size) > 1) && ((_pReg)->data = \ - (RegDataPtr)xalloc(REGION_SZOF(_size)))) \ - { \ - (_pReg)->data->size = (_size); \ - (_pReg)->data->numRects = 0; \ - } \ - else \ - (_pReg)->data = &miEmptyData; \ - } \ - } - - -#define REGION_UNINIT(_pScreen, _pReg) \ -{ \ - if ((_pReg)->data && (_pReg)->data->size) { \ - xfree((_pReg)->data); \ - (_pReg)->data = NULL; \ - } \ +static inline Bool RegionNar(RegionPtr reg) { + return ((reg)->data == &RegionBrokenData); } -#define REGION_RESET(_pScreen, _pReg, _pBox) \ -{ \ - (_pReg)->extents = *(_pBox); \ - REGION_UNINIT(_pScreen, _pReg); \ - (_pReg)->data = (RegDataPtr)NULL; \ +static inline int RegionNumRects(RegionPtr reg) { + return ((reg)->data ? (reg)->data->numRects : 1); } -#define REGION_NOTEMPTY(_pScreen, _pReg) \ - !REGION_NIL(_pReg) - -#define REGION_BROKEN(_pScreen, _pReg) \ - REGION_NAR(_pReg) - -#define REGION_EMPTY(_pScreen, _pReg) \ -{ \ - REGION_UNINIT(_pScreen, _pReg); \ - (_pReg)->extents.x2 = (_pReg)->extents.x1; \ - (_pReg)->extents.y2 = (_pReg)->extents.y1; \ - (_pReg)->data = &miEmptyData; \ +static inline int RegionSize(RegionPtr reg) { + return ((reg)->data ? (reg)->data->size : 0); } -#define REGION_EXTENTS(_pScreen, _pReg) \ - (&(_pReg)->extents) - -#define REGION_NULL(_pScreen, _pReg) \ -{ \ - (_pReg)->extents = miEmptyBox; \ - (_pReg)->data = &miEmptyData; \ +static inline BoxPtr RegionRects(RegionPtr reg) { + return ((reg)->data ? (BoxPtr)((reg)->data + 1) : &(reg)->extents); } -#ifndef REGION_NULL -#define REGION_NULL(_pScreen, _pReg) \ - REGION_INIT(_pScreen, _pReg, NullBox, 1) -#endif +static inline BoxPtr RegionBoxptr(RegionPtr reg) { + return ((BoxPtr)((reg)->data + 1)); +} -/* moved from mi.h */ +static inline BoxPtr RegionBox(RegionPtr reg, int i) { + return (&RegionBoxptr(reg)[i]); +} -extern _X_EXPORT void InitRegions (void); +static inline BoxPtr RegionTop(RegionPtr reg) { + return RegionBox(reg, (reg)->data->numRects); +} -extern _X_EXPORT RegionPtr miRegionCreate( +static inline BoxPtr RegionEnd(RegionPtr reg) { + return RegionBox(reg, (reg)->data->numRects - 1); +} + +static inline size_t RegionSizeof(int n) { + return (sizeof(RegDataRec) + ((n) * sizeof(BoxRec))); +} + +static inline void RegionInit(RegionPtr _pReg, BoxPtr _rect, int _size) +{ + if ((_rect) != NULL) + { + (_pReg)->extents = *(_rect); + (_pReg)->data = (RegDataPtr)NULL; + } + else + { + (_pReg)->extents = RegionEmptyBox; + if (((_size) > 1) && ((_pReg)->data = + (RegDataPtr)malloc(RegionSizeof(_size)))) + { + (_pReg)->data->size = (_size); + (_pReg)->data->numRects = 0; + } + else + (_pReg)->data = &RegionEmptyData; + } +} + +static inline void RegionUninit(RegionPtr _pReg) +{ + if ((_pReg)->data && (_pReg)->data->size) { + free((_pReg)->data); + (_pReg)->data = NULL; + } +} + +static inline void RegionReset(RegionPtr _pReg, BoxPtr _pBox) +{ + (_pReg)->extents = *(_pBox); + RegionUninit(_pReg); + (_pReg)->data = (RegDataPtr)NULL; +} + +static inline Bool RegionNotEmpty(RegionPtr _pReg) { + return !RegionNil(_pReg); +} + +static inline Bool RegionBroken(RegionPtr _pReg) { + return RegionNar(_pReg); +} + +static inline void RegionEmpty(RegionPtr _pReg) +{ + RegionUninit(_pReg); + (_pReg)->extents.x2 = (_pReg)->extents.x1; + (_pReg)->extents.y2 = (_pReg)->extents.y1; + (_pReg)->data = &RegionEmptyData; +} + +static inline BoxPtr RegionExtents(RegionPtr _pReg) +{ + return (&(_pReg)->extents); +} + +static inline void RegionNull(RegionPtr _pReg) +{ + (_pReg)->extents = RegionEmptyBox; + (_pReg)->data = &RegionEmptyData; +} + +extern _X_EXPORT void InitRegions(void); + +extern _X_EXPORT RegionPtr RegionCreate( BoxPtr /*rect*/, int /*size*/); -extern _X_EXPORT void miRegionInit( - RegionPtr /*pReg*/, - BoxPtr /*rect*/, - int /*size*/); - -extern _X_EXPORT void miRegionDestroy( +extern _X_EXPORT void RegionDestroy( RegionPtr /*pReg*/); -extern _X_EXPORT void miRegionUninit( - RegionPtr /*pReg*/); +static inline Bool +RegionCopy(RegionPtr dst, RegionPtr src) +{ + return pixman_region_copy (dst, src); +} -extern _X_EXPORT Bool miRegionCopy( - RegionPtr /*dst*/, - RegionPtr /*src*/); +static inline Bool +RegionIntersect( + RegionPtr newReg, /* destination Region */ + RegionPtr reg1, + RegionPtr reg2 /* source regions */ + ) +{ + return pixman_region_intersect (newReg, reg1, reg2); +} -extern _X_EXPORT Bool miIntersect( - RegionPtr /*newReg*/, - RegionPtr /*reg1*/, - RegionPtr /*reg2*/); +static inline Bool +RegionUnion( + RegionPtr newReg, /* destination Region */ + RegionPtr reg1, + RegionPtr reg2 /* source regions */ + ) +{ + return pixman_region_union (newReg, reg1, reg2); +} -extern _X_EXPORT Bool miUnion( - RegionPtr /*newReg*/, - RegionPtr /*reg1*/, - RegionPtr /*reg2*/); - -extern _X_EXPORT Bool miRegionAppend( +extern _X_EXPORT Bool RegionAppend( RegionPtr /*dstrgn*/, RegionPtr /*rgn*/); -extern _X_EXPORT Bool miRegionValidate( +extern _X_EXPORT Bool RegionValidate( RegionPtr /*badreg*/, Bool * /*pOverlap*/); -extern _X_EXPORT RegionPtr miRectsToRegion( +extern _X_EXPORT RegionPtr RegionFromRects( int /*nrects*/, xRectanglePtr /*prect*/, int /*ctype*/); -extern _X_EXPORT Bool miSubtract( - RegionPtr /*regD*/, - RegionPtr /*regM*/, - RegionPtr /*regS*/); +/*- + *----------------------------------------------------------------------- + * Subtract -- + * Subtract regS from regM and leave the result in regD. + * S stands for subtrahend, M for minuend and D for difference. + * + * Results: + * TRUE if successful. + * + * Side Effects: + * regD is overwritten. + * + *----------------------------------------------------------------------- + */ +static inline Bool +RegionSubtract(RegionPtr regD, RegionPtr regM, RegionPtr regS) +{ + return pixman_region_subtract (regD, regM, regS); +} -extern _X_EXPORT Bool miInverse( - RegionPtr /*newReg*/, - RegionPtr /*reg1*/, - BoxPtr /*invRect*/); +/*- + *----------------------------------------------------------------------- + * Inverse -- + * Take a region and a box and return a region that is everything + * in the box but not in the region. The careful reader will note + * that this is the same as subtracting the region from the box... + * + * Results: + * TRUE. + * + * Side Effects: + * newReg is overwritten. + * + *----------------------------------------------------------------------- + */ -extern _X_EXPORT int miRectIn( - RegionPtr /*region*/, - BoxPtr /*prect*/); +static inline Bool +RegionInverse( + RegionPtr newReg, /* Destination region */ + RegionPtr reg1, /* Region to invert */ + BoxPtr invRect /* Bounding box for inversion */ + ) +{ + return pixman_region_inverse (newReg, reg1, invRect); +} -extern _X_EXPORT void miTranslateRegion( - RegionPtr /*pReg*/, - int /*x*/, - int /*y*/); +static inline int +RegionContainsRect(RegionPtr region, BoxPtr prect) +{ + return pixman_region_contains_rectangle (region, prect); +} -extern _X_EXPORT void miRegionReset( - RegionPtr /*pReg*/, - BoxPtr /*pBox*/); +/* TranslateRegion(pReg, x, y) + translates in place +*/ -extern _X_EXPORT Bool miRegionBreak( +static inline void +RegionTranslate(RegionPtr pReg, int x, int y) +{ + pixman_region_translate (pReg, x, y); +} + +extern _X_EXPORT Bool RegionBreak( RegionPtr /*pReg*/); -extern _X_EXPORT Bool miPointInRegion( - RegionPtr /*pReg*/, - int /*x*/, - int /*y*/, - BoxPtr /*box*/); +static inline Bool +RegionContainsPoint( + RegionPtr pReg, + int x, + int y, + BoxPtr box /* "return" value */ + ) +{ + return pixman_region_contains_point (pReg, x, y, box); +} -extern _X_EXPORT Bool miRegionEqual( - RegionPtr /*pReg1*/, - RegionPtr /*pReg2*/); +static inline Bool +RegionEqual(RegionPtr reg1, RegionPtr reg2) +{ + return pixman_region_equal (reg1, reg2); +} -extern _X_EXPORT Bool miRegionNotEmpty( +extern _X_EXPORT Bool RegionRectAlloc( + RegionPtr /*pRgn*/, + int /*n*/ +); + +#ifdef DEBUG +extern _X_EXPORT Bool RegionIsValid( + RegionPtr /*prgn*/ +); +#endif + +extern _X_EXPORT void RegionPrint( RegionPtr /*pReg*/); -extern _X_EXPORT void miRegionEmpty( - RegionPtr /*pReg*/); +extern _X_EXPORT int RegionClipSpans( + RegionPtr /*prgnDst*/, + DDXPointPtr /*ppt*/, + int * /*pwidth*/, + int /*nspans*/, + DDXPointPtr /*pptNew*/, + int * /*pwidthNew*/, + int /*fSorted*/ +); -extern _X_EXPORT BoxPtr miRegionExtents( - RegionPtr /*pReg*/); +#define INCLUDE_LEGACY_REGION_DEFINES +#ifdef INCLUDE_LEGACY_REGION_DEFINES -extern _X_EXPORT void miPrintRegion( - RegionPtr /*pReg*/); +#define REGION_NIL RegionNil +#define REGION_NAR RegionNar +#define REGION_NUM_RECTS RegionNumRects +#define REGION_SIZE RegionSize +#define REGION_RECTS RegionRects +#define REGION_BOXPTR RegionBoxptr +#define REGION_BOX RegionBox +#define REGION_TOP RegionTop +#define REGION_END RegionEnd +#define REGION_SZOF RegionSizeof +#define BITMAP_TO_REGION BitmapToRegion +#define REGION_CREATE(pScreen, r, s) RegionCreate(r,s) +#define REGION_COPY(pScreen, d, r) RegionCopy(d, r) +#define REGION_DESTROY(pScreen, r) RegionDestroy(r) +#define REGION_INTERSECT(pScreen, res, r1, r2) RegionIntersect(res, r1, r2) +#define REGION_UNION(pScreen, res, r1, r2) RegionUnion(res, r1, r2) +#define REGION_SUBTRACT(pScreen, res, r1, r2) RegionSubtract(res, r1, r2) +#define REGION_INVERSE(pScreen, n, r, b) RegionInverse(n, r, b) +#define REGION_TRANSLATE(pScreen, r, x, y) RegionTranslate(r, x, y) +#define RECT_IN_REGION(pScreen, r, b) RegionContainsRect(r, b) +#define POINT_IN_REGION(pScreen, r, x, y, b) RegionContainsPoint(r, x, y, b) +#define REGION_EQUAL(pScreen, r1, r2) RegionEqual(r1, r2) +#define REGION_APPEND(pScreen, d, r) RegionAppend(d, r) +#define REGION_VALIDATE(pScreen, r, o) RegionValidate(r, o) +#define RECTS_TO_REGION(pScreen, n, r, c) RegionFromRects(n, r, c) +#define REGION_BREAK(pScreen, r) RegionBreak(r) +#define REGION_INIT(pScreen, r, b, s) RegionInit(r, b, s) +#define REGION_UNINIT(pScreen, r) RegionUninit(r) +#define REGION_RESET(pScreen, r, b) RegionReset(r, b) +#define REGION_NOTEMPTY(pScreen, r) RegionNotEmpty(r) +#define REGION_BROKEN(pScreen, r) RegionBroken(r) +#define REGION_EMPTY(pScreen, r) RegionEmpty(r) +#define REGION_EXTENTS(pScreen, r) RegionExtents(r) +#define REGION_NULL(pScreen, r) RegionNull(r) +#endif /* INCLUDE_LEGACY_REGION_DEFINES */ #endif /* REGIONSTRUCT_H */ diff --git a/xserver/include/resource.h b/xserver/include/resource.h index 7948af50e..0c5a59dbc 100644 --- a/xserver/include/resource.h +++ b/xserver/include/resource.h @@ -157,6 +157,9 @@ typedef Bool (*FindComplexResType)( extern _X_EXPORT RESTYPE CreateNewResourceType( DeleteType /*deleteFunc*/, char * /*name*/); +extern _X_EXPORT void SetResourceTypeErrorValue( + RESTYPE /*type*/, int /*errorValue*/); + extern _X_EXPORT RESTYPE CreateNewResourceClass(void); extern _X_EXPORT Bool InitClientResources( @@ -251,35 +254,29 @@ extern _X_EXPORT RESTYPE TypeMask; * Please use the noted replacements instead. */ -#ifdef __GNUC__ -#define X_DEPRECATED __attribute__((deprecated)) -#else -#define X_DEPRECATED -#endif - /* replaced by dixLookupResourceByType */ extern _X_EXPORT pointer SecurityLookupIDByType( ClientPtr client, XID id, RESTYPE rtype, - Mask access_mode) X_DEPRECATED; + Mask access_mode) _X_DEPRECATED; /* replaced by dixLookupResourceByClass */ extern _X_EXPORT pointer SecurityLookupIDByClass( ClientPtr client, XID id, RESTYPE classes, - Mask access_mode) X_DEPRECATED; + Mask access_mode) _X_DEPRECATED; /* replaced by dixLookupResourceByType */ extern _X_EXPORT pointer LookupIDByType( XID id, - RESTYPE rtype) X_DEPRECATED; + RESTYPE rtype) _X_DEPRECATED; /* replaced by dixLookupResourceByClass */ extern _X_EXPORT pointer LookupIDByClass( XID id, - RESTYPE classes) X_DEPRECATED; + RESTYPE classes) _X_DEPRECATED; #endif /* RESOURCE_H */ diff --git a/xserver/include/scrnintstr.h b/xserver/include/scrnintstr.h index c42119d0d..e36b15f5e 100644 --- a/xserver/include/scrnintstr.h +++ b/xserver/include/scrnintstr.h @@ -82,6 +82,16 @@ typedef struct _Depth { VisualID *vids; /* block of visual ids for this depth */ } DepthRec; +typedef struct _ScreenSaverStuff { + WindowPtr pWindow; + XID wid; + char blanked; + Bool (*ExternalScreenSaver)( + ScreenPtr /*pScreen*/, + int /*xstate*/, + Bool /*force*/); +} ScreenSaverStuffRec; + /* * There is a typedef for each screen function pointer so that code that @@ -121,11 +131,6 @@ typedef void (* GetSpansProcPtr)( int /*nspans*/, char * /*pdstStart*/); -typedef void (* PointerNonInterestBoxProcPtr)( - DeviceIntPtr /*pDev*/, - ScreenPtr /*pScreen*/, - BoxPtr /*pBox*/); - typedef void (* SourceValidateProcPtr)( DrawablePtr /*pDrawable*/, int /*x*/, @@ -173,14 +178,6 @@ typedef void (* WindowExposuresProcPtr)( RegionPtr /*prgn*/, RegionPtr /*other_exposed*/); -typedef void (* PaintWindowProcPtr)( - WindowPtr /*pWindow*/, - RegionPtr /*pRegion*/, - int /*what*/); - -typedef PaintWindowProcPtr PaintWindowBackgroundProcPtr; -typedef PaintWindowProcPtr PaintWindowBorderProcPtr; - typedef void (* CopyWindowProcPtr)( WindowPtr /*pWindow*/, DDXPointRec /*ptOldOrg*/, @@ -399,7 +396,7 @@ typedef void (* PostChangeSaveUnderProcPtr)( WindowPtr /*pLayerWin*/, WindowPtr /*firstChild*/); -typedef void (* ConfigNotifyProcPtr)( +typedef int (* ConfigNotifyProcPtr)( WindowPtr /*pWin*/, int /*x*/, int /*y*/, @@ -436,7 +433,8 @@ typedef void (* ReparentWindowProcPtr)( WindowPtr /*pPriorParent*/); typedef void (* SetShapeProcPtr)( - WindowPtr /*pWin*/); + WindowPtr /*pWin*/, + int /* kind */); typedef void (* ChangeBorderWidthProcPtr)( WindowPtr /*pWin*/, @@ -458,7 +456,7 @@ typedef void (* DeviceCursorCleanupProcPtr)( typedef struct _Screen { int myNum; /* index of this instance in Screens[] */ ATOM id; - short width, height; + short x, y, width, height; short mmWidth, mmHeight; short numDepths; unsigned char rootDepth; @@ -468,7 +466,6 @@ typedef struct _Screen { short minInstalledCmaps, maxInstalledCmaps; char backingStoreSupport, saveUnderSupport; unsigned long whitePixel, blackPixel; - unsigned long rgf; /* array of flags; she's -- HUNGARIAN */ GCPtr GCperDepth[MAXFORMATS+1]; /* next field is a stipple to use as default in a GC. we don't build default tiles of all depths @@ -481,6 +478,8 @@ typedef struct _Screen { pointer devPrivate; short numVisuals; VisualPtr visuals; + WindowPtr root; + ScreenSaverStuffRec screensaver; /* Random screen procedures */ @@ -489,7 +488,6 @@ typedef struct _Screen { SaveScreenProcPtr SaveScreen; GetImageProcPtr GetImage; GetSpansProcPtr GetSpans; - PointerNonInterestBoxProcPtr PointerNonInterestBox; SourceValidateProcPtr SourceValidate; /* Window Procedures */ @@ -503,8 +501,6 @@ typedef struct _Screen { ValidateTreeProcPtr ValidateTree; PostValidateTreeProcPtr PostValidateTree; WindowExposuresProcPtr WindowExposures; - PaintWindowBackgroundProcPtr PaintWindowBackground; /** unused */ - PaintWindowBorderProcPtr PaintWindowBorder; /** unused */ CopyWindowProcPtr CopyWindow; ClearToBackgroundProcPtr ClearToBackground; ClipNotifyProcPtr ClipNotify; @@ -607,6 +603,10 @@ typedef struct _Screen { DeviceCursorCleanupProcPtr DeviceCursorCleanup; } ScreenRec; +static inline RegionPtr BitmapToRegion(ScreenPtr _pScreen, PixmapPtr pPix) { + return (*(_pScreen)->BitmapToRegion)(pPix); /* no mi version?! */ +} + typedef struct _ScreenInfo { int imageByteOrder; int bitmapScanlineUnit; @@ -615,10 +615,8 @@ typedef struct _ScreenInfo { int numPixmapFormats; PixmapFormatRec formats[MAXFORMATS]; - int arraySize; int numScreens; ScreenPtr screens[MAXSCREENS]; - int unused; } ScreenInfo; extern _X_EXPORT ScreenInfo screenInfo; diff --git a/xserver/include/windowstr.h b/xserver/include/windowstr.h index 96bee9b93..29b95fc37 100644 --- a/xserver/include/windowstr.h +++ b/xserver/include/windowstr.h @@ -204,24 +204,15 @@ extern _X_EXPORT Mask DontPropagateMasks[]; #define HasBorder(w) ((w)->borderWidth || wClipShape(w)) -typedef struct _ScreenSaverStuff { - WindowPtr pWindow; - XID wid; - char blanked; - Bool (*ExternalScreenSaver)( - ScreenPtr /*pScreen*/, - int /*xstate*/, - Bool /*force*/); -} ScreenSaverStuffRec, *ScreenSaverStuffPtr; +typedef struct _ScreenSaverStuff *ScreenSaverStuffPtr; #define SCREEN_IS_BLANKED 0 #define SCREEN_ISNT_SAVED 1 #define SCREEN_IS_TILED 2 #define SCREEN_IS_BLACK 3 -#define HasSaverWindow(i) (savedScreenInfo[i].pWindow != NullWindow) +#define HasSaverWindow(pScreen) (pScreen->screensaver.pWindow != NullWindow) extern _X_EXPORT int screenIsSaved; -extern _X_EXPORT ScreenSaverStuffRec savedScreenInfo[MAXSCREENS]; #endif /* WINDOWSTRUCT_H */ diff --git a/xserver/include/xkbsrv.h b/xserver/include/xkbsrv.h index c0cd50175..9f1507e8e 100644 --- a/xserver/include/xkbsrv.h +++ b/xserver/include/xkbsrv.h @@ -275,7 +275,9 @@ typedef struct device->public.realInputProc = oldprocs->realInputProc; \ device->unwrapProc = oldprocs->unwrapProc; -extern DevPrivateKey xkbDevicePrivateKey; +extern _X_EXPORT DevPrivateKeyRec xkbDevicePrivateKeyRec; +#define xkbDevicePrivateKey (&xkbDevicePrivateKeyRec) + #define XKBDEVICEINFO(dev) ((xkbDeviceInfoPtr)dixLookupPrivate(&(dev)->devPrivates, xkbDevicePrivateKey)) extern void xkbUnwrapProc(DeviceIntPtr, DeviceHandleProc, pointer); @@ -319,6 +321,8 @@ extern _X_EXPORT int XkbProcessArguments( int /* i */ ); +extern _X_EXPORT Bool XkbInitPrivates(void); + extern _X_EXPORT void XkbSetExtension(DeviceIntPtr device, ProcessInputProc proc); extern _X_EXPORT void XkbFreeCompatMap( @@ -768,19 +772,6 @@ extern _X_EXPORT void XkbDDXUpdateDeviceIndicators( CARD32 /* newState */ ); -extern _X_EXPORT void XkbDDXFakePointerMotion( - DeviceIntPtr /* dev */, - unsigned int /* flags */, - int /* x */, - int /* y */ -); - -extern _X_EXPORT void XkbDDXFakeDeviceButton( - DeviceIntPtr /* dev */, - Bool /* press */, - int /* button */ -); - extern _X_EXPORT int XkbDDXTerminateServer( DeviceIntPtr /* dev */, KeyCode /* key */, @@ -933,6 +924,15 @@ extern int XkbGetEffectiveGroup( XkbStatePtr /* xkbstate */, CARD8 /* keycode */); +extern void XkbMergeLockedPtrBtns( + DeviceIntPtr /* master */); + +extern void XkbFakeDeviceButton( + DeviceIntPtr /* dev */, + int /* press */, + int /* button */); + + #include "xkbfile.h" #include "xkbrules.h" diff --git a/xserver/include/xorg-config.h.in b/xserver/include/xorg-config.h.in index a7462fdbb..a4e11270e 100644 --- a/xserver/include/xorg-config.h.in +++ b/xserver/include/xorg-config.h.in @@ -139,6 +139,9 @@ /* Support PC98 */ #undef SUPPORT_PC98 +/* Build with libdrm support */ +#undef WITH_LIBDRM + /* Use X server privilege separation */ #undef X_PRIVSEP diff --git a/xserver/include/xserver-properties.h b/xserver/include/xserver-properties.h index 30e8efb68..c6259aee1 100644 --- a/xserver/include/xserver-properties.h +++ b/xserver/include/xserver-properties.h @@ -35,6 +35,13 @@ /* BOOL. If present, device is a virtual XTEST device */ #define XI_PROP_XTEST_DEVICE "XTEST Device" +/* Coordinate transformation matrix for absolute input devices + * FLOAT, 9 values in row-major order, coordinates in 0..1 range: + * [c0 c1 c2] [x] + * [c3 c4 c5] * [y] + * [c6 c7 c8] [1] */ +#define XI_PROP_TRANSFORM "Coordinate Transformation Matrix" + /* Pointer acceleration properties */ /* INTEGER of any format */ #define ACCEL_PROP_PROFILE_NUMBER "Device Accel Profile" diff --git a/xserver/mi/Makefile.am b/xserver/mi/Makefile.am index 9714a21ca..f6dabda67 100644 --- a/xserver/mi/Makefile.am +++ b/xserver/mi/Makefile.am @@ -1,7 +1,7 @@ noinst_LTLIBRARIES = libmi.la if XORG -sdk_HEADERS = mibank.h micmap.h miline.h mipointer.h mi.h mibstore.h \ +sdk_HEADERS = micmap.h miline.h mipointer.h mi.h mibstore.h \ migc.h mipointrst.h mizerarc.h micoord.h mifillarc.h \ mispans.h miwideline.h mistruct.h mifpoly.h mioverlay.h endif @@ -11,8 +11,6 @@ AM_CFLAGS = $(DIX_CFLAGS) libmi_la_SOURCES = \ mi.h \ miarc.c \ - mibank.c \ - mibank.h \ mibitblt.c \ mibstore.c \ mibstore.h \ @@ -50,7 +48,6 @@ libmi_la_SOURCES = \ mipolytext.c \ mipolyutil.c \ mipushpxl.c \ - miregion.c \ miscanfill.h \ miscrinit.c \ mispans.c \ diff --git a/xserver/mi/Makefile.in b/xserver/mi/Makefile.in index 034a41fd6..c92693bc0 100644 --- a/xserver/mi/Makefile.in +++ b/xserver/mi/Makefile.in @@ -57,14 +57,14 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libmi_la_LIBADD = -am_libmi_la_OBJECTS = miarc.lo mibank.lo mibitblt.lo mibstore.lo \ - micmap.lo micopy.lo micursor.lo midash.lo midispcur.lo mieq.lo \ +am_libmi_la_OBJECTS = miarc.lo mibitblt.lo mibstore.lo micmap.lo \ + micopy.lo micursor.lo midash.lo midispcur.lo mieq.lo \ miexpose.lo mifillarc.lo mifillrct.lo mifpolycon.lo migc.lo \ miglblt.lo mioverlay.lo mipointer.lo mipoly.lo mipolycon.lo \ mipolygen.lo mipolypnt.lo mipolyrect.lo mipolyseg.lo \ - mipolytext.lo mipolyutil.lo mipushpxl.lo miregion.lo \ - miscrinit.lo mispans.lo misprite.lo mivaltree.lo miwideline.lo \ - miwindow.lo mizerarc.lo mizerclip.lo mizerline.lo + mipolytext.lo mipolyutil.lo mipushpxl.lo miscrinit.lo \ + mispans.lo misprite.lo mivaltree.lo miwideline.lo miwindow.lo \ + mizerarc.lo mizerclip.lo mizerline.lo libmi_la_OBJECTS = $(am_libmi_la_OBJECTS) DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include -I$(top_builddir)/include depcomp = $(SHELL) $(top_srcdir)/depcomp @@ -76,10 +76,9 @@ LINK = $(LIBTOOL) --tag=CC --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ SOURCES = $(libmi_la_SOURCES) DIST_SOURCES = $(libmi_la_SOURCES) -am__sdk_HEADERS_DIST = mibank.h micmap.h miline.h mipointer.h mi.h \ - mibstore.h migc.h mipointrst.h mizerarc.h micoord.h \ - mifillarc.h mispans.h miwideline.h mistruct.h mifpoly.h \ - mioverlay.h +am__sdk_HEADERS_DIST = micmap.h miline.h mipointer.h mi.h mibstore.h \ + migc.h mipointrst.h mizerarc.h micoord.h mifillarc.h mispans.h \ + miwideline.h mistruct.h mifpoly.h mioverlay.h am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -129,10 +128,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -220,6 +215,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -234,6 +231,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -251,10 +249,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -310,10 +312,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -331,17 +334,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -368,20 +365,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -473,6 +473,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ @@ -619,7 +620,7 @@ sysconfdir = @sysconfdir@ sysconfigdir = @sysconfigdir@ target_alias = @target_alias@ noinst_LTLIBRARIES = libmi.la -@XORG_TRUE@sdk_HEADERS = mibank.h micmap.h miline.h mipointer.h mi.h mibstore.h \ +@XORG_TRUE@sdk_HEADERS = micmap.h miline.h mipointer.h mi.h mibstore.h \ @XORG_TRUE@ migc.h mipointrst.h mizerarc.h micoord.h mifillarc.h \ @XORG_TRUE@ mispans.h miwideline.h mistruct.h mifpoly.h mioverlay.h @@ -627,8 +628,6 @@ AM_CFLAGS = $(DIX_CFLAGS) libmi_la_SOURCES = \ mi.h \ miarc.c \ - mibank.c \ - mibank.h \ mibitblt.c \ mibstore.c \ mibstore.h \ @@ -666,7 +665,6 @@ libmi_la_SOURCES = \ mipolytext.c \ mipolyutil.c \ mipushpxl.c \ - miregion.c \ miscanfill.h \ miscrinit.c \ mispans.c \ @@ -736,7 +734,6 @@ distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/miarc.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mibank.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mibitblt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mibstore.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/micmap.Plo@am__quote@ @@ -762,7 +759,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mipolytext.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mipolyutil.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mipushpxl.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/miregion.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/miscrinit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mispans.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misprite.Plo@am__quote@ diff --git a/xserver/mi/mi.h b/xserver/mi/mi.h index 812edce94..57837c450 100644 --- a/xserver/mi/mi.h +++ b/xserver/mi/mi.h @@ -418,23 +418,6 @@ extern _X_EXPORT void miPushPixels( int /*yOrg*/ ); -/* miregion.c */ - -/* see also region.h */ - -extern _X_EXPORT Bool miRectAlloc( - RegionPtr /*pRgn*/, - int /*n*/ -); - -#ifdef DEBUG -extern _X_EXPORT Bool miValidRegion( - RegionPtr /*prgn*/ -); -#endif - -extern _X_EXPORT Bool miRegionBroken(RegionPtr pReg); - /* miscrinit.c */ extern _X_EXPORT Bool miModifyPixmapHeader( @@ -480,7 +463,6 @@ extern _X_EXPORT DevPrivateKey miAllocateGCPrivateIndex( /* mivaltree.c */ extern _X_EXPORT int miShapedWindowIn( - ScreenPtr /*pScreen*/, RegionPtr /*universe*/, RegionPtr /*bounding*/, BoxPtr /*rect*/, @@ -567,7 +549,8 @@ extern _X_EXPORT WindowPtr miGetLayerWindow( ); extern _X_EXPORT void miSetShape( - WindowPtr /*pWin*/ + WindowPtr /*pWin*/, + int /*kind*/ ); extern _X_EXPORT void miChangeBorderWidth( diff --git a/xserver/mi/miarc.c b/xserver/mi/miarc.c index ddcbff78a..881e0db03 100644 --- a/xserver/mi/miarc.c +++ b/xserver/mi/miarc.c @@ -213,16 +213,6 @@ typedef struct _miPolyArc { miArcJoinPtr joins; } miPolyArcRec, *miPolyArcPtr; -#define GCValsFunction 0 -#define GCValsForeground 1 -#define GCValsBackground 2 -#define GCValsLineWidth 3 -#define GCValsCapStyle 4 -#define GCValsJoinStyle 5 -#define GCValsMask (GCFunction | GCForeground | GCBackground | \ - GCLineWidth | GCCapStyle | GCJoinStyle) -static CARD32 gcvals[6]; - static void fillSpans(DrawablePtr pDrawable, GCPtr pGC); static void newFinalSpan(int y, int xmin, int xmax); static void drawArc(xArc *tarc, int l, int a0, int a1, miArcFacePtr right, @@ -385,47 +375,10 @@ typedef struct { char top, bot, hole; } miArcSpanData; -typedef struct { - unsigned long lrustamp; - unsigned short lw; - unsigned short width, height; - miArcSpanData *spdata; -} arcCacheRec; - -#define CACHESIZE 25 - static void drawQuadrant(struct arc_def *def, struct accelerators *acc, int a0, int a1, int mask, miArcFacePtr right, miArcFacePtr left, miArcSpanData *spdata); -static arcCacheRec arcCache[CACHESIZE]; -static unsigned long lrustamp; -static arcCacheRec *lastCacheHit = &arcCache[0]; -static RESTYPE cacheType; - -static int -miFreeArcCache (pointer data, XID id) -{ - int k; - arcCacheRec *cent; - - if (id) - cacheType = 0; - - for (k = CACHESIZE, cent = &arcCache[0]; --k >= 0; cent++) - { - if (cent->spdata) - { - cent->lrustamp = 0; - cent->lw = 0; - xfree(cent->spdata); - cent->spdata = NULL; - } - } - lrustamp = 0; - return Success; -} - static void miComputeCircleSpans( int lw, @@ -829,76 +782,21 @@ tailX( } static miArcSpanData * -miComputeWideEllipse( - int lw, - xArc *parc, - Bool *mustFree) +miComputeWideEllipse(int lw, xArc *parc) { - miArcSpanData *spdata; - arcCacheRec *cent, *lruent; + miArcSpanData *spdata = NULL; int k; - arcCacheRec fakeent; if (!lw) lw = 1; - if (parc->height <= 1500) - { - *mustFree = FALSE; - cent = lastCacheHit; - if (cent->lw == lw && - cent->width == parc->width && cent->height == parc->height) - { - cent->lrustamp = ++lrustamp; - return cent->spdata; - } - lruent = &arcCache[0]; - for (k = CACHESIZE, cent = lruent; --k >= 0; cent++) - { - if (cent->lw == lw && - cent->width == parc->width && cent->height == parc->height) - { - cent->lrustamp = ++lrustamp; - lastCacheHit = cent; - return cent->spdata; - } - if (cent->lrustamp < lruent->lrustamp) - lruent = cent; - } - if (!cacheType) - { - cacheType = CreateNewResourceType(miFreeArcCache, "miArcCache"); - (void) AddResource(FakeClientID(0), cacheType, NULL); - } - } else { - lruent = &fakeent; - lruent->spdata = NULL; - *mustFree = TRUE; - } k = (parc->height >> 1) + ((lw - 1) >> 1); - spdata = lruent->spdata; - if (!spdata || spdata->k != k) - { - if (spdata) - xfree(spdata); - spdata = xalloc(sizeof(miArcSpanData) + sizeof(miArcSpan) * (k + 2)); - lruent->spdata = spdata; - if (!spdata) - { - lruent->lrustamp = 0; - lruent->lw = 0; - return spdata; - } - spdata->spans = (miArcSpan *)(spdata + 1); - spdata->k = k; - } + spdata = malloc(sizeof(miArcSpanData) + sizeof(miArcSpan) * (k + 2)); + if (!spdata) + return NULL; + spdata->spans = (miArcSpan *)(spdata + 1); + spdata->k = k; spdata->top = !(lw & 1) && !(parc->width & 1); spdata->bot = !(parc->height & 1); - lruent->lrustamp = ++lrustamp; - lruent->lw = lw; - lruent->width = parc->width; - lruent->height = parc->height; - if (lruent != &fakeent) - lastCacheHit = lruent; if (parc->width == parc->height) miComputeCircleSpans(lw, parc, spdata); else @@ -917,21 +815,20 @@ miFillWideEllipse( int *widths; int *wids; miArcSpanData *spdata; - Bool mustFree; miArcSpan *span; int xorg, yorgu, yorgl; int n; yorgu = parc->height + pGC->lineWidth; n = (sizeof(int) * 2) * yorgu; - widths = xalloc(n + (sizeof(DDXPointRec) * 2) * yorgu); + widths = malloc(n + (sizeof(DDXPointRec) * 2) * yorgu); if (!widths) return; points = (DDXPointPtr)((char *)widths + n); - spdata = miComputeWideEllipse((int)pGC->lineWidth, parc, &mustFree); + spdata = miComputeWideEllipse((int)pGC->lineWidth, parc); if (!spdata) { - xfree(widths); + free(widths); return; } pts = points; @@ -1020,11 +917,10 @@ miFillWideEllipse( wids += 2; } } - if (mustFree) - xfree(spdata); + free(spdata); (*pGC->ops->FillSpans)(pDraw, pGC, pts - points, points, widths, FALSE); - xfree(widths); + free(widths); } /* @@ -1139,13 +1035,18 @@ miPolyArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs) pGCTo = GetScratchGC(1, pDraw->pScreen); if (!pGCTo) return; - gcvals[GCValsFunction] = GXcopy; - gcvals[GCValsForeground] = 1; - gcvals[GCValsBackground] = 0; - gcvals[GCValsLineWidth] = pGC->lineWidth; - gcvals[GCValsCapStyle] = pGC->capStyle; - gcvals[GCValsJoinStyle] = pGC->joinStyle; - dixChangeGC(NullClient, pGCTo, GCValsMask, gcvals, NULL); + { + ChangeGCVal gcvals[6]; + gcvals[0].val = GXcopy; + gcvals[1].val = 1; + gcvals[2].val = 0; + gcvals[3].val = pGC->lineWidth; + gcvals[4].val = pGC->capStyle; + gcvals[5].val = pGC->joinStyle; + ChangeGC(NullClient, pGCTo, GCFunction | + GCForeground | GCBackground | GCLineWidth | + GCCapStyle | GCJoinStyle, gcvals); + } /* allocate a 1 bit deep pixmap of the appropriate size, and * validate it */ @@ -1184,11 +1085,14 @@ miPolyArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs) iphase >= 0; iphase--) { + ChangeGCVal gcval; if (iphase == 1) { - dixChangeGC (NullClient, pGC, GCForeground, &bg, NULL); + gcval.val = bg; + ChangeGC (NullClient, pGC, GCForeground, &gcval); ValidateGC (pDraw, pGC); } else if (pGC->lineStyle == LineDoubleDash) { - dixChangeGC (NullClient, pGC, GCForeground, &fg, NULL); + gcval.val = fg; + ChangeGC (NullClient, pGC, GCForeground, &gcval); ValidateGC (pDraw, pGC); } for (i = 0; i < polyArcs[iphase].narcs; i++) { @@ -1360,7 +1264,7 @@ miArcJoin(DrawablePtr pDraw, GCPtr pGC, miArcFacePtr pLeft, arc.height = width; arc.angle1 = -miDatan2 (corner.y - center.y, corner.x - center.x); arc.angle2 = a; - pArcPts = xalloc (3 * sizeof (SppPointRec)); + pArcPts = malloc(3 * sizeof (SppPointRec)); if (!pArcPts) return; pArcPts[0].x = otherCorner.x; @@ -1376,7 +1280,7 @@ miArcJoin(DrawablePtr pDraw, GCPtr pGC, miArcFacePtr pLeft, * rest of the line */ miFillSppPoly(pDraw, pGC, cpt, pArcPts, xOrg, yOrg, xFtrans, yFtrans); } - xfree(pArcPts); + free(pArcPts); return; case JoinMiter: /* @@ -1507,7 +1411,7 @@ miRoundCap( * rest of the line */ miFillSppPoly(pDraw, pGC, cpt, pArcPts, -xOrg, -yOrg, xFtrans, yFtrans); } - xfree(pArcPts); + free(pArcPts); } /* @@ -1605,10 +1509,10 @@ miDatan2 (double dy, double dx) * This procedure allocates the space necessary to fit the arc points. * Sometimes it's convenient for those points to be at the end of an existing * array. (For example, if we want to leave a spare point to make sectors - * instead of segments.) So we pass in the xalloc()ed chunk that contains the + * instead of segments.) So we pass in the malloc()ed chunk that contains the * array and an index saying where we should start stashing the points. * If there isn't an array already, we just pass in a null pointer and - * count on xrealloc() to handle the null pointer correctly. + * count on realloc() to handle the null pointer correctly. */ static int miGetArcPts( @@ -1655,9 +1559,9 @@ miGetArcPts( count++; cdt = 2 * miDcos(dt); - if (!(poly = (SppPointPtr) xrealloc((pointer)*ppPts, + if (!(poly = (SppPointPtr) realloc((pointer)*ppPts, (cpt + count) * sizeof(SppPointRec)))) - return(0); + return 0; *ppPts = poly; xc = parc->width/2.0; /* store half width and half height */ @@ -1694,7 +1598,7 @@ miGetArcPts( poly[cpt +i -1].y = (miDsin(st + et) * parc->height/2.0 + yc); } - return(count); + return count; } struct arcData { @@ -1718,7 +1622,7 @@ addCap ( if (*ncapsp == *sizep) { newsize = *sizep + ADD_REALLOC_STEP; - cap = (miArcCapPtr) xrealloc (*capsp, + cap = (miArcCapPtr) realloc(*capsp, newsize * sizeof (**capsp)); if (!cap) return; @@ -1749,7 +1653,7 @@ addJoin ( if (*njoinsp == *sizep) { newsize = *sizep + ADD_REALLOC_STEP; - join = (miArcJoinPtr) xrealloc (*joinsp, + join = (miArcJoinPtr) realloc(*joinsp, newsize * sizeof (**joinsp)); if (!join) return; @@ -1779,7 +1683,7 @@ addArc ( if (*narcsp == *sizep) { newsize = *sizep + ADD_REALLOC_STEP; - arc = (miArcDataPtr) xrealloc (*arcsp, + arc = (miArcDataPtr) realloc(*arcsp, newsize * sizeof (**arcsp)); if (!arc) return NULL; @@ -1804,13 +1708,13 @@ miFreeArcs( iphase--) { if (arcs[iphase].narcs > 0) - xfree(arcs[iphase].arcs); + free(arcs[iphase].arcs); if (arcs[iphase].njoins > 0) - xfree(arcs[iphase].joins); + free(arcs[iphase].joins); if (arcs[iphase].ncaps > 0) - xfree(arcs[iphase].caps); + free(arcs[iphase].caps); } - xfree(arcs); + free(arcs); } /* @@ -1894,13 +1798,13 @@ miComputeArcs ( isDoubleDash = (pGC->lineStyle == LineDoubleDash); dashOffset = pGC->dashOffset; - data = xalloc (narcs * sizeof (struct arcData)); + data = malloc(narcs * sizeof (struct arcData)); if (!data) return NULL; - arcs = xalloc (sizeof (*arcs) * (isDoubleDash ? 2 : 1)); + arcs = malloc(sizeof (*arcs) * (isDoubleDash ? 2 : 1)); if (!arcs) { - xfree(data); + free(data); return NULL; } for (i = 0; i < narcs; i++) { @@ -2249,11 +2153,11 @@ miComputeArcs ( arcs[iphase].arcs[arcs[iphase].narcs-1].cap = arcs[iphase].ncaps; } - xfree(data); + free(data); return arcs; arcfail: miFreeArcs(arcs, pGC); - xfree(data); + free(data); return NULL; } @@ -3110,7 +3014,7 @@ realAllocSpan (void) struct finalSpan *span; int i; - newChunk = xalloc (sizeof (struct finalSpanChunk)); + newChunk = malloc(sizeof (struct finalSpanChunk)); if (!newChunk) return (struct finalSpan *) NULL; newChunk->next = chunks; @@ -3133,11 +3037,11 @@ disposeFinalSpans (void) for (chunk = chunks; chunk; chunk = next) { next = chunk->next; - xfree (chunk); + free(chunk); } chunks = 0; freeFinalSpans = 0; - xfree(finalSpans); + free(finalSpans); finalSpans = 0; } @@ -3157,8 +3061,8 @@ fillSpans ( if (nspans == 0) return; - xSpan = xSpans = xalloc (nspans * sizeof (DDXPointRec)); - xWidth = xWidths = xalloc (nspans * sizeof (int)); + xSpan = xSpans = malloc(nspans * sizeof (DDXPointRec)); + xWidth = xWidths = malloc(nspans * sizeof (int)); if (xSpans && xWidths) { i = 0; @@ -3177,10 +3081,8 @@ fillSpans ( (*pGC->ops->FillSpans) (pDrawable, pGC, i, xSpans, xWidths, TRUE); } disposeFinalSpans (); - if (xSpans) - xfree (xSpans); - if (xWidths) - xfree (xWidths); + free(xSpans); + free(xWidths); finalMiny = 0; finalMaxy = -1; finalSize = 0; @@ -3215,7 +3117,7 @@ realFindSpan (int y) else change = SPAN_REALLOC; newSize = finalSize + change; - newSpans = xalloc(newSize * sizeof (struct finalSpan *)); + newSpans = malloc(newSize * sizeof (struct finalSpan *)); if (!newSpans) return NULL; newMiny = finalMiny; @@ -3228,12 +3130,12 @@ realFindSpan (int y) memmove(((char *) newSpans) + (finalMiny-newMiny) * sizeof (struct finalSpan *), (char *) finalSpans, finalSize * sizeof (struct finalSpan *)); - xfree (finalSpans); + free(finalSpans); } if ((i = finalMiny - newMiny) > 0) - bzero ((char *)newSpans, i * sizeof (struct finalSpan *)); + memset((char *)newSpans, 0, i * sizeof (struct finalSpan *)); if ((i = newMaxy - finalMaxy) > 0) - bzero ((char *)(newSpans + newSize - i), + memset((char *)(newSpans + newSize - i), 0, i * sizeof (struct finalSpan *)); finalSpans = newSpans; finalMaxy = newMaxy; @@ -3358,9 +3260,8 @@ drawArc ( int flipRight = 0, flipLeft = 0; int copyEnd = 0; miArcSpanData *spdata; - Bool mustFree; - spdata = miComputeWideEllipse(l, tarc, &mustFree); + spdata = miComputeWideEllipse(l, tarc); if (!spdata) return; @@ -3572,8 +3473,7 @@ drawArc ( left->counterClock = temp; } } - if (mustFree) - xfree(spdata); + free(spdata); } static void diff --git a/xserver/mi/mibank.c b/xserver/mi/mibank.c deleted file mode 100644 index 9e4d63162..000000000 --- a/xserver/mi/mibank.c +++ /dev/null @@ -1,2314 +0,0 @@ -/* - * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that copyright - * notice and this permission notice appear in supporting documentation, and - * that the name of Marc Aurele La France not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. Marc Aurele La France makes no representations - * about the suitability of this software for any purpose. It is provided - * "as-is" without express or implied warranty. - * - * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO - * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - -/* - * Copyright 1990,91,92,93 by Thomas Roell, Germany. - * Copyright 1991,92,93 by SGCS (Snitily Graphics Consulting Services), USA. - * - * Permission to use, copy, modify, distribute, and sell this software - * and its documentation for any purpose is hereby granted without fee, - * provided that the above copyright notice appear in all copies and - * that both that copyright notice and this permission notice appear - * in supporting documentation, and that the name of Thomas Roell nor - * SGCS be used in advertising or publicity pertaining to distribution - * of the software without specific, written prior permission. - * Thomas Roell nor SGCS makes no representations about the suitability - * of this software for any purpose. It is provided "as is" without - * express or implied warranty. - * - * THOMAS ROELL AND SGCS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS - * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS, IN NO EVENT SHALL THOMAS ROELL OR SGCS BE LIABLE FOR ANY - * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER - * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF - * CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - - -/* - * This thing originated from an idea of Edwin Goei and his bank switching - * code for the DEC TX board. - */ - -/* - * Heavily modified for the XFree86 Project to turn this into an mi wrapper. - * --- Marc Aurele La France (tsi@xfree86.org) - */ - -/* - * "Heavily modified", indeed! By the time this is finalized, there probably - * won't be much left of Roell's code... - * - * Miscellaneous notes: - * - Pixels with imbedded bank boundaries are required to be off-screen. There - * >might< be a way to fool the underlying framebuffer into dealing with - * partial pixels. - * - Plans to generalise this to do (hardware) colour plane switching have been - * dropped due to colour flashing concerns. - * - * TODO: - * - Re-instate shared and double banking for framebuffers whose pixmap formats - * don't describe how the server "sees" the screen. - * - Remove remaining assumptions that a pixmap's devPrivate field points - * directly to its pixel data. - */ - -/* #define NO_ALLOCA 1 */ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include "servermd.h" -#include "gcstruct.h" -#include "pixmapstr.h" -#include "scrnintstr.h" -#include "windowstr.h" -#include "mi.h" -#include "mibank.h" - -#define BANK_SINGLE 0 -#define BANK_SHARED 1 -#define BANK_DOUBLE 2 -#define BANK_NOBANK 3 - -typedef struct _miBankScreen -{ - miBankInfoRec BankInfo; - unsigned int nBankBPP; - unsigned int type; - - unsigned long nBitsPerBank; - unsigned long nBitsPerScanline; - unsigned long nPixelsPerScanlinePadUnit; - - PixmapPtr pScreenPixmap; - PixmapPtr pBankPixmap; - GCPtr pBankGC; - - int nBanks, maxRects; - RegionPtr *pBanks; - - pointer pbits; - - /* - * Screen Wrappers - */ - CreateScreenResourcesProcPtr CreateScreenResources; - ModifyPixmapHeaderProcPtr ModifyPixmapHeader; - CloseScreenProcPtr CloseScreen; - GetImageProcPtr GetImage; - GetSpansProcPtr GetSpans; - CreateGCProcPtr CreateGC; - CopyWindowProcPtr CopyWindow; -} miBankScreenRec, *miBankScreenPtr; - -typedef struct _miBankGC -{ - GCOps *wrappedOps, *unwrappedOps; - GCFuncs *wrappedFuncs, *unwrappedFuncs; - - Bool fastCopy, fastPlane; - - RegionPtr pBankedClips[1]; -} miBankGCRec, *miBankGCPtr; - -typedef struct _miBankQueue -{ - Bool fastBlit; - unsigned short srcBankNo; - unsigned short dstBankNo; - short x; - short y; - short w; - short h; -} miBankQueue; - -/* - * CAVEAT: This banking scheme requires that the DDX store Pixmap data in the - * server's address space. - */ - -#define ModifyPixmap(_pPix, _width, _devKind, _pbits) \ - (*pScreen->ModifyPixmapHeader)((_pPix), \ - (_width), -1, -1, -1, (_devKind), (_pbits)) - -#define SET_SINGLE_BANK(_pPix, _width, _devKind, _no) \ - ModifyPixmap(_pPix, _width, _devKind, \ - (char *)pScreenPriv->BankInfo.pBankA + \ - (*pScreenPriv->BankInfo.SetSourceAndDestinationBanks)(pScreen, (_no)) - \ - (pScreenPriv->BankInfo.BankSize * (_no))) - -#define SET_SOURCE_BANK(_pPix, _width, _devKind, _no) \ - ModifyPixmap(_pPix, _width, _devKind, \ - (char *)pScreenPriv->BankInfo.pBankA + \ - (*pScreenPriv->BankInfo.SetSourceBank)(pScreen, (_no)) - \ - (pScreenPriv->BankInfo.BankSize * (_no))) - -#define SET_DESTINATION_BANK(_pPix, _width, _devKind, _no) \ - ModifyPixmap(_pPix, _width, _devKind, \ - (char *)pScreenPriv->BankInfo.pBankB + \ - (*pScreenPriv->BankInfo.SetDestinationBank)(pScreen, (_no)) - \ - (pScreenPriv->BankInfo.BankSize * (_no))) - -#define xalloc_ARRAY(atype, ntype) xalloc((ntype) * sizeof(atype)) - -static int miBankScreenKeyIndex; -static DevPrivateKey miBankScreenKey = &miBankScreenKeyIndex; -static int miBankGCKeyIndex; -static DevPrivateKey miBankGCKey = &miBankGCKeyIndex; - -static unsigned long miBankGeneration = 0; - -#define BANK_SCRPRIVLVAL dixLookupPrivate(&pScreen->devPrivates, miBankScreenKey) - -#define BANK_SCRPRIVATE ((miBankScreenPtr)(BANK_SCRPRIVLVAL)) - -#define BANK_GCPRIVLVAL(pGC) dixLookupPrivate(&(pGC)->devPrivates, miBankGCKey) - -#define BANK_GCPRIVATE(pGC) ((miBankGCPtr)(BANK_GCPRIVLVAL(pGC))) - -#define PIXMAP_STATUS(_pPix) \ - pointer pbits = (_pPix)->devPrivate.ptr - -#define PIXMAP_SAVE(_pPix) \ - PIXMAP_STATUS(_pPix); \ - if (pbits == (pointer)pScreenPriv) \ - (_pPix)->devPrivate.ptr = pScreenPriv->pbits - -#define PIXMAP_RESTORE(_pPix) \ - (_pPix)->devPrivate.ptr = pbits - -#define BANK_SAVE \ - int width = pScreenPriv->pBankPixmap->drawable.width; \ - int devKind = pScreenPriv->pBankPixmap->devKind; \ - PIXMAP_SAVE(pScreenPriv->pBankPixmap) - -#define BANK_RESTORE \ - pScreenPriv->pBankPixmap->drawable.width = width; \ - pScreenPriv->pBankPixmap->devKind = devKind; \ - PIXMAP_RESTORE(pScreenPriv->pBankPixmap) - -#define SCREEN_STATUS \ - PIXMAP_STATUS(pScreenPriv->pScreenPixmap) - -#define SCREEN_SAVE \ - PIXMAP_SAVE(pScreenPriv->pScreenPixmap) - -#define SCREEN_RESTORE \ - PIXMAP_RESTORE(pScreenPriv->pScreenPixmap) - -#define SCREEN_INIT \ - miBankScreenPtr pScreenPriv = BANK_SCRPRIVATE - -#define SCREEN_UNWRAP(field) \ - pScreen->field = pScreenPriv->field - -#define SCREEN_WRAP(field, wrapper) \ - pScreenPriv->field = pScreen->field; \ - pScreen->field = wrapper - -#define GC_INIT(pGC) \ - miBankGCPtr pGCPriv = BANK_GCPRIVATE(pGC) - -#define GC_UNWRAP(pGC) \ - pGCPriv->unwrappedOps = (pGC)->ops; \ - pGCPriv->unwrappedFuncs = (pGC)->funcs; \ - (pGC)->ops = pGCPriv->wrappedOps; \ - (pGC)->funcs = pGCPriv->wrappedFuncs - -#define GC_WRAP(pGC) \ - pGCPriv->wrappedOps = (pGC)->ops; \ - pGCPriv->wrappedFuncs = (pGC)->funcs; \ - (pGC)->ops = pGCPriv->unwrappedOps; \ - (pGC)->funcs = pGCPriv->unwrappedFuncs - -#define IS_BANKED(pDrawable) \ - ((pbits == (pointer)pScreenPriv) && \ - (((DrawablePtr)(pDrawable))->type == DRAWABLE_WINDOW)) - -#define CLIP_SAVE \ - RegionPtr pOrigCompositeClip = pGC->pCompositeClip - -#define CLIP_RESTORE \ - pGC->pCompositeClip = pOrigCompositeClip - -#define GCOP_INIT \ - ScreenPtr pScreen = pGC->pScreen; \ - SCREEN_INIT; \ - GC_INIT(pGC) - -#define GCOP_UNWRAP \ - GC_UNWRAP(pGC) - -#define GCOP_WRAP \ - GC_WRAP(pGC) - -#define GCOP_TOP_PART \ - for (i = 0; i < pScreenPriv->nBanks; i++) \ - { \ - if (!(pGC->pCompositeClip = pGCPriv->pBankedClips[i])) \ - continue; \ - GCOP_UNWRAP; \ - SET_SINGLE_BANK(pScreenPriv->pScreenPixmap, -1, -1, i) - -#define GCOP_BOTTOM_PART \ - GCOP_WRAP; \ - } - -#define GCOP_SIMPLE(statement) \ - if (nArray > 0) \ - { \ - GCOP_INIT; \ - SCREEN_SAVE; \ - if (!IS_BANKED(pDrawable)) \ - { \ - GCOP_UNWRAP; \ - statement; \ - GCOP_WRAP; \ - } \ - else \ - { \ - int i; \ - CLIP_SAVE; \ - GCOP_TOP_PART; \ - statement; \ - GCOP_BOTTOM_PART; \ - CLIP_RESTORE; \ - } \ - SCREEN_RESTORE; \ - } - -#define GCOP_0D_ARGS mode, -#define GCOP_1D_ARGS -#define GCOP_2D_ARGS shape, mode, - -#define GCOP_COMPLEX(aop, atype) \ - if (nArray > 0) \ - { \ - GCOP_INIT; \ - SCREEN_SAVE; \ - if (!IS_BANKED(pDrawable)) \ - { \ - GCOP_UNWRAP; \ - (*pGC->ops->aop)(pDrawable, pGC, GCOP_ARGS nArray, pArray); \ - GCOP_WRAP; \ - } \ - else \ - { \ - atype *aarg = pArray, *acopy; \ - int i; \ - CLIP_SAVE; \ - if ((acopy = xalloc_ARRAY(atype, nArray))) \ - aarg = acopy; \ - GCOP_TOP_PART; \ - if (acopy) \ - memcpy(acopy, pArray, nArray * sizeof(atype)); \ - (*pGC->ops->aop)(pDrawable, pGC, GCOP_ARGS nArray, aarg); \ - GCOP_BOTTOM_PART; \ - xfree(acopy); \ - CLIP_RESTORE; \ - } \ - SCREEN_RESTORE; \ - } - -/********************* - * Utility functions * - *********************/ - -static int -miBankOf( - miBankScreenPtr pScreenPriv, - int x, - int y -) -{ - int iBank = ((x * (int)pScreenPriv->nBankBPP) + - (y * (long)pScreenPriv->nBitsPerScanline)) / - (long)pScreenPriv->nBitsPerBank; - - if (iBank < 0) - iBank = 0; - else if (iBank >= pScreenPriv->nBanks) - iBank = pScreenPriv->nBanks - 1; - - return iBank; -} - -#define FirstBankOf(_x, _y) miBankOf(pScreenPriv, (_x), (_y)) -#define LastBankOf(_x, _y) miBankOf(pScreenPriv, (_x) - 1, (_y)) - -/* Determine banking type from the BankInfoRec */ -static unsigned int -miBankDeriveType( - ScreenPtr pScreen, - miBankInfoPtr pBankInfo -) -{ - unsigned int type; - - if (pBankInfo->pBankA == pBankInfo->pBankB) - { - if (pBankInfo->SetSourceBank == pBankInfo->SetDestinationBank) - { - if (pBankInfo->SetSourceAndDestinationBanks != - pBankInfo->SetSourceBank) - return BANK_NOBANK; - - type = BANK_SINGLE; - } - else - { - if (pBankInfo->SetSourceAndDestinationBanks == - pBankInfo->SetDestinationBank) - return BANK_NOBANK; - if (pBankInfo->SetSourceAndDestinationBanks == - pBankInfo->SetSourceBank) - return BANK_NOBANK; - - type = BANK_SHARED; - } - } - else - { - if ((unsigned long)abs((char *)pBankInfo->pBankA - - (char *)pBankInfo->pBankB) < pBankInfo->BankSize) - return BANK_NOBANK; - - if (pBankInfo->SetSourceBank == pBankInfo->SetDestinationBank) - { - if (pBankInfo->SetSourceAndDestinationBanks != - pBankInfo->SetSourceBank) - return BANK_NOBANK; - } - else - { - if (pBankInfo->SetSourceAndDestinationBanks == - pBankInfo->SetDestinationBank) - return BANK_NOBANK; - } - - type = BANK_DOUBLE; - } - - /* - * Internal limitation: Currently, only single banking is supported when - * the pixmap format and the screen's pixel format are different. The - * following test is only partially successful at detecting this condition. - */ - if (pBankInfo->nBankDepth != pScreen->rootDepth) - type = BANK_SINGLE; - - return type; -} - -/* Least common multiple */ -static unsigned int -miLCM( - unsigned int x, - unsigned int y -) -{ - unsigned int m = x, n = y, o; - - while ((o = m % n)) - { - m = n; - n = o; - } - - return (x / n) * y; -} - -/****************** - * GCOps wrappers * - ******************/ - -static void -miBankFillSpans( - DrawablePtr pDrawable, - GCPtr pGC, - int nArray, - DDXPointPtr pptInit, - int *pwidthInit, - int fSorted -) -{ - GCOP_SIMPLE((*pGC->ops->FillSpans)(pDrawable, pGC, - nArray, pptInit, pwidthInit, fSorted)); -} - -static void -miBankSetSpans( - DrawablePtr pDrawable, - GCPtr pGC, - char *psrc, - DDXPointPtr ppt, - int *pwidth, - int nArray, - int fSorted -) -{ - GCOP_SIMPLE((*pGC->ops->SetSpans)(pDrawable, pGC, psrc, - ppt, pwidth, nArray, fSorted)); -} - -static void -miBankPutImage( - DrawablePtr pDrawable, - GCPtr pGC, - int depth, - int x, - int y, - int w, - int h, - int leftPad, - int format, - char *pImage -) -{ - if ((w > 0) && (h > 0)) - { - GCOP_INIT; - SCREEN_SAVE; - - if (!IS_BANKED(pDrawable)) - { - GCOP_UNWRAP; - - (*pGC->ops->PutImage)(pDrawable, pGC, depth, x, y, w, h, - leftPad, format, pImage); - - GCOP_WRAP; - } - else - { - int i, j; - - CLIP_SAVE; - - i = FirstBankOf(x + pDrawable->x, y + pDrawable->y); - j = LastBankOf(x + pDrawable->x + w, y + pDrawable->y + h); - for (; i <= j; i++) - { - if (!(pGC->pCompositeClip = pGCPriv->pBankedClips[i])) - continue; - - GCOP_UNWRAP; - - SET_SINGLE_BANK(pScreenPriv->pScreenPixmap, -1, -1, i); - - (*pGC->ops->PutImage)(pDrawable, pGC, depth, x, y, w, h, - leftPad, format, pImage); - - GCOP_WRAP; - } - - CLIP_RESTORE; - } - - SCREEN_RESTORE; - } -} - -/* - * Here the CopyArea/CopyPlane wrappers. First off, we have to clip against - * the source in order to make the minimal number of copies in case of slow - * systems. Also the exposure handling is quite tricky. Special attention - * is to be given to the way the copies are sequenced. The list of boxes after - * the source clip is used to build a workqueue, that contains the atomic - * copies (i.e. only from one bank to one bank). Doing so produces a minimal - * list of things to do. - */ -static RegionPtr -miBankCopy( - DrawablePtr pSrc, - DrawablePtr pDst, - GCPtr pGC, - int srcx, - int srcy, - int w, - int h, - int dstx, - int dsty, - unsigned long plane, - Bool SinglePlane -) -{ - int cx1, cy1, cx2, cy2; - int ns, nd, nse, nde, dx, dy, xorg = 0, yorg = 0; - int maxWidth = 0, maxHeight = 0, paddedWidth = 0; - int nBox, nBoxClipSrc, nBoxClipDst, nQueue; - BoxPtr pBox, pBoxClipSrc, pBoxClipDst; - BoxRec fastBox, ccBox; - RegionPtr ret = NULL, prgnSrcClip = NULL; - RegionRec rgnDst; - char *pImage = NULL; - miBankQueue *pQueue, *pQueueNew, *Queue; - miBankQueue *pQueueTmp, *pQueueNext, *pQueueBase; - Bool fastBlit, freeSrcClip, fastClip; - Bool fExpose = FALSE, fastExpose = FALSE; - - GCOP_INIT; - SCREEN_SAVE; - - if (!IS_BANKED(pSrc) && !IS_BANKED(pDst)) - { - GCOP_UNWRAP; - - if (SinglePlane) - ret = (*pGC->ops->CopyPlane)(pSrc, pDst, pGC, - srcx, srcy, w, h, dstx, dsty, plane); - else - ret = (*pGC->ops->CopyArea)(pSrc, pDst, pGC, - srcx, srcy, w, h, dstx, dsty); - - GCOP_WRAP; - } - else if (!IS_BANKED(pDst)) - { - fExpose = pGC->fExpose; - pGC->fExpose = FALSE; - - xorg = pSrc->x; - yorg = pSrc->y; - dx = dstx - srcx; - dy = dsty - srcy; - srcx += xorg; - srcy += yorg; - - ns = FirstBankOf(srcx, srcy); - nse = LastBankOf(srcx + w, srcy + h); - for (; ns <= nse; ns++) - { - if (!pScreenPriv->pBanks[ns]) - continue; - - nBox = REGION_NUM_RECTS(pScreenPriv->pBanks[ns]); - pBox = REGION_RECTS(pScreenPriv->pBanks[ns]); - - for (; nBox--; pBox++) - { - cx1 = max(pBox->x1, srcx); - cy1 = max(pBox->y1, srcy); - cx2 = min(pBox->x2, srcx + w); - cy2 = min(pBox->y2, srcy + h); - - if ((cx1 >= cx2) || (cy1 >= cy2)) - continue; - - GCOP_UNWRAP; - - SET_SINGLE_BANK(pScreenPriv->pScreenPixmap, -1, -1, ns); - - if (SinglePlane) - (*pGC->ops->CopyPlane)(pSrc, pDst, pGC, - cx1 - xorg, cy1 - yorg, - cx2 - cx1, cy2 - cy1, - cx1 + dx - xorg, cy1 + dy - yorg, plane); - else - (*pGC->ops->CopyArea)(pSrc, pDst, pGC, - cx1 - xorg, cy1 - yorg, - cx2 - cx1, cy2 - cy1, - cx1 + dx - xorg, cy1 + dy - yorg); - - GCOP_WRAP; - } - } - - pGC->fExpose = fExpose; - srcx -= xorg; - srcy -= yorg; - } - else if (!IS_BANKED(pSrc)) - { - CLIP_SAVE; - - if (pGC->miTranslate) - { - xorg = pDst->x; - yorg = pDst->y; - } - dx = srcx - dstx; - dy = srcy - dsty; - dstx += xorg; - dsty += yorg; - - nd = FirstBankOf(dstx, dsty); - nde = LastBankOf(dstx + w, dsty + h); - for (; nd <= nde; nd++) - { - if (!(pGC->pCompositeClip = pGCPriv->pBankedClips[nd])) - continue; - - /* - * It's faster to let the lower-level CopyArea do the clipping - * within each bank. - */ - nBox = REGION_NUM_RECTS(pScreenPriv->pBanks[nd]); - pBox = REGION_RECTS(pScreenPriv->pBanks[nd]); - - for (; nBox--; pBox++) - { - cx1 = max(pBox->x1, dstx); - cy1 = max(pBox->y1, dsty); - cx2 = min(pBox->x2, dstx + w); - cy2 = min(pBox->y2, dsty + h); - - if ((cx1 >= cx2) || (cy1 >= cy2)) - continue; - - GCOP_UNWRAP; - - SET_SINGLE_BANK(pScreenPriv->pScreenPixmap, -1, -1, nd); - - if (SinglePlane) - (*pGC->ops->CopyPlane)(pSrc, pDst, pGC, - cx1 + dx - xorg, cy1 + dy - yorg, - cx2 - cx1, cy2 - cy1, - cx1 - xorg, cy1 - yorg, plane); - else - (*pGC->ops->CopyArea)(pSrc, pDst, pGC, - cx1 + dx - xorg, cy1 + dy - yorg, - cx2 - cx1, cy2 - cy1, - cx1 - xorg, cy1 - yorg); - - GCOP_WRAP; - } - } - - CLIP_RESTORE; - } - else /* IS_BANKED(pSrc) && IS_BANKED(pDst) */ - { - CLIP_SAVE; - - fExpose = pGC->fExpose; - - fastBox.x1 = srcx + pSrc->x; - fastBox.y1 = srcy + pSrc->y; - fastBox.x2 = fastBox.x1 + w; - fastBox.y2 = fastBox.y1 + h; - - dx = dstx - fastBox.x1; - dy = dsty - fastBox.y1; - if (pGC->miTranslate) - { - xorg = pDst->x; - yorg = pDst->y; - } - - /* - * Clip against the source. Otherwise we will blit too much for SINGLE - * and SHARED banked systems. - */ - freeSrcClip = FALSE; - fastClip = FALSE; - fastExpose = FALSE; - - if (pGC->subWindowMode != IncludeInferiors) - prgnSrcClip = &((WindowPtr)pSrc)->clipList; - else if (!((WindowPtr)pSrc)->parent) - fastClip = TRUE; - else if ((pSrc == pDst) && (pGC->clientClipType == CT_NONE)) - prgnSrcClip = pGC->pCompositeClip; - else - { - prgnSrcClip = NotClippedByChildren((WindowPtr)pSrc); - freeSrcClip = TRUE; - } - - if (fastClip) - { - fastExpose = TRUE; - - /* - * Clip the source. If regions extend beyond the source size, make - * sure exposure events get sent. - */ - if (fastBox.x1 < pSrc->x) - { - fastBox.x1 = pSrc->x; - fastExpose = FALSE; - } - if (fastBox.y1 < pSrc->y) - { - fastBox.y1 = pSrc->y; - fastExpose = FALSE; - } - if (fastBox.x2 > pSrc->x + (int) pSrc->width) - { - fastBox.x2 = pSrc->x + (int) pSrc->width; - fastExpose = FALSE; - } - if (fastBox.y2 > pSrc->y + (int) pSrc->height) - { - fastBox.y2 = pSrc->y + (int) pSrc->height; - fastExpose = FALSE; - } - - nBox = 1; - pBox = &fastBox; - } - else - { - REGION_INIT(pScreen, &rgnDst, &fastBox, 1); - REGION_INTERSECT(pScreen, &rgnDst, &rgnDst, prgnSrcClip); - pBox = REGION_RECTS(&rgnDst); - nBox = REGION_NUM_RECTS(&rgnDst); - } - - /* - * fastBlit can only be TRUE if we don't need to worry about attempts - * to read partial pixels through the destination bank. - */ - if (SinglePlane) - fastBlit = pGCPriv->fastPlane; - else - fastBlit = pGCPriv->fastCopy; - - nQueue = nBox * pScreenPriv->maxRects * 2; - pQueue = Queue = xalloc_ARRAY(miBankQueue, nQueue); - - if (Queue) - { - for (; nBox--; pBox++) - { - ns = FirstBankOf(pBox->x1, pBox->y1); - nse = LastBankOf(pBox->x2, pBox->y2); - for (; ns <= nse; ns++) - { - if (!pScreenPriv->pBanks[ns]) - continue; - - nBoxClipSrc = REGION_NUM_RECTS(pScreenPriv->pBanks[ns]); - pBoxClipSrc = REGION_RECTS(pScreenPriv->pBanks[ns]); - - for (; nBoxClipSrc--; pBoxClipSrc++) - { - cx1 = max(pBox->x1, pBoxClipSrc->x1); - cy1 = max(pBox->y1, pBoxClipSrc->y1); - cx2 = min(pBox->x2, pBoxClipSrc->x2); - cy2 = min(pBox->y2, pBoxClipSrc->y2); - - /* Check to see if the region is empty */ - if ((cx1 >= cx2) || (cy1 >= cy2)) - continue; - - /* Translate c[xy]* to destination coordinates */ - cx1 += dx + xorg; - cy1 += dy + yorg; - cx2 += dx + xorg; - cy2 += dy + yorg; - - nd = FirstBankOf(cx1, cy1); - nde = LastBankOf(cx2, cy2); - for (; nd <= nde; nd++) - { - if (!pGCPriv->pBankedClips[nd]) - continue; - - /* - * Clients can send quite large clip descriptions, - * so use the bank clips here instead. - */ - nBoxClipDst = - REGION_NUM_RECTS(pScreenPriv->pBanks[nd]); - pBoxClipDst = - REGION_RECTS(pScreenPriv->pBanks[nd]); - - for (; nBoxClipDst--; pBoxClipDst++) - { - ccBox.x1 = max(cx1, pBoxClipDst->x1); - ccBox.y1 = max(cy1, pBoxClipDst->y1); - ccBox.x2 = min(cx2, pBoxClipDst->x2); - ccBox.y2 = min(cy2, pBoxClipDst->y2); - - /* Check to see if the region is empty */ - if ((ccBox.x1 >= ccBox.x2) || - (ccBox.y1 >= ccBox.y2)) - continue; - - pQueue->srcBankNo = ns; - pQueue->dstBankNo = nd; - pQueue->x = ccBox.x1 - xorg; - pQueue->y = ccBox.y1 - yorg; - pQueue->w = ccBox.x2 - ccBox.x1; - pQueue->h = ccBox.y2 - ccBox.y1; - - if (maxWidth < pQueue->w) - maxWidth = pQueue->w; - if (maxHeight < pQueue->h) - maxHeight = pQueue->h; - - /* - * When shared banking is used and the source - * and destination banks differ, prevent - * attempts to fetch partial scanline pad units - * through the destination bank. - */ - pQueue->fastBlit = fastBlit; - if (fastBlit && - (pScreenPriv->type == BANK_SHARED) && - (ns != nd) && - ((ccBox.x1 % - pScreenPriv->nPixelsPerScanlinePadUnit) || - (ccBox.x2 % - pScreenPriv->nPixelsPerScanlinePadUnit) || - (RECT_IN_REGION(pScreen, - pGCPriv->pBankedClips[nd], &ccBox) != - rgnIN))) - pQueue->fastBlit = FALSE; - pQueue++; - } - } - } - } - } - } - - if (!fastClip) - { - REGION_UNINIT(pScreen, &rgnDst); - if (freeSrcClip) - REGION_DESTROY(pScreen, prgnSrcClip); - } - - pQueueNew = pQueue; - nQueue = pQueue - Queue; - - if (nQueue > 0) - { - BANK_SAVE; - - pQueue = Queue; - - if ((nQueue > 1) && - ((pSrc == pDst) || (pGC->subWindowMode == IncludeInferiors))) - { - if ((srcy + pSrc->y) < (dsty + yorg)) - { - /* Sort from bottom to top */ - pQueueBase = pQueueNext = pQueue + nQueue - 1; - - while (pQueueBase >= pQueue) - { - while ((pQueueNext >= pQueue) && - (pQueueBase->y == pQueueNext->y)) - pQueueNext--; - - pQueueTmp = pQueueNext + 1; - while (pQueueTmp <= pQueueBase) - *pQueueNew++ = *pQueueTmp++; - - pQueueBase = pQueueNext; - } - - pQueueNew -= nQueue; - pQueue = pQueueNew; - pQueueNew = Queue; - } - - if ((srcx + pSrc->x) < (dstx + xorg)) - { - /* Sort from right to left */ - pQueueBase = pQueueNext = pQueue; - - while (pQueueBase < pQueue + nQueue) - { - while ((pQueueNext < pQueue + nQueue) && - (pQueueNext->y == pQueueBase->y)) - pQueueNext++; - - pQueueTmp = pQueueNext; - while (pQueueTmp != pQueueBase) - *pQueueNew++ = *--pQueueTmp; - - pQueueBase = pQueueNext; - } - - pQueueNew -= nQueue; - pQueue = pQueueNew; - } - } - - paddedWidth = PixmapBytePad(maxWidth, - pScreenPriv->pScreenPixmap->drawable.depth); - pImage = xalloc(paddedWidth * maxHeight); - - pGC->fExpose = FALSE; - - while (nQueue--) - { - pGC->pCompositeClip = pGCPriv->pBankedClips[pQueue->dstBankNo]; - - GCOP_UNWRAP; - - if (pQueue->srcBankNo == pQueue->dstBankNo) - { - SET_SINGLE_BANK(pScreenPriv->pScreenPixmap, - -1, -1, pQueue->srcBankNo); - - if (SinglePlane) - (*pGC->ops->CopyPlane)(pSrc, pDst, pGC, - pQueue->x - dx - pSrc->x, pQueue->y - dy - pSrc->y, - pQueue->w, pQueue->h, pQueue->x, pQueue->y, plane); - else - (*pGC->ops->CopyArea)(pSrc, pDst, pGC, - pQueue->x - dx - pSrc->x, pQueue->y - dy - pSrc->y, - pQueue->w, pQueue->h, pQueue->x, pQueue->y); - } - else if (pQueue->fastBlit) - { - SET_SOURCE_BANK (pScreenPriv->pBankPixmap, - pScreenPriv->pScreenPixmap->drawable.width, - pScreenPriv->pScreenPixmap->devKind, - pQueue->srcBankNo); - SET_DESTINATION_BANK(pScreenPriv->pScreenPixmap, - -1, -1, pQueue->dstBankNo); - - if (SinglePlane) - (*pGC->ops->CopyPlane)( - (DrawablePtr)pScreenPriv->pBankPixmap, pDst, pGC, - pQueue->x - dx, pQueue->y - dy, - pQueue->w, pQueue->h, pQueue->x, pQueue->y, plane); - else - (*pGC->ops->CopyArea)( - (DrawablePtr)pScreenPriv->pBankPixmap, pDst, pGC, - pQueue->x - dx, pQueue->y - dy, - pQueue->w, pQueue->h, pQueue->x, pQueue->y); - } - else if (pImage) - { - ModifyPixmap(pScreenPriv->pBankPixmap, - maxWidth, paddedWidth, pImage); - - SET_SINGLE_BANK(pScreenPriv->pScreenPixmap, - -1, -1, pQueue->srcBankNo); - - (*pScreenPriv->pBankGC->ops->CopyArea)( - pSrc, (DrawablePtr)pScreenPriv->pBankPixmap, - pScreenPriv->pBankGC, - pQueue->x - dx - pSrc->x, pQueue->y - dy - pSrc->y, - pQueue->w, pQueue->h, 0, 0); - - SET_SINGLE_BANK(pScreenPriv->pScreenPixmap, - -1, -1, pQueue->dstBankNo); - - if (SinglePlane) - (*pGC->ops->CopyPlane)( - (DrawablePtr)pScreenPriv->pBankPixmap, - pDst, pGC, 0, 0, pQueue->w, pQueue->h, - pQueue->x, pQueue->y, plane); - else - (*pGC->ops->CopyArea)( - (DrawablePtr)pScreenPriv->pBankPixmap, - pDst, pGC, 0, 0, pQueue->w, pQueue->h, - pQueue->x, pQueue->y); - } - - GCOP_WRAP; - - pQueue++; - } - - xfree(pImage); - - BANK_RESTORE; - } - - CLIP_RESTORE; - - pGC->fExpose = fExpose; - - xfree(Queue); - } - - SCREEN_RESTORE; - - if (!fExpose || fastExpose) - return ret; - - return miHandleExposures(pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty, 0); -} - -static RegionPtr -miBankCopyArea( - DrawablePtr pSrc, - DrawablePtr pDst, - GCPtr pGC, - int srcx, - int srcy, - int w, - int h, - int dstx, - int dsty -) -{ - return miBankCopy(pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty, 0, FALSE); -} - -static RegionPtr -miBankCopyPlane( - DrawablePtr pSrc, - DrawablePtr pDst, - GCPtr pGC, - int srcx, - int srcy, - int w, - int h, - int dstx, - int dsty, - unsigned long plane -) -{ - return - miBankCopy(pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty, plane, TRUE); -} - -static void -miBankPolyPoint( - DrawablePtr pDrawable, - GCPtr pGC, - int mode, - int nArray, - xPoint *pArray -) -{ -# define GCOP_ARGS GCOP_0D_ARGS - GCOP_COMPLEX(PolyPoint, xPoint); -# undef GCOP_ARGS -} - -static void -miBankPolylines( - DrawablePtr pDrawable, - GCPtr pGC, - int mode, - int nArray, - DDXPointPtr pArray -) -{ -# define GCOP_ARGS GCOP_0D_ARGS - GCOP_COMPLEX(Polylines, DDXPointRec); -# undef GCOP_ARGS -} - -static void -miBankPolySegment( - DrawablePtr pDrawable, - GCPtr pGC, - int nArray, - xSegment *pArray -) -{ -# define GCOP_ARGS GCOP_1D_ARGS - GCOP_COMPLEX(PolySegment, xSegment); -# undef GCOP_ARGS -} - -static void -miBankPolyRectangle( - DrawablePtr pDrawable, - GCPtr pGC, - int nArray, - xRectangle *pArray -) -{ -# define GCOP_ARGS GCOP_1D_ARGS - GCOP_COMPLEX(PolyRectangle, xRectangle); -# undef GCOP_ARGS -} - -static void -miBankPolyArc( - DrawablePtr pDrawable, - GCPtr pGC, - int nArray, - xArc *pArray -) -{ -# define GCOP_ARGS GCOP_1D_ARGS - GCOP_COMPLEX(PolyArc, xArc); -# undef GCOP_ARGS -} - -static void -miBankFillPolygon( - DrawablePtr pDrawable, - GCPtr pGC, - int shape, - int mode, - int nArray, - DDXPointRec *pArray -) -{ -# define GCOP_ARGS GCOP_2D_ARGS - GCOP_COMPLEX(FillPolygon, DDXPointRec); -# undef GCOP_ARGS -} - -static void -miBankPolyFillRect( - DrawablePtr pDrawable, - GCPtr pGC, - int nArray, - xRectangle *pArray -) -{ -# define GCOP_ARGS GCOP_1D_ARGS - GCOP_COMPLEX(PolyFillRect, xRectangle); -# undef GCOP_ARGS -} - -static void -miBankPolyFillArc( - DrawablePtr pDrawable, - GCPtr pGC, - int nArray, - xArc *pArray -) -{ -# define GCOP_ARGS GCOP_1D_ARGS - GCOP_COMPLEX(PolyFillArc, xArc); -# undef GCOP_ARGS -} - -static int -miBankPolyText8( - DrawablePtr pDrawable, - GCPtr pGC, - int x, - int y, - int nArray, - char *pchar -) -{ - int retval = x; - - GCOP_SIMPLE(retval = - (*pGC->ops->PolyText8)(pDrawable, pGC, x, y, nArray, pchar)); - - return retval; -} - -static int -miBankPolyText16( - DrawablePtr pDrawable, - GCPtr pGC, - int x, - int y, - int nArray, - unsigned short *pchar -) -{ - int retval = x; - - GCOP_SIMPLE(retval = - (*pGC->ops->PolyText16)(pDrawable, pGC, x, y, nArray, pchar)); - - return retval; -} - -static void -miBankImageText8( - DrawablePtr pDrawable, - GCPtr pGC, - int x, - int y, - int nArray, - char *pchar -) -{ - GCOP_SIMPLE((*pGC->ops->ImageText8)(pDrawable, pGC, x, y, nArray, pchar)); -} - -static void -miBankImageText16( - DrawablePtr pDrawable, - GCPtr pGC, - int x, - int y, - int nArray, - unsigned short *pchar -) -{ - GCOP_SIMPLE((*pGC->ops->ImageText16)(pDrawable, pGC, x, y, nArray, pchar)); -} - -static void -miBankImageGlyphBlt( - DrawablePtr pDrawable, - GCPtr pGC, - int x, - int y, - unsigned int nArray, - CharInfoPtr *ppci, - pointer pglyphBase -) -{ - GCOP_SIMPLE((*pGC->ops->ImageGlyphBlt)(pDrawable, pGC, - x, y, nArray, ppci, pglyphBase)); -} - -static void -miBankPolyGlyphBlt( - DrawablePtr pDrawable, - GCPtr pGC, - int x, - int y, - unsigned int nArray, - CharInfoPtr *ppci, - pointer pglyphBase -) -{ - GCOP_SIMPLE((*pGC->ops->PolyGlyphBlt)(pDrawable, pGC, - x, y, nArray, ppci, pglyphBase)); -} - -static void -miBankPushPixels( - GCPtr pGC, - PixmapPtr pBitmap, - DrawablePtr pDrawable, - int w, - int h, - int x, - int y -) -{ - if ((w > 0) && (h > 0)) - { - GCOP_INIT; - SCREEN_SAVE; - - if (!IS_BANKED(pDrawable)) - { - GCOP_UNWRAP; - - (*pGC->ops->PushPixels)(pGC, pBitmap, pDrawable, w, h, x, y); - - GCOP_WRAP; - } - else - { - int i, j; - - CLIP_SAVE; - - i = FirstBankOf(x, y); - j = LastBankOf(x + w, y + h); - for (; i <= j; i++) - { - if (!(pGC->pCompositeClip = pGCPriv->pBankedClips[i])) - continue; - - GCOP_UNWRAP; - - SET_SINGLE_BANK(pScreenPriv->pScreenPixmap, -1, -1, i); - - (*pGC->ops->PushPixels)(pGC, pBitmap, pDrawable, w, h, x, y); - - GCOP_WRAP; - } - - CLIP_RESTORE; - } - - SCREEN_RESTORE; - } -} - -static GCOps miBankGCOps = -{ - miBankFillSpans, - miBankSetSpans, - miBankPutImage, - miBankCopyArea, - miBankCopyPlane, - miBankPolyPoint, - miBankPolylines, - miBankPolySegment, - miBankPolyRectangle, - miBankPolyArc, - miBankFillPolygon, - miBankPolyFillRect, - miBankPolyFillArc, - miBankPolyText8, - miBankPolyText16, - miBankImageText8, - miBankImageText16, - miBankImageGlyphBlt, - miBankPolyGlyphBlt, - miBankPushPixels, - {NULL} /* devPrivate */ -}; - -/******************** - * GCFuncs wrappers * - ********************/ - -static void -miBankValidateGC( - GCPtr pGC, - unsigned long changes, - DrawablePtr pDrawable -) -{ - GC_INIT(pGC); - GC_UNWRAP(pGC); - - (*pGC->funcs->ValidateGC)(pGC, changes, pDrawable); - - if ((changes & (GCClipXOrigin|GCClipYOrigin|GCClipMask|GCSubwindowMode)) || - (pDrawable->serialNumber != (pGC->serialNumber & DRAWABLE_SERIAL_BITS))) - { - ScreenPtr pScreen = pGC->pScreen; - RegionPtr prgnClip; - unsigned long planemask; - int i; - - SCREEN_INIT; - SCREEN_SAVE; - - if (IS_BANKED(pDrawable)) - { - for (i = 0; i < pScreenPriv->nBanks; i++) - { - if (!pScreenPriv->pBanks[i]) - continue; - - if (!(prgnClip = pGCPriv->pBankedClips[i])) - prgnClip = REGION_CREATE(pScreen, NULL, 1); - - REGION_INTERSECT(pScreen, prgnClip, - pScreenPriv->pBanks[i], pGC->pCompositeClip); - - if ((REGION_NUM_RECTS(prgnClip) <= 1) && - ((prgnClip->extents.x1 == prgnClip->extents.x2) || - (prgnClip->extents.y1 == prgnClip->extents.y2))) - { - REGION_DESTROY(pScreen, prgnClip); - pGCPriv->pBankedClips[i] = NULL; - } - else - pGCPriv->pBankedClips[i] = prgnClip; - } - - /* - * fastCopy and fastPlane can only be TRUE if we don't need to - * worry about attempts to read partial pixels through the - * destination bank. - */ - switch (pScreenPriv->type) - { - case BANK_SHARED: - pGCPriv->fastCopy = pGCPriv->fastPlane = FALSE; - - if ((pGC->alu != GXclear) && (pGC->alu != GXcopy) && - (pGC->alu != GXcopyInverted) && (pGC->alu != GXset)) - break; - - if (pScreen->rootDepth == 1) - pGCPriv->fastPlane = TRUE; - - /* This is probably paranoia */ - if ((pDrawable->depth != pScreen->rootDepth) || - (pDrawable->depth != pGC->depth)) - break; - - planemask = (1 << pGC->depth) - 1; - if ((pGC->planemask & planemask) == planemask) - pGCPriv->fastCopy = TRUE; - - break; - - case BANK_DOUBLE: - pGCPriv->fastCopy = pGCPriv->fastPlane = TRUE; - break; - - default: - pGCPriv->fastCopy = pGCPriv->fastPlane = FALSE; - break; - } - } - else - { - /* - * Here we are on a pixmap and don't need all that special clipping - * stuff, hence free it. - */ - for (i = 0; i < pScreenPriv->nBanks; i++) - { - if (!pGCPriv->pBankedClips[i]) - continue; - - REGION_DESTROY(pScreen, pGCPriv->pBankedClips[i]); - pGCPriv->pBankedClips[i] = NULL; - } - } - - SCREEN_RESTORE; - } - - GC_WRAP(pGC); -} - -static void -miBankChangeGC( - GCPtr pGC, - unsigned long mask -) -{ - GC_INIT(pGC); - GC_UNWRAP(pGC); - - (*pGC->funcs->ChangeGC)(pGC, mask); - - GC_WRAP(pGC); -} - -static void -miBankCopyGC( - GCPtr pGCSrc, - unsigned long mask, - GCPtr pGCDst -) -{ - GC_INIT(pGCDst); - GC_UNWRAP(pGCDst); - - (*pGCDst->funcs->CopyGC)(pGCSrc, mask, pGCDst); - - GC_WRAP(pGCDst); -} - -static void -miBankDestroyGC( - GCPtr pGC -) -{ - ScreenPtr pScreen = pGC->pScreen; - int i; - - SCREEN_INIT; - GC_INIT(pGC); - GC_UNWRAP(pGC); - - (*pGC->funcs->DestroyGC)(pGC); - - for (i = 0; i < pScreenPriv->nBanks; i++) - { - if (!pGCPriv->pBankedClips[i]) - continue; - - REGION_DESTROY(pScreen, pGCPriv->pBankedClips[i]); - pGCPriv->pBankedClips[i] = NULL; - } - - GC_WRAP(pGC); -} - -static void -miBankChangeClip( - GCPtr pGC, - int type, - pointer pvalue, - int nrects -) -{ - GC_INIT(pGC); - GC_UNWRAP(pGC); - - (*pGC->funcs->ChangeClip)(pGC, type, pvalue, nrects); - - GC_WRAP(pGC); -} - -static void -miBankDestroyClip( - GCPtr pGC -) -{ - GC_INIT(pGC); - GC_UNWRAP(pGC); - - (*pGC->funcs->DestroyClip)(pGC); - - GC_WRAP(pGC); -} - -static void -miBankCopyClip( - GCPtr pGCDst, - GCPtr pGCSrc -) -{ - GC_INIT(pGCDst); - GC_UNWRAP(pGCDst); - - (*pGCDst->funcs->CopyClip)(pGCDst, pGCSrc); - - GC_WRAP(pGCDst); -} - -static GCFuncs miBankGCFuncs = -{ - miBankValidateGC, - miBankChangeGC, - miBankCopyGC, - miBankDestroyGC, - miBankChangeClip, - miBankDestroyClip, - miBankCopyClip -}; - -/******************* - * Screen Wrappers * - *******************/ - -static Bool -miBankCreateScreenResources( - ScreenPtr pScreen -) -{ - Bool retval; - - SCREEN_INIT; - SCREEN_UNWRAP(CreateScreenResources); - - if ((retval = (*pScreen->CreateScreenResources)(pScreen))) - { - /* Set screen buffer address to something recognizable */ - pScreenPriv->pScreenPixmap = (*pScreen->GetScreenPixmap)(pScreen); - pScreenPriv->pbits = pScreenPriv->pScreenPixmap->devPrivate.ptr; - pScreenPriv->pScreenPixmap->devPrivate.ptr = (pointer)pScreenPriv; - - /* Get shadow pixmap; width & height of 0 means no pixmap data */ - pScreenPriv->pBankPixmap = (*pScreen->CreatePixmap)(pScreen, 0, 0, - pScreenPriv->pScreenPixmap->drawable.depth, 0); - if (!pScreenPriv->pBankPixmap) - retval = FALSE; - } - - /* Shadow the screen */ - if (retval) - retval = (*pScreen->ModifyPixmapHeader)(pScreenPriv->pBankPixmap, - pScreenPriv->pScreenPixmap->drawable.width, - pScreenPriv->pScreenPixmap->drawable.height, - pScreenPriv->pScreenPixmap->drawable.depth, - pScreenPriv->pScreenPixmap->drawable.bitsPerPixel, - pScreenPriv->pScreenPixmap->devKind, NULL); - - /* Create shadow GC */ - if (retval) - { - pScreenPriv->pBankGC = CreateScratchGC(pScreen, - pScreenPriv->pBankPixmap->drawable.depth); - if (!pScreenPriv->pBankGC) - retval = FALSE; - } - - /* Validate shadow GC */ - if (retval) - { - pScreenPriv->pBankGC->graphicsExposures = FALSE; - pScreenPriv->pBankGC->subWindowMode = IncludeInferiors; - ValidateGC((DrawablePtr)pScreenPriv->pBankPixmap, - pScreenPriv->pBankGC); - } - - SCREEN_WRAP(CreateScreenResources, miBankCreateScreenResources); - - return retval; -} - -static Bool -miBankModifyPixmapHeader( - PixmapPtr pPixmap, - int width, - int height, - int depth, - int bitsPerPixel, - int devKind, - pointer pPixData -) -{ - Bool retval = FALSE; - - if (pPixmap) - { - ScreenPtr pScreen = pPixmap->drawable.pScreen; - - SCREEN_INIT; - PIXMAP_SAVE(pPixmap); - SCREEN_UNWRAP(ModifyPixmapHeader); - - retval = (*pScreen->ModifyPixmapHeader)(pPixmap, width, height, - depth, bitsPerPixel, devKind, pPixData); - - SCREEN_WRAP(ModifyPixmapHeader, miBankModifyPixmapHeader); - - if (pbits == (pointer)pScreenPriv) - { - pScreenPriv->pbits = pPixmap->devPrivate.ptr; - pPixmap->devPrivate.ptr = pbits; - } - } - - return retval; -} - -static Bool -miBankCloseScreen( - int nIndex, - ScreenPtr pScreen -) -{ - int i; - - SCREEN_INIT; - - /* Free shadow GC */ - FreeScratchGC(pScreenPriv->pBankGC); - - /* Free shadow pixmap */ - (*pScreen->DestroyPixmap)(pScreenPriv->pBankPixmap); - - /* Restore screen pixmap devPrivate pointer */ - pScreenPriv->pScreenPixmap->devPrivate.ptr = pScreenPriv->pbits; - - /* Delete bank clips */ - for (i = 0; i < pScreenPriv->nBanks; i++) - if (pScreenPriv->pBanks[i]) - REGION_DESTROY(pScreen, pScreenPriv->pBanks[i]); - - Xfree(pScreenPriv->pBanks); - - SCREEN_UNWRAP(CreateScreenResources); - SCREEN_UNWRAP(ModifyPixmapHeader); - SCREEN_UNWRAP(CloseScreen); - SCREEN_UNWRAP(GetImage); - SCREEN_UNWRAP(GetSpans); - SCREEN_UNWRAP(CreateGC); - SCREEN_UNWRAP(CopyWindow); - - Xfree(pScreenPriv); - return (*pScreen->CloseScreen)(nIndex, pScreen); -} - -static void -miBankGetImage( - DrawablePtr pDrawable, - int sx, - int sy, - int w, - int h, - unsigned int format, - unsigned long planemask, - char *pImage -) -{ - if ((w > 0) && (h > 0)) - { - ScreenPtr pScreen = pDrawable->pScreen; - - SCREEN_INIT; - SCREEN_STATUS; - SCREEN_UNWRAP(GetImage); - - if (!IS_BANKED(pDrawable)) - { - (*pScreen->GetImage)(pDrawable, sx, sy, w, h, - format, planemask, pImage); - } - else - { - int paddedWidth; - char *pBankImage; - - paddedWidth = PixmapBytePad(w, - pScreenPriv->pScreenPixmap->drawable.depth); - pBankImage = xalloc(paddedWidth * h); - - if (pBankImage) - { - BANK_SAVE; - - ModifyPixmap(pScreenPriv->pBankPixmap, w, paddedWidth, - pBankImage); - - (*pScreenPriv->pBankGC->ops->CopyArea)( - (DrawablePtr)WindowTable[pScreen->myNum], - (DrawablePtr)pScreenPriv->pBankPixmap, - pScreenPriv->pBankGC, - sx + pDrawable->x, sy + pDrawable->y, w, h, 0, 0); - - (*pScreen->GetImage)((DrawablePtr)pScreenPriv->pBankPixmap, - 0, 0, w, h, format, planemask, pImage); - - BANK_RESTORE; - - xfree(pBankImage); - } - } - - SCREEN_WRAP(GetImage, miBankGetImage); - } -} - -static void -miBankGetSpans( - DrawablePtr pDrawable, - int wMax, - DDXPointPtr ppt, - int *pwidth, - int nspans, - char *pImage -) -{ - if (nspans > 0) - { - ScreenPtr pScreen = pDrawable->pScreen; - - SCREEN_INIT; - SCREEN_STATUS; - SCREEN_UNWRAP(GetSpans); - - if (!IS_BANKED(pDrawable)) - { - (*pScreen->GetSpans)(pDrawable, wMax, ppt, pwidth, nspans, pImage); - } - else - { - char *pBankImage; - int paddedWidth; - DDXPointRec pt; - - pt.x = pt.y = 0; - - paddedWidth = - PixmapBytePad(pScreenPriv->pScreenPixmap->drawable.width, - pScreenPriv->pScreenPixmap->drawable.depth); - pBankImage = xalloc(paddedWidth); - - if (pBankImage) - { - BANK_SAVE; - - ModifyPixmap(pScreenPriv->pBankPixmap, - pScreenPriv->pScreenPixmap->drawable.width, - paddedWidth, pBankImage); - - for (; nspans--; ppt++, pwidth++) - { - if (*pwidth <= 0) - continue; - - (*pScreenPriv->pBankGC->ops->CopyArea)( - (DrawablePtr)WindowTable[pScreen->myNum], - (DrawablePtr)pScreenPriv->pBankPixmap, - pScreenPriv->pBankGC, - ppt->x, ppt->y, *pwidth, 1, 0, 0); - - (*pScreen->GetSpans)((DrawablePtr)pScreenPriv->pBankPixmap, - wMax, &pt, pwidth, 1, pImage); - - pImage = pImage + PixmapBytePad(*pwidth, pDrawable->depth); - } - - BANK_RESTORE; - - xfree(pBankImage); - } - } - - SCREEN_WRAP(GetSpans, miBankGetSpans); - } -} - -static Bool -miBankCreateGC( - GCPtr pGC -) -{ - ScreenPtr pScreen = pGC->pScreen; - miBankGCPtr pGCPriv = BANK_GCPRIVATE(pGC); - Bool ret; - - SCREEN_INIT; - SCREEN_UNWRAP(CreateGC); - - if ((ret = (*pScreen->CreateGC)(pGC))) - { - pGCPriv->unwrappedOps = &miBankGCOps; - pGCPriv->unwrappedFuncs = &miBankGCFuncs; - GC_WRAP(pGC); - - memset(&pGCPriv->pBankedClips, 0, - pScreenPriv->nBanks * sizeof(pGCPriv->pBankedClips)); - } - - SCREEN_WRAP(CreateGC, miBankCreateGC); - - return ret; -} - -static void -miBankCopyWindow( - WindowPtr pWindow, - DDXPointRec ptOldOrg, - RegionPtr pRgnSrc -) -{ - ScreenPtr pScreen = pWindow->drawable.pScreen; - GCPtr pGC; - int dx, dy, nBox; - DrawablePtr pDrawable = (DrawablePtr)WindowTable[pScreen->myNum]; - RegionPtr pRgnDst; - BoxPtr pBox, pBoxTmp, pBoxNext, pBoxBase, pBoxNew1, pBoxNew2; - XID subWindowMode = IncludeInferiors; - - pGC = GetScratchGC(pDrawable->depth, pScreen); - - ChangeGC(pGC, GCSubwindowMode, &subWindowMode); - ValidateGC(pDrawable, pGC); - - pRgnDst = REGION_CREATE(pScreen, NULL, 1); - - dx = ptOldOrg.x - pWindow->drawable.x; - dy = ptOldOrg.y - pWindow->drawable.y; - REGION_TRANSLATE(pScreen, pRgnSrc, -dx, -dy); - REGION_INTERSECT(pScreen, pRgnDst, &pWindow->borderClip, pRgnSrc); - - pBox = REGION_RECTS(pRgnDst); - nBox = REGION_NUM_RECTS(pRgnDst); - - pBoxNew1 = NULL; - pBoxNew2 = NULL; - - if (nBox > 1) - { - if (dy < 0) - { - /* Sort boxes from bottom to top */ - pBoxNew1 = xalloc_ARRAY(BoxRec, nBox); - - if (pBoxNew1) - { - pBoxBase = pBoxNext = pBox + nBox - 1; - - while (pBoxBase >= pBox) - { - while ((pBoxNext >= pBox) && - (pBoxBase->y1 == pBoxNext->y1)) - pBoxNext--; - - pBoxTmp = pBoxNext + 1; - - while (pBoxTmp <= pBoxBase) - *pBoxNew1++ = *pBoxTmp++; - - pBoxBase = pBoxNext; - } - - pBoxNew1 -= nBox; - pBox = pBoxNew1; - } - } - - if (dx < 0) - { - /* Sort boxes from right to left */ - pBoxNew2 = xalloc_ARRAY(BoxRec, nBox); - - if (pBoxNew2) - { - pBoxBase = pBoxNext = pBox; - - while (pBoxBase < pBox + nBox) - { - while ((pBoxNext < pBox + nBox) && - (pBoxNext->y1 == pBoxBase->y1)) - pBoxNext++; - - pBoxTmp = pBoxNext; - - while (pBoxTmp != pBoxBase) - *pBoxNew2++ = *--pBoxTmp; - - pBoxBase = pBoxNext; - } - - pBoxNew2 -= nBox; - pBox = pBoxNew2; - } - } - } - - while (nBox--) - { - (*pGC->ops->CopyArea)(pDrawable, pDrawable, pGC, - pBox->x1 + dx, pBox->y1 + dy, - pBox->x2 - pBox->x1, pBox->y2 - pBox->y1, - pBox->x1, pBox->y1); - - pBox++; - } - - FreeScratchGC(pGC); - - REGION_DESTROY(pScreen, pRgnDst); - - xfree(pBoxNew2); - xfree(pBoxNew1); -} - -Bool -miInitializeBanking( - ScreenPtr pScreen, - unsigned int xsize, - unsigned int ysize, - unsigned int width, - miBankInfoPtr pBankInfo -) -{ - miBankScreenPtr pScreenPriv; - unsigned long nBitsPerBank, nBitsPerScanline, nPixelsPerScanlinePadUnit; - unsigned long BankBase, ServerPad; - unsigned int type, iBank, nBanks, maxRects, we, nBankBPP; - int i; - - if (!pBankInfo || !pBankInfo->BankSize) - return TRUE; /* No banking required */ - - /* Sanity checks */ - - if (!pScreen || !xsize || !ysize || (xsize > width) || - !pBankInfo->SetSourceBank || !pBankInfo->SetDestinationBank || - !pBankInfo->SetSourceAndDestinationBanks || - !pBankInfo->pBankA || !pBankInfo->pBankB || - !pBankInfo->nBankDepth) - return FALSE; - - /* - * DDX *must* have registered a pixmap format whose depth is - * pBankInfo->nBankDepth. This is not necessarily the rootDepth - * pixmap format. - */ - i = 0; - while (screenInfo.formats[i].depth != pBankInfo->nBankDepth) - if (++i >= screenInfo.numPixmapFormats) - return FALSE; - nBankBPP = screenInfo.formats[i].bitsPerPixel; - - i = 0; - while (screenInfo.formats[i].depth != pScreen->rootDepth) - if (++i >= screenInfo.numPixmapFormats) - return FALSE; - - if (nBankBPP > screenInfo.formats[i].bitsPerPixel) - return FALSE; - - /* Determine banking type */ - if ((type = miBankDeriveType(pScreen, pBankInfo)) == BANK_NOBANK) - return FALSE; - - /* Internal data */ - - nBitsPerBank = pBankInfo->BankSize * 8; - ServerPad = PixmapBytePad(1, pBankInfo->nBankDepth) * 8; - if (nBitsPerBank % ServerPad) - return FALSE; - nBitsPerScanline = PixmapBytePad(width, pBankInfo->nBankDepth) * 8; - nBanks = ((nBitsPerScanline * (ysize - 1)) + - (nBankBPP * xsize) + nBitsPerBank - 1) / nBitsPerBank; - nPixelsPerScanlinePadUnit = miLCM(ServerPad, nBankBPP) / nBankBPP; - - /* Private areas */ - - if (miBankGeneration != serverGeneration) - miBankGeneration = serverGeneration; - - if (!dixRequestPrivate(miBankGCKey, - (nBanks * sizeof(RegionPtr)) + - (sizeof(miBankGCRec) - sizeof(RegionPtr)))) - return FALSE; - - if (!(pScreenPriv = (miBankScreenPtr)Xcalloc(sizeof(miBankScreenRec)))) - return FALSE; - - if (!(pScreenPriv->pBanks = /* Allocate and clear */ - (RegionPtr *)Xcalloc(nBanks * sizeof(RegionPtr)))) - { - Xfree(pScreenPriv); - return FALSE; - } - - /* - * Translate banks into clipping regions which are themselves clipped - * against the screen. This also ensures that pixels with imbedded bank - * boundaries are off-screen. - */ - - BankBase = 0; - maxRects = 0; - we = 0; - for (iBank = 0; iBank < nBanks; iBank++) - { - xRectangle pRects[3], *pRect = pRects; - unsigned int xb, yb, xe, ye; - - xb = ((BankBase + nBankBPP - 1) % nBitsPerScanline) / nBankBPP; - yb = (BankBase + nBankBPP - 1) / nBitsPerScanline; - if (xb >= xsize) - { - xb = we = 0; - yb++; - } - if (yb >= ysize) - { - we = 0; - break; - } - - if (we) - break; - - BankBase += nBitsPerBank; - - we = (BankBase % nBitsPerScanline) % nBankBPP; - xe = (BankBase % nBitsPerScanline) / nBankBPP; - ye = BankBase / nBitsPerScanline; - if (xe >= xsize) - { - we = xe = 0; - ye++; - } - if (ye >= ysize) - { - we = xe = 0; - ye = ysize; - } - - if (yb == ye) - { - if (xb >= xe) - continue; - - pRect->x = xb; - pRect->y = yb; - pRect->width = xe - xb; - pRect->height = 1; - maxRects += 2; - pRect++; - } - else - { - if (xb) - { - pRect->x = xb; - pRect->y = yb++; - pRect->width = xsize - xb; - pRect->height = 1; - maxRects += 2; - pRect++; - } - - if (yb < ye) - { - pRect->x = 0; - pRect->y = yb; - pRect->width = xsize; - pRect->height = ye - yb; - maxRects += min(pRect->height, 3) + 1; - pRect++; - } - - if (xe) - { - pRect->x = 0; - pRect->y = ye; - pRect->width = xe; - pRect->height = 1; - maxRects += 2; - pRect++; - } - } - - pScreenPriv->pBanks[iBank] = - RECTS_TO_REGION(pScreen, pRect - pRects, pRects, 0); - if (!pScreenPriv->pBanks[iBank] || - REGION_NAR(pScreenPriv->pBanks[iBank])) - { - we = 1; - break; - } - } - - if (we && (iBank < nBanks)) - { - for (i = iBank; i >= 0; i--) - if (pScreenPriv->pBanks[i]) - REGION_DESTROY(pScreen, pScreenPriv->pBanks[i]); - - Xfree(pScreenPriv->pBanks); - Xfree(pScreenPriv); - - return FALSE; - } - - /* Open for business */ - - pScreenPriv->type = type; - pScreenPriv->nBanks = nBanks; - pScreenPriv->maxRects = maxRects; - pScreenPriv->nBankBPP = nBankBPP; - pScreenPriv->BankInfo = *pBankInfo; - pScreenPriv->nBitsPerBank = nBitsPerBank; - pScreenPriv->nBitsPerScanline = nBitsPerScanline; - pScreenPriv->nPixelsPerScanlinePadUnit = nPixelsPerScanlinePadUnit; - - SCREEN_WRAP(CreateScreenResources, miBankCreateScreenResources); - SCREEN_WRAP(ModifyPixmapHeader, miBankModifyPixmapHeader); - SCREEN_WRAP(CloseScreen, miBankCloseScreen); - SCREEN_WRAP(GetImage, miBankGetImage); - SCREEN_WRAP(GetSpans, miBankGetSpans); - SCREEN_WRAP(CreateGC, miBankCreateGC); - SCREEN_WRAP(CopyWindow, miBankCopyWindow); - - dixSetPrivate(&pScreen->devPrivates, miBankScreenKey, pScreenPriv); - - return TRUE; -} - -/* - * Given various screen attributes, determine the minimum scanline width such - * that each scanline is server and DDX padded and any pixels with imbedded - * bank boundaries are off-screen. This function returns -1 if such a width - * cannot exist. This function exists because the DDX needs to be able to - * determine this width before initializing a frame buffer. - */ -int -miScanLineWidth( - unsigned int xsize, /* pixels */ - unsigned int ysize, /* pixels */ - unsigned int width, /* pixels */ - unsigned long BankSize, /* char's */ - PixmapFormatRec *pBankFormat, - unsigned int nWidthUnit /* bits */ -) -{ - unsigned long nBitsPerBank, nBitsPerScanline, nBitsPerScanlinePadUnit; - unsigned long minBitsPerScanline, maxBitsPerScanline; - - /* Sanity checks */ - - if (!nWidthUnit || !pBankFormat) - return -1; - - nBitsPerBank = BankSize * 8; - if (nBitsPerBank % pBankFormat->scanlinePad) - return -1; - - if (xsize > width) - width = xsize; - nBitsPerScanlinePadUnit = miLCM(pBankFormat->scanlinePad, nWidthUnit); - nBitsPerScanline = - (((width * pBankFormat->bitsPerPixel) + nBitsPerScanlinePadUnit - 1) / - nBitsPerScanlinePadUnit) * nBitsPerScanlinePadUnit; - width = nBitsPerScanline / pBankFormat->bitsPerPixel; - - if (!xsize || !(nBitsPerBank % pBankFormat->bitsPerPixel)) - return (int)width; - - /* - * Scanlines will be server-pad aligned at this point. They will also be - * a multiple of nWidthUnit bits long. Ensure that pixels with imbedded - * bank boundaries are off-screen. - * - * It seems reasonable to limit total frame buffer size to 1/16 of the - * theoretical maximum address space size. On a machine with 32-bit - * addresses (to 8-bit quantities) this turns out to be 256MB. Not only - * does this provide a simple limiting condition for the loops below, but - * it also prevents unsigned long wraparounds. - */ - if (!ysize) - return -1; - - minBitsPerScanline = xsize * pBankFormat->bitsPerPixel; - if (minBitsPerScanline > nBitsPerBank) - return -1; - - if (ysize == 1) - return (int)width; - - maxBitsPerScanline = - (((unsigned long)(-1) >> 1) - minBitsPerScanline) / (ysize - 1); - while (nBitsPerScanline <= maxBitsPerScanline) - { - unsigned long BankBase, BankUnit; - - BankUnit = ((nBitsPerBank + nBitsPerScanline - 1) / nBitsPerBank) * - nBitsPerBank; - if (!(BankUnit % nBitsPerScanline)) - return (int)width; - - for (BankBase = BankUnit; ; BankBase += nBitsPerBank) - { - unsigned long x, y; - - y = BankBase / nBitsPerScanline; - if (y >= ysize) - return (int)width; - - x = BankBase % nBitsPerScanline; - if (!(x % pBankFormat->bitsPerPixel)) - continue; - - if (x < minBitsPerScanline) - { - /* - * Skip ahead certain widths by dividing the excess scanline - * amongst the y's. - */ - y *= nBitsPerScanlinePadUnit; - nBitsPerScanline += - ((x + y - 1) / y) * nBitsPerScanlinePadUnit; - width = nBitsPerScanline / pBankFormat->bitsPerPixel; - break; - } - - if (BankBase != BankUnit) - continue; - - if (!(nBitsPerScanline % x)) - return (int)width; - - BankBase = ((nBitsPerScanline - minBitsPerScanline) / - (nBitsPerScanline - x)) * BankUnit; - } - } - - return -1; -} diff --git a/xserver/mi/mibank.h b/xserver/mi/mibank.h deleted file mode 100644 index 0c10540a7..000000000 --- a/xserver/mi/mibank.h +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright 1997 through 2004 by Marc Aurele La France (TSI @ UQV), tsi@xfree86.org - * - * Permission to use, copy, modify, distribute, and sell this software and its - * documentation for any purpose is hereby granted without fee, provided that - * the above copyright notice appear in all copies and that both that copyright - * notice and this permission notice appear in supporting documentation, and - * that the name of Marc Aurele La France not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. Marc Aurele La France makes no representations - * about the suitability of this software for any purpose. It is provided - * "as-is" without express or implied warranty. - * - * MARC AURELE LA FRANCE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, - * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO - * EVENT SHALL MARC AURELE LA FRANCE BE LIABLE FOR ANY SPECIAL, INDIRECT OR - * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - * PERFORMANCE OF THIS SOFTWARE. - */ - - -#ifndef __MIBANK_H__ -#define __MIBANK_H__ 1 - -#include "scrnintstr.h" - -/* - * Banking external interface. - */ - -/* - * This is the banking function type. The return value is normally zero. - * Non-zero returns can be used to implement the likes of scanline interleave, - * etc. - */ -typedef int miBankProc( - ScreenPtr /*pScreen*/, - unsigned int /*iBank*/ -); - -typedef miBankProc *miBankProcPtr; - -typedef struct _miBankInfo -{ - /* - * Banking refers to the use of one or more apertures (in the server's - * address space) to access various parts of a potentially larger hardware - * frame buffer. - * - * Three different banking schemes are supported: - * - * Single banking is indicated when pBankA and pBankB are equal and all - * three miBankProcPtr's point to the same function. Here, both reads and - * writes through the aperture access the same hardware location. - * - * Shared banking is indicated when pBankA and pBankB are equal but the - * source and destination functions differ. Here reads through the - * aperture do not necessarily access the same hardware location as writes. - * - * Double banking is indicated when pBankA and pBankB differ. Here two - * independent apertures are used to provide read/write access to - * potentially different hardware locations. - * - * Any other combination will result in no banking. - */ - miBankProcPtr SetSourceBank; /* Set pBankA bank number */ - miBankProcPtr SetDestinationBank; /* Set pBankB bank number */ - miBankProcPtr SetSourceAndDestinationBanks; /* Set both bank numbers */ - - pointer pBankA; /* First aperture location */ - pointer pBankB; /* First or second aperture location */ - - /* - * BankSize is in units of sizeof(char) and is the size of each bank. - */ - unsigned long BankSize; - - /* - * nBankDepth is the colour depth associated with the maximum number of a - * pixel's bits that are simultaneously accessible through the frame buffer - * aperture. - */ - unsigned int nBankDepth; -} miBankInfoRec, *miBankInfoPtr; - -extern _X_EXPORT Bool -miInitializeBanking( - ScreenPtr /*pScreen*/, - unsigned int /*xsize*/, - unsigned int /*ysize*/, - unsigned int /*width*/, - miBankInfoPtr /*pBankInfo*/ -); - -/* - * This function determines the minimum screen width, given a initial estimate - * and various screen attributes. DDX needs to determine this width before - * initializing the screen. - */ -extern _X_EXPORT int -miScanLineWidth( - unsigned int /*xsize*/, - unsigned int /*ysize*/, - unsigned int /*width*/, - unsigned long /*BankSize*/, - PixmapFormatRec * /*pBankFormat*/, - unsigned int /*nWidthUnit*/ -); - -#endif /* __MIBANK_H__ */ diff --git a/xserver/mi/mibitblt.c b/xserver/mi/mibitblt.c index cc8b11d9c..49e17bde6 100644 --- a/xserver/mi/mibitblt.c +++ b/xserver/mi/mibitblt.c @@ -116,7 +116,7 @@ miCopyArea(DrawablePtr pSrcDrawable, box.x2 = pSrcDrawable->x + (int) pSrcDrawable->width; box.y2 = pSrcDrawable->y + (int) pSrcDrawable->height; - prgnSrcClip = REGION_CREATE(pGC->pScreen, &box, 1); + prgnSrcClip = RegionCreate(&box, 1); realSrcClip = 1; } else @@ -143,19 +143,16 @@ miCopyArea(DrawablePtr pSrcDrawable, dsty += pDstDrawable->y; } - pptFirst = ppt = xalloc(heightSrc * sizeof(DDXPointRec)); - pwidthFirst = pwidth = xalloc(heightSrc * sizeof(unsigned int)); - numRects = REGION_NUM_RECTS(prgnSrcClip); - boxes = REGION_RECTS(prgnSrcClip); - ordering = xalloc(numRects * sizeof(unsigned int)); + pptFirst = ppt = malloc(heightSrc * sizeof(DDXPointRec)); + pwidthFirst = pwidth = malloc(heightSrc * sizeof(unsigned int)); + numRects = RegionNumRects(prgnSrcClip); + boxes = RegionRects(prgnSrcClip); + ordering = malloc(numRects * sizeof(unsigned int)); if(!pptFirst || !pwidthFirst || !ordering) { - if (ordering) - xfree(ordering); - if (pwidthFirst) - xfree(pwidthFirst); - if (pptFirst) - xfree(pptFirst); + free(ordering); + free(pwidthFirst); + free(pptFirst); return NULL; } @@ -235,7 +232,7 @@ miCopyArea(DrawablePtr pSrcDrawable, ppt++->y = y++; *pwidth++ = width; } - pbits = xalloc(height * PixmapBytePad(width, pSrcDrawable->depth)); + pbits = malloc(height * PixmapBytePad(width, pSrcDrawable->depth)); if (pbits) { (*pSrcDrawable->pScreen->GetSpans)(pSrcDrawable, width, pptFirst, @@ -253,17 +250,17 @@ miCopyArea(DrawablePtr pSrcDrawable, (*pGC->ops->SetSpans)(pDstDrawable, pGC, (char *)pbits, pptFirst, (int *)pwidthFirst, height, TRUE); - xfree(pbits); + free(pbits); } } prgnExposed = miHandleExposures(pSrcDrawable, pDstDrawable, pGC, xIn, yIn, widthSrc, heightSrc, xOut, yOut, (unsigned long)0); if(realSrcClip) - REGION_DESTROY(pGC->pScreen, prgnSrcClip); + RegionDestroy(prgnSrcClip); - xfree(ordering); - xfree(pwidthFirst); - xfree(pptFirst); + free(ordering); + free(pwidthFirst); + free(pptFirst); return prgnExposed; } @@ -313,7 +310,7 @@ miGetPlane( sy += pDraw->y; widthInBytes = BitmapBytePad(w); if(!result) - result = xcalloc(h, widthInBytes); + result = calloc(h, widthInBytes); if (!result) return NULL; bitsPerPixel = pDraw->bitsPerPixel; @@ -382,7 +379,7 @@ miGetPlane( pOut += delta; } } - return(result); + return result; } @@ -426,15 +423,15 @@ miOpqStipDrawable(DrawablePtr pDraw, GCPtr pGC, RegionPtr prgnSrc, } /* First set the whole pixmap to 0 */ gcv[0].val = 0; - dixChangeGC(NullClient, pGCT, GCBackground, NULL, gcv); + ChangeGC(NullClient, pGCT, GCBackground, gcv); ValidateGC((DrawablePtr)pPixmap, pGCT); miClearDrawable((DrawablePtr)pPixmap, pGCT); - ppt = pptFirst = xalloc(h * sizeof(DDXPointRec)); - pwidth = pwidthFirst = xalloc(h * sizeof(int)); + ppt = pptFirst = malloc(h * sizeof(DDXPointRec)); + pwidth = pwidthFirst = malloc(h * sizeof(int)); if(!pptFirst || !pwidthFirst) { - if (pwidthFirst) xfree(pwidthFirst); - if (pptFirst) xfree(pptFirst); + free(pwidthFirst); + free(pptFirst); FreeScratchGC(pGCT); return; } @@ -443,9 +440,9 @@ miOpqStipDrawable(DrawablePtr pDraw, GCPtr pGC, RegionPtr prgnSrc, to destroy what it's sent. note that this means we don't have to free prgnSrcClip ourselves. */ - prgnSrcClip = REGION_CREATE(pGCT->pScreen, NULL, 0); - REGION_COPY(pGCT->pScreen, prgnSrcClip, prgnSrc); - REGION_TRANSLATE(pGCT->pScreen, prgnSrcClip, srcx, 0); + prgnSrcClip = RegionCreate(NULL, 0); + RegionCopy(prgnSrcClip, prgnSrc); + RegionTranslate(prgnSrcClip, srcx, 0); (*pGCT->funcs->ChangeClip)(pGCT, CT_REGION, prgnSrcClip, 0); ValidateGC((DrawablePtr)pPixmap, pGCT); @@ -460,8 +457,8 @@ miOpqStipDrawable(DrawablePtr pDraw, GCPtr pGC, RegionPtr prgnSrc, (*pGCT->ops->SetSpans)((DrawablePtr)pPixmap, pGCT, (char *)pbits, pptFirst, pwidthFirst, h, TRUE); - xfree(pwidthFirst); - xfree(pptFirst); + free(pwidthFirst); + free(pptFirst); /* Save current values from the client GC */ @@ -477,9 +474,9 @@ miOpqStipDrawable(DrawablePtr pDraw, GCPtr pGC, RegionPtr prgnSrc, gcv[2].val = dstx - srcx; gcv[3].val = dsty; - dixChangeGC(NullClient, pGC, + ChangeGC(NullClient, pGC, GCFillStyle | GCStipple | GCTileStipXOrigin | GCTileStipYOrigin, - NULL, gcv); + gcv); ValidateGC(pDraw, pGC); /* Fill the drawable with the stipple. This will draw the @@ -495,7 +492,7 @@ miOpqStipDrawable(DrawablePtr pDraw, GCPtr pGC, RegionPtr prgnSrc, /* Invert the tiling pixmap. This sets 0s for 1s and 1s for 0s, only * within the clipping region, the part outside is still all 0s */ gcv[0].val = GXinvert; - dixChangeGC(NullClient, pGCT, GCFunction, NULL, gcv); + ChangeGC(NullClient, pGCT, GCFunction, gcv); ValidateGC((DrawablePtr)pPixmap, pGCT); (*pGCT->ops->CopyArea)((DrawablePtr)pPixmap, (DrawablePtr)pPixmap, pGCT, 0, 0, w + srcx, h, 0, 0); @@ -507,8 +504,7 @@ miOpqStipDrawable(DrawablePtr pDraw, GCPtr pGC, RegionPtr prgnSrc, gcv[0].val = pGC->bgPixel; gcv[1].val = oldfg; gcv[2].ptr = pPixmap; - dixChangeGC(NullClient, pGC, GCForeground | GCBackground | GCStipple, - NULL, gcv); + ChangeGC(NullClient, pGC, GCForeground | GCBackground | GCStipple, gcv); ValidateGC(pDraw, pGC); /* PolyFillRect might have bashed the rectangle */ rect.x = dstx; @@ -526,9 +522,9 @@ miOpqStipDrawable(DrawablePtr pDraw, GCPtr pGC, RegionPtr prgnSrc, gcv[3].ptr = pStipple; gcv[4].val = oldOrg.x; gcv[5].val = oldOrg.y; - dixChangeGC(NullClient, pGC, + ChangeGC(NullClient, pGC, GCForeground | GCBackground | GCFillStyle | GCStipple | - GCTileStipXOrigin | GCTileStipYOrigin, NULL, gcv); + GCTileStipXOrigin | GCTileStipYOrigin, gcv); ValidateGC(pDraw, pGC); /* put what we hope is a smaller clip region back in the scratch gc */ @@ -579,7 +575,7 @@ miCopyPlane( DrawablePtr pSrcDrawable, box.x2 = box.x1; if (box.y1 > box.y2) box.y2 = box.y1; - prgnSrc = REGION_CREATE(pGC->pScreen, &box, 1); + prgnSrc = RegionCreate(&box, 1); if (pSrcDrawable->type != DRAWABLE_PIXMAP) { /* clip to visible drawable */ @@ -587,15 +583,15 @@ miCopyPlane( DrawablePtr pSrcDrawable, if (pGC->subWindowMode == IncludeInferiors) { RegionPtr clipList = NotClippedByChildren ((WindowPtr) pSrcDrawable); - REGION_INTERSECT(pGC->pScreen, prgnSrc, prgnSrc, clipList); - REGION_DESTROY(pGC->pScreen, clipList); + RegionIntersect(prgnSrc, prgnSrc, clipList); + RegionDestroy(clipList); } else - REGION_INTERSECT(pGC->pScreen, prgnSrc, prgnSrc, + RegionIntersect(prgnSrc, prgnSrc, &((WindowPtr)pSrcDrawable)->clipList); } - box = *REGION_EXTENTS(pGC->pScreen, prgnSrc); - REGION_TRANSLATE(pGC->pScreen, prgnSrc, -box.x1, -box.y1); + box = *RegionExtents(prgnSrc); + RegionTranslate(prgnSrc, -box.x1, -box.y1); if ((box.x2 > box.x1) && (box.y2 > box.y1)) { @@ -614,12 +610,12 @@ miCopyPlane( DrawablePtr pSrcDrawable, miOpqStipDrawable(pDstDrawable, pGC, prgnSrc, ptile, 0, box.x2 - box.x1, box.y2 - box.y1, dstx + box.x1 - srcx, dsty + box.y1 - srcy); - xfree(ptile); + free(ptile); } } prgnExposed = miHandleExposures(pSrcDrawable, pDstDrawable, pGC, srcx, srcy, width, height, dstx, dsty, bitPlane); - REGION_DESTROY(pGC->pScreen, prgnSrc); + RegionDestroy(prgnSrc); return prgnExposed; } @@ -646,7 +642,6 @@ miGetImage( DrawablePtr pDraw, int sx, int sy, int w, int h, unsigned char depth; int i, linelength, width, srcx, srcy; DDXPointRec pt = {0, 0}; - XID gcv[2]; PixmapPtr pPixmap = NULL; GCPtr pGC = NULL; @@ -655,6 +650,7 @@ miGetImage( DrawablePtr pDraw, int sx, int sy, int w, int h, { if ( (((1<pScreen); @@ -678,8 +674,8 @@ miGetImage( DrawablePtr pDraw, int sx, int sy, int w, int h, TRUE); /* alu is already GXCopy */ - gcv[0] = (XID)planeMask; - DoChangeGC(pGC, GCPlaneMask, gcv, 0); + gcv.val = (XID)planeMask; + ChangeGC(NullClient, pGC, GCPlaneMask, &gcv); ValidateGC((DrawablePtr)pPixmap, pGC); } @@ -747,7 +743,7 @@ miPutImage( DrawablePtr pDraw, GCPtr pGC, int depth, RegionPtr prgnSrc; BoxRec box; unsigned long oldFg, oldBg; - XID gcv[3]; + ChangeGCVal gcv[3]; unsigned long oldPlanemask; unsigned long i; long bytesPer; @@ -762,11 +758,11 @@ miPutImage( DrawablePtr pDraw, GCPtr pGC, int depth, box.y1 = 0; box.x2 = w; box.y2 = h; - prgnSrc = REGION_CREATE(pGC->pScreen, &box, 1); + prgnSrc = RegionCreate(&box, 1); miOpqStipDrawable(pDraw, pGC, prgnSrc, (MiBits *) pImage, leftPad, w, h, x, y); - REGION_DESTROY(pGC->pScreen, prgnSrc); + RegionDestroy(prgnSrc); break; case XYPixmap: @@ -774,38 +770,36 @@ miPutImage( DrawablePtr pDraw, GCPtr pGC, int depth, oldPlanemask = pGC->planemask; oldFg = pGC->fgPixel; oldBg = pGC->bgPixel; - gcv[0] = (XID)~0; - gcv[1] = (XID)0; - DoChangeGC(pGC, GCForeground | GCBackground, gcv, 0); + gcv[0].val = (XID)~0; + gcv[1].val = (XID)0; + ChangeGC(NullClient, pGC, GCForeground | GCBackground, gcv); bytesPer = (long)h * BitmapBytePad(w + leftPad); for (i = 1 << (depth-1); i != 0; i >>= 1, pImage += bytesPer) { if (i & oldPlanemask) { - gcv[0] = (XID)i; - DoChangeGC(pGC, GCPlaneMask, gcv, 0); + gcv[0].val = (XID)i; + ChangeGC(NullClient, pGC, GCPlaneMask, gcv); ValidateGC(pDraw, pGC); (*pGC->ops->PutImage)(pDraw, pGC, 1, x, y, w, h, leftPad, XYBitmap, (char *)pImage); } } - gcv[0] = (XID)oldPlanemask; - gcv[1] = (XID)oldFg; - gcv[2] = (XID)oldBg; - DoChangeGC(pGC, GCPlaneMask | GCForeground | GCBackground, gcv, 0); + gcv[0].val = (XID)oldPlanemask; + gcv[1].val = (XID)oldFg; + gcv[2].val = (XID)oldBg; + ChangeGC(NullClient, pGC, GCPlaneMask | GCForeground | GCBackground, gcv); ValidateGC(pDraw, pGC); break; case ZPixmap: - ppt = pptFirst = xalloc(h * sizeof(DDXPointRec)); - pwidth = pwidthFirst = xalloc(h * sizeof(int)); + ppt = pptFirst = malloc(h * sizeof(DDXPointRec)); + pwidth = pwidthFirst = malloc(h * sizeof(int)); if(!pptFirst || !pwidthFirst) { - if (pwidthFirst) - xfree(pwidthFirst); - if (pptFirst) - xfree(pptFirst); + free(pwidthFirst); + free(pptFirst); return; } if (pGC->miTranslate) @@ -824,8 +818,8 @@ miPutImage( DrawablePtr pDraw, GCPtr pGC, int depth, (*pGC->ops->SetSpans)(pDraw, pGC, (char *)pImage, pptFirst, pwidthFirst, h, TRUE); - xfree(pwidthFirst); - xfree(pptFirst); + free(pwidthFirst); + free(pptFirst); break; } } diff --git a/xserver/mi/micmap.c b/xserver/mi/micmap.c index e832be7fa..8d76f4df7 100644 --- a/xserver/mi/micmap.c +++ b/xserver/mi/micmap.c @@ -40,14 +40,14 @@ #include "globals.h" #include "micmap.h" -ColormapPtr miInstalledMaps[MAXSCREENS]; +DevPrivateKeyRec micmapScrPrivateKeyRec; int miListInstalledColormaps(ScreenPtr pScreen, Colormap *pmaps) { - if (miInstalledMaps[pScreen->myNum]) { - *pmaps = miInstalledMaps[pScreen->myNum]->mid; - return (1); + if (GetInstalledmiColormap(pScreen)) { + *pmaps = GetInstalledmiColormap(pScreen)->mid; + return 1; } return 0; } @@ -55,8 +55,7 @@ miListInstalledColormaps(ScreenPtr pScreen, Colormap *pmaps) void miInstallColormap(ColormapPtr pmap) { - int index = pmap->pScreen->myNum; - ColormapPtr oldpmap = miInstalledMaps[index]; + ColormapPtr oldpmap = GetInstalledmiColormap(pmap->pScreen); if(pmap != oldpmap) { @@ -65,7 +64,7 @@ miInstallColormap(ColormapPtr pmap) if(oldpmap != (ColormapPtr)None) WalkTree(pmap->pScreen, TellLostMap, (char *)&oldpmap->mid); /* Install pmap */ - miInstalledMaps[index] = pmap; + SetInstalledmiColormap(pmap->pScreen, pmap); WalkTree(pmap->pScreen, TellGainedMap, (char *)&pmap->mid); } @@ -74,8 +73,7 @@ miInstallColormap(ColormapPtr pmap) void miUninstallColormap(ColormapPtr pmap) { - int index = pmap->pScreen->myNum; - ColormapPtr curpmap = miInstalledMaps[index]; + ColormapPtr curpmap = GetInstalledmiColormap(pmap->pScreen); if(pmap == curpmap) { @@ -301,6 +299,9 @@ miCreateDefColormap(ScreenPtr pScreen) ColormapPtr cmap; int alloctype; + if (!dixRegisterPrivateKey(&micmapScrPrivateKeyRec, PRIVATE_SCREEN, 0)) + return FALSE; + for (pVisual = pScreen->visuals; pVisual->vid != pScreen->rootVisual; pVisual++) @@ -381,7 +382,7 @@ miClearVisualTypes(void) while ((v = miVisuals)) { miVisuals = v->next; - xfree(v); + free(v); } } @@ -394,7 +395,7 @@ miSetVisualTypesAndMasks(int depth, int visuals, int bitsPerRGB, miVisualsPtr new, *prev, v; int count; - new = xalloc (sizeof *new); + new = malloc(sizeof *new); if (!new) return FALSE; if (!redMask || !greenMask || !blueMask) @@ -535,14 +536,14 @@ miInitVisuals(VisualPtr *visualp, DepthPtr *depthp, int *nvisualp, ndepth++; nvisual += visuals->count; } - depth = xalloc (ndepth * sizeof (DepthRec)); - visual = xalloc (nvisual * sizeof (VisualRec)); - preferredCVCs = xalloc(ndepth * sizeof(int)); + depth = malloc(ndepth * sizeof (DepthRec)); + visual = malloc(nvisual * sizeof (VisualRec)); + preferredCVCs = malloc(ndepth * sizeof(int)); if (!depth || !visual || !preferredCVCs) { - xfree (depth); - xfree (visual); - xfree (preferredCVCs); + free(depth); + free(visual); + free(preferredCVCs); return FALSE; } *depthp = depth; @@ -561,9 +562,9 @@ miInitVisuals(VisualPtr *visualp, DepthPtr *depthp, int *nvisualp, vid = NULL; if (nvtype) { - vid = xalloc (nvtype * sizeof (VisualID)); + vid = malloc(nvtype * sizeof (VisualID)); if (!vid) { - xfree(preferredCVCs); + free(preferredCVCs); return FALSE; } } @@ -605,7 +606,7 @@ miInitVisuals(VisualPtr *visualp, DepthPtr *depthp, int *nvisualp, vid++; visual++; } - xfree (visuals); + free(visuals); } miVisuals = NULL; visual = *visualp; @@ -661,7 +662,7 @@ miInitVisuals(VisualPtr *visualp, DepthPtr *depthp, int *nvisualp, } *rootDepthp = depth[i].depth; *defaultVisp = depth[i].vids[j]; - xfree(preferredCVCs); + free(preferredCVCs); return TRUE; } diff --git a/xserver/mi/micmap.h b/xserver/mi/micmap.h index 5c8448a95..c67710c46 100644 --- a/xserver/mi/micmap.h +++ b/xserver/mi/micmap.h @@ -4,7 +4,13 @@ #ifndef _MICMAP_H_ #define _MICMAP_H_ -extern _X_EXPORT ColormapPtr miInstalledMaps[MAXSCREENS]; +#define GetInstalledmiColormap(s) \ + ((ColormapPtr) dixLookupPrivate(&(s)->devPrivates, micmapScrPrivateKey)) +#define SetInstalledmiColormap(s,c) \ + (dixSetPrivate(&(s)->devPrivates, micmapScrPrivateKey, c)) + +extern _X_EXPORT DevPrivateKeyRec micmapScrPrivateKeyRec; +#define micmapScrPrivateKey (&micmapScrPrivateKeyRec) typedef Bool (* miInitVisualsProcPtr)(VisualPtr *, DepthPtr *, int *, int *, int *, VisualID *, unsigned long, int, diff --git a/xserver/mi/micopy.c b/xserver/mi/micopy.c index 3719f4646..027c461fe 100644 --- a/xserver/mi/micopy.c +++ b/xserver/mi/micopy.c @@ -49,8 +49,8 @@ miCopyRegion (DrawablePtr pSrcDrawable, int nbox; BoxPtr pboxNew1, pboxNew2, pboxBase, pboxNext, pboxTmp; - pbox = REGION_RECTS(pDstRegion); - nbox = REGION_NUM_RECTS(pDstRegion); + pbox = RegionRects(pDstRegion); + nbox = RegionNumRects(pDstRegion); /* XXX we have to err on the side of safety when both are windows, * because we don't know if IncludeInferiors is being used. @@ -68,7 +68,7 @@ miCopyRegion (DrawablePtr pSrcDrawable, if (nbox > 1) { /* keep ordering in each band, reverse order of bands */ - pboxNew1 = (BoxPtr)xalloc(sizeof(BoxRec) * nbox); + pboxNew1 = (BoxPtr)malloc(sizeof(BoxRec) * nbox); if(!pboxNew1) return; pboxBase = pboxNext = pbox+nbox-1; @@ -105,11 +105,10 @@ miCopyRegion (DrawablePtr pSrcDrawable, if (nbox > 1) { /* reverse order of rects in each band */ - pboxNew2 = (BoxPtr)xalloc(sizeof(BoxRec) * nbox); + pboxNew2 = (BoxPtr)malloc(sizeof(BoxRec) * nbox); if(!pboxNew2) { - if (pboxNew1) - xfree(pboxNew1); + free(pboxNew1); return; } pboxBase = pboxNext = pbox; @@ -143,10 +142,8 @@ miCopyRegion (DrawablePtr pSrcDrawable, dx, dy, reverse, upsidedown, bitPlane, closure); - if (pboxNew1) - xfree (pboxNew1); - if (pboxNew2) - xfree (pboxNew2); + free(pboxNew1); + free(pboxNew2); } RegionPtr @@ -209,8 +206,7 @@ miDoCopy (DrawablePtr pSrcDrawable, * VT is inactive, make sure the region isn't empty */ if (!((WindowPtr) pSrcDrawable)->parent && - REGION_NOTEMPTY (pSrcDrawable->pScreen, - &((WindowPtr) pSrcDrawable)->borderClip)) + RegionNotEmpty(&((WindowPtr) pSrcDrawable)->borderClip)) { /* * special case bitblt from root window in @@ -291,9 +287,9 @@ miDoCopy (DrawablePtr pSrcDrawable, blown region and call intersect */ cclip = miGetCompositeClip(pGC); - if (REGION_NUM_RECTS(cclip) == 1) + if (RegionNumRects(cclip) == 1) { - BoxPtr pBox = REGION_RECTS(cclip); + BoxPtr pBox = RegionRects(cclip); if (box_x1 < pBox->x1) box_x1 = pBox->x1; if (box_x2 > pBox->x2) box_x2 = pBox->x2; @@ -306,7 +302,7 @@ miDoCopy (DrawablePtr pSrcDrawable, /* Check to see if the region is empty */ if (box_x1 >= box_x2 || box_y1 >= box_y2) { - REGION_NULL(pGC->pScreen, &rgnDst); + RegionNull(&rgnDst); } else { @@ -315,25 +311,25 @@ miDoCopy (DrawablePtr pSrcDrawable, box.y1 = box_y1; box.x2 = box_x2; box.y2 = box_y2; - REGION_INIT(pGC->pScreen, &rgnDst, &box, 1); + RegionInit(&rgnDst, &box, 1); } /* Clip against complex source if needed */ if (!fastSrc) { - REGION_INTERSECT(pGC->pScreen, &rgnDst, &rgnDst, prgnSrcClip); - REGION_TRANSLATE(pGC->pScreen, &rgnDst, -dx, -dy); + RegionIntersect(&rgnDst, &rgnDst, prgnSrcClip); + RegionTranslate(&rgnDst, -dx, -dy); } /* Clip against complex dest if needed */ if (!fastDst) { - REGION_INTERSECT(pGC->pScreen, &rgnDst, &rgnDst, + RegionIntersect(&rgnDst, &rgnDst, miGetCompositeClip(pGC)); } /* Do bit blitting */ - numRects = REGION_NUM_RECTS(&rgnDst); + numRects = RegionNumRects(&rgnDst); if (numRects && widthSrc && heightSrc) miCopyRegion (pSrcDrawable, pDstDrawable, pGC, &rgnDst, dx, dy, copyProc, bitPlane, closure); @@ -347,8 +343,8 @@ miDoCopy (DrawablePtr pSrcDrawable, xOut - pDstDrawable->x, yOut - pDstDrawable->y, (unsigned long) bitPlane); - REGION_UNINIT(pGC->pScreen, &rgnDst); + RegionUninit(&rgnDst); if (freeSrcClip) - REGION_DESTROY(pGC->pScreen, prgnSrcClip); + RegionDestroy(prgnSrcClip); return prgnExposed; } diff --git a/xserver/mi/midispcur.c b/xserver/mi/midispcur.c index 1d2491904..323ee028b 100644 --- a/xserver/mi/midispcur.c +++ b/xserver/mi/midispcur.c @@ -54,40 +54,40 @@ in this Software without prior written authorization from The Open Group. # include "inputstr.h" /* per-screen private data */ -static int miDCScreenKeyIndex; -static DevPrivateKey miDCScreenKey = &miDCScreenKeyIndex; +static DevPrivateKeyRec miDCScreenKeyRec; +#define miDCScreenKey (&miDCScreenKeyRec) static Bool miDCCloseScreen(int index, ScreenPtr pScreen); -/* per device per-screen private data */ -static int miDCSpriteKeyIndex[MAXSCREENS]; -static DevPrivateKey miDCSpriteKey = miDCSpriteKeyIndex; - +/* per device private data */ typedef struct { GCPtr pSourceGC, pMaskGC; GCPtr pSaveGC, pRestoreGC; - GCPtr pMoveGC; - GCPtr pPixSourceGC, pPixMaskGC; - PixmapPtr pSave, pTemp; + PixmapPtr pSave; #ifdef ARGB_CURSOR PicturePtr pRootPicture; - PicturePtr pTempPicture; #endif } miDCBufferRec, *miDCBufferPtr; -#define MIDCBUFFER(dev, screen) \ +#define miGetDCDevice(dev, screen) \ ((DevHasCursor(dev)) ? \ - (miDCBufferPtr)dixLookupPrivate(&dev->devPrivates, miDCSpriteKey + (screen)->myNum) : \ - (miDCBufferPtr)dixLookupPrivate(&dev->u.master->devPrivates, miDCSpriteKey + (screen)->myNum)) + (miDCBufferPtr)dixLookupPrivate(&dev->devPrivates, miDCDeviceKey(screen)) : \ + (miDCBufferPtr)dixLookupPrivate(&dev->u.master->devPrivates, miDCDeviceKey(screen))) /* * The core pointer buffer will point to the index of the virtual core pointer * in the pCursorBuffers array. */ typedef struct { - CloseScreenProcPtr CloseScreen; + CloseScreenProcPtr CloseScreen; + DevPrivateKey device_key; + DevPrivateKey cursor_bits_key; } miDCScreenRec, *miDCScreenPtr; +#define miGetDCScreen(s) ((miDCScreenPtr)(dixLookupPrivate(&(s)->devPrivates, miDCScreenKey))) +#define miDCDeviceKey(s) (miGetDCScreen(s)->device_key) +#define miDCCursorBitsKey(s) (miGetDCScreen(s)->cursor_bits_key) + /* per-cursor per-screen private data */ typedef struct { PixmapPtr sourceBits; /* source bits */ @@ -97,62 +97,32 @@ typedef struct { #endif } miDCCursorRec, *miDCCursorPtr; -/* - * sprite/cursor method table - */ - -static Bool miDCRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor); -static Bool miDCUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCursor); -static Bool miDCPutUpCursor(DeviceIntPtr pDev, ScreenPtr pScreen, - CursorPtr pCursor, int x, int y, - unsigned long source, unsigned long mask); -static Bool miDCSaveUnderCursor(DeviceIntPtr pDev, ScreenPtr pScreen, - int x, int y, - int w, int h); -static Bool miDCRestoreUnderCursor(DeviceIntPtr pDev, ScreenPtr pScreen, - int x, int y, - int w, int h); -static Bool miDCMoveCursor(DeviceIntPtr pDev, ScreenPtr pScreen, - CursorPtr pCursor, int x, int y, - int w, int h, int dx, int dy, - unsigned long source, unsigned long mask); -static Bool miDCChangeSave(DeviceIntPtr pDev, ScreenPtr pScreen, - int x, int y, int w, int h, - int dx, int dy); - -static Bool miDCDeviceInitialize(DeviceIntPtr pDev, ScreenPtr pScreen); -static void miDCDeviceCleanup(DeviceIntPtr pDev, ScreenPtr pScreen); - -static miSpriteCursorFuncRec miDCFuncs = { - miDCRealizeCursor, - miDCUnrealizeCursor, - miDCPutUpCursor, - miDCSaveUnderCursor, - miDCRestoreUnderCursor, - miDCMoveCursor, - miDCChangeSave, - miDCDeviceInitialize, - miDCDeviceCleanup -}; - Bool miDCInitialize (ScreenPtr pScreen, miPointerScreenFuncPtr screenFuncs) { miDCScreenPtr pScreenPriv; - pScreenPriv = xalloc (sizeof (miDCScreenRec)); + if (!dixRegisterPrivateKey(&miDCScreenKeyRec, PRIVATE_SCREEN, 0)) + return FALSE; + + pScreenPriv = malloc(sizeof (miDCScreenRec)); if (!pScreenPriv) return FALSE; - + pScreenPriv->cursor_bits_key = dixCreatePrivateKey(PRIVATE_CURSOR_BITS, 0); + pScreenPriv->device_key = dixCreatePrivateKey(PRIVATE_DEVICE, 0); + if (!pScreenPriv->cursor_bits_key || !pScreenPriv->device_key) { + free(pScreenPriv); + return FALSE; + } pScreenPriv->CloseScreen = pScreen->CloseScreen; pScreen->CloseScreen = miDCCloseScreen; dixSetPrivate(&pScreen->devPrivates, miDCScreenKey, pScreenPriv); - if (!miSpriteInitialize (pScreen, &miDCFuncs, screenFuncs)) + if (!miSpriteInitialize (pScreen, screenFuncs)) { - xfree ((pointer) pScreenPriv); + free((pointer) pScreenPriv); return FALSE; } return TRUE; @@ -166,15 +136,15 @@ miDCCloseScreen (int index, ScreenPtr pScreen) pScreenPriv = (miDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates, miDCScreenKey); pScreen->CloseScreen = pScreenPriv->CloseScreen; - xfree ((pointer) pScreenPriv); + free((pointer) pScreenPriv); return (*pScreen->CloseScreen) (index, pScreen); } -static Bool +Bool miDCRealizeCursor (ScreenPtr pScreen, CursorPtr pCursor) { if (pCursor->bits->refcnt <= 1) - dixSetPrivate(&pCursor->bits->devPrivates, CursorScreenKey(pScreen), NULL); + dixSetPrivate(&pCursor->bits->devPrivates, miDCCursorBitsKey(pScreen), NULL); return TRUE; } @@ -223,9 +193,9 @@ miDCRealize (ScreenPtr pScreen, CursorPtr pCursor) { miDCCursorPtr pPriv; GCPtr pGC; - XID gcvals[3]; + ChangeGCVal gcvals; - pPriv = xalloc (sizeof (miDCCursorRec)); + pPriv = malloc(sizeof (miDCCursorRec)); if (!pPriv) return NULL; #ifdef ARGB_CURSOR @@ -238,7 +208,7 @@ miDCRealize (ScreenPtr pScreen, CursorPtr pCursor) pFormat = PictureMatchFormat (pScreen, 32, PICT_a8r8g8b8); if (!pFormat) { - xfree ((pointer) pPriv); + free((pointer) pPriv); return NULL; } @@ -249,14 +219,14 @@ miDCRealize (ScreenPtr pScreen, CursorPtr pCursor) CREATE_PIXMAP_USAGE_SCRATCH); if (!pPixmap) { - xfree ((pointer) pPriv); + free((pointer) pPriv); return NULL; } pGC = GetScratchGC (32, pScreen); if (!pGC) { (*pScreen->DestroyPixmap) (pPixmap); - xfree ((pointer) pPriv); + free((pointer) pPriv); return NULL; } ValidateGC (&pPixmap->drawable, pGC); @@ -270,10 +240,10 @@ miDCRealize (ScreenPtr pScreen, CursorPtr pCursor) (*pScreen->DestroyPixmap) (pPixmap); if (!pPriv->pPicture) { - xfree ((pointer) pPriv); + free((pointer) pPriv); return NULL; } - dixSetPrivate(&pCursor->bits->devPrivates, CursorScreenKey(pScreen), pPriv); + dixSetPrivate(&pCursor->bits->devPrivates, miDCCursorBitsKey(pScreen), pPriv); return pPriv; } pPriv->pPicture = 0; @@ -281,17 +251,17 @@ miDCRealize (ScreenPtr pScreen, CursorPtr pCursor) pPriv->sourceBits = (*pScreen->CreatePixmap) (pScreen, pCursor->bits->width, pCursor->bits->height, 1, 0); if (!pPriv->sourceBits) { - xfree ((pointer) pPriv); + free((pointer) pPriv); return NULL; } pPriv->maskBits = (*pScreen->CreatePixmap) (pScreen, pCursor->bits->width, pCursor->bits->height, 1, 0); if (!pPriv->maskBits) { (*pScreen->DestroyPixmap) (pPriv->sourceBits); - xfree ((pointer) pPriv); + free((pointer) pPriv); return NULL; } - dixSetPrivate(&pCursor->bits->devPrivates, CursorScreenKey(pScreen), pPriv); + dixSetPrivate(&pCursor->bits->devPrivates, miDCCursorBitsKey(pScreen), pPriv); /* create the two sets of bits, clipping as appropriate */ @@ -306,22 +276,22 @@ miDCRealize (ScreenPtr pScreen, CursorPtr pCursor) (*pGC->ops->PutImage) ((DrawablePtr)pPriv->sourceBits, pGC, 1, 0, 0, pCursor->bits->width, pCursor->bits->height, 0, XYPixmap, (char *)pCursor->bits->source); - gcvals[0] = GXand; - ChangeGC (pGC, GCFunction, gcvals); + gcvals.val = GXand; + ChangeGC (NullClient, pGC, GCFunction, &gcvals); ValidateGC ((DrawablePtr)pPriv->sourceBits, pGC); (*pGC->ops->PutImage) ((DrawablePtr)pPriv->sourceBits, pGC, 1, 0, 0, pCursor->bits->width, pCursor->bits->height, 0, XYPixmap, (char *)pCursor->bits->mask); /* mask bits -- pCursor->mask & ~pCursor->source */ - gcvals[0] = GXcopy; - ChangeGC (pGC, GCFunction, gcvals); + gcvals.val = GXcopy; + ChangeGC (NullClient, pGC, GCFunction, &gcvals); ValidateGC ((DrawablePtr)pPriv->maskBits, pGC); (*pGC->ops->PutImage) ((DrawablePtr)pPriv->maskBits, pGC, 1, 0, 0, pCursor->bits->width, pCursor->bits->height, 0, XYPixmap, (char *)pCursor->bits->mask); - gcvals[0] = GXandInverted; - ChangeGC (pGC, GCFunction, gcvals); + gcvals.val = GXandInverted; + ChangeGC (NullClient, pGC, GCFunction, &gcvals); ValidateGC ((DrawablePtr)pPriv->maskBits, pGC); (*pGC->ops->PutImage) ((DrawablePtr)pPriv->maskBits, pGC, 1, 0, 0, pCursor->bits->width, pCursor->bits->height, @@ -330,13 +300,13 @@ miDCRealize (ScreenPtr pScreen, CursorPtr pCursor) return pPriv; } -static Bool +Bool miDCUnrealizeCursor (ScreenPtr pScreen, CursorPtr pCursor) { miDCCursorPtr pPriv; pPriv = (miDCCursorPtr)dixLookupPrivate(&pCursor->bits->devPrivates, - CursorScreenKey(pScreen)); + miDCCursorBitsKey(pScreen)); if (pPriv && (pCursor->bits->refcnt <= 1)) { if (pPriv->sourceBits) @@ -347,8 +317,8 @@ miDCUnrealizeCursor (ScreenPtr pScreen, CursorPtr pCursor) if (pPriv->pPicture) FreePicture (pPriv->pPicture, 0); #endif - xfree ((pointer) pPriv); - dixSetPrivate(&pCursor->bits->devPrivates, CursorScreenKey(pScreen), NULL); + free((pointer) pPriv); + dixSetPrivate(&pCursor->bits->devPrivates, miDCCursorBitsKey(pScreen), NULL); } return TRUE; } @@ -366,13 +336,13 @@ miDCPutBits ( unsigned long source, unsigned long mask) { - XID gcvals[1]; + ChangeGCVal gcval; int x, y; if (sourceGC->fgPixel != source) { - gcvals[0] = source; - DoChangeGC (sourceGC, GCForeground, gcvals, 0); + gcval.val = source; + ChangeGC (NullClient, sourceGC, GCForeground, &gcval); } if (sourceGC->serialNumber != pDrawable->serialNumber) ValidateGC (pDrawable, sourceGC); @@ -391,8 +361,8 @@ miDCPutBits ( (*sourceGC->ops->PushPixels) (sourceGC, pPriv->sourceBits, pDrawable, w, h, x, y); if (maskGC->fgPixel != mask) { - gcvals[0] = mask; - DoChangeGC (maskGC, GCForeground, gcvals, 0); + gcval.val = mask; + ChangeGC (NullClient, maskGC, GCForeground, &gcval); } if (maskGC->serialNumber != pDrawable->serialNumber) ValidateGC (pDrawable, maskGC); @@ -427,7 +397,7 @@ miDCMakeGC(WindowPtr pWin) } -static Bool +Bool miDCPutUpCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, int x, int y, unsigned long source, unsigned long mask) { @@ -437,7 +407,7 @@ miDCPutUpCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, WindowPtr pWin; pPriv = (miDCCursorPtr)dixLookupPrivate(&pCursor->bits->devPrivates, - CursorScreenKey(pScreen)); + miDCCursorBitsKey(pScreen)); if (!pPriv) { pPriv = miDCRealize(pScreen, pCursor); @@ -446,8 +416,8 @@ miDCPutUpCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, } pScreenPriv = (miDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates, miDCScreenKey); - pWin = WindowTable[pScreen->myNum]; - pBuffer = MIDCBUFFER(pDev, pScreen); + pWin = pScreen->root; + pBuffer = miGetDCDevice(pDev, pScreen); #ifdef ARGB_CURSOR if (pPriv->pPicture) @@ -474,7 +444,7 @@ miDCPutUpCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, return TRUE; } -static Bool +Bool miDCSaveUnderCursor (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y, int w, int h) { @@ -486,10 +456,10 @@ miDCSaveUnderCursor (DeviceIntPtr pDev, ScreenPtr pScreen, pScreenPriv = (miDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates, miDCScreenKey); - pBuffer = MIDCBUFFER(pDev, pScreen); + pBuffer = miGetDCDevice(pDev, pScreen); pSave = pBuffer->pSave; - pWin = WindowTable[pScreen->myNum]; + pWin = pScreen->root; if (!pSave || pSave->drawable.width < w || pSave->drawable.height < h) { if (pSave) @@ -508,7 +478,7 @@ miDCSaveUnderCursor (DeviceIntPtr pDev, ScreenPtr pScreen, return TRUE; } -static Bool +Bool miDCRestoreUnderCursor (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y, int w, int h) { @@ -520,10 +490,10 @@ miDCRestoreUnderCursor (DeviceIntPtr pDev, ScreenPtr pScreen, pScreenPriv = (miDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates, miDCScreenKey); - pBuffer = MIDCBUFFER(pDev, pScreen); + pBuffer = miGetDCDevice(pDev, pScreen); pSave = pBuffer->pSave; - pWin = WindowTable[pScreen->myNum]; + pWin = pScreen->root; if (!pSave) return FALSE; @@ -535,244 +505,11 @@ miDCRestoreUnderCursor (DeviceIntPtr pDev, ScreenPtr pScreen, return TRUE; } -static Bool -miDCChangeSave (DeviceIntPtr pDev, ScreenPtr pScreen, - int x, int y, int w, int h, int dx, int dy) -{ - miDCScreenPtr pScreenPriv; - miDCBufferPtr pBuffer; - PixmapPtr pSave; - WindowPtr pWin; - GCPtr pGC; - int sourcex, sourcey, destx, desty, copyw, copyh; - - pScreenPriv = (miDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates, - miDCScreenKey); - pBuffer = MIDCBUFFER(pDev, pScreen); - - pSave = pBuffer->pSave; - pWin = WindowTable[pScreen->myNum]; - /* - * restore the bits which are about to get trashed - */ - if (!pSave) - return FALSE; - - pGC = pBuffer->pRestoreGC; - if (pWin->drawable.serialNumber != pGC->serialNumber) - ValidateGC ((DrawablePtr) pWin, pGC); - /* - * copy the old bits to the screen. - */ - if (dy > 0) - { - (*pGC->ops->CopyArea) ((DrawablePtr) pSave, (DrawablePtr) pWin, pGC, - 0, h - dy, w, dy, x + dx, y + h); - } - else if (dy < 0) - { - (*pGC->ops->CopyArea) ((DrawablePtr) pSave, (DrawablePtr) pWin, pGC, - 0, 0, w, -dy, x + dx, y + dy); - } - if (dy >= 0) - { - desty = y + dy; - sourcey = 0; - copyh = h - dy; - } - else - { - desty = y; - sourcey = - dy; - copyh = h + dy; - } - if (dx > 0) - { - (*pGC->ops->CopyArea) ((DrawablePtr) pSave, (DrawablePtr) pWin, pGC, - w - dx, sourcey, dx, copyh, x + w, desty); - } - else if (dx < 0) - { - (*pGC->ops->CopyArea) ((DrawablePtr) pSave, (DrawablePtr) pWin, pGC, - 0, sourcey, -dx, copyh, x + dx, desty); - } - - pGC = pBuffer->pSaveGC; - if (pSave->drawable.serialNumber != pGC->serialNumber) - ValidateGC ((DrawablePtr) pSave, pGC); - /* - * move the bits that are still valid within the pixmap - */ - if (dx >= 0) - { - sourcex = 0; - destx = dx; - copyw = w - dx; - } - else - { - destx = 0; - sourcex = - dx; - copyw = w + dx; - } - if (dy >= 0) - { - sourcey = 0; - desty = dy; - copyh = h - dy; - } - else - { - desty = 0; - sourcey = -dy; - copyh = h + dy; - } - (*pGC->ops->CopyArea) ((DrawablePtr) pSave, (DrawablePtr) pSave, pGC, - sourcex, sourcey, copyw, copyh, destx, desty); - /* - * copy the new bits from the screen into the remaining areas of the - * pixmap - */ - if (dy > 0) - { - (*pGC->ops->CopyArea) ((DrawablePtr) pWin, (DrawablePtr) pSave, pGC, - x, y, w, dy, 0, 0); - } - else if (dy < 0) - { - (*pGC->ops->CopyArea) ((DrawablePtr) pWin, (DrawablePtr) pSave, pGC, - x, y + h + dy, w, -dy, 0, h + dy); - } - if (dy >= 0) - { - desty = dy; - sourcey = y + dy; - copyh = h - dy; - } - else - { - desty = 0; - sourcey = y; - copyh = h + dy; - } - if (dx > 0) - { - (*pGC->ops->CopyArea) ((DrawablePtr) pWin, (DrawablePtr) pSave, pGC, - x, sourcey, dx, copyh, 0, desty); - } - else if (dx < 0) - { - (*pGC->ops->CopyArea) ((DrawablePtr) pWin, (DrawablePtr) pSave, pGC, - x + w + dx, sourcey, -dx, copyh, w + dx, desty); - } - return TRUE; -} - -static Bool -miDCMoveCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, - int x, int y, int w, int h, int dx, int dy, - unsigned long source, unsigned long mask) -{ - miDCCursorPtr pPriv; - miDCScreenPtr pScreenPriv; - miDCBufferPtr pBuffer; - int status; - WindowPtr pWin; - GCPtr pGC; - XID gcval = FALSE; - PixmapPtr pTemp; - - pPriv = (miDCCursorPtr)dixLookupPrivate(&pCursor->bits->devPrivates, - CursorScreenKey(pScreen)); - if (!pPriv) - { - pPriv = miDCRealize(pScreen, pCursor); - if (!pPriv) - return FALSE; - } - pScreenPriv = (miDCScreenPtr)dixLookupPrivate(&pScreen->devPrivates, - miDCScreenKey); - pWin = WindowTable[pScreen->myNum]; - pBuffer = MIDCBUFFER(pDev, pScreen); - - pTemp = pBuffer->pTemp; - if (!pTemp || - pTemp->drawable.width != pBuffer->pSave->drawable.width || - pTemp->drawable.height != pBuffer->pSave->drawable.height) - { - if (pTemp) - (*pScreen->DestroyPixmap) (pTemp); -#ifdef ARGB_CURSOR - if (pBuffer->pTempPicture) - { - FreePicture (pBuffer->pTempPicture, 0); - pBuffer->pTempPicture = 0; - } -#endif - pBuffer->pTemp = pTemp = (*pScreen->CreatePixmap) - (pScreen, w, h, pBuffer->pSave->drawable.depth, 0); - if (!pTemp) - return FALSE; - } - if (!pBuffer->pMoveGC) - { - pBuffer->pMoveGC = CreateGC ((DrawablePtr)pTemp, - GCGraphicsExposures, &gcval, &status, (XID)0, serverClient); - if (!pBuffer->pMoveGC) - return FALSE; - } - /* - * copy the saved area to a temporary pixmap - */ - pGC = pBuffer->pMoveGC; - if (pGC->serialNumber != pTemp->drawable.serialNumber) - ValidateGC ((DrawablePtr) pTemp, pGC); - (*pGC->ops->CopyArea)((DrawablePtr)pBuffer->pSave, - (DrawablePtr)pTemp, pGC, 0, 0, w, h, 0, 0); - - /* - * draw the cursor in the temporary pixmap - */ -#ifdef ARGB_CURSOR - if (pPriv->pPicture) - { - if (!EnsurePicture(pBuffer->pTempPicture, &pTemp->drawable, pWin)) - return FALSE; - CompositePicture (PictOpOver, - pPriv->pPicture, - NULL, - pBuffer->pTempPicture, - 0, 0, 0, 0, - dx, dy, - pCursor->bits->width, - pCursor->bits->height); - } - else -#endif - { - miDCPutBits ((DrawablePtr)pTemp, pPriv, - pBuffer->pPixSourceGC, pBuffer->pPixMaskGC, - dx, dy, pCursor->bits->width, pCursor->bits->height, - source, mask); - } - - pGC = pBuffer->pRestoreGC; - if (pWin->drawable.serialNumber != pGC->serialNumber) - ValidateGC ((DrawablePtr) pWin, pGC); - - (*pGC->ops->CopyArea) ((DrawablePtr) pTemp, (DrawablePtr) pWin, - pGC, - 0, 0, w, h, x, y); - return TRUE; -} - -static Bool +Bool miDCDeviceInitialize(DeviceIntPtr pDev, ScreenPtr pScreen) { miDCBufferPtr pBuffer; WindowPtr pWin; - XID gcval = FALSE; - int status; int i; if (!DevHasCursor(pDev)) @@ -782,12 +519,12 @@ miDCDeviceInitialize(DeviceIntPtr pDev, ScreenPtr pScreen) { pScreen = screenInfo.screens[i]; - pBuffer = xcalloc(1, sizeof(miDCBufferRec)); + pBuffer = calloc(1, sizeof(miDCBufferRec)); if (!pBuffer) goto failure; - dixSetPrivate(&pDev->devPrivates, miDCSpriteKey + pScreen->myNum, pBuffer); - pWin = WindowTable[pScreen->myNum]; + dixSetPrivate(&pDev->devPrivates, miDCDeviceKey(pScreen), pBuffer); + pWin = pScreen->root; pBuffer->pSourceGC = miDCMakeGC(pWin); if (!pBuffer->pSourceGC) @@ -805,28 +542,12 @@ miDCDeviceInitialize(DeviceIntPtr pDev, ScreenPtr pScreen) if (!pBuffer->pRestoreGC) goto failure; - pBuffer->pMoveGC = CreateGC ((DrawablePtr)pWin, - GCGraphicsExposures, &gcval, &status, (XID)0, serverClient); - if (!pBuffer->pMoveGC) - goto failure; - - pBuffer->pPixSourceGC = CreateGC ((DrawablePtr)pWin, - GCGraphicsExposures, &gcval, &status, (XID)0, serverClient); - if (!pBuffer->pPixSourceGC) - goto failure; - - pBuffer->pPixMaskGC = CreateGC ((DrawablePtr)pWin, - GCGraphicsExposures, &gcval, &status, (XID)0, serverClient); - if (!pBuffer->pPixMaskGC) - goto failure; - #ifdef ARGB_CURSOR pBuffer->pRootPicture = NULL; - pBuffer->pTempPicture = NULL; #endif - // these get (re)allocated lazily depending on the cursor size - pBuffer->pSave = pBuffer->pTemp = NULL; + /* (re)allocated lazily depending on the cursor size */ + pBuffer->pSave = NULL; } return TRUE; @@ -838,7 +559,7 @@ failure: return FALSE; } -static void +void miDCDeviceCleanup(DeviceIntPtr pDev, ScreenPtr pScreen) { miDCBufferPtr pBuffer; @@ -850,7 +571,7 @@ miDCDeviceCleanup(DeviceIntPtr pDev, ScreenPtr pScreen) { pScreen = screenInfo.screens[i]; - pBuffer = MIDCBUFFER(pDev, pScreen); + pBuffer = miGetDCDevice(pDev, pScreen); if (pBuffer) { @@ -858,15 +579,17 @@ miDCDeviceCleanup(DeviceIntPtr pDev, ScreenPtr pScreen) if (pBuffer->pMaskGC) FreeGC(pBuffer->pMaskGC, (GContext) 0); if (pBuffer->pSaveGC) FreeGC(pBuffer->pSaveGC, (GContext) 0); if (pBuffer->pRestoreGC) FreeGC(pBuffer->pRestoreGC, (GContext) 0); - if (pBuffer->pMoveGC) FreeGC(pBuffer->pMoveGC, (GContext) 0); - if (pBuffer->pPixSourceGC) FreeGC(pBuffer->pPixSourceGC, (GContext) 0); - if (pBuffer->pPixMaskGC) FreeGC(pBuffer->pPixMaskGC, (GContext) 0); + +#ifdef ARGB_CURSOR + /* If a pRootPicture was allocated for a root window, it + * is freed when that root window is destroyed, so don't + * free it again here. */ +#endif if (pBuffer->pSave) (*pScreen->DestroyPixmap)(pBuffer->pSave); - if (pBuffer->pTemp) (*pScreen->DestroyPixmap)(pBuffer->pTemp); - xfree(pBuffer); - dixSetPrivate(&pDev->devPrivates, miDCSpriteKey + pScreen->myNum, NULL); + free(pBuffer); + dixSetPrivate(&pDev->devPrivates, miDCDeviceKey(pScreen), NULL); } } } diff --git a/xserver/mi/mieq.c b/xserver/mi/mieq.c index 9b6d0c901..d1441e285 100644 --- a/xserver/mi/mieq.c +++ b/xserver/mi/mieq.c @@ -191,7 +191,7 @@ mieqEnqueue(DeviceIntPtr pDev, InternalEvent *e) if (evt->evlen < evlen) { evt->evlen = evlen; - evt->event = xrealloc(evt->event, evt->evlen); + evt->event = realloc(evt->event, evt->evlen); if (!evt->event) { ErrorF("[mi] Running out of memory. Tossing event.\n"); @@ -439,7 +439,11 @@ mieqProcessInputEvents(void) evlen = e->events->evlen; if(evlen > event_size) - event = xrealloc(event, evlen); + { + event = realloc(event, evlen); + event_size = evlen; + } + if (!event) FatalError("[mi] No memory left for event processing.\n"); diff --git a/xserver/mi/miexpose.c b/xserver/mi/miexpose.c index f52b49211..94258b864 100644 --- a/xserver/mi/miexpose.c +++ b/xserver/mi/miexpose.c @@ -131,7 +131,6 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC, int srcx, int srcy, int width, int height, int dstx, int dsty, unsigned long plane) { - ScreenPtr pscr; RegionPtr prgnSrcClip; /* drawable-relative source clip */ RegionRec rgnSrcRec; RegionPtr prgnDstClip; /* drawable-relative dest clip */ @@ -148,9 +147,6 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, BoxRec expBox; Bool extents; - /* This prevents warning about pscr not being used. */ - pGC->pScreen = pscr = pGC->pScreen; - /* avoid work if we can */ if (!pGC->graphicsExposures && (pDstDrawable->type == DRAWABLE_PIXMAP) && @@ -175,21 +171,21 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, if (pGC->subWindowMode == IncludeInferiors) { prgnSrcClip = NotClippedByChildren (pSrcWin); - if ((RECT_IN_REGION(pscr, prgnSrcClip, &TsrcBox)) == rgnIN) + if ((RegionContainsRect(prgnSrcClip, &TsrcBox)) == rgnIN) { - REGION_DESTROY(pscr, prgnSrcClip); + RegionDestroy(prgnSrcClip); return NULL; } } else { - if ((RECT_IN_REGION(pscr, &pSrcWin->clipList, &TsrcBox)) == rgnIN) + if ((RegionContainsRect(&pSrcWin->clipList, &TsrcBox)) == rgnIN) return NULL; prgnSrcClip = &rgnSrcRec; - REGION_NULL(pscr, prgnSrcClip); - REGION_COPY(pscr, prgnSrcClip, &pSrcWin->clipList); + RegionNull(prgnSrcClip); + RegionCopy(prgnSrcClip, &pSrcWin->clipList); } - REGION_TRANSLATE(pscr, prgnSrcClip, + RegionTranslate(prgnSrcClip, -pSrcDrawable->x, -pSrcDrawable->y); } else @@ -206,7 +202,7 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, box.x2 = pSrcDrawable->width; box.y2 = pSrcDrawable->height; prgnSrcClip = &rgnSrcRec; - REGION_INIT(pscr, prgnSrcClip, &box, 1); + RegionInit(prgnSrcClip, &box, 1); pSrcWin = NULL; } @@ -223,11 +219,11 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, else { prgnDstClip = &rgnDstRec; - REGION_NULL(pscr, prgnDstClip); - REGION_COPY(pscr, prgnDstClip, + RegionNull(prgnDstClip); + RegionCopy(prgnDstClip, &((WindowPtr)pDstDrawable)->clipList); } - REGION_TRANSLATE(pscr, prgnDstClip, + RegionTranslate(prgnDstClip, -pDstDrawable->x, -pDstDrawable->y); } else @@ -239,24 +235,24 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, box.x2 = pDstDrawable->width; box.y2 = pDstDrawable->height; prgnDstClip = &rgnDstRec; - REGION_INIT(pscr, prgnDstClip, &box, 1); + RegionInit(prgnDstClip, &box, 1); } /* drawable-relative source region */ - REGION_INIT(pscr, &rgnExposed, &srcBox, 1); + RegionInit(&rgnExposed, &srcBox, 1); /* now get the hidden parts of the source box*/ - REGION_SUBTRACT(pscr, &rgnExposed, &rgnExposed, prgnSrcClip); + RegionSubtract(&rgnExposed, &rgnExposed, prgnSrcClip); /* move them over the destination */ - REGION_TRANSLATE(pscr, &rgnExposed, dstx-srcx, dsty-srcy); + RegionTranslate(&rgnExposed, dstx-srcx, dsty-srcy); /* intersect with visible areas of dest */ - REGION_INTERSECT(pscr, &rgnExposed, &rgnExposed, prgnDstClip); + RegionIntersect(&rgnExposed, &rgnExposed, prgnDstClip); /* intersect with client clip region. */ if (pGC->clientClipType == CT_REGION) - REGION_INTERSECT(pscr, &rgnExposed, &rgnExposed, pGC->clientClip); + RegionIntersect(&rgnExposed, &rgnExposed, pGC->clientClip); /* * If we have LOTS of rectangles, we decide to take the extents @@ -266,7 +262,7 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, * for windows. */ extents = pGC->graphicsExposures && - (REGION_NUM_RECTS(&rgnExposed) > RECTLIMIT) && + (RegionNumRects(&rgnExposed) > RECTLIMIT) && (pDstDrawable->type != DRAWABLE_PIXMAP); if (pSrcWin) { @@ -278,13 +274,13 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, * exposed region will undo all our work! */ if (extents && pSrcWin && region && - (RECT_IN_REGION(pscr, region, &srcBox) != rgnIN)) + (RegionContainsRect(region, &srcBox) != rgnIN)) extents = FALSE; } if (extents) { - expBox = *REGION_EXTENTS(pscr, &rgnExposed); - REGION_RESET(pscr, &rgnExposed, &expBox); + expBox = *RegionExtents(&rgnExposed); + RegionReset(&rgnExposed, &expBox); } if ((pDstDrawable->type != DRAWABLE_PIXMAP) && (((WindowPtr)pDstDrawable)->backgroundState != None)) @@ -292,52 +288,52 @@ miHandleExposures(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, WindowPtr pWin = (WindowPtr)pDstDrawable; /* make the exposed area screen-relative */ - REGION_TRANSLATE(pscr, &rgnExposed, + RegionTranslate(&rgnExposed, pDstDrawable->x, pDstDrawable->y); if (extents) { - /* PaintWindowBackground doesn't clip, so we have to */ - REGION_INTERSECT(pscr, &rgnExposed, &rgnExposed, &pWin->clipList); + /* miPaintWindow doesn't clip, so we have to */ + RegionIntersect(&rgnExposed, &rgnExposed, &pWin->clipList); } miPaintWindow((WindowPtr)pDstDrawable, &rgnExposed, PW_BACKGROUND); if (extents) { - REGION_RESET(pscr, &rgnExposed, &expBox); + RegionReset(&rgnExposed, &expBox); } else - REGION_TRANSLATE(pscr, &rgnExposed, + RegionTranslate(&rgnExposed, -pDstDrawable->x, -pDstDrawable->y); } if (prgnDstClip == &rgnDstRec) { - REGION_UNINIT(pscr, prgnDstClip); + RegionUninit(prgnDstClip); } else if (prgnDstClip != prgnSrcClip) { - REGION_DESTROY(pscr, prgnDstClip); + RegionDestroy(prgnDstClip); } if (prgnSrcClip == &rgnSrcRec) { - REGION_UNINIT(pscr, prgnSrcClip); + RegionUninit(prgnSrcClip); } else { - REGION_DESTROY(pscr, prgnSrcClip); + RegionDestroy(prgnSrcClip); } if (pGC->graphicsExposures) { /* don't look */ - RegionPtr exposed = REGION_CREATE(pscr, NullBox, 0); + RegionPtr exposed = RegionCreate(NullBox, 0); *exposed = rgnExposed; return exposed; } else { - REGION_UNINIT(pscr, &rgnExposed); + RegionUninit(&rgnExposed); return NULL; } } @@ -348,7 +344,7 @@ void miSendGraphicsExpose (ClientPtr client, RegionPtr pRgn, XID drawable, int major, int minor) { - if (pRgn && !REGION_NIL(pRgn)) + if (pRgn && !RegionNil(pRgn)) { xEvent *pEvent; xEvent *pe; @@ -356,9 +352,9 @@ miSendGraphicsExpose (ClientPtr client, RegionPtr pRgn, XID drawable, int i; int numRects; - numRects = REGION_NUM_RECTS(pRgn); - pBox = REGION_RECTS(pRgn); - if(!(pEvent = xalloc(numRects * sizeof(xEvent)))) + numRects = RegionNumRects(pRgn); + pBox = RegionRects(pRgn); + if(!(pEvent = malloc(numRects * sizeof(xEvent)))) return; pe = pEvent; @@ -374,9 +370,11 @@ miSendGraphicsExpose (ClientPtr client, RegionPtr pRgn, XID drawable, pe->u.graphicsExposure.majorEvent = major; pe->u.graphicsExposure.minorEvent = minor; } + /* GraphicsExpose is a "critical event", which TryClientEvents + * handles specially. */ TryClientEvents(client, NULL, pEvent, numRects, (Mask)0, NoEventMask, NullGrab); - xfree(pEvent); + free(pEvent); } else { @@ -386,8 +384,7 @@ miSendGraphicsExpose (ClientPtr client, RegionPtr pRgn, XID drawable, event.u.noExposure.drawable = drawable; event.u.noExposure.majorEvent = major; event.u.noExposure.minorEvent = minor; - TryClientEvents(client, NULL, &event, 1, - (Mask)0, NoEventMask, NullGrab); + WriteEventsToClient(client, 1, &event); } } @@ -400,9 +397,9 @@ miSendExposures( WindowPtr pWin, RegionPtr pRgn, int dx, int dy) xEvent *pEvent, *pe; int i; - pBox = REGION_RECTS(pRgn); - numRects = REGION_NUM_RECTS(pRgn); - if(!(pEvent = xcalloc(1, numRects * sizeof(xEvent)))) + pBox = RegionRects(pRgn); + numRects = RegionNumRects(pRgn); + if(!(pEvent = calloc(1, numRects * sizeof(xEvent)))) return; for (i=numRects, pe = pEvent; --i >= 0; pe++, pBox++) @@ -423,16 +420,16 @@ miSendExposures( WindowPtr pWin, RegionPtr pRgn, int dx, int dy) XID realWin = 0; if(!pWin->parent) { - x = panoramiXdataPtr[scrnum].x; - y = panoramiXdataPtr[scrnum].y; - pWin = WindowTable[0]; + x = screenInfo.screens[scrnum]->x; + y = screenInfo.screens[scrnum]->y; + pWin = screenInfo.screens[0]->root; realWin = pWin->drawable.id; } else if (scrnum) { PanoramiXRes *win; win = PanoramiXFindIDByScrnum(XRT_WINDOW, pWin->drawable.id, scrnum); if(!win) { - xfree(pEvent); + free(pEvent); return; } realWin = win->info[0].id; @@ -449,15 +446,15 @@ miSendExposures( WindowPtr pWin, RegionPtr pRgn, int dx, int dy) DeliverEvents(pWin, pEvent, numRects, NullWindow); - xfree(pEvent); + free(pEvent); } void miWindowExposures( WindowPtr pWin, RegionPtr prgn, RegionPtr other_exposed) { RegionPtr exposures = prgn; - if ((prgn && !REGION_NIL(prgn)) || - (exposures && !REGION_NIL(exposures)) || other_exposed) + if ((prgn && !RegionNil(prgn)) || + (exposures && !RegionNil(exposures)) || other_exposed) { RegionRec expRec; int clientInterested; @@ -470,15 +467,15 @@ miWindowExposures( WindowPtr pWin, RegionPtr prgn, RegionPtr other_exposed) { if (exposures) { - REGION_UNION(pWin->drawable.pScreen, other_exposed, + RegionUnion(other_exposed, exposures, other_exposed); if (exposures != prgn) - REGION_DESTROY(pWin->drawable.pScreen, exposures); + RegionDestroy(exposures); } exposures = other_exposed; } - if (clientInterested && exposures && (REGION_NUM_RECTS(exposures) > RECTLIMIT)) + if (clientInterested && exposures && (RegionNumRects(exposures) > RECTLIMIT)) { /* * If we have LOTS of rectangles, we decide to take the extents @@ -488,34 +485,34 @@ miWindowExposures( WindowPtr pWin, RegionPtr prgn, RegionPtr other_exposed) */ BoxRec box; - box = *REGION_EXTENTS( pWin->drawable.pScreen, exposures); + box = *RegionExtents(exposures); if (exposures == prgn) { exposures = &expRec; - REGION_INIT( pWin->drawable.pScreen, exposures, &box, 1); - REGION_RESET( pWin->drawable.pScreen, prgn, &box); + RegionInit(exposures, &box, 1); + RegionReset(prgn, &box); } else { - REGION_RESET( pWin->drawable.pScreen, exposures, &box); - REGION_UNION( pWin->drawable.pScreen, prgn, prgn, exposures); + RegionReset(exposures, &box); + RegionUnion(prgn, prgn, exposures); } - /* PaintWindowBackground doesn't clip, so we have to */ - REGION_INTERSECT( pWin->drawable.pScreen, prgn, prgn, &pWin->clipList); + /* miPaintWindow doesn't clip, so we have to */ + RegionIntersect(prgn, prgn, &pWin->clipList); } - if (prgn && !REGION_NIL(prgn)) + if (prgn && !RegionNil(prgn)) miPaintWindow(pWin, prgn, PW_BACKGROUND); - if (clientInterested && exposures && !REGION_NIL(exposures)) + if (clientInterested && exposures && !RegionNil(exposures)) miSendExposures(pWin, exposures, pWin->drawable.x, pWin->drawable.y); if (exposures == &expRec) { - REGION_UNINIT( pWin->drawable.pScreen, exposures); + RegionUninit(exposures); } else if (exposures && exposures != prgn && exposures != other_exposed) - REGION_DESTROY( pWin->drawable.pScreen, exposures); + RegionDestroy(exposures); if (prgn) - REGION_EMPTY( pWin->drawable.pScreen, prgn); + RegionEmpty(prgn); } else if (exposures && exposures != prgn) - REGION_DESTROY( pWin->drawable.pScreen, exposures); + RegionDestroy(exposures); } #ifdef ROOTLESS @@ -646,22 +643,22 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what) gcmask |= GCFillStyle | GCTile | GCTileStipXOrigin | GCTileStipYOrigin; } - prect = xalloc(REGION_NUM_RECTS(prgn) * sizeof(xRectangle)); + prect = malloc(RegionNumRects(prgn) * sizeof(xRectangle)); if (!prect) return; pGC = GetScratchGC(drawable->depth, drawable->pScreen); if (!pGC) { - xfree(prect); + free(prect); return; } - dixChangeGC (NullClient, pGC, gcmask, NULL, gcval); + ChangeGC (NullClient, pGC, gcmask, gcval); ValidateGC (drawable, pGC); - numRects = REGION_NUM_RECTS(prgn); - pbox = REGION_RECTS(prgn); + numRects = RegionNumRects(prgn); + pbox = RegionRects(prgn); for (i= numRects; --i >= 0; pbox++, prect++) { prect->x = pbox->x1 - draw_x_off; @@ -671,7 +668,7 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what) } prect -= numRects; (*pGC->ops->PolyFillRect)(drawable, pGC, numRects, prect); - xfree(prect); + free(prect); FreeScratchGC(pGC); } @@ -683,17 +680,18 @@ miPaintWindow(WindowPtr pWin, RegionPtr prgn, int what) void miClearDrawable(DrawablePtr pDraw, GCPtr pGC) { - XID fg = pGC->fgPixel; - XID bg = pGC->bgPixel; + ChangeGCVal fg, bg; xRectangle rect; + fg.val = pGC->fgPixel; + bg.val = pGC->bgPixel; rect.x = 0; rect.y = 0; rect.width = pDraw->width; rect.height = pDraw->height; - DoChangeGC(pGC, GCForeground, &bg, 0); + ChangeGC(NullClient, pGC, GCForeground, &bg); ValidateGC(pDraw, pGC); (*pGC->ops->PolyFillRect)(pDraw, pGC, 1, &rect); - DoChangeGC(pGC, GCForeground, &fg, 0); + ChangeGC(NullClient, pGC, GCForeground, &fg); ValidateGC(pDraw, pGC); } diff --git a/xserver/mi/mifillarc.c b/xserver/mi/mifillarc.c index c22baf54c..6e13e681f 100644 --- a/xserver/mi/mifillarc.c +++ b/xserver/mi/mifillarc.c @@ -546,13 +546,13 @@ miFillEllipseI( int *widths; int *wids; - points = xalloc(sizeof(DDXPointRec) * arc->height); + points = malloc(sizeof(DDXPointRec) * arc->height); if (!points) return; - widths = xalloc(sizeof(int) * arc->height); + widths = malloc(sizeof(int) * arc->height); if (!widths) { - xfree(points); + free(points); return; } miFillArcSetup(arc, &info); @@ -570,8 +570,8 @@ miFillEllipseI( ADDSPANS(); } (*pGC->ops->FillSpans)(pDraw, pGC, pts - points, points, widths, FALSE); - xfree(widths); - xfree(points); + free(widths); + free(points); } static void @@ -589,13 +589,13 @@ miFillEllipseD( int *widths; int *wids; - points = xalloc(sizeof(DDXPointRec) * arc->height); + points = malloc(sizeof(DDXPointRec) * arc->height); if (!points) return; - widths = xalloc(sizeof(int) * arc->height); + widths = malloc(sizeof(int) * arc->height); if (!widths) { - xfree(points); + free(points); return; } miFillArcDSetup(arc, &info); @@ -613,8 +613,8 @@ miFillEllipseD( ADDSPANS(); } (*pGC->ops->FillSpans)(pDraw, pGC, pts - points, points, widths, FALSE); - xfree(widths); - xfree(points); + free(widths); + free(points); } #define ADDSPAN(l,r) \ @@ -661,13 +661,13 @@ miFillArcSliceI( slw = arc->height; if (slice.flip_top || slice.flip_bot) slw += (arc->height >> 1) + 1; - points = xalloc(sizeof(DDXPointRec) * slw); + points = malloc(sizeof(DDXPointRec) * slw); if (!points) return; - widths = xalloc(sizeof(int) * slw); + widths = malloc(sizeof(int) * slw); if (!widths) { - xfree(points); + free(points); return; } if (pGC->miTranslate) @@ -698,8 +698,8 @@ miFillArcSliceI( } } (*pGC->ops->FillSpans)(pDraw, pGC, pts - points, points, widths, FALSE); - xfree(widths); - xfree(points); + free(widths); + free(points); } static void @@ -725,13 +725,13 @@ miFillArcSliceD( slw = arc->height; if (slice.flip_top || slice.flip_bot) slw += (arc->height >> 1) + 1; - points = xalloc(sizeof(DDXPointRec) * slw); + points = malloc(sizeof(DDXPointRec) * slw); if (!points) return; - widths = xalloc(sizeof(int) * slw); + widths = malloc(sizeof(int) * slw); if (!widths) { - xfree(points); + free(points); return; } if (pGC->miTranslate) @@ -762,8 +762,8 @@ miFillArcSliceD( } } (*pGC->ops->FillSpans)(pDraw, pGC, pts - points, points, widths, FALSE); - xfree(widths); - xfree(points); + free(widths); + free(points); } /* MIPOLYFILLARC -- The public entry for the PolyFillArc request. diff --git a/xserver/mi/mifillrct.c b/xserver/mi/mifillrct.c index 6e9979099..1c63a35fa 100644 --- a/xserver/mi/mifillrct.c +++ b/xserver/mi/mifillrct.c @@ -107,12 +107,12 @@ miPolyFillRect( maxheight = max(maxheight, prect->height); } - pptFirst = xalloc(maxheight * sizeof(DDXPointRec)); - pwFirst = xalloc(maxheight * sizeof(int)); + pptFirst = malloc(maxheight * sizeof(DDXPointRec)); + pwFirst = malloc(maxheight * sizeof(int)); if(!pptFirst || !pwFirst) { - if (pwFirst) xfree(pwFirst); - if (pptFirst) xfree(pptFirst); + free(pwFirst); + free(pptFirst); return; } @@ -138,6 +138,6 @@ miPolyFillRect( 1); prect++; } - xfree(pwFirst); - xfree(pptFirst); + free(pwFirst); + free(pptFirst); } diff --git a/xserver/mi/mifpolycon.c b/xserver/mi/mifpolycon.c index 383502f64..e48686a58 100644 --- a/xserver/mi/mifpolycon.c +++ b/xserver/mi/mifpolycon.c @@ -116,15 +116,15 @@ miFillSppPoly( y = ymax - ymin + 1; if ((count < 3) || (y <= 0)) return; - ptsOut = FirstPoint = xalloc(sizeof(DDXPointRec) * y); - width = FirstWidth = xalloc(sizeof(int) * y); - Marked = xalloc(sizeof(int) * count); + ptsOut = FirstPoint = malloc(sizeof(DDXPointRec) * y); + width = FirstWidth = malloc(sizeof(int) * y); + Marked = malloc(sizeof(int) * count); if(!ptsOut || !width || !Marked) { - if (Marked) xfree(Marked); - if (width) xfree(width); - if (ptsOut) xfree(ptsOut); + free(Marked); + free(width); + free(ptsOut); return; } @@ -238,9 +238,9 @@ miFillSppPoly( /* Finally, fill the spans we've collected */ (*pgc->ops->FillSpans)(dst, pgc, ptsOut-FirstPoint, FirstPoint, FirstWidth, 1); - xfree(Marked); - xfree(FirstWidth); - xfree(FirstPoint); + free(Marked); + free(FirstWidth); + free(FirstPoint); } @@ -276,5 +276,5 @@ GetFPolyYBounds( *by = ICEIL(ymin + yFtrans); *ty = ICEIL(ymax + yFtrans - 1); - return(ptMin-ptsStart); + return ptMin-ptsStart; } diff --git a/xserver/mi/migc.c b/xserver/mi/migc.c index a797099cd..6d734e1b6 100644 --- a/xserver/mi/migc.c +++ b/xserver/mi/migc.c @@ -50,7 +50,7 @@ miDestroyGC(GCPtr pGC) if (pGC->pRotatedPixmap) (*pGC->pScreen->DestroyPixmap) (pGC->pRotatedPixmap); if (pGC->freeCompClip) - REGION_DESTROY(pGC->pScreen, pGC->pCompositeClip); + RegionDestroy(pGC->pCompositeClip); } void @@ -68,7 +68,7 @@ miDestroyClip(GCPtr pGC) * we know we'll never have a list of rectangles, since ChangeClip * immediately turns them into a region */ - REGION_DESTROY(pGC->pScreen, pGC->clientClip); + RegionDestroy(pGC->clientClip); } pGC->clientClip = NULL; pGC->clientClipType = CT_NONE; @@ -81,7 +81,7 @@ miChangeClip( GCPtr pGC, int type, pointer pvalue, int nrects) if (type == CT_PIXMAP) { /* convert the pixmap to a region */ - pGC->clientClip = (pointer) BITMAP_TO_REGION(pGC->pScreen, + pGC->clientClip = (pointer) BitmapToRegion(pGC->pScreen, (PixmapPtr) pvalue); (*pGC->pScreen->DestroyPixmap) (pvalue); } @@ -92,10 +92,10 @@ miChangeClip( GCPtr pGC, int type, pointer pvalue, int nrects) } else if (type != CT_NONE) { - pGC->clientClip = (pointer) RECTS_TO_REGION(pGC->pScreen, nrects, + pGC->clientClip = (pointer) RegionFromRects(nrects, (xRectangle *) pvalue, type); - xfree(pvalue); + free(pvalue); } pGC->clientClipType = (type != CT_NONE && pGC->clientClip) ? CT_REGION : CT_NONE; pGC->stateChanges |= GCClipMask; @@ -116,9 +116,8 @@ miCopyClip(GCPtr pgcDst, GCPtr pgcSrc) pgcSrc->clientClip, 0); break; case CT_REGION: - prgnNew = REGION_CREATE(pgcSrc->pScreen, NULL, 1); - REGION_COPY(pgcDst->pScreen, prgnNew, - (RegionPtr) (pgcSrc->clientClip)); + prgnNew = RegionCreate(NULL, 1); + RegionCopy(prgnNew, (RegionPtr) (pgcSrc->clientClip)); (*pgcDst->funcs->ChangeClip) (pgcDst, CT_REGION, (pointer) prgnNew, 0); break; } @@ -134,11 +133,6 @@ miCopyGC(GCPtr pGCSrc, unsigned long changes, GCPtr pGCDst) void miComputeCompositeClip( GCPtr pGC, DrawablePtr pDrawable) { - ScreenPtr pScreen; - - /* This prevents warnings about pScreen not being used. */ - pGC->pScreen = pScreen = pGC->pScreen; - if (pDrawable->type == DRAWABLE_WINDOW) { WindowPtr pWin = (WindowPtr) pDrawable; @@ -167,7 +161,7 @@ miComputeCompositeClip( GCPtr pGC, DrawablePtr pDrawable) if (pGC->clientClipType == CT_NONE) { if (freeCompClip) - REGION_DESTROY(pScreen, pGC->pCompositeClip); + RegionDestroy(pGC->pCompositeClip); pGC->pCompositeClip = pregWin; pGC->freeCompClip = freeTmpClip; } @@ -182,30 +176,30 @@ miComputeCompositeClip( GCPtr pGC, DrawablePtr pDrawable) * clip. if neither is real, create a new region. */ - REGION_TRANSLATE(pScreen, pGC->clientClip, + RegionTranslate(pGC->clientClip, pDrawable->x + pGC->clipOrg.x, pDrawable->y + pGC->clipOrg.y); if (freeCompClip) { - REGION_INTERSECT(pGC->pScreen, pGC->pCompositeClip, + RegionIntersect(pGC->pCompositeClip, pregWin, pGC->clientClip); if (freeTmpClip) - REGION_DESTROY(pScreen, pregWin); + RegionDestroy(pregWin); } else if (freeTmpClip) { - REGION_INTERSECT(pScreen, pregWin, pregWin, pGC->clientClip); + RegionIntersect(pregWin, pregWin, pGC->clientClip); pGC->pCompositeClip = pregWin; } else { - pGC->pCompositeClip = REGION_CREATE(pScreen, NullBox, 0); - REGION_INTERSECT(pScreen, pGC->pCompositeClip, + pGC->pCompositeClip = RegionCreate(NullBox, 0); + RegionIntersect(pGC->pCompositeClip, pregWin, pGC->clientClip); } pGC->freeCompClip = TRUE; - REGION_TRANSLATE(pScreen, pGC->clientClip, + RegionTranslate(pGC->clientClip, -(pDrawable->x + pGC->clipOrg.x), -(pDrawable->y + pGC->clipOrg.y)); } @@ -223,31 +217,31 @@ miComputeCompositeClip( GCPtr pGC, DrawablePtr pDrawable) if (pGC->freeCompClip) { - REGION_RESET(pScreen, pGC->pCompositeClip, &pixbounds); + RegionReset(pGC->pCompositeClip, &pixbounds); } else { pGC->freeCompClip = TRUE; - pGC->pCompositeClip = REGION_CREATE(pScreen, &pixbounds, 1); + pGC->pCompositeClip = RegionCreate(&pixbounds, 1); } if (pGC->clientClipType == CT_REGION) { if(pDrawable->x || pDrawable->y) { - REGION_TRANSLATE(pScreen, pGC->clientClip, + RegionTranslate(pGC->clientClip, pDrawable->x + pGC->clipOrg.x, pDrawable->y + pGC->clipOrg.y); - REGION_INTERSECT(pScreen, pGC->pCompositeClip, + RegionIntersect(pGC->pCompositeClip, pGC->pCompositeClip, pGC->clientClip); - REGION_TRANSLATE(pScreen, pGC->clientClip, + RegionTranslate(pGC->clientClip, -(pDrawable->x + pGC->clipOrg.x), -(pDrawable->y + pGC->clipOrg.y)); } else { - REGION_TRANSLATE(pScreen, pGC->pCompositeClip, + RegionTranslate(pGC->pCompositeClip, -pGC->clipOrg.x, -pGC->clipOrg.y); - REGION_INTERSECT(pScreen, pGC->pCompositeClip, + RegionIntersect(pGC->pCompositeClip, pGC->pCompositeClip, pGC->clientClip); - REGION_TRANSLATE(pScreen, pGC->pCompositeClip, + RegionTranslate(pGC->pCompositeClip, pGC->clipOrg.x, pGC->clipOrg.y); } } diff --git a/xserver/mi/miglblt.c b/xserver/mi/miglblt.c index bc715aee9..13efb0ced 100644 --- a/xserver/mi/miglblt.c +++ b/xserver/mi/miglblt.c @@ -107,7 +107,7 @@ miPolyGlyphBlt( int nbyGlyphWidth; /* bytes per scanline of glyph */ int nbyPadGlyph; /* server padded line of glyph */ - XID gcvals[3]; + ChangeGCVal gcvals[3]; if (pGC->miTranslate) { @@ -134,14 +134,14 @@ miPolyGlyphBlt( return; } - gcvals[0] = GXcopy; - gcvals[1] = 1; - gcvals[2] = 0; + gcvals[0].val = GXcopy; + gcvals[1].val = 1; + gcvals[2].val = 0; - DoChangeGC(pGCtmp, GCFunction|GCForeground|GCBackground, gcvals, 0); + ChangeGC(NullClient, pGCtmp, GCFunction|GCForeground|GCBackground, gcvals); nbyLine = BitmapBytePad(width); - pbits = xalloc(height*nbyLine); + pbits = malloc(height*nbyLine); if (!pbits) { (*pDrawable->pScreen->DestroyPixmap)(pPixmap); @@ -192,7 +192,7 @@ miPolyGlyphBlt( x += pci->metrics.characterWidth; } (*pDrawable->pScreen->DestroyPixmap)(pPixmap); - xfree(pbits); + free(pbits); FreeScratchGC(pGCtmp); } @@ -209,7 +209,7 @@ miImageGlyphBlt( ) { ExtentInfoRec info; /* used by QueryGlyphExtents() */ - XID gcvals[3]; + ChangeGCVal gcvals[3]; int oldAlu, oldFS; unsigned long oldFG; xRectangle backrect; @@ -234,25 +234,25 @@ miImageGlyphBlt( oldFS = pGC->fillStyle; /* fill in the background */ - gcvals[0] = GXcopy; - gcvals[1] = pGC->bgPixel; - gcvals[2] = FillSolid; - DoChangeGC(pGC, GCFunction|GCForeground|GCFillStyle, gcvals, 0); + gcvals[0].val = GXcopy; + gcvals[1].val = pGC->bgPixel; + gcvals[2].val = FillSolid; + ChangeGC(NullClient, pGC, GCFunction|GCForeground|GCFillStyle, gcvals); ValidateGC(pDrawable, pGC); (*pGC->ops->PolyFillRect)(pDrawable, pGC, 1, &backrect); /* put down the glyphs */ - gcvals[0] = oldFG; - DoChangeGC(pGC, GCForeground, gcvals, 0); + gcvals[0].val = oldFG; + ChangeGC(NullClient, pGC, GCForeground, gcvals); ValidateGC(pDrawable, pGC); (*pGC->ops->PolyGlyphBlt)(pDrawable, pGC, x, y, nglyph, ppci, pglyphBase); /* put all the toys away when done playing */ - gcvals[0] = oldAlu; - gcvals[1] = oldFG; - gcvals[2] = oldFS; - DoChangeGC(pGC, GCFunction|GCForeground|GCFillStyle, gcvals, 0); + gcvals[0].val = oldAlu; + gcvals[1].val = oldFG; + gcvals[2].val = oldFS; + ChangeGC(NullClient, pGC, GCFunction|GCForeground|GCFillStyle, gcvals); ValidateGC(pDrawable, pGC); } diff --git a/xserver/mi/miinitext.c b/xserver/mi/miinitext.c index 692be86f4..a7441c9a8 100644 --- a/xserver/mi/miinitext.c +++ b/xserver/mi/miinitext.c @@ -55,7 +55,6 @@ SOFTWARE. #ifdef HAVE_DMX_CONFIG_H #include -#undef MULTIBUFFER #undef XV #undef DBE #undef XF86VIDMODE @@ -116,15 +115,10 @@ extern Bool noScreenSaverExtension; #ifdef MITSHM extern Bool noMITShmExtension; #endif -#ifdef MULTIBUFFER -extern Bool noMultibufferExtension; -#endif #ifdef RANDR extern Bool noRRExtension; #endif -#ifdef RENDER extern Bool noRenderExtension; -#endif #ifdef XCSECURITY extern Bool noSecurityExtension; #endif @@ -195,9 +189,6 @@ typedef void (*InitExtension)(INITARGS); #ifdef MITSHM extern void ShmExtensionInit(INITARGS); #endif -#ifdef MULTIBUFFER -extern void MultibufferExtensionInit(INITARGS); -#endif #ifdef PANORAMIX extern void PanoramiXExtensionInit(INITARGS); #endif @@ -252,9 +243,7 @@ extern void XFree86DRIExtensionInit(INITARGS); #ifdef DPMSExtension extern void DPMSExtensionInit(INITARGS); #endif -#ifdef RENDER extern void RenderExtensionInit(INITARGS); -#endif #ifdef RANDR extern void RRExtensionInit(INITARGS); #endif @@ -308,15 +297,10 @@ static ExtensionToggle ExtensionToggleList[] = #ifdef MITSHM { SHMNAME, &noMITShmExtension }, #endif -#ifdef MULTIBUFFER - { "Multi-Buffering", &noMultibufferExtension }, -#endif #ifdef RANDR { "RANDR", &noRRExtension }, #endif -#ifdef RENDER { "RENDER", &noRenderExtension }, -#endif #ifdef XCSECURITY { "SECURITY", &noSecurityExtension }, #endif @@ -415,9 +399,6 @@ InitExtensions(int argc, char *argv[]) ShapeExtensionInit(); #ifdef MITSHM if (!noMITShmExtension) ShmExtensionInit(); -#endif -#ifdef MULTIBUFFER - if (!noMultibufferExtension) MultibufferExtensionInit(); #endif XInputExtensionInit(); #ifdef XTEST @@ -469,9 +450,7 @@ InitExtensions(int argc, char *argv[]) /* must be before Render to layer DisplayCursor correctly */ if (!noXFixesExtension) XFixesExtensionInit(); #endif -#ifdef RENDER if (!noRenderExtension) RenderExtensionInit(); -#endif #ifdef RANDR if (!noRRExtension) RRExtensionInit(); #endif @@ -524,9 +503,7 @@ static ExtensionModule staticExtensions[] = { #ifdef XF86BIGFONT { XFree86BigfontExtensionInit, XF86BIGFONTNAME, &noXFree86BigfontExtension, NULL, NULL }, #endif -#ifdef RENDER { RenderExtensionInit, "RENDER", &noRenderExtension, NULL, NULL }, -#endif #ifdef RANDR { RRExtensionInit, "RANDR", &noRRExtension, NULL, NULL }, #endif @@ -560,8 +537,7 @@ InitExtensions(int argc, char *argv[]) for (i = 0; ExtensionModuleList[i].name != NULL; i++) { ext = &ExtensionModuleList[i]; if (ext->initFunc != NULL && - (ext->disablePtr == NULL || - (ext->disablePtr != NULL && !*ext->disablePtr))) { + (ext->disablePtr == NULL || !*ext->disablePtr)) { (ext->initFunc)(); } } diff --git a/xserver/mi/miline.h b/xserver/mi/miline.h index b5f706dbf..ae9d113d1 100644 --- a/xserver/mi/miline.h +++ b/xserver/mi/miline.h @@ -148,7 +148,8 @@ extern _X_EXPORT void miSetZeroLineBias( #define IsXDecreasingOctant(_octant) ((_octant) & XDECREASING) #define IsYDecreasingOctant(_octant) ((_octant) & YDECREASING) -extern _X_EXPORT DevPrivateKey miZeroLineScreenKey; +extern _X_EXPORT DevPrivateKeyRec miZeroLineScreenKeyRec; +#define miZeroLineScreenKey (&miZeroLineScreenKeyRec) extern _X_EXPORT int miZeroClipLine( int /*xmin*/, diff --git a/xserver/mi/mioverlay.c b/xserver/mi/mioverlay.c index e0aa88017..766c5e7f7 100644 --- a/xserver/mi/mioverlay.c +++ b/xserver/mi/mioverlay.c @@ -5,6 +5,7 @@ #include #include "scrnintstr.h" +#include #include "validate.h" #include "windowstr.h" #include "mi.h" @@ -54,10 +55,10 @@ typedef struct { Bool copyUnderlay; } miOverlayScreenRec, *miOverlayScreenPtr; -static int miOverlayWindowKeyKeyIndex; -static DevPrivateKey miOverlayWindowKey = &miOverlayWindowKeyKeyIndex; -static int miOverlayScreenKeyIndex; -static DevPrivateKey miOverlayScreenKey = &miOverlayScreenKeyIndex; +static DevPrivateKeyRec miOverlayWindowKeyRec; +#define miOverlayWindowKey (&miOverlayWindowKeyRec) +static DevPrivateKeyRec miOverlayScreenKeyRec; +#define miOverlayScreenKey (&miOverlayScreenKeyRec) static void RebuildTree(WindowPtr); static Bool HasUnderlayChildren(WindowPtr); @@ -82,7 +83,7 @@ static void miOverlayResizeWindow(WindowPtr, int, int, unsigned int, unsigned int, WindowPtr); static void miOverlayClearToBackground(WindowPtr, int, int, int, int, Bool); -static void miOverlaySetShape(WindowPtr); +static void miOverlaySetShape(WindowPtr, int); static void miOverlayChangeBorderWidth(WindowPtr, unsigned int); #define MIOVERLAY_GET_SCREEN_PRIVATE(pScreen) ((miOverlayScreenPtr) \ @@ -112,10 +113,13 @@ miInitOverlay( if(!inOverlayFunc || !transFunc) return FALSE; - if(!dixRequestPrivate(miOverlayWindowKey, sizeof(miOverlayWindowRec))) + if(!dixRegisterPrivateKey(&miOverlayWindowKeyRec, PRIVATE_WINDOW, sizeof(miOverlayWindowRec))) return FALSE; - if(!(pScreenPriv = xalloc(sizeof(miOverlayScreenRec)))) + if(!dixRegisterPrivateKey(&miOverlayScreenKeyRec, PRIVATE_SCREEN, 0)) + return FALSE; + + if(!(pScreenPriv = malloc(sizeof(miOverlayScreenRec)))) return FALSE; dixSetPrivate(&pScreen->devPrivates, miOverlayScreenKey, pScreenPriv); @@ -166,7 +170,7 @@ miOverlayCloseScreen(int i, ScreenPtr pScreen) pScreen->UnrealizeWindow = pScreenPriv->UnrealizeWindow; pScreen->RealizeWindow = pScreenPriv->RealizeWindow; - xfree(pScreenPriv); + free(pScreenPriv); return (*pScreen->CloseScreen)(i, pScreen); } @@ -184,7 +188,7 @@ miOverlayCreateWindow(WindowPtr pWin) pWinPriv->tree = NULL; if(!pWin->parent || !((*pScreenPriv->InOverlay)(pWin))) { - if(!(pTree = (miOverlayTreePtr)xcalloc(1, sizeof(miOverlayTreeRec)))) + if(!(pTree = (miOverlayTreePtr)calloc(1, sizeof(miOverlayTreeRec)))) return FALSE; } @@ -200,8 +204,8 @@ miOverlayCreateWindow(WindowPtr pWin) pTree->visibility = VisibilityNotViewable; pWinPriv->tree = pTree; if(pWin->parent) { - REGION_NULL(pScreen, &(pTree->borderClip)); - REGION_NULL(pScreen, &(pTree->clipList)); + RegionNull(&(pTree->borderClip)); + RegionNull(&(pTree->clipList)); RebuildTree(pWin); } else { BoxRec fullBox; @@ -209,10 +213,10 @@ miOverlayCreateWindow(WindowPtr pWin) fullBox.y1 = 0; fullBox.x2 = pScreen->width; fullBox.y2 = pScreen->height; - REGION_INIT(pScreen, &(pTree->borderClip), &fullBox, 1); - REGION_INIT(pScreen, &(pTree->clipList), &fullBox, 1); + RegionInit(&(pTree->borderClip), &fullBox, 1); + RegionInit(&(pTree->clipList), &fullBox, 1); } - } else xfree(pTree); + } else free(pTree); } return TRUE; @@ -238,9 +242,9 @@ miOverlayDestroyWindow(WindowPtr pWin) else if(pTree->parent) pTree->parent->lastChild = pTree->prevSib; - REGION_UNINIT(pScreen, &(pTree->borderClip)); - REGION_UNINIT(pScreen, &(pTree->clipList)); - xfree(pTree); + RegionUninit(&(pTree->borderClip)); + RegionUninit(&(pTree->clipList)); + free(pTree); } if(pScreenPriv->DestroyWindow) { @@ -305,7 +309,7 @@ miOverlayReparentWindow(WindowPtr pWin, WindowPtr pPriorParent) { if(IN_UNDERLAY(pWin) || HasUnderlayChildren(pWin)) { /* This could probably be more optimal */ - RebuildTree(WindowTable[pWin->drawable.pScreen->myNum]->firstChild); + RebuildTree(pWin->drawable.pScreen->root->firstChild); } } @@ -325,7 +329,6 @@ miOverlayMarkOverlappedWindows( WindowPtr pFirst, WindowPtr *pLayerWin ){ - ScreenPtr pScreen = pWin->drawable.pScreen; WindowPtr pChild, pLast; Bool overMarked, underMarked, doUnderlay, markAll; miOverlayTreePtr pTree = NULL, tLast, tChild; @@ -337,7 +340,7 @@ miOverlayMarkOverlappedWindows( doUnderlay = (IN_UNDERLAY(pWin) || HasUnderlayChildren(pWin)); - box = REGION_EXTENTS(pScreen, &pWin->borderSize); + box = RegionExtents(&pWin->borderSize); if((pChild = pFirst)) { pLast = pChild->parent->lastChild; @@ -348,13 +351,13 @@ miOverlayMarkOverlappedWindows( pTree = MIOVERLAY_GET_WINDOW_TREE(pChild); if(pChild->viewable) { - if (REGION_BROKEN (pScreen, &pChild->winSize)) + if (RegionBroken(&pChild->winSize)) SetWinSize (pChild); - if (REGION_BROKEN (pScreen, &pChild->borderSize)) + if (RegionBroken(&pChild->borderSize)) SetBorderSize (pChild); if (markAll || - RECT_IN_REGION(pScreen, &pChild->borderSize, box)) + RegionContainsRect(&pChild->borderSize, box)) { MARK_OVERLAY(pChild); overMarked = TRUE; @@ -409,12 +412,12 @@ miOverlayMarkOverlappedWindows( while(1) { if(tChild->pWin->viewable) { - if (REGION_BROKEN (pScreen, &tChild->pWin->winSize)) + if (RegionBroken(&tChild->pWin->winSize)) SetWinSize (tChild->pWin); - if (REGION_BROKEN (pScreen, &tChild->pWin->borderSize)) + if (RegionBroken(&tChild->pWin->borderSize)) SetBorderSize (tChild->pWin); - if(RECT_IN_REGION(pScreen, &(tChild->pWin->borderSize), box)) + if(RegionContainsRect(&(tChild->pWin->borderSize), box)) { MARK_UNDERLAY(tChild->pWin); underMarked = TRUE; @@ -436,11 +439,12 @@ miOverlayMarkOverlappedWindows( } if(underMarked) { + ScreenPtr pScreen = pWin->drawable.pScreen; MARK_UNDERLAY(pTree->parent->pWin); MIOVERLAY_GET_SCREEN_PRIVATE(pScreen)->underlayMarked = TRUE; } - return (underMarked || overMarked); + return underMarked || overMarked; } @@ -472,7 +476,7 @@ miOverlayComputeClips( borderSize.y2 = dy; oldVis = tParent->visibility; - switch (RECT_IN_REGION( pScreen, universe, &borderSize)) { + switch (RegionContainsRect(universe, &borderSize)) { case rgnIN: newVis = VisibilityUnobscured; break; @@ -482,7 +486,7 @@ miOverlayComputeClips( RegionPtr pBounding; if ((pBounding = wBoundingShape (pParent))) { - switch (miShapedWindowIn (pScreen, universe, pBounding, + switch (miShapedWindowIn (universe, pBounding, &borderSize, pParent->drawable.x, pParent->drawable.y)) @@ -520,8 +524,8 @@ miOverlayComputeClips( while (1) { if (tChild->pWin->viewable) { if (tChild->visibility != VisibilityFullyObscured) { - REGION_TRANSLATE( pScreen, &tChild->borderClip, dx, dy); - REGION_TRANSLATE( pScreen, &tChild->clipList, dx, dy); + RegionTranslate(&tChild->borderClip, dx, dy); + RegionTranslate(&tChild->clipList, dx, dy); tChild->pWin->drawable.serialNumber = NEXT_SERIAL_NUMBER; @@ -529,14 +533,13 @@ miOverlayComputeClips( (* pScreen->ClipNotify) (tChild->pWin, dx, dy); } if (tChild->valdata) { - REGION_NULL(pScreen, &tChild->valdata->borderExposed); + RegionNull(&tChild->valdata->borderExposed); if (HasParentRelativeBorder(tChild->pWin)){ - REGION_SUBTRACT(pScreen, - &tChild->valdata->borderExposed, - &tChild->borderClip, - &tChild->pWin->winSize); + RegionSubtract(&tChild->valdata->borderExposed, + &tChild->borderClip, + &tChild->pWin->winSize); } - REGION_NULL(pScreen, &tChild->valdata->exposed); + RegionNull(&tChild->valdata->exposed); } if (tChild->firstChild) { tChild = tChild->firstChild; @@ -554,50 +557,50 @@ miOverlayComputeClips( /* fall through */ default: if (dx || dy) { - REGION_TRANSLATE( pScreen, &tParent->borderClip, dx, dy); - REGION_TRANSLATE( pScreen, &tParent->clipList, dx, dy); + RegionTranslate(&tParent->borderClip, dx, dy); + RegionTranslate(&tParent->clipList, dx, dy); } break; case VTBroken: - REGION_EMPTY (pScreen, &tParent->borderClip); - REGION_EMPTY (pScreen, &tParent->clipList); + RegionEmpty(&tParent->borderClip); + RegionEmpty(&tParent->clipList); break; } borderVisible = tParent->valdata->borderVisible; - REGION_NULL(pScreen, &tParent->valdata->borderExposed); - REGION_NULL(pScreen, &tParent->valdata->exposed); + RegionNull(&tParent->valdata->borderExposed); + RegionNull(&tParent->valdata->exposed); if (HasBorder (pParent)) { if (borderVisible) { - REGION_SUBTRACT( pScreen, exposed, universe, borderVisible); - REGION_DESTROY( pScreen, borderVisible); + RegionSubtract(exposed, universe, borderVisible); + RegionDestroy(borderVisible); } else - REGION_SUBTRACT( pScreen, exposed, universe, &tParent->borderClip); + RegionSubtract(exposed, universe, &tParent->borderClip); if (HasParentRelativeBorder(pParent) && (dx || dy)) - REGION_SUBTRACT( pScreen, &tParent->valdata->borderExposed, + RegionSubtract(&tParent->valdata->borderExposed, universe, &pParent->winSize); else - REGION_SUBTRACT( pScreen, &tParent->valdata->borderExposed, + RegionSubtract(&tParent->valdata->borderExposed, exposed, &pParent->winSize); - REGION_COPY( pScreen, &tParent->borderClip, universe); - REGION_INTERSECT( pScreen, universe, universe, &pParent->winSize); + RegionCopy(&tParent->borderClip, universe); + RegionIntersect(universe, universe, &pParent->winSize); } else - REGION_COPY( pScreen, &tParent->borderClip, universe); + RegionCopy(&tParent->borderClip, universe); if ((tChild = tParent->firstChild) && pParent->mapped) { - REGION_NULL(pScreen, &childUniverse); - REGION_NULL(pScreen, &childUnion); + RegionNull(&childUniverse); + RegionNull(&childUnion); for (; tChild; tChild = tChild->nextSib) { if (tChild->pWin->viewable) - REGION_APPEND( pScreen, &childUnion, &tChild->pWin->borderSize); + RegionAppend(&childUnion, &tChild->pWin->borderSize); } - REGION_VALIDATE( pScreen, &childUnion, &overlap); + RegionValidate(&childUnion, &overlap); for (tChild = tParent->firstChild; tChild; @@ -605,31 +608,31 @@ miOverlayComputeClips( { if (tChild->pWin->viewable) { if (tChild->valdata) { - REGION_INTERSECT( pScreen, &childUniverse, universe, + RegionIntersect(&childUniverse, universe, &tChild->pWin->borderSize); miOverlayComputeClips (tChild->pWin, &childUniverse, kind, exposed); } if (overlap) - REGION_SUBTRACT( pScreen, universe, universe, + RegionSubtract(universe, universe, &tChild->pWin->borderSize); } } if (!overlap) - REGION_SUBTRACT( pScreen, universe, universe, &childUnion); - REGION_UNINIT( pScreen, &childUnion); - REGION_UNINIT( pScreen, &childUniverse); + RegionSubtract(universe, universe, &childUnion); + RegionUninit(&childUnion); + RegionUninit(&childUniverse); } if (oldVis == VisibilityFullyObscured || oldVis == VisibilityNotViewable) { - REGION_COPY( pScreen, &tParent->valdata->exposed, universe); + RegionCopy(&tParent->valdata->exposed, universe); } else if (newVis != VisibilityFullyObscured && newVis != VisibilityNotViewable) { - REGION_SUBTRACT( pScreen, &tParent->valdata->exposed, + RegionSubtract(&tParent->valdata->exposed, universe, &tParent->clipList); } @@ -707,14 +710,14 @@ miOverlayMarkUnrealizedWindow( if ((pChild != pWin) || fromConfigure) { miOverlayTreePtr pTree; - REGION_EMPTY(pChild->drawable.pScreen, &pChild->clipList); + RegionEmpty(&pChild->clipList); if (pChild->drawable.pScreen->ClipNotify) (* pChild->drawable.pScreen->ClipNotify)(pChild, 0, 0); - REGION_EMPTY(pChild->drawable.pScreen, &pChild->borderClip); + RegionEmpty(&pChild->borderClip); if((pTree = MIOVERLAY_GET_WINDOW_TREE(pChild))) { if(pTree->valdata != (miOverlayValDataPtr)UnmapValData) { - REGION_EMPTY(pChild->drawable.pScreen, &pTree->clipList); - REGION_EMPTY(pChild->drawable.pScreen, &pTree->borderClip); + RegionEmpty(&pTree->clipList); + RegionEmpty(&pTree->borderClip); } } } @@ -739,9 +742,9 @@ miOverlayValidateTree( if (!pChild) pChild = pParent->firstChild; - REGION_NULL(pScreen, &totalClip); - REGION_NULL(pScreen, &childClip); - REGION_NULL(pScreen, &exposed); + RegionNull(&totalClip); + RegionNull(&childClip); + RegionNull(&exposed); newParent = pParent; @@ -755,52 +758,52 @@ miOverlayValidateTree( else tChild = tParent->firstChild; - if (REGION_BROKEN (pScreen, &tParent->clipList) && - !REGION_BROKEN (pScreen, &tParent->borderClip)) + if (RegionBroken(&tParent->clipList) && + !RegionBroken(&tParent->borderClip)) { kind = VTBroken; - REGION_COPY (pScreen, &totalClip, &tParent->borderClip); - REGION_INTERSECT (pScreen, &totalClip, &totalClip, + RegionCopy(&totalClip, &tParent->borderClip); + RegionIntersect(&totalClip, &totalClip, &tParent->pWin->winSize); for (tWin = tParent->firstChild; tWin != tChild; tWin = tWin->nextSib) { if (tWin->pWin->viewable) - REGION_SUBTRACT (pScreen, &totalClip, &totalClip, + RegionSubtract(&totalClip, &totalClip, &tWin->pWin->borderSize); } - REGION_EMPTY (pScreen, &tParent->clipList); + RegionEmpty(&tParent->clipList); } else { for(tWin = tChild; tWin; tWin = tWin->nextSib) { if(tWin->valdata) - REGION_APPEND(pScreen, &totalClip, &tWin->borderClip); + RegionAppend(&totalClip, &tWin->borderClip); } - REGION_VALIDATE(pScreen, &totalClip, &overlap); + RegionValidate(&totalClip, &overlap); } if(kind != VTStack) - REGION_UNION(pScreen, &totalClip, &totalClip, &tParent->clipList); + RegionUnion(&totalClip, &totalClip, &tParent->clipList); for(tWin = tChild; tWin; tWin = tWin->nextSib) { if(tWin->valdata) { if(tWin->pWin->viewable) { - REGION_INTERSECT(pScreen, &childClip, &totalClip, + RegionIntersect(&childClip, &totalClip, &tWin->pWin->borderSize); miOverlayComputeClips(tWin->pWin, &childClip, kind, &exposed); - REGION_SUBTRACT(pScreen, &totalClip, &totalClip, + RegionSubtract(&totalClip, &totalClip, &tWin->pWin->borderSize); } else { /* Means we are unmapping */ - REGION_EMPTY(pScreen, &tWin->clipList); - REGION_EMPTY( pScreen, &tWin->borderClip); + RegionEmpty(&tWin->clipList); + RegionEmpty(&tWin->borderClip); tWin->valdata = NULL; } } } - REGION_UNINIT(pScreen, &childClip); + RegionUninit(&childClip); if(!((*pPriv->InOverlay)(newParent))) { - REGION_NULL(pScreen, &tParent->valdata->exposed); - REGION_NULL(pScreen, &tParent->valdata->borderExposed); + RegionNull(&tParent->valdata->exposed); + RegionNull(&tParent->valdata->borderExposed); } switch (kind) { @@ -808,18 +811,18 @@ miOverlayValidateTree( break; default: if(!((*pPriv->InOverlay)(newParent))) - REGION_SUBTRACT(pScreen, &tParent->valdata->exposed, &totalClip, + RegionSubtract(&tParent->valdata->exposed, &totalClip, &tParent->clipList); /* fall through */ case VTMap: - REGION_COPY( pScreen, &tParent->clipList, &totalClip); + RegionCopy(&tParent->clipList, &totalClip); if(!((*pPriv->InOverlay)(newParent))) newParent->drawable.serialNumber = NEXT_SERIAL_NUMBER; break; } - REGION_UNINIT( pScreen, &totalClip); - REGION_UNINIT( pScreen, &exposed); + RegionUninit(&totalClip); + RegionUninit(&exposed); SKIP_UNDERLAY: @@ -852,16 +855,16 @@ miOverlayHandleExposures(WindowPtr pWin) while (1) { if((mival = pTree->valdata)) { if(!((*pPriv->InOverlay)(pTree->pWin))) { - if (REGION_NOTEMPTY(pScreen, &mival->borderExposed)) { + if (RegionNotEmpty(&mival->borderExposed)) { miPaintWindow(pTree->pWin, &mival->borderExposed, PW_BORDER); } - REGION_UNINIT(pScreen, &mival->borderExposed); + RegionUninit(&mival->borderExposed); (*WindowExposures)(pTree->pWin,&mival->exposed,NullRegion); - REGION_UNINIT(pScreen, &mival->exposed); + RegionUninit(&mival->exposed); } - xfree(mival); + free(mival); pTree->valdata = NULL; if (pTree->firstChild) { pTree = pTree->firstChild; @@ -881,25 +884,25 @@ miOverlayHandleExposures(WindowPtr pWin) while (1) { if ( (val = pChild->valdata) ) { if(!((*pPriv->InOverlay)(pChild))) { - REGION_UNION(pScreen, &val->after.exposed, &val->after.exposed, + RegionUnion(&val->after.exposed, &val->after.exposed, &val->after.borderExposed); - if (REGION_NOTEMPTY(pScreen, &val->after.exposed)) { + if (RegionNotEmpty(&val->after.exposed)) { (*(MIOVERLAY_GET_SCREEN_PRIVATE(pScreen)->MakeTransparent))( pScreen, - REGION_NUM_RECTS(&val->after.exposed), - REGION_RECTS(&val->after.exposed)); + RegionNumRects(&val->after.exposed), + RegionRects(&val->after.exposed)); } } else { - if (REGION_NOTEMPTY(pScreen, &val->after.borderExposed)) { + if (RegionNotEmpty(&val->after.borderExposed)) { miPaintWindow(pChild, &val->after.borderExposed, PW_BORDER); } (*WindowExposures)(pChild, &val->after.exposed, NullRegion); } - REGION_UNINIT(pScreen, &val->after.borderExposed); - REGION_UNINIT(pScreen, &val->after.exposed); - xfree(val); + RegionUninit(&val->after.borderExposed); + RegionUninit(&val->after.exposed); + free(val); pChild->valdata = NULL; if (pChild->firstChild) { @@ -939,13 +942,13 @@ miOverlayMoveWindow( oldpt.x = pWin->drawable.x; oldpt.y = pWin->drawable.y; if (WasViewable) { - REGION_NULL(pScreen, &overReg); - REGION_NULL(pScreen, &underReg); + RegionNull(&overReg); + RegionNull(&underReg); if(pTree) { - REGION_COPY(pScreen, &overReg, &pWin->borderClip); - REGION_COPY(pScreen, &underReg, &pTree->borderClip); + RegionCopy(&overReg, &pWin->borderClip); + RegionCopy(&underReg, &pTree->borderClip); } else { - REGION_COPY(pScreen, &overReg, &pWin->borderClip); + RegionCopy(&overReg, &pWin->borderClip); CollectUnderlayChildrenRegions(pWin, &underReg); } (*pScreen->MarkOverlappedWindows)(pWin, pWin, NULL); @@ -970,16 +973,16 @@ miOverlayMoveWindow( (*pScreen->ValidateTree)(pWin->parent, NullWindow, kind); - if(REGION_NOTEMPTY(pScreen, &underReg)) { + if(RegionNotEmpty(&underReg)) { pPriv->copyUnderlay = TRUE; (* pWin->drawable.pScreen->CopyWindow)(pWin, oldpt, &underReg); } - REGION_UNINIT(pScreen, &underReg); - if(REGION_NOTEMPTY(pScreen, &overReg)) { + RegionUninit(&underReg); + if(RegionNotEmpty(&overReg)) { pPriv->copyUnderlay = FALSE; (* pWin->drawable.pScreen->CopyWindow)(pWin, oldpt, &overReg); } - REGION_UNINIT(pScreen, &overReg); + RegionUninit(&overReg); (*pScreen->HandleExposures)(pWin->parent); if (pScreen->PostValidateTree) @@ -1000,10 +1003,9 @@ miOverlayWindowExposures( RegionPtr other_exposed ){ RegionPtr exposures = prgn; - ScreenPtr pScreen = pWin->drawable.pScreen; - if ((prgn && !REGION_NIL(prgn)) || - (exposures && !REGION_NIL(exposures)) || other_exposed) + if ((prgn && !RegionNil(prgn)) || + (exposures && !RegionNil(exposures)) || other_exposed) { RegionRec expRec; int clientInterested; @@ -1012,51 +1014,52 @@ miOverlayWindowExposures( ExposureMask; if (other_exposed) { if (exposures) { - REGION_UNION(pScreen, other_exposed, exposures, other_exposed); + RegionUnion(other_exposed, exposures, other_exposed); if (exposures != prgn) - REGION_DESTROY(pScreen, exposures); + RegionDestroy(exposures); } exposures = other_exposed; } if (clientInterested && exposures && - (REGION_NUM_RECTS(exposures) > RECTLIMIT)) + (RegionNumRects(exposures) > RECTLIMIT)) { + ScreenPtr pScreen = pWin->drawable.pScreen; miOverlayScreenPtr pPriv = MIOVERLAY_GET_SCREEN_PRIVATE(pScreen); BoxRec box; - box = *REGION_EXTENTS(pScreen, exposures); + box = *RegionExtents(exposures); if (exposures == prgn) { exposures = &expRec; - REGION_INIT(pScreen, exposures, &box, 1); - REGION_RESET(pScreen, prgn, &box); + RegionInit(exposures, &box, 1); + RegionReset(prgn, &box); } else { - REGION_RESET(pScreen, exposures, &box); - REGION_UNION(pScreen, prgn, prgn, exposures); + RegionReset(exposures, &box); + RegionUnion(prgn, prgn, exposures); } /* This is the only reason why we are replacing mi's version of this file */ if(!((*pPriv->InOverlay)(pWin))) { miOverlayTreePtr pTree = MIOVERLAY_GET_WINDOW_TREE(pWin); - REGION_INTERSECT(pScreen, prgn, prgn, &pTree->clipList); + RegionIntersect(prgn, prgn, &pTree->clipList); } else - REGION_INTERSECT(pScreen, prgn, prgn, &pWin->clipList); + RegionIntersect(prgn, prgn, &pWin->clipList); } - if (prgn && !REGION_NIL(prgn)) + if (prgn && !RegionNil(prgn)) miPaintWindow(pWin, prgn, PW_BACKGROUND); - if (clientInterested && exposures && !REGION_NIL(exposures)) + if (clientInterested && exposures && !RegionNil(exposures)) miSendExposures(pWin, exposures, pWin->drawable.x, pWin->drawable.y); if (exposures == &expRec) { - REGION_UNINIT(pScreen, exposures); + RegionUninit(exposures); } else if (exposures && exposures != prgn && exposures != other_exposed) - REGION_DESTROY(pScreen, exposures); + RegionDestroy(exposures); if (prgn) - REGION_EMPTY(pScreen, prgn); + RegionEmpty(prgn); } else if (exposures && exposures != prgn) - REGION_DESTROY(pScreen, exposures); + RegionDestroy(exposures); } @@ -1070,34 +1073,30 @@ miOverlayRecomputeExposures ( WindowPtr pWin, pointer value ){ - ScreenPtr pScreen; miOverlayTwoRegions *pValid = (miOverlayTwoRegions*)value; miOverlayTreePtr pTree = MIOVERLAY_GET_WINDOW_TREE(pWin); - /* This prevents warning about pScreen not being used. */ - pWin->drawable.pScreen = pScreen = pWin->drawable.pScreen; - if (pWin->valdata) { /* * compute exposed regions of this window */ - REGION_SUBTRACT(pScreen, &pWin->valdata->after.exposed, + RegionSubtract(&pWin->valdata->after.exposed, &pWin->clipList, pValid->over); /* * compute exposed regions of the border */ - REGION_SUBTRACT(pScreen, &pWin->valdata->after.borderExposed, + RegionSubtract(&pWin->valdata->after.borderExposed, &pWin->borderClip, &pWin->winSize); - REGION_SUBTRACT(pScreen, &pWin->valdata->after.borderExposed, + RegionSubtract(&pWin->valdata->after.borderExposed, &pWin->valdata->after.borderExposed, pValid->over); } if(pTree && pTree->valdata) { - REGION_SUBTRACT(pScreen, &pTree->valdata->exposed, + RegionSubtract(&pTree->valdata->exposed, &pTree->clipList, pValid->under); - REGION_SUBTRACT(pScreen, &pTree->valdata->borderExposed, + RegionSubtract(&pTree->valdata->borderExposed, &pTree->borderClip, &pWin->winSize); - REGION_SUBTRACT(pScreen, &pTree->valdata->borderExposed, + RegionSubtract(&pTree->valdata->borderExposed, &pTree->valdata->borderExposed, pValid->under); } else if (!pWin->valdata) return WT_NOMATCH; @@ -1153,11 +1152,11 @@ miOverlayResizeWindow( /* * save the visible region of the window */ - oldRegion = REGION_CREATE(pScreen, NullBox, 1); - REGION_COPY(pScreen, oldRegion, &pWin->winSize); + oldRegion = RegionCreate(NullBox, 1); + RegionCopy(oldRegion, &pWin->winSize); if(doUnderlay) { - oldRegion2 = REGION_CREATE(pScreen, NullBox, 1); - REGION_COPY(pScreen, oldRegion2, &pWin->winSize); + oldRegion2 = RegionCreate(NullBox, 1); + RegionCopy(oldRegion2, &pWin->winSize); } /* @@ -1169,16 +1168,16 @@ miOverlayResizeWindow( g = pChild->winGravity; if (g != UnmapGravity) { if (!gravitate[g]) - gravitate[g] = REGION_CREATE(pScreen, NullBox, 1); - REGION_UNION(pScreen, gravitate[g], + gravitate[g] = RegionCreate(NullBox, 1); + RegionUnion(gravitate[g], gravitate[g], &pChild->borderClip); if(doUnderlay) { if (!gravitate2[g]) - gravitate2[g] = REGION_CREATE(pScreen, NullBox, 0); + gravitate2[g] = RegionCreate(NullBox, 0); if((tChild = MIOVERLAY_GET_WINDOW_TREE(pChild))) { - REGION_UNION(pScreen, gravitate2[g], + RegionUnion(gravitate2[g], gravitate2[g], &tChild->borderClip); } else CollectUnderlayChildrenRegions(pChild, gravitate2[g]); @@ -1192,11 +1191,11 @@ miOverlayResizeWindow( oldWinClip = oldWinClip2 = NULL; if (pWin->bitGravity != ForgetGravity) { - oldWinClip = REGION_CREATE(pScreen, NullBox, 1); - REGION_COPY(pScreen, oldWinClip, &pWin->clipList); + oldWinClip = RegionCreate(NullBox, 1); + RegionCopy(oldWinClip, &pWin->clipList); if(pTree) { - oldWinClip2 = REGION_CREATE(pScreen, NullBox, 1); - REGION_COPY(pScreen, oldWinClip2, &pTree->clipList); + oldWinClip2 = RegionCreate(NullBox, 1); + RegionCopy(oldWinClip2, &pTree->clipList); } } /* @@ -1212,26 +1211,26 @@ miOverlayResizeWindow( if ((pWin->drawable.height != h || pWin->drawable.width != w) && HasBorder (pWin)) { - borderVisible = REGION_CREATE(pScreen, NullBox, 1); + borderVisible = RegionCreate(NullBox, 1); if(pTree) - borderVisible2 = REGION_CREATE(pScreen, NullBox, 1); + borderVisible2 = RegionCreate(NullBox, 1); /* for tiled borders, we punt and draw the whole thing */ if (pWin->borderIsPixel || !moved) { if (shrunk || moved) - REGION_SUBTRACT(pScreen, borderVisible, + RegionSubtract(borderVisible, &pWin->borderClip, &pWin->winSize); else - REGION_COPY(pScreen, borderVisible, + RegionCopy(borderVisible, &pWin->borderClip); if(pTree) { if (shrunk || moved) - REGION_SUBTRACT(pScreen, borderVisible, + RegionSubtract(borderVisible, &pTree->borderClip, &pWin->winSize); else - REGION_COPY(pScreen, borderVisible, + RegionCopy(borderVisible, &pTree->borderClip); } } @@ -1258,7 +1257,7 @@ miOverlayResizeWindow( pFirstChange = MoveWindowInStack(pWin, pSib); if (WasViewable) { - pRegion = REGION_CREATE(pScreen, NullBox, 1); + pRegion = RegionCreate(NullBox, 1); (*pScreen->MarkOverlappedWindows)(pWin, pFirstChange, NULL); @@ -1273,9 +1272,9 @@ miOverlayResizeWindow( * the entire window is trashed unless bitGravity * recovers portions of it */ - REGION_COPY(pScreen, &pWin->valdata->after.exposed, &pWin->clipList); + RegionCopy(&pWin->valdata->after.exposed, &pWin->clipList); if(pTree) - REGION_COPY(pScreen, &pTree->valdata->exposed, &pTree->clipList); + RegionCopy(&pTree->valdata->exposed, &pTree->clipList); } GravityTranslate (x, y, oldx, oldy, dw, dh, pWin->bitGravity, &nx, &ny); @@ -1303,20 +1302,20 @@ miOverlayResizeWindow( dx = (oldx - nx) - offx; dy = (oldy - ny) - offy; if (dx || dy) { - REGION_TRANSLATE(pScreen, &pWin->winSize, dx, dy); + RegionTranslate(&pWin->winSize, dx, dy); offx += dx; offy += dy; } if(gravitate[g]) - REGION_INTERSECT(pScreen, gravitate[g], gravitate[g], + RegionIntersect(gravitate[g], gravitate[g], &pWin->winSize); if(gravitate2[g]) - REGION_INTERSECT(pScreen, gravitate2[g], gravitate2[g], + RegionIntersect(gravitate2[g], gravitate2[g], &pWin->winSize); } /* get winSize back where it belongs */ if (offx || offy) - REGION_TRANSLATE(pScreen, &pWin->winSize, -offx, -offy); + RegionTranslate(&pWin->winSize, -offx, -offy); } /* * add screen bits to the appropriate bucket @@ -1324,22 +1323,22 @@ miOverlayResizeWindow( if (oldWinClip2) { - REGION_COPY(pScreen, pRegion, oldWinClip2); - REGION_TRANSLATE(pScreen, pRegion, nx - oldx, ny - oldy); - REGION_INTERSECT(pScreen, oldWinClip2, pRegion, &pTree->clipList); + RegionCopy(pRegion, oldWinClip2); + RegionTranslate(pRegion, nx - oldx, ny - oldy); + RegionIntersect(oldWinClip2, pRegion, &pTree->clipList); for (g = pWin->bitGravity + 1; g <= StaticGravity; g++) { if (gravitate2[g]) - REGION_SUBTRACT(pScreen, oldWinClip2, oldWinClip2, + RegionSubtract(oldWinClip2, oldWinClip2, gravitate2[g]); } - REGION_TRANSLATE(pScreen, oldWinClip2, oldx - nx, oldy - ny); + RegionTranslate(oldWinClip2, oldx - nx, oldy - ny); g = pWin->bitGravity; if (!gravitate2[g]) gravitate2[g] = oldWinClip2; else { - REGION_UNION(pScreen,gravitate2[g],gravitate2[g],oldWinClip2); - REGION_DESTROY(pScreen, oldWinClip2); + RegionUnion(gravitate2[g],gravitate2[g],oldWinClip2); + RegionDestroy(oldWinClip2); } } @@ -1348,9 +1347,9 @@ miOverlayResizeWindow( /* * clip to new clipList */ - REGION_COPY(pScreen, pRegion, oldWinClip); - REGION_TRANSLATE(pScreen, pRegion, nx - oldx, ny - oldy); - REGION_INTERSECT(pScreen, oldWinClip, pRegion, &pWin->clipList); + RegionCopy(pRegion, oldWinClip); + RegionTranslate(pRegion, nx - oldx, ny - oldy); + RegionIntersect(oldWinClip, pRegion, &pWin->clipList); /* * don't step on any gravity bits which will be copied after this * region. Note -- this assumes that the regions will be copied @@ -1358,16 +1357,16 @@ miOverlayResizeWindow( */ for (g = pWin->bitGravity + 1; g <= StaticGravity; g++) { if (gravitate[g]) - REGION_SUBTRACT(pScreen, oldWinClip, oldWinClip, + RegionSubtract(oldWinClip, oldWinClip, gravitate[g]); } - REGION_TRANSLATE(pScreen, oldWinClip, oldx - nx, oldy - ny); + RegionTranslate(oldWinClip, oldx - nx, oldy - ny); g = pWin->bitGravity; if (!gravitate[g]) gravitate[g] = oldWinClip; else { - REGION_UNION(pScreen, gravitate[g], gravitate[g], oldWinClip); - REGION_DESTROY(pScreen, oldWinClip); + RegionUnion(gravitate[g], gravitate[g], oldWinClip); + RegionDestroy(oldWinClip); } } @@ -1391,23 +1390,23 @@ miOverlayResizeWindow( /* only copy the remaining useful bits */ if(gravitate[g]) - REGION_INTERSECT(pScreen, gravitate[g], + RegionIntersect(gravitate[g], gravitate[g], oldRegion); if(gravitate2[g]) - REGION_INTERSECT(pScreen, gravitate2[g], + RegionIntersect(gravitate2[g], gravitate2[g], oldRegion2); /* clip to not overwrite already copied areas */ if (destClip && gravitate[g]) { - REGION_TRANSLATE(pScreen, destClip, oldpt.x - x, oldpt.y - y); - REGION_SUBTRACT(pScreen, gravitate[g], gravitate[g], destClip); - REGION_TRANSLATE(pScreen, destClip, x - oldpt.x, y - oldpt.y); + RegionTranslate(destClip, oldpt.x - x, oldpt.y - y); + RegionSubtract(gravitate[g], gravitate[g], destClip); + RegionTranslate(destClip, x - oldpt.x, y - oldpt.y); } if (destClip2 && gravitate2[g]) { - REGION_TRANSLATE(pScreen, destClip2, oldpt.x - x, oldpt.y - y); - REGION_SUBTRACT(pScreen,gravitate2[g],gravitate2[g],destClip2); - REGION_TRANSLATE(pScreen, destClip2, x - oldpt.x, y - oldpt.y); + RegionTranslate(destClip2, oldpt.x - x, oldpt.y - y); + RegionSubtract(gravitate2[g],gravitate2[g],destClip2); + RegionTranslate(destClip2, x - oldpt.x, y - oldpt.y); } /* and move those bits */ @@ -1415,22 +1414,20 @@ miOverlayResizeWindow( if (oldpt.x != x || oldpt.y != y) { if(gravitate2[g]) { pPriv->copyUnderlay = TRUE; - (*pWin->drawable.pScreen->CopyWindow)( - pWin, oldpt, gravitate2[g]); + (*pScreen->CopyWindow)(pWin, oldpt, gravitate2[g]); } if(gravitate[g]) { pPriv->copyUnderlay = FALSE; - (*pWin->drawable.pScreen->CopyWindow)( - pWin, oldpt, gravitate[g]); + (*pScreen->CopyWindow)(pWin, oldpt, gravitate[g]); } } /* remove any overwritten bits from the remaining useful bits */ if(gravitate[g]) - REGION_SUBTRACT(pScreen, oldRegion, oldRegion, gravitate[g]); + RegionSubtract(oldRegion, oldRegion, gravitate[g]); if(gravitate2[g]) - REGION_SUBTRACT(pScreen, oldRegion2, oldRegion2, gravitate2[g]); + RegionSubtract(oldRegion2, oldRegion2, gravitate2[g]); /* * recompute exposed regions of child windows @@ -1455,38 +1452,38 @@ miOverlayResizeWindow( if (g == pWin->bitGravity) { if(gravitate[g]) - REGION_SUBTRACT(pScreen, &pWin->valdata->after.exposed, + RegionSubtract(&pWin->valdata->after.exposed, &pWin->valdata->after.exposed, gravitate[g]); if(gravitate2[g] && pTree) - REGION_SUBTRACT(pScreen, &pTree->valdata->exposed, + RegionSubtract(&pTree->valdata->exposed, &pTree->valdata->exposed, gravitate2[g]); } if(gravitate[g]) { if (!destClip) destClip = gravitate[g]; else { - REGION_UNION(pScreen, destClip, destClip, gravitate[g]); - REGION_DESTROY(pScreen, gravitate[g]); + RegionUnion(destClip, destClip, gravitate[g]); + RegionDestroy(gravitate[g]); } } if(gravitate2[g]) { if (!destClip2) destClip2 = gravitate2[g]; else { - REGION_UNION(pScreen, destClip2, destClip2, gravitate2[g]); - REGION_DESTROY(pScreen, gravitate2[g]); + RegionUnion(destClip2, destClip2, gravitate2[g]); + RegionDestroy(gravitate2[g]); } } } - REGION_DESTROY(pScreen, pRegion); - REGION_DESTROY(pScreen, oldRegion); + RegionDestroy(pRegion); + RegionDestroy(oldRegion); if(doUnderlay) - REGION_DESTROY(pScreen, oldRegion2); + RegionDestroy(oldRegion2); if (destClip) - REGION_DESTROY(pScreen, destClip); + RegionDestroy(destClip); if (destClip2) - REGION_DESTROY(pScreen, destClip2); + RegionDestroy(destClip2); (*pScreen->HandleExposures)(pWin->parent); if (pScreen->PostValidateTree) (*pScreen->PostValidateTree)(pWin->parent, pFirstChange, VTOther); @@ -1497,53 +1494,55 @@ miOverlayResizeWindow( static void -miOverlaySetShape(WindowPtr pWin) +miOverlaySetShape(WindowPtr pWin, int kind) { - Bool WasViewable = (Bool)(pWin->viewable); - ScreenPtr pScreen = pWin->drawable.pScreen; + Bool WasViewable = (Bool)(pWin->viewable); + ScreenPtr pScreen = pWin->drawable.pScreen; - if (WasViewable) { - (*pScreen->MarkOverlappedWindows)(pWin, pWin, NULL); + if (kind != ShapeInput) { + if (WasViewable) { + (*pScreen->MarkOverlappedWindows)(pWin, pWin, NULL); - if (HasBorder (pWin)) { - RegionPtr borderVisible; + if (HasBorder (pWin)) { + RegionPtr borderVisible; - borderVisible = REGION_CREATE(pScreen, NullBox, 1); - REGION_SUBTRACT(pScreen, borderVisible, - &pWin->borderClip, &pWin->winSize); - pWin->valdata->before.borderVisible = borderVisible; - pWin->valdata->before.resized = TRUE; - if(IN_UNDERLAY(pWin)) { - miOverlayTreePtr pTree = MIOVERLAY_GET_WINDOW_TREE(pWin); - RegionPtr borderVisible2; + borderVisible = RegionCreate(NullBox, 1); + RegionSubtract(borderVisible, + &pWin->borderClip, &pWin->winSize); + pWin->valdata->before.borderVisible = borderVisible; + pWin->valdata->before.resized = TRUE; + if(IN_UNDERLAY(pWin)) { + miOverlayTreePtr pTree = MIOVERLAY_GET_WINDOW_TREE(pWin); + RegionPtr borderVisible2; - borderVisible2 = REGION_CREATE(pScreen, NULL, 1); - REGION_SUBTRACT(pScreen, borderVisible2, - &pTree->borderClip, &pWin->winSize); - pTree->valdata->borderVisible = borderVisible2; - } - } - } + borderVisible2 = RegionCreate(NULL, 1); + RegionSubtract(borderVisible2, + &pTree->borderClip, &pWin->winSize); + pTree->valdata->borderVisible = borderVisible2; + } + } + } - SetWinSize (pWin); - SetBorderSize (pWin); + SetWinSize (pWin); + SetBorderSize (pWin); - ResizeChildrenWinSize(pWin, 0, 0, 0, 0); + ResizeChildrenWinSize(pWin, 0, 0, 0, 0); - if (WasViewable) { - (*pScreen->MarkOverlappedWindows)(pWin, pWin, NULL); + if (WasViewable) { + (*pScreen->MarkOverlappedWindows)(pWin, pWin, NULL); - (*pScreen->ValidateTree)(pWin->parent, NullWindow, VTOther); - } + (*pScreen->ValidateTree)(pWin->parent, NullWindow, VTOther); + } - if (WasViewable) { - (*pScreen->HandleExposures)(pWin->parent); - if (pScreen->PostValidateTree) - (*pScreen->PostValidateTree)(pWin->parent, NullWindow, VTOther); + if (WasViewable) { + (*pScreen->HandleExposures)(pWin->parent); + if (pScreen->PostValidateTree) + (*pScreen->PostValidateTree)(pWin->parent, NullWindow, VTOther); + } } if (pWin->realized) - WindowsRestructured (); + WindowsRestructured (); CheckCursorConfinement(pWin); } @@ -1576,16 +1575,16 @@ miOverlayChangeBorderWidth( if (HadBorder) { RegionPtr borderVisible; - borderVisible = REGION_CREATE(pScreen, NULL, 1); - REGION_SUBTRACT(pScreen, borderVisible, + borderVisible = RegionCreate(NULL, 1); + RegionSubtract(borderVisible, &pWin->borderClip, &pWin->winSize); pWin->valdata->before.borderVisible = borderVisible; if(IN_UNDERLAY(pWin)) { miOverlayTreePtr pTree = MIOVERLAY_GET_WINDOW_TREE(pWin); RegionPtr borderVisible2; - borderVisible2 = REGION_CREATE(pScreen, NULL, 1); - REGION_SUBTRACT(pScreen, borderVisible2, + borderVisible2 = RegionCreate(NULL, 1); + RegionSubtract(borderVisible2, &pTree->borderClip, &pWin->winSize); pTree->valdata->borderVisible = borderVisible2; } @@ -1607,7 +1606,7 @@ miOverlayChangeBorderWidth( void miOverlaySetRootClip(ScreenPtr pScreen, Bool enable) { - WindowPtr pRoot = WindowTable[pScreen->myNum]; + WindowPtr pRoot = pScreen->root; miOverlayTreePtr pTree = MIOVERLAY_GET_WINDOW_TREE(pRoot); MARK_UNDERLAY(pRoot); @@ -1620,11 +1619,11 @@ miOverlaySetRootClip(ScreenPtr pScreen, Bool enable) box.x2 = pScreen->width; box.y2 = pScreen->height; - REGION_RESET(pScreen, &pTree->borderClip, &box); + RegionReset(&pTree->borderClip, &box); } else - REGION_EMPTY(pScreen, &pTree->borderClip); + RegionEmpty(&pTree->borderClip); - REGION_BREAK(pScreen, &pTree->clipList); + RegionBreak(&pTree->clipList); } static void @@ -1659,7 +1658,7 @@ miOverlayClearToBackground( clipList = ((*pScreenPriv->InOverlay)(pWin)) ? &pWin->clipList : &pTree->clipList; - extents = REGION_EXTENTS(pScreen, clipList); + extents = RegionExtents(clipList); if (x1 < extents->x1) x1 = extents->x1; if (x2 > extents->x2) x2 = extents->x2; @@ -1672,16 +1671,16 @@ miOverlayClearToBackground( box.x1 = x1; box.x2 = x2; box.y1 = y1; box.y2 = y2; - REGION_INIT(pScreen, ®, &box, 1); + RegionInit(®, &box, 1); - REGION_INTERSECT(pScreen, ®, ®, clipList); + RegionIntersect(®, ®, clipList); if (generateExposures) (*pScreen->WindowExposures)(pWin, ®, pBSReg); else if (pWin->backgroundState != None) miPaintWindow(pWin, ®, PW_BACKGROUND); - REGION_UNINIT(pScreen, ®); + RegionUninit(®); if (pBSReg) - REGION_DESTROY(pScreen, pBSReg); + RegionDestroy(pBSReg); } @@ -1724,7 +1723,6 @@ miOverlayCopyUnderlay(ScreenPtr pScreen) void miOverlayComputeCompositeClip(GCPtr pGC, WindowPtr pWin) { - ScreenPtr pScreen = pGC->pScreen; miOverlayTreePtr pTree = MIOVERLAY_GET_WINDOW_TREE(pWin); RegionPtr pregWin; Bool freeTmpClip, freeCompClip; @@ -1735,12 +1733,12 @@ miOverlayComputeCompositeClip(GCPtr pGC, WindowPtr pWin) } if (pGC->subWindowMode == IncludeInferiors) { - pregWin = REGION_CREATE(pScreen, NullBox, 1); + pregWin = RegionCreate(NullBox, 1); freeTmpClip = TRUE; if (pWin->parent || (screenIsSaved != SCREEN_SAVER_ON) || - !HasSaverWindow (pScreen->myNum)) + !HasSaverWindow (pGC->pScreen)) { - REGION_INTERSECT(pScreen,pregWin,&pTree->borderClip,&pWin->winSize); + RegionIntersect(pregWin,&pTree->borderClip,&pWin->winSize); } } else { pregWin = &pTree->clipList; @@ -1749,29 +1747,29 @@ miOverlayComputeCompositeClip(GCPtr pGC, WindowPtr pWin) freeCompClip = pGC->freeCompClip; if (pGC->clientClipType == CT_NONE) { if (freeCompClip) - REGION_DESTROY(pScreen, pGC->pCompositeClip); + RegionDestroy(pGC->pCompositeClip); pGC->pCompositeClip = pregWin; pGC->freeCompClip = freeTmpClip; } else { - REGION_TRANSLATE(pScreen, pGC->clientClip, + RegionTranslate(pGC->clientClip, pWin->drawable.x + pGC->clipOrg.x, pWin->drawable.y + pGC->clipOrg.y); if (freeCompClip) { - REGION_INTERSECT(pGC->pScreen, pGC->pCompositeClip, + RegionIntersect(pGC->pCompositeClip, pregWin, pGC->clientClip); if (freeTmpClip) - REGION_DESTROY(pScreen, pregWin); + RegionDestroy(pregWin); } else if (freeTmpClip) { - REGION_INTERSECT(pScreen, pregWin, pregWin, pGC->clientClip); + RegionIntersect(pregWin, pregWin, pGC->clientClip); pGC->pCompositeClip = pregWin; } else { - pGC->pCompositeClip = REGION_CREATE(pScreen, NullBox, 0); - REGION_INTERSECT(pScreen, pGC->pCompositeClip, + pGC->pCompositeClip = RegionCreate(NullBox, 0); + RegionIntersect(pGC->pCompositeClip, pregWin, pGC->clientClip); } pGC->freeCompClip = TRUE; - REGION_TRANSLATE(pScreen, pGC->clientClip, + RegionTranslate(pGC->clientClip, -(pWin->drawable.x + pGC->clipOrg.x), -(pWin->drawable.y + pGC->clipOrg.y)); } @@ -1789,7 +1787,7 @@ miOverlayCollectUnderlayRegions( return FALSE; } - *region = REGION_CREATE(pWin->drawable.pScreen, NullBox, 0); + *region = RegionCreate(NullBox, 0); CollectUnderlayChildrenRegions(pWin, *region); @@ -1910,7 +1908,7 @@ CollectUnderlayChildrenRegions(WindowPtr pWin, RegionPtr pReg) while(1) { if((pTree = MIOVERLAY_GET_WINDOW_TREE(pChild))) { - REGION_APPEND(pScreen, pReg, &pTree->borderClip); + RegionAppend(pReg, &pTree->borderClip); hasUnderlay = TRUE; } else if(pChild->firstChild) { @@ -1928,7 +1926,7 @@ CollectUnderlayChildrenRegions(WindowPtr pWin, RegionPtr pReg) if(hasUnderlay) { Bool overlap; - REGION_VALIDATE(pScreen, pReg, &overlap); + RegionValidate(pReg, &overlap); } return hasUnderlay; diff --git a/xserver/mi/mipointer.c b/xserver/mi/mipointer.c index e1f63be4e..d8aaf8c51 100644 --- a/xserver/mi/mipointer.c +++ b/xserver/mi/mipointer.c @@ -40,15 +40,13 @@ in this Software without prior written authorization from The Open Group. # include "dixstruct.h" # include "inputstr.h" -static int miPointerScreenKeyIndex; -DevPrivateKey miPointerScreenKey = &miPointerScreenKeyIndex; +DevPrivateKeyRec miPointerScreenKeyRec; #define GetScreenPrivate(s) ((miPointerScreenPtr) \ dixLookupPrivate(&(s)->devPrivates, miPointerScreenKey)) #define SetupScreen(s) miPointerScreenPtr pScreenPriv = GetScreenPrivate(s) -static int miPointerPrivKeyIndex; -static DevPrivateKey miPointerPrivKey = &miPointerPrivKeyIndex; +DevPrivateKeyRec miPointerPrivKeyRec; #define MIPOINTER(dev) \ ((!IsMaster(dev) && !dev->u.master) ? \ @@ -63,8 +61,6 @@ static Bool miPointerDisplayCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor); static void miPointerConstrainCursor(DeviceIntPtr pDev, ScreenPtr pScreen, BoxPtr pBox); -static void miPointerPointerNonInterestBox(DeviceIntPtr pDev, - ScreenPtr pScreen, BoxPtr pBox); static void miPointerCursorLimits(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, BoxPtr pHotBox, BoxPtr pTopLeftBox); @@ -77,6 +73,7 @@ static void miPointerMove(DeviceIntPtr pDev, ScreenPtr pScreen, static Bool miPointerDeviceInitialize(DeviceIntPtr pDev, ScreenPtr pScreen); static void miPointerDeviceCleanup(DeviceIntPtr pDev, ScreenPtr pScreen); +static void miPointerMoveNoEvent (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y); static EventList* events; /* for WarpPointer MotionNotifies */ @@ -88,7 +85,13 @@ miPointerInitialize (ScreenPtr pScreen, { miPointerScreenPtr pScreenPriv; - pScreenPriv = xalloc (sizeof (miPointerScreenRec)); + if (!dixRegisterPrivateKey(&miPointerScreenKeyRec, PRIVATE_SCREEN, 0)) + return FALSE; + + if (!dixRegisterPrivateKey(&miPointerPrivKeyRec, PRIVATE_DEVICE, 0)) + return FALSE; + + pScreenPriv = malloc(sizeof (miPointerScreenRec)); if (!pScreenPriv) return FALSE; pScreenPriv->spriteFuncs = spriteFuncs; @@ -115,7 +118,6 @@ miPointerInitialize (ScreenPtr pScreen, pScreen->UnrealizeCursor = miPointerUnrealizeCursor; pScreen->SetCursorPosition = miPointerSetCursorPosition; pScreen->RecolorCursor = miRecolorCursor; - pScreen->PointerNonInterestBox = miPointerPointerNonInterestBox; pScreen->DeviceCursorInitialize = miPointerDeviceInitialize; pScreen->DeviceCursorCleanup = miPointerDeviceCleanup; @@ -154,7 +156,7 @@ miPointerCloseScreen (int index, ScreenPtr pScreen) #endif pScreen->CloseScreen = pScreenPriv->CloseScreen; - xfree ((pointer) pScreenPriv); + free((pointer) pScreenPriv); FreeEventList(events, GetMaximumEventsNum()); events = NULL; return (*pScreen->CloseScreen) (index, pScreen); @@ -209,15 +211,6 @@ miPointerConstrainCursor (DeviceIntPtr pDev, ScreenPtr pScreen, BoxPtr pBox) pPointer->confined = PointerConfinedToScreen(pDev); } -/*ARGSUSED*/ -static void -miPointerPointerNonInterestBox (DeviceIntPtr pDev, - ScreenPtr pScreen, - BoxPtr pBox) -{ - /* until DIX uses this, this will remain a stub */ -} - /*ARGSUSED*/ static void miPointerCursorLimits(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, @@ -252,7 +245,7 @@ miPointerDeviceInitialize(DeviceIntPtr pDev, ScreenPtr pScreen) miPointerPtr pPointer; SetupScreen (pScreen); - pPointer = xalloc(sizeof(miPointerRec)); + pPointer = malloc(sizeof(miPointerRec)); if (!pPointer) return FALSE; @@ -270,7 +263,7 @@ miPointerDeviceInitialize(DeviceIntPtr pDev, ScreenPtr pScreen) if (!((*pScreenPriv->spriteFuncs->DeviceCursorInitialize)(pDev, pScreen))) { - xfree(pPointer); + free(pPointer); return FALSE; } @@ -290,7 +283,7 @@ miPointerDeviceCleanup(DeviceIntPtr pDev, ScreenPtr pScreen) return; (*pScreenPriv->spriteFuncs->DeviceCursorCleanup)(pDev, pScreen); - xfree(dixLookupPrivate(&pDev->devPrivates, miPointerPrivKey)); + free(dixLookupPrivate(&pDev->devPrivates, miPointerPrivKey)); dixSetPrivate(&pDev->devPrivates, miPointerPrivKey, NULL); } @@ -313,24 +306,9 @@ miPointerWarpCursor (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) } if (GenerateEvent) - { miPointerMove (pDev, pScreen, x, y); - } else - { - /* everything from miPointerMove except the event and history */ - - if (!pScreenPriv->waitForUpdate && pScreen == pPointer->pSpriteScreen) - { - pPointer->devx = x; - pPointer->devy = y; - if(pPointer->pCursor && !pPointer->pCursor->bits->emptyMask) - (*pScreenPriv->spriteFuncs->MoveCursor) (pDev, pScreen, x, y); - } - pPointer->x = x; - pPointer->y = y; - pPointer->pScreen = pScreen; - } + miPointerMoveNoEvent(pDev, pScreen, x, y); /* Don't call USFS if we use Xinerama, otherwise the root window is * updated to the second screen, and we never receive any events. @@ -460,9 +438,25 @@ miPointerGetScreen(DeviceIntPtr pDev) return (pPointer) ? pPointer->pScreen : NULL; } +/* Controls whether the cursor image should be updated immediately when + moved (FALSE) or if something else will be responsible for updating + it later (TRUE). Returns current setting. + Caller is responsible for calling OsBlockSignal first. +*/ +Bool +miPointerSetWaitForUpdate(ScreenPtr pScreen, Bool wait) +{ + SetupScreen(pScreen); + Bool prevWait = pScreenPriv->waitForUpdate; + + pScreenPriv->waitForUpdate = wait; + return prevWait; +} + + /* Move the pointer on the current screen, and update the sprite. */ static void -miPointerMoved (DeviceIntPtr pDev, ScreenPtr pScreen, +miPointerMoveNoEvent (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) { miPointerPtr pPointer; @@ -497,14 +491,14 @@ miPointerSetPosition(DeviceIntPtr pDev, int *x, int *y) miPointerPtr pPointer; + if (!pDev || !pDev->coreEvents) + return; + pPointer = MIPOINTER(pDev); pScreen = pPointer->pScreen; if (!pScreen) return; /* called before ready */ - if (!pDev || !pDev->coreEvents) - return; - if (*x < 0 || *x >= pScreen->width || *y < 0 || *y >= pScreen->height) { pScreenPriv = GetScreenPrivate (pScreen); @@ -538,7 +532,7 @@ miPointerSetPosition(DeviceIntPtr pDev, int *x, int *y) pPointer->pScreen == pScreen) return; - miPointerMoved(pDev, pScreen, *x, *y); + miPointerMoveNoEvent(pDev, pScreen, *x, *y); } void @@ -560,7 +554,7 @@ miPointerMove (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) int i, nevents; int valuators[2]; - miPointerMoved(pDev, pScreen, x, y); + miPointerMoveNoEvent(pDev, pScreen, x, y); /* generate motion notify */ valuators[0] = x; diff --git a/xserver/mi/mipointer.h b/xserver/mi/mipointer.h index 22575ea21..3c8611022 100644 --- a/xserver/mi/mipointer.h +++ b/xserver/mi/mipointer.h @@ -139,6 +139,15 @@ extern _X_EXPORT void miPointerSetPosition( extern _X_EXPORT void miPointerUpdateSprite( DeviceIntPtr pDev); -extern _X_EXPORT DevPrivateKey miPointerScreenKey; +/* Sets whether the sprite should be updated immediately on pointer moves */ +extern _X_EXPORT Bool miPointerSetWaitForUpdate( + ScreenPtr pScreen, + Bool wait); + +extern _X_EXPORT DevPrivateKeyRec miPointerPrivKeyRec; +#define miPointerPrivKey (&miPointerPrivKeyRec) + +extern _X_EXPORT DevPrivateKeyRec miPointerScreenKeyRec; +#define miPointerScreenKey (&miPointerScreenKeyRec) #endif /* MIPOINTER_H */ diff --git a/xserver/mi/mipolycon.c b/xserver/mi/mipolycon.c index 79384881d..c201e396f 100644 --- a/xserver/mi/mipolycon.c +++ b/xserver/mi/mipolycon.c @@ -104,14 +104,14 @@ miFillConvexPoly( dy = ymax - ymin + 1; if ((count < 3) || (dy < 0)) - return(TRUE); - ptsOut = FirstPoint = xalloc(sizeof(DDXPointRec)*dy); - width = FirstWidth = xalloc(sizeof(int) * dy); + return TRUE; + ptsOut = FirstPoint = malloc(sizeof(DDXPointRec)*dy); + width = FirstWidth = malloc(sizeof(int) * dy); if(!FirstPoint || !FirstWidth) { - if (FirstWidth) xfree(FirstWidth); - if (FirstPoint) xfree(FirstPoint); - return(FALSE); + free(FirstWidth); + free(FirstPoint); + return FALSE; } nextleft = nextright = imin; @@ -175,9 +175,9 @@ miFillConvexPoly( /* in case we're called with non-convex polygon */ if(i < 0) { - xfree(FirstWidth); - xfree(FirstPoint); - return(TRUE); + free(FirstWidth); + free(FirstPoint); + return TRUE; } while (i-- > 0) { @@ -210,9 +210,9 @@ miFillConvexPoly( (*pgc->ops->FillSpans)(dst, pgc, ptsOut-FirstPoint,FirstPoint,FirstWidth, 1); - xfree(FirstWidth); - xfree(FirstPoint); - return(TRUE); + free(FirstWidth); + free(FirstPoint); + return TRUE; } @@ -243,5 +243,5 @@ getPolyYBounds(DDXPointPtr pts, int n, int *by, int *ty) *by = ymin; *ty = ymax; - return(ptMin-ptsStart); + return ptMin-ptsStart; } diff --git a/xserver/mi/mipolygen.c b/xserver/mi/mipolygen.c index 4744583c3..7c7c593bf 100644 --- a/xserver/mi/mipolygen.c +++ b/xserver/mi/mipolygen.c @@ -90,16 +90,16 @@ miFillGeneralPoly( int fixWAET = 0; if (count < 3) - return(TRUE); + return TRUE; - if(!(pETEs = xalloc(sizeof(EdgeTableEntry) * count))) - return(FALSE); + if(!(pETEs = malloc(sizeof(EdgeTableEntry) * count))) + return FALSE; ptsOut = FirstPoint; width = FirstWidth; if (!miCreateETandAET(count, ptsIn, &ET, &AET, pETEs, &SLLBlock)) { - xfree(pETEs); - return(FALSE); + free(pETEs); + return FALSE; } pSLL = ET.scanlines.next; @@ -224,7 +224,7 @@ miFillGeneralPoly( * Get any spans that we missed by buffering */ (*pgc->ops->FillSpans)(dst, pgc, nPts, FirstPoint, FirstWidth, 1); - xfree(pETEs); + free(pETEs); miFreeStorage(SLLBlock.next); - return(TRUE); + return TRUE; } diff --git a/xserver/mi/mipolypnt.c b/xserver/mi/mipolypnt.c index 12771ee4e..3e43a523e 100644 --- a/xserver/mi/mipolypnt.c +++ b/xserver/mi/mipolypnt.c @@ -68,12 +68,12 @@ miPolyPoint( int xorg; int yorg; int nptTmp; - XID fsOld, fsNew; + ChangeGCVal fsOld, fsNew; int *pwidthInit, *pwidth; int i; xPoint *ppt; - if(!(pwidthInit = xalloc(npt * sizeof(int)))) + if(!(pwidthInit = malloc(npt * sizeof(int)))) return; /* make pointlist origin relative */ @@ -103,11 +103,11 @@ miPolyPoint( } } - fsOld = pGC->fillStyle; - fsNew = FillSolid; + fsOld.val = pGC->fillStyle; + fsNew.val = FillSolid; if(pGC->fillStyle != FillSolid) { - DoChangeGC(pGC, GCFillStyle, &fsNew, 0); + ChangeGC(NullClient, pGC, GCFillStyle, &fsNew); ValidateGC(pDrawable, pGC); } pwidth = pwidthInit; @@ -115,11 +115,11 @@ miPolyPoint( *pwidth++ = 1; (*pGC->ops->FillSpans)(pDrawable, pGC, npt, pptInit, pwidthInit, FALSE); - if(fsOld != FillSolid) + if(fsOld.val != FillSolid) { - DoChangeGC(pGC, GCFillStyle, &fsOld, 0); + ChangeGC(NullClient, pGC, GCFillStyle, &fsOld); ValidateGC(pDrawable, pGC); } - xfree(pwidthInit); + free(pwidthInit); } diff --git a/xserver/mi/mipolyrect.c b/xserver/mi/mipolyrect.c index 033c7a7c8..9b0edc176 100644 --- a/xserver/mi/mipolyrect.c +++ b/xserver/mi/mipolyrect.c @@ -90,7 +90,7 @@ miPolyRectangle(DrawablePtr pDraw, GCPtr pGC, int nrects, xRectangle *pRects) offset2 = pGC->lineWidth; offset1 = offset2 >> 1; offset3 = offset2 - offset1; - tmp = xalloc(ntmp * sizeof (xRectangle)); + tmp = malloc(ntmp * sizeof (xRectangle)); if (!tmp) return; t = tmp; @@ -158,7 +158,7 @@ miPolyRectangle(DrawablePtr pDraw, GCPtr pGC, int nrects, xRectangle *pRects) } } (*pGC->ops->PolyFillRect) (pDraw, pGC, t - tmp, tmp); - xfree ((pointer) tmp); + free((pointer) tmp); } else { diff --git a/xserver/mi/mipolyutil.c b/xserver/mi/mipolyutil.c index 15561b73d..d978ee844 100644 --- a/xserver/mi/mipolyutil.c +++ b/xserver/mi/mipolyutil.c @@ -99,7 +99,7 @@ miInsertEdgeInET(EdgeTable *ET, EdgeTableEntry *ETE, int scanline, { if (*iSLLBlock > SLLSPERBLOCK-1) { - tmpSLLBlock = xalloc(sizeof(ScanLineListBlock)); + tmpSLLBlock = malloc(sizeof(ScanLineListBlock)); if (!tmpSLLBlock) return FALSE; (*SLLBlock)->next = tmpSLLBlock; @@ -365,7 +365,7 @@ miInsertionSort(EdgeTableEntry *AET) changed = 1; } } - return(changed); + return changed; } /* @@ -379,7 +379,7 @@ miFreeStorage(ScanLineListBlock *pSLLBlock) while (pSLLBlock) { tmpSLLBlock = pSLLBlock->next; - xfree(pSLLBlock); + free(pSLLBlock); pSLLBlock = tmpSLLBlock; } } diff --git a/xserver/mi/mipushpxl.c b/xserver/mi/mipushpxl.c index 3844519d8..9f0429867 100644 --- a/xserver/mi/mipushpxl.c +++ b/xserver/mi/mipushpxl.c @@ -123,7 +123,7 @@ miPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDrawable, LONG2CHARSDIFFORDER((MiBits)(-1) >> 1); #endif - pwLineStart = xalloc(BitmapBytePad(dx)); + pwLineStart = malloc(BitmapBytePad(dx)); if (!pwLineStart) return; ipt = 0; @@ -262,7 +262,7 @@ miPushPixels(GCPtr pGC, PixmapPtr pBitMap, DrawablePtr pDrawable, } } } - xfree(pwLineStart); + free(pwLineStart); /* Flush any remaining spans */ if (ipt) { diff --git a/xserver/mi/miscrinit.c b/xserver/mi/miscrinit.c index 96113d65d..661ecb239 100644 --- a/xserver/mi/miscrinit.c +++ b/xserver/mi/miscrinit.c @@ -76,7 +76,6 @@ miModifyPixmapHeader(PixmapPtr pPixmap, int width, int height, int depth, pPixmap->drawable.depth = depth; pPixmap->drawable.bitsPerPixel = bitsPerPixel; pPixmap->drawable.id = 0; - pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER; pPixmap->drawable.x = 0; pPixmap->drawable.y = 0; pPixmap->drawable.width = width; @@ -116,6 +115,7 @@ miModifyPixmapHeader(PixmapPtr pPixmap, int width, int height, int depth, if (pPixData) pPixmap->devPrivate.ptr = pPixData; } + pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER; return TRUE; } @@ -166,7 +166,7 @@ miCreateScreenResources(ScreenPtr pScreen) { value = pScrInitParms->pbits; } - xfree(pScreen->devPrivate); /* freeing miScreenInitParmsRec */ + free(pScreen->devPrivate); /* freeing miScreenInitParmsRec */ pScreen->devPrivate = value; /* pPixmap or pbits */ return TRUE; } @@ -180,7 +180,7 @@ miScreenDevPrivateInit(ScreenPtr pScreen, int width, pointer pbits) * to the screen, until CreateScreenResources can put them in the * screen pixmap. */ - pScrInitParms = xalloc(sizeof(miScreenInitParmsRec)); + pScrInitParms = malloc(sizeof(miScreenInitParmsRec)); if (!pScrInitParms) return FALSE; pScrInitParms->pbits = pbits; @@ -246,7 +246,6 @@ miScreenInit( } /* else CloseScreen */ /* QueryBestSize, SaveScreen, GetImage, GetSpans */ - pScreen->PointerNonInterestBox = (PointerNonInterestBoxProcPtr) 0; pScreen->SourceValidate = (SourceValidateProcPtr) 0; /* CreateWindow, DestroyWindow, PositionWindow, ChangeWindowAttributes */ /* RealizeWindow, UnrealizeWindow */ @@ -293,21 +292,25 @@ miScreenInit( return miScreenDevPrivateInit(pScreen, width, pbits); } -static int privateKeyIndex; -static DevPrivateKey privateKey = &privateKeyIndex; +static DevPrivateKeyRec privateKeyRec; +#define privateKey (&privateKeyRec) DevPrivateKey miAllocateGCPrivateIndex(void) { + if (!dixRegisterPrivateKey(&privateKeyRec, PRIVATE_GC, 0)) + return NULL; return privateKey; } -static int miZeroLineScreenKeyIndex; -DevPrivateKey miZeroLineScreenKey = &miZeroLineScreenKeyIndex; +DevPrivateKeyRec miZeroLineScreenKeyRec; void miSetZeroLineBias(ScreenPtr pScreen, unsigned int bias) { + if (!dixRegisterPrivateKey(&miZeroLineScreenKeyRec, PRIVATE_SCREEN, 0)) + return; + dixSetPrivate(&pScreen->devPrivates, miZeroLineScreenKey, (unsigned long *)(unsigned long)bias); } diff --git a/xserver/mi/mispans.c b/xserver/mi/mispans.c index 5504341c4..9f56e3c3d 100644 --- a/xserver/mi/mispans.c +++ b/xserver/mi/mispans.c @@ -150,12 +150,12 @@ static void miSubtractSpans (SpanGroup *spanGroup, Spans *sub) int *newwid; #define EXTRA 8 - newPt = (DDXPointPtr) xrealloc (spans->points, (spans->count + EXTRA) * sizeof (DDXPointRec)); + newPt = (DDXPointPtr) realloc(spans->points, (spans->count + EXTRA) * sizeof (DDXPointRec)); if (!newPt) break; spansPt = newPt + (spansPt - spans->points); spans->points = newPt; - newwid = (int *) xrealloc (spans->widths, (spans->count + EXTRA) * sizeof (int)); + newwid = (int *) realloc(spans->widths, (spans->count + EXTRA) * sizeof (int)); if (!newwid) break; spansWid = newwid + (spansWid - spans->widths); @@ -190,7 +190,7 @@ void miAppendSpans(SpanGroup *spanGroup, SpanGroup *otherGroup, Spans *spans) if (spanGroup->size == spanGroup->count) { spanGroup->size = (spanGroup->size + 8) * 2; spanGroup->group = (Spans *) - xrealloc(spanGroup->group, sizeof(Spans) * spanGroup->size); + realloc(spanGroup->group, sizeof(Spans) * spanGroup->size); } spanGroup->group[spanGroup->count] = *spans; @@ -208,14 +208,14 @@ void miAppendSpans(SpanGroup *spanGroup, SpanGroup *otherGroup, Spans *spans) } else { - xfree (spans->points); - xfree (spans->widths); + free(spans->points); + free(spans->widths); } } /* AppendSpans */ void miFreeSpanGroup(SpanGroup *spanGroup) { - if (spanGroup->group != NULL) xfree(spanGroup->group); + if (spanGroup->group != NULL) free(spanGroup->group); } static void QuickSortSpansX( @@ -366,8 +366,8 @@ miDisposeSpanGroup (SpanGroup *spanGroup) for (i = 0; i < spanGroup->count; i++) { spans = spanGroup->group + i; - xfree (spans->points); - xfree (spans->widths); + free(spans->points); + free(spans->widths); } } @@ -391,8 +391,8 @@ void miFillUniqueSpanGroup(DrawablePtr pDraw, GCPtr pGC, SpanGroup *spanGroup) spans = spanGroup->group; (*pGC->ops->FillSpans) (pDraw, pGC, spans->count, spans->points, spans->widths, TRUE); - xfree(spans->points); - xfree(spans->widths); + free(spans->points); + free(spans->widths); } else { @@ -405,15 +405,13 @@ void miFillUniqueSpanGroup(DrawablePtr pDraw, GCPtr pGC, SpanGroup *spanGroup) ylength = spanGroup->ymax - ymin + 1; /* Allocate Spans for y buckets */ - yspans = xalloc(ylength * sizeof(Spans)); - ysizes = xalloc(ylength * sizeof (int)); + yspans = malloc(ylength * sizeof(Spans)); + ysizes = malloc(ylength * sizeof (int)); if (!yspans || !ysizes) { - if (yspans) - xfree (yspans); - if (ysizes) - xfree (ysizes); + free(yspans); + free(ysizes); miDisposeSpanGroup (spanGroup); return; } @@ -443,10 +441,10 @@ void miFillUniqueSpanGroup(DrawablePtr pDraw, GCPtr pGC, SpanGroup *spanGroup) DDXPointPtr newpoints; int *newwidths; ysizes[index] = (ysizes[index] + 8) * 2; - newpoints = (DDXPointPtr) xrealloc( + newpoints = (DDXPointPtr) realloc( newspans->points, ysizes[index] * sizeof(DDXPointRec)); - newwidths = (int *) xrealloc( + newwidths = (int *) realloc( newspans->widths, ysizes[index] * sizeof(int)); if (!newpoints || !newwidths) @@ -455,11 +453,11 @@ void miFillUniqueSpanGroup(DrawablePtr pDraw, GCPtr pGC, SpanGroup *spanGroup) for (i = 0; i < ylength; i++) { - xfree (yspans[i].points); - xfree (yspans[i].widths); + free(yspans[i].points); + free(yspans[i].widths); } - xfree (yspans); - xfree (ysizes); + free(yspans); + free(ysizes); miDisposeSpanGroup (spanGroup); return; } @@ -472,30 +470,28 @@ void miFillUniqueSpanGroup(DrawablePtr pDraw, GCPtr pGC, SpanGroup *spanGroup) } /* if y value of span in range */ } /* for j through spans */ count += spans->count; - xfree(spans->points); + free(spans->points); spans->points = NULL; - xfree(spans->widths); + free(spans->widths); spans->widths = NULL; } /* for i thorough Spans */ /* Now sort by x and uniquify each bucket into the final array */ - points = xalloc(count * sizeof(DDXPointRec)); - widths = xalloc(count * sizeof(int)); + points = malloc(count * sizeof(DDXPointRec)); + widths = malloc(count * sizeof(int)); if (!points || !widths) { int i; for (i = 0; i < ylength; i++) { - xfree (yspans[i].points); - xfree (yspans[i].widths); + free(yspans[i].points); + free(yspans[i].widths); } - xfree (yspans); - xfree (ysizes); - if (points) - xfree (points); - if (widths) - xfree (widths); + free(yspans); + free(ysizes); + free(points); + free(widths); return; } count = 0; @@ -511,16 +507,16 @@ void miFillUniqueSpanGroup(DrawablePtr pDraw, GCPtr pGC, SpanGroup *spanGroup) widths[count] = yspans[i].widths[0]; count++; } - xfree(yspans[i].points); - xfree(yspans[i].widths); + free(yspans[i].points); + free(yspans[i].widths); } } (*pGC->ops->FillSpans) (pDraw, pGC, count, points, widths, TRUE); - xfree(points); - xfree(widths); - xfree(yspans); - xfree(ysizes); /* use (DE)xalloc for these? */ + free(points); + free(widths); + free(yspans); + free(ysizes); /* use (DE)xalloc for these? */ } spanGroup->count = 0; diff --git a/xserver/mi/mispans.h b/xserver/mi/mispans.h index 8151415cc..c3a3e67ae 100644 --- a/xserver/mi/mispans.h +++ b/xserver/mi/mispans.h @@ -85,16 +85,6 @@ extern _X_EXPORT void miFreeSpanGroup( SpanGroup * /*spanGroup*/ ); -extern _X_EXPORT int miClipSpans( - RegionPtr /*prgnDst*/, - DDXPointPtr /*ppt*/, - int * /*pwidth*/, - int /*nspans*/, - DDXPointPtr /*pptNew*/, - int * /*pwidthNew*/, - int /*fSorted*/ -); - /* Rops which must use span groups */ #define miSpansCarefulRop(rop) (((rop) & 0xc) == 0x8 || ((rop) & 0x3) == 0x2) #define miSpansEasyRop(rop) (!miSpansCarefulRop(rop)) diff --git a/xserver/mi/misprite.c b/xserver/mi/misprite.c index ac025e1ff..38a6b939a 100644 --- a/xserver/mi/misprite.c +++ b/xserver/mi/misprite.c @@ -94,7 +94,6 @@ typedef struct { ColormapPtr pInstalledMap; ColormapPtr pColormap; VisualPtr pVisual; - miSpriteCursorFuncPtr funcs; DamagePtr pDamage; /* damage tracking structure */ Bool damageRegistered; } miSpriteScreenRec, *miSpriteScreenPtr; @@ -183,10 +182,10 @@ miSpriteIsDown(miCursorInfoPtr pDevCursor) * screen wrappers */ -static int miSpriteScreenKeyIndex; -static DevPrivateKey miSpriteScreenKey = &miSpriteScreenKeyIndex; -static int miSpriteDevPrivatesKeyIndex; -static DevPrivateKey miSpriteDevPrivatesKey = &miSpriteDevPrivatesKeyIndex; +static DevPrivateKeyRec miSpriteScreenKeyRec; +#define miSpriteScreenKey (&miSpriteScreenKeyRec) +static DevPrivateKeyRec miSpriteDevPrivatesKeyRec; +#define miSpriteDevPrivatesKey (&miSpriteDevPrivatesKeyRec) static Bool miSpriteCloseScreen(int i, ScreenPtr pScreen); static void miSpriteGetImage(DrawablePtr pDrawable, int sx, int sy, @@ -258,12 +257,9 @@ static void miSpriteReportDamage (DamagePtr pDamage, RegionPtr pRegion, void *closure) { ScreenPtr pScreen = closure; - miSpriteScreenPtr pScreenPriv; miCursorInfoPtr pCursorInfo; DeviceIntPtr pDev; - pScreenPriv = dixLookupPrivate(&pScreen->devPrivates, miSpriteScreenKey); - for (pDev = inputInfo.devices; pDev; pDev = pDev->next) { if (DevHasCursor(pDev)) @@ -272,7 +268,7 @@ miSpriteReportDamage (DamagePtr pDamage, RegionPtr pRegion, void *closure) if (pCursorInfo->isUp && pCursorInfo->pScreen == pScreen && - miRectIn(pRegion, &pCursorInfo->saved) != rgnOUT) + RegionContainsRect(pRegion, &pCursorInfo->saved) != rgnOUT) { SPRITE_DEBUG(("Damage remove\n")); miSpriteRemoveCursor (pDev, pScreen); @@ -289,7 +285,6 @@ miSpriteReportDamage (DamagePtr pDamage, RegionPtr pRegion, void *closure) Bool miSpriteInitialize (ScreenPtr pScreen, - miSpriteCursorFuncPtr cursorFuncs, miPointerScreenFuncPtr screenFuncs) { miSpriteScreenPtr pScreenPriv; @@ -298,7 +293,13 @@ miSpriteInitialize (ScreenPtr pScreen, if (!DamageSetup (pScreen)) return FALSE; - pScreenPriv = xalloc (sizeof (miSpriteScreenRec)); + if (!dixRegisterPrivateKey(&miSpriteScreenKeyRec, PRIVATE_SCREEN, 0)) + return FALSE; + + if (!dixRegisterPrivateKey(&miSpriteDevPrivatesKeyRec, PRIVATE_DEVICE, 0)) + return FALSE; + + pScreenPriv = malloc(sizeof (miSpriteScreenRec)); if (!pScreenPriv) return FALSE; @@ -311,7 +312,7 @@ miSpriteInitialize (ScreenPtr pScreen, if (!miPointerInitialize (pScreen, &miSpritePointerFuncs, screenFuncs,TRUE)) { - xfree (pScreenPriv); + free(pScreenPriv); return FALSE; } for (pVisual = pScreen->visuals; @@ -336,7 +337,6 @@ miSpriteInitialize (ScreenPtr pScreen, pScreenPriv->pInstalledMap = NULL; pScreenPriv->pColormap = NULL; - pScreenPriv->funcs = cursorFuncs; pScreenPriv->colors[SOURCE_COLOR].red = 0; pScreenPriv->colors[SOURCE_COLOR].green = 0; pScreenPriv->colors[SOURCE_COLOR].blue = 0; @@ -386,7 +386,7 @@ miSpriteCloseScreen (int i, ScreenPtr pScreen) DamageDestroy (pScreenPriv->pDamage); - xfree (pScreenPriv); + free(pScreenPriv); return (*pScreen->CloseScreen) (i, pScreen); } @@ -397,7 +397,6 @@ miSpriteGetImage (DrawablePtr pDrawable, int sx, int sy, int w, int h, char *pdstLine) { ScreenPtr pScreen = pDrawable->pScreen; - miSpriteScreenPtr pScreenPriv; DeviceIntPtr pDev; miCursorInfoPtr pCursorInfo; @@ -405,7 +404,6 @@ miSpriteGetImage (DrawablePtr pDrawable, int sx, int sy, int w, int h, if (pDrawable->type == DRAWABLE_WINDOW) { - pScreenPriv = dixLookupPrivate(&pScreen->devPrivates,miSpriteScreenKey); for(pDev = inputInfo.devices; pDev; pDev = pDev->next) { if (DevHasCursor(pDev)) @@ -433,7 +431,6 @@ miSpriteGetSpans (DrawablePtr pDrawable, int wMax, DDXPointPtr ppt, int *pwidth, int nspans, char *pdstStart) { ScreenPtr pScreen = pDrawable->pScreen; - miSpriteScreenPtr pScreenPriv; DeviceIntPtr pDev; miCursorInfoPtr pCursorInfo; @@ -441,8 +438,6 @@ miSpriteGetSpans (DrawablePtr pDrawable, int wMax, DDXPointPtr ppt, if (pDrawable->type == DRAWABLE_WINDOW) { - pScreenPriv = dixLookupPrivate(&pScreen->devPrivates,miSpriteScreenKey); - for(pDev = inputInfo.devices; pDev; pDev = pDev->next) { if (DevHasCursor(pDev)) @@ -487,7 +482,6 @@ miSpriteSourceValidate (DrawablePtr pDrawable, int x, int y, int width, int height) { ScreenPtr pScreen = pDrawable->pScreen; - miSpriteScreenPtr pScreenPriv; DeviceIntPtr pDev; miCursorInfoPtr pCursorInfo; @@ -495,8 +489,6 @@ miSpriteSourceValidate (DrawablePtr pDrawable, int x, int y, int width, if (pDrawable->type == DRAWABLE_WINDOW) { - pScreenPriv = dixLookupPrivate(&pScreen->devPrivates,miSpriteScreenKey); - for(pDev = inputInfo.devices; pDev; pDev = pDev->next) { if (DevHasCursor(pDev)) @@ -523,14 +515,11 @@ static void miSpriteCopyWindow (WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc) { ScreenPtr pScreen = pWindow->drawable.pScreen; - miSpriteScreenPtr pScreenPriv; DeviceIntPtr pDev; miCursorInfoPtr pCursorInfo; SCREEN_PROLOGUE (pScreen, CopyWindow); - pScreenPriv = dixLookupPrivate(&pScreen->devPrivates, miSpriteScreenKey); - for(pDev = inputInfo.devices; pDev; pDev = pDev->next) { if (DevHasCursor(pDev)) @@ -540,7 +529,7 @@ miSpriteCopyWindow (WindowPtr pWindow, DDXPointRec ptOldOrg, RegionPtr prgnSrc) * Damage will take care of destination check */ if (pCursorInfo->isUp && pCursorInfo->pScreen == pScreen && - miRectIn(prgnSrc, &pCursorInfo->saved) != rgnOUT) + RegionContainsRect(prgnSrc, &pCursorInfo->saved) != rgnOUT) { SPRITE_DEBUG (("CopyWindow remove\n")); miSpriteRemoveCursor (pDev, pScreen); @@ -760,10 +749,8 @@ miSpriteFindColors (miCursorInfoPtr pDevCursor, ScreenPtr pScreen) static Bool miSpriteRealizeCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) { - miSpriteScreenPtr pScreenPriv; miCursorInfoPtr pCursorInfo; - pScreenPriv = dixLookupPrivate(&pScreen->devPrivates, miSpriteScreenKey); if (!IsMaster(pDev) && !pDev->u.master) return FALSE; @@ -772,27 +759,21 @@ miSpriteRealizeCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) if (pCursor == pCursorInfo->pCursor) pCursorInfo->checkPixels = TRUE; - return (*pScreenPriv->funcs->RealizeCursor) (pScreen, pCursor); + return miDCRealizeCursor(pScreen, pCursor); } static Bool miSpriteUnrealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor) { - miSpriteScreenPtr pScreenPriv; - - pScreenPriv = dixLookupPrivate(&pScreen->devPrivates, miSpriteScreenKey); - return (*pScreenPriv->funcs->UnrealizeCursor) (pScreen, pCursor); + return miDCUnrealizeCursor(pScreen, pCursor); } static void miSpriteSetCursor (DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor, int x, int y) { - miSpriteScreenPtr pScreenPriv; miCursorInfoPtr pPointer; - pScreenPriv = dixLookupPrivate(&pScreen->devPrivates, miSpriteScreenKey); - if (!IsMaster(pDev) && !pDev->u.master) return; @@ -823,73 +804,9 @@ miSpriteSetCursor (DeviceIntPtr pDev, ScreenPtr pScreen, miSpriteFindColors (pPointer, pScreen); } if (pPointer->isUp) { -#if 0 - /* FIXME: Disabled for MPX, should be rewritten */ - int sx, sy; - /* - * check to see if the old saved region - * encloses the new sprite, in which case we use - * the flicker-free MoveCursor primitive. - */ - sx = pointer->x - (int)pCursor->bits->xhot; - sy = pointer->y - (int)pCursor->bits->yhot; - if (sx + (int) pCursor->bits->width >= pointer->saved.x1 && - sx < pointer->saved.x2 && - sy + (int) pCursor->bits->height >= pointer->saved.y1 && - sy < pointer->saved.y2 && - (int) pCursor->bits->width + (2 * SPRITE_PAD) == - pointer->saved.x2 - pointer->saved.x1 && - (int) pCursor->bits->height + (2 * SPRITE_PAD) == - pointer->saved.y2 - pointer->saved.y1 - ) - { - DamageDrawInternal (pScreen, TRUE); - miSpriteIsDown(pCursorInfo); - if (!(sx >= pointer->saved.x1 && - sx + (int)pCursor->bits->width < pointer->saved.x2 - && sy >= pointer->saved.y1 && - sy + (int)pCursor->bits->height < - pointer->saved.y2)) - { - int oldx1, oldy1, dx, dy; - - oldx1 = pointer->saved.x1; - oldy1 = pointer->saved.y1; - dx = oldx1 - (sx - SPRITE_PAD); - dy = oldy1 - (sy - SPRITE_PAD); - pointer->saved.x1 -= dx; - pointer->saved.y1 -= dy; - pointer->saved.x2 -= dx; - pointer->saved.y2 -= dy; - (void) (*pScreenPriv->funcs->ChangeSave) (pScreen, - pointer->saved.x1, - pointer->saved.y1, - pointer->saved.x2 - - pointer->saved.x1, - pointer->saved.y2 - - pointer->saved.y1, - dx, dy); - } - (void) (*pScreenPriv->funcs->MoveCursor) (pScreen, pCursor, - pointer->saved.x1, - pointer->saved.y1, - pointer->saved.x2 - - pointer->saved.x1, - pointer->saved.y2 - - pointer->saved.y1, - sx - pointer->saved.x1, - sy - pointer->saved.y1, - pointer->colors[SOURCE_COLOR].pixel, - pointer->colors[MASK_COLOR].pixel); - miSpriteIsUp(pCursorInfo); - DamageDrawInternal (pScreen, FALSE); - } - else -#endif - { - SPRITE_DEBUG (("SetCursor remove %d\n", pDev->id)); - miSpriteRemoveCursor (pDev, pScreen); - } + /* TODO: reimplement flicker-free MoveCursor */ + SPRITE_DEBUG (("SetCursor remove %d\n", pDev->id)); + miSpriteRemoveCursor (pDev, pScreen); } if (!pPointer->isUp && pPointer->pCursor) @@ -904,10 +821,8 @@ miSpriteSetCursor (DeviceIntPtr pDev, ScreenPtr pScreen, static void miSpriteMoveCursor (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) { - miSpriteScreenPtr pScreenPriv; CursorPtr pCursor; - pScreenPriv = dixLookupPrivate(&pScreen->devPrivates, miSpriteScreenKey); if (!IsMaster(pDev) && !pDev->u.master) return; @@ -920,13 +835,10 @@ miSpriteMoveCursor (DeviceIntPtr pDev, ScreenPtr pScreen, int x, int y) static Bool miSpriteDeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScreen) { - miSpriteScreenPtr pScreenPriv; miCursorInfoPtr pCursorInfo; int ret = FALSE; - pScreenPriv = dixLookupPrivate(&pScreen->devPrivates, miSpriteScreenKey); - - pCursorInfo = xalloc(sizeof(miCursorInfoRec)); + pCursorInfo = malloc(sizeof(miCursorInfoRec)); if (!pCursorInfo) return FALSE; @@ -940,10 +852,10 @@ miSpriteDeviceCursorInitialize(DeviceIntPtr pDev, ScreenPtr pScreen) pCursorInfo->checkPixels = TRUE; pCursorInfo->pScreen = FALSE; - ret = (*pScreenPriv->funcs->DeviceCursorInitialize)(pDev, pScreen); + ret = miDCDeviceInitialize(pDev, pScreen); if (!ret) { - xfree(pCursorInfo); + free(pCursorInfo); pCursorInfo = NULL; } dixSetPrivate(&pDev->devPrivates, miSpriteDevPrivatesKey, pCursorInfo); @@ -954,13 +866,7 @@ static void miSpriteDeviceCursorCleanup(DeviceIntPtr pDev, ScreenPtr pScreen) { if (DevHasCursor(pDev)) - { - miSpriteScreenPtr pScreenPriv; - pScreenPriv = dixLookupPrivate(&pScreen->devPrivates, - miSpriteScreenKey); - - (*pScreenPriv->funcs->DeviceCursorCleanup)(pDev, pScreen); - } + miDCDeviceCleanup(pDev, pScreen); } /* @@ -984,16 +890,16 @@ miSpriteRemoveCursor (DeviceIntPtr pDev, ScreenPtr pScreen) miSpriteIsDown(pCursorInfo); pCursorInfo->pCacheWin = NullWindow; miSpriteDisableDamage(pScreen, pScreenPriv); - if (!(*pScreenPriv->funcs->RestoreUnderCursor) (pDev, - pScreen, - pCursorInfo->saved.x1, - pCursorInfo->saved.y1, - pCursorInfo->saved.x2 - - pCursorInfo->saved.x1, - pCursorInfo->saved.y2 - - pCursorInfo->saved.y1)) + if (!miDCRestoreUnderCursor(pDev, + pScreen, + pCursorInfo->saved.x1, + pCursorInfo->saved.y1, + pCursorInfo->saved.x2 - + pCursorInfo->saved.x1, + pCursorInfo->saved.y2 - + pCursorInfo->saved.y1)) { - miSpriteIsUp(pCursorInfo); + miSpriteIsUp(pCursorInfo); } miSpriteEnableDamage(pScreen, pScreenPriv); DamageDrawInternal (pScreen, FALSE); @@ -1026,14 +932,14 @@ miSpriteSaveUnderCursor(DeviceIntPtr pDev, ScreenPtr pScreen) y = pCursorInfo->y - (int)pCursor->bits->yhot; miSpriteDisableDamage(pScreen, pScreenPriv); - (*pScreenPriv->funcs->SaveUnderCursor) (pDev, - pScreen, - pCursorInfo->saved.x1, - pCursorInfo->saved.y1, - pCursorInfo->saved.x2 - - pCursorInfo->saved.x1, - pCursorInfo->saved.y2 - - pCursorInfo->saved.y1); + miDCSaveUnderCursor(pDev, + pScreen, + pCursorInfo->saved.x1, + pCursorInfo->saved.y1, + pCursorInfo->saved.x2 - + pCursorInfo->saved.x1, + pCursorInfo->saved.y2 - + pCursorInfo->saved.y1); SPRITE_DEBUG(("SaveUnderCursor %d\n", pDev->id)); miSpriteEnableDamage(pScreen, pScreenPriv); DamageDrawInternal (pScreen, FALSE); @@ -1069,7 +975,7 @@ miSpriteRestoreCursor (DeviceIntPtr pDev, ScreenPtr pScreen) SPRITE_DEBUG(("RestoreCursor %d\n", pDev->id)); if (pCursorInfo->checkPixels) miSpriteFindColors (pCursorInfo, pScreen); - if ((*pScreenPriv->funcs->PutUpCursor) (pDev, pScreen, + if (miDCPutUpCursor(pDev, pScreen, pCursor, x, y, pScreenPriv->colors[SOURCE_COLOR].pixel, pScreenPriv->colors[MASK_COLOR].pixel)) @@ -1088,7 +994,6 @@ miSpriteRestoreCursor (DeviceIntPtr pDev, ScreenPtr pScreen) static void miSpriteComputeSaved (DeviceIntPtr pDev, ScreenPtr pScreen) { - miSpriteScreenPtr pScreenPriv; int x, y, w, h; int wpad, hpad; CursorPtr pCursor; @@ -1097,7 +1002,6 @@ miSpriteComputeSaved (DeviceIntPtr pDev, ScreenPtr pScreen) if (!IsMaster(pDev) && !pDev->u.master) return; - pScreenPriv = dixLookupPrivate(&pScreen->devPrivates, miSpriteScreenKey); pCursorInfo = MISPRITE(pDev); pCursor = pCursorInfo->pCursor; diff --git a/xserver/mi/misprite.h b/xserver/mi/misprite.h index 72dc06fc7..632d207ea 100644 --- a/xserver/mi/misprite.h +++ b/xserver/mi/misprite.h @@ -32,76 +32,19 @@ used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization from The Open Group. */ -typedef struct { - Bool (*RealizeCursor)( - ScreenPtr /*pScreen*/, - CursorPtr /*pCursor*/ -); - Bool (*UnrealizeCursor)( - ScreenPtr /*pScreen*/, - CursorPtr /*pCursor*/ -); - Bool (*PutUpCursor)( - DeviceIntPtr /*pDev*/, - ScreenPtr /*pScreen*/, - CursorPtr /*pCursor*/, - int /*x*/, - int /*y*/, - unsigned long /*source*/, - unsigned long /*mask*/ -); - Bool (*SaveUnderCursor)( - DeviceIntPtr /*pDev*/, - ScreenPtr /*pScreen*/, - int /*x*/, - int /*y*/, - int /*w*/, - int /*h*/ -); - Bool (*RestoreUnderCursor)( - DeviceIntPtr /*pDev*/, - ScreenPtr /*pScreen*/, - int /*x*/, - int /*y*/, - int /*w*/, - int /*h*/ -); - Bool (*MoveCursor)( - DeviceIntPtr /*pDev*/, - ScreenPtr /*pScreen*/, - CursorPtr /*pCursor*/, - int /*x*/, - int /*y*/, - int /*w*/, - int /*h*/, - int /*dx*/, - int /*dy*/, - unsigned long /*source*/, - unsigned long /*mask*/ -); - Bool (*ChangeSave)( - DeviceIntPtr /*pDev*/, - ScreenPtr /*pScreen*/, - int /*x*/, - int /*y*/, - int /*w*/, - int /*h*/, - int /*dx*/, - int /*dy*/ -); - Bool (*DeviceCursorInitialize)( - DeviceIntPtr /*pDev*/, - ScreenPtr /*pScreen*/ -); - void (*DeviceCursorCleanup)( - DeviceIntPtr /*pDev*/, - ScreenPtr /*pScreen*/ -); - -} miSpriteCursorFuncRec, *miSpriteCursorFuncPtr; - extern Bool miSpriteInitialize( ScreenPtr /*pScreen*/, - miSpriteCursorFuncPtr /*cursorFuncs*/, miPointerScreenFuncPtr /*screenFuncs*/ ); + +extern Bool miDCRealizeCursor(ScreenPtr pScreen, CursorPtr pCursor); +extern Bool miDCUnrealizeCursor(ScreenPtr pScreen, CursorPtr pCursor); +extern Bool miDCPutUpCursor(DeviceIntPtr pDev, ScreenPtr pScreen, + CursorPtr pCursor, int x, int y, + unsigned long source, unsigned long mask); +extern Bool miDCSaveUnderCursor(DeviceIntPtr pDev, ScreenPtr pScreen, + int x, int y, int w, int h); +extern Bool miDCRestoreUnderCursor(DeviceIntPtr pDev, ScreenPtr pScreen, + int x, int y, int w, int h); +extern Bool miDCDeviceInitialize(DeviceIntPtr pDev, ScreenPtr pScreen); +extern void miDCDeviceCleanup(DeviceIntPtr pDev, ScreenPtr pScreen); diff --git a/xserver/mi/mivaltree.c b/xserver/mi/mivaltree.c index cfcdab756..0e00c2fb5 100644 --- a/xserver/mi/mivaltree.c +++ b/xserver/mi/mivaltree.c @@ -107,7 +107,7 @@ Equipment Corporation. * Compute the visibility of a shaped window */ int -miShapedWindowIn (ScreenPtr pScreen, RegionPtr universe, RegionPtr bounding, +miShapedWindowIn (RegionPtr universe, RegionPtr bounding, BoxPtr rect, int x, int y) { BoxRec box; @@ -116,8 +116,8 @@ miShapedWindowIn (ScreenPtr pScreen, RegionPtr universe, RegionPtr bounding, Bool someIn, someOut; int t, x1, y1, x2, y2; - nbox = REGION_NUM_RECTS (bounding); - boundBox = REGION_RECTS (bounding); + nbox = RegionNumRects (bounding); + boundBox = RegionRects (bounding); someIn = someOut = FALSE; x1 = rect->x1; y1 = rect->y1; @@ -141,7 +141,7 @@ miShapedWindowIn (ScreenPtr pScreen, RegionPtr universe, RegionPtr bounding, box.x2 = box.x1; if (box.y1 > box.y2) box.y2 = box.y1; - switch (RECT_IN_REGION(pScreen, universe, &box)) + switch (RegionContainsRect(universe, &box)) { case rgnIN: if (someOut) @@ -252,15 +252,15 @@ miComputeClips ( if (miSetRedirectBorderClipProc) { if (TreatAsTransparent (pParent)) - REGION_EMPTY (pScreen, universe); + RegionEmpty(universe); (*miSetRedirectBorderClipProc) (pParent, universe); } - REGION_COPY(pScreen, universe, &pParent->borderSize); + RegionCopy(universe, &pParent->borderSize); } #endif oldVis = pParent->visibility; - switch (RECT_IN_REGION( pScreen, universe, &borderSize)) + switch (RegionContainsRect(universe, &borderSize)) { case rgnIN: newVis = VisibilityUnobscured; @@ -272,7 +272,7 @@ miComputeClips ( if ((pBounding = wBoundingShape (pParent))) { - switch (miShapedWindowIn (pScreen, universe, pBounding, + switch (miShapedWindowIn (universe, pBounding, &borderSize, pParent->drawable.x, pParent->drawable.y)) @@ -320,9 +320,9 @@ miComputeClips ( { if (pChild->visibility != VisibilityFullyObscured) { - REGION_TRANSLATE( pScreen, &pChild->borderClip, + RegionTranslate(&pChild->borderClip, dx, dy); - REGION_TRANSLATE( pScreen, &pChild->clipList, + RegionTranslate(&pChild->clipList, dx, dy); pChild->drawable.serialNumber = NEXT_SERIAL_NUMBER; if (pScreen->ClipNotify) @@ -331,16 +331,14 @@ miComputeClips ( } if (pChild->valdata) { - REGION_NULL(pScreen, - &pChild->valdata->after.borderExposed); + RegionNull(&pChild->valdata->after.borderExposed); if (HasParentRelativeBorder(pChild)) { - REGION_SUBTRACT(pScreen, - &pChild->valdata->after.borderExposed, - &pChild->borderClip, - &pChild->winSize); + RegionSubtract(&pChild->valdata->after.borderExposed, + &pChild->borderClip, + &pChild->winSize); } - REGION_NULL(pScreen, &pChild->valdata->after.exposed); + RegionNull(&pChild->valdata->after.exposed); } if (pChild->firstChild) { @@ -369,20 +367,20 @@ miComputeClips ( * We translate the old clipList because that will be exposed or copied * if gravity is right. */ - REGION_TRANSLATE( pScreen, &pParent->borderClip, dx, dy); - REGION_TRANSLATE( pScreen, &pParent->clipList, dx, dy); + RegionTranslate(&pParent->borderClip, dx, dy); + RegionTranslate(&pParent->clipList, dx, dy); } break; case VTBroken: - REGION_EMPTY (pScreen, &pParent->borderClip); - REGION_EMPTY (pScreen, &pParent->clipList); + RegionEmpty(&pParent->borderClip); + RegionEmpty(&pParent->clipList); break; } borderVisible = pParent->valdata->before.borderVisible; resized = pParent->valdata->before.resized; - REGION_NULL(pScreen, &pParent->valdata->after.borderExposed); - REGION_NULL(pScreen, &pParent->valdata->after.exposed); + RegionNull(&pParent->valdata->after.borderExposed); + RegionNull(&pParent->valdata->after.exposed); /* * Since the borderClip must not be clipped by the children, we do @@ -402,22 +400,22 @@ miComputeClips ( * of the border will be saved by DIX in borderVisible -- * use that region and destroy it */ - REGION_SUBTRACT( pScreen, exposed, universe, borderVisible); - REGION_DESTROY( pScreen, borderVisible); + RegionSubtract(exposed, universe, borderVisible); + RegionDestroy(borderVisible); } else { - REGION_SUBTRACT( pScreen, exposed, universe, &pParent->borderClip); + RegionSubtract(exposed, universe, &pParent->borderClip); } if (HasParentRelativeBorder(pParent) && (dx || dy)) - REGION_SUBTRACT( pScreen, &pParent->valdata->after.borderExposed, + RegionSubtract(&pParent->valdata->after.borderExposed, universe, &pParent->winSize); else - REGION_SUBTRACT( pScreen, &pParent->valdata->after.borderExposed, + RegionSubtract(&pParent->valdata->after.borderExposed, exposed, &pParent->winSize); - REGION_COPY( pScreen, &pParent->borderClip, universe); + RegionCopy(&pParent->borderClip, universe); /* * To get the right clipList for the parent, and to make doubly sure @@ -425,15 +423,15 @@ miComputeClips ( * border from the universe before proceeding. */ - REGION_INTERSECT( pScreen, universe, universe, &pParent->winSize); + RegionIntersect(universe, universe, &pParent->winSize); } else - REGION_COPY( pScreen, &pParent->borderClip, universe); + RegionCopy(&pParent->borderClip, universe); if ((pChild = pParent->firstChild) && pParent->mapped) { - REGION_NULL(pScreen, &childUniverse); - REGION_NULL(pScreen, &childUnion); + RegionNull(&childUniverse); + RegionNull(&childUnion); if ((pChild->drawable.y < pParent->lastChild->drawable.y) || ((pChild->drawable.y == pParent->lastChild->drawable.y) && (pChild->drawable.x < pParent->lastChild->drawable.x))) @@ -441,7 +439,7 @@ miComputeClips ( for (; pChild; pChild = pChild->nextSib) { if (pChild->viewable && !TreatAsTransparent(pChild)) - REGION_APPEND( pScreen, &childUnion, &pChild->borderSize); + RegionAppend(&childUnion, &pChild->borderSize); } } else @@ -449,10 +447,10 @@ miComputeClips ( for (pChild = pParent->lastChild; pChild; pChild = pChild->prevSib) { if (pChild->viewable && !TreatAsTransparent(pChild)) - REGION_APPEND( pScreen, &childUnion, &pChild->borderSize); + RegionAppend(&childUnion, &pChild->borderSize); } } - REGION_VALIDATE( pScreen, &childUnion, &overlap); + RegionValidate(&childUnion, &overlap); for (pChild = pParent->firstChild; pChild; @@ -469,7 +467,7 @@ miComputeClips ( * Figure out the new universe from the child's * perspective and recurse. */ - REGION_INTERSECT( pScreen, &childUniverse, + RegionIntersect(&childUniverse, universe, &pChild->borderSize); miComputeClips (pChild, pScreen, &childUniverse, kind, @@ -481,14 +479,14 @@ miComputeClips ( * other sibling. */ if (overlap && !TreatAsTransparent (pChild)) - REGION_SUBTRACT( pScreen, universe, universe, + RegionSubtract(universe, universe, &pChild->borderSize); } } if (!overlap) - REGION_SUBTRACT( pScreen, universe, universe, &childUnion); - REGION_UNINIT( pScreen, &childUnion); - REGION_UNINIT( pScreen, &childUniverse); + RegionSubtract(universe, universe, &childUnion); + RegionUninit(&childUnion); + RegionUninit(&childUniverse); } /* if any children */ /* @@ -501,12 +499,12 @@ miComputeClips ( if (oldVis == VisibilityFullyObscured || oldVis == VisibilityNotViewable) { - REGION_COPY( pScreen, &pParent->valdata->after.exposed, universe); + RegionCopy(&pParent->valdata->after.exposed, universe); } else if (newVis != VisibilityFullyObscured && newVis != VisibilityNotViewable) { - REGION_SUBTRACT( pScreen, &pParent->valdata->after.exposed, + RegionSubtract(&pParent->valdata->after.exposed, universe, &pParent->clipList); } @@ -520,7 +518,7 @@ miComputeClips ( } #ifdef NOTDEF - REGION_COPY( pScreen, &pParent->clipList, universe); + RegionCopy(&pParent->clipList, universe); #endif pParent->drawable.serialNumber = NEXT_SERIAL_NUMBER; @@ -616,8 +614,8 @@ miValidateTree ( if (pChild == NullWindow) pChild = pParent->firstChild; - REGION_NULL(pScreen, &childClip); - REGION_NULL(pScreen, &exposed); + RegionNull(&childClip); + RegionNull(&exposed); /* * compute the area of the parent window occupied @@ -625,10 +623,10 @@ miValidateTree ( * is the area which can be divied up among the marked * children in their new configuration. */ - REGION_NULL(pScreen, &totalClip); + RegionNull(&totalClip); viewvals = 0; - if (REGION_BROKEN (pScreen, &pParent->clipList) && - !REGION_BROKEN (pScreen, &pParent->borderClip)) + if (RegionBroken(&pParent->clipList) && + !RegionBroken(&pParent->borderClip)) { kind = VTBroken; /* @@ -636,19 +634,19 @@ miValidateTree ( * assume everything is busted. */ forward = TRUE; - REGION_COPY (pScreen, &totalClip, &pParent->borderClip); - REGION_INTERSECT (pScreen, &totalClip, &totalClip, &pParent->winSize); + RegionCopy(&totalClip, &pParent->borderClip); + RegionIntersect(&totalClip, &totalClip, &pParent->winSize); for (pWin = pParent->firstChild; pWin != pChild; pWin = pWin->nextSib) { if (pWin->viewable && !TreatAsTransparent (pWin)) - REGION_SUBTRACT (pScreen, &totalClip, &totalClip, &pWin->borderSize); + RegionSubtract(&totalClip, &totalClip, &pWin->borderSize); } for (pWin = pChild; pWin; pWin = pWin->nextSib) if (pWin->valdata && pWin->viewable) viewvals++; - REGION_EMPTY (pScreen, &pParent->clipList); + RegionEmpty(&pParent->clipList); } else { @@ -666,7 +664,7 @@ miValidateTree ( if (pWin->redirectDraw != RedirectDrawNone && miGetRedirectBorderClipProc) pBorderClip = (*miGetRedirectBorderClipProc)(pWin); #endif - REGION_APPEND( pScreen, &totalClip, pBorderClip ); + RegionAppend(&totalClip, pBorderClip ); if (pWin->viewable) viewvals++; } @@ -685,7 +683,7 @@ miValidateTree ( if (pWin->redirectDraw != RedirectDrawNone && miGetRedirectBorderClipProc) pBorderClip = (*miGetRedirectBorderClipProc)(pWin); #endif - REGION_APPEND( pScreen, &totalClip, pBorderClip ); + RegionAppend(&totalClip, pBorderClip ); if (pWin->viewable) viewvals++; } @@ -694,7 +692,7 @@ miValidateTree ( pWin = pWin->prevSib; } } - REGION_VALIDATE( pScreen, &totalClip, &overlap); + RegionValidate(&totalClip, &overlap); } /* @@ -707,7 +705,7 @@ miValidateTree ( overlap = TRUE; if (kind != VTStack) { - REGION_UNION( pScreen, &totalClip, &totalClip, &pParent->clipList); + RegionUnion(&totalClip, &totalClip, &pParent->clipList); if (viewvals > 1) { /* @@ -717,12 +715,12 @@ miValidateTree ( * lower than the cost of multiple Subtracts in the * loop below. */ - REGION_NULL(pScreen, &childUnion); + RegionNull(&childUnion); if (forward) { for (pWin = pChild; pWin; pWin = pWin->nextSib) if (pWin->valdata && pWin->viewable && !TreatAsTransparent (pWin)) - REGION_APPEND( pScreen, &childUnion, + RegionAppend(&childUnion, &pWin->borderSize); } else @@ -731,16 +729,16 @@ miValidateTree ( while (1) { if (pWin->valdata && pWin->viewable && !TreatAsTransparent (pWin)) - REGION_APPEND( pScreen, &childUnion, + RegionAppend(&childUnion, &pWin->borderSize); if (pWin == pChild) break; pWin = pWin->prevSib; } } - REGION_VALIDATE(pScreen, &childUnion, &overlap); + RegionValidate(&childUnion, &overlap); if (overlap) - REGION_UNINIT(pScreen, &childUnion); + RegionUninit(&childUnion); } } @@ -750,13 +748,13 @@ miValidateTree ( { if (pWin->viewable) { if (pWin->valdata) { - REGION_INTERSECT( pScreen, &childClip, + RegionIntersect(&childClip, &totalClip, &pWin->borderSize); miComputeClips (pWin, pScreen, &childClip, kind, &exposed); if (overlap && !TreatAsTransparent (pWin)) { - REGION_SUBTRACT( pScreen, &totalClip, + RegionSubtract(&totalClip, &totalClip, &pWin->borderSize); } @@ -765,24 +763,24 @@ miValidateTree ( } } else { if (pWin->valdata) { - REGION_EMPTY( pScreen, &pWin->clipList); + RegionEmpty(&pWin->clipList); if (pScreen->ClipNotify) (* pScreen->ClipNotify) (pWin, 0, 0); - REGION_EMPTY( pScreen, &pWin->borderClip); + RegionEmpty(&pWin->borderClip); pWin->valdata = NULL; } } } - REGION_UNINIT( pScreen, &childClip); + RegionUninit(&childClip); if (!overlap) { - REGION_SUBTRACT(pScreen, &totalClip, &totalClip, &childUnion); - REGION_UNINIT(pScreen, &childUnion); + RegionSubtract(&totalClip, &totalClip, &childUnion); + RegionUninit(&childUnion); } - REGION_NULL(pScreen, &pParent->valdata->after.exposed); - REGION_NULL(pScreen, &pParent->valdata->after.borderExposed); + RegionNull(&pParent->valdata->after.exposed); + RegionNull(&pParent->valdata->after.borderExposed); /* * each case below is responsible for updating the @@ -798,18 +796,18 @@ miValidateTree ( * exposures and obscures as per miComputeClips and reset the parent's * clipList. */ - REGION_SUBTRACT( pScreen, &pParent->valdata->after.exposed, + RegionSubtract(&pParent->valdata->after.exposed, &totalClip, &pParent->clipList); /* fall through */ case VTMap: - REGION_COPY( pScreen, &pParent->clipList, &totalClip); + RegionCopy(&pParent->clipList, &totalClip); pParent->drawable.serialNumber = NEXT_SERIAL_NUMBER; break; } - REGION_UNINIT( pScreen, &totalClip); - REGION_UNINIT( pScreen, &exposed); + RegionUninit(&totalClip); + RegionUninit(&exposed); if (pScreen->ClipNotify) (*pScreen->ClipNotify) (pParent, 0, 0); - return (1); + return 1; } diff --git a/xserver/mi/miwideline.c b/xserver/mi/miwideline.c index 210a6251e..b11b40bd2 100644 --- a/xserver/mi/miwideline.c +++ b/xserver/mi/miwideline.c @@ -52,6 +52,48 @@ from The Open Group. #include "miwideline.h" #include "mi.h" +static Bool +InitSpans(Spans *spans, size_t nspans) +{ + spans->points = malloc(nspans * sizeof (*spans->points)); + if (!spans->points) + return FALSE; + spans->widths = malloc(nspans * sizeof (*spans->widths)); + if (!spans->widths) + { + free(spans->points); + return FALSE; + } + return TRUE; +} + +/* + * interface data to span-merging polygon filler + */ + +typedef struct _SpanData { + SpanGroup fgGroup, bgGroup; +} SpanDataRec, *SpanDataPtr; + +static void +AppendSpanGroup(GCPtr pGC, unsigned long pixel, Spans *spanPtr, SpanDataPtr spanData) +{ + SpanGroup *group, *othergroup = NULL; + if (pixel == pGC->fgPixel) + { + group = &spanData->fgGroup; + if (pGC->lineStyle == LineDoubleDash) + othergroup = &spanData->bgGroup; + } + else + { + group = &spanData->bgGroup; + othergroup = &spanData->fgGroup; + } + miAppendSpans (group, othergroup, spanPtr); +} + + static void miLineArc(DrawablePtr pDraw, GCPtr pGC, unsigned long pixel, SpanDataPtr spanData, LineFacePtr leftFace, @@ -63,6 +105,32 @@ static void miLineArc(DrawablePtr pDraw, GCPtr pGC, * spans-based polygon filler */ +static void +fillSpans(DrawablePtr pDrawable, GCPtr pGC, unsigned long pixel, Spans *spans, SpanDataPtr spanData) +{ + if (!spanData) + { + ChangeGCVal oldPixel, tmpPixel; + oldPixel.val = pGC->fgPixel; + if (pixel != oldPixel.val) + { + tmpPixel.val = (XID)pixel; + ChangeGC (NullClient, pGC, GCForeground, &tmpPixel); + ValidateGC (pDrawable, pGC); + } + (*pGC->ops->FillSpans) (pDrawable, pGC, spans->count, spans->points, spans->widths, TRUE); + free(spans->widths); + free(spans->points); + if (pixel != oldPixel.val) + { + ChangeGC (NullClient, pGC, GCForeground, &oldPixel); + ValidateGC (pDrawable, pGC); + } + } + else + AppendSpanGroup (pGC, pixel, spans, spanData); +} + static void miFillPolyHelper (DrawablePtr pDrawable, GCPtr pGC, unsigned long pixel, SpanDataPtr spanData, int y, int overall_height, @@ -83,51 +151,14 @@ miFillPolyHelper (DrawablePtr pDrawable, GCPtr pGC, unsigned long pixel, int left_height = 0, right_height = 0; DDXPointPtr ppt; - DDXPointPtr pptInit = NULL; int *pwidth; - int *pwidthInit = NULL; - XID oldPixel; int xorg; Spans spanRec; - left_height = 0; - right_height = 0; - - if (!spanData) - { - pptInit = xalloc (overall_height * sizeof(*ppt)); - if (!pptInit) - return; - pwidthInit = xalloc (overall_height * sizeof(*pwidth)); - if (!pwidthInit) - { - xfree (pptInit); - return; - } - ppt = pptInit; - pwidth = pwidthInit; - oldPixel = pGC->fgPixel; - if (pixel != oldPixel) - { - XID tmpPixel = (XID)pixel; - DoChangeGC (pGC, GCForeground, &tmpPixel, FALSE); - ValidateGC (pDrawable, pGC); - } - } - else - { - spanRec.points = xalloc (overall_height * sizeof (*ppt)); - if (!spanRec.points) - return; - spanRec.widths = xalloc (overall_height * sizeof (int)); - if (!spanRec.widths) - { - xfree (spanRec.points); - return; - } - ppt = spanRec.points; - pwidth = spanRec.widths; - } + if (!InitSpans(&spanRec, overall_height)) + return; + ppt = spanRec.points; + pwidth = spanRec.widths; xorg = 0; if (pGC->miTranslate) @@ -138,8 +169,31 @@ miFillPolyHelper (DrawablePtr pDrawable, GCPtr pGC, unsigned long pixel, while ((left_count || left_height) && (right_count || right_height)) { - MIPOLYRELOADLEFT - MIPOLYRELOADRIGHT + if (!left_height && left_count) + { + left_height = left->height; + left_x = left->x; + left_stepx = left->stepx; + left_signdx = left->signdx; + left_e = left->e; + left_dy = left->dy; + left_dx = left->dx; + --left_count; + ++left; + } + + if (!right_height && right_count) + { + right_height = right->height; + right_x = right->x; + right_stepx = right->stepx; + right_signdx = right->signdx; + right_e = right->e; + right_dy = right->dy; + right_dx = right->dx; + --right_count; + ++right; + } height = left_height; if (height > right_height) @@ -157,29 +211,27 @@ miFillPolyHelper (DrawablePtr pDrawable, GCPtr pGC, unsigned long pixel, ppt++; *pwidth++ = right_x - left_x + 1; } - y++; - - MIPOLYSTEPLEFT + y++; - MIPOLYSTEPRIGHT + left_x += left_stepx; + left_e += left_dx; + if (left_e > 0) + { + left_x += left_signdx; + left_e -= left_dy; + } + + right_x += right_stepx; + right_e += right_dx; + if (right_e > 0) + { + right_x += right_signdx; + right_e -= right_dy; + } } } - if (!spanData) - { - (*pGC->ops->FillSpans) (pDrawable, pGC, ppt - pptInit, pptInit, pwidthInit, TRUE); - xfree (pwidthInit); - xfree (pptInit); - if (pixel != oldPixel) - { - DoChangeGC (pGC, GCForeground, &oldPixel, FALSE); - ValidateGC (pDrawable, pGC); - } - } - else - { - spanRec.count = ppt - spanRec.points; - AppendSpanGroup (pGC, pixel, &spanRec, spanData) - } + spanRec.count = ppt - spanRec.points; + fillSpans (pDrawable, pGC, pixel, &spanRec, spanData); } static void @@ -195,7 +247,7 @@ miFillRectPolyHelper ( { DDXPointPtr ppt; int *pwidth; - XID oldPixel; + ChangeGCVal oldPixel, tmpPixel; Spans spanRec; xRectangle rect; @@ -205,31 +257,24 @@ miFillRectPolyHelper ( rect.y = y; rect.width = w; rect.height = h; - oldPixel = pGC->fgPixel; - if (pixel != oldPixel) + oldPixel.val = pGC->fgPixel; + if (pixel != oldPixel.val) { - XID tmpPixel = (XID)pixel; - DoChangeGC (pGC, GCForeground, &tmpPixel, FALSE); + tmpPixel.val = (XID)pixel; + ChangeGC (NullClient, pGC, GCForeground, &tmpPixel); ValidateGC (pDrawable, pGC); } (*pGC->ops->PolyFillRect) (pDrawable, pGC, 1, &rect); - if (pixel != oldPixel) + if (pixel != oldPixel.val) { - DoChangeGC (pGC, GCForeground, &oldPixel, FALSE); + ChangeGC (NullClient, pGC, GCForeground, &oldPixel); ValidateGC (pDrawable, pGC); } } else { - spanRec.points = xalloc (h * sizeof (*ppt)); - if (!spanRec.points) + if (!InitSpans(&spanRec, h)) return; - spanRec.widths = xalloc (h * sizeof (int)); - if (!spanRec.widths) - { - xfree (spanRec.points); - return; - } ppt = spanRec.points; pwidth = spanRec.widths; @@ -247,7 +292,7 @@ miFillRectPolyHelper ( y++; } spanRec.count = ppt - spanRec.points; - AppendSpanGroup (pGC, pixel, &spanRec, spanData) + AppendSpanGroup (pGC, pixel, &spanRec, spanData); } } @@ -672,7 +717,7 @@ miLineArcI ( *--bwids = slw; } } - return (pGC->lineWidth); + return pGC->lineWidth; } #define CLIPSTEPEDGE(edgey,edge,edgeleft) \ @@ -866,7 +911,7 @@ miLineArcD ( *wids++ = xcr - xcl + 1; } } - return (pts - points); + return pts - points; } static int @@ -996,10 +1041,7 @@ miLineArc ( double yorg, Bool isInt) { - DDXPointPtr points; - int *widths; int xorgi = 0, yorgi = 0; - XID oldPixel; Spans spanRec; int n; PolyEdgeRec edge1, edge2; @@ -1043,62 +1085,16 @@ miLineArc ( } isInt = FALSE; } - if (!spanData) - { - points = xalloc(sizeof(DDXPointRec) * pGC->lineWidth); - if (!points) - return; - widths = xalloc(sizeof(int) * pGC->lineWidth); - if (!widths) - { - xfree(points); - return; - } - oldPixel = pGC->fgPixel; - if (pixel != oldPixel) - { - XID tmpPixel = (XID)pixel; - DoChangeGC(pGC, GCForeground, &tmpPixel, FALSE); - ValidateGC (pDraw, pGC); - } - } - else - { - points = xalloc (pGC->lineWidth * sizeof (DDXPointRec)); - if (!points) - return; - widths = xalloc (pGC->lineWidth * sizeof (int)); - if (!widths) - { - xfree (points); - return; - } - spanRec.points = points; - spanRec.widths = widths; - } + if (!InitSpans(&spanRec, pGC->lineWidth)) + return; if (isInt) - n = miLineArcI(pDraw, pGC, xorgi, yorgi, points, widths); + n = miLineArcI(pDraw, pGC, xorgi, yorgi, spanRec.points, spanRec.widths); else - n = miLineArcD(pDraw, pGC, xorg, yorg, points, widths, + n = miLineArcD(pDraw, pGC, xorg, yorg, spanRec.points, spanRec.widths, &edge1, edgey1, edgeleft1, &edge2, edgey2, edgeleft2); - - if (!spanData) - { - (*pGC->ops->FillSpans)(pDraw, pGC, n, points, widths, TRUE); - xfree(widths); - xfree(points); - if (pixel != oldPixel) - { - DoChangeGC(pGC, GCForeground, &oldPixel, FALSE); - ValidateGC (pDraw, pGC); - } - } - else - { - spanRec.count = n; - AppendSpanGroup (pGC, pixel, &spanRec, spanData) - } + spanRec.count = n; + fillSpans (pDraw, pGC, pixel, &spanRec, spanData); } static void @@ -1503,20 +1499,19 @@ miCleanupSpanData (DrawablePtr pDrawable, GCPtr pGC, SpanDataPtr spanData) { if (pGC->lineStyle == LineDoubleDash) { - XID oldPixel, pixel; - - pixel = pGC->bgPixel; - oldPixel = pGC->fgPixel; - if (pixel != oldPixel) + ChangeGCVal oldPixel, pixel; + pixel.val = pGC->bgPixel; + oldPixel.val = pGC->fgPixel; + if (pixel.val != oldPixel.val) { - DoChangeGC (pGC, GCForeground, &pixel, FALSE); + ChangeGC (NullClient, pGC, GCForeground, &pixel); ValidateGC (pDrawable, pGC); } miFillUniqueSpanGroup (pDrawable, pGC, &spanData->bgGroup); miFreeSpanGroup (&spanData->bgGroup); - if (pixel != oldPixel) + if (pixel.val != oldPixel.val) { - DoChangeGC (pGC, GCForeground, &oldPixel, FALSE); + ChangeGC (NullClient, pGC, GCForeground, &oldPixel); ValidateGC (pDrawable, pGC); } } diff --git a/xserver/mi/miwideline.h b/xserver/mi/miwideline.h index 1f615d689..e08aa6833 100644 --- a/xserver/mi/miwideline.h +++ b/xserver/mi/miwideline.h @@ -31,30 +31,6 @@ from The Open Group. #include "mispans.h" #include "mifpoly.h" /* for ICEIL */ -/* - * interface data to span-merging polygon filler - */ - -typedef struct _SpanData { - SpanGroup fgGroup, bgGroup; -} SpanDataRec, *SpanDataPtr; - -#define AppendSpanGroup(pGC, pixel, spanPtr, spanData) { \ - SpanGroup *group, *othergroup = NULL; \ - if (pixel == pGC->fgPixel) \ - { \ - group = &spanData->fgGroup; \ - if (pGC->lineStyle == LineDoubleDash) \ - othergroup = &spanData->bgGroup; \ - } \ - else \ - { \ - group = &spanData->bgGroup; \ - othergroup = &spanData->fgGroup; \ - } \ - miAppendSpans (group, othergroup, spanPtr); \ -} - /* * Polygon edge description for integer wide-line routines */ @@ -99,56 +75,20 @@ typedef struct _LineFace { * macros for polygon fillers */ -#define MIPOLYRELOADLEFT if (!left_height && left_count) { \ - left_height = left->height; \ - left_x = left->x; \ - left_stepx = left->stepx; \ - left_signdx = left->signdx; \ - left_e = left->e; \ - left_dy = left->dy; \ - left_dx = left->dx; \ - --left_count; \ - ++left; \ - } - -#define MIPOLYRELOADRIGHT if (!right_height && right_count) { \ - right_height = right->height; \ - right_x = right->x; \ - right_stepx = right->stepx; \ - right_signdx = right->signdx; \ - right_e = right->e; \ - right_dy = right->dy; \ - right_dx = right->dx; \ - --right_count; \ - ++right; \ - } - -#define MIPOLYSTEPLEFT left_x += left_stepx; \ - left_e += left_dx; \ - if (left_e > 0) \ - { \ - left_x += left_signdx; \ - left_e -= left_dy; \ - } - -#define MIPOLYSTEPRIGHT right_x += right_stepx; \ - right_e += right_dx; \ - if (right_e > 0) \ - { \ - right_x += right_signdx; \ - right_e -= right_dy; \ - } - #define MILINESETPIXEL(pDrawable, pGC, pixel, oldPixel) { \ oldPixel = pGC->fgPixel; \ if (pixel != oldPixel) { \ - DoChangeGC (pGC, GCForeground, (XID *) &pixel, FALSE); \ + ChangeGCVal gcval; \ + gcval.val = pixel; \ + ChangeGC (NullClient, pGC, GCForeground, &gcval); \ ValidateGC (pDrawable, pGC); \ } \ } #define MILINERESETPIXEL(pDrawable, pGC, pixel, oldPixel) { \ if (pixel != oldPixel) { \ - DoChangeGC (pGC, GCForeground, (XID *) &oldPixel, FALSE); \ + ChangeGCVal gcval; \ + gcval.val = oldPixel; \ + ChangeGC (NullClient, pGC, GCForeground, &gcval); \ ValidateGC (pDrawable, pGC); \ } \ } diff --git a/xserver/mi/miwindow.c b/xserver/mi/miwindow.c index c2333938e..25dd1c045 100644 --- a/xserver/mi/miwindow.c +++ b/xserver/mi/miwindow.c @@ -50,6 +50,7 @@ SOFTWARE. #endif #include +#include #include "regionstr.h" #include "region.h" #include "mi.h" @@ -66,7 +67,6 @@ miClearToBackground(WindowPtr pWin, BoxRec box; RegionRec reg; RegionPtr pBSReg = NullRegion; - ScreenPtr pScreen; BoxPtr extents; int x1, y1, x2, y2; @@ -110,17 +110,16 @@ miClearToBackground(WindowPtr pWin, box.y1 = y1; box.y2 = y2; - pScreen = pWin->drawable.pScreen; - REGION_INIT(pScreen, ®, &box, 1); + RegionInit(®, &box, 1); - REGION_INTERSECT(pScreen, ®, ®, &pWin->clipList); + RegionIntersect(®, ®, &pWin->clipList); if (generateExposures) - (*pScreen->WindowExposures)(pWin, ®, pBSReg); + (*pWin->drawable.pScreen->WindowExposures)(pWin, ®, pBSReg); else if (pWin->backgroundState != None) miPaintWindow(pWin, ®, PW_BACKGROUND); - REGION_UNINIT(pScreen, ®); + RegionUninit(®); if (pBSReg) - REGION_DESTROY(pScreen, pBSReg); + RegionDestroy(pBSReg); } void @@ -145,9 +144,6 @@ miMarkOverlappedWindows(WindowPtr pWin, WindowPtr pFirst, WindowPtr *ppLayerWin) WindowPtr pChild, pLast; Bool anyMarked = FALSE; MarkWindowProcPtr MarkWindow = pWin->drawable.pScreen->MarkWindow; - ScreenPtr pScreen; - - pScreen = pWin->drawable.pScreen; /* single layered systems are easy */ if (ppLayerWin) *ppLayerWin = pWin; @@ -163,9 +159,9 @@ miMarkOverlappedWindows(WindowPtr pWin, WindowPtr pFirst, WindowPtr *ppLayerWin) { if (pChild->viewable) { - if (REGION_BROKEN (pScreen, &pChild->winSize)) + if (RegionBroken(&pChild->winSize)) SetWinSize (pChild); - if (REGION_BROKEN (pScreen, &pChild->borderSize)) + if (RegionBroken(&pChild->borderSize)) SetBorderSize (pChild); (* MarkWindow)(pChild); if (pChild->firstChild) @@ -185,17 +181,17 @@ miMarkOverlappedWindows(WindowPtr pWin, WindowPtr pFirst, WindowPtr *ppLayerWin) } if ( (pChild = pFirst) ) { - box = REGION_EXTENTS(pChild->drawable.pScreen, &pWin->borderSize); + box = RegionExtents(&pWin->borderSize); pLast = pChild->parent->lastChild; while (1) { if (pChild->viewable) { - if (REGION_BROKEN (pScreen, &pChild->winSize)) + if (RegionBroken(&pChild->winSize)) SetWinSize (pChild); - if (REGION_BROKEN (pScreen, &pChild->borderSize)) + if (RegionBroken(&pChild->borderSize)) SetBorderSize (pChild); - if (RECT_IN_REGION(pScreen, &pChild->borderSize, box)) + if (RegionContainsRect(&pChild->borderSize, box)) { (* MarkWindow)(pChild); anyMarked = TRUE; @@ -229,23 +225,20 @@ miHandleValidateExposures(WindowPtr pWin) { WindowPtr pChild; ValidatePtr val; - ScreenPtr pScreen; WindowExposuresProcPtr WindowExposures; - pScreen = pWin->drawable.pScreen; - pChild = pWin; WindowExposures = pChild->drawable.pScreen->WindowExposures; while (1) { if ( (val = pChild->valdata) ) { - if (REGION_NOTEMPTY(pScreen, &val->after.borderExposed)) + if (RegionNotEmpty(&val->after.borderExposed)) miPaintWindow(pChild, &val->after.borderExposed, PW_BORDER); - REGION_UNINIT(pScreen, &val->after.borderExposed); + RegionUninit(&val->after.borderExposed); (*WindowExposures)(pChild, &val->after.exposed, NullRegion); - REGION_UNINIT(pScreen, &val->after.exposed); - xfree(val); + RegionUninit(&val->after.exposed); + free(val); pChild->valdata = NULL; if (pChild->firstChild) { @@ -284,8 +277,8 @@ miMoveWindow(WindowPtr pWin, int x, int y, WindowPtr pNextSib, VTKind kind) oldpt.y = pWin->drawable.y; if (WasViewable) { - oldRegion = REGION_CREATE(pScreen, NullBox, 1); - REGION_COPY(pScreen, oldRegion, &pWin->borderClip); + oldRegion = RegionCreate(NullBox, 1); + RegionCopy(oldRegion, &pWin->borderClip); anyMarked = (*pScreen->MarkOverlappedWindows)(pWin, pWin, &pLayerWin); } pWin->origin.x = x + (int)bw; @@ -316,7 +309,7 @@ miMoveWindow(WindowPtr pWin, int x, int y, WindowPtr pNextSib, VTKind kind) { (*pScreen->ValidateTree)(pLayerWin->parent, NullWindow, kind); (* pWin->drawable.pScreen->CopyWindow)(pWin, oldpt, oldRegion); - REGION_DESTROY(pScreen, oldRegion); + RegionDestroy(oldRegion); /* XXX need to retile border if ParentRelative origin */ (*pScreen->HandleExposures)(pLayerWin->parent); } @@ -338,7 +331,6 @@ miRecomputeExposures ( WindowPtr pWin, pointer value) /* must conform to VisitWindowProcPtr */ { - ScreenPtr pScreen; RegionPtr pValid = (RegionPtr)value; if (pWin->valdata) @@ -352,18 +344,17 @@ miRecomputeExposures ( if (pWin->redirectDraw != RedirectDrawNone) return WT_DONTWALKCHILDREN; #endif - pScreen = pWin->drawable.pScreen; /* * compute exposed regions of this window */ - REGION_SUBTRACT(pScreen, &pWin->valdata->after.exposed, + RegionSubtract(&pWin->valdata->after.exposed, &pWin->clipList, pValid); /* * compute exposed regions of the border */ - REGION_SUBTRACT(pScreen, &pWin->valdata->after.borderExposed, + RegionSubtract(&pWin->valdata->after.borderExposed, &pWin->borderClip, &pWin->winSize); - REGION_SUBTRACT(pScreen, &pWin->valdata->after.borderExposed, + RegionSubtract(&pWin->valdata->after.borderExposed, &pWin->valdata->after.borderExposed, pValid); return WT_WALKCHILDREN; } @@ -415,8 +406,8 @@ miSlideAndSizeWindow(WindowPtr pWin, /* * save the visible region of the window */ - oldRegion = REGION_CREATE(pScreen, NullBox, 1); - REGION_COPY(pScreen, oldRegion, &pWin->winSize); + oldRegion = RegionCreate(NullBox, 1); + RegionCopy(oldRegion, &pWin->winSize); /* * categorize child windows into regions to be moved @@ -429,8 +420,8 @@ miSlideAndSizeWindow(WindowPtr pWin, if (g != UnmapGravity) { if (!gravitate[g]) - gravitate[g] = REGION_CREATE(pScreen, NullBox, 1); - REGION_UNION(pScreen, gravitate[g], + gravitate[g] = RegionCreate(NullBox, 1); + RegionUnion(gravitate[g], gravitate[g], &pChild->borderClip); } else @@ -445,8 +436,8 @@ miSlideAndSizeWindow(WindowPtr pWin, oldWinClip = NULL; if (pWin->bitGravity != ForgetGravity) { - oldWinClip = REGION_CREATE(pScreen, NullBox, 1); - REGION_COPY(pScreen, oldWinClip, &pWin->clipList); + oldWinClip = RegionCreate(NullBox, 1); + RegionCopy(oldWinClip, &pWin->clipList); } /* * if the window is changing size, borderExposed @@ -461,16 +452,16 @@ miSlideAndSizeWindow(WindowPtr pWin, if ((pWin->drawable.height != h || pWin->drawable.width != w) && HasBorder (pWin)) { - borderVisible = REGION_CREATE(pScreen, NullBox, 1); + borderVisible = RegionCreate(NullBox, 1); /* for tiled borders, we punt and draw the whole thing */ if (pWin->borderIsPixel || !moved) { if (shrunk || moved) - REGION_SUBTRACT(pScreen, borderVisible, + RegionSubtract(borderVisible, &pWin->borderClip, &pWin->winSize); else - REGION_COPY(pScreen, borderVisible, + RegionCopy(borderVisible, &pWin->borderClip); } } @@ -497,7 +488,7 @@ miSlideAndSizeWindow(WindowPtr pWin, if (WasViewable) { - pRegion = REGION_CREATE(pScreen, NullBox, 1); + pRegion = RegionCreate(NullBox, 1); if (pLayerWin == pWin) anyMarked |= (*pScreen->MarkOverlappedWindows)(pWin, pFirstChange, @@ -519,7 +510,7 @@ miSlideAndSizeWindow(WindowPtr pWin, * the entire window is trashed unless bitGravity * recovers portions of it */ - REGION_COPY(pScreen, &pWin->valdata->after.exposed, &pWin->clipList); + RegionCopy(&pWin->valdata->after.exposed, &pWin->clipList); } GravityTranslate (x, y, oldx, oldy, dw, dh, pWin->bitGravity, &nx, &ny); @@ -548,16 +539,16 @@ miSlideAndSizeWindow(WindowPtr pWin, dy = (oldy - ny) - offy; if (dx || dy) { - REGION_TRANSLATE(pScreen, &pWin->winSize, dx, dy); + RegionTranslate(&pWin->winSize, dx, dy); offx += dx; offy += dy; } - REGION_INTERSECT(pScreen, gravitate[g], gravitate[g], + RegionIntersect(gravitate[g], gravitate[g], &pWin->winSize); } /* get winSize back where it belongs */ if (offx || offy) - REGION_TRANSLATE(pScreen, &pWin->winSize, -offx, -offy); + RegionTranslate(&pWin->winSize, -offx, -offy); } /* * add screen bits to the appropriate bucket @@ -568,9 +559,9 @@ miSlideAndSizeWindow(WindowPtr pWin, /* * clip to new clipList */ - REGION_COPY(pScreen, pRegion, oldWinClip); - REGION_TRANSLATE(pScreen, pRegion, nx - oldx, ny - oldy); - REGION_INTERSECT(pScreen, oldWinClip, pRegion, &pWin->clipList); + RegionCopy(pRegion, oldWinClip); + RegionTranslate(pRegion, nx - oldx, ny - oldy); + RegionIntersect(oldWinClip, pRegion, &pWin->clipList); /* * don't step on any gravity bits which will be copied after this * region. Note -- this assumes that the regions will be copied @@ -579,17 +570,17 @@ miSlideAndSizeWindow(WindowPtr pWin, for (g = pWin->bitGravity + 1; g <= StaticGravity; g++) { if (gravitate[g]) - REGION_SUBTRACT(pScreen, oldWinClip, oldWinClip, + RegionSubtract(oldWinClip, oldWinClip, gravitate[g]); } - REGION_TRANSLATE(pScreen, oldWinClip, oldx - nx, oldy - ny); + RegionTranslate(oldWinClip, oldx - nx, oldy - ny); g = pWin->bitGravity; if (!gravitate[g]) gravitate[g] = oldWinClip; else { - REGION_UNION(pScreen, gravitate[g], gravitate[g], oldWinClip); - REGION_DESTROY(pScreen, oldWinClip); + RegionUnion(gravitate[g], gravitate[g], oldWinClip); + RegionDestroy(oldWinClip); } } @@ -613,14 +604,14 @@ miSlideAndSizeWindow(WindowPtr pWin, /* only copy the remaining useful bits */ - REGION_INTERSECT(pScreen, gravitate[g], gravitate[g], oldRegion); + RegionIntersect(gravitate[g], gravitate[g], oldRegion); /* clip to not overwrite already copied areas */ if (destClip) { - REGION_TRANSLATE(pScreen, destClip, oldpt.x - x, oldpt.y - y); - REGION_SUBTRACT(pScreen, gravitate[g], gravitate[g], destClip); - REGION_TRANSLATE(pScreen, destClip, x - oldpt.x, y - oldpt.y); + RegionTranslate(destClip, oldpt.x - x, oldpt.y - y); + RegionSubtract(gravitate[g], gravitate[g], destClip); + RegionTranslate(destClip, x - oldpt.x, y - oldpt.y); } /* and move those bits */ @@ -636,7 +627,7 @@ miSlideAndSizeWindow(WindowPtr pWin, /* remove any overwritten bits from the remaining useful bits */ - REGION_SUBTRACT(pScreen, oldRegion, oldRegion, gravitate[g]); + RegionSubtract(oldRegion, oldRegion, gravitate[g]); /* * recompute exposed regions of child windows @@ -646,7 +637,7 @@ miSlideAndSizeWindow(WindowPtr pWin, { if (pChild->winGravity != g) continue; - REGION_INTERSECT(pScreen, pRegion, + RegionIntersect(pRegion, &pChild->borderClip, gravitate[g]); TraverseTree (pChild, miRecomputeExposures, (pointer)pRegion); } @@ -657,21 +648,21 @@ miSlideAndSizeWindow(WindowPtr pWin, */ if (g == pWin->bitGravity) - REGION_SUBTRACT(pScreen, &pWin->valdata->after.exposed, + RegionSubtract(&pWin->valdata->after.exposed, &pWin->valdata->after.exposed, gravitate[g]); if (!destClip) destClip = gravitate[g]; else { - REGION_UNION(pScreen, destClip, destClip, gravitate[g]); - REGION_DESTROY(pScreen, gravitate[g]); + RegionUnion(destClip, destClip, gravitate[g]); + RegionDestroy(gravitate[g]); } } - REGION_DESTROY(pScreen, oldRegion); - REGION_DESTROY(pScreen, pRegion); + RegionDestroy(oldRegion); + RegionDestroy(pRegion); if (destClip) - REGION_DESTROY(pScreen, destClip); + RegionDestroy(destClip); if (anyMarked) (*pScreen->HandleExposures)(pLayerWin->parent); if (anyMarked && pScreen->PostValidateTree) @@ -696,56 +687,59 @@ miGetLayerWindow(WindowPtr pWin) */ void -miSetShape(WindowPtr pWin) +miSetShape(WindowPtr pWin, int kind) { - Bool WasViewable = (Bool)(pWin->viewable); - ScreenPtr pScreen = pWin->drawable.pScreen; - Bool anyMarked = FALSE; + Bool WasViewable = (Bool)(pWin->viewable); + ScreenPtr pScreen = pWin->drawable.pScreen; + Bool anyMarked = FALSE; WindowPtr pLayerWin; - if (WasViewable) - { - anyMarked = (*pScreen->MarkOverlappedWindows)(pWin, pWin, - &pLayerWin); - if (pWin->valdata) - { - if (HasBorder (pWin)) - { - RegionPtr borderVisible; + if (kind != ShapeInput) { + if (WasViewable) + { + anyMarked = (*pScreen->MarkOverlappedWindows)(pWin, pWin, + &pLayerWin); + if (pWin->valdata) + { + if (HasBorder (pWin)) + { + RegionPtr borderVisible; - borderVisible = REGION_CREATE(pScreen, NullBox, 1); - REGION_SUBTRACT(pScreen, borderVisible, - &pWin->borderClip, &pWin->winSize); - pWin->valdata->before.borderVisible = borderVisible; - } - pWin->valdata->before.resized = TRUE; - } - } + borderVisible = RegionCreate(NullBox, 1); + RegionSubtract(borderVisible, + &pWin->borderClip, &pWin->winSize); + pWin->valdata->before.borderVisible = borderVisible; + } + pWin->valdata->before.resized = TRUE; + } + } - SetWinSize (pWin); - SetBorderSize (pWin); + SetWinSize (pWin); + SetBorderSize (pWin); - ResizeChildrenWinSize(pWin, 0, 0, 0, 0); + ResizeChildrenWinSize(pWin, 0, 0, 0, 0); - if (WasViewable) - { - anyMarked |= (*pScreen->MarkOverlappedWindows)(pWin, pWin, - NULL); + if (WasViewable) + { + anyMarked |= (*pScreen->MarkOverlappedWindows)(pWin, pWin, + NULL); + if (anyMarked) + (*pScreen->ValidateTree)(pLayerWin->parent, NullWindow, + VTOther); + } - if (anyMarked) - (*pScreen->ValidateTree)(pLayerWin->parent, NullWindow, VTOther); - } - - if (WasViewable) - { - if (anyMarked) - (*pScreen->HandleExposures)(pLayerWin->parent); - if (anyMarked && pScreen->PostValidateTree) - (*pScreen->PostValidateTree)(pLayerWin->parent, NullWindow, VTOther); + if (WasViewable) + { + if (anyMarked) + (*pScreen->HandleExposures)(pLayerWin->parent); + if (anyMarked && pScreen->PostValidateTree) + (*pScreen->PostValidateTree)(pLayerWin->parent, NullWindow, + VTOther); + } } if (pWin->realized) - WindowsRestructured (); + WindowsRestructured (); CheckCursorConfinement(pWin); } @@ -785,8 +779,8 @@ miChangeBorderWidth(WindowPtr pWin, unsigned int width) if (pWin->valdata && HadBorder) { RegionPtr borderVisible; - borderVisible = REGION_CREATE(pScreen, NULL, 1); - REGION_SUBTRACT(pScreen, borderVisible, + borderVisible = RegionCreate(NULL, 1); + RegionSubtract(borderVisible, &pWin->borderClip, &pWin->winSize); pWin->valdata->before.borderVisible = borderVisible; } @@ -810,25 +804,22 @@ miMarkUnrealizedWindow(WindowPtr pChild, WindowPtr pWin, Bool fromConfigure) { if ((pChild != pWin) || fromConfigure) { - REGION_EMPTY(pChild->drawable.pScreen, &pChild->clipList); + RegionEmpty(&pChild->clipList); if (pChild->drawable.pScreen->ClipNotify) (* pChild->drawable.pScreen->ClipNotify)(pChild, 0, 0); - REGION_EMPTY(pChild->drawable.pScreen, &pChild->borderClip); + RegionEmpty(&pChild->borderClip); } } void miSegregateChildren(WindowPtr pWin, RegionPtr pReg, int depth) { - ScreenPtr pScreen; WindowPtr pChild; - pScreen = pWin->drawable.pScreen; - for (pChild = pWin->firstChild; pChild; pChild = pChild->nextSib) { if (pChild->drawable.depth == depth) - REGION_UNION(pScreen, pReg, pReg, &pChild->borderClip); + RegionUnion(pReg, pReg, &pChild->borderClip); if (pChild->firstChild) miSegregateChildren(pChild, pReg, depth); diff --git a/xserver/mi/mizerarc.c b/xserver/mi/mizerarc.c index ad84c0123..5adf3dd09 100644 --- a/xserver/mi/mizerarc.c +++ b/xserver/mi/mizerarc.c @@ -737,7 +737,7 @@ miZeroPolyArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs) dospans = (pGC->fillStyle != FillSolid); if (dospans) { - widths = xalloc(sizeof(int) * numPts); + widths = malloc(sizeof(int) * numPts); if (!widths) return; maxw = 0; @@ -754,12 +754,12 @@ miZeroPolyArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs) (unsigned char *) pGC->dash, (int)pGC->numInDashList, &dinfo.dashOffsetInit); } - points = xalloc(sizeof(DDXPointRec) * numPts); + points = malloc(sizeof(DDXPointRec) * numPts); if (!points) { if (dospans) { - xfree(widths); + free(widths); } return; } @@ -803,7 +803,9 @@ miZeroPolyArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs) if ((pGC->fillStyle == FillSolid) || (pGC->fillStyle == FillStippled)) { - DoChangeGC(pGC, GCForeground, (XID *)&pGC->bgPixel, 0); + ChangeGCVal gcval; + gcval.val = pGC->bgPixel; + ChangeGC(NullClient, pGC, GCForeground, &gcval); ValidateGC(pDraw, pGC); } pts = &points[numPts >> 1]; @@ -831,14 +833,16 @@ miZeroPolyArc(DrawablePtr pDraw, GCPtr pGC, int narcs, xArc *parcs) if ((pGC->fillStyle == FillSolid) || (pGC->fillStyle == FillStippled)) { - DoChangeGC(pGC, GCForeground, &fgPixel, 0); + ChangeGCVal gcval; + gcval.val = fgPixel; + ChangeGC(NullClient, pGC, GCForeground, &gcval); ValidateGC(pDraw, pGC); } } } - xfree(points); + free(points); if (dospans) { - xfree(widths); + free(widths); } } diff --git a/xserver/mi/mizerline.c b/xserver/mi/mizerline.c index 46e2e2adc..07cfbe113 100644 --- a/xserver/mi/mizerline.c +++ b/xserver/mi/mizerline.c @@ -155,8 +155,8 @@ miZeroLine( width = xright - xleft + 1; height = ybottom - ytop + 1; list_len = (height >= width) ? height : width; - pspanInit = xalloc(list_len * sizeof(DDXPointRec)); - pwidthInit = xalloc(list_len * sizeof(int)); + pspanInit = malloc(list_len * sizeof(DDXPointRec)); + pwidthInit = malloc(list_len * sizeof(int)); if (!pspanInit || !pwidthInit) return; @@ -359,8 +359,8 @@ miZeroLine( (*pGC->ops->FillSpans)(pDraw, pGC, Nspans, pspanInit, pwidthInit, FALSE); - xfree(pwidthInit); - xfree(pspanInit); + free(pwidthInit); + free(pspanInit); } void diff --git a/xserver/miext/Makefile.in b/xserver/miext/Makefile.in index 68c3b744c..d4a455f2e 100644 --- a/xserver/miext/Makefile.in +++ b/xserver/miext/Makefile.in @@ -103,10 +103,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -194,6 +190,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -208,6 +206,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -225,10 +224,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -284,10 +287,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -305,17 +309,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -342,20 +340,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -447,6 +448,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/miext/cw/Makefile.in b/xserver/miext/cw/Makefile.in index 8d46a1778..50e54e17d 100644 --- a/xserver/miext/cw/Makefile.in +++ b/xserver/miext/cw/Makefile.in @@ -107,10 +107,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -198,6 +194,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -212,6 +210,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -229,10 +228,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -288,10 +291,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -309,17 +313,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -346,20 +344,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -451,6 +452,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/miext/cw/cw.c b/xserver/miext/cw/cw.c index 74000ffa0..58816c9a2 100644 --- a/xserver/miext/cw/cw.c +++ b/xserver/miext/cw/cw.c @@ -43,16 +43,11 @@ #define CW_ASSERT(x) do {} while (0) #endif -static int cwGCKeyIndex; -DevPrivateKey cwGCKey = &cwGCKeyIndex; -static int cwScreenKeyIndex; -DevPrivateKey cwScreenKey = &cwScreenKeyIndex; -static int cwWindowKeyIndex; -DevPrivateKey cwWindowKey = &cwWindowKeyIndex; -#ifdef RENDER -static int cwPictureKeyIndex; -DevPrivateKey cwPictureKey = &cwPictureKeyIndex; -#endif +DevPrivateKeyRec cwGCKeyRec; +DevPrivateKeyRec cwScreenKeyRec; +DevPrivateKeyRec cwWindowKeyRec; +DevPrivateKeyRec cwPictureKeyRec; + extern GCOps cwGCOps; static Bool @@ -131,7 +126,7 @@ cwCreateBackingGC(GCPtr pGC, DrawablePtr pDrawable) return FALSE; pPriv->serialNumber = 0; - pPriv->stateChanges = (1 << (GCLastBit + 1)) - 1; + pPriv->stateChanges = GCAllBits; return TRUE; } @@ -190,11 +185,11 @@ cwValidateGC(GCPtr pGC, unsigned long stateChanges, DrawablePtr pDrawable) if (pDrawable->serialNumber != pPriv->serialNumber || (pPriv->stateChanges & (GCClipXOrigin|GCClipYOrigin|GCClipMask))) { - XID vals[2]; + ChangeGCVal vals[2]; RegionPtr pCompositeClip; - pCompositeClip = REGION_CREATE (pScreen, NULL, 0); - REGION_COPY (pScreen, pCompositeClip, pGC->pCompositeClip); + pCompositeClip = RegionCreate(NULL, 0); + RegionCopy(pCompositeClip, pGC->pCompositeClip); /* Either the drawable has changed, or the clip list in the drawable has * changed. Copy the new clip list over and set the new translated @@ -204,10 +199,10 @@ cwValidateGC(GCPtr pGC, unsigned long stateChanges, DrawablePtr pDrawable) (*pBackingGC->funcs->ChangeClip) (pBackingGC, CT_REGION, (pointer) pCompositeClip, 0); - vals[0] = x_off - pDrawable->x; - vals[1] = y_off - pDrawable->y; - dixChangeGC(NullClient, pBackingGC, - (GCClipXOrigin | GCClipYOrigin), vals, NULL); + vals[0].val = x_off - pDrawable->x; + vals[1].val = y_off - pDrawable->y; + ChangeGC(NullClient, pBackingGC, + (GCClipXOrigin | GCClipYOrigin), vals); pPriv->serialNumber = pDrawable->serialNumber; /* @@ -225,11 +220,11 @@ cwValidateGC(GCPtr pGC, unsigned long stateChanges, DrawablePtr pDrawable) if ((pGC->patOrg.x + x_off) != pBackingGC->patOrg.x || (pGC->patOrg.y + y_off) != pBackingGC->patOrg.y) { - XID vals[2]; - vals[0] = pGC->patOrg.x + x_off; - vals[1] = pGC->patOrg.y + y_off; - dixChangeGC(NullClient, pBackingGC, - (GCTileStipXOrigin | GCTileStipYOrigin), vals, NULL); + ChangeGCVal vals[2]; + vals[0].val = pGC->patOrg.x + x_off; + vals[1].val = pGC->patOrg.y + y_off; + ChangeGC(NullClient, pBackingGC, + (GCTileStipXOrigin | GCTileStipYOrigin), vals); } ValidateGC(pBackingDrawable, pBackingGC); @@ -330,7 +325,7 @@ cwCreateGC(GCPtr pGC) ScreenPtr pScreen = pGC->pScreen; Bool ret; - bzero(pPriv, sizeof(cwGCRec)); + memset(pPriv, 0, sizeof(cwGCRec)); SCREEN_PROLOGUE(pScreen, CreateGC); if ( (ret = (*pScreen->CreateGC)(pGC)) ) @@ -405,7 +400,7 @@ cwCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) dx = ptOldOrg.x - pWin->drawable.x; dy = ptOldOrg.y - pWin->drawable.y; - pExtents = REGION_EXTENTS(pScreen, prgnSrc); + pExtents = RegionExtents(prgnSrc); pBackingPixmap = (PixmapPtr) cwGetBackingDrawable((DrawablePtr)pWin, &x_off, &y_off); @@ -418,15 +413,15 @@ cwCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) dst_y = src_y - dy; /* Translate region (as required by API) */ - REGION_TRANSLATE(pScreen, prgnSrc, -dx, -dy); + RegionTranslate(prgnSrc, -dx, -dy); pGC = GetScratchGC(pBackingPixmap->drawable.depth, pScreen); /* * Copy region to GC as clip, aligning as dest clip */ - pClip = REGION_CREATE (pScreen, NULL, 0); - REGION_INTERSECT(pScreen, pClip, &pWin->borderClip, prgnSrc); - REGION_TRANSLATE(pScreen, pClip, + pClip = RegionCreate(NULL, 0); + RegionIntersect(pClip, &pWin->borderClip, prgnSrc); + RegionTranslate(pClip, -pBackingPixmap->screen_x, -pBackingPixmap->screen_y); @@ -477,14 +472,21 @@ void miInitializeCompositeWrapper(ScreenPtr pScreen) { cwScreenPtr pScreenPriv; -#ifdef RENDER Bool has_render = GetPictureScreenIfSet(pScreen) != NULL; -#endif - if (!dixRequestPrivate(cwGCKey, sizeof(cwGCRec))) + if (!dixRegisterPrivateKey(&cwScreenKeyRec, PRIVATE_SCREEN, 0)) return; - pScreenPriv = xalloc(sizeof(cwScreenRec)); + if (!dixRegisterPrivateKey(&cwGCKeyRec, PRIVATE_GC, sizeof(cwGCRec))) + return; + + if (!dixRegisterPrivateKey(&cwWindowKeyRec, PRIVATE_WINDOW, 0)) + return; + + if (!dixRegisterPrivateKey(&cwPictureKeyRec, PRIVATE_PICTURE, 0)) + return; + + pScreenPriv = malloc(sizeof(cwScreenRec)); if (!pScreenPriv) return; @@ -499,19 +501,15 @@ miInitializeCompositeWrapper(ScreenPtr pScreen) SCREEN_EPILOGUE(pScreen, SetWindowPixmap, cwSetWindowPixmap); SCREEN_EPILOGUE(pScreen, GetWindowPixmap, cwGetWindowPixmap); -#ifdef RENDER if (has_render) cwInitializeRender(pScreen); -#endif } static Bool cwCloseScreen (int i, ScreenPtr pScreen) { cwScreenPtr pScreenPriv; -#ifdef RENDER PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); -#endif pScreenPriv = (cwScreenPtr)dixLookupPrivate(&pScreen->devPrivates, cwScreenKey); @@ -521,12 +519,10 @@ cwCloseScreen (int i, ScreenPtr pScreen) pScreen->CreateGC = pScreenPriv->CreateGC; pScreen->CopyWindow = pScreenPriv->CopyWindow; -#ifdef RENDER if (ps) cwFiniRender(pScreen); -#endif - xfree((pointer)pScreenPriv); + free((pointer)pScreenPriv); return (*pScreen->CloseScreen)(i, pScreen); } diff --git a/xserver/miext/cw/cw.h b/xserver/miext/cw/cw.h index ae65503f5..31eb9e57c 100644 --- a/xserver/miext/cw/cw.h +++ b/xserver/miext/cw/cw.h @@ -44,7 +44,8 @@ typedef struct { GCFuncs *wrapFuncs; /* wrapped funcs */ } cwGCRec, *cwGCPtr; -extern _X_EXPORT DevPrivateKey cwGCKey; +extern _X_EXPORT DevPrivateKeyRec cwGCKeyRec; +#define cwGCKey (&cwGCKeyRec) #define getCwGC(pGC) ((cwGCPtr)dixLookupPrivate(&(pGC)->devPrivates, cwGCKey)) #define setCwGC(pGC,p) dixSetPrivate(&(pGC)->devPrivates, cwGCKey, p) @@ -60,12 +61,15 @@ typedef struct { unsigned long stateChanges; } cwPictureRec, *cwPicturePtr; +extern _X_EXPORT DevPrivateKeyRec cwPictureKeyRec; +#define cwPictureKey (&cwPictureKeyRec) + #define getCwPicture(pPicture) (pPicture->pDrawable ? \ (cwPicturePtr)dixLookupPrivate(&(pPicture)->devPrivates, cwPictureKey) : 0) #define setCwPicture(pPicture,p) dixSetPrivate(&(pPicture)->devPrivates, cwPictureKey, p) -extern _X_EXPORT DevPrivateKey cwPictureKey; -extern _X_EXPORT DevPrivateKey cwWindowKey; +extern _X_EXPORT DevPrivateKeyRec cwWindowKeyRec; +#define cwWindowKey (&cwWindowKeyRec) #define cwWindowPrivate(pWin) dixLookupPrivate(&(pWin)->devPrivates, cwWindowKey) #define getCwPixmap(pWindow) ((PixmapPtr) cwWindowPrivate(pWindow)) @@ -90,7 +94,6 @@ typedef struct { GetWindowPixmapProcPtr GetWindowPixmap; SetWindowPixmapProcPtr SetWindowPixmap; -#ifdef RENDER DestroyPictureProcPtr DestroyPicture; ChangePictureClipProcPtr ChangePictureClip; DestroyPictureClipProcPtr DestroyPictureClip; @@ -107,10 +110,10 @@ typedef struct { TriFanProcPtr TriFan; RasterizeTrapezoidProcPtr RasterizeTrapezoid; -#endif } cwScreenRec, *cwScreenPtr; -extern _X_EXPORT DevPrivateKey cwScreenKey; +extern _X_EXPORT DevPrivateKeyRec cwScreenKeyRec; +#define cwScreenKey (&cwScreenKeyRec) #define getCwScreen(pScreen) ((cwScreenPtr)dixLookupPrivate(&(pScreen)->devPrivates, cwScreenKey)) #define setCwScreen(pScreen,p) dixSetPrivate(&(pScreen)->devPrivates, cwScreenKey, p) diff --git a/xserver/miext/cw/cw_render.c b/xserver/miext/cw/cw_render.c index 6e0c727c2..165c44f46 100644 --- a/xserver/miext/cw/cw_render.c +++ b/xserver/miext/cw/cw_render.c @@ -30,8 +30,6 @@ #include "windowstr.h" #include "cw.h" -#ifdef RENDER - #define cwPsDecl(pScreen) \ PictureScreenPtr ps = GetPictureScreen (pScreen); \ cwScreenPtr pCwScreen = getCwScreen (pScreen) @@ -75,7 +73,7 @@ cwCreatePicturePrivate (PicturePtr pPicture) int error; cwPicturePtr pPicturePrivate; - pPicturePrivate = xalloc (sizeof (cwPictureRec)); + pPicturePrivate = malloc(sizeof (cwPictureRec)); if (!pPicturePrivate) return NULL; @@ -85,7 +83,7 @@ cwCreatePicturePrivate (PicturePtr pPicture) &error); if (!pPicturePrivate->pBackingPicture) { - xfree (pPicturePrivate); + free(pPicturePrivate); return NULL; } @@ -109,7 +107,7 @@ cwDestroyPicturePrivate (PicturePtr pPicture) { if (pPicturePrivate->pBackingPicture) FreePicture (pPicturePrivate->pBackingPicture, 0); - xfree (pPicturePrivate); + free(pPicturePrivate); setCwPicture(pPicture, NULL); } } @@ -469,4 +467,3 @@ cwFiniRender (ScreenPtr pScreen) cwPsUnwrap(TriFan); } -#endif /* RENDER */ diff --git a/xserver/miext/damage/Makefile.in b/xserver/miext/damage/Makefile.in index ef135a334..c60aa34ca 100644 --- a/xserver/miext/damage/Makefile.in +++ b/xserver/miext/damage/Makefile.in @@ -119,10 +119,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -210,6 +206,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -224,6 +222,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -241,10 +240,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -300,10 +303,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -321,17 +325,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -358,20 +356,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -463,6 +464,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/miext/damage/damage.c b/xserver/miext/damage/damage.c index 2851aed8d..1cf0513d0 100644 --- a/xserver/miext/damage/damage.c +++ b/xserver/miext/damage/damage.c @@ -70,21 +70,21 @@ #define pixmapDamage(pPixmap) damagePixPriv(pPixmap) -static int damageScrPrivateKeyIndex; -static DevPrivateKey damageScrPrivateKey = &damageScrPrivateKeyIndex; -static int damagePixPrivateKeyIndex; -static DevPrivateKey damagePixPrivateKey = &damagePixPrivateKeyIndex; -static int damageGCPrivateKeyIndex; -static DevPrivateKey damageGCPrivateKey = &damageGCPrivateKeyIndex; -static int damageWinPrivateKeyIndex; -static DevPrivateKey damageWinPrivateKey = &damageWinPrivateKeyIndex; +static DevPrivateKeyRec damageScrPrivateKeyRec; +#define damageScrPrivateKey (&damageScrPrivateKeyRec) +static DevPrivateKeyRec damagePixPrivateKeyRec; +#define damagePixPrivateKey (&damagePixPrivateKeyRec) +static DevPrivateKeyRec damageGCPrivateKeyRec; +#define damageGCPrivateKey (&damageGCPrivateKeyRec) +static DevPrivateKeyRec damageWinPrivateKeyRec; +#define damageWinPrivateKey (&damageWinPrivateKeyRec) static DamagePtr * getDrawableDamageRef (DrawablePtr pDrawable) { PixmapPtr pPixmap; - if (pDrawable->type == DRAWABLE_WINDOW) + if (WindowDrawable(pDrawable->type)) { ScreenPtr pScreen = pDrawable->pScreen; @@ -129,40 +129,40 @@ damageReportDamage (DamagePtr pDamage, RegionPtr pDamageRegion) switch (pDamage->damageLevel) { case DamageReportRawRegion: - REGION_UNION(pScreen, &pDamage->damage, &pDamage->damage, + RegionUnion(&pDamage->damage, &pDamage->damage, pDamageRegion); (*pDamage->damageReport) (pDamage, pDamageRegion, pDamage->closure); break; case DamageReportDeltaRegion: - REGION_NULL (pScreen, &tmpRegion); - REGION_SUBTRACT (pScreen, &tmpRegion, pDamageRegion, &pDamage->damage); - if (REGION_NOTEMPTY (pScreen, &tmpRegion)) { - REGION_UNION(pScreen, &pDamage->damage, &pDamage->damage, + RegionNull(&tmpRegion); + RegionSubtract(&tmpRegion, pDamageRegion, &pDamage->damage); + if (RegionNotEmpty(&tmpRegion)) { + RegionUnion(&pDamage->damage, &pDamage->damage, pDamageRegion); (*pDamage->damageReport) (pDamage, &tmpRegion, pDamage->closure); } - REGION_UNINIT(pScreen, &tmpRegion); + RegionUninit(&tmpRegion); break; case DamageReportBoundingBox: - tmpBox = *REGION_EXTENTS (pScreen, &pDamage->damage); - REGION_UNION(pScreen, &pDamage->damage, &pDamage->damage, + tmpBox = *RegionExtents(&pDamage->damage); + RegionUnion(&pDamage->damage, &pDamage->damage, pDamageRegion); - if (!BOX_SAME (&tmpBox, REGION_EXTENTS (pScreen, &pDamage->damage))) { + if (!BOX_SAME (&tmpBox, RegionExtents(&pDamage->damage))) { (*pDamage->damageReport) (pDamage, &pDamage->damage, pDamage->closure); } break; case DamageReportNonEmpty: - was_empty = !REGION_NOTEMPTY(pScreen, &pDamage->damage); - REGION_UNION(pScreen, &pDamage->damage, &pDamage->damage, + was_empty = !RegionNotEmpty(&pDamage->damage); + RegionUnion(&pDamage->damage, &pDamage->damage, pDamageRegion); - if (was_empty && REGION_NOTEMPTY(pScreen, &pDamage->damage)) { + if (was_empty && RegionNotEmpty(&pDamage->damage)) { (*pDamage->damageReport) (pDamage, &pDamage->damage, pDamage->closure); } break; case DamageReportNone: - REGION_UNION(pScreen, &pDamage->damage, &pDamage->damage, + RegionUnion(&pDamage->damage, &pDamage->damage, pDamageRegion); break; } @@ -175,30 +175,30 @@ damageReportDamagePostRendering (DamagePtr pDamage, RegionPtr pOldDamage, Region RegionRec tmpRegion, newDamage; Bool was_empty; - REGION_UNION(pScreem, &newDamage, pOldDamage, pDamageRegion); + RegionUnion(&newDamage, pOldDamage, pDamageRegion); switch (pDamage->damageLevel) { case DamageReportRawRegion: (*pDamage->damageReportPostRendering) (pDamage, pDamageRegion, pDamage->closure); break; case DamageReportDeltaRegion: - REGION_NULL (pScreen, &tmpRegion); - REGION_SUBTRACT (pScreen, &tmpRegion, pDamageRegion, pOldDamage); - if (REGION_NOTEMPTY (pScreen, &tmpRegion)) { + RegionNull(&tmpRegion); + RegionSubtract(&tmpRegion, pDamageRegion, pOldDamage); + if (RegionNotEmpty(&tmpRegion)) { (*pDamage->damageReportPostRendering) (pDamage, &tmpRegion, pDamage->closure); } - REGION_UNINIT(pScreen, &tmpRegion); + RegionUninit(&tmpRegion); break; case DamageReportBoundingBox: - tmpBox = *REGION_EXTENTS (pScreen, pOldDamage); - if (!BOX_SAME (&tmpBox, REGION_EXTENTS (pScreen, &newDamage))) { + tmpBox = *RegionExtents(pOldDamage); + if (!BOX_SAME (&tmpBox, RegionExtents(&newDamage))) { (*pDamage->damageReportPostRendering) (pDamage, &newDamage, pDamage->closure); } break; case DamageReportNonEmpty: - was_empty = !REGION_NOTEMPTY(pScreen, pOldDamage); - if (was_empty && REGION_NOTEMPTY(pScreen, &newDamage)) { + was_empty = !RegionNotEmpty(pOldDamage); + if (was_empty && RegionNotEmpty(&newDamage)) { (*pDamage->damageReportPostRendering) (pDamage, &newDamage, pDamage->closure); } @@ -207,7 +207,7 @@ damageReportDamagePostRendering (DamagePtr pDamage, RegionPtr pOldDamage, Region break; } - REGION_UNINIT(pScreen, &newDamage); + RegionUninit(&newDamage); } #if DAMAGE_DEBUG_ENABLE @@ -233,7 +233,7 @@ damageRegionAppend (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip, #endif /* short circuit for empty regions */ - if (!REGION_NOTEMPTY(pScreen, pRegion)) + if (!RegionNotEmpty(pRegion)) return; #ifdef COMPOSITE @@ -248,7 +248,7 @@ damageRegionAppend (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip, screen_y = ((PixmapPtr) pDrawable)->screen_y - pDrawable->y; } if (screen_x || screen_y) - REGION_TRANSLATE (pScreen, pRegion, screen_x, screen_y); + RegionTranslate(pRegion, screen_x, screen_y); #endif if (pDrawable->type == DRAWABLE_WINDOW && @@ -256,22 +256,22 @@ damageRegionAppend (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip, { if (subWindowMode == ClipByChildren) { - REGION_INTERSECT(pScreen, pRegion, pRegion, + RegionIntersect(pRegion, pRegion, &((WindowPtr)(pDrawable))->clipList); } else if (subWindowMode == IncludeInferiors) { RegionPtr pTempRegion = NotClippedByChildren((WindowPtr)(pDrawable)); - REGION_INTERSECT(pScreen, pRegion, pRegion, pTempRegion); - REGION_DESTROY(pScreen, pTempRegion); + RegionIntersect(pRegion, pRegion, pTempRegion); + RegionDestroy(pTempRegion); } /* If subWindowMode is set to an invalid value, don't perform * any drawable-based clipping. */ } - REGION_NULL (pScreen, &clippedRec); + RegionNull(&clippedRec); for (; pDamage; pDamage = pNext) { pNext = pDamage->pNext; @@ -300,7 +300,7 @@ damageRegionAppend (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip, * Need to move everyone to screen coordinates * XXX what about off-screen pixmaps with non-zero x/y? */ - if (pDamage->pDrawable->type != DRAWABLE_WINDOW) + if (!WindowDrawable(pDamage->pDrawable->type)) { draw_x += ((PixmapPtr) pDamage->pDrawable)->screen_x; draw_y += ((PixmapPtr) pDamage->pDrawable)->screen_y; @@ -316,7 +316,7 @@ damageRegionAppend (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip, { pDamageRegion = &clippedRec; if (pDamage->pDrawable->type == DRAWABLE_WINDOW) { - REGION_INTERSECT (pScreen, pDamageRegion, pRegion, + RegionIntersect(pDamageRegion, pRegion, &((WindowPtr)(pDamage->pDrawable))->borderClip); } else { BoxRec box; @@ -324,14 +324,14 @@ damageRegionAppend (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip, box.y1 = draw_y; box.x2 = draw_x + pDamage->pDrawable->width; box.y2 = draw_y + pDamage->pDrawable->height; - REGION_INIT(pScreen, &pixClip, &box, 1); - REGION_INTERSECT (pScreen, pDamageRegion, pRegion, &pixClip); - REGION_UNINIT(pScreen, &pixClip); + RegionInit(&pixClip, &box, 1); + RegionIntersect(pDamageRegion, pRegion, &pixClip); + RegionUninit(&pixClip); } /* * Short circuit empty results */ - if (!REGION_NOTEMPTY(pScreen, pDamageRegion)) + if (!RegionNotEmpty(pDamageRegion)) continue; } @@ -346,23 +346,23 @@ damageRegionAppend (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip, * Move region to target coordinate space */ if (draw_x || draw_y) - REGION_TRANSLATE (pScreen, pDamageRegion, -draw_x, -draw_y); + RegionTranslate(pDamageRegion, -draw_x, -draw_y); /* Store damage region if needed after submission. */ if (pDamage->reportAfter || pDamage->damageMarker) - REGION_UNION(pScreen, &pDamage->pendingDamage, + RegionUnion(&pDamage->pendingDamage, &pDamage->pendingDamage, pDamageRegion); /* Duplicate current damage if needed. */ if (pDamage->damageMarker) - REGION_COPY(pScreen, &pDamage->backupDamage, &pDamage->damage); + RegionCopy(&pDamage->backupDamage, &pDamage->damage); /* Report damage now, if desired. */ if (!pDamage->reportAfter) { if (pDamage->damageReport) damageReportDamage (pDamage, pDamageRegion); else - REGION_UNION(pScreen, &pDamage->damage, + RegionUnion(&pDamage->damage, &pDamage->damage, pDamageRegion); } @@ -370,14 +370,14 @@ damageRegionAppend (DrawablePtr pDrawable, RegionPtr pRegion, Bool clip, * translate original region back */ if (pDamageRegion == pRegion && (draw_x || draw_y)) - REGION_TRANSLATE (pScreen, pDamageRegion, draw_x, draw_y); + RegionTranslate(pDamageRegion, draw_x, draw_y); } #ifdef COMPOSITE if (screen_x || screen_y) - REGION_TRANSLATE (pScreen, pRegion, -screen_x, -screen_y); + RegionTranslate(pRegion, -screen_x, -screen_y); #endif - REGION_UNINIT (pScreen, &clippedRec); + RegionUninit(&clippedRec); } static void @@ -395,14 +395,14 @@ damageRegionProcessPending (DrawablePtr pDrawable) if (pDamage->damageReport) damageReportDamage (pDamage, &pDamage->pendingDamage); else - REGION_UNION(pScreen, &pDamage->damage, &pDamage->damage, + RegionUnion(&pDamage->damage, &pDamage->damage, &pDamage->pendingDamage); } if (pDamage->reportAfter || pDamage->damageMarker) - REGION_EMPTY (pScreen, &pDamage->pendingDamage); + RegionEmpty(&pDamage->pendingDamage); if (pDamage->damageMarker) - REGION_EMPTY (pScreen, &pDamage->backupDamage); + RegionEmpty(&pDamage->backupDamage); } } @@ -418,13 +418,13 @@ damageDamageBox (DrawablePtr pDrawable, BoxPtr pBox, int subWindowMode) { RegionRec region; - REGION_INIT (pDrawable->pScreen, ®ion, pBox, 1); + RegionInit(®ion, pBox, 1); #if DAMAGE_DEBUG_ENABLE _damageRegionAppend (pDrawable, ®ion, TRUE, subWindowMode, where); #else damageRegionAppend (pDrawable, ®ion, TRUE, subWindowMode); #endif - REGION_UNINIT (pDrawable->pScreen, ®ion); + RegionUninit(®ion); } static void damageValidateGC(GCPtr, unsigned long, DrawablePtr); @@ -593,10 +593,7 @@ damageDestroyClip(GCPtr pGC) #define checkGCDamage(d,g) (getDrawableDamage(d) && \ (!g->pCompositeClip ||\ - REGION_NOTEMPTY(d->pScreen, \ - g->pCompositeClip))) - -#ifdef RENDER + RegionNotEmpty(g->pCompositeClip))) #define TRIM_PICTURE_BOX(box, pDst) { \ BoxPtr extents = &pDst->pCompositeClip->extents;\ @@ -607,7 +604,7 @@ damageDestroyClip(GCPtr pGC) } #define checkPictureDamage(p) (getDrawableDamage(p->pDrawable) && \ - REGION_NOTEMPTY(pScreen, p->pCompositeClip)) + RegionNotEmpty(p->pCompositeClip)) static void damageComposite (CARD8 op, @@ -774,7 +771,6 @@ damageAddTraps (PicturePtr pPicture, damageRegionProcessPending (pPicture->pDrawable); wrap (pScrPriv, ps, AddTraps, damageAddTraps); } -#endif /**********************************************************/ @@ -1514,7 +1510,7 @@ damageText (DrawablePtr pDrawable, imageblt = (textType == TT_IMAGE8) || (textType == TT_IMAGE16); - charinfo = xalloc(count * sizeof(CharInfoPtr)); + charinfo = malloc(count * sizeof(CharInfoPtr)); if (!charinfo) return x; @@ -1536,7 +1532,7 @@ damageText (DrawablePtr pDrawable, (*pGC->ops->PolyGlyphBlt)(pDrawable, pGC, x, y, n, charinfo, FONTGLYPHS(pGC->font)); } - xfree(charinfo); + free(charinfo); return x + w; } @@ -1766,9 +1762,9 @@ damageCopyWindow(WindowPtr pWindow, * The region comes in source relative, but the damage occurs * at the destination location. Translate back and forth. */ - REGION_TRANSLATE (pScreen, prgnSrc, dx, dy); + RegionTranslate(prgnSrc, dx, dy); damageRegionAppend (&pWindow->drawable, prgnSrc, FALSE, -1); - REGION_TRANSLATE (pScreen, prgnSrc, -dx, -dy); + RegionTranslate(prgnSrc, -dx, -dy); } unwrap (pScrPriv, pScreen, CopyWindow); (*pScreen->CopyWindow) (pWindow, ptOldOrg, prgnSrc); @@ -1851,7 +1847,7 @@ damageCloseScreen (int i, ScreenPtr pScreen) unwrap (pScrPriv, pScreen, CreateGC); unwrap (pScrPriv, pScreen, CopyWindow); unwrap (pScrPriv, pScreen, CloseScreen); - xfree (pScrPriv); + free(pScrPriv); return (*pScreen->CloseScreen) (i, pScreen); } @@ -1882,20 +1878,27 @@ Bool DamageSetup (ScreenPtr pScreen) { DamageScrPrivPtr pScrPriv; -#ifdef RENDER PictureScreenPtr ps = GetPictureScreenIfSet(pScreen); -#endif const DamageScreenFuncsRec miFuncs = { miDamageCreate, miDamageRegister, miDamageUnregister, miDamageDestroy }; + if (!dixRegisterPrivateKey(&damageScrPrivateKeyRec, PRIVATE_SCREEN, 0)) + return FALSE; + if (dixLookupPrivate(&pScreen->devPrivates, damageScrPrivateKey)) return TRUE; - if (!dixRequestPrivate(damageGCPrivateKey, sizeof(DamageGCPrivRec))) + if (!dixRegisterPrivateKey(&damageGCPrivateKeyRec, PRIVATE_GC, sizeof(DamageGCPrivRec))) return FALSE; - pScrPriv = xalloc (sizeof (DamageScrPrivRec)); + if (!dixRegisterPrivateKey(&damagePixPrivateKeyRec, PRIVATE_PIXMAP, 0)) + return FALSE; + + if (!dixRegisterPrivateKey(&damageWinPrivateKeyRec, PRIVATE_WINDOW, 0)) + return FALSE; + + pScrPriv = malloc(sizeof (DamageScrPrivRec)); if (!pScrPriv) return FALSE; @@ -1908,13 +1911,11 @@ DamageSetup (ScreenPtr pScreen) wrap (pScrPriv, pScreen, SetWindowPixmap, damageSetWindowPixmap); wrap (pScrPriv, pScreen, CopyWindow, damageCopyWindow); wrap (pScrPriv, pScreen, CloseScreen, damageCloseScreen); -#ifdef RENDER if (ps) { wrap (pScrPriv, ps, Glyphs, damageGlyphs); wrap (pScrPriv, ps, Composite, damageComposite); wrap (pScrPriv, ps, AddTraps, damageAddTraps); } -#endif pScrPriv->funcs = miFuncs; @@ -1933,13 +1934,13 @@ DamageCreate (DamageReportFunc damageReport, damageScrPriv(pScreen); DamagePtr pDamage; - pDamage = xalloc (sizeof (DamageRec)); + pDamage = dixAllocateObjectWithPrivates(DamageRec, PRIVATE_DAMAGE); if (!pDamage) return 0; pDamage->pNext = 0; pDamage->pNextWin = 0; - REGION_NULL(pScreen, &pDamage->damage); - REGION_NULL(pScreen, &pDamage->pendingDamage); + RegionNull(&pDamage->damage); + RegionNull(&pDamage->pendingDamage); pDamage->damageLevel = damageLevel; pDamage->isInternal = isInternal; @@ -1953,7 +1954,6 @@ DamageCreate (DamageReportFunc damageReport, pDamage->damageDestroy = damageDestroy; pDamage->damageMarker = NULL; pDamage->pScreen = pScreen; - pDamage->devPrivates = NULL; (*pScrPriv->funcs.Create) (pDamage); @@ -2057,11 +2057,9 @@ DamageDestroy (DamagePtr pDamage) if (pDamage->damageDestroy) (*pDamage->damageDestroy) (pDamage, pDamage->closure); (*pScrPriv->funcs.Destroy) (pDamage); - dixFreePrivates(pDamage->devPrivates); - pDamage->devPrivates = NULL; - REGION_UNINIT (pScreen, &pDamage->damage); - REGION_UNINIT (pScreen, &pDamage->pendingDamage); - xfree (pDamage); + RegionUninit(&pDamage->damage); + RegionUninit(&pDamage->pendingDamage); + dixFreeObjectWithPrivates(pDamage, PRIVATE_DAMAGE); } Bool @@ -2072,7 +2070,7 @@ DamageSubtract (DamagePtr pDamage, RegionRec pixmapClip; DrawablePtr pDrawable = pDamage->pDrawable; - REGION_SUBTRACT (pDrawable->pScreen, &pDamage->damage, &pDamage->damage, pRegion); + RegionSubtract(&pDamage->damage, &pDamage->damage, pRegion); if (pDrawable) { if (pDrawable->type == DRAWABLE_WINDOW) @@ -2085,22 +2083,22 @@ DamageSubtract (DamagePtr pDamage, box.y1 = pDrawable->y; box.x2 = pDrawable->x + pDrawable->width; box.y2 = pDrawable->y + pDrawable->height; - REGION_INIT (pDrawable->pScreen, &pixmapClip, &box, 1); + RegionInit(&pixmapClip, &box, 1); pClip = &pixmapClip; } - REGION_TRANSLATE (pDrawable->pScreen, &pDamage->damage, pDrawable->x, pDrawable->y); - REGION_INTERSECT (pDrawable->pScreen, &pDamage->damage, &pDamage->damage, pClip); - REGION_TRANSLATE (pDrawable->pScreen, &pDamage->damage, -pDrawable->x, -pDrawable->y); + RegionTranslate(&pDamage->damage, pDrawable->x, pDrawable->y); + RegionIntersect(&pDamage->damage, &pDamage->damage, pClip); + RegionTranslate(&pDamage->damage, -pDrawable->x, -pDrawable->y); if (pDrawable->type != DRAWABLE_WINDOW) - REGION_UNINIT(pDrawable->pScreen, &pixmapClip); + RegionUninit(&pixmapClip); } - return REGION_NOTEMPTY (pDrawable->pScreen, &pDamage->damage); + return RegionNotEmpty(&pDamage->damage); } void DamageEmpty (DamagePtr pDamage) { - REGION_EMPTY (pDamage->pDrawable->pScreen, &pDamage->damage); + RegionEmpty(&pDamage->damage); } RegionPtr diff --git a/xserver/miext/damage/damagestr.h b/xserver/miext/damage/damagestr.h index d7435b2a1..b224958d1 100644 --- a/xserver/miext/damage/damagestr.h +++ b/xserver/miext/damage/damagestr.h @@ -30,9 +30,7 @@ #include "damage.h" #include "gcstruct.h" #include "privates.h" -#ifdef RENDER # include "picturestr.h" -#endif typedef struct _damage { DamagePtr pNext; @@ -72,11 +70,9 @@ typedef struct _damageScrPriv { DestroyPixmapProcPtr DestroyPixmap; SetWindowPixmapProcPtr SetWindowPixmap; DestroyWindowProcPtr DestroyWindow; -#ifdef RENDER CompositeProcPtr Composite; GlyphsProcPtr Glyphs; AddTrapsProcPtr AddTraps; -#endif /* Table of wrappable function pointers */ DamageScreenFuncsRec funcs; diff --git a/xserver/miext/rootless/Makefile.in b/xserver/miext/rootless/Makefile.in index edc614034..b3da9831b 100644 --- a/xserver/miext/rootless/Makefile.in +++ b/xserver/miext/rootless/Makefile.in @@ -108,10 +108,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -199,6 +195,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -213,6 +211,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -230,10 +229,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -289,10 +292,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -310,17 +314,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -347,20 +345,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -452,6 +453,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/miext/rootless/rootless.h b/xserver/miext/rootless/rootless.h index 00eac4e8a..dc4213f1e 100644 --- a/xserver/miext/rootless/rootless.h +++ b/xserver/miext/rootless/rootless.h @@ -444,7 +444,7 @@ void RootlessUpdateScreenPixmap(ScreenPtr pScreen); void RootlessRepositionWindows(ScreenPtr pScreen); /* - * Bring all windows to the front of the Aqua stack + * Bring all windows to the front of the native stack */ -void RootlessOrderAllWindows (void); +void RootlessOrderAllWindows (Bool include_unhitable); #endif /* _ROOTLESS_H */ diff --git a/xserver/miext/rootless/rootlessCommon.c b/xserver/miext/rootless/rootlessCommon.c index 39a3eed0f..f91cfb432 100644 --- a/xserver/miext/rootless/rootlessCommon.c +++ b/xserver/miext/rootless/rootlessCommon.c @@ -92,6 +92,9 @@ IsFramedWindow(WindowPtr pWin) { WindowPtr top; + if (!dixPrivateKeyRegistered(&rootlessWindowPrivateKeyRec)) + return FALSE; + if (!pWin->realized) return FALSE; top = TopLevelParent(pWin); @@ -262,7 +265,6 @@ void RootlessStopDrawing(WindowPtr pWindow, Bool flush) void RootlessDamageRegion(WindowPtr pWindow, RegionPtr pRegion) { - ScreenPtr pScreen = pWindow->drawable.pScreen; RootlessWindowRec *winRec; RegionRec clipped; WindowPtr pTop; @@ -286,30 +288,31 @@ RootlessDamageRegion(WindowPtr pWindow, RegionPtr pRegion) drawing inside the clip, go to some lengths to avoid the general case intersection. */ - b1 = REGION_EXTENTS(pScreen, &pWindow->borderClip); - b2 = REGION_EXTENTS(pScreen, pRegion); + b1 = RegionExtents(&pWindow->borderClip); + b2 = RegionExtents(pRegion); if (EXTENTCHECK(b1, b2)) { /* Regions may overlap. */ - if (REGION_NUM_RECTS(pRegion) == 1) { + if (RegionNumRects(pRegion) == 1) { int in; /* Damaged region only has a single rect, so we can just compare that against the region */ - in = RECT_IN_REGION(pScreen, &pWindow->borderClip, - REGION_RECTS (pRegion)); + in = RegionContainsRect(&pWindow->borderClip, + RegionRects (pRegion)); if (in == rgnIN) { /* clip totally contains pRegion */ #ifdef ROOTLESS_TRACK_DAMAGE - REGION_UNION(pScreen, &winRec->damage, + RegionUnion(&winRec->damage, &winRec->damage, (pRegion)); #else - SCREENREC(pScreen)->imp->DamageRects(winRec->wid, - REGION_NUM_RECTS(pRegion), - REGION_RECTS(pRegion), + SCREENREC(pWindow->drawable.pScreen)->imp-> + DamageRects(winRec->wid, + RegionNumRects(pRegion), + RegionRects(pRegion), -winRec->x, -winRec->y); #endif @@ -325,20 +328,21 @@ RootlessDamageRegion(WindowPtr pWindow, RegionPtr pRegion) /* clip overlaps pRegion, need to intersect */ - REGION_NULL(pScreen, &clipped); - REGION_INTERSECT(pScreen, &clipped, &pWindow->borderClip, pRegion); + RegionNull(&clipped); + RegionIntersect(&clipped, &pWindow->borderClip, pRegion); #ifdef ROOTLESS_TRACK_DAMAGE - REGION_UNION(pScreen, &winRec->damage, + RegionUnion(&winRec->damage, &winRec->damage, (pRegion)); #else - SCREENREC(pScreen)->imp->DamageRects(winRec->wid, - REGION_NUM_RECTS(&clipped), - REGION_RECTS(&clipped), + SCREENREC(pWindow->drawable.pScreen)->imp-> + DamageRects(winRec->wid, + RegionNumRects(&clipped), + RegionRects(&clipped), -winRec->x, -winRec->y); #endif - REGION_UNINIT(pScreen, &clipped); + RegionUninit(&clipped); RootlessQueueRedisplay(pTop->drawable.pScreen); } @@ -346,8 +350,8 @@ RootlessDamageRegion(WindowPtr pWindow, RegionPtr pRegion) out: #ifdef ROOTLESSDEBUG { - BoxRec *box = REGION_RECTS(pRegion), *end; - int numBox = REGION_NUM_RECTS(pRegion); + BoxRec *box = RegionRects(pRegion), *end; + int numBox = RegionNumRects(pRegion); for (end = box+numBox; box < end; box++) { RL_DEBUG_MSG("Damage rect: %i, %i, %i, %i\n", @@ -369,11 +373,11 @@ RootlessDamageBox(WindowPtr pWindow, BoxPtr pBox) { RegionRec region; - REGION_INIT(pWindow->drawable.pScreen, ®ion, pBox, 1); + RegionInit(®ion, pBox, 1); RootlessDamageRegion(pWindow, ®ion); - REGION_UNINIT(pWindow->drawable.pScreen, ®ion); /* no-op */ + RegionUninit(®ion); /* no-op */ } @@ -396,11 +400,11 @@ RootlessDamageRect(WindowPtr pWindow, int x, int y, int w, int h) box.y1 = y; box.y2 = y + h; - REGION_INIT(pWindow->drawable.pScreen, ®ion, &box, 1); + RegionInit(®ion, &box, 1); RootlessDamageRegion(pWindow, ®ion); - REGION_UNINIT(pWindow->drawable.pScreen, ®ion); /* no-op */ + RegionUninit(®ion); /* no-op */ } @@ -418,18 +422,18 @@ RootlessRedisplay(WindowPtr pWindow) RootlessStopDrawing(pWindow, FALSE); - if (REGION_NOTEMPTY(pScreen, &winRec->damage)) { + if (RegionNotEmpty(&winRec->damage)) { RL_DEBUG_MSG("Redisplay Win 0x%x, %i x %i @ (%i, %i)\n", pWindow, winRec->width, winRec->height, winRec->x, winRec->y); // move region to window local coords - REGION_TRANSLATE(pScreen, &winRec->damage, + RegionTranslate(&winRec->damage, -winRec->x, -winRec->y); SCREENREC(pScreen)->imp->UpdateRegion(winRec->wid, &winRec->damage); - REGION_EMPTY(pScreen, &winRec->damage); + RegionEmpty(&winRec->damage); } #else /* !ROOTLESS_TRACK_DAMAGE */ @@ -447,7 +451,7 @@ RootlessRedisplay(WindowPtr pWindow) void RootlessRepositionWindows(ScreenPtr pScreen) { - WindowPtr root = WindowTable[pScreen->myNum]; + WindowPtr root = pScreen->root; WindowPtr win; if (root != NULL) { @@ -468,7 +472,7 @@ RootlessRepositionWindows(ScreenPtr pScreen) void RootlessRedisplayScreen(ScreenPtr pScreen) { - WindowPtr root = WindowTable[pScreen->myNum]; + WindowPtr root = pScreen->root; if (root != NULL) { WindowPtr win; diff --git a/xserver/miext/rootless/rootlessCommon.h b/xserver/miext/rootless/rootlessCommon.h index d4a94f8ca..6faf1febd 100644 --- a/xserver/miext/rootless/rootlessCommon.h +++ b/xserver/miext/rootless/rootlessCommon.h @@ -42,9 +42,7 @@ #include "scrnintstr.h" -#ifdef RENDER #include "picturestr.h" -#endif // Debug output, or not. @@ -56,10 +54,17 @@ // Global variables -extern DevPrivateKey rootlessGCPrivateKey; -extern DevPrivateKey rootlessScreenPrivateKey; -extern DevPrivateKey rootlessWindowPrivateKey; -extern DevPrivateKey rootlessWindowOldPixmapPrivateKey; +extern DevPrivateKeyRec rootlessGCPrivateKeyRec; +#define rootlessGCPrivateKey (&rootlessGCPrivateKeyRec) + +extern DevPrivateKeyRec rootlessScreenPrivateKeyRec; +#define rootlessScreenPrivateKey (&rootlessScreenPrivateKeyRec) + +extern DevPrivateKeyRec rootlessWindowPrivateKeyRec; +#define rootlessWindowPrivateKey (&rootlessWindowPrivateKeyRec) + +extern DevPrivateKeyRec rootlessWindowOldPixmapPrivateKeyRec; +#define rootlessWindowOldPixmapPrivateKey (&rootlessWindowOldPixmapPrivateKeyRec) // RootlessGCRec: private per-gc data @@ -100,10 +105,8 @@ typedef struct _RootlessScreenRec { SetShapeProcPtr SetShape; -#ifdef RENDER CompositeProcPtr Composite; GlyphsProcPtr Glyphs; -#endif InstallColormapProcPtr InstallColormap; UninstallColormapProcPtr UninstallColormap; @@ -217,7 +220,7 @@ extern RegionRec rootlessHugeRoot; // Returns TRUE if this window is a root window #define IsRoot(pWin) \ - ((pWin) == WindowTable[(pWin)->drawable.pScreen->myNum]) + ((pWin) == (pWin)->drawable.pScreen->root) /* diff --git a/xserver/miext/rootless/rootlessGC.c b/xserver/miext/rootless/rootlessGC.c index 0bd314d46..6af8d857f 100644 --- a/xserver/miext/rootless/rootlessGC.c +++ b/xserver/miext/rootless/rootlessGC.c @@ -1276,7 +1276,7 @@ static int RootlessPolyText8(DrawablePtr dst, GCPtr pGC, GCOP_WRAP(pGC); RL_DEBUG_MSG("polytext8 end\n"); - return (width + x); + return width + x; } static void RootlessImageText16(DrawablePtr dst, GCPtr pGC, diff --git a/xserver/miext/rootless/rootlessScreen.c b/xserver/miext/rootless/rootlessScreen.c index 7a799d98c..43b9cbb53 100644 --- a/xserver/miext/rootless/rootlessScreen.c +++ b/xserver/miext/rootless/rootlessScreen.c @@ -62,15 +62,10 @@ extern int RootlessMiValidateTree(WindowPtr pRoot, WindowPtr pChild, extern Bool RootlessCreateGC(GCPtr pGC); // Initialize globals -static int rootlessGCPrivateKeyIndex; -DevPrivateKey rootlessGCPrivateKey = &rootlessGCPrivateKeyIndex; -static int rootlessScreenPrivateKeyIndex; -DevPrivateKey rootlessScreenPrivateKey = &rootlessScreenPrivateKeyIndex; -static int rootlessWindowPrivateKeyIndex; -DevPrivateKey rootlessWindowPrivateKey = &rootlessWindowPrivateKeyIndex; -static int rootlessWindowOldPixmapPrivateKeyIndex; -DevPrivateKey rootlessWindowOldPixmapPrivateKey = &rootlessWindowOldPixmapPrivateKeyIndex; - +DevPrivateKeyRec rootlessGCPrivateKeyRec; +DevPrivateKeyRec rootlessScreenPrivateKeyRec; +DevPrivateKeyRec rootlessWindowPrivateKeyRec; +DevPrivateKeyRec rootlessWindowOldPixmapPrivateKeyRec; /* * RootlessUpdateScreenPixmap @@ -98,10 +93,10 @@ RootlessUpdateScreenPixmap(ScreenPtr pScreen) if (s->pixmap_data_size < rowbytes) { if (s->pixmap_data != NULL) - xfree(s->pixmap_data); + free(s->pixmap_data); s->pixmap_data_size = rowbytes; - s->pixmap_data = xalloc(s->pixmap_data_size); + s->pixmap_data = malloc(s->pixmap_data_size); if (s->pixmap_data == NULL) return; @@ -157,12 +152,12 @@ RootlessCloseScreen(int i, ScreenPtr pScreen) pScreen->CloseScreen = s->CloseScreen; if (s->pixmap_data != NULL) { - xfree (s->pixmap_data); + free(s->pixmap_data); s->pixmap_data = NULL; s->pixmap_data_size = 0; } - xfree(s); + free(s); return pScreen->CloseScreen(i, pScreen); } @@ -242,8 +237,6 @@ RootlessSourceValidate(DrawablePtr pDrawable, int x, int y, int w, int h) SCREEN_WRAP(pDrawable->pScreen, SourceValidate); } -#ifdef RENDER - static void RootlessComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst, INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, @@ -363,8 +356,6 @@ RootlessGlyphs(CARD8 op, PicturePtr pSrc, PicturePtr pDst, } } -#endif // RENDER - /* * RootlessValidateTree @@ -445,9 +436,9 @@ RootlessMarkOverlappedWindows(WindowPtr pWin, WindowPtr pFirst, pChild = pWin; while (1) { if (pChild->viewable) { - if (REGION_BROKEN (pScreen, &pChild->winSize)) + if (RegionBroken(&pChild->winSize)) SetWinSize (pChild); - if (REGION_BROKEN (pScreen, &pChild->borderSize)) + if (RegionBroken(&pChild->borderSize)) SetBorderSize (pChild); (* MarkWindow)(pChild); if (pChild->firstChild) { @@ -497,7 +488,7 @@ static void expose_1 (WindowPtr pWin) { void RootlessScreenExpose (ScreenPtr pScreen) { - expose_1 (WindowTable[pScreen->myNum]); + expose_1 (pScreen->root); } @@ -641,11 +632,16 @@ RootlessAllocatePrivates(ScreenPtr pScreen) { RootlessScreenRec *s; - // no allocation needed for screen privates - if (!dixRequestPrivate(rootlessGCPrivateKey, sizeof(RootlessGCRec))) + if (!dixRegisterPrivateKey(&rootlessGCPrivateKeyRec, PRIVATE_GC, sizeof(RootlessGCRec))) + return FALSE; + if (!dixRegisterPrivateKey(&rootlessScreenPrivateKeyRec, PRIVATE_SCREEN, 0)) + return FALSE; + if (!dixRegisterPrivateKey(&rootlessWindowPrivateKeyRec, PRIVATE_WINDOW, 0)) + return FALSE; + if (!dixRegisterPrivateKey(&rootlessWindowOldPixmapPrivateKeyRec, PRIVATE_WINDOW, 0)) return FALSE; - s = xalloc(sizeof(RootlessScreenRec)); + s = malloc(sizeof(RootlessScreenRec)); if (! s) return FALSE; SETSCREENREC(pScreen, s); @@ -698,7 +694,6 @@ RootlessWrap(ScreenPtr pScreen) WRAP(SetShape); -#ifdef RENDER { // Composite and Glyphs don't use normal screen wrapping PictureScreenPtr ps = GetPictureScreen(pScreen); @@ -707,7 +702,6 @@ RootlessWrap(ScreenPtr pScreen) s->Glyphs = ps->Glyphs; ps->Glyphs = RootlessGlyphs; } -#endif // WRAP(ClearToBackground); fixme put this back? useful for shaped wins? diff --git a/xserver/miext/rootless/rootlessValTree.c b/xserver/miext/rootless/rootlessValTree.c index 0ee4919e1..e2c4ffe87 100644 --- a/xserver/miext/rootless/rootlessValTree.c +++ b/xserver/miext/rootless/rootlessValTree.c @@ -104,16 +104,13 @@ Equipment Corporation. #include "globals.h" -int RootlessShapedWindowIn (ScreenPtr pScreen, RegionPtr universe, - RegionPtr bounding, BoxPtr rect, int x, int y); - int RootlessMiValidateTree (WindowPtr pRoot, WindowPtr pChild, VTKind kind); /* * Compute the visibility of a shaped window */ -int -RootlessShapedWindowIn (ScreenPtr pScreen, RegionPtr universe, +static int +RootlessShapedWindowIn (RegionPtr universe, RegionPtr bounding, BoxPtr rect, int x, int y) { BoxRec box; @@ -122,8 +119,8 @@ RootlessShapedWindowIn (ScreenPtr pScreen, RegionPtr universe, Bool someIn, someOut; register int t, x1, y1, x2, y2; - nbox = REGION_NUM_RECTS (bounding); - boundBox = REGION_RECTS (bounding); + nbox = RegionNumRects (bounding); + boundBox = RegionRects (bounding); someIn = someOut = FALSE; x1 = rect->x1; y1 = rect->y1; @@ -147,7 +144,7 @@ RootlessShapedWindowIn (ScreenPtr pScreen, RegionPtr universe, box.x2 = box.x1; if (box.y1 > box.y2) box.y2 = box.y1; - switch (RECT_IN_REGION(pScreen, universe, &box)) + switch (RegionContainsRect(universe, &box)) { case rgnIN: if (someOut) @@ -224,7 +221,7 @@ RootlessComputeClips (WindowPtr pParent, ScreenPtr pScreen, borderSize.y2 = dy; oldVis = pParent->visibility; - switch (RECT_IN_REGION( pScreen, universe, &borderSize)) + switch (RegionContainsRect(universe, &borderSize)) { case rgnIN: newVis = VisibilityUnobscured; @@ -236,7 +233,7 @@ RootlessComputeClips (WindowPtr pParent, ScreenPtr pScreen, if ((pBounding = wBoundingShape (pParent))) { - switch (RootlessShapedWindowIn (pScreen, universe, + switch (RootlessShapedWindowIn (universe, pBounding, &borderSize, pParent->drawable.x, pParent->drawable.y)) @@ -285,9 +282,9 @@ RootlessComputeClips (WindowPtr pParent, ScreenPtr pScreen, { if (pChild->visibility != VisibilityFullyObscured) { - REGION_TRANSLATE( pScreen, &pChild->borderClip, + RegionTranslate(&pChild->borderClip, dx, dy); - REGION_TRANSLATE( pScreen, &pChild->clipList, + RegionTranslate(&pChild->clipList, dx, dy); pChild->drawable.serialNumber = NEXT_SERIAL_NUMBER; if (pScreen->ClipNotify) @@ -296,16 +293,14 @@ RootlessComputeClips (WindowPtr pParent, ScreenPtr pScreen, } if (pChild->valdata) { - REGION_NULL(pScreen, - &pChild->valdata->after.borderExposed); + RegionNull(&pChild->valdata->after.borderExposed); if (HasParentRelativeBorder(pChild)) { - REGION_SUBTRACT(pScreen, - &pChild->valdata->after.borderExposed, - &pChild->borderClip, - &pChild->winSize); + RegionSubtract(&pChild->valdata->after.borderExposed, + &pChild->borderClip, + &pChild->winSize); } - REGION_NULL(pScreen, &pChild->valdata->after.exposed); + RegionNull(&pChild->valdata->after.exposed); } if (pChild->firstChild) { @@ -334,20 +329,20 @@ RootlessComputeClips (WindowPtr pParent, ScreenPtr pScreen, * We translate the old clipList because that will be exposed or copied * if gravity is right. */ - REGION_TRANSLATE( pScreen, &pParent->borderClip, dx, dy); - REGION_TRANSLATE( pScreen, &pParent->clipList, dx, dy); + RegionTranslate(&pParent->borderClip, dx, dy); + RegionTranslate(&pParent->clipList, dx, dy); } break; case VTBroken: - REGION_EMPTY (pScreen, &pParent->borderClip); - REGION_EMPTY (pScreen, &pParent->clipList); + RegionEmpty(&pParent->borderClip); + RegionEmpty(&pParent->clipList); break; } borderVisible = pParent->valdata->before.borderVisible; resized = pParent->valdata->before.resized; - REGION_NULL(pScreen, &pParent->valdata->after.borderExposed); - REGION_NULL(pScreen, &pParent->valdata->after.exposed); + RegionNull(&pParent->valdata->after.borderExposed); + RegionNull(&pParent->valdata->after.exposed); /* * Since the borderClip must not be clipped by the children, we do @@ -367,23 +362,23 @@ RootlessComputeClips (WindowPtr pParent, ScreenPtr pScreen, * of the border will be saved by DIX in borderVisible -- * use that region and destroy it */ - REGION_SUBTRACT( pScreen, exposed, universe, borderVisible); - REGION_DESTROY( pScreen, borderVisible); + RegionSubtract(exposed, universe, borderVisible); + RegionDestroy(borderVisible); } else { - REGION_SUBTRACT( pScreen, exposed, universe, &pParent->borderClip); + RegionSubtract(exposed, universe, &pParent->borderClip); } if (HasParentRelativeBorder(pParent) && (dx || dy)) { - REGION_SUBTRACT( pScreen, &pParent->valdata->after.borderExposed, + RegionSubtract(&pParent->valdata->after.borderExposed, universe, &pParent->winSize); } else { - REGION_SUBTRACT( pScreen, &pParent->valdata->after.borderExposed, + RegionSubtract(&pParent->valdata->after.borderExposed, exposed, &pParent->winSize); } - REGION_COPY( pScreen, &pParent->borderClip, universe); + RegionCopy(&pParent->borderClip, universe); /* * To get the right clipList for the parent, and to make doubly sure @@ -391,15 +386,15 @@ RootlessComputeClips (WindowPtr pParent, ScreenPtr pScreen, * border from the universe before proceeding. */ - REGION_INTERSECT( pScreen, universe, universe, &pParent->winSize); + RegionIntersect(universe, universe, &pParent->winSize); } else - REGION_COPY( pScreen, &pParent->borderClip, universe); + RegionCopy(&pParent->borderClip, universe); if ((pChild = pParent->firstChild) && pParent->mapped) { - REGION_NULL(pScreen, &childUniverse); - REGION_NULL(pScreen, &childUnion); + RegionNull(&childUniverse); + RegionNull(&childUnion); if ((pChild->drawable.y < pParent->lastChild->drawable.y) || ((pChild->drawable.y == pParent->lastChild->drawable.y) && (pChild->drawable.x < pParent->lastChild->drawable.x))) @@ -407,7 +402,7 @@ RootlessComputeClips (WindowPtr pParent, ScreenPtr pScreen, for (; pChild; pChild = pChild->nextSib) { if (pChild->viewable) - REGION_APPEND( pScreen, &childUnion, &pChild->borderSize); + RegionAppend(&childUnion, &pChild->borderSize); } } else @@ -415,10 +410,10 @@ RootlessComputeClips (WindowPtr pParent, ScreenPtr pScreen, for (pChild = pParent->lastChild; pChild; pChild = pChild->prevSib) { if (pChild->viewable) - REGION_APPEND( pScreen, &childUnion, &pChild->borderSize); + RegionAppend(&childUnion, &pChild->borderSize); } } - REGION_VALIDATE( pScreen, &childUnion, &overlap); + RegionValidate(&childUnion, &overlap); for (pChild = pParent->firstChild; pChild; @@ -435,7 +430,7 @@ RootlessComputeClips (WindowPtr pParent, ScreenPtr pScreen, * Figure out the new universe from the child's * perspective and recurse. */ - REGION_INTERSECT( pScreen, &childUniverse, + RegionIntersect(&childUniverse, universe, &pChild->borderSize); RootlessComputeClips (pChild, pScreen, &childUniverse, @@ -447,14 +442,14 @@ RootlessComputeClips (WindowPtr pParent, ScreenPtr pScreen, * other sibling. */ if (overlap) - REGION_SUBTRACT( pScreen, universe, universe, + RegionSubtract(universe, universe, &pChild->borderSize); } } if (!overlap) - REGION_SUBTRACT( pScreen, universe, universe, &childUnion); - REGION_UNINIT( pScreen, &childUnion); - REGION_UNINIT( pScreen, &childUniverse); + RegionSubtract(universe, universe, &childUnion); + RegionUninit(&childUnion); + RegionUninit(&childUniverse); } /* if any children */ /* @@ -467,12 +462,12 @@ RootlessComputeClips (WindowPtr pParent, ScreenPtr pScreen, if (oldVis == VisibilityFullyObscured || oldVis == VisibilityNotViewable) { - REGION_COPY( pScreen, &pParent->valdata->after.exposed, universe); + RegionCopy(&pParent->valdata->after.exposed, universe); } else if (newVis != VisibilityFullyObscured && newVis != VisibilityNotViewable) { - REGION_SUBTRACT( pScreen, &pParent->valdata->after.exposed, + RegionSubtract(&pParent->valdata->after.exposed, universe, &pParent->clipList); } @@ -484,7 +479,7 @@ RootlessComputeClips (WindowPtr pParent, ScreenPtr pScreen, */ if (pParent->backStorage && !resized) { - REGION_SUBTRACT( pScreen, exposed, &pParent->clipList, universe); + RegionSubtract(exposed, &pParent->clipList, universe); (* pScreen->SaveDoomedAreas)(pParent, exposed, dx, dy); } @@ -498,7 +493,7 @@ RootlessComputeClips (WindowPtr pParent, ScreenPtr pScreen, } #ifdef NOTDEF - REGION_COPY( pScreen, &pParent->clipList, universe); + RegionCopy(&pParent->clipList, universe); #endif pParent->drawable.serialNumber = NEXT_SERIAL_NUMBER; @@ -589,15 +584,15 @@ RootlessMiValidateTree (WindowPtr pRoot, /* Parent to validate */ if (pChild == NullWindow) pChild = pRoot->firstChild; - REGION_NULL(pScreen, &childClip); - REGION_NULL(pScreen, &exposed); + RegionNull(&childClip); + RegionNull(&exposed); - if (REGION_BROKEN (pScreen, &pRoot->clipList) && - !REGION_BROKEN (pScreen, &pRoot->borderClip)) + if (RegionBroken(&pRoot->clipList) && + !RegionBroken(&pRoot->borderClip)) { // fixme this might not work, but hopefully doesn't happen anyway. kind = VTBroken; - REGION_EMPTY (pScreen, &pRoot->clipList); + RegionEmpty(&pRoot->clipList); ErrorF("ValidateTree: BUSTED!\n"); } @@ -613,28 +608,28 @@ RootlessMiValidateTree (WindowPtr pRoot, /* Parent to validate */ { if (pWin->viewable) { if (pWin->valdata) { - REGION_COPY( pScreen, &childClip, &pWin->borderSize); + RegionCopy(&childClip, &pWin->borderSize); RootlessComputeClips (pWin, pScreen, &childClip, kind, &exposed); } else if (pWin->visibility == VisibilityNotViewable) { RootlessTreeObscured(pWin); } } else { if (pWin->valdata) { - REGION_EMPTY( pScreen, &pWin->clipList); + RegionEmpty(&pWin->clipList); if (pScreen->ClipNotify) (* pScreen->ClipNotify) (pWin, 0, 0); - REGION_EMPTY( pScreen, &pWin->borderClip); + RegionEmpty(&pWin->borderClip); pWin->valdata = NULL; } } } - REGION_UNINIT(pScreen, &childClip); + RegionUninit(&childClip); /* The root is never clipped by its children, so nothing on the root is ever exposed by moving or mapping its children. */ - REGION_NULL(pScreen, &pRoot->valdata->after.exposed); - REGION_NULL(pScreen, &pRoot->valdata->after.borderExposed); + RegionNull(&pRoot->valdata->after.exposed); + RegionNull(&pRoot->valdata->after.borderExposed); return 1; } diff --git a/xserver/miext/rootless/rootlessWindow.c b/xserver/miext/rootless/rootlessWindow.c index 55c7b9689..c1c6bdbfd 100644 --- a/xserver/miext/rootless/rootlessWindow.c +++ b/xserver/miext/rootless/rootlessWindow.c @@ -53,9 +53,9 @@ extern Bool no_configure_window; #ifdef ROOTLESS_GLOBAL_COORDS #define SCREEN_TO_GLOBAL_X \ - (dixScreenOrigins[pScreen->myNum].x + rootlessGlobalOffsetX) + (pScreen->x + rootlessGlobalOffsetX) #define SCREEN_TO_GLOBAL_Y \ - (dixScreenOrigins[pScreen->myNum].y + rootlessGlobalOffsetY) + (pScreen->y + rootlessGlobalOffsetY) #else #define SCREEN_TO_GLOBAL_X 0 #define SCREEN_TO_GLOBAL_Y 0 @@ -109,8 +109,8 @@ void RootlessNativeWindowMoved (WindowPtr pWin) { if (xp_get_window_bounds (MAKE_WINDOW_ID(winRec->wid), &bounds) != Success) return; - sx = dixScreenOrigins[pWin->drawable.pScreen->myNum].x + darwinMainScreenX; - sy = dixScreenOrigins[pWin->drawable.pScreen->myNum].y + darwinMainScreenY; + sx = pWin->drawable.pScreen->x + darwinMainScreenX; + sy = pWin->drawable.pScreen->y + darwinMainScreenY; /* Fake up a ConfigureWindow packet to resize the window to the current bounds. */ vlist[0] = (INT16) bounds.x1 - sx; @@ -179,15 +179,13 @@ RootlessCreateWindow(WindowPtr pWin) static void RootlessDestroyFrame(WindowPtr pWin, RootlessWindowPtr winRec) { - ScreenPtr pScreen = pWin->drawable.pScreen; - - SCREENREC(pScreen)->imp->DestroyFrame(winRec->wid); + SCREENREC(pWin->drawable.pScreen)->imp->DestroyFrame(winRec->wid); #ifdef ROOTLESS_TRACK_DAMAGE - REGION_UNINIT(pScreen, &winRec->damage); + RegionUninit(&winRec->damage); #endif - xfree(winRec); + free(winRec); SETWINREC(pWin, NULL); } @@ -218,23 +216,15 @@ RootlessDestroyWindow(WindowPtr pWin) static Bool RootlessGetShape(WindowPtr pWin, RegionPtr pShape) { - ScreenPtr pScreen = pWin->drawable.pScreen; - - /* - * Avoid a warning. - * REGION_NULL and the other macros don't actually seem to use pScreen. - */ - (void)pScreen; - if (wBoundingShape(pWin) == NULL) return FALSE; /* wBoundingShape is relative to *inner* origin of window. Translate by borderWidth to get the outside-relative position. */ - REGION_NULL(pScreen, pShape); - REGION_COPY(pScreen, pShape, wBoundingShape(pWin)); - REGION_TRANSLATE(pScreen, pShape, pWin->borderWidth, pWin->borderWidth); + RegionNull(pShape); + RegionCopy(pShape, wBoundingShape(pWin)); + RegionTranslate(pShape, pWin->borderWidth, pWin->borderWidth); return TRUE; } @@ -247,7 +237,6 @@ RootlessGetShape(WindowPtr pWin, RegionPtr pShape) static void RootlessReshapeFrame(WindowPtr pWin) { RootlessWindowRec *winRec = WINREC(pWin); - ScreenPtr pScreen = pWin->drawable.pScreen; RegionRec newShape; RegionPtr pShape; @@ -266,7 +255,7 @@ static void RootlessReshapeFrame(WindowPtr pWin) RL_DEBUG_MSG("reshaping..."); if (pShape != NULL) { RL_DEBUG_MSG("numrects %d, extents %d %d %d %d ", - REGION_NUM_RECTS(&newShape), + RegionNumRects(&newShape), newShape.extents.x1, newShape.extents.y1, newShape.extents.x2, newShape.extents.y2); } else { @@ -274,10 +263,10 @@ static void RootlessReshapeFrame(WindowPtr pWin) } #endif - SCREENREC(pScreen)->imp->ReshapeFrame(winRec->wid, pShape); + SCREENREC(pWin->drawable.pScreen)->imp->ReshapeFrame(winRec->wid, pShape); if (pShape != NULL) - REGION_UNINIT(pScreen, &newShape); + RegionUninit(&newShape); } @@ -288,12 +277,12 @@ static void RootlessReshapeFrame(WindowPtr pWin) * shaped when the window is framed. */ void -RootlessSetShape(WindowPtr pWin) +RootlessSetShape(WindowPtr pWin, int kind) { ScreenPtr pScreen = pWin->drawable.pScreen; SCREEN_UNWRAP(pScreen, SetShape); - pScreen->SetShape(pWin); + pScreen->SetShape(pWin, kind); SCREEN_WRAP(pScreen, SetShape); RootlessReshapeFrame(pWin); @@ -355,8 +344,8 @@ RootlessPositionWindow(WindowPtr pWin, int x, int y) #ifdef ROOTLESS_TRACK_DAMAGE // Move damaged region to correspond to new window position - if (REGION_NOTEMPTY(pScreen, &winRec->damage)) { - REGION_TRANSLATE(pScreen, &winRec->damage, + if (RegionNotEmpty(&winRec->damage)) { + RegionTranslate(&winRec->damage, x - bw - winRec->x, y - bw - winRec->y); } @@ -394,7 +383,7 @@ RootlessInitializeFrame(WindowPtr pWin, RootlessWindowRec *winRec) winRec->borderWidth = bw; #ifdef ROOTLESS_TRACK_DAMAGE - REGION_NULL(pScreen, &winRec->damage); + RegionNull(&winRec->damage); #endif } @@ -421,7 +410,7 @@ RootlessEnsureFrame(WindowPtr pWin) if (pWin->drawable.class != InputOutput) return NULL; - winRec = xalloc(sizeof(RootlessWindowRec)); + winRec = malloc(sizeof(RootlessWindowRec)); if (!winRec) return NULL; @@ -448,7 +437,7 @@ RootlessEnsureFrame(WindowPtr pWin) pShape)) { RL_DEBUG_MSG("implementation failed to create frame!\n"); - xfree(winRec); + free(winRec); SETWINREC(pWin, NULL); return NULL; } @@ -457,7 +446,7 @@ RootlessEnsureFrame(WindowPtr pWin) RootlessFlushWindowColormap(pWin); if (pShape != NULL) - REGION_UNINIT(pScreen, &shape); + RegionUninit(&shape); return winRec; } @@ -592,10 +581,15 @@ RootlessReorderWindow(WindowPtr pWin) RootlessStopDrawing(pWin, FALSE); - /* Find the next window above this one that has a mapped frame. */ + /* Find the next window above this one that has a mapped frame. + * Only include cases where the windows are in the same category of + * hittability to ensure offscreen windows dont get restacked + * relative to onscreen ones (but that the offscreen ones maintain + * their stacking order if they are explicitly asked to Reorder + */ newPrevW = pWin->prevSib; - while (newPrevW && (WINREC(newPrevW) == NULL || !newPrevW->realized)) + while (newPrevW && (WINREC(newPrevW) == NULL || !newPrevW->realized || newPrevW->rootlessUnhittable != pWin->rootlessUnhittable)) newPrevW = newPrevW->prevSib; newPrev = newPrevW != NULL ? WINREC(newPrevW) : NULL; @@ -673,7 +667,7 @@ RootlessNoCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RL_DEBUG_MSG("ROOTLESSNOCOPYWINDOW "); - REGION_TRANSLATE(pWin->drawable.pScreen, prgnSrc, -dx, -dy); + RegionTranslate(prgnSrc, -dx, -dy); } @@ -705,9 +699,9 @@ RootlessResizeCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, dx = ptOldOrg.x - pWin->drawable.x; dy = ptOldOrg.y - pWin->drawable.y; - REGION_TRANSLATE(pScreen, prgnSrc, -dx, -dy); - REGION_NULL(pScreen, &rgnDst); - REGION_INTERSECT(pScreen, &rgnDst, &pWin->borderClip, prgnSrc); + RegionTranslate(prgnSrc, -dx, -dy); + RegionNull(&rgnDst); + RegionIntersect(&rgnDst, &pWin->borderClip, prgnSrc); if (gResizeDeathCount == 1) { /* Simple case, we only have a single source pixmap. */ @@ -724,21 +718,21 @@ RootlessResizeCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, intersect the destination with each source and copy those bits. */ for (i = 0; i < gResizeDeathCount; i++) { - REGION_INIT(pScreen, &clip, gResizeDeathBounds + 0, 1); - REGION_NULL(pScreen, &clipped); - REGION_INTERSECT(pScreen, &rgnDst, &clip, &clipped); + RegionInit(&clip, gResizeDeathBounds + 0, 1); + RegionNull(&clipped); + RegionIntersect(&rgnDst, &clip, &clipped); fbCopyRegion(&gResizeDeathPix[i]->drawable, &pScreen->GetWindowPixmap(pWin)->drawable, 0, &clipped, dx, dy, fbCopyWindowProc, 0, 0); - REGION_UNINIT(pScreen, &clipped); - REGION_UNINIT(pScreen, &clip); + RegionUninit(&clipped); + RegionUninit(&clip); } } /* Don't update - resize will update everything */ - REGION_UNINIT(pScreen, &rgnDst); + RegionUninit(&rgnDst); fbValidateDrawable(&pWin->drawable); @@ -768,12 +762,12 @@ RootlessCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) dx = ptOldOrg.x - pWin->drawable.x; dy = ptOldOrg.y - pWin->drawable.y; - REGION_TRANSLATE(pScreen, prgnSrc, -dx, -dy); + RegionTranslate(prgnSrc, -dx, -dy); - REGION_NULL(pScreen, &rgnDst); - REGION_INTERSECT(pScreen, &rgnDst, &pWin->borderClip, prgnSrc); + RegionNull(&rgnDst); + RegionIntersect(&rgnDst, &pWin->borderClip, prgnSrc); - extents = REGION_EXTENTS(pScreen, &rgnDst); + extents = RegionExtents(&rgnDst); area = (extents->x2 - extents->x1) * (extents->y2 - extents->y1); /* If the area exceeds threshold, use the implementation's @@ -797,13 +791,13 @@ RootlessCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) } /* Move region to window local coords */ - REGION_TRANSLATE(pScreen, &rgnDst, -winRec->x, -winRec->y); + RegionTranslate(&rgnDst, -winRec->x, -winRec->y); RootlessStopDrawing(pWin, FALSE); SCREENREC(pScreen)->imp->CopyWindow(winRec->wid, - REGION_NUM_RECTS(&rgnDst), - REGION_RECTS(&rgnDst), + RegionNumRects(&rgnDst), + RegionRects(&rgnDst), dx, dy); } else { @@ -817,7 +811,7 @@ RootlessCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) } out: - REGION_UNINIT(pScreen, &rgnDst); + RegionUninit(&rgnDst); fbValidateDrawable(&pWin->drawable); SCREEN_WRAP(pScreen, CopyWindow); @@ -984,7 +978,7 @@ StartFrameResize(WindowPtr pWin, Bool gravity, copy_rect_width = copy_rect.x2 - copy_rect.x1; copy_rect_height = copy_rect.y2 - copy_rect.y1; copy_rowbytes = ((copy_rect_width * Bpp) + 31) & ~31; - gResizeDeathBits = xalloc(copy_rowbytes + gResizeDeathBits = malloc(copy_rowbytes * copy_rect_height); if (copy_rect_width * copy_rect_height > @@ -1028,7 +1022,7 @@ StartFrameResize(WindowPtr pWin, Bool gravity, RootlessStartDrawing(pWin); - gResizeDeathBits = xalloc(winRec->bytesPerRow * winRec->height); + gResizeDeathBits = malloc(winRec->bytesPerRow * winRec->height); memcpy(gResizeDeathBits, winRec->pixelData, winRec->bytesPerRow * winRec->height); @@ -1170,7 +1164,7 @@ FinishFrameResize(WindowPtr pWin, Bool gravity, int oldX, int oldY, } if (gResizeDeathBits != NULL) { - xfree(gResizeDeathBits); + free(gResizeDeathBits); gResizeDeathBits = NULL; } @@ -1320,11 +1314,18 @@ RootlessResizeWindow(WindowPtr pWin, int x, int y, box.x1 = x; box.y1 = y; box.x2 = x + w; box.y2 = y + h; - REGION_UNINIT(pScreen, &pWin->winSize); - REGION_INIT(pScreen, &pWin->winSize, &box, 1); - REGION_COPY(pScreen, &pWin->borderSize, &pWin->winSize); - REGION_COPY(pScreen, &pWin->clipList, &pWin->winSize); - REGION_COPY(pScreen, &pWin->borderClip, &pWin->winSize); + RegionUninit(&pWin->winSize); + RegionInit(&pWin->winSize, &box, 1); + RegionCopy(&pWin->borderSize, &pWin->winSize); + RegionCopy(&pWin->clipList, &pWin->winSize); + RegionCopy(&pWin->borderClip, &pWin->winSize); + + if (winRec) { + SCREENREC(pScreen)->imp->ResizeFrame(winRec->wid, pScreen, + x + SCREEN_TO_GLOBAL_X, + y + SCREEN_TO_GLOBAL_Y, + w, h, RL_GRAVITY_NONE); + } miSendExposures(pWin, &pWin->borderClip, pWin->drawable.x, pWin->drawable.y); @@ -1506,7 +1507,7 @@ RootlessChangeBorderWidth(WindowPtr pWin, unsigned int width) * (i.e in front of Aqua windows) -- called when X11.app is given focus */ void -RootlessOrderAllWindows (void) +RootlessOrderAllWindows (Bool include_unhitable) { int i; WindowPtr pWin; @@ -1517,12 +1518,13 @@ RootlessOrderAllWindows (void) RL_DEBUG_MSG("RootlessOrderAllWindows() "); for (i = 0; i < screenInfo.numScreens; i++) { if (screenInfo.screens[i] == NULL) continue; - pWin = WindowTable[i]; + pWin = screenInfo.screens[i]->root; if (pWin == NULL) continue; for (pWin = pWin->firstChild; pWin != NULL; pWin = pWin->nextSib) { if (!pWin->realized) continue; if (RootlessEnsureFrame(pWin) == NULL) continue; + if (!include_unhitable && pWin->rootlessUnhittable) continue; RootlessReorderWindow (pWin); } } @@ -1533,7 +1535,7 @@ void RootlessEnableRoot (ScreenPtr pScreen) { WindowPtr pRoot; - pRoot = WindowTable[pScreen->myNum]; + pRoot = pScreen->root; RootlessEnsureFrame (pRoot); (*pScreen->ClearToBackground) (pRoot, 0, 0, 0, 0, TRUE); @@ -1546,7 +1548,7 @@ RootlessDisableRoot (ScreenPtr pScreen) WindowPtr pRoot; RootlessWindowRec *winRec; - pRoot = WindowTable[pScreen->myNum]; + pRoot = pScreen->root; winRec = WINREC (pRoot); if (NULL == winRec) @@ -1572,8 +1574,10 @@ RootlessHideAllWindows (void) for (i = 0; i < screenInfo.numScreens; i++) { pScreen = screenInfo.screens[i]; - pWin = WindowTable[i]; - if (pScreen == NULL || pWin == NULL) + if (pScreen == NULL) + continue; + pWin = pScreen->root; + if (pWin == NULL) continue; for (pWin = pWin->firstChild; pWin != NULL; pWin = pWin->nextSib) @@ -1609,8 +1613,10 @@ RootlessShowAllWindows (void) for (i = 0; i < screenInfo.numScreens; i++) { pScreen = screenInfo.screens[i]; - pWin = WindowTable[i]; - if (pScreen == NULL || pWin == NULL) + if (pScreen == NULL) + continue; + pWin = pScreen->root; + if (pWin == NULL) continue; for (pWin = pWin->firstChild; pWin != NULL; pWin = pWin->nextSib) diff --git a/xserver/miext/rootless/rootlessWindow.h b/xserver/miext/rootless/rootlessWindow.h index ca104a4d7..2b018e007 100644 --- a/xserver/miext/rootless/rootlessWindow.h +++ b/xserver/miext/rootless/rootlessWindow.h @@ -39,7 +39,7 @@ Bool RootlessCreateWindow(WindowPtr pWin); Bool RootlessDestroyWindow(WindowPtr pWin); -void RootlessSetShape(WindowPtr pWin); +void RootlessSetShape(WindowPtr pWin, int kind); Bool RootlessChangeWindowAttributes(WindowPtr pWin, unsigned long vmask); Bool RootlessPositionWindow(WindowPtr pWin, int x, int y); diff --git a/xserver/miext/shadow/Makefile.in b/xserver/miext/shadow/Makefile.in index 95bc17bcc..671d06d23 100644 --- a/xserver/miext/shadow/Makefile.in +++ b/xserver/miext/shadow/Makefile.in @@ -124,10 +124,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -215,6 +211,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -229,6 +227,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -246,10 +245,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -305,10 +308,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -326,17 +330,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -363,20 +361,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -468,6 +469,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/miext/shadow/shadow.c b/xserver/miext/shadow/shadow.c index 608ccd234..cb1b299fe 100644 --- a/xserver/miext/shadow/shadow.c +++ b/xserver/miext/shadow/shadow.c @@ -36,8 +36,8 @@ #include "gcstruct.h" #include "shadow.h" -static int shadowScrPrivateKeyIndex; -DevPrivateKey shadowScrPrivateKey = &shadowScrPrivateKeyIndex; +static DevPrivateKeyRec shadowScrPrivateKeyRec; +#define shadowScrPrivateKey (&shadowScrPrivateKeyRec) #define wrap(priv, real, mem) {\ priv->mem = real->mem; \ @@ -57,7 +57,7 @@ shadowRedisplay(ScreenPtr pScreen) if (!pBuf || !pBuf->pDamage || !pBuf->update) return; pRegion = DamageRegion(pBuf->pDamage); - if (REGION_NOTEMPTY(pScreen, pRegion)) { + if (RegionNotEmpty(pRegion)) { (*pBuf->update)(pScreen, pBuf); DamageEmpty(pBuf->pDamage); } @@ -103,11 +103,11 @@ shadowCloseScreen(int i, ScreenPtr pScreen) shadowRemove(pScreen, pBuf->pPixmap); DamageDestroy(pBuf->pDamage); #ifdef BACKWARDS_COMPATIBILITY - REGION_UNINIT(pScreen, &pBuf->damage); /* bc */ + RegionUninit(&pBuf->damage); /* bc */ #endif if (pBuf->pPixmap) pScreen->DestroyPixmap(pBuf->pPixmap); - xfree(pBuf); + free(pBuf); return pScreen->CloseScreen(i, pScreen); } @@ -121,13 +121,13 @@ shadowReportFunc(DamagePtr pDamage, RegionPtr pRegion, void *closure) /* Register the damaged region, use DamageReportNone below when we * want to break BC below... */ - REGION_UNION(pScreen, &pDamage->damage, &pDamage->damage, pRegion); + RegionUnion(&pDamage->damage, &pDamage->damage, pRegion); /* * BC hack. In 7.0 and earlier several drivers would inspect the * 'damage' member directly, so we have to keep it existing. */ - REGION_COPY(pScreen, &pBuf->damage, pRegion); + RegionCopy(&pBuf->damage, pRegion); } #endif @@ -136,10 +136,13 @@ shadowSetup(ScreenPtr pScreen) { shadowBufPtr pBuf; + if (!dixRegisterPrivateKey(&shadowScrPrivateKeyRec, PRIVATE_SCREEN, 0)) + return FALSE; + if (!DamageSetup(pScreen)) return FALSE; - pBuf = xalloc(sizeof(shadowBufRec)); + pBuf = malloc(sizeof(shadowBufRec)); if (!pBuf) return FALSE; #ifdef BACKWARDS_COMPATIBILITY @@ -154,7 +157,7 @@ shadowSetup(ScreenPtr pScreen) TRUE, pScreen, pScreen); #endif if (!pBuf->pDamage) { - xfree(pBuf); + free(pBuf); return FALSE; } @@ -166,7 +169,7 @@ shadowSetup(ScreenPtr pScreen) pBuf->closure = 0; pBuf->randr = 0; #ifdef BACKWARDS_COMPATIBILITY - REGION_NULL(pScreen, &pBuf->damage); /* bc */ + RegionNull(&pBuf->damage); /* bc */ #endif dixSetPrivate(&pScreen->devPrivates, shadowScrPrivateKey, pBuf); diff --git a/xserver/miext/shadow/shadow.h b/xserver/miext/shadow/shadow.h index ef85c0bb9..f4473052d 100644 --- a/xserver/miext/shadow/shadow.h +++ b/xserver/miext/shadow/shadow.h @@ -26,9 +26,7 @@ #include "scrnintstr.h" -#ifdef RENDER #include "picturestr.h" -#endif #include "damage.h" #include "damagestr.h" diff --git a/xserver/miext/shadow/shalloc.c b/xserver/miext/shadow/shalloc.c index 72aa28b14..f57cb5266 100644 --- a/xserver/miext/shadow/shalloc.c +++ b/xserver/miext/shadow/shalloc.c @@ -45,6 +45,6 @@ shadowAlloc (int width, int height, int bpp) /* Cant use PixmapBytePad -- the structure is probably not initialized yet */ stride = BitmapBytePad (width * bpp); - fb = xalloc (stride * height); + fb = malloc(stride * height); return fb; } diff --git a/xserver/miext/shadow/shpacked.c b/xserver/miext/shadow/shpacked.c index 6736162e2..20d2ea19e 100644 --- a/xserver/miext/shadow/shpacked.c +++ b/xserver/miext/shadow/shpacked.c @@ -46,8 +46,8 @@ shadowUpdatePacked (ScreenPtr pScreen, { RegionPtr damage = shadowDamage (pBuf); PixmapPtr pShadow = pBuf->pPixmap; - int nbox = REGION_NUM_RECTS (damage); - BoxPtr pbox = REGION_RECTS (damage); + int nbox = RegionNumRects (damage); + BoxPtr pbox = RegionRects (damage); FbBits *shaBase, *shaLine, *sha; FbStride shaStride; int scrBase, scrLine, scr; diff --git a/xserver/miext/shadow/shplanar.c b/xserver/miext/shadow/shplanar.c index b5983dc73..9ca3f3f89 100644 --- a/xserver/miext/shadow/shplanar.c +++ b/xserver/miext/shadow/shplanar.c @@ -92,8 +92,8 @@ shadowUpdatePlanar4 (ScreenPtr pScreen, { RegionPtr damage = shadowDamage (pBuf); PixmapPtr pShadow = pBuf->pPixmap; - int nbox = REGION_NUM_RECTS (damage); - BoxPtr pbox = REGION_RECTS (damage); + int nbox = RegionNumRects (damage); + BoxPtr pbox = RegionRects (damage); CARD32 *shaBase, *shaLine, *sha; FbStride shaStride; int scrBase, scrLine, scr; diff --git a/xserver/miext/shadow/shplanar8.c b/xserver/miext/shadow/shplanar8.c index 6d8defa58..f8b255d8f 100644 --- a/xserver/miext/shadow/shplanar8.c +++ b/xserver/miext/shadow/shplanar8.c @@ -95,8 +95,8 @@ shadowUpdatePlanar4x8 (ScreenPtr pScreen, { RegionPtr damage = shadowDamage (pBuf); PixmapPtr pShadow = pBuf->pPixmap; - int nbox = REGION_NUM_RECTS (damage); - BoxPtr pbox = REGION_RECTS (damage); + int nbox = RegionNumRects (damage); + BoxPtr pbox = RegionRects (damage); CARD32 *shaBase, *shaLine, *sha; CARD8 s1, s2, s3, s4; FbStride shaStride; diff --git a/xserver/miext/shadow/shrotate.c b/xserver/miext/shadow/shrotate.c index 673cd76b5..c3898266c 100644 --- a/xserver/miext/shadow/shrotate.c +++ b/xserver/miext/shadow/shrotate.c @@ -54,8 +54,8 @@ shadowUpdateRotatePacked (ScreenPtr pScreen, { RegionPtr damage = shadowDamage (pBuf); PixmapPtr pShadow = pBuf->pPixmap; - int nbox = REGION_NUM_RECTS (damage); - BoxPtr pbox = REGION_RECTS (damage); + int nbox = RegionNumRects (damage); + BoxPtr pbox = RegionRects (damage); FbBits *shaBits; FbStride shaStride; int shaBpp; diff --git a/xserver/miext/shadow/shrotpack.h b/xserver/miext/shadow/shrotpack.h index 015a98595..2d1a87c19 100644 --- a/xserver/miext/shadow/shrotpack.h +++ b/xserver/miext/shadow/shrotpack.h @@ -99,8 +99,8 @@ FUNC (ScreenPtr pScreen, { RegionPtr damage = shadowDamage (pBuf); PixmapPtr pShadow = pBuf->pPixmap; - int nbox = REGION_NUM_RECTS (damage); - BoxPtr pbox = REGION_RECTS (damage); + int nbox = RegionNumRects (damage); + BoxPtr pbox = RegionRects (damage); FbBits *shaBits; Data *shaBase, *shaLine, *sha; FbStride shaStride; diff --git a/xserver/miext/shadow/shrotpackYX.h b/xserver/miext/shadow/shrotpackYX.h index 8ef70f167..7d36bd1bd 100644 --- a/xserver/miext/shadow/shrotpackYX.h +++ b/xserver/miext/shadow/shrotpackYX.h @@ -63,8 +63,8 @@ FUNC (ScreenPtr pScreen, { RegionPtr damage = shadowDamage(pBuf); PixmapPtr pShadow = pBuf->pPixmap; - int nbox = REGION_NUM_RECTS (damage); - BoxPtr pbox = REGION_RECTS (damage); + int nbox = RegionNumRects (damage); + BoxPtr pbox = RegionRects (damage); FbBits *shaBits; Data *shaBase, *shaLine, *sha; FbStride shaStride, winStride; diff --git a/xserver/os/Makefile.in b/xserver/os/Makefile.in index 1ae10aaf0..7a9acd783 100644 --- a/xserver/os/Makefile.in +++ b/xserver/os/Makefile.in @@ -137,10 +137,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -228,6 +224,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -242,6 +240,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -259,10 +258,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -318,10 +321,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -339,17 +343,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -376,20 +374,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -481,6 +482,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/os/WaitFor.c b/xserver/os/WaitFor.c index dfe85e515..e66300490 100644 --- a/xserver/os/WaitFor.c +++ b/xserver/os/WaitFor.c @@ -431,7 +431,7 @@ TimerSet(OsTimerPtr timer, int flags, CARD32 millis, if (!timer) { - timer = xalloc(sizeof(struct _OsTimerRec)); + timer = malloc(sizeof(struct _OsTimerRec)); if (!timer) return NULL; } @@ -516,7 +516,7 @@ TimerFree(OsTimerPtr timer) if (!timer) return; TimerCancel(timer); - xfree(timer); + free(timer); } void @@ -536,7 +536,7 @@ TimerInit(void) while ((timer = timers)) { timers = timer->next; - xfree(timer); + free(timer); } } diff --git a/xserver/os/access.c b/xserver/os/access.c index 3572da0c9..027925927 100644 --- a/xserver/os/access.c +++ b/xserver/os/access.c @@ -215,11 +215,11 @@ static int ConvertAddr(struct sockaddr * /*saddr*/, pointer * /*addr*/); static int CheckAddr(int /*family*/, - pointer /*pAddr*/, + const void * /*pAddr*/, unsigned /*length*/); static Bool NewHost(int /*family*/, - pointer /*addr*/, + const void * /*addr*/, int /*len*/, int /* addingLocalHosts */); @@ -238,12 +238,12 @@ typedef struct _host { int requested; } HOST; -#define MakeHost(h,l) (h)=xalloc(sizeof *(h)+(l));\ +#define MakeHost(h,l) (h)=malloc(sizeof *(h)+(l));\ if (h) { \ (h)->addr=(unsigned char *) ((h) + 1);\ (h)->requested = FALSE; \ } -#define FreeHost(h) xfree(h) +#define FreeHost(h) free(h) static HOST *selfhosts = NULL; static HOST *validhosts = NULL; static int AccessEnabled = DEFAULT_ACCESS_CONTROL; @@ -311,7 +311,7 @@ ifioctl (int fd, int cmd, char *arg) struct strioctl ioc; int ret; - bzero((char *) &ioc, sizeof(ioc)); + memset((char *) &ioc, 0, sizeof(ioc)); ioc.ic_cmd = cmd; ioc.ic_timout = 0; if (cmd == SIOCGIFCONF) @@ -329,7 +329,7 @@ ifioctl (int fd, int cmd, char *arg) #ifdef SVR4 ((struct ifconf *) arg)->ifc_len = ioc.ic_len; #endif - return(ret); + return ret; } #else /* Case sun, SCO325 and others */ #define ifioctl ioctl @@ -587,7 +587,7 @@ DefineSelf (int fd) Error ("Getting interface count"); if (len < (ifn.lifn_count * sizeof(struct lifreq))) { len = ifn.lifn_count * sizeof(struct lifreq); - bufptr = xalloc(len); + bufptr = malloc(len); } #endif @@ -1038,7 +1038,7 @@ ResetHosts (char *display) len = sizeof(saddr.sa); if (ConvertAddr (&saddr.sa, &len, (pointer *)&addr) == FamilyDECnet) { - bzero ((char *) &dnaddr, sizeof (dnaddr)); + memset((char *) &dnaddr, 0, sizeof (dnaddr)); dnaddr.a_len = np->n_length; acopy (np->n_addr, dnaddr.a_addr, np->n_length); dnaddrp = &dnaddr; @@ -1123,6 +1123,11 @@ Bool LocalClient(ClientPtr client) pointer addr; register HOST *host; + if (!client->osPrivate) + return FALSE; + if (!((OsCommPtr)client->osPrivate)->trans_conn) + return FALSE; + if (!_XSERVTransGetPeerAddr (((OsCommPtr)client->osPrivate)->trans_conn, ¬used, &alen, &from)) { @@ -1130,12 +1135,12 @@ Bool LocalClient(ClientPtr client) &alen, (pointer *)&addr); if (family == -1) { - xfree (from); + free(from); return FALSE; } if (family == FamilyLocal) { - xfree (from); + free(from); return TRUE; } for (host = selfhosts; host; host = host->next) @@ -1143,7 +1148,7 @@ Bool LocalClient(ClientPtr client) if (addrEqual (family, addr, alen, host)) return TRUE; } - xfree (from); + free(from); } return FALSE; } @@ -1213,7 +1218,7 @@ GetLocalClientCreds(ClientPtr client, LocalClientCredRec **lccp) } #endif - *lccp = Xcalloc(sizeof(LocalClientCredRec)); + *lccp = calloc(1, sizeof(LocalClientCredRec)); if (*lccp == NULL) return -1; lcc = *lccp; @@ -1249,7 +1254,7 @@ GetLocalClientCreds(ClientPtr client, LocalClientCredRec **lccp) #endif lcc->nSuppGids = ucred_getgroups(peercred, &gids); if (lcc->nSuppGids > 0) { - lcc->pSuppGids = Xcalloc((lcc->nSuppGids) * sizeof(int)); + lcc->pSuppGids = calloc(lcc->nSuppGids, sizeof(int)); if (lcc->pSuppGids == NULL) { lcc->nSuppGids = 0; } else { @@ -1286,9 +1291,9 @@ FreeLocalClientCreds(LocalClientCredRec *lcc) { if (lcc != NULL) { if (lcc->nSuppGids > 0) { - Xfree(lcc->pSuppGids); + free(lcc->pSuppGids); } - Xfree(lcc); + free(lcc); } } @@ -1315,7 +1320,7 @@ int AddHost (ClientPtr client, int family, unsigned length, /* of bytes in pAddr */ - pointer pAddr) + const void * pAddr) { int rc, len; @@ -1343,13 +1348,13 @@ AddHost (ClientPtr client, if ((len = CheckAddr (family, pAddr, length)) < 0) { client->errorValue = length; - return (BadValue); + return BadValue; } break; case FamilyLocal: default: client->errorValue = family; - return (BadValue); + return BadValue; } if (NewHost (family, pAddr, len, FALSE)) return Success; @@ -1376,7 +1381,7 @@ ForEachHostInFamily (int family, * called when starting or resetting the server */ static Bool NewHost (int family, - pointer addr, + const void * addr, int len, int addingLocalHosts) { @@ -1441,13 +1446,13 @@ RemoveHost ( if ((len = CheckAddr (family, pAddr, length)) < 0) { client->errorValue = length; - return(BadValue); + return BadValue; } break; case FamilyLocal: default: client->errorValue = family; - return(BadValue); + return BadValue; } for (prev = &validhosts; (host = *prev) && (!addrEqual (family, pAddr, len, host)); @@ -1458,7 +1463,7 @@ RemoveHost ( *prev = host->next; FreeHost (host); } - return (Success); + return Success; } /* Get all hosts in the access control list */ @@ -1483,10 +1488,10 @@ GetHosts ( } if (n) { - *data = ptr = xalloc (n); + *data = ptr = malloc(n); if (!ptr) { - return(BadAlloc); + return BadAlloc; } for (host = validhosts; host; host = host->next) { @@ -1502,7 +1507,7 @@ GetHosts ( } *pnHosts = nHosts; *pLen = n; - return(Success); + return Success; } /* Check for valid address family and length, and return address length. */ @@ -1511,7 +1516,7 @@ GetHosts ( static int CheckAddr ( int family, - pointer pAddr, + const void * pAddr, unsigned length) { int len; @@ -1555,7 +1560,7 @@ CheckAddr ( default: len = -1; } - return (len); + return len; } /* Check if a host is not in the access control list. @@ -1572,7 +1577,7 @@ InvalidHost ( register HOST *selfhost, *host; if (!AccessEnabled) /* just let them in */ - return(0); + return 0; family = ConvertAddr (saddr, &len, (pointer *)&addr); if (family == -1) return 1; @@ -1600,15 +1605,15 @@ InvalidHost ( { if ((host->family == FamilyServerInterpreted)) { if (siAddrMatch (family, addr, len, host, client)) { - return (0); + return 0; } } else { if (addrEqual (family, addr, len, host)) - return (0); + return 0; } } - return (1); + return 1; } static int @@ -1618,7 +1623,7 @@ ConvertAddr ( pointer *addr) { if (*len == 0) - return (FamilyLocal); + return FamilyLocal; switch (saddr->sa_family) { case AF_UNSPEC: @@ -1742,7 +1747,7 @@ siTypeAdd(const char *typeName, siAddrMatchFunc addrMatch, } } - s = xalloc(sizeof(struct siType)); + s = malloc(sizeof(struct siType)); if (s == NULL) return BadAlloc; @@ -2084,7 +2089,7 @@ static Bool siLocalCredGetId(const char *addr, int len, siLocalCredPrivPtr lcPriv, int *id) { Bool parsedOK = FALSE; - char *addrbuf = xalloc(len + 1); + char *addrbuf = malloc(len + 1); if (addrbuf == NULL) { return FALSE; @@ -2118,7 +2123,7 @@ siLocalCredGetId(const char *addr, int len, siLocalCredPrivPtr lcPriv, int *id) } } - xfree(addrbuf); + free(addrbuf); return parsedOK; } diff --git a/xserver/os/auth.c b/xserver/os/auth.c index a852e1c3b..768575139 100644 --- a/xserver/os/auth.c +++ b/xserver/os/auth.c @@ -159,9 +159,9 @@ RegisterAuthorizations (void) XID CheckAuthorization ( unsigned int name_length, - char *name, + const char *name, unsigned int data_length, - char *data, + const char *data, ClientPtr client, char **reason) /* failure message. NULL for default msg */ { @@ -256,9 +256,9 @@ AuthorizationFromID ( int RemoveAuthorization ( unsigned short name_length, - char *name, + const char *name, unsigned short data_length, - char *data) + const char *data) { int i; @@ -274,7 +274,8 @@ RemoveAuthorization ( } int -AddAuthorization (unsigned name_length, char *name, unsigned data_length, char *data) +AddAuthorization (unsigned name_length, const char *name, + unsigned data_length, char *data) { int i; @@ -294,9 +295,9 @@ AddAuthorization (unsigned name_length, char *name, unsigned data_length, char * 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) { diff --git a/xserver/os/connection.c b/xserver/os/connection.c index 37dd399a1..6f7981bac 100644 --- a/xserver/os/connection.c +++ b/xserver/os/connection.c @@ -183,7 +183,7 @@ struct _ct_node *ct_head[256]; void InitConnectionTranslation(void) { - bzero(ct_head, sizeof(ct_head)); + memset(ct_head, 0, sizeof(ct_head)); } int GetConnectionTranslation(int conn) @@ -226,7 +226,7 @@ void SetConnectionTranslation(int conn, int client) } node = &((*node)->next); } - *node = xalloc(sizeof(struct _ct_node)); + *node = malloc(sizeof(struct _ct_node)); (*node)->next = NULL; (*node)->key = conn; (*node)->value = client; @@ -244,7 +244,7 @@ void ClearConnectionTranslation(void) { struct _ct_node *temp = node; node = node->next; - xfree(temp); + free(temp); } } } @@ -267,7 +267,7 @@ lookup_trans_conn (int fd) return ListenTransConns[i]; } - return (NULL); + return NULL; } /* Set MaxClients and lastfdesc, and allocate ConnectionTranslation */ @@ -401,7 +401,7 @@ CreateWellKnownSockets(void) } else { - ListenTransFds = xalloc (ListenTransCount * sizeof (int)); + ListenTransFds = malloc(ListenTransCount * sizeof (int)); for (i = 0; i < ListenTransCount; i++) { @@ -683,7 +683,7 @@ ClientAuthorized(ClientPtr client, proto_n, auth_proto, auth_id); } - xfree (from); + free(from); } if (auth_id == (XID) ~0L) { @@ -705,7 +705,7 @@ ClientAuthorized(ClientPtr client, AuthAudit(client, TRUE, (struct sockaddr *) from, fromlen, proto_n, auth_proto, auth_id); - xfree (from); + free(from); } } priv->auth_id = auth_id; @@ -741,7 +741,7 @@ AllocNewConnection (XtransConnInfo trans_conn, int fd, CARD32 conn_time) #endif ) return NullClient; - oc = xalloc(sizeof(OsCommRec)); + oc = malloc(sizeof(OsCommRec)); if (!oc) return NullClient; oc->trans_conn = trans_conn; @@ -752,7 +752,7 @@ AllocNewConnection (XtransConnInfo trans_conn, int fd, CARD32 conn_time) oc->conn_time = conn_time; if (!(client = NextAvailableClient((pointer)oc))) { - xfree (oc); + free(oc); return NullClient; } #if !defined(WIN32) @@ -1037,6 +1037,9 @@ CloseDownConnection(ClientPtr client) { OsCommPtr oc = (OsCommPtr)client->osPrivate; + if (FlushCallback) + CallCallbacks(&FlushCallback, NULL); + if (oc->output && oc->output->count) FlushClient(client, oc, (char *)NULL, 0); #ifdef XDMCP @@ -1044,7 +1047,7 @@ CloseDownConnection(ClientPtr client) #endif CloseDownFileDescriptor(oc); FreeOsBuffers(oc); - xfree(client->osPrivate); + free(client->osPrivate); client->osPrivate = (pointer)NULL; if (auditTrailLevel > 1) AuditF("client %d disconnected\n", client->index); @@ -1151,6 +1154,10 @@ IgnoreClient (ClientPtr client) OsCommPtr oc = (OsCommPtr)client->osPrivate; int connection = oc->fd; + client->ignoreCount++; + if (client->ignoreCount > 1) + return; + isItTimeToYield = TRUE; if (!GrabInProgress || FD_ISSET(connection, &AllClients)) { @@ -1185,6 +1192,11 @@ AttendClient (ClientPtr client) { OsCommPtr oc = (OsCommPtr)client->osPrivate; int connection = oc->fd; + + client->ignoreCount--; + if (client->ignoreCount) + return; + if (!GrabInProgress || GrabInProgress == client->index || FD_ISSET(connection, &GrabImperviousClients)) { @@ -1280,8 +1292,8 @@ void ListenOnOpenFD(int fd, int noxauth) { ciptr->flags = ciptr->flags | TRANS_NOXAUTH; /* Allocate space to store it */ - ListenTransFds = (int *) xrealloc(ListenTransFds, (ListenTransCount + 1) * sizeof (int)); - ListenTransConns = (XtransConnInfo *) xrealloc(ListenTransConns, (ListenTransCount + 1) * sizeof (XtransConnInfo)); + ListenTransFds = (int *) realloc(ListenTransFds, (ListenTransCount + 1) * sizeof (int)); + ListenTransConns = (XtransConnInfo *) realloc(ListenTransConns, (ListenTransCount + 1) * sizeof (XtransConnInfo)); /* Store it */ ListenTransConns[ListenTransCount] = ciptr; diff --git a/xserver/os/io.c b/xserver/os/io.c index 64b64ae75..fb9f76207 100644 --- a/xserver/os/io.c +++ b/xserver/os/io.c @@ -215,8 +215,8 @@ ReadRequestFromClient(ClientPtr client) register ConnectionInputPtr aci = AvailableInput->input; if (aci->size > BUFWATERMARK) { - xfree(aci->buffer); - xfree(aci); + free(aci->buffer); + free(aci); } else { @@ -251,7 +251,14 @@ ReadRequestFromClient(ClientPtr client) need_header = FALSE; move_header = FALSE; gotnow = oci->bufcnt + oci->buffer - oci->bufptr; - if (gotnow < sizeof(xReq)) + + if (oci->ignoreBytes > 0) { + if (oci->ignoreBytes > oci->size) + needed = oci->size; + else + needed = oci->ignoreBytes; + } + else if (gotnow < sizeof(xReq)) { /* We don't have an entire xReq yet. Can't tell how big * the request will be until we get the whole xReq. @@ -294,8 +301,13 @@ ReadRequestFromClient(ClientPtr client) if (needed > maxBigRequestSize << 2) { /* request is too big for us to handle */ - YieldControlDeath(); - return -1; + /* + * Mark the rest of it as needing to be ignored, and then return + * the full size. Dispatch() will turn it into a BadLength error. + */ + oci->ignoreBytes = needed - gotnow; + oci->lenLastReq = gotnow; + return needed; } if ((gotnow == 0) || ((oci->bufptr - oci->buffer + needed) > oci->size)) @@ -310,7 +322,7 @@ ReadRequestFromClient(ClientPtr client) /* make buffer bigger to accomodate request */ char *ibuf; - ibuf = (char *)xrealloc(oci->buffer, needed); + ibuf = (char *)realloc(oci->buffer, needed); if (!ibuf) { YieldControlDeath(); @@ -360,7 +372,7 @@ ReadRequestFromClient(ClientPtr client) { char *ibuf; - ibuf = (char *)xrealloc(oci->buffer, BUFSIZE); + ibuf = (char *)realloc(oci->buffer, BUFSIZE); if (ibuf) { oci->size = BUFSIZE; @@ -400,6 +412,14 @@ ReadRequestFromClient(ClientPtr client) } oci->lenLastReq = needed; + /* If there are bytes to ignore, ignore them now. */ + + if (oci->ignoreBytes > 0) { + assert(needed == oci->ignoreBytes || needed == oci->size); + oci->ignoreBytes -= gotnow; + needed = gotnow = 0; + } + /* * Check to see if client has at least one whole request in the * buffer beyond the request we're returning to the caller. @@ -479,8 +499,8 @@ InsertFakeRequest(ClientPtr client, char *data, int count) ConnectionInputPtr aci = AvailableInput->input; if (aci->size > BUFWATERMARK) { - xfree(aci->buffer); - xfree(aci); + free(aci->buffer); + free(aci); } else { @@ -506,9 +526,9 @@ InsertFakeRequest(ClientPtr client, char *data, int count) { char *ibuf; - ibuf = (char *)xrealloc(oci->buffer, gotnow + count); + ibuf = (char *)realloc(oci->buffer, gotnow + count); if (!ibuf) - return(FALSE); + return FALSE; oci->size = gotnow + count; oci->buffer = ibuf; oci->bufptr = ibuf + oci->bufcnt - gotnow; @@ -529,7 +549,7 @@ InsertFakeRequest(ClientPtr client, char *data, int count) FD_SET(fd, &ClientsWithInput); else YieldControlNoInput(fd); - return(TRUE); + return TRUE; } /***************************************************************** @@ -698,15 +718,17 @@ SetCriticalOutputPending(void) int WriteToClient (ClientPtr who, int count, const void *__buf) { - OsCommPtr oc = (OsCommPtr)who->osPrivate; - ConnectionOutputPtr oco = oc->output; + OsCommPtr oc; + ConnectionOutputPtr oco; int padBytes; const char *buf = __buf; #ifdef DEBUG_COMMUNICATION Bool multicount = FALSE; #endif - if (!count) - return(0); + if (!count || !who || who == serverClient || who->clientGone) + return 0; + oc = who->osPrivate; + oco = oc->output; #ifdef DEBUG_COMMUNICATION { char info[128]; @@ -817,6 +839,10 @@ WriteToClient (ClientPtr who, int count, const void *__buf) CriticalOutputPending = FALSE; NewOutputPending = FALSE; } + + if (FlushCallback) + CallCallbacks(&FlushCallback, NULL); + return FlushClient(who, oc, buf, count); } @@ -824,7 +850,7 @@ WriteToClient (ClientPtr who, int count, const void *__buf) FD_SET(oc->fd, &OutputPending); memmove((char *)oco->buf + oco->count, buf, count); oco->count += count + padBytes; - return(count); + return count; } /******************** @@ -937,7 +963,7 @@ FlushClient(ClientPtr who, OsCommPtr oc, const void *__extraBuf, int extraCount) { unsigned char *obuf; - obuf = (unsigned char *)xrealloc(oco->buf, + obuf = (unsigned char *)realloc(oco->buf, notWritten + BUFSIZE); if (!obuf) { @@ -946,7 +972,7 @@ FlushClient(ClientPtr who, OsCommPtr oc, const void *__extraBuf, int extraCount) oc->trans_conn = NULL; MarkClientException(who); oco->count = 0; - return(-1); + return -1; } oco->size = notWritten + BUFSIZE; oco->buf = obuf; @@ -979,7 +1005,7 @@ FlushClient(ClientPtr who, OsCommPtr oc, const void *__extraBuf, int extraCount) } MarkClientException(who); oco->count = 0; - return(-1); + return -1; } } @@ -994,8 +1020,8 @@ FlushClient(ClientPtr who, OsCommPtr oc, const void *__extraBuf, int extraCount) } if (oco->size > BUFWATERMARK) { - xfree(oco->buf); - xfree(oco); + free(oco->buf); + free(oco); } else { @@ -1011,19 +1037,20 @@ AllocateInputBuffer(void) { ConnectionInputPtr oci; - oci = xalloc(sizeof(ConnectionInput)); + oci = malloc(sizeof(ConnectionInput)); if (!oci) return NULL; - oci->buffer = xalloc(BUFSIZE); + oci->buffer = malloc(BUFSIZE); if (!oci->buffer) { - xfree(oci); + free(oci); return NULL; } oci->size = BUFSIZE; oci->bufptr = oci->buffer; oci->bufcnt = 0; oci->lenLastReq = 0; + oci->ignoreBytes = 0; return oci; } @@ -1032,13 +1059,13 @@ AllocateOutputBuffer(void) { ConnectionOutputPtr oco; - oco = xalloc(sizeof(ConnectionOutput)); + oco = malloc(sizeof(ConnectionOutput)); if (!oco) return NULL; - oco->buf = xcalloc(1, BUFSIZE); + oco->buf = calloc(1, BUFSIZE); if (!oco->buf) { - xfree(oco); + free(oco); return NULL; } oco->size = BUFSIZE; @@ -1058,8 +1085,8 @@ FreeOsBuffers(OsCommPtr oc) { if (FreeInputs) { - xfree(oci->buffer); - xfree(oci); + free(oci->buffer); + free(oci); } else { @@ -1074,8 +1101,8 @@ FreeOsBuffers(OsCommPtr oc) { if (FreeOutputs) { - xfree(oco->buf); - xfree(oco); + free(oco->buf); + free(oco); } else { @@ -1095,13 +1122,13 @@ ResetOsBuffers(void) while ((oci = FreeInputs)) { FreeInputs = oci->next; - xfree(oci->buffer); - xfree(oci); + free(oci->buffer); + free(oci); } while ((oco = FreeOutputs)) { FreeOutputs = oco->next; - xfree(oco->buf); - xfree(oco); + free(oco->buf); + free(oco); } } diff --git a/xserver/os/log.c b/xserver/os/log.c index d4455fddf..e5eae148b 100644 --- a/xserver/os/log.c +++ b/xserver/os/log.c @@ -228,7 +228,7 @@ LogInit(const char *fname, const char *backup) * needed. */ if (saveBuffer && bufferSize > 0) { - free(saveBuffer); /* Must be free(), not xfree() */ + free(saveBuffer); /* Must be free(), not free() */ saveBuffer = NULL; bufferSize = 0; } @@ -305,8 +305,7 @@ LogVWrite(int verb, const char *f, va_list args) } else if (needBuffer) { /* * Note, this code is used before OsInit() has been called, so - * xalloc() and friends can't be used. - * And it should not be called inside a signal handler. + * malloc() and friends can't be used. */ if (len > bufferUnused) { bufferSize += 1024; @@ -411,9 +410,8 @@ LogMessage(MessageType type, const char *format, ...) va_end(ap); } -#ifdef __GNUC__ -void AbortServer(void) __attribute__((noreturn)); -#endif +void +AbortServer(void) _X_NORETURN; void AbortServer(void) diff --git a/xserver/os/mitauth.c b/xserver/os/mitauth.c index a7968cbd7..4b8f6e978 100644 --- a/xserver/os/mitauth.c +++ b/xserver/os/mitauth.c @@ -50,17 +50,17 @@ static struct auth { int MitAddCookie ( unsigned short data_length, - char *data, + const char *data, XID id) { struct auth *new; - new = xalloc (sizeof (struct auth)); + new = malloc(sizeof (struct auth)); if (!new) return 0; - new->data = xalloc ((unsigned) data_length); + new->data = malloc((unsigned) data_length); if (!new->data) { - xfree(new); + free(new); return 0; } new->next = mit_auth; @@ -74,7 +74,7 @@ MitAddCookie ( XID MitCheckCookie ( unsigned short data_length, - char *data, + const char *data, ClientPtr client, char **reason) { @@ -96,8 +96,8 @@ MitResetCookie (void) for (auth = mit_auth; auth; auth=next) { next = auth->next; - xfree (auth->data); - xfree (auth); + free(auth->data); + free(auth); } mit_auth = 0; return 0; @@ -139,7 +139,7 @@ MitFromID ( int MitRemoveCookie ( unsigned short data_length, - char *data) + const char *data) { struct auth *auth, *prev; @@ -152,8 +152,8 @@ MitRemoveCookie ( prev->next = auth->next; else mit_auth = auth->next; - xfree (auth->data); - xfree (auth); + free(auth->data); + free(auth); return 1; } } @@ -167,7 +167,7 @@ static char cookie[16]; /* 128 bits */ XID MitGenerateCookie ( unsigned data_length, - char *data, + const char *data, XID id, unsigned *data_length_return, char **data_return) diff --git a/xserver/os/osdep.h b/xserver/os/osdep.h index 7b1c69995..3c0e78f06 100644 --- a/xserver/os/osdep.h +++ b/xserver/os/osdep.h @@ -114,7 +114,8 @@ SOFTWARE. #if defined(XDMCP) || defined(HASXDMAUTH) typedef Bool (*ValidatorFunc)(ARRAY8Ptr Auth, ARRAY8Ptr Data, int packet_type); typedef Bool (*GeneratorFunc)(ARRAY8Ptr Auth, ARRAY8Ptr Data, int packet_type); -typedef Bool (*AddAuthorFunc)(unsigned name_length, char *name, unsigned data_length, char *data); +typedef Bool (*AddAuthorFunc)(unsigned name_length, const char *name, + unsigned data_length, char *data); #endif typedef struct _connectionInput { @@ -124,6 +125,7 @@ typedef struct _connectionInput { int bufcnt; /* count of bytes in buffer */ int lenLastReq; int size; + unsigned int ignoreBytes; /* bytes to ignore before the next request */ } ConnectionInput, *ConnectionInputPtr; typedef struct _connectionOutput { @@ -138,19 +140,19 @@ struct _osComm; #define AuthInitArgs void typedef void (*AuthInitFunc) (AuthInitArgs); -#define AuthAddCArgs unsigned short data_length, char *data, XID id +#define AuthAddCArgs unsigned short data_length, const char *data, XID id typedef int (*AuthAddCFunc) (AuthAddCArgs); -#define AuthCheckArgs unsigned short data_length, char *data, ClientPtr client, char **reason +#define AuthCheckArgs unsigned short data_length, const char *data, ClientPtr client, char **reason typedef XID (*AuthCheckFunc) (AuthCheckArgs); #define AuthFromIDArgs XID id, unsigned short *data_lenp, char **datap typedef int (*AuthFromIDFunc) (AuthFromIDArgs); -#define AuthGenCArgs unsigned data_length, char *data, XID id, unsigned *data_length_return, char **data_return +#define AuthGenCArgs unsigned data_length, const char *data, XID id, unsigned *data_length_return, char **data_return typedef XID (*AuthGenCFunc) (AuthGenCArgs); -#define AuthRemCArgs unsigned short data_length, char *data +#define AuthRemCArgs unsigned short data_length, const char *data typedef int (*AuthRemCFunc) (AuthRemCArgs); #define AuthRstCArgs void @@ -254,29 +256,29 @@ extern void XdmcpUseMsg (void); extern int XdmcpOptions(int argc, char **argv, int i); extern void XdmcpRegisterConnection ( int type, - char *address, + const char *address, int addrlen); extern void XdmcpRegisterAuthorizations (void); -extern void XdmcpRegisterAuthorization (char *name, int namelen); +extern void XdmcpRegisterAuthorization (const char *name, int namelen); extern void XdmcpInit (void); extern void XdmcpReset (void); extern void XdmcpOpenDisplay(int sock); extern void XdmcpCloseDisplay(int sock); extern void XdmcpRegisterAuthentication ( - char *name, + const char *name, int namelen, - char *data, + const char *data, int datalen, ValidatorFunc Validator, GeneratorFunc Generator, AddAuthorFunc AddAuth); struct sockaddr_in; -extern void XdmcpRegisterBroadcastAddress (struct sockaddr_in *addr); +extern void XdmcpRegisterBroadcastAddress (const struct sockaddr_in *addr); #endif #ifdef HASXDMAUTH -extern void XdmAuthenticationInit (char *cookie, int cookie_length); +extern void XdmAuthenticationInit (const char *cookie, int cookie_length); #endif #endif /* _OSDEP_H_ */ diff --git a/xserver/os/osinit.c b/xserver/os/osinit.c index b85fa73b7..0da2cad45 100644 --- a/xserver/os/osinit.c +++ b/xserver/os/osinit.c @@ -161,7 +161,6 @@ void OsInit(void) { static Bool been_here = FALSE; - static char* admpath = ADMPATH; static char* devnull = "/dev/null"; char fname[PATH_MAX]; @@ -229,8 +228,8 @@ OsInit(void) { FILE *err; - if (strlen (display) + strlen (admpath) + 1 < sizeof fname) - snprintf (fname, sizeof(fname), admpath, display); + if (strlen (display) + strlen (ADMPATH) + 1 < sizeof fname) + snprintf (fname, sizeof(fname), ADMPATH, display); else strlcpy (fname, devnull, sizeof(fname)); /* diff --git a/xserver/os/privsep.c b/xserver/os/privsep.c index 89fc4824a..cdbd8f6cf 100644 --- a/xserver/os/privsep.c +++ b/xserver/os/privsep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: privsep.c,v 1.14 2009/09/08 19:52:26 matthieu Exp $ */ +/* $OpenBSD: privsep.c,v 1.15 2010/12/05 15:36:10 matthieu Exp $ */ /* * Copyright 2001 Niels Provos * All rights reserved. @@ -298,7 +298,6 @@ priv_init(uid_t uid, gid_t gid) int priv_open_device(const char *path) { - struct okdev *dev; priv_cmd_t cmd; if (priv_fd != -1) { @@ -306,13 +305,8 @@ priv_open_device(const char *path) strlcpy(cmd.arg.open.path, path, MAXPATHLEN); write(priv_fd, &cmd, sizeof(cmd)); return receive_fd(priv_fd); - } else if ((dev = open_ok(path)) != NULL) { - return open(path, dev->flags); - } else { - errno = EPERM; - return -1; - } - /* NOTREACHED */ + } else + return open(path, O_RDWR | O_NONBLOCK | O_EXCL); } /* send signal to parent process */ diff --git a/xserver/os/rpcauth.c b/xserver/os/rpcauth.c index 935d1b1d0..f0bd2f615 100644 --- a/xserver/os/rpcauth.c +++ b/xserver/os/rpcauth.c @@ -55,7 +55,7 @@ extern bool_t xdr_opaque_auth(XDR *, struct opaque_auth *); static enum auth_stat why; static char * -authdes_ezdecode(char *inmsg, int len) +authdes_ezdecode(const char *inmsg, int len) { struct rpc_msg msg; char cred_area[MAX_AUTH_BYTES]; @@ -66,7 +66,7 @@ authdes_ezdecode(char *inmsg, int len) XDR xdr; SVCXPRT xprt; - temp_inmsg = xalloc(len); + temp_inmsg = malloc(len); memmove(temp_inmsg, inmsg, len); memset((char *)&msg, 0, sizeof(msg)); @@ -79,7 +79,7 @@ authdes_ezdecode(char *inmsg, int len) why = AUTH_FAILED; xdrmem_create(&xdr, temp_inmsg, len, XDR_DECODE); - if ((r.rq_clntcred = xalloc(MAX_AUTH_BYTES)) == NULL) + if ((r.rq_clntcred = malloc(MAX_AUTH_BYTES)) == NULL) goto bad1; r.rq_xprt = &xprt; @@ -106,7 +106,7 @@ authdes_ezdecode(char *inmsg, int len) return (((struct authdes_cred *) r.rq_clntcred)->adc_fullname.name); bad2: - xfree(r.rq_clntcred); + free(r.rq_clntcred); bad1: return ((char *)0); /* ((struct authdes_cred *) NULL); */ } @@ -127,7 +127,7 @@ CheckNetName ( static char rpc_error[MAXNETNAMELEN+50]; _X_HIDDEN XID -SecureRPCCheck (unsigned short data_length, char *data, +SecureRPCCheck (unsigned short data_length, const char *data, ClientPtr client, char **reason) { char *fullname; @@ -160,7 +160,7 @@ SecureRPCInit (void) } _X_HIDDEN int -SecureRPCAdd (unsigned short data_length, char *data, XID id) +SecureRPCAdd (unsigned short data_length, const char *data, XID id) { if (data_length) AddHost ((pointer) 0, FamilyNetname, data_length, data); @@ -188,7 +188,7 @@ SecureRPCFromID (XID id, unsigned short *data_lenp, char **datap) } _X_HIDDEN int -SecureRPCRemove (unsigned short data_length, char *data) +SecureRPCRemove (unsigned short data_length, const char *data) { return 0; } diff --git a/xserver/os/strcasecmp.c b/xserver/os/strcasecmp.c index ca1051dc1..ad6da6a10 100644 --- a/xserver/os/strcasecmp.c +++ b/xserver/os/strcasecmp.c @@ -42,7 +42,7 @@ xstrcasecmp(const char *str1, const char *str2) while (tolower(*us1) == tolower(*us2)) { if (*us1++ == '\0') - return (0); + return 0; us2++; } diff --git a/xserver/os/strcasestr.c b/xserver/os/strcasestr.c index b3d45495c..f89b2f2dc 100644 --- a/xserver/os/strcasestr.c +++ b/xserver/os/strcasestr.c @@ -54,7 +54,7 @@ xstrcasestr(const char *s, const char *find) do { do { if ((sc = *s++) == 0) - return (NULL); + return NULL; } while ((char)tolower((unsigned char)sc) != c); } while (strncasecmp(s, find, len) != 0); s--; diff --git a/xserver/os/strlcpy.c b/xserver/os/strlcpy.c index aa9d042e0..e8e1b0217 100644 --- a/xserver/os/strlcpy.c +++ b/xserver/os/strlcpy.c @@ -50,5 +50,5 @@ strlcpy(char *dst, const char *src, size_t siz) ; } - return(s - src - 1); /* count does not include NUL */ + return s - src - 1; /* count does not include NUL */ } diff --git a/xserver/os/utils.c b/xserver/os/utils.c index a635c0528..c1836ac84 100644 --- a/xserver/os/utils.c +++ b/xserver/os/utils.c @@ -120,9 +120,7 @@ __stdcall unsigned long GetTickCount(void); #include "xkbsrv.h" -#ifdef RENDER #include "picture.h" -#endif Bool noTestExtensions; #ifdef COMPOSITE @@ -148,15 +146,10 @@ Bool noScreenSaverExtension = FALSE; #ifdef MITSHM Bool noMITShmExtension = FALSE; #endif -#ifdef MULTIBUFFER -Bool noMultibufferExtension = FALSE; -#endif #ifdef RANDR Bool noRRExtension = FALSE; #endif -#ifdef RENDER Bool noRenderExtension = FALSE; -#endif #ifdef XCSECURITY Bool noSecurityExtension = FALSE; #endif @@ -212,8 +205,6 @@ int auditTrailLevel = 1; #define HAS_SAVED_IDS_AND_SETEUID #endif -static char *dev_tty_from_init = NULL; /* since we need to parse it anyway */ - OsSigHandlerPtr OsSignal(int sig, OsSigHandlerPtr handler) { @@ -535,9 +526,7 @@ void UseMsg(void) ErrorF("-nopn reject failure to listen on all ports\n"); ErrorF("-r turns off auto-repeat\n"); ErrorF("r turns on auto-repeat \n"); -#ifdef RENDER ErrorF("-render [default|mono|gray|color] set render color alloc policy\n"); -#endif #ifndef __OpenBSD__ ErrorF("-retro start with classic stipple and cursor\n"); #else @@ -579,12 +568,12 @@ void UseMsg(void) static int VerifyDisplayName(const char *d) { - if ( d == (char *)0 ) return( 0 ); /* null */ - if ( *d == '\0' ) return( 0 ); /* empty */ - if ( *d == '-' ) return( 0 ); /* could be confused for an option */ - if ( *d == '.' ) return( 0 ); /* must not equal "." or ".." */ - if ( strchr(d, '/') != (char *)0 ) return( 0 ); /* very important!!! */ - return( 1 ); + if ( d == (char *)0 ) return 0; /* null */ + if ( *d == '\0' ) return 0; /* empty */ + if ( *d == '-' ) return 0; /* could be confused for an option */ + if ( *d == '.' ) return 0; /* must not equal "." or ".." */ + if ( strchr(d, '/') != (char *)0 ) return 0; /* very important!!! */ + return 1; } /* @@ -915,8 +904,7 @@ ProcessCommandLine(int argc, char *argv[]) } else if (strncmp (argv[i], "tty", 3) == 0) { - /* just in case any body is interested */ - dev_tty_from_init = argv[i]; + /* init supplies us with this useless information */ } #ifdef XDMCP else if ((skip = XdmcpOptions(argc, argv, i)) != i) @@ -947,7 +935,6 @@ ProcessCommandLine(int argc, char *argv[]) else UseMsg(); } -#ifdef RENDER else if ( strcmp( argv[i], "-render" ) == 0) { if (++i < argc) @@ -962,7 +949,6 @@ ProcessCommandLine(int argc, char *argv[]) else UseMsg (); } -#endif else if ( strcmp( argv[i], "+extension") == 0) { if (++i < argc) @@ -1017,7 +1003,7 @@ set_font_authorizations(char **authorizations, int *authlen, pointer client) gethostname(hname, 1024); #if defined(IPv6) && defined(AF_INET6) - bzero(&hints, sizeof(hints)); + memset(&hints, 0, sizeof(hints)); hints.ai_flags = AI_CANONNAME; if (getaddrinfo(hname, NULL, &hints, &ai) == 0) { hnameptr = ai->ai_canonname; @@ -1033,7 +1019,7 @@ set_font_authorizations(char **authorizations, int *authlen, pointer client) #endif len = strlen(hnameptr) + 1; - result = xalloc(len + sizeof(AUTHORIZATION_NAME) + 4); + result = malloc(len + sizeof(AUTHORIZATION_NAME) + 4); p = result; *p++ = sizeof(AUTHORIZATION_NAME) >> 8; @@ -1062,150 +1048,99 @@ set_font_authorizations(char **authorizations, int *authlen, pointer client) void * Xalloc(unsigned long amount) { - void *ptr; + /* + * Xalloc used to return NULL when large amount of memory is requested. In + * order to catch the buggy callers this warning has been added, slated to + * removal by anyone who touches this code (or just looks at it) in 2011. + * + * -- Mikhail Gusarov + */ + if ((long)amount <= 0) + ErrorF("Warning: Xalloc: " + "requesting unpleasantly large amount of memory: %lu bytes.\n", + amount); - if ((long)amount <= 0) { - return NULL; - } - /* aligned extra on long word boundary */ - amount = (amount + (sizeof(long) - 1)) & ~(sizeof(long) - 1); - ptr = malloc(amount); - return ptr; + return malloc(amount); } -/***************** - * XNFalloc - * "no failure" realloc - *****************/ - void * XNFalloc(unsigned long amount) { - void *ptr; - - if ((long)amount <= 0) - return NULL; - /* aligned extra on long word boundary */ - amount = (amount + (sizeof(long) - 1)) & ~(sizeof(long) - 1); - ptr = malloc(amount); + void *ptr = malloc(amount); if (!ptr) FatalError("Out of memory"); return ptr; } -/***************** - * Xcalloc - *****************/ - void * Xcalloc(unsigned long amount) { - void *ret; - - ret = Xalloc (amount); - if (ret) - bzero (ret, (int) amount); - return ret; + return calloc(1, amount); } -/***************** - * XNFcalloc - *****************/ - void * XNFcalloc(unsigned long amount) { - void *ret; - - ret = Xalloc (amount); - if (ret) - bzero (ret, (int) amount); - else if ((long)amount > 0) - FatalError("Out of memory"); + void *ret = calloc(1, amount); + if (!ret) + FatalError("XNFcalloc: Out of memory"); return ret; } -/***************** - * Xrealloc - *****************/ - void * -Xrealloc(pointer ptr, unsigned long amount) +Xrealloc(void *ptr, unsigned long amount) { + /* + * Xrealloc used to return NULL when large amount of memory is requested. In + * order to catch the buggy callers this warning has been added, slated to + * removal by anyone who touches this code (or just looks at it) in 2011. + * + * -- Mikhail Gusarov + */ if ((long)amount <= 0) - { - if (ptr && !amount) - free(ptr); - return NULL; - } - amount = (amount + (sizeof(long) - 1)) & ~(sizeof(long) - 1); - if (ptr) - ptr = realloc(ptr, amount); - else - ptr = malloc(amount); + ErrorF("Warning: Xrealloc: " + "requesting unpleasantly large amount of memory: %lu bytes.\n", + amount); - return ptr; + return realloc(ptr, amount); } - -/***************** - * XNFrealloc - * "no failure" realloc - *****************/ void * -XNFrealloc(pointer ptr, unsigned long amount) +XNFrealloc(void *ptr, unsigned long amount) { - if ((ptr = Xrealloc(ptr, amount)) == NULL) - { - if ((long)amount > 0) - FatalError( "Out of memory" ); - } - return ptr; + void *ret = realloc(ptr, amount); + if (!ret) + FatalError("XNFrealloc: Out of memory"); + return ret; } -/***************** - * Xfree - * calls free - *****************/ - void -Xfree(pointer ptr) +Xfree(void *ptr) { - if (ptr) - free(ptr); + free(ptr); } char * Xstrdup(const char *s) { - char *sd; - size_t len; - if (s == NULL) return NULL; - - len = strlen(s) + 1; - sd = (char *)Xalloc(len); - if (sd != NULL) - strlcpy(sd, s, len); - return sd; + return strdup(s); } - char * XNFstrdup(const char *s) { - char *sd; - size_t len; + char *ret; if (s == NULL) return NULL; - - len = strlen(s) + 1; - sd = (char *)XNFalloc(len); - strlcpy(sd, s, len); - return sd; + + ret = strdup(s); + if (!ret) + FatalError("XNFstrdup: Out of memory"); + return ret; } @@ -1267,7 +1202,7 @@ SmartScheduleInit (void) if (SmartScheduleDisable) return TRUE; - bzero ((char *) &act, sizeof(struct sigaction)); + memset((char *) &act, 0, sizeof(struct sigaction)); /* Set up the timer signal function */ act.sa_handler = SmartScheduleTimer; @@ -1373,7 +1308,7 @@ System(char *command) int status; if (!command) - return(1); + return 1; #ifdef SIGCHLD csig = signal(SIGCHLD, SIG_DFL); @@ -1435,11 +1370,11 @@ Popen(char *command, char *type) if ((*type != 'r' && *type != 'w') || type[1]) return NULL; - if ((cur = xalloc(sizeof(struct pid))) == NULL) + if ((cur = malloc(sizeof(struct pid))) == NULL) return NULL; if (pipe(pdes) < 0) { - xfree(cur); + free(cur); return NULL; } @@ -1454,7 +1389,7 @@ Popen(char *command, char *type) case -1: /* error */ close(pdes[0]); close(pdes[1]); - xfree(cur); + free(cur); if (OsSignal(SIGALRM, old_alarm) == SIG_ERR) perror("signal"); return NULL; @@ -1521,11 +1456,11 @@ Fopen(char *file, char *type) if ((*type != 'r' && *type != 'w') || type[1]) return NULL; - if ((cur = xalloc(sizeof(struct pid))) == NULL) + if ((cur = malloc(sizeof(struct pid))) == NULL) return NULL; if (pipe(pdes) < 0) { - xfree(cur); + free(cur); return NULL; } @@ -1533,7 +1468,7 @@ Fopen(char *file, char *type) case -1: /* error */ close(pdes[0]); close(pdes[1]); - xfree(cur); + free(cur); return NULL; case 0: /* child */ if (setgid(getgid()) == -1) @@ -1627,7 +1562,7 @@ Pclose(pointer iop) pidlist = cur->next; else last->next = cur->next; - xfree(cur); + free(cur); /* allow EINTR again */ OsReleaseSignals (); @@ -1947,53 +1882,3 @@ error: free(list); return NULL; } - -#ifdef __SCO__ -#include - -static void -lockit (int fd, short what) -{ - struct flock lck; - - lck.l_whence = 0; - lck.l_start = 0; - lck.l_len = 1; - lck.l_type = what; - - (void)fcntl (fd, F_SETLKW, &lck); -} - -/* SCO OpenServer 5 lacks pread/pwrite. Emulate them. */ -ssize_t -pread (int fd, void *buf, size_t nbytes, off_t offset) -{ - off_t saved; - ssize_t ret; - - lockit (fd, F_RDLCK); - saved = lseek (fd, 0, SEEK_CUR); - lseek (fd, offset, SEEK_SET); - ret = read (fd, buf, nbytes); - lseek (fd, saved, SEEK_SET); - lockit (fd, F_UNLCK); - - return ret; -} - -ssize_t -pwrite (int fd, const void *buf, size_t nbytes, off_t offset) -{ - off_t saved; - ssize_t ret; - - lockit (fd, F_WRLCK); - saved = lseek (fd, 0, SEEK_CUR); - lseek (fd, offset, SEEK_SET); - ret = write (fd, buf, nbytes); - lseek (fd, saved, SEEK_SET); - lockit (fd, F_UNLCK); - - return ret; -} -#endif /* __SCO__ */ diff --git a/xserver/os/xdmauth.c b/xserver/os/xdmauth.c index e19e4f93d..b8cbada18 100644 --- a/xserver/os/xdmauth.c +++ b/xserver/os/xdmauth.c @@ -96,7 +96,7 @@ XdmAuthenticationGenerator (ARRAY8Ptr privateData, ARRAY8Ptr outgoingData, } static Bool -XdmAuthenticationAddAuth (int name_len, char *name, +XdmAuthenticationAddAuth (int name_len, const char *name, int data_len, char *data) { Bool ret; @@ -114,7 +114,7 @@ XdmAuthenticationAddAuth (int name_len, char *name, 'A' <= c && c <= 'F' ? c - 'A' + 10 : -1) static int -HexToBinary (char *in, char *out, int len) +HexToBinary (const char *in, char *out, int len) { int top, bottom; @@ -137,9 +137,9 @@ HexToBinary (char *in, char *out, int len) } void -XdmAuthenticationInit (char *cookie, int cookie_len) +XdmAuthenticationInit (const char *cookie, int cookie_len) { - bzero (privateKey.data, 8); + memset(privateKey.data, 0, 8); if (!strncmp (cookie, "0x", 2) || !strncmp (cookie, "0X", 2)) { if (cookie_len > 2 + 2 * 8) @@ -188,7 +188,7 @@ static Bool gotClock; #define TwentyFiveMinutes (25 * 60) static Bool -XdmClientAuthCompare (XdmClientAuthPtr a, XdmClientAuthPtr b) +XdmClientAuthCompare (const XdmClientAuthPtr a, const XdmClientAuthPtr b) { int i; @@ -201,7 +201,7 @@ XdmClientAuthCompare (XdmClientAuthPtr a, XdmClientAuthPtr b) } static void -XdmClientAuthDecode (unsigned char *plain, XdmClientAuthPtr auth) +XdmClientAuthDecode (const unsigned char *plain, XdmClientAuthPtr auth) { int i, j; @@ -239,7 +239,7 @@ XdmClientAuthTimeout (long now) prev->next = next; else xdmClients = next; - xfree (client); + free(client); } else prev = client; @@ -259,20 +259,20 @@ XdmAuthorizationValidate (unsigned char *plain, int length, *reason = "Bad XDM authorization key length"; return NULL; } - client = xalloc (sizeof (XdmClientAuthRec)); + client = malloc(sizeof (XdmClientAuthRec)); if (!client) return NULL; XdmClientAuthDecode (plain, client); if (!XdmcpCompareKeys (&client->rho, rho)) { - xfree (client); + free(client); if (reason) *reason = "Invalid XDM-AUTHORIZATION-1 key (failed key comparison)"; return NULL; } for (i = 18; i < 24; i++) if (plain[i] != 0) { - xfree (client); + free(client); if (reason) *reason = "Invalid XDM-AUTHORIZATION-1 key (failed NULL check)"; return NULL; @@ -287,15 +287,15 @@ XdmAuthorizationValidate (unsigned char *plain, int length, #if defined(TCPCONN) || defined(STREAMSCONN) if (family == FamilyInternet && memcmp((char *)addr, client->client, 4) != 0) { - xfree (client); - xfree (addr); + free(client); + free(addr); if (reason) *reason = "Invalid XDM-AUTHORIZATION-1 key (failed address comparison)"; return NULL; } #endif - xfree (addr); + free(addr); } } now = time(0); @@ -308,7 +308,7 @@ XdmAuthorizationValidate (unsigned char *plain, int length, XdmClientAuthTimeout (now); if (abs (client->time - now) > TwentyMinutes) { - xfree (client); + free(client); if (reason) *reason = "Excessive XDM-AUTHORIZATION-1 time offset"; return NULL; @@ -317,7 +317,7 @@ XdmAuthorizationValidate (unsigned char *plain, int length, { if (XdmClientAuthCompare (existing, client)) { - xfree (client); + free(client); if (reason) *reason = "XDM authorization key matches an existing client!"; return NULL; @@ -327,7 +327,7 @@ XdmAuthorizationValidate (unsigned char *plain, int length, } int -XdmAddCookie (unsigned short data_length, char *data, XID id) +XdmAddCookie (unsigned short data_length, const char *data, XID id) { XdmAuthorizationPtr new; unsigned char *rho_bits, *key_bits; @@ -363,7 +363,7 @@ XdmAddCookie (unsigned short data_length, char *data, XID id) /* the first octet of the key must be zero */ if (key_bits[0] != '\0') return 0; - new = xalloc (sizeof (XdmAuthorizationRec)); + new = malloc(sizeof (XdmAuthorizationRec)); if (!new) return 0; new->next = xdmAuth; @@ -375,7 +375,7 @@ XdmAddCookie (unsigned short data_length, char *data, XID id) } XID -XdmCheckCookie (unsigned short cookie_length, char *cookie, +XdmCheckCookie (unsigned short cookie_length, const char *cookie, ClientPtr xclient, char **reason) { XdmAuthorizationPtr auth; @@ -385,7 +385,7 @@ XdmCheckCookie (unsigned short cookie_length, char *cookie, /* Auth packets must be a multiple of 8 bytes long */ if (cookie_length & 7) return (XID) -1; - plain = xalloc (cookie_length); + plain = malloc(cookie_length); if (!plain) return (XID) -1; for (auth = xdmAuth; auth; auth=auth->next) { @@ -394,11 +394,11 @@ XdmCheckCookie (unsigned short cookie_length, char *cookie, { client->next = xdmClients; xdmClients = client; - xfree (plain); + free(plain); return auth->id; } } - xfree (plain); + free(plain); return (XID) -1; } @@ -411,13 +411,13 @@ XdmResetCookie (void) for (auth = xdmAuth; auth; auth=next_auth) { next_auth = auth->next; - xfree (auth); + free(auth); } xdmAuth = 0; for (client = xdmClients; client; client=next_client) { next_client = client->next; - xfree (client); + free(client); } xdmClients = (XdmClientAuthPtr) 0; return 1; @@ -430,21 +430,21 @@ XdmToID (unsigned short cookie_length, char *cookie) XdmClientAuthPtr client; unsigned char *plain; - plain = xalloc (cookie_length); + plain = malloc(cookie_length); if (!plain) return (XID) -1; for (auth = xdmAuth; auth; auth=auth->next) { XdmcpUnwrap ((unsigned char *)cookie, (unsigned char *)&auth->key, plain, cookie_length); if ((client = XdmAuthorizationValidate (plain, cookie_length, &auth->rho, NULL, NULL)) != NULL) { - xfree (client); - xfree (cookie); - xfree (plain); + free(client); + free(cookie); + free(plain); return auth->id; } } - xfree (cookie); - xfree (plain); + free(cookie); + free(plain); return (XID) -1; } @@ -464,7 +464,7 @@ XdmFromID (XID id, unsigned short *data_lenp, char **datap) } int -XdmRemoveCookie (unsigned short data_length, char *data) +XdmRemoveCookie (unsigned short data_length, const char *data) { XdmAuthorizationPtr auth; XdmAuthKeyPtr key_bits, rho_bits; @@ -489,7 +489,7 @@ XdmRemoveCookie (unsigned short data_length, char *data) XdmcpCompareKeys (key_bits, &auth->key)) { xdmAuth = auth->next; - xfree (auth); + free(auth); return 1; } } diff --git a/xserver/os/xdmcp.c b/xserver/os/xdmcp.c index 1c6ec7888..546e5c05e 100644 --- a/xserver/os/xdmcp.c +++ b/xserver/os/xdmcp.c @@ -132,14 +132,14 @@ static struct multicastinfo { #endif static void XdmcpAddHost( - struct sockaddr *from, + const struct sockaddr *from, int fromlen, ARRAY8Ptr AuthenticationName, ARRAY8Ptr hostname, ARRAY8Ptr status); static void XdmcpSelectHost( - struct sockaddr *host_sockaddr, + const struct sockaddr *host_sockaddr, int host_len, ARRAY8Ptr AuthenticationName); @@ -169,10 +169,10 @@ static void send_keepalive_msg(void); static void recv_alive_msg(unsigned /*length*/); static void XdmcpFatal( - char * /*type*/, + const char * /*type*/, ARRAY8Ptr /*status*/); -static void XdmcpWarning(char * /*str*/); +static void XdmcpWarning(const char * /*str*/); static void get_manager_by_name( int /*argc*/, @@ -210,7 +210,7 @@ static void XdmcpWakeupHandler( static ARRAY8 ManufacturerDisplayID; static void -XdmcpRegisterManufacturerDisplayID (char *name, int length) +XdmcpRegisterManufacturerDisplayID (const char *name, int length) { int i; @@ -251,48 +251,48 @@ XdmcpOptions(int argc, char **argv, int i) get_manager_by_name(argc, argv, i++); XDM_INIT_STATE = XDM_QUERY; AccessUsingXdmcp (); - return (i + 1); + return i + 1; } if (strcmp(argv[i], "-broadcast") == 0) { XDM_INIT_STATE = XDM_BROADCAST; AccessUsingXdmcp (); - return (i + 1); + return i + 1; } #if defined(IPv6) && defined(AF_INET6) if (strcmp(argv[i], "-multicast") == 0) { i = get_mcast_options(argc, argv, ++i); XDM_INIT_STATE = XDM_MULTICAST; AccessUsingXdmcp (); - return (i + 1); + return i + 1; } #endif if (strcmp(argv[i], "-indirect") == 0) { get_manager_by_name(argc, argv, i++); XDM_INIT_STATE = XDM_INDIRECT; AccessUsingXdmcp (); - return (i + 1); + return i + 1; } if (strcmp(argv[i], "-port") == 0) { if (++i == argc) { FatalError("Xserver: missing port number in command line\n"); } xdm_udp_port = (unsigned short) atoi(argv[i]); - return (i + 1); + return i + 1; } if (strcmp(argv[i], "-from") == 0) { get_fromaddr_by_name(argc, argv, ++i); - return (i + 1); + return i + 1; } if (strcmp(argv[i], "-once") == 0) { OneSession = TRUE; - return (i + 1); + return i + 1; } if (strcmp(argv[i], "-class") == 0) { if (++i == argc) { FatalError("Xserver: missing class name in command line\n"); } defaultDisplayClass = argv[i]; - return (i + 1); + return i + 1; } #ifdef HASXDMAUTH if (strcmp(argv[i], "-cookie") == 0) { @@ -300,7 +300,7 @@ XdmcpOptions(int argc, char **argv, int i) FatalError("Xserver: missing cookie data in command line\n"); } xdmAuthCookie = argv[i]; - return (i + 1); + return i + 1; } #endif if (strcmp(argv[i], "-displayID") == 0) { @@ -308,9 +308,9 @@ XdmcpOptions(int argc, char **argv, int i) FatalError("Xserver: missing displayID in command line\n"); } XdmcpRegisterManufacturerDisplayID (argv[i], strlen (argv[i])); - return (i + 1); + return i + 1; } - return (i); + return i; } /* @@ -332,13 +332,13 @@ static struct sockaddr_in BroadcastAddresses[MAX_BROADCAST]; static int NumBroadcastAddresses; void -XdmcpRegisterBroadcastAddress (struct sockaddr_in *addr) +XdmcpRegisterBroadcastAddress (const struct sockaddr_in *addr) { struct sockaddr_in *bcast; if (NumBroadcastAddresses >= MAX_BROADCAST) return; bcast = &BroadcastAddresses[NumBroadcastAddresses++]; - bzero (bcast, sizeof (struct sockaddr_in)); + memset(bcast, 0, sizeof (struct sockaddr_in)); #ifdef BSD44SOCKETS bcast->sin_len = addr->sin_len; #endif @@ -364,9 +364,9 @@ static AuthenticationFuncsPtr AuthenticationFuncsList; void XdmcpRegisterAuthentication ( - char *name, + const char *name, int namelen, - char *data, + const char *data, int datalen, ValidatorFunc Validator, GeneratorFunc Generator, @@ -391,7 +391,7 @@ XdmcpRegisterAuthentication ( AuthenticationNames.length + 1) && XdmcpReallocARRAYofARRAY8 (&AuthenticationDatas, AuthenticationDatas.length + 1) && - (newFuncs = xalloc ((AuthenticationNames.length + 1) * sizeof (AuthenticationFuncsRec))))) + (newFuncs = malloc((AuthenticationNames.length + 1) * sizeof (AuthenticationFuncsRec))))) { XdmcpDisposeARRAY8 (&AuthenticationName); XdmcpDisposeARRAY8 (&AuthenticationData); @@ -402,7 +402,7 @@ XdmcpRegisterAuthentication ( newFuncs[AuthenticationNames.length-1].Validator = Validator; newFuncs[AuthenticationNames.length-1].Generator = Generator; newFuncs[AuthenticationNames.length-1].AddAuth = AddAuth; - xfree (AuthenticationFuncsList); + free(AuthenticationFuncsList); AuthenticationFuncsList = newFuncs; AuthenticationNames.data[AuthenticationNames.length-1] = AuthenticationName; AuthenticationDatas.data[AuthenticationDatas.length-1] = AuthenticationData; @@ -420,7 +420,7 @@ static ARRAY8Ptr AuthenticationData = &noAuthenticationData; static AuthenticationFuncsPtr AuthenticationFuncs; static void -XdmcpSetAuthentication (ARRAY8Ptr name) +XdmcpSetAuthentication (const ARRAY8Ptr name) { int i; @@ -445,7 +445,7 @@ static long xdmcpGeneration; void XdmcpRegisterConnection ( int type, - char *address, + const char *address, int addrlen) { int i; @@ -492,18 +492,18 @@ XdmcpRegisterConnection ( } if (ConnectionAddresses.length + 1 == 256) return; - newAddress = xalloc (addrlen * sizeof (CARD8)); + newAddress = malloc(addrlen * sizeof (CARD8)); if (!newAddress) return; if (!XdmcpReallocARRAY16 (&ConnectionTypes, ConnectionTypes.length + 1)) { - xfree (newAddress); + free(newAddress); return; } if (!XdmcpReallocARRAYofARRAY8 (&ConnectionAddresses, ConnectionAddresses.length + 1)) { - xfree (newAddress); + free(newAddress); return; } ConnectionTypes.data[ConnectionTypes.length - 1] = (CARD16) type; @@ -528,17 +528,17 @@ XdmcpRegisterAuthorizations (void) } void -XdmcpRegisterAuthorization (char *name, int namelen) +XdmcpRegisterAuthorization (const char *name, int namelen) { ARRAY8 authName; int i; - authName.data = xalloc (namelen * sizeof (CARD8)); + authName.data = malloc(namelen * sizeof (CARD8)); if (!authName.data) return; if (!XdmcpReallocARRAYofARRAY8 (&AuthorizationNames, AuthorizationNames.length +1)) { - xfree (authName.data); + free(authName.data); return; } for (i = 0; i < namelen; i++) @@ -554,7 +554,7 @@ XdmcpRegisterAuthorization (char *name, int namelen) static ARRAY8 DisplayClass; static void -XdmcpRegisterDisplayClass (char *name, int length) +XdmcpRegisterDisplayClass (const char *name, int length) { int i; @@ -728,7 +728,7 @@ XdmcpWakeupHandler( static void XdmcpSelectHost( - struct sockaddr *host_sockaddr, + const struct sockaddr *host_sockaddr, int host_len, ARRAY8Ptr AuthenticationName) { @@ -748,7 +748,7 @@ XdmcpSelectHost( /*ARGSUSED*/ static void XdmcpAddHost( - struct sockaddr *from, + const struct sockaddr *from, int fromlen, ARRAY8Ptr AuthenticationName, ARRAY8Ptr hostname, @@ -854,7 +854,7 @@ send_packet(void) */ static void -XdmcpDeadSession (char *reason) +XdmcpDeadSession (const char *reason) { ErrorF ("XDM: %s, declaring session dead\n", reason); state = XDM_INIT_STATE; @@ -1448,7 +1448,7 @@ recv_alive_msg (unsigned length) static void XdmcpFatal ( - char *type, + const char *type, ARRAY8Ptr status) { FatalError ("XDMCP fatal error: %s %*.*s\n", type, @@ -1456,15 +1456,15 @@ XdmcpFatal ( } static void -XdmcpWarning(char *str) +XdmcpWarning(const char *str) { ErrorF("XDMCP warning: %s\n", str); } static void get_addr_by_name( - char * argtype, - char * namestr, + const char *argtype, + const char *namestr, int port, int socktype, SOCKADDR_TYPE *addr, @@ -1483,7 +1483,7 @@ get_addr_by_name( char *pport = portstr; int gaierr; - bzero(&hints, sizeof(hints)); + memset(&hints, 0, sizeof(hints)); hints.ai_socktype = socktype; if (port == 0) { @@ -1616,7 +1616,7 @@ get_mcast_options(int argc, char **argv, int i) } else { FatalError("Xserver: port out of range: %d\n", xdm_udp_port); } - bzero(&hints, sizeof(hints)); + memset(&hints, 0, sizeof(hints)); hints.ai_socktype = SOCK_DGRAM; if ((gaierr = getaddrinfo(address, portstr, &hints, &firstai)) == 0) { diff --git a/xserver/os/xprintf.c b/xserver/os/xprintf.c index 07eaa1f58..71a4424f7 100644 --- a/xserver/os/xprintf.c +++ b/xserver/os/xprintf.c @@ -54,7 +54,7 @@ Xvprintf(const char *format, va_list va) size = vsnprintf(NULL, 0, format, va2); va_end(va2); - ret = (char *)Xalloc(size + 1); + ret = (char *)malloc(size + 1); if (ret == NULL) return NULL; @@ -84,7 +84,7 @@ XNFvprintf(const char *format, va_list va) size = vsnprintf(NULL, 0, format, va2); va_end(va2); - ret = (char *)XNFalloc(size + 1); + ret = (char *)xnfalloc(size + 1); if (ret == NULL) return NULL; diff --git a/xserver/os/xsha1.c b/xserver/os/xsha1.c index 355862fb1..5ea71da46 100644 --- a/xserver/os/xsha1.c +++ b/xserver/os/xsha1.c @@ -12,7 +12,7 @@ void *x_sha1_init(void) { - SHA1_CTX *ctx = xalloc(sizeof(*ctx)); + SHA1_CTX *ctx = malloc(sizeof(*ctx)); if (!ctx) return NULL; SHA1Init(ctx); @@ -30,7 +30,7 @@ int x_sha1_final(void *ctx, unsigned char result[20]) { SHA1_CTX *sha1_ctx = ctx; SHA1Final(result, sha1_ctx); - xfree(sha1_ctx); + free(sha1_ctx); return 1; } @@ -40,7 +40,7 @@ int x_sha1_final(void *ctx, unsigned char result[20]) void *x_sha1_init(void) { - CC_SHA1_CTX *ctx = xalloc(sizeof(*ctx)); + CC_SHA1_CTX *ctx = malloc(sizeof(*ctx)); if (!ctx) return NULL; CC_SHA1_Init(ctx); @@ -58,7 +58,7 @@ int x_sha1_final(void *ctx, unsigned char result[20]) { CC_SHA1_CTX *sha1_ctx = ctx; CC_SHA1_Final(result, sha1_ctx); - xfree(sha1_ctx); + free(sha1_ctx); return 1; } @@ -107,7 +107,7 @@ int x_sha1_final(void *ctx, unsigned char result[20]) void *x_sha1_init(void) { - sha1_ctx *ctx = xalloc(sizeof(*ctx)); + sha1_ctx *ctx = malloc(sizeof(*ctx)); if(!ctx) return NULL; sha1_begin(ctx); @@ -123,7 +123,7 @@ int x_sha1_update(void *ctx, void *data, int size) int x_sha1_final(void *ctx, unsigned char result[20]) { sha1_end(result, ctx); - xfree(ctx); + free(ctx); return 1; } @@ -135,12 +135,12 @@ int x_sha1_final(void *ctx, unsigned char result[20]) void *x_sha1_init(void) { int ret; - SHA_CTX *ctx = xalloc(sizeof(*ctx)); + SHA_CTX *ctx = malloc(sizeof(*ctx)); if (!ctx) return NULL; ret = SHA1_Init(ctx); if (!ret) { - xfree(ctx); + free(ctx); return NULL; } return ctx; @@ -152,7 +152,7 @@ int x_sha1_update(void *ctx, void *data, int size) SHA_CTX *sha_ctx = ctx; ret = SHA1_Update(sha_ctx, data, size); if (!ret) - xfree(sha_ctx); + free(sha_ctx); return ret; } @@ -161,7 +161,7 @@ int x_sha1_final(void *ctx, unsigned char result[20]) int ret; SHA_CTX *sha_ctx = ctx; ret = SHA1_Final(result, sha_ctx); - xfree(sha_ctx); + free(sha_ctx); return ret; } diff --git a/xserver/randr/Makefile.in b/xserver/randr/Makefile.in index 22a4b890f..858d4237e 100644 --- a/xserver/randr/Makefile.in +++ b/xserver/randr/Makefile.in @@ -128,10 +128,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -219,6 +215,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -233,6 +231,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -250,10 +249,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -309,10 +312,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -330,17 +334,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -367,20 +365,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -472,6 +473,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/randr/randr.c b/xserver/randr/randr.c index b63a7f22e..607770520 100644 --- a/xserver/randr/randr.c +++ b/xserver/randr/randr.c @@ -54,11 +54,9 @@ static int SProcRRDispatch (ClientPtr pClient); int RREventBase; int RRErrorBase; RESTYPE RRClientType, RREventType; /* resource types for event masks */ -static int RRClientPrivateKeyIndex; -DevPrivateKey RRClientPrivateKey = &RRClientPrivateKeyIndex; +DevPrivateKeyRec RRClientPrivateKeyRec; -static int rrPrivKeyIndex; -DevPrivateKey rrPrivKey = &rrPrivKeyIndex; +DevPrivateKeyRec rrPrivKeyRec; static void RRClientCallback (CallbackListPtr *list, @@ -98,9 +96,9 @@ RRCloseScreen (int i, ScreenPtr pScreen) for (j = pScrPriv->numOutputs - 1; j >= 0; j--) RROutputDestroy (pScrPriv->outputs[j]); - xfree (pScrPriv->crtcs); - xfree (pScrPriv->outputs); - xfree (pScrPriv); + free(pScrPriv->crtcs); + free(pScrPriv->outputs); + free(pScrPriv); RRNScreens -= 1; /* ok, one fewer screen with RandR running */ return (*pScreen->CloseScreen) (i, pScreen); } @@ -215,6 +213,9 @@ Bool RRInit (void) return FALSE; RRGeneration = serverGeneration; } + if (!dixRegisterPrivateKey(&rrPrivKeyRec, PRIVATE_SCREEN, 0)) + return FALSE; + return TRUE; } @@ -225,7 +226,7 @@ Bool RRScreenInit(ScreenPtr pScreen) if (!RRInit ()) return FALSE; - pScrPriv = (rrScrPrivPtr) xcalloc (1, sizeof (rrScrPrivRec)); + pScrPriv = (rrScrPrivPtr) calloc(1, sizeof (rrScrPrivRec)); if (!pScrPriv) return FALSE; @@ -302,7 +303,7 @@ RRFreeClient (pointer data, XID id) *pHead = pRREvent->next; } } - xfree ((pointer) pRREvent); + free((pointer) pRREvent); return 1; } @@ -316,9 +317,9 @@ RRFreeEvents (pointer data, XID id) for (pCur = *pHead; pCur; pCur = pNext) { pNext = pCur->next; FreeResource (pCur->clientResource, RRClientType); - xfree ((pointer) pCur); + free((pointer) pCur); } - xfree ((pointer) pHead); + free((pointer) pHead); return 1; } @@ -329,9 +330,9 @@ RRExtensionInit (void) if (RRNScreens == 0) return; - if (!dixRequestPrivate(RRClientPrivateKey, - sizeof (RRClientRec) + - screenInfo.numScreens * sizeof (RRTimesRec))) + if (!dixRegisterPrivateKey(&RRClientPrivateKeyRec, PRIVATE_CLIENT, + sizeof (RRClientRec) + + screenInfo.numScreens * sizeof (RRTimesRec))) return; if (!AddCallback (&ClientStateCallback, RRClientCallback, 0)) return; @@ -353,6 +354,11 @@ RRExtensionInit (void) SRRScreenChangeNotifyEvent; EventSwapVector[RREventBase + RRNotify] = (EventSwapPtr) SRRNotifyEvent; + + RRModeInitErrorValue(); + RRCrtcInitErrorValue(); + RROutputInitErrorValue(); + #ifdef PANORAMIX RRXineramaExtensionInit(); #endif diff --git a/xserver/randr/randrstr.h b/xserver/randr/randrstr.h index 975fe3396..03652ef09 100644 --- a/xserver/randr/randrstr.h +++ b/xserver/randr/randrstr.h @@ -47,10 +47,8 @@ #include "rrtransform.h" #include #include -#ifdef RENDER #include /* we share subpixel order information */ #include "picturestr.h" -#endif #include /* required for ABI compatibility for now */ @@ -301,7 +299,8 @@ typedef struct _rrScrPriv { #endif } rrScrPrivRec, *rrScrPrivPtr; -extern _X_EXPORT DevPrivateKey rrPrivKey; +extern _X_EXPORT DevPrivateKeyRec rrPrivKeyRec; +#define rrPrivKey (&rrPrivKeyRec) #define rrGetScrPriv(pScr) ((rrScrPrivPtr)dixLookupPrivate(&(pScr)->devPrivates, rrPrivKey)) #define rrScrPriv(pScr) rrScrPrivPtr pScrPriv = rrGetScrPriv(pScr) @@ -337,7 +336,8 @@ typedef struct _RRClient { } RRClientRec, *RRClientPtr; extern _X_EXPORT RESTYPE RRClientType, RREventType; /* resource types for event masks */ -extern _X_EXPORT DevPrivateKey RRClientPrivateKey; +extern _X_EXPORT DevPrivateKeyRec RRClientPrivateKeyRec; +#define RRClientPrivateKey (&RRClientPrivateKeyRec) extern _X_EXPORT RESTYPE RRCrtcType, RRModeType, RROutputType; #define VERIFY_RR_OUTPUT(id, ptr, a)\ @@ -346,7 +346,7 @@ extern _X_EXPORT RESTYPE RRCrtcType, RRModeType, RROutputType; RROutputType, client, a);\ if (rc != Success) {\ client->errorValue = id;\ - return (rc == BadValue) ? RRErrorBase + BadRROutput : rc;\ + return rc;\ }\ } @@ -356,7 +356,7 @@ extern _X_EXPORT RESTYPE RRCrtcType, RRModeType, RROutputType; RRCrtcType, client, a);\ if (rc != Success) {\ client->errorValue = id;\ - return (rc == BadValue) ? RRErrorBase + BadRRCrtc : rc;\ + return rc;\ }\ } @@ -366,7 +366,7 @@ extern _X_EXPORT RESTYPE RRCrtcType, RRModeType, RROutputType; RRModeType, client, a);\ if (rc != Success) {\ client->errorValue = id;\ - return (rc == BadValue) ? RRErrorBase + BadRRMode : rc;\ + return rc;\ }\ } @@ -700,6 +700,12 @@ RRCrtcTransformSet (RRCrtcPtr crtc, extern _X_EXPORT Bool RRCrtcInit (void); +/* + * Initialize crtc type error value + */ +extern _X_EXPORT void +RRCrtcInitErrorValue (void); + /* * Crtc dispatch */ @@ -762,6 +768,12 @@ RRModesForScreen (ScreenPtr pScreen, int *num_ret); */ extern _X_EXPORT Bool RRModeInit (void); + +/* + * Initialize mode type error value + */ +extern _X_EXPORT void +RRModeInitErrorValue (void); extern _X_EXPORT int ProcRRCreateMode (ClientPtr client); @@ -856,6 +868,12 @@ ProcRRGetOutputPrimary (ClientPtr client); */ extern _X_EXPORT Bool RROutputInit (void); + +/* + * Initialize output type error value + */ +extern _X_EXPORT void +RROutputInitErrorValue (void); /* rrpointer.c */ extern _X_EXPORT void diff --git a/xserver/randr/rrcrtc.c b/xserver/randr/rrcrtc.c index a9eb2d262..98206a2b9 100644 --- a/xserver/randr/rrcrtc.c +++ b/xserver/randr/rrcrtc.c @@ -64,15 +64,15 @@ RRCrtcCreate (ScreenPtr pScreen, void *devPrivate) /* make space for the crtc pointer */ if (pScrPriv->numCrtcs) - crtcs = xrealloc (pScrPriv->crtcs, + crtcs = realloc(pScrPriv->crtcs, (pScrPriv->numCrtcs + 1) * sizeof (RRCrtcPtr)); else - crtcs = xalloc (sizeof (RRCrtcPtr)); + crtcs = malloc(sizeof (RRCrtcPtr)); if (!crtcs) return FALSE; pScrPriv->crtcs = crtcs; - crtc = xcalloc (1, sizeof (RRCrtcRec)); + crtc = calloc(1, sizeof (RRCrtcRec)); if (!crtc) return NULL; crtc->id = FakeClientID (0); @@ -181,17 +181,16 @@ RRCrtcNotify (RRCrtcPtr crtc, if (numOutputs) { if (crtc->numOutputs) - newoutputs = xrealloc (crtc->outputs, + newoutputs = realloc(crtc->outputs, numOutputs * sizeof (RROutputPtr)); else - newoutputs = xalloc (numOutputs * sizeof (RROutputPtr)); + newoutputs = malloc(numOutputs * sizeof (RROutputPtr)); if (!newoutputs) return FALSE; } else { - if (crtc->outputs) - xfree (crtc->outputs); + free(crtc->outputs); newoutputs = NULL; } crtc->outputs = newoutputs; @@ -254,7 +253,6 @@ RRDeliverCrtcEvent (ClientPtr client, WindowPtr pWin, RRCrtcPtr crtc) ce.type = RRNotify + RREventBase; ce.subCode = RRNotify_CrtcChange; - ce.sequenceNumber = client->sequence; ce.timestamp = pScrPriv->lastSetTime.milliseconds; ce.window = pWin->drawable.id; ce.crtc = crtc->id; @@ -441,11 +439,10 @@ RRCrtcDestroyResource (pointer value, XID pid) } } } - if (crtc->gammaRed) - xfree (crtc->gammaRed); + free(crtc->gammaRed); if (crtc->mode) RRModeDestroy (crtc->mode); - xfree (crtc); + free(crtc); return 1; } @@ -558,14 +555,13 @@ RRCrtcGammaSetSize (RRCrtcPtr crtc, return TRUE; if (size) { - gamma = xalloc (size * 3 * sizeof (CARD16)); + gamma = malloc(size * 3 * sizeof (CARD16)); if (!gamma) return FALSE; } else gamma = NULL; - if (crtc->gammaRed) - xfree (crtc->gammaRed); + free(crtc->gammaRed); crtc->gammaRed = gamma; crtc->gammaGreen = gamma + size; crtc->gammaBlue = gamma + size*2; @@ -635,9 +631,19 @@ RRCrtcInit (void) RRCrtcType = CreateNewResourceType (RRCrtcDestroyResource, "CRTC"); if (!RRCrtcType) return FALSE; + return TRUE; } +/* + * Initialize crtc type error value + */ +void +RRCrtcInitErrorValue(void) +{ + SetResourceTypeErrorValue(RRCrtcType, RRErrorBase + BadRRCrtc); +} + int ProcRRGetCrtcInfo (ClientPtr client) { @@ -704,7 +710,7 @@ ProcRRGetCrtcInfo (ClientPtr client) extraLen = rep.length << 2; if (extraLen) { - extra = xalloc (extraLen); + extra = malloc(extraLen); if (!extra) return BadAlloc; } @@ -749,10 +755,10 @@ ProcRRGetCrtcInfo (ClientPtr client) if (extraLen) { WriteToClient (client, extraLen, (char *) extra); - xfree (extra); + free(extra); } - return client->noClientException; + return Success; } int @@ -791,7 +797,7 @@ ProcRRSetCrtcConfig (ClientPtr client) } if (numOutputs) { - outputs = xalloc (numOutputs * sizeof (RROutputPtr)); + outputs = malloc(numOutputs * sizeof (RROutputPtr)); if (!outputs) return BadAlloc; } @@ -805,9 +811,8 @@ ProcRRSetCrtcConfig (ClientPtr client) RROutputType, client, DixSetAttrAccess); if (rc != Success) { - if (outputs) - xfree (outputs); - return (rc == BadValue) ? RRErrorBase + BadRROutput : rc; + free(outputs); + return rc; } /* validate crtc for this output */ for (j = 0; j < outputs[i]->numCrtcs; j++) @@ -815,8 +820,7 @@ ProcRRSetCrtcConfig (ClientPtr client) break; if (j == outputs[i]->numCrtcs) { - if (outputs) - xfree (outputs); + free(outputs); return BadMatch; } /* validate mode for this output */ @@ -830,8 +834,7 @@ ProcRRSetCrtcConfig (ClientPtr client) } if (j == outputs[i]->numModes + outputs[i]->numUserModes) { - if (outputs) - xfree (outputs); + free(outputs); return BadMatch; } } @@ -850,8 +853,7 @@ ProcRRSetCrtcConfig (ClientPtr client) } if (k == outputs[i]->numClones) { - if (outputs) - xfree (outputs); + free(outputs); return BadMatch; } } @@ -870,19 +872,6 @@ ProcRRSetCrtcConfig (ClientPtr client) goto sendReply; } -#if 0 - /* - * if the client's config timestamp is not the same as the last config - * timestamp, then the config information isn't up-to-date and - * can't even be validated - */ - if (CompareTimeStamps (configTime, pScrPriv->lastConfigTime) != 0) - { - rep.status = RRSetConfigInvalidConfigTime; - goto sendReply; - } -#endif - /* * Validate requested rotation */ @@ -900,8 +889,7 @@ ProcRRSetCrtcConfig (ClientPtr client) * Invalid rotation */ client->errorValue = stuff->rotation; - if (outputs) - xfree (outputs); + free(outputs); return BadValue; } @@ -913,8 +901,7 @@ ProcRRSetCrtcConfig (ClientPtr client) * requested rotation or reflection not supported by screen */ client->errorValue = stuff->rotation; - if (outputs) - xfree (outputs); + free(outputs); return BadMatch; } @@ -943,32 +930,20 @@ ProcRRSetCrtcConfig (ClientPtr client) if (stuff->x + source_width > pScreen->width) { client->errorValue = stuff->x; - if (outputs) - xfree (outputs); + free(outputs); return BadValue; } if (stuff->y + source_height > pScreen->height) { client->errorValue = stuff->y; - if (outputs) - xfree (outputs); + free(outputs); return BadValue; } } #endif } - /* - * Make sure the requested set-time is not older than - * the last set-time - */ - if (CompareTimeStamps (time, pScrPriv->lastSetTime) < 0) - { - rep.status = RRSetConfigInvalidTime; - goto sendReply; - } - if (!RRCrtcSet (crtc, mode, stuff->x, stuff->y, rotation, numOutputs, outputs)) { @@ -979,8 +954,7 @@ ProcRRSetCrtcConfig (ClientPtr client) pScrPriv->lastSetTime = time; sendReply: - if (outputs) - xfree (outputs); + free(outputs); rep.type = X_Reply; /* rep.status has already been filled in */ @@ -997,7 +971,7 @@ sendReply: } WriteToClient(client, sizeof(xRRSetCrtcConfigReply), (char *)&rep); - return client->noClientException; + return Success; } int @@ -1066,7 +1040,7 @@ ProcRRGetPanning (ClientPtr client) swaps(&rep.border_bottom, n); } WriteToClient(client, sizeof(xRRGetPanningReply), (char *)&rep); - return client->noClientException; + return Success; } int @@ -1100,16 +1074,6 @@ ProcRRSetPanning (ClientPtr client) time = ClientTimeToServerTime(stuff->timestamp); - /* - * Make sure the requested set-time is not older than - * the last set-time - */ - if (CompareTimeStamps (time, pScrPriv->lastSetTime) < 0) - { - rep.status = RRSetConfigInvalidTime; - goto sendReply; - } - if (!pScrPriv->rrGetPanning) return RRErrorBase + BadRRCrtc; @@ -1145,7 +1109,7 @@ sendReply: swaps(&rep.newTimestamp, n); } WriteToClient(client, sizeof(xRRSetPanningReply), (char *)&rep); - return client->noClientException; + return Success; } int @@ -1173,7 +1137,7 @@ ProcRRGetCrtcGammaSize (ClientPtr client) swaps (&reply.size, n); } WriteToClient (client, sizeof (xRRGetCrtcGammaSizeReply), (char *) &reply); - return client->noClientException; + return Success; } int @@ -1196,7 +1160,7 @@ ProcRRGetCrtcGamma (ClientPtr client) len = crtc->gammaSize * 3 * 2; if (crtc->gammaSize) { - extra = xalloc(len); + extra = malloc(len); if (!extra) return BadAlloc; } @@ -1216,9 +1180,9 @@ ProcRRGetCrtcGamma (ClientPtr client) memcpy(extra, crtc->gammaRed, len); client->pSwapReplyFunc = (ReplySwapPtr)CopySwap16Write; WriteSwappedDataToClient (client, len, extra); - xfree(extra); + free(extra); } - return client->noClientException; + return Success; } int @@ -1354,7 +1318,7 @@ ProcRRGetCrtcTransform (ClientPtr client) nextra = (transform_filter_length (pending) + transform_filter_length (current)); - reply = xalloc (sizeof (xRRGetCrtcTransformReply) + nextra); + reply = malloc(sizeof (xRRGetCrtcTransformReply) + nextra); if (!reply) return BadAlloc; @@ -1382,6 +1346,6 @@ ProcRRGetCrtcTransform (ClientPtr client) swapl (&reply->length, n); } WriteToClient (client, sizeof (xRRGetCrtcTransformReply) + nextra, (char *) reply); - xfree(reply); - return client->noClientException; + free(reply); + return Success; } diff --git a/xserver/randr/rrdispatch.c b/xserver/randr/rrdispatch.c index ffb46a48c..ebfda5717 100644 --- a/xserver/randr/rrdispatch.c +++ b/xserver/randr/rrdispatch.c @@ -65,7 +65,7 @@ ProcRRQueryVersion (ClientPtr client) swapl(&rep.minorVersion, n); } WriteToClient(client, sizeof(xRRQueryVersionReply), (char *)&rep); - return (client->noClientException); + return Success; } static int @@ -108,7 +108,7 @@ ProcRRSelectInput (ClientPtr client) if (!pRREvent) { /* build the entry */ - pRREvent = (RREventPtr) xalloc (sizeof (RREventRec)); + pRREvent = (RREventPtr) malloc(sizeof (RREventRec)); if (!pRREvent) return BadAlloc; pRREvent->next = 0; @@ -131,7 +131,7 @@ ProcRRSelectInput (ClientPtr client) */ if (!pHead) { - pHead = (RREventPtr *) xalloc (sizeof (RREventPtr)); + pHead = (RREventPtr *) malloc(sizeof (RREventPtr)); if (!pHead || !AddResource (pWin->drawable.id, RREventType, (pointer)pHead)) { @@ -174,7 +174,7 @@ ProcRRSelectInput (ClientPtr client) pNewRREvent->next = pRREvent->next; else *pHead = pRREvent->next; - xfree (pRREvent); + free(pRREvent); } } } diff --git a/xserver/randr/rrinfo.c b/xserver/randr/rrinfo.c index 949da2745..02aea5245 100644 --- a/xserver/randr/rrinfo.c +++ b/xserver/randr/rrinfo.c @@ -55,10 +55,10 @@ RROldModeAdd (RROutputPtr output, RRScreenSizePtr size, int refresh) } if (output->numModes) - modes = xrealloc (output->modes, + modes = realloc(output->modes, (output->numModes + 1) * sizeof (RRModePtr)); else - modes = xalloc (sizeof (RRModePtr)); + modes = malloc(sizeof (RRModePtr)); if (!modes) { RRModeDestroy (mode); @@ -99,9 +99,7 @@ RRScanOldConfig (ScreenPtr pScreen, Rotation rotations) return; RROutputSetCrtcs (output, &crtc, 1); RROutputSetConnection (output, RR_Connected); -#ifdef RENDER RROutputSetSubpixelOrder (output, PictureGetSubpixelOrder (pScreen)); -#endif } output = pScrPriv->outputs[0]; @@ -136,7 +134,7 @@ RRScanOldConfig (ScreenPtr pScreen, Rotation rotations) newMode = mode; } } - xfree (size->pRates); + free(size->pRates); } else { @@ -146,7 +144,7 @@ RRScanOldConfig (ScreenPtr pScreen, Rotation rotations) } } if (pScrPriv->nSizes) - xfree (pScrPriv->pSizes); + free(pScrPriv->pSizes); pScrPriv->pSizes = NULL; pScrPriv->nSizes = 0; @@ -281,7 +279,7 @@ RRRegisterSize (ScreenPtr pScreen, for (i = 0; i < pScrPriv->nSizes; i++) if (RRScreenSizeMatches (&tmp, &pScrPriv->pSizes[i])) return &pScrPriv->pSizes[i]; - pNew = xrealloc (pScrPriv->pSizes, + pNew = realloc(pScrPriv->pSizes, (pScrPriv->nSizes + 1) * sizeof (RRScreenSize)); if (!pNew) return 0; @@ -305,7 +303,7 @@ Bool RRRegisterRate (ScreenPtr pScreen, if (pSize->pRates[i].rate == rate) return TRUE; - pNew = xrealloc (pSize->pRates, + pNew = realloc(pSize->pRates, (pSize->nRates + 1) * sizeof (RRScreenRate)); if (!pNew) return FALSE; diff --git a/xserver/randr/rrmode.c b/xserver/randr/rrmode.c index 139619367..5ffa4006f 100644 --- a/xserver/randr/rrmode.c +++ b/xserver/randr/rrmode.c @@ -58,7 +58,7 @@ RRModeCreate (xRRModeInfo *modeInfo, if (!RRInit ()) return NULL; - mode = xalloc (sizeof (RRModeRec) + modeInfo->nameLength + 1); + mode = malloc(sizeof (RRModeRec) + modeInfo->nameLength + 1); if (!mode) return NULL; mode->refcnt = 1; @@ -69,13 +69,13 @@ RRModeCreate (xRRModeInfo *modeInfo, mode->userScreen = userScreen; if (num_modes) - newModes = xrealloc (modes, (num_modes + 1) * sizeof (RRModePtr)); + newModes = realloc(modes, (num_modes + 1) * sizeof (RRModePtr)); else - newModes = xalloc (sizeof (RRModePtr)); + newModes = malloc(sizeof (RRModePtr)); if (!newModes) { - xfree (mode); + free(mode); return NULL; } @@ -164,7 +164,7 @@ RRModesForScreen (ScreenPtr pScreen, int *num_ret) RRModePtr *screen_modes; int num_screen_modes = 0; - screen_modes = xalloc ((num_modes ? num_modes : 1) * sizeof (RRModePtr)); + screen_modes = malloc((num_modes ? num_modes : 1) * sizeof (RRModePtr)); if (!screen_modes) return NULL; @@ -243,14 +243,14 @@ RRModeDestroy (RRModePtr mode) num_modes--; if (!num_modes) { - xfree (modes); + free(modes); modes = NULL; } break; } } - xfree (mode); + free(mode); } static int @@ -260,6 +260,9 @@ RRModeDestroyResource (pointer value, XID pid) return 1; } +/* + * Initialize mode type + */ Bool RRModeInit (void) { @@ -268,9 +271,19 @@ RRModeInit (void) RRModeType = CreateNewResourceType (RRModeDestroyResource, "MODE"); if (!RRModeType) return FALSE; + return TRUE; } +/* + * Initialize mode type error value + */ +void +RRModeInitErrorValue(void) +{ + SetResourceTypeErrorValue(RRModeType, RRErrorBase + BadRRMode); +} + int ProcRRCreateMode (ClientPtr client) { @@ -320,7 +333,7 @@ ProcRRCreateMode (ClientPtr client) WriteToClient(client, sizeof(xRRCreateModeReply), (char *)&rep); /* Drop out reference to this mode */ RRModeDestroy (mode); - return client->noClientException; + return Success; } int diff --git a/xserver/randr/rroutput.c b/xserver/randr/rroutput.c index 48b557991..0eb8610eb 100644 --- a/xserver/randr/rroutput.c +++ b/xserver/randr/rroutput.c @@ -63,16 +63,16 @@ RROutputCreate (ScreenPtr pScreen, pScrPriv = rrGetScrPriv(pScreen); if (pScrPriv->numOutputs) - outputs = xrealloc (pScrPriv->outputs, + outputs = realloc(pScrPriv->outputs, (pScrPriv->numOutputs + 1) * sizeof (RROutputPtr)); else - outputs = xalloc (sizeof (RROutputPtr)); + outputs = malloc(sizeof (RROutputPtr)); if (!outputs) return FALSE; pScrPriv->outputs = outputs; - output = xalloc (sizeof (RROutputRec) + nameLength + 1); + output = malloc(sizeof (RROutputRec) + nameLength + 1); if (!output) return NULL; output->id = FakeClientID (0); @@ -128,14 +128,13 @@ RROutputSetClones (RROutputPtr output, } if (numClones) { - newClones = xalloc (numClones * sizeof (RROutputPtr)); + newClones = malloc(numClones * sizeof (RROutputPtr)); if (!newClones) return FALSE; } else newClones = NULL; - if (output->clones) - xfree (output->clones); + free(output->clones); memcpy (newClones, clones, numClones * sizeof (RROutputPtr)); output->clones = newClones; output->numClones = numClones; @@ -167,7 +166,7 @@ RROutputSetModes (RROutputPtr output, if (numModes) { - newModes = xalloc (numModes * sizeof (RRModePtr)); + newModes = malloc(numModes * sizeof (RRModePtr)); if (!newModes) return FALSE; } @@ -177,7 +176,7 @@ RROutputSetModes (RROutputPtr output, { for (i = 0; i < output->numModes; i++) RRModeDestroy (output->modes[i]); - xfree (output->modes); + free(output->modes); } memcpy (newModes, modes, numModes * sizeof (RRModePtr)); output->modes = newModes; @@ -212,10 +211,10 @@ RROutputAddUserMode (RROutputPtr output, return BadMatch; if (output->userModes) - newModes = xrealloc (output->userModes, + newModes = realloc(output->userModes, (output->numUserModes + 1) * sizeof (RRModePtr)); else - newModes = xalloc (sizeof (RRModePtr)); + newModes = malloc(sizeof (RRModePtr)); if (!newModes) return BadAlloc; @@ -274,14 +273,13 @@ RROutputSetCrtcs (RROutputPtr output, } if (numCrtcs) { - newCrtcs = xalloc (numCrtcs * sizeof (RRCrtcPtr)); + newCrtcs = malloc(numCrtcs * sizeof (RRCrtcPtr)); if (!newCrtcs) return FALSE; } else newCrtcs = NULL; - if (output->crtcs) - xfree (output->crtcs); + free(output->crtcs); memcpy (newCrtcs, crtcs, numCrtcs * sizeof (RRCrtcPtr)); output->crtcs = newCrtcs; output->numCrtcs = numCrtcs; @@ -337,7 +335,6 @@ RRDeliverOutputEvent(ClientPtr client, WindowPtr pWin, RROutputPtr output) oe.type = RRNotify + RREventBase; oe.subCode = RRNotify_OutputChange; - oe.sequenceNumber = client->sequence; oe.timestamp = pScrPriv->lastSetTime.milliseconds; oe.configTimestamp = pScrPriv->lastConfigTime.milliseconds; oe.window = pWin->drawable.id; @@ -398,22 +395,18 @@ RROutputDestroyResource (pointer value, XID pid) { for (m = 0; m < output->numModes; m++) RRModeDestroy (output->modes[m]); - xfree (output->modes); + free(output->modes); } for (m = 0; m < output->numUserModes; m++) RRModeDestroy (output->userModes[m]); - if (output->userModes) - xfree (output->userModes); + free(output->userModes); + + free(output->crtcs); + free (output->clones); - if (output->crtcs) - xfree (output->crtcs); - if (output->clones) - xfree (output->clones); -#ifdef notyet RRDeleteAllOutputProperties (output); -#endif - xfree (output); + free (output); return 1; } @@ -426,9 +419,19 @@ RROutputInit (void) RROutputType = CreateNewResourceType (RROutputDestroyResource, "OUTPUT"); if (!RROutputType) return FALSE; + return TRUE; } +/* + * Initialize output type error value + */ +void +RROutputInitErrorValue(void) +{ + SetResourceTypeErrorValue(RROutputType, RRErrorBase + BadRROutput); +} + #define OutputInfoExtra (SIZEOF(xRRGetOutputInfoReply) - 32) int @@ -476,7 +479,7 @@ ProcRRGetOutputInfo (ClientPtr client) if (extraLen) { rep.length += bytes_to_int32(extraLen); - extra = xalloc (extraLen); + extra = malloc(extraLen); if (!extra) return BadAlloc; } @@ -526,10 +529,10 @@ ProcRRGetOutputInfo (ClientPtr client) if (extraLen) { WriteToClient (client, extraLen, (char *) extra); - xfree (extra); + free(extra); } - return client->noClientException; + return Success; } static void @@ -583,7 +586,7 @@ ProcRRSetOutputPrimary(ClientPtr client) pScrPriv = rrGetScrPriv(pWin->drawable.pScreen); RRSetPrimaryOutput(pWin->drawable.pScreen, pScrPriv, output); - return client->noClientException; + return Success; } int @@ -619,5 +622,5 @@ ProcRRGetOutputPrimary(ClientPtr client) WriteToClient(client, sizeof(xRRGetOutputPrimaryReply), &rep); - return client->noClientException; + return Success; } diff --git a/xserver/randr/rrproperty.c b/xserver/randr/rrproperty.c index 12e30e486..ba04c16e2 100644 --- a/xserver/randr/rrproperty.c +++ b/xserver/randr/rrproperty.c @@ -29,7 +29,6 @@ DeliverPropertyEvent(WindowPtr pWin, void *value) { xRROutputPropertyNotifyEvent *event = value; RREventPtr *pHead, pRREvent; - ClientPtr client; dixLookupResourceByType((pointer *)&pHead, pWin->drawable.id, RREventType, serverClient, DixReadAccess); @@ -38,14 +37,9 @@ DeliverPropertyEvent(WindowPtr pWin, void *value) for (pRREvent = *pHead; pRREvent; pRREvent = pRREvent->next) { - client = pRREvent->client; - if (client == serverClient || client->clientGone) - continue; - if (!(pRREvent->mask & RROutputPropertyNotifyMask)) continue; - event->sequenceNumber = client->sequence; event->window = pRREvent->window->drawable.id; WriteEventsToClient(pRREvent->client, 1, (xEvent *)event); } @@ -59,27 +53,39 @@ static void RRDeliverPropertyEvent(ScreenPtr pScreen, xEvent *event) WalkTree(pScreen, DeliverPropertyEvent, event); } +static void +RRDestroyOutputProperty (RRPropertyPtr prop) +{ + free(prop->valid_values); + free(prop->current.data); + free(prop->pending.data); + free(prop); +} + +static void +RRDeleteProperty(RROutputRec *output, RRPropertyRec *prop) +{ + xRROutputPropertyNotifyEvent event; + event.type = RREventBase + RRNotify; + event.subCode = RRNotify_OutputProperty; + event.output = output->id; + event.state = PropertyDelete; + event.atom = prop->propertyName; + event.timestamp = currentTime.milliseconds; + + RRDeliverPropertyEvent(output->pScreen, (xEvent *)&event); + + RRDestroyOutputProperty(prop); +} + void -RRDeleteAllOutputProperties (RROutputPtr output) +RRDeleteAllOutputProperties(RROutputPtr output) { RRPropertyPtr prop, next; - xRROutputPropertyNotifyEvent event; - for (prop = output->properties; prop; prop = next) - { + for (prop = output->properties; prop; prop = next) { next = prop->next; - event.type = RREventBase + RRNotify; - event.subCode = RRNotify_OutputProperty; - event.output = output->id; - event.state = PropertyDelete; - event.atom = prop->propertyName; - event.timestamp = currentTime.milliseconds; - RRDeliverPropertyEvent (output->pScreen, (xEvent *)&event); - if (prop->current.data) - xfree(prop->current.data); - if (prop->pending.data) - xfree(prop->pending.data); - xfree(prop); + RRDeleteProperty(output, prop); } } @@ -97,7 +103,7 @@ RRCreateOutputProperty (Atom property) { RRPropertyPtr prop; - prop = (RRPropertyPtr)xalloc(sizeof(RRPropertyRec)); + prop = (RRPropertyPtr)malloc(sizeof(RRPropertyRec)); if (!prop) return NULL; prop->next = NULL; @@ -112,41 +118,17 @@ RRCreateOutputProperty (Atom property) return prop; } -static void -RRDestroyOutputProperty (RRPropertyPtr prop) -{ - if (prop->valid_values) - xfree (prop->valid_values); - if (prop->current.data) - xfree(prop->current.data); - if (prop->pending.data) - xfree(prop->pending.data); - if (prop->valid_values) - xfree(prop->valid_values); - xfree(prop); -} - void -RRDeleteOutputProperty (RROutputPtr output, Atom property) +RRDeleteOutputProperty(RROutputPtr output, Atom property) { - RRPropertyPtr prop, *prev; - xRROutputPropertyNotifyEvent event; + RRPropertyRec *prop, **prev; for (prev = &output->properties; (prop = *prev); prev = &(prop->next)) - if (prop->propertyName == property) - break; - if (prop) - { - *prev = prop->next; - event.type = RREventBase + RRNotify; - event.subCode = RRNotify_OutputProperty; - event.output = output->id; - event.state = PropertyDelete; - event.atom = prop->propertyName; - event.timestamp = currentTime.milliseconds; - RRDeliverPropertyEvent (output->pScreen, (xEvent *)&event); - RRDestroyOutputProperty (prop); - } + if (prop->propertyName == property) { + *prev = prop->next; + RRDeleteProperty(output, prop); + return; + } } int @@ -172,7 +154,7 @@ RRChangeOutputProperty (RROutputPtr output, Atom property, Atom type, { prop = RRCreateOutputProperty (property); if (!prop) - return(BadAlloc); + return BadAlloc; add = TRUE; mode = PropModeReplace; } @@ -187,9 +169,9 @@ RRChangeOutputProperty (RROutputPtr output, Atom property, Atom type, "PropModeReplace" since they will be written over. */ if ((format != prop_value->format) && (mode != PropModeReplace)) - return(BadMatch); + return BadMatch; if ((prop_value->type != type) && (mode != PropModeReplace)) - return(BadMatch); + return BadMatch; new_value = *prop_value; if (mode == PropModeReplace) total_len = len; @@ -201,7 +183,7 @@ RRChangeOutputProperty (RROutputPtr output, Atom property, Atom type, pointer new_data = NULL, old_data = NULL; total_size = total_len * size_in_bytes; - new_value.data = (pointer)xalloc (total_size); + new_value.data = (pointer)malloc(total_size); if (!new_value.data && total_size) { if (add) @@ -238,12 +220,10 @@ RRChangeOutputProperty (RROutputPtr output, Atom property, Atom type, !pScrPriv->rrOutputSetProperty(output->pScreen, output, prop->propertyName, &new_value)) { - if (new_value.data) - xfree (new_value.data); - return (BadValue); + free(new_value.data); + return BadValue; } - if (prop_value->data) - xfree (prop_value->data); + free(prop_value->data); *prop_value = new_value; } @@ -271,7 +251,7 @@ RRChangeOutputProperty (RROutputPtr output, Atom property, Atom type, event.timestamp = currentTime.milliseconds; RRDeliverPropertyEvent (output->pScreen, (xEvent *)&event); } - return(Success); + return Success; } Bool @@ -361,10 +341,10 @@ RRConfigureOutputProperty (RROutputPtr output, Atom property, { prop = RRCreateOutputProperty (property); if (!prop) - return(BadAlloc); + return BadAlloc; add = TRUE; } else if (prop->immutable && !immutable) - return(BadAccess); + return BadAccess; /* * ranges must have even number of values @@ -372,7 +352,7 @@ RRConfigureOutputProperty (RROutputPtr output, Atom property, if (range && (num_values & 1)) return BadMatch; - new_values = xalloc (num_values * sizeof (INT32)); + new_values = malloc(num_values * sizeof (INT32)); if (!new_values && num_values) return BadAlloc; if (num_values) @@ -384,8 +364,7 @@ RRConfigureOutputProperty (RROutputPtr output, Atom property, */ if (prop->is_pending && !pending) { - if (prop->pending.data) - xfree (prop->pending.data); + free(prop->pending.data); RRInitOutputPropertyValue (&prop->pending); } @@ -393,8 +372,7 @@ RRConfigureOutputProperty (RROutputPtr output, Atom property, prop->range = range; prop->immutable = immutable; prop->num_valid = num_values; - if (prop->valid_values) - xfree (prop->valid_values); + free(prop->valid_values); prop->valid_values = new_values; if (add) { @@ -422,8 +400,8 @@ ProcRRListOutputProperties (ClientPtr client) for (prop = output->properties; prop; prop = prop->next) numProps++; if (numProps) - if(!(pAtoms = (Atom *)xalloc(numProps * sizeof(Atom)))) - return(BadAlloc); + if(!(pAtoms = (Atom *)malloc(numProps * sizeof(Atom)))) + return BadAlloc; rep.type = X_Reply; rep.length = bytes_to_int32(numProps * sizeof(Atom)); @@ -445,9 +423,9 @@ ProcRRListOutputProperties (ClientPtr client) { client->pSwapReplyFunc = (ReplySwapPtr)Swap32Write; WriteSwappedDataToClient(client, numProps * sizeof(Atom), pAtoms); - xfree(pAtoms); + free(pAtoms); } - return(client->noClientException); + return Success; } int @@ -468,7 +446,7 @@ ProcRRQueryOutputProperty (ClientPtr client) return BadName; if (prop->num_valid) { - extra = xalloc(prop->num_valid * sizeof(INT32)); + extra = malloc(prop->num_valid * sizeof(INT32)); if (!extra) return BadAlloc; } @@ -491,9 +469,9 @@ ProcRRQueryOutputProperty (ClientPtr client) client->pSwapReplyFunc = (ReplySwapPtr)Swap32Write; WriteSwappedDataToClient(client, prop->num_valid * sizeof(INT32), extra); - xfree(extra); + free(extra); } - return(client->noClientException); + return Success; } int @@ -552,12 +530,12 @@ ProcRRChangeOutputProperty (ClientPtr client) if (!ValidAtom(stuff->property)) { client->errorValue = stuff->property; - return(BadAtom); + return BadAtom; } if (!ValidAtom(stuff->type)) { client->errorValue = stuff->type; - return(BadAtom); + return BadAtom; } err = RRChangeOutputProperty(output, stuff->property, @@ -566,7 +544,7 @@ ProcRRChangeOutputProperty (ClientPtr client) if (err != Success) return err; else - return client->noClientException; + return Success; } int @@ -582,12 +560,12 @@ ProcRRDeleteOutputProperty (ClientPtr client) if (!ValidAtom(stuff->property)) { client->errorValue = stuff->property; - return (BadAtom); + return BadAtom; } RRDeleteOutputProperty(output, stuff->property); - return client->noClientException; + return Success; } int @@ -610,17 +588,17 @@ ProcRRGetOutputProperty (ClientPtr client) if (!ValidAtom(stuff->property)) { client->errorValue = stuff->property; - return(BadAtom); + return BadAtom; } if ((stuff->delete != xTrue) && (stuff->delete != xFalse)) { client->errorValue = stuff->delete; - return(BadValue); + return BadValue; } if ((stuff->type != AnyPropertyType) && !ValidAtom(stuff->type)) { client->errorValue = stuff->type; - return(BadAtom); + return BadAtom; } for (prev = &output->properties; (prop = *prev); prev = &prop->next) @@ -646,7 +624,7 @@ ProcRRGetOutputProperty (ClientPtr client) swapl(&reply.nItems, n); } WriteToClient(client, sizeof(xRRGetOutputPropertyReply), &reply); - return(client->noClientException); + return Success; } if (prop->immutable && stuff->delete) @@ -678,7 +656,7 @@ ProcRRGetOutputProperty (ClientPtr client) swapl(&reply.nItems, n); } WriteToClient(client, sizeof(xRRGetOutputPropertyReply), &reply); - return(client->noClientException); + return Success; } /* @@ -699,7 +677,7 @@ ProcRRGetOutputProperty (ClientPtr client) len = min(n - ind, 4 * stuff->longLength); if (len) { - extra = xalloc(len); + extra = malloc(len); if (!extra) return BadAlloc; } @@ -745,7 +723,7 @@ ProcRRGetOutputProperty (ClientPtr client) } WriteSwappedDataToClient(client, len, extra); - xfree(extra); + free(extra); } if (stuff->delete && (reply.bytesAfter == 0)) @@ -753,6 +731,6 @@ ProcRRGetOutputProperty (ClientPtr client) *prev = prop->next; RRDestroyOutputProperty (prop); } - return(client->noClientException); + return Success; } diff --git a/xserver/randr/rrscreen.c b/xserver/randr/rrscreen.c index 630ff5742..f58e6578a 100644 --- a/xserver/randr/rrscreen.c +++ b/xserver/randr/rrscreen.c @@ -73,7 +73,7 @@ RREditConnectionInfo (ScreenPtr pScreen) void RRSendConfigNotify (ScreenPtr pScreen) { - WindowPtr pWin = WindowTable[pScreen->myNum]; + WindowPtr pWin = pScreen->root; xEvent event; event.u.u.type = ConfigureNotify; @@ -97,22 +97,16 @@ RRDeliverScreenEvent (ClientPtr client, WindowPtr pWin, ScreenPtr pScreen) rrScrPriv (pScreen); xRRScreenChangeNotifyEvent se; RRCrtcPtr crtc = pScrPriv->numCrtcs ? pScrPriv->crtcs[0] : NULL; - WindowPtr pRoot = WindowTable[pScreen->myNum]; + WindowPtr pRoot = pScreen->root; se.type = RRScreenChangeNotify + RREventBase; se.rotation = (CARD8) (crtc ? crtc->rotation : RR_Rotate_0); se.timestamp = pScrPriv->lastSetTime.milliseconds; - se.sequenceNumber = client->sequence; se.configTimestamp = pScrPriv->lastConfigTime.milliseconds; se.root = pRoot->drawable.id; se.window = pWin->drawable.id; -#ifdef RENDER se.subpixelOrder = PictureGetSubpixelOrder (pScreen); -#else - se.subpixelOrder = SubPixelUnknown; -#endif - se.sequenceNumber = client->sequence; se.sizeID = RR10CurrentSizeID (pScreen); if (se.rotation & (RR_Rotate_90 | RR_Rotate_270)) { @@ -248,7 +242,7 @@ ProcRRGetScreenSizeRange (ClientPtr client) swaps(&rep.maxHeight, n); } WriteToClient(client, sizeof(xRRGetScreenSizeRangeReply), (char *)&rep); - return (client->noClientException); + return Success; } int @@ -387,10 +381,10 @@ rrGetScreenResources(ClientPtr client, Bool query) extraLen = rep.length << 2; if (extraLen) { - extra = xalloc (extraLen); + extra = malloc(extraLen); if (!extra) { - xfree (modes); + free(modes); return BadAlloc; } } @@ -454,7 +448,7 @@ rrGetScreenResources(ClientPtr client, Bool query) mode->mode.nameLength); names += mode->mode.nameLength; } - xfree (modes); + free(modes); assert (bytes_to_int32((char *) names - (char *) extra) == rep.length); } @@ -472,9 +466,9 @@ rrGetScreenResources(ClientPtr client, Bool query) if (extraLen) { WriteToClient (client, extraLen, (char *) extra); - xfree (extra); + free(extra); } - return client->noClientException; + return Success; } int @@ -626,7 +620,7 @@ ProcRRGetScreenInfo (ClientPtr client) rep.setOfRotations = RR_Rotate_0; rep.sequenceNumber = client->sequence; rep.length = 0; - rep.root = WindowTable[pWin->drawable.pScreen->myNum]->drawable.id; + rep.root = pWin->drawable.pScreen->root->drawable.id; rep.timestamp = currentTime.milliseconds; rep.configTimestamp = currentTime.milliseconds; rep.nSizes = 0; @@ -655,7 +649,7 @@ ProcRRGetScreenInfo (ClientPtr client) rep.setOfRotations = output->crtc->rotations; rep.sequenceNumber = client->sequence; rep.length = 0; - rep.root = WindowTable[pWin->drawable.pScreen->myNum]->drawable.id; + rep.root = pWin->drawable.pScreen->root->drawable.id; rep.timestamp = pScrPriv->lastSetTime.milliseconds; rep.configTimestamp = pScrPriv->lastConfigTime.milliseconds; rep.rotation = output->crtc->rotation; @@ -670,10 +664,10 @@ ProcRRGetScreenInfo (ClientPtr client) if (extraLen) { - extra = (CARD8 *) xalloc (extraLen); + extra = (CARD8 *) malloc(extraLen); if (!extra) { - xfree (pData); + free(pData); return BadAlloc; } } @@ -719,7 +713,7 @@ ProcRRGetScreenInfo (ClientPtr client) } } } - xfree (pData); + free(pData); data8 = (CARD8 *) rates; @@ -742,9 +736,9 @@ ProcRRGetScreenInfo (ClientPtr client) if (extraLen) { WriteToClient (client, extraLen, (char *) extra); - xfree (extra); + free(extra); } - return (client->noClientException); + return Success; } int @@ -835,7 +829,7 @@ ProcRRSetScreenConfig (ClientPtr client) * Invalid size ID */ client->errorValue = stuff->sizeID; - xfree (pData); + free(pData); return BadValue; } pSize = &pData->sizes[stuff->sizeID]; @@ -857,7 +851,7 @@ ProcRRSetScreenConfig (ClientPtr client) * Invalid rotation */ client->errorValue = stuff->rotation; - xfree (pData); + free(pData); return BadValue; } @@ -867,7 +861,7 @@ ProcRRSetScreenConfig (ClientPtr client) * requested rotation or reflection not supported by screen */ client->errorValue = stuff->rotation; - xfree (pData); + free(pData); return BadMatch; } @@ -892,7 +886,7 @@ ProcRRSetScreenConfig (ClientPtr client) * Invalid rate */ client->errorValue = rate; - xfree (pData); + free(pData); return BadValue; } mode = pSize->pRates[i].mode; @@ -957,8 +951,7 @@ ProcRRSetScreenConfig (ClientPtr client) sendReply: - if (pData) - xfree (pData); + free(pData); rep.type = X_Reply; /* rep.status has already been filled in */ @@ -967,7 +960,7 @@ sendReply: rep.newTimestamp = pScrPriv->lastSetTime.milliseconds; rep.newConfigTimestamp = pScrPriv->lastConfigTime.milliseconds; - rep.root = WindowTable[pDraw->pScreen->myNum]->drawable.id; + rep.root = pDraw->pScreen->root->drawable.id; if (client->swapped) { @@ -979,7 +972,7 @@ sendReply: } WriteToClient(client, sizeof(xRRSetScreenConfigReply), (char *)&rep); - return (client->noClientException); + return Success; } static CARD16 @@ -1001,7 +994,7 @@ RR10CurrentSizeID (ScreenPtr pScreen) sizeID = (CARD16) i; break; } - xfree (data); + free(data); } } return sizeID; diff --git a/xserver/randr/rrtransform.c b/xserver/randr/rrtransform.c index 06f62984d..e1620498b 100644 --- a/xserver/randr/rrtransform.c +++ b/xserver/randr/rrtransform.c @@ -37,8 +37,7 @@ RRTransformInit (RRTransformPtr transform) void RRTransformFini (RRTransformPtr transform) { - if (transform->params) - xfree (transform->params); + free(transform->params); } Bool @@ -75,15 +74,14 @@ RRTransformSetFilter (RRTransformPtr dst, if (nparams) { - new_params = xalloc (nparams * sizeof (xFixed)); + new_params = malloc(nparams * sizeof (xFixed)); if (!new_params) return FALSE; memcpy (new_params, params, nparams * sizeof (xFixed)); } else new_params = NULL; - if (dst->params) - xfree (dst->params); + free(dst->params); dst->filter = filter; dst->params = new_params; dst->nparams = nparams; @@ -185,21 +183,21 @@ RRTransformCompute (int x, break; case RR_Rotate_90: f_rot_cos = 0; f_rot_sin = 1; - f_rot_dx = height-1; f_rot_dy = 0; + f_rot_dx = height; f_rot_dy = 0; rot_cos = F ( 0); rot_sin = F ( 1); - rot_dx = F (height-1); rot_dy = F (0); + rot_dx = F ( height); rot_dy = F (0); break; case RR_Rotate_180: f_rot_cos = -1; f_rot_sin = 0; - f_rot_dx = width - 1; f_rot_dy = height - 1; + f_rot_dx = width; f_rot_dy = height; rot_cos = F (-1); rot_sin = F ( 0); - rot_dx = F (width-1); rot_dy = F ( height-1); + rot_dx = F (width); rot_dy = F ( height); break; case RR_Rotate_270: f_rot_cos = 0; f_rot_sin = -1; - f_rot_dx = 0; f_rot_dy = width-1; + f_rot_dx = 0; f_rot_dy = width; rot_cos = F ( 0); rot_sin = F (-1); - rot_dx = F ( 0); rot_dy = F ( width-1); + rot_dx = F ( 0); rot_dy = F ( width); break; } @@ -222,11 +220,11 @@ RRTransformCompute (int x, f_scale_x = -1; scale_x = F(-1); if (rotation & (RR_Rotate_0|RR_Rotate_180)) { - f_scale_dx = width-1; - scale_dx = F(width-1); + f_scale_dx = width; + scale_dx = F(width); } else { - f_scale_dx = height-1; - scale_dx = F(height-1); + f_scale_dx = height; + scale_dx = F(height); } } if (rotation & RR_Reflect_Y) @@ -234,11 +232,11 @@ RRTransformCompute (int x, f_scale_y = -1; scale_y = F(-1); if (rotation & (RR_Rotate_0|RR_Rotate_180)) { - f_scale_dy = height-1; - scale_dy = F(height-1); + f_scale_dy = height; + scale_dy = F(height); } else { - f_scale_dy = width-1; - scale_dy = F(width-1); + f_scale_dy = width; + scale_dy = F(width); } } diff --git a/xserver/randr/rrxinerama.c b/xserver/randr/rrxinerama.c index 94c8e54e5..c1bd5bb33 100644 --- a/xserver/randr/rrxinerama.c +++ b/xserver/randr/rrxinerama.c @@ -105,7 +105,7 @@ ProcRRXineramaQueryVersion(ClientPtr client) swaps(&rep.minorVersion, n); } WriteToClient(client, sizeof(xPanoramiXQueryVersionReply), (char *)&rep); - return (client->noClientException); + return Success; } int @@ -143,7 +143,7 @@ ProcRRXineramaGetState(ClientPtr client) swapl (&rep.window, n); } WriteToClient(client, sizeof(xPanoramiXGetStateReply), (char *)&rep); - return client->noClientException; + return Success; } static Bool @@ -198,7 +198,7 @@ ProcRRXineramaGetScreenCount(ClientPtr client) swapl(&rep.window, n); } WriteToClient(client, sizeof(xPanoramiXGetScreenCountReply), (char *)&rep); - return client->noClientException; + return Success; } int @@ -216,7 +216,7 @@ ProcRRXineramaGetScreenSize(ClientPtr client) return rc; pScreen = pWin->drawable.pScreen; - pRoot = WindowTable[pScreen->myNum]; + pRoot = pScreen->root; rep.type = X_Reply; rep.length = 0; @@ -234,7 +234,7 @@ ProcRRXineramaGetScreenSize(ClientPtr client) swapl(&rep.screen, n); } WriteToClient(client, sizeof(xPanoramiXGetScreenSizeReply), (char *)&rep); - return client->noClientException; + return Success; } int @@ -256,7 +256,7 @@ ProcRRXineramaIsActive(ClientPtr client) swapl(&rep.state, n); } WriteToClient(client, sizeof(xXineramaIsActiveReply), (char *) &rep); - return client->noClientException; + return Success; } static void @@ -341,7 +341,7 @@ ProcRRXineramaQueryScreens(ClientPtr client) } } - return client->noClientException; + return Success; } static int diff --git a/xserver/record/Makefile.in b/xserver/record/Makefile.in index 8709a2728..c05f59bca 100644 --- a/xserver/record/Makefile.in +++ b/xserver/record/Makefile.in @@ -107,10 +107,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -198,6 +194,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -212,6 +210,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -229,10 +228,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -288,10 +291,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -309,17 +313,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -346,20 +344,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -451,6 +452,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/record/record.c b/xserver/record/record.c index 1a10c9edc..6a93d7a5c 100644 --- a/xserver/record/record.c +++ b/xserver/record/record.c @@ -43,6 +43,7 @@ and Jim Haggerty of Metheus. #include "swaprep.h" #include "inputstr.h" #include "eventconvert.h" +#include "scrnintstr.h" #include @@ -58,7 +59,6 @@ and Jim Haggerty of Metheus. #include "protocol-versions.h" static RESTYPE RTContext; /* internal resource type for Record contexts */ -static int RecordErrorBase; /* first Record error number */ /* How many bytes of protocol data to buffer in a context. Don't set to less * than 32. @@ -133,7 +133,7 @@ static int numEnabledRCAPs; int rc = dixLookupResourceByType((pointer *)&(_pContext), _contextid, \ RTContext, _client, DixUseAccess); \ if (rc != Success) \ - return (rc == BadValue) ? RecordErrorBase + XRecordBadContext : rc; \ + return rc; \ } static int RecordDeleteContext( @@ -167,8 +167,8 @@ typedef struct { ProcFunctionPtr recordVector[256]; } RecordClientPrivateRec, *RecordClientPrivatePtr; -static int RecordClientPrivateKeyIndex; -static DevPrivateKey RecordClientPrivateKey = &RecordClientPrivateKeyIndex; +static DevPrivateKeyRec RecordClientPrivateKeyRec; +#define RecordClientPrivateKey (&RecordClientPrivateKeyRec) /* RecordClientPrivatePtr RecordClientPrivate(ClientPtr) * gets the client private of the given client. Syntactic sugar. @@ -756,11 +756,11 @@ RecordSendProtocolEvents(RecordClientsAndProtocolPtr pRCAP, int scr = XineramaGetCursorScreen(inputInfo.pointer); memcpy(&shiftedEvent, pev, sizeof(xEvent)); shiftedEvent.u.keyButtonPointer.rootX += - panoramiXdataPtr[scr].x - - panoramiXdataPtr[0].x; + screenInfo.screens[scr]->x - + screenInfo.screens[0]->x; shiftedEvent.u.keyButtonPointer.rootY += - panoramiXdataPtr[scr].y - - panoramiXdataPtr[0].y; + screenInfo.screens[scr]->y - + screenInfo.screens[0]->y; pEvToRecord = &shiftedEvent; } #endif /* PANORAMIX */ @@ -825,7 +825,7 @@ RecordADeviceEvent(CallbackListPtr *pcbl, pointer nulldata, pointer calldata) EventToXI(pei->event, &xi_events, &count); RecordSendProtocolEvents(pRCAP, pContext, xi_events, count); - xfree(xi_events); + free(xi_events); } /* end this RCAP selects device events */ } /* end for each RCAP on this context */ } /* end for each enabled context */ @@ -913,7 +913,7 @@ RecordInstallHooks(RecordClientsAndProtocolPtr pRCAP, XID oneclient) RecordClientPrivatePtr pClientPriv; /* no Record proc vector; allocate one */ pClientPriv = (RecordClientPrivatePtr) - xalloc(sizeof(RecordClientPrivateRec)); + malloc(sizeof(RecordClientPrivateRec)); if (!pClientPriv) return BadAlloc; /* copy old proc vector to new */ @@ -997,10 +997,11 @@ RecordUninstallHooks(RecordClientsAndProtocolPtr pRCAP, XID oneclient) ClientPtr pClient = clients[CLIENT_ID(client)]; int c; Bool otherRCAPwantsProcVector = FALSE; - RecordClientPrivatePtr pClientPriv = - RecordClientPrivate(pClient); + RecordClientPrivatePtr pClientPriv = NULL; - assert (pClient && RecordClientPrivate(pClient)); + assert (pClient); + pClientPriv = RecordClientPrivate(pClient); + assert (pClientPriv); memcpy(pClientPriv->recordVector, pClientPriv->originalVector, sizeof (pClientPriv->recordVector)); @@ -1033,7 +1034,7 @@ RecordUninstallHooks(RecordClientsAndProtocolPtr pRCAP, XID oneclient) pClient->requestVector = pClientPriv->originalVector; dixSetPrivate(&pClient->devPrivates, RecordClientPrivateKey, NULL); - xfree(pClientPriv); + free(pClientPriv); } } /* end if this RCAP specifies any requests */ } /* end if not future clients */ @@ -1101,8 +1102,8 @@ RecordDeleteClientFromRCAP(RecordClientsAndProtocolPtr pRCAP, int position) } /* free the RCAP */ if (pRCAP->clientIDsSeparatelyAllocated) - xfree(pRCAP->pClientIDs); - xfree(pRCAP); + free(pRCAP->pClientIDs); + free(pRCAP); } } /* RecordDeleteClientFromRCAP */ @@ -1130,7 +1131,7 @@ RecordAddClientToRCAP(RecordClientsAndProtocolPtr pRCAP, XID clientspec) { if (pRCAP->clientIDsSeparatelyAllocated) { - XID *pNewIDs = (XID *)xrealloc(pRCAP->pClientIDs, + XID *pNewIDs = (XID *)realloc(pRCAP->pClientIDs, (pRCAP->sizeClients + CLIENT_ARRAY_GROWTH_INCREMENT) * sizeof(XID)); if (!pNewIDs) @@ -1140,7 +1141,7 @@ RecordAddClientToRCAP(RecordClientsAndProtocolPtr pRCAP, XID clientspec) } else { - XID *pNewIDs = (XID *)xalloc((pRCAP->sizeClients + + XID *pNewIDs = (XID *)malloc((pRCAP->sizeClients + CLIENT_ARRAY_GROWTH_INCREMENT) * sizeof(XID)); if (!pNewIDs) return; @@ -1246,7 +1247,7 @@ RecordSanityCheckClientSpecifiers(ClientPtr client, XID *clientspecs, int nspecs * - XRecordCurrentClients expanded to a list of all currently * connected clients - excludespec (if non-zero) * The returned array may be the passed array modified in place, or - * it may be an Xalloc'ed array. The caller should keep a pointer to the + * it may be an malloc'ed array. The caller should keep a pointer to the * original array and free the returned array if it is different. * * *pNumClientspecs is set to the number of elements in the returned @@ -1278,7 +1279,7 @@ RecordCanonicalizeClientSpecifiers(XID *pClientspecs, int *pNumClientspecs, XID pClientspecs[i] == XRecordCurrentClients) { /* expand All/Current */ int j, nc; - XID *pCanon = (XID *)xalloc(sizeof(XID) * (currentMaxClients + 1)); + XID *pCanon = (XID *)malloc(sizeof(XID) * (currentMaxClients + 1)); if (!pCanon) return NULL; for (nc = 0, j = 1; j < currentMaxClients; j++) { @@ -1492,10 +1493,10 @@ RecordAllocIntervals(SetInfoPtr psi, int nIntervals) { assert(!psi->intervals); psi->intervals = (RecordSetInterval *) - xalloc(nIntervals * sizeof(RecordSetInterval)); + malloc(nIntervals * sizeof(RecordSetInterval)); if (!psi->intervals) return BadAlloc; - bzero(psi->intervals, nIntervals * sizeof(RecordSetInterval)); + memset(psi->intervals, 0, nIntervals * sizeof(RecordSetInterval)); psi->size = nIntervals; return Success; } /* end RecordAllocIntervals */ @@ -1663,13 +1664,13 @@ RecordRegisterClients(RecordContextPtr pContext, ClientPtr client, xRecordRegist * range for extension replies. */ maxSets = PREDEFSETS + 2 * stuff->nRanges; - si = (SetInfoPtr)xalloc(sizeof(SetInfoRec) * maxSets); + si = (SetInfoPtr)malloc(sizeof(SetInfoRec) * maxSets); if (!si) { err = BadAlloc; goto bailout; } - bzero(si, sizeof(SetInfoRec) * maxSets); + memset(si, 0, sizeof(SetInfoRec) * maxSets); /* theoretically you must do this because NULL may not be all-bits-zero */ for (i = 0; i < maxSets; i++) @@ -1755,7 +1756,7 @@ RecordRegisterClients(RecordContextPtr pContext, ClientPtr client, xRecordRegist /* allocate memory for the whole RCAP */ - pRCAP = (RecordClientsAndProtocolPtr)xalloc(totRCAPsize); + pRCAP = (RecordClientsAndProtocolPtr)malloc(totRCAPsize); if (!pRCAP) { err = BadAlloc; @@ -1868,12 +1869,11 @@ bailout: if (si) { for (i = 0; i < maxSets; i++) - if (si[i].intervals) - xfree(si[i].intervals); - xfree(si); + free(si[i].intervals); + free(si); } if (pCanonClients && pCanonClients != (XID *)&stuff[1]) - xfree(pCanonClients); + free(pCanonClients); return err; } /* RecordRegisterClients */ @@ -1903,7 +1903,7 @@ ProcRecordQueryVersion(ClientPtr client) } (void)WriteToClient(client, sizeof(xRecordQueryVersionReply), (char *)&rep); - return (client->noClientException); + return Success; } /* ProcRecordQueryVersion */ @@ -1918,14 +1918,14 @@ ProcRecordCreateContext(ClientPtr client) REQUEST_AT_LEAST_SIZE(xRecordCreateContextReq); LEGAL_NEW_RESOURCE(stuff->context, client); - pContext = (RecordContextPtr)xalloc(sizeof(RecordContextRec)); + pContext = (RecordContextPtr)malloc(sizeof(RecordContextRec)); if (!pContext) goto bailout; /* make sure there is room in ppAllContexts to store the new context */ ppNewAllContexts = (RecordContextPtr *) - xrealloc(ppAllContexts, sizeof(RecordContextPtr) * (numContexts + 1)); + realloc(ppAllContexts, sizeof(RecordContextPtr) * (numContexts + 1)); if (!ppNewAllContexts) goto bailout; ppAllContexts = ppNewAllContexts; @@ -1955,8 +1955,7 @@ ProcRecordCreateContext(ClientPtr client) err = BadAlloc; } bailout: - if (pContext) - xfree(pContext); + free(pContext); return err; } /* ProcRecordCreateContext */ @@ -2005,7 +2004,7 @@ ProcRecordUnregisterClients(ClientPtr client) RecordDeleteClientFromContext(pContext, pCanonClients[i]); } if (pCanonClients != (XID *)&stuff[1]) - xfree(pCanonClients); + free(pCanonClients); return Success; } /* ProcRecordUnregisterClients */ @@ -2046,14 +2045,14 @@ RecordAllocRanges(GetContextRangeInfoPtr pri, int nRanges) #define SZINCR 8 newsize = max(pri->size + SZINCR, nRanges); - pNewRange = (xRecordRange *)xrealloc(pri->pRanges, + pNewRange = (xRecordRange *)realloc(pri->pRanges, newsize * sizeof(xRecordRange)); if (!pNewRange) return BadAlloc; pri->pRanges = pNewRange; pri->size = newsize; - bzero(&pri->pRanges[pri->size - SZINCR], SZINCR * sizeof(xRecordRange)); + memset(&pri->pRanges[pri->size - SZINCR], 0, SZINCR * sizeof(xRecordRange)); if (pri->nRanges < nRanges) pri->nRanges = nRanges; return Success; @@ -2237,7 +2236,7 @@ ProcRecordGetContext(ClientPtr client) /* allocate and initialize space for record range info */ - pRangeInfo = (GetContextRangeInfoPtr)xalloc( + pRangeInfo = (GetContextRangeInfoPtr)malloc( nRCAPs * sizeof(GetContextRangeInfoRec)); if (!pRangeInfo && nRCAPs > 0) return BadAlloc; @@ -2347,14 +2346,14 @@ ProcRecordGetContext(ClientPtr client) (char *)pri->pRanges); } } - err = client->noClientException; + err = Success; bailout: for (i = 0; i < nRCAPs; i++) { - if (pRangeInfo[i].pRanges) xfree(pRangeInfo[i].pRanges); + free(pRangeInfo[i].pRanges); } - xfree(pRangeInfo); + free(pRangeInfo); return err; } /* ProcRecordGetContext */ @@ -2522,8 +2521,6 @@ RecordDeleteContext(pointer value, XID id) } } - xfree(pContext); - /* remove context from AllContexts list */ if (-1 != (i = RecordFindContextOnAllContexts(pContext))) @@ -2531,10 +2528,12 @@ RecordDeleteContext(pointer value, XID id) ppAllContexts[i] = ppAllContexts[numContexts - 1]; if (--numContexts == 0) { - xfree(ppAllContexts); + free(ppAllContexts); ppAllContexts = NULL; } } + free(pContext); + return Success; } /* RecordDeleteContext */ @@ -2764,14 +2763,14 @@ RecordConnectionSetupInfo(RecordContextPtr pContext, NewClientInfoRec *pci) if (pci->client->swapped) { - char *pConnSetup = (char *)xalloc(prefixsize + restsize); + char *pConnSetup = (char *)malloc(prefixsize + restsize); if (!pConnSetup) return; SwapConnSetupPrefix(pci->prefix, (xConnSetupPrefix*)pConnSetup); SwapConnSetupInfo((char*)pci->setup, (char*)(pConnSetup + prefixsize)); RecordAProtocolElement(pContext, pci->client, XRecordClientStarted, (pointer)pConnSetup, prefixsize + restsize, 0); - xfree(pConnSetup); + free(pConnSetup); } else { @@ -2815,6 +2814,8 @@ RecordAClientStateChange(CallbackListPtr *pcbl, pointer nulldata, pointer callda NewClientInfoRec *pci = (NewClientInfoRec *)calldata; int i; ClientPtr pClient = pci->client; + RecordContextPtr *ppAllContextsCopy = NULL; + int numContextsCopy = 0; switch (pClient->clientState) { @@ -2836,10 +2837,17 @@ RecordAClientStateChange(CallbackListPtr *pcbl, pointer nulldata, pointer callda case ClientStateGone: case ClientStateRetained: /* client disconnected */ - for (i = 0; i < numContexts; i++) + + /* RecordDisableContext modifies contents of ppAllContexts. */ + numContextsCopy = numContexts; + ppAllContextsCopy = malloc(numContextsCopy * sizeof(RecordContextPtr)); + assert(ppAllContextsCopy); + memcpy(ppAllContextsCopy, ppAllContexts, numContextsCopy * sizeof(RecordContextPtr)); + + for (i = 0; i < numContextsCopy; i++) { RecordClientsAndProtocolPtr pRCAP; - RecordContextPtr pContext = ppAllContexts[i]; + RecordContextPtr pContext = ppAllContextsCopy[i]; int pos; if (pContext->pRecordingClient == pClient) @@ -2853,6 +2861,8 @@ RecordAClientStateChange(CallbackListPtr *pcbl, pointer nulldata, pointer callda RecordDeleteClientFromRCAP(pRCAP, pos); } } + + free(ppAllContextsCopy); break; default: @@ -2897,6 +2907,9 @@ RecordExtensionInit(void) if (!RTContext) return; + if (!dixRegisterPrivateKey(RecordClientPrivateKey, PRIVATE_CLIENT, 0)) + return; + ppAllContexts = NULL; numContexts = numEnabledContexts = numEnabledRCAPs = 0; @@ -2911,7 +2924,7 @@ RecordExtensionInit(void) DeleteCallback(&ClientStateCallback, RecordAClientStateChange, NULL); return; } - RecordErrorBase = extentry->errorBase; + SetResourceTypeErrorValue(RTContext, extentry->errorBase + XRecordBadContext); } /* RecordExtensionInit */ diff --git a/xserver/record/set.c b/xserver/record/set.c index f0e094eed..a9a6a4465 100644 --- a/xserver/record/set.c +++ b/xserver/record/set.c @@ -87,7 +87,7 @@ typedef struct { static void BitVectorDestroySet(RecordSetPtr pSet) { - xfree(pSet); + free(pSet); } static unsigned long @@ -199,7 +199,7 @@ BitVectorCreateSet(RecordSetInterval *pIntervals, int nIntervals, } else { - pbvs = (BitVectorSetPtr)Xcalloc(memsize); + pbvs = (BitVectorSetPtr)calloc(1, memsize); if (!pbvs) return NULL; pbvs->baseSet.ops = &BitVectorSetOperations; } @@ -233,7 +233,7 @@ typedef struct { static void IntervalListDestroySet(RecordSetPtr pSet) { - xfree(pSet); + free(pSet); } static unsigned long @@ -302,7 +302,7 @@ IntervalListCreateSet(RecordSetInterval *pIntervals, int nIntervals, if (nIntervals > 0) { - stackIntervals = (RecordSetInterval *)xalloc( + stackIntervals = (RecordSetInterval *)malloc( sizeof(RecordSetInterval) * nIntervals); if (!stackIntervals) return NULL; @@ -353,14 +353,14 @@ IntervalListCreateSet(RecordSetInterval *pIntervals, int nIntervals, else { prls = (IntervalListSetPtr) - xalloc(sizeof(IntervalListSet) + nIntervals * sizeof(RecordSetInterval)); + malloc(sizeof(IntervalListSet) + nIntervals * sizeof(RecordSetInterval)); if (!prls) goto bailout; prls->baseSet.ops = &IntervalListSetOperations; } memcpy(&prls[1], stackIntervals, nIntervals * sizeof(RecordSetInterval)); prls->nIntervals = nIntervals; bailout: - if (stackIntervals) xfree(stackIntervals); + free(stackIntervals); return (RecordSetPtr)prls; } diff --git a/xserver/render/Makefile.in b/xserver/render/Makefile.in index 6e7a76119..5a935a0a6 100644 --- a/xserver/render/Makefile.in +++ b/xserver/render/Makefile.in @@ -122,10 +122,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -213,6 +209,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -227,6 +225,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -244,10 +243,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -303,10 +306,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -324,17 +328,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -361,20 +359,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -466,6 +467,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/render/animcur.c b/xserver/render/animcur.c index 276e5e4af..2160f5043 100644 --- a/xserver/render/animcur.c +++ b/xserver/render/animcur.c @@ -58,10 +58,6 @@ typedef struct _AnimCur { } AnimCurRec, *AnimCurPtr; typedef struct _AnimScrPriv { - CursorPtr pCursor; - int elt; - CARD32 time; - CloseScreenProcPtr CloseScreen; ScreenBlockHandlerProcPtr BlockHandler; @@ -74,31 +70,18 @@ typedef struct _AnimScrPriv { RecolorCursorProcPtr RecolorCursor; } AnimCurScreenRec, *AnimCurScreenPtr; -typedef struct _AnimCurState { - CursorPtr pCursor; - ScreenPtr pScreen; - int elt; - CARD32 time; -} AnimCurStateRec, *AnimCurStatePtr; - -/* What a waste. But we need an API change to alloc it per device only. */ -static AnimCurStateRec animCurState[MAXDEVICES]; - static unsigned char empty[4]; static CursorBits animCursorBits = { empty, empty, 2, 1, 1, 0, 0, 1 }; -static int AnimCurGeneration; - -static int AnimCurScreenPrivateKeyIndex; -static DevPrivateKey AnimCurScreenPrivateKey = &AnimCurScreenPrivateKeyIndex; +static DevPrivateKeyRec AnimCurScreenPrivateKeyRec; +#define AnimCurScreenPrivateKey (&AnimCurScreenPrivateKeyRec) #define IsAnimCur(c) ((c) && ((c)->bits == &animCursorBits)) -#define GetAnimCur(c) ((AnimCurPtr) ((c) + 1)) +#define GetAnimCur(c) ((AnimCurPtr) ((((char *)(c) + CURSOR_REC_SIZE)))) #define GetAnimCurScreen(s) ((AnimCurScreenPtr)dixLookupPrivate(&(s)->devPrivates, AnimCurScreenPrivateKey)) -#define GetAnimCurScreenIfSet(s) GetAnimCurScreen(s) #define SetAnimCurScreen(s,p) dixSetPrivate(&(s)->devPrivates, AnimCurScreenPrivateKey, p) #define Wrap(as,s,elt,func) (((as)->elt = (s)->elt), (s)->elt = func) @@ -123,7 +106,7 @@ AnimCurCloseScreen (int index, ScreenPtr pScreen) Unwrap(as, pScreen, RecolorCursor); SetAnimCurScreen(pScreen,0); ret = (*pScreen->CloseScreen) (index, pScreen); - xfree (as); + free(as); return ret; } @@ -172,14 +155,14 @@ AnimCurScreenBlockHandler (int screenNum, for (dev = inputInfo.devices; dev; dev = dev->next) { - if (IsPointerDevice(dev) && pScreen == animCurState[dev->id].pScreen) + if (IsPointerDevice(dev) && pScreen == dev->spriteInfo->anim.pScreen) { if (!now) now = GetTimeInMillis (); - if ((INT32) (now - animCurState[dev->id].time) >= 0) + if ((INT32) (now - dev->spriteInfo->anim.time) >= 0) { - AnimCurPtr ac = GetAnimCur(animCurState[dev->id].pCursor); - int elt = (animCurState[dev->id].elt + 1) % ac->nelt; + AnimCurPtr ac = GetAnimCur(dev->spriteInfo->anim.pCursor); + int elt = (dev->spriteInfo->anim.elt + 1) % ac->nelt; DisplayCursorProcPtr DisplayCursor; /* @@ -195,12 +178,12 @@ AnimCurScreenBlockHandler (int screenNum, as->DisplayCursor = pScreen->DisplayCursor; pScreen->DisplayCursor = DisplayCursor; - animCurState[dev->id].elt = elt; - animCurState[dev->id].time = now + ac->elts[elt].delay; + dev->spriteInfo->anim.elt = elt; + dev->spriteInfo->anim.time = now + ac->elts[elt].delay; } - if (soonest > animCurState[dev->id].time) - soonest = animCurState[dev->id].time; + if (soonest > dev->spriteInfo->anim.time) + soonest = dev->spriteInfo->anim.time; } } @@ -223,7 +206,7 @@ AnimCurDisplayCursor (DeviceIntPtr pDev, Unwrap (as, pScreen, DisplayCursor); if (IsAnimCur(pCursor)) { - if (pCursor != animCurState[pDev->id].pCursor) + if (pCursor != pDev->spriteInfo->anim.pCursor) { AnimCurPtr ac = GetAnimCur(pCursor); @@ -231,10 +214,10 @@ AnimCurDisplayCursor (DeviceIntPtr pDev, (pDev, pScreen, ac->elts[0].pCursor); if (ret) { - animCurState[pDev->id].elt = 0; - animCurState[pDev->id].time = GetTimeInMillis () + ac->elts[0].delay; - animCurState[pDev->id].pCursor = pCursor; - animCurState[pDev->id].pScreen = pScreen; + pDev->spriteInfo->anim.elt = 0; + pDev->spriteInfo->anim.time = GetTimeInMillis () + ac->elts[0].delay; + pDev->spriteInfo->anim.pCursor = pCursor; + pDev->spriteInfo->anim.pScreen = pScreen; } } else @@ -242,8 +225,8 @@ AnimCurDisplayCursor (DeviceIntPtr pDev, } else { - animCurState[pDev->id].pCursor = 0; - animCurState[pDev->id].pScreen = 0; + pDev->spriteInfo->anim.pCursor = 0; + pDev->spriteInfo->anim.pScreen = 0; ret = (*pScreen->DisplayCursor) (pDev, pScreen, pCursor); } Wrap (as, pScreen, DisplayCursor, AnimCurDisplayCursor); @@ -261,8 +244,8 @@ AnimCurSetCursorPosition (DeviceIntPtr pDev, Bool ret; Unwrap (as, pScreen, SetCursorPosition); - if (animCurState[pDev->id].pCursor) - animCurState[pDev->id].pScreen = pScreen; + if (pDev->spriteInfo->anim.pCursor) + pDev->spriteInfo->anim.pScreen = pScreen; ret = (*pScreen->SetCursorPosition) (pDev, pScreen, x, y, generateEvent); Wrap (as, pScreen, SetCursorPosition, AnimCurSetCursorPosition); return ret; @@ -327,7 +310,7 @@ AnimCurRecolorCursor (DeviceIntPtr pDev, for (i = 0; i < ac->nelt; i++) (*pScreen->RecolorCursor) (pDev, pScreen, ac->elts[i].pCursor, displayed && - animCurState[pDev->id].elt == i); + pDev->spriteInfo->anim.elt == i); } else (*pScreen->RecolorCursor) (pDev, pScreen, pCursor, displayed); @@ -339,18 +322,10 @@ AnimCurInit (ScreenPtr pScreen) { AnimCurScreenPtr as; - if (AnimCurGeneration != serverGeneration) - { - int i; - AnimCurGeneration = serverGeneration; - for (i = 0; i < MAXDEVICES; i++) { - animCurState[i].pCursor = 0; - animCurState[i].pScreen = 0; - animCurState[i].elt = 0; - animCurState[i].time = 0; - } - } - as = (AnimCurScreenPtr) xalloc (sizeof (AnimCurScreenRec)); + if (!dixRegisterPrivateKey(&AnimCurScreenPrivateKeyRec, PRIVATE_SCREEN, 0)) + return FALSE; + + as = (AnimCurScreenPtr) malloc(sizeof (AnimCurScreenRec)); if (!as) return FALSE; Wrap(as, pScreen, CloseScreen, AnimCurCloseScreen); @@ -375,18 +350,19 @@ AnimCursorCreate (CursorPtr *cursors, CARD32 *deltas, int ncursor, CursorPtr *pp AnimCurPtr ac; for (i = 0; i < screenInfo.numScreens; i++) - if (!GetAnimCurScreenIfSet (screenInfo.screens[i])) + if (!GetAnimCurScreen (screenInfo.screens[i])) return BadImplementation; for (i = 0; i < ncursor; i++) if (IsAnimCur (cursors[i])) return BadMatch; - pCursor = (CursorPtr) xalloc (sizeof (CursorRec) + - sizeof (AnimCurRec) + - ncursor * sizeof (AnimCurElt)); + pCursor = (CursorPtr) calloc(CURSOR_REC_SIZE + + sizeof (AnimCurRec) + + ncursor * sizeof (AnimCurElt), 1); if (!pCursor) return BadAlloc; + dixInitPrivates(pCursor, pCursor + 1, PRIVATE_CURSOR); pCursor->bits = &animCursorBits; pCursor->refcnt = 1; @@ -399,14 +375,13 @@ AnimCursorCreate (CursorPtr *cursors, CARD32 *deltas, int ncursor, CursorPtr *pp pCursor->backBlue = cursors[0]->backBlue; pCursor->id = cid; - pCursor->devPrivates = NULL; /* security creation/labeling check */ rc = XaceHook(XACE_RESOURCE_ACCESS, client, cid, RT_CURSOR, pCursor, RT_NONE, NULL, DixCreateAccess); if (rc != Success) { - dixFreePrivates(pCursor->devPrivates); - xfree(pCursor); + dixFiniPrivates(pCursor, PRIVATE_CURSOR); + free(pCursor); return rc; } diff --git a/xserver/render/filter.c b/xserver/render/filter.c index 89cc0646a..8bb6d5ec2 100644 --- a/xserver/render/filter.c +++ b/xserver/render/filter.c @@ -60,18 +60,18 @@ PictureGetFilterId (char *filter, int len, Bool makeit) return i; if (!makeit) return -1; - name = xalloc (len + 1); + name = malloc(len + 1); if (!name) return -1; memcpy (name, filter, len); name[len] = '\0'; if (filterNames) - names = xrealloc (filterNames, (nfilterNames + 1) * sizeof (char *)); + names = realloc(filterNames, (nfilterNames + 1) * sizeof (char *)); else - names = xalloc (sizeof (char *)); + names = malloc(sizeof (char *)); if (!names) { - xfree (name); + free(name); return -1; } filterNames = names; @@ -117,8 +117,8 @@ PictureFreeFilterIds (void) int i; for (i = 0; i < nfilterNames; i++) - xfree (filterNames[i]); - xfree (filterNames); + free(filterNames[i]); + free(filterNames); nfilterNames = 0; filterNames = 0; } @@ -144,9 +144,9 @@ PictureAddFilter (ScreenPtr pScreen, if (ps->filters[i].id == id) return -1; if (ps->filters) - filters = xrealloc (ps->filters, (ps->nfilters + 1) * sizeof (PictFilterRec)); + filters = realloc(ps->filters, (ps->nfilters + 1) * sizeof (PictFilterRec)); else - filters = xalloc (sizeof (PictFilterRec)); + filters = malloc(sizeof (PictFilterRec)); if (!filters) return -1; ps->filters = filters; @@ -177,11 +177,11 @@ PictureSetFilterAlias (ScreenPtr pScreen, char *filter, char *alias) PictFilterAliasPtr aliases; if (ps->filterAliases) - aliases = xrealloc (ps->filterAliases, + aliases = realloc(ps->filterAliases, (ps->nfilterAliases + 1) * sizeof (PictFilterAliasRec)); else - aliases = xalloc (sizeof (PictFilterAliasRec)); + aliases = malloc(sizeof (PictFilterAliasRec)); if (!aliases) return FALSE; ps->filterAliases = aliases; @@ -273,8 +273,8 @@ PictureResetFilters (ScreenPtr pScreen) { PictureScreenPtr ps = GetPictureScreen(pScreen); - xfree (ps->filters); - xfree (ps->filterAliases); + free(ps->filters); + free(ps->filterAliases); PictureFreeFilterIds (); } @@ -335,10 +335,10 @@ SetPicturePictFilter (PicturePtr pPicture, PictFilterPtr pFilter, if (nparams != pPicture->filter_nparams) { - xFixed *new_params = xalloc (nparams * sizeof (xFixed)); + xFixed *new_params = malloc(nparams * sizeof (xFixed)); if (!new_params && nparams) return BadAlloc; - xfree (pPicture->filter_params); + free(pPicture->filter_params); pPicture->filter_params = new_params; pPicture->filter_nparams = nparams; } diff --git a/xserver/render/glyph.c b/xserver/render/glyph.c index f0f3b1913..7193d4763 100644 --- a/xserver/render/glyph.c +++ b/xserver/render/glyph.c @@ -84,19 +84,13 @@ static const CARD8 glyphDepths[GlyphFormatNum] = { 1, 4, 8, 16, 32 }; static GlyphHashRec globalGlyphs[GlyphFormatNum]; -static void -FreeGlyphPrivates (GlyphPtr glyph) -{ - dixFreePrivates(glyph->devPrivates); - glyph->devPrivates = NULL; -} - void GlyphUninit (ScreenPtr pScreen) { PictureScreenPtr ps = GetPictureScreen (pScreen); GlyphPtr glyph; int fdepth, i; + int scrno = pScreen->myNum; for (fdepth = 0; fdepth < GlyphFormatNum; fdepth++) { @@ -108,20 +102,15 @@ GlyphUninit (ScreenPtr pScreen) glyph = globalGlyphs[fdepth].table[i].glyph; if (glyph && glyph != DeletedGlyph) { + if (GlyphPicture(glyph)[scrno]) + { + FreePicture ((pointer) GlyphPicture (glyph)[scrno], 0); + GlyphPicture(glyph)[scrno] = NULL; + } (*ps->UnrealizeGlyph) (pScreen, glyph); - FreeGlyphPrivates(glyph); } } } - - for (fdepth = 0; fdepth < GlyphFormatNum; fdepth++) - { - if (!globalGlyphs[fdepth].hashSet) - continue; - - for (i = 0; i < globalGlyphs[fdepth].hashSet->size; i++) - glyph = globalGlyphs[fdepth].table[i].glyph; - } } GlyphHashSetPtr @@ -310,8 +299,7 @@ FreeGlyph (GlyphPtr glyph, int format) } FreeGlyphPicture(glyph); - FreeGlyphPrivates(glyph); - xfree (glyph); + dixFreeObjectWithPrivates(glyph, PRIVATE_GLYPH); } } @@ -329,8 +317,7 @@ AddGlyph (GlyphSetPtr glyphSet, GlyphPtr glyph, Glyph id) if (gr->glyph && gr->glyph != DeletedGlyph && gr->glyph != glyph) { FreeGlyphPicture(glyph); - FreeGlyphPrivates(glyph); - xfree (glyph); + dixFreeObjectWithPrivates(glyph, PRIVATE_GLYPH); glyph = gr->glyph; } else if (gr->glyph != glyph) @@ -388,15 +375,17 @@ AllocateGlyph (xGlyphInfo *gi, int fdepth) int size; GlyphPtr glyph; int i; + int head_size; - size = screenInfo.numScreens * sizeof (PicturePtr); - glyph = (GlyphPtr) xalloc (size + sizeof (GlyphRec)); + head_size = sizeof (GlyphRec) + screenInfo.numScreens * sizeof (PicturePtr); + size = (head_size + dixPrivatesSize(PRIVATE_GLYPH)); + glyph = (GlyphPtr) malloc (size); if (!glyph) return 0; glyph->refcnt = 0; glyph->size = size + sizeof (xGlyphInfo); glyph->info = *gi; - glyph->devPrivates = NULL; + dixInitPrivates(glyph, (char *) glyph + head_size, PRIVATE_GLYPH); for (i = 0; i < screenInfo.numScreens; i++) { @@ -420,15 +409,14 @@ bail: (*ps->UnrealizeGlyph) (screenInfo.screens[i], glyph); } - FreeGlyphPrivates(glyph); - xfree (glyph); + dixFreeObjectWithPrivates(glyph, PRIVATE_GLYPH); return 0; } Bool AllocateGlyphHash (GlyphHashPtr hash, GlyphHashSetPtr hashSet) { - hash->table = xcalloc (hashSet->size, sizeof (GlyphRefRec)); + hash->table = calloc(hashSet->size, sizeof (GlyphRefRec)); if (!hash->table) return FALSE; hash->hashSet = hashSet; @@ -471,7 +459,7 @@ ResizeGlyphHash (GlyphHashPtr hash, CARD32 change, Bool global) ++newHash.tableEntries; } } - xfree (hash->table); + free(hash->table); } *hash = newHash; if (global) @@ -490,7 +478,6 @@ GlyphSetPtr AllocateGlyphSet (int fdepth, PictFormatPtr format) { GlyphSetPtr glyphSet; - int size; if (!globalGlyphs[fdepth].hashSet) { @@ -498,14 +485,13 @@ AllocateGlyphSet (int fdepth, PictFormatPtr format) return FALSE; } - size = sizeof (GlyphSetRec); - glyphSet = xcalloc (1, size); + glyphSet = dixAllocateObjectWithPrivates(GlyphSetRec, PRIVATE_GLYPHSET); if (!glyphSet) return FALSE; if (!AllocateGlyphHash (&glyphSet->hash, &glyphHashSets[0])) { - xfree (glyphSet); + free(glyphSet); return FALSE; } glyphSet->refcnt = 1; @@ -534,15 +520,14 @@ FreeGlyphSet (pointer value, } if (!globalGlyphs[glyphSet->fdepth].tableEntries) { - xfree (globalGlyphs[glyphSet->fdepth].table); + free(globalGlyphs[glyphSet->fdepth].table); globalGlyphs[glyphSet->fdepth].table = 0; globalGlyphs[glyphSet->fdepth].hashSet = 0; } else ResizeGlyphHash (&globalGlyphs[glyphSet->fdepth], 0, TRUE); - xfree (table); - dixFreePrivates(glyphSet->devPrivates); - xfree (glyphSet); + free(table); + dixFreeObjectWithPrivates(glyphSet, PRIVATE_GLYPHSET); } return Success; } diff --git a/xserver/render/miindex.c b/xserver/render/miindex.c index 4e0cf0084..5e2e06c35 100644 --- a/xserver/render/miindex.c +++ b/xserver/render/miindex.c @@ -260,15 +260,15 @@ miInitIndexed (ScreenPtr pScreen, pixels[p] = p; } - pIndexed = xalloc (sizeof (miIndexedRec)); + pIndexed = malloc(sizeof (miIndexedRec)); if (!pIndexed) return FALSE; pFormat->index.nvalues = num; - pFormat->index.pValues = xalloc (num * sizeof (xIndexValue)); + pFormat->index.pValues = malloc(num * sizeof (xIndexValue)); if (!pFormat->index.pValues) { - xfree (pIndexed); + free(pIndexed); return FALSE; } @@ -276,7 +276,7 @@ miInitIndexed (ScreenPtr pScreen, /* * Build mapping from pixel value to ARGB */ - QueryColors (pColormap, num, pixels, rgb); + QueryColors (pColormap, num, pixels, rgb, serverClient); for (i = 0; i < num; i++) { p = pixels[i]; @@ -324,12 +324,12 @@ miCloseIndexed (ScreenPtr pScreen, { if (pFormat->index.devPrivate) { - xfree (pFormat->index.devPrivate); + free(pFormat->index.devPrivate); pFormat->index.devPrivate = 0; } if (pFormat->index.pValues) { - xfree (pFormat->index.pValues); + free(pFormat->index.pValues); pFormat->index.pValues = 0; } } diff --git a/xserver/render/mipict.c b/xserver/render/mipict.c index b5dfcb2ba..b5b897037 100644 --- a/xserver/render/mipict.c +++ b/xserver/render/mipict.c @@ -47,7 +47,7 @@ void miDestroyPicture (PicturePtr pPicture) { if (pPicture->freeCompClip) - REGION_DESTROY(pPicture->pDrawable->pScreen, pPicture->pCompositeClip); + RegionDestroy(pPicture->pCompositeClip); } void @@ -64,7 +64,7 @@ miDestroyPictureClip (PicturePtr pPicture) * we know we'll never have a list of rectangles, since ChangeClip * immediately turns them into a region */ - REGION_DESTROY(pPicture->pDrawable->pScreen, pPicture->clientClip); + RegionDestroy(pPicture->clientClip); break; } pPicture->clientClip = NULL; @@ -85,7 +85,7 @@ miChangePictureClip (PicturePtr pPicture, switch (type) { case CT_PIXMAP: /* convert the pixmap to a region */ - clientClip = (pointer) BITMAP_TO_REGION(pScreen, (PixmapPtr) value); + clientClip = (pointer) BitmapToRegion(pScreen, (PixmapPtr) value); if (!clientClip) return BadAlloc; clientClipType = CT_REGION; @@ -100,13 +100,13 @@ miChangePictureClip (PicturePtr pPicture, clientClipType = CT_NONE; break; default: - clientClip = (pointer) RECTS_TO_REGION(pScreen, n, + clientClip = (pointer) RegionFromRects(n, (xRectangle *) value, type); if (!clientClip) return BadAlloc; clientClipType = CT_REGION; - xfree(value); + free(value); break; } (*ps->DestroyPictureClip) (pPicture); @@ -160,7 +160,7 @@ miValidatePicture (PicturePtr pPicture, if (pPicture->clientClipType == CT_NONE) { if (freeCompClip) - REGION_DESTROY(pScreen, pPicture->pCompositeClip); + RegionDestroy(pPicture->pCompositeClip); pPicture->pCompositeClip = pregWin; pPicture->freeCompClip = freeTmpClip; } @@ -175,30 +175,30 @@ miValidatePicture (PicturePtr pPicture, * clip. if neither is real, create a new region. */ - REGION_TRANSLATE(pScreen, pPicture->clientClip, + RegionTranslate(pPicture->clientClip, pDrawable->x + pPicture->clipOrigin.x, pDrawable->y + pPicture->clipOrigin.y); if (freeCompClip) { - REGION_INTERSECT(pScreen, pPicture->pCompositeClip, + RegionIntersect(pPicture->pCompositeClip, pregWin, pPicture->clientClip); if (freeTmpClip) - REGION_DESTROY(pScreen, pregWin); + RegionDestroy(pregWin); } else if (freeTmpClip) { - REGION_INTERSECT(pScreen, pregWin, pregWin, pPicture->clientClip); + RegionIntersect(pregWin, pregWin, pPicture->clientClip); pPicture->pCompositeClip = pregWin; } else { - pPicture->pCompositeClip = REGION_CREATE(pScreen, NullBox, 0); - REGION_INTERSECT(pScreen, pPicture->pCompositeClip, + pPicture->pCompositeClip = RegionCreate(NullBox, 0); + RegionIntersect(pPicture->pCompositeClip, pregWin, pPicture->clientClip); } pPicture->freeCompClip = TRUE; - REGION_TRANSLATE(pScreen, pPicture->clientClip, + RegionTranslate(pPicture->clientClip, -(pDrawable->x + pPicture->clipOrigin.x), -(pDrawable->y + pPicture->clipOrigin.y)); } @@ -216,31 +216,31 @@ miValidatePicture (PicturePtr pPicture, if (pPicture->freeCompClip) { - REGION_RESET(pScreen, pPicture->pCompositeClip, &pixbounds); + RegionReset(pPicture->pCompositeClip, &pixbounds); } else { pPicture->freeCompClip = TRUE; - pPicture->pCompositeClip = REGION_CREATE(pScreen, &pixbounds, 1); + pPicture->pCompositeClip = RegionCreate(&pixbounds, 1); } if (pPicture->clientClipType == CT_REGION) { if(pDrawable->x || pDrawable->y) { - REGION_TRANSLATE(pScreen, pPicture->clientClip, + RegionTranslate(pPicture->clientClip, pDrawable->x + pPicture->clipOrigin.x, pDrawable->y + pPicture->clipOrigin.y); - REGION_INTERSECT(pScreen, pPicture->pCompositeClip, + RegionIntersect(pPicture->pCompositeClip, pPicture->pCompositeClip, pPicture->clientClip); - REGION_TRANSLATE(pScreen, pPicture->clientClip, + RegionTranslate(pPicture->clientClip, -(pDrawable->x + pPicture->clipOrigin.x), -(pDrawable->y + pPicture->clipOrigin.y)); } else { - REGION_TRANSLATE(pScreen, pPicture->pCompositeClip, + RegionTranslate(pPicture->pCompositeClip, -pPicture->clipOrigin.x, -pPicture->clipOrigin.y); - REGION_INTERSECT(pScreen, pPicture->pCompositeClip, + RegionIntersect(pPicture->pCompositeClip, pPicture->pCompositeClip, pPicture->clientClip); - REGION_TRANSLATE(pScreen, pPicture->pCompositeClip, + RegionTranslate(pPicture->pCompositeClip, pPicture->clipOrigin.x, pPicture->clipOrigin.y); } } @@ -321,7 +321,7 @@ miClipPictureSrc (RegionPtr pRegion, pPicture->clipOrigin.x + dx, pPicture->clipOrigin.y + dy); - result = REGION_INTERSECT (pScreen, pRegion, pRegion, pPicture->clientClip); + result = RegionIntersect(pRegion, pRegion, pPicture->clientClip); pixman_region_translate ( pPicture->clientClip, - (pPicture->clipOrigin.x + dx), diff --git a/xserver/render/mirect.c b/xserver/render/mirect.c index b54fe6fe6..4fb347a93 100644 --- a/xserver/render/mirect.c +++ b/xserver/render/mirect.c @@ -42,35 +42,34 @@ miColorRects (PicturePtr pDst, int xoff, int yoff) { - ScreenPtr pScreen = pDst->pDrawable->pScreen; CARD32 pixel; GCPtr pGC; - CARD32 tmpval[5]; + ChangeGCVal tmpval[5]; RegionPtr pClip; unsigned long mask; miRenderColorToPixel (pDst->pFormat, color, &pixel); - pGC = GetScratchGC (pDst->pDrawable->depth, pScreen); + pGC = GetScratchGC (pDst->pDrawable->depth, pDst->pDrawable->pScreen); if (!pGC) return; - tmpval[0] = GXcopy; - tmpval[1] = pixel; - tmpval[2] = pDst->subWindowMode; + tmpval[0].val = GXcopy; + tmpval[1].val = pixel; + tmpval[2].val = pDst->subWindowMode; mask = GCFunction | GCForeground | GCSubwindowMode; if (pClipPict->clientClipType == CT_REGION) { - tmpval[3] = pDst->clipOrigin.x - xoff; - tmpval[4] = pDst->clipOrigin.y - yoff; + tmpval[3].val = pDst->clipOrigin.x - xoff; + tmpval[4].val = pDst->clipOrigin.y - yoff; mask |= GCClipXOrigin|GCClipYOrigin; - pClip = REGION_CREATE (pScreen, NULL, 1); - REGION_COPY (pScreen, pClip, + pClip = RegionCreate(NULL, 1); + RegionCopy(pClip, (RegionPtr) pClipPict->clientClip); (*pGC->funcs->ChangeClip) (pGC, CT_REGION, pClip, 0); } - ChangeGC (pGC, mask, tmpval); + ChangeGC (NullClient, pGC, mask, tmpval); ValidateGC (pDst->pDrawable, pGC); if (xoff || yoff) { @@ -129,7 +128,8 @@ miCompositeRects (CARD8 op, int error; Pixel pixel; GCPtr pGC; - CARD32 tmpval[2]; + ChangeGCVal gcvals[2]; + XID tmpval[1]; rgbaFormat = PictureMatchFormat (pScreen, 32, PICT_a8r8g8b8); if (!rgbaFormat) @@ -145,10 +145,10 @@ miCompositeRects (CARD8 op, pGC = GetScratchGC (rgbaFormat->depth, pScreen); if (!pGC) goto bail3; - tmpval[0] = GXcopy; - tmpval[1] = pixel; + gcvals[0].val = GXcopy; + gcvals[1].val = pixel; - ChangeGC (pGC, GCFunction | GCForeground, tmpval); + ChangeGC (NullClient, pGC, GCFunction | GCForeground, gcvals); ValidateGC (&pPixmap->drawable, pGC); one.x = 0; one.y = 0; diff --git a/xserver/render/mitri.c b/xserver/render/mitri.c index a92c19b7e..a805a717c 100644 --- a/xserver/render/mitri.c +++ b/xserver/render/mitri.c @@ -144,7 +144,7 @@ miTriStrip (CARD8 op, if (npoint < 3) return; ntri = npoint - 2; - tris = xalloc (ntri * sizeof (xTriangle)); + tris = malloc(ntri * sizeof (xTriangle)); if (!tris) return; for (tri = tris; npoint >= 3; npoint--, points++, tri++) @@ -154,7 +154,7 @@ miTriStrip (CARD8 op, tri->p3 = points[2]; } (*ps->Triangles) (op, pSrc, pDst, maskFormat, xSrc, ySrc, ntri, tris); - xfree (tris); + free(tris); } void @@ -176,7 +176,7 @@ miTriFan (CARD8 op, if (npoint < 3) return; ntri = npoint - 2; - tris = xalloc (ntri * sizeof (xTriangle)); + tris = malloc(ntri * sizeof (xTriangle)); if (!tris) return; first = points++; @@ -187,5 +187,5 @@ miTriFan (CARD8 op, tri->p3 = points[1]; } (*ps->Triangles) (op, pSrc, pDst, maskFormat, xSrc, ySrc, ntri, tris); - xfree (tris); + free(tris); } diff --git a/xserver/render/picture.c b/xserver/render/picture.c index 18bfea29b..7fda6b93a 100644 --- a/xserver/render/picture.c +++ b/xserver/render/picture.c @@ -42,10 +42,8 @@ #include "picturestr.h" #include "xace.h" -static int PictureScreenPrivateKeyIndex; -DevPrivateKey PictureScreenPrivateKey = &PictureScreenPrivateKeyIndex; -static int PictureWindowPrivateKeyIndex; -DevPrivateKey PictureWindowPrivateKey = &PictureWindowPrivateKeyIndex; +DevPrivateKeyRec PictureScreenPrivateKeyRec; +DevPrivateKeyRec PictureWindowPrivateKeyRec; static int PictureGeneration; RESTYPE PictureType; RESTYPE PictFormatType; @@ -89,8 +87,8 @@ PictureCloseScreen (int index, ScreenPtr pScreen) (*ps->CloseIndexed) (pScreen, &ps->formats[n]); GlyphUninit (pScreen); SetPictureScreen(pScreen, 0); - xfree (ps->formats); - xfree (ps); + free(ps->formats); + free(ps); return ret; } @@ -337,7 +335,7 @@ PictureCreateDefaultFormats (ScreenPtr pScreen, int *nformatp) } - pFormats = xcalloc (nformats, sizeof (PictFormatRec)); + pFormats = calloc(nformats, sizeof (PictFormatRec)); if (!pFormats) return 0; for (f = 0; f < nformats; f++) @@ -628,6 +626,12 @@ PictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats) return FALSE; PictureGeneration = serverGeneration; } + if (!dixRegisterPrivateKey(&PictureScreenPrivateKeyRec, PRIVATE_SCREEN, 0)) + return FALSE; + + if (!dixRegisterPrivateKey(&PictureWindowPrivateKeyRec, PRIVATE_WINDOW, 0)) + return FALSE; + if (!formats) { formats = PictureCreateDefaultFormats (pScreen, &nformats); @@ -638,7 +642,7 @@ PictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats) { if (!AddResource (formats[n].id, PictFormatType, (pointer) (formats+n))) { - xfree (formats); + free(formats); return FALSE; } if (formats[n].type == PictTypeIndexed) @@ -669,10 +673,10 @@ PictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats) } formats[n].format = PICT_FORMAT(0,type,a,r,g,b); } - ps = (PictureScreenPtr) xalloc (sizeof (PictureScreenRec)); + ps = (PictureScreenPtr) malloc(sizeof (PictureScreenRec)); if (!ps) { - xfree (formats); + free(formats); return FALSE; } SetPictureScreen(pScreen, ps); @@ -699,8 +703,8 @@ PictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats) { PictureResetFilters (pScreen); SetPictureScreen(pScreen, 0); - xfree (formats); - xfree (ps); + free(formats); + free(ps); return FALSE; } @@ -753,7 +757,7 @@ CreatePicture (Picture pid, PicturePtr pPicture; PictureScreenPtr ps = GetPictureScreen(pDrawable->pScreen); - pPicture = (PicturePtr)xalloc(sizeof(PictureRec)); + pPicture = dixAllocateObjectWithPrivates(PictureRec, PRIVATE_PICTURE); if (!pPicture) { *error = BadAlloc; @@ -764,7 +768,6 @@ CreatePicture (Picture pid, pPicture->pDrawable = pDrawable; pPicture->pFormat = pFormat; pPicture->format = pFormat->format | (pDrawable->bitsPerPixel << 24); - pPicture->devPrivates = NULL; /* security creation/labeling check */ *error = XaceHook(XACE_RESOURCE_ACCESS, client, pid, PictureType, pPicture, @@ -874,7 +877,7 @@ static void initGradient(SourcePictPtr pGradient, int stopCount, dpos = stopPoints[i]; } - pGradient->gradient.stops = xalloc(stopCount*sizeof(PictGradientStop)); + pGradient->gradient.stops = malloc(stopCount*sizeof(PictGradientStop)); if (!pGradient->gradient.stops) { *error = BadAlloc; return; @@ -896,12 +899,11 @@ static void initGradient(SourcePictPtr pGradient, int stopCount, static PicturePtr createSourcePicture(void) { PicturePtr pPicture; - pPicture = (PicturePtr) xalloc(sizeof(PictureRec)); + pPicture = dixAllocateObjectWithPrivates(PictureRec, PRIVATE_PICTURE); pPicture->pDrawable = 0; pPicture->pFormat = 0; pPicture->pNext = 0; pPicture->format = PICT_a8r8g8b8; - pPicture->devPrivates = 0; SetPictureToDefaults(pPicture); return pPicture; @@ -918,10 +920,10 @@ CreateSolidPicture (Picture pid, xRenderColor *color, int *error) } pPicture->id = pid; - pPicture->pSourcePict = (SourcePictPtr) xalloc(sizeof(PictSolidFill)); + pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(PictSolidFill)); if (!pPicture->pSourcePict) { *error = BadAlloc; - xfree(pPicture); + free(pPicture); return 0; } pPicture->pSourcePict->type = SourcePictTypeSolidFill; @@ -947,10 +949,10 @@ CreateLinearGradientPicture (Picture pid, xPointFixed *p1, xPointFixed *p2, } pPicture->id = pid; - pPicture->pSourcePict = (SourcePictPtr) xalloc(sizeof(PictLinearGradient)); + pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(PictLinearGradient)); if (!pPicture->pSourcePict) { *error = BadAlloc; - xfree(pPicture); + free(pPicture); return 0; } @@ -960,7 +962,7 @@ CreateLinearGradientPicture (Picture pid, xPointFixed *p1, xPointFixed *p2, initGradient(pPicture->pSourcePict, nStops, stops, colors, error); if (*error) { - xfree(pPicture); + free(pPicture); return 0; } return pPicture; @@ -988,10 +990,10 @@ CreateRadialGradientPicture (Picture pid, xPointFixed *inner, xPointFixed *outer } pPicture->id = pid; - pPicture->pSourcePict = (SourcePictPtr) xalloc(sizeof(PictRadialGradient)); + pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(PictRadialGradient)); if (!pPicture->pSourcePict) { *error = BadAlloc; - xfree(pPicture); + free(pPicture); return 0; } radial = &pPicture->pSourcePict->radial; @@ -1012,7 +1014,7 @@ CreateRadialGradientPicture (Picture pid, xPointFixed *inner, xPointFixed *outer initGradient(pPicture->pSourcePict, nStops, stops, colors, error); if (*error) { - xfree(pPicture); + free(pPicture); return 0; } return pPicture; @@ -1036,10 +1038,10 @@ CreateConicalGradientPicture (Picture pid, xPointFixed *center, xFixed angle, } pPicture->id = pid; - pPicture->pSourcePict = (SourcePictPtr) xalloc(sizeof(PictConicalGradient)); + pPicture->pSourcePict = (SourcePictPtr) malloc(sizeof(PictConicalGradient)); if (!pPicture->pSourcePict) { *error = BadAlloc; - xfree(pPicture); + free(pPicture); return 0; } @@ -1049,7 +1051,7 @@ CreateConicalGradientPicture (Picture pid, xPointFixed *center, xFixed angle, initGradient(pPicture->pSourcePict, nStops, stops, colors, error); if (*error) { - xfree(pPicture); + free(pPicture); return 0; } return pPicture; @@ -1115,7 +1117,6 @@ ChangePicture (PicturePtr pPicture, if (error != Success) { client->errorValue = pid; - error = (error == BadValue) ? BadPixmap : error; break; } if (pAlpha->pDrawable == NULL || @@ -1176,7 +1177,6 @@ ChangePicture (PicturePtr pPicture, if (error != Success) { client->errorValue = pid; - error = (error == BadValue) ? BadPixmap : error; break; } } @@ -1300,8 +1300,7 @@ SetPictureClipRects (PicturePtr pPicture, RegionPtr clientClip; int result; - clientClip = RECTS_TO_REGION(pScreen, - nRect, rects, CT_UNSORTED); + clientClip = RegionFromRects(nRect, rects, CT_UNSORTED); if (!clientClip) return BadAlloc; result =(*ps->ChangePictureClip) (pPicture, CT_REGION, @@ -1331,14 +1330,13 @@ SetPictureClipRegion (PicturePtr pPicture, if (pRegion) { type = CT_REGION; - clientClip = REGION_CREATE (pScreen, - REGION_EXTENTS(pScreen, pRegion), - REGION_NUM_RECTS(pRegion)); + clientClip = RegionCreate(RegionExtents(pRegion), + RegionNumRects(pRegion)); if (!clientClip) return BadAlloc; - if (!REGION_COPY (pSCreen, clientClip, pRegion)) + if (!RegionCopy(clientClip, pRegion)) { - REGION_DESTROY (pScreen, clientClip); + RegionDestroy(clientClip); return BadAlloc; } } @@ -1385,7 +1383,7 @@ SetPictureTransform (PicturePtr pPicture, { if (!pPicture->transform) { - pPicture->transform = (PictTransform *) xalloc (sizeof (PictTransform)); + pPicture->transform = (PictTransform *) malloc(sizeof (PictTransform)); if (!pPicture->transform) return BadAlloc; } @@ -1395,7 +1393,7 @@ SetPictureTransform (PicturePtr pPicture, { if (pPicture->transform) { - xfree (pPicture->transform); + free(pPicture->transform); pPicture->transform = 0; } } @@ -1464,9 +1462,9 @@ CopyPicture (PicturePtr pSrc, RegionPtr clientClip; RegionPtr srcClientClip = (RegionPtr)pSrc->clientClip; - clientClip = REGION_CREATE(pSrc->pDrawable->pScreen, - REGION_EXTENTS(pSrc->pDrawable->pScreen, srcClientClip), - REGION_NUM_RECTS(srcClientClip)); + clientClip = RegionCreate( + RegionExtents(srcClientClip), + RegionNumRects(srcClientClip)); (*ps->ChangePictureClip)(pDst, CT_REGION, clientClip, 0); } break; @@ -1526,15 +1524,14 @@ FreePicture (pointer value, if (--pPicture->refcnt == 0) { - if (pPicture->transform) - xfree (pPicture->transform); + free(pPicture->transform); if (pPicture->pSourcePict) { if (pPicture->pSourcePict->type != SourcePictTypeSolidFill) - xfree(pPicture->pSourcePict->linear.stops); + free(pPicture->pSourcePict->linear.stops); - xfree(pPicture->pSourcePict); + free(pPicture->pSourcePict); } if (pPicture->pDrawable) @@ -1568,8 +1565,7 @@ FreePicture (pointer value, (*pScreen->DestroyPixmap) ((PixmapPtr)pPicture->pDrawable); } } - dixFreePrivates(pPicture->devPrivates); - xfree (pPicture); + dixFreeObjectWithPrivates(pPicture, PRIVATE_PICTURE); } return Success; } diff --git a/xserver/render/picture.h b/xserver/render/picture.h index 8bd38b98e..e5f0d78f6 100644 --- a/xserver/render/picture.h +++ b/xserver/render/picture.h @@ -174,7 +174,6 @@ extern _X_EXPORT int PictureCmapPolicy; extern _X_EXPORT int PictureParseCmapPolicy (const char *name); extern _X_EXPORT int RenderErrBase; -extern _X_EXPORT DevPrivateKey RenderClientPrivateKey; /* Fixed point updates from Carl Worth, USC, Information Sciences Institute */ diff --git a/xserver/render/picturestr.h b/xserver/render/picturestr.h index 6a8d76d99..5c6c41e23 100644 --- a/xserver/render/picturestr.h +++ b/xserver/render/picturestr.h @@ -396,30 +396,34 @@ typedef struct _PictureScreen { } PictureScreenRec, *PictureScreenPtr; -extern _X_EXPORT DevPrivateKey PictureScreenPrivateKey; -extern _X_EXPORT DevPrivateKey PictureWindowPrivateKey; +extern _X_EXPORT DevPrivateKeyRec PictureScreenPrivateKeyRec; +#define PictureScreenPrivateKey (&PictureScreenPrivateKeyRec) + +extern _X_EXPORT DevPrivateKeyRec PictureWindowPrivateKeyRec; +#define PictureWindowPrivateKey (&PictureWindowPrivateKeyRec) + extern _X_EXPORT RESTYPE PictureType; extern _X_EXPORT RESTYPE PictFormatType; extern _X_EXPORT RESTYPE GlyphSetType; #define GetPictureScreen(s) ((PictureScreenPtr)dixLookupPrivate(&(s)->devPrivates, PictureScreenPrivateKey)) -#define GetPictureScreenIfSet(s) GetPictureScreen(s) +#define GetPictureScreenIfSet(s) (dixPrivateKeyRegistered(PictureScreenPrivateKey) ? GetPictureScreen(s) : NULL) #define SetPictureScreen(s,p) dixSetPrivate(&(s)->devPrivates, PictureScreenPrivateKey, p) #define GetPictureWindow(w) ((PicturePtr)dixLookupPrivate(&(w)->devPrivates, PictureWindowPrivateKey)) #define SetPictureWindow(w,p) dixSetPrivate(&(w)->devPrivates, PictureWindowPrivateKey, p) -#define VERIFY_PICTURE(pPicture, pid, client, mode, err) {\ +#define VERIFY_PICTURE(pPicture, pid, client, mode) {\ int rc = dixLookupResourceByType((pointer)&(pPicture), pid,\ PictureType, client, mode);\ if (rc != Success)\ - return (rc == BadValue) ? err : rc;\ + return rc;\ } -#define VERIFY_ALPHA(pPicture, pid, client, mode, err) {\ +#define VERIFY_ALPHA(pPicture, pid, client, mode) {\ if (pid == None) \ pPicture = 0; \ else { \ - VERIFY_PICTURE(pPicture, pid, client, mode, err); \ + VERIFY_PICTURE(pPicture, pid, client, mode); \ } \ } \ diff --git a/xserver/render/render.c b/xserver/render/render.c index afe4c92e7..00241f9af 100644 --- a/xserver/render/render.c +++ b/xserver/render/render.c @@ -210,8 +210,8 @@ int (*SProcRenderVector[RenderNumberRequests])(ClientPtr) = { }; int RenderErrBase; -static int RenderClientPrivateKeyIndex; -DevPrivateKey RenderClientPrivateKey = &RenderClientPrivateKeyIndex; +static DevPrivateKeyRec RenderClientPrivateKeyRec; +#define RenderClientPrivateKey (&RenderClientPrivateKeyRec ) typedef struct _RenderClient { int major_version; @@ -233,6 +233,10 @@ RenderClientCallback (CallbackListPtr *list, pRenderClient->minor_version = 0; } +#ifdef PANORAMIX +unsigned long XRT_PICTURE; +#endif + void RenderExtensionInit (void) { @@ -242,7 +246,7 @@ RenderExtensionInit (void) return; if (!PictureFinishInit ()) return; - if (!dixRequestPrivate(RenderClientPrivateKey, sizeof(RenderClientRec))) + if (!dixRegisterPrivateKey(&RenderClientPrivateKeyRec, PRIVATE_CLIENT, sizeof(RenderClientRec))) return; if (!AddCallback (&ClientStateCallback, RenderClientCallback, 0)) return; @@ -253,6 +257,13 @@ RenderExtensionInit (void) if (!extEntry) return; RenderErrBase = extEntry->errorBase; +#ifdef PANORAMIX + if (XRT_PICTURE) + SetResourceTypeErrorValue(XRT_PICTURE, RenderErrBase + BadPicture); +#endif + SetResourceTypeErrorValue(PictureType, RenderErrBase + BadPicture); + SetResourceTypeErrorValue(PictFormatType, RenderErrBase + BadPictFormat); + SetResourceTypeErrorValue(GlyphSetType, RenderErrBase + BadGlyphSet); } static int @@ -290,7 +301,7 @@ ProcRenderQueryVersion (ClientPtr client) swapl(&rep.minorVersion, n); } WriteToClient(client, sizeof(xRenderQueryVersionReply), (char *)&rep); - return (client->noClientException); + return Success; } static VisualPtr @@ -375,7 +386,7 @@ ProcRenderQueryPictFormats (ClientPtr client) ndepth * sizeof (xPictDepth) + nvisual * sizeof (xPictVisual) + numSubpixel * sizeof (CARD32)); - reply = (xRenderQueryPictFormatsReply *) xcalloc (1, rlength); + reply = (xRenderQueryPictFormatsReply *) calloc(1, rlength); if (!reply) return BadAlloc; reply->type = X_Reply; @@ -512,8 +523,8 @@ ProcRenderQueryPictFormats (ClientPtr client) swapl (&reply->numSubpixel, n); } WriteToClient(client, rlength, (char *) reply); - xfree (reply); - return client->noClientException; + free(reply); + return Success; } static int @@ -532,7 +543,7 @@ ProcRenderQueryPictIndexValues (ClientPtr client) rc = dixLookupResourceByType((pointer *)&pFormat, stuff->format, PictFormatType, client, DixReadAccess); if (rc != Success) - return (rc == BadValue) ? RenderErrBase + BadPictFormat : rc; + return rc; if (pFormat->type != PictTypeIndexed) { @@ -542,7 +553,7 @@ ProcRenderQueryPictIndexValues (ClientPtr client) num = pFormat->index.nvalues; rlength = (sizeof (xRenderQueryPictIndexValuesReply) + num * sizeof(xIndexValue)); - reply = (xRenderQueryPictIndexValuesReply *) xalloc (rlength); + reply = (xRenderQueryPictIndexValuesReply *) malloc(rlength); if (!reply) return BadAlloc; @@ -571,8 +582,8 @@ ProcRenderQueryPictIndexValues (ClientPtr client) } WriteToClient(client, rlength, (char *) reply); - xfree(reply); - return (client->noClientException); + free(reply); + return Success; } static int @@ -601,7 +612,7 @@ ProcRenderCreatePicture (ClientPtr client) rc = dixLookupResourceByType((pointer *)&pFormat, stuff->format, PictFormatType, client, DixReadAccess); if (rc != Success) - return (rc == BadValue) ? RenderErrBase + BadPictFormat : rc; + return rc; if (pFormat->depth != pDrawable->depth) return BadMatch; @@ -631,8 +642,7 @@ ProcRenderChangePicture (ClientPtr client) int len; REQUEST_AT_LEAST_SIZE(xRenderChangePictureReq); - VERIFY_PICTURE (pPicture, stuff->picture, client, DixSetAttrAccess, - RenderErrBase + BadPicture); + VERIFY_PICTURE (pPicture, stuff->picture, client, DixSetAttrAccess); len = client->req_len - bytes_to_int32(sizeof(xRenderChangePictureReq)); if (Ones(stuff->mask) != len) @@ -648,11 +658,9 @@ ProcRenderSetPictureClipRectangles (ClientPtr client) REQUEST(xRenderSetPictureClipRectanglesReq); PicturePtr pPicture; int nr; - int result; REQUEST_AT_LEAST_SIZE(xRenderSetPictureClipRectanglesReq); - VERIFY_PICTURE (pPicture, stuff->picture, client, DixSetAttrAccess, - RenderErrBase + BadPicture); + VERIFY_PICTURE (pPicture, stuff->picture, client, DixSetAttrAccess); if (!pPicture->pDrawable) return BadDrawable; @@ -660,13 +668,9 @@ ProcRenderSetPictureClipRectangles (ClientPtr client) if (nr & 4) return BadLength; nr >>= 3; - result = SetPictureClipRects (pPicture, + return SetPictureClipRects (pPicture, stuff->xOrigin, stuff->yOrigin, nr, (xRectangle *) &stuff[1]); - if (client->noClientException != Success) - return(client->noClientException); - else - return(result); } static int @@ -677,10 +681,9 @@ ProcRenderFreePicture (ClientPtr client) REQUEST_SIZE_MATCH(xRenderFreePictureReq); - VERIFY_PICTURE (pPicture, stuff->picture, client, DixDestroyAccess, - RenderErrBase + BadPicture); + VERIFY_PICTURE (pPicture, stuff->picture, client, DixDestroyAccess); FreeResource (stuff->picture, RT_NONE); - return(client->noClientException); + return Success; } static Bool @@ -709,14 +712,11 @@ ProcRenderComposite (ClientPtr client) client->errorValue = stuff->op; return BadValue; } - VERIFY_PICTURE (pDst, stuff->dst, client, DixWriteAccess, - RenderErrBase + BadPicture); + VERIFY_PICTURE (pDst, stuff->dst, client, DixWriteAccess); if (!pDst->pDrawable) return BadDrawable; - VERIFY_PICTURE (pSrc, stuff->src, client, DixReadAccess, - RenderErrBase + BadPicture); - VERIFY_ALPHA (pMask, stuff->mask, client, DixReadAccess, - RenderErrBase + BadPicture); + VERIFY_PICTURE (pSrc, stuff->src, client, DixReadAccess); + VERIFY_ALPHA (pMask, stuff->mask, client, DixReadAccess); if ((pSrc->pDrawable && pSrc->pDrawable->pScreen != pDst->pDrawable->pScreen) || (pMask && pMask->pDrawable && pDst->pDrawable->pScreen != pMask->pDrawable->pScreen)) return BadMatch; @@ -755,10 +755,8 @@ ProcRenderTrapezoids (ClientPtr client) client->errorValue = stuff->op; return BadValue; } - VERIFY_PICTURE (pSrc, stuff->src, client, DixReadAccess, - RenderErrBase + BadPicture); - VERIFY_PICTURE (pDst, stuff->dst, client, DixWriteAccess, - RenderErrBase + BadPicture); + VERIFY_PICTURE (pSrc, stuff->src, client, DixReadAccess); + VERIFY_PICTURE (pDst, stuff->dst, client, DixWriteAccess); if (!pDst->pDrawable) return BadDrawable; if (pSrc->pDrawable && pSrc->pDrawable->pScreen != pDst->pDrawable->pScreen) @@ -768,7 +766,7 @@ ProcRenderTrapezoids (ClientPtr client) rc = dixLookupResourceByType((pointer *)&pFormat, stuff->maskFormat, PictFormatType, client, DixReadAccess); if (rc != Success) - return (rc == BadValue) ? RenderErrBase + BadPictFormat : rc; + return rc; } else pFormat = 0; @@ -780,7 +778,7 @@ ProcRenderTrapezoids (ClientPtr client) CompositeTrapezoids (stuff->op, pSrc, pDst, pFormat, stuff->xSrc, stuff->ySrc, ntraps, (xTrapezoid *) &stuff[1]); - return client->noClientException; + return Success; } static int @@ -797,10 +795,8 @@ ProcRenderTriangles (ClientPtr client) client->errorValue = stuff->op; return BadValue; } - VERIFY_PICTURE (pSrc, stuff->src, client, DixReadAccess, - RenderErrBase + BadPicture); - VERIFY_PICTURE (pDst, stuff->dst, client, DixWriteAccess, - RenderErrBase + BadPicture); + VERIFY_PICTURE (pSrc, stuff->src, client, DixReadAccess); + VERIFY_PICTURE (pDst, stuff->dst, client, DixWriteAccess); if (!pDst->pDrawable) return BadDrawable; if (pSrc->pDrawable && pSrc->pDrawable->pScreen != pDst->pDrawable->pScreen) @@ -810,7 +806,7 @@ ProcRenderTriangles (ClientPtr client) rc = dixLookupResourceByType((pointer *)&pFormat, stuff->maskFormat, PictFormatType, client, DixReadAccess); if (rc != Success) - return (rc == BadValue) ? RenderErrBase + BadPictFormat : rc; + return rc; } else pFormat = 0; @@ -822,7 +818,7 @@ ProcRenderTriangles (ClientPtr client) CompositeTriangles (stuff->op, pSrc, pDst, pFormat, stuff->xSrc, stuff->ySrc, ntris, (xTriangle *) &stuff[1]); - return client->noClientException; + return Success; } static int @@ -839,10 +835,8 @@ ProcRenderTriStrip (ClientPtr client) client->errorValue = stuff->op; return BadValue; } - VERIFY_PICTURE (pSrc, stuff->src, client, DixReadAccess, - RenderErrBase + BadPicture); - VERIFY_PICTURE (pDst, stuff->dst, client, DixWriteAccess, - RenderErrBase + BadPicture); + VERIFY_PICTURE (pSrc, stuff->src, client, DixReadAccess); + VERIFY_PICTURE (pDst, stuff->dst, client, DixWriteAccess); if (!pDst->pDrawable) return BadDrawable; if (pSrc->pDrawable && pSrc->pDrawable->pScreen != pDst->pDrawable->pScreen) @@ -852,19 +846,19 @@ ProcRenderTriStrip (ClientPtr client) rc = dixLookupResourceByType((pointer *)&pFormat, stuff->maskFormat, PictFormatType, client, DixReadAccess); if (rc != Success) - return (rc == BadValue) ? RenderErrBase + BadPictFormat : rc; + return rc; } else pFormat = 0; npoints = ((client->req_len << 2) - sizeof (xRenderTriStripReq)); if (npoints & 4) - return(BadLength); + return BadLength; npoints >>= 3; if (npoints >= 3) CompositeTriStrip (stuff->op, pSrc, pDst, pFormat, stuff->xSrc, stuff->ySrc, npoints, (xPointFixed *) &stuff[1]); - return client->noClientException; + return Success; } static int @@ -881,10 +875,8 @@ ProcRenderTriFan (ClientPtr client) client->errorValue = stuff->op; return BadValue; } - VERIFY_PICTURE (pSrc, stuff->src, client, DixReadAccess, - RenderErrBase + BadPicture); - VERIFY_PICTURE (pDst, stuff->dst, client, DixWriteAccess, - RenderErrBase + BadPicture); + VERIFY_PICTURE (pSrc, stuff->src, client, DixReadAccess); + VERIFY_PICTURE (pDst, stuff->dst, client, DixWriteAccess); if (!pDst->pDrawable) return BadDrawable; if (pSrc->pDrawable && pSrc->pDrawable->pScreen != pDst->pDrawable->pScreen) @@ -894,19 +886,19 @@ ProcRenderTriFan (ClientPtr client) rc = dixLookupResourceByType((pointer *)&pFormat, stuff->maskFormat, PictFormatType, client, DixReadAccess); if (rc != Success) - return (rc == BadValue) ? RenderErrBase + BadPictFormat : rc; + return rc; } else pFormat = 0; npoints = ((client->req_len << 2) - sizeof (xRenderTriStripReq)); if (npoints & 4) - return(BadLength); + return BadLength; npoints >>= 3; if (npoints >= 3) CompositeTriFan (stuff->op, pSrc, pDst, pFormat, stuff->xSrc, stuff->ySrc, npoints, (xPointFixed *) &stuff[1]); - return client->noClientException; + return Success; } static int @@ -941,7 +933,7 @@ ProcRenderCreateGlyphSet (ClientPtr client) rc = dixLookupResourceByType((pointer *)&format, stuff->format, PictFormatType, client, DixReadAccess); if (rc != Success) - return (rc == BadValue) ? RenderErrBase + BadPictFormat : rc; + return rc; switch (format->depth) { case 1: @@ -993,12 +985,12 @@ ProcRenderReferenceGlyphSet (ClientPtr client) if (rc != Success) { client->errorValue = stuff->existing; - return (rc == BadValue) ? RenderErrBase + BadGlyphSet : rc; + return rc; } glyphSet->refcnt++; if (!AddResource (stuff->gsid, GlyphSetType, (pointer)glyphSet)) return BadAlloc; - return client->noClientException; + return Success; } #define NLOCALDELTA 64 @@ -1017,10 +1009,10 @@ ProcRenderFreeGlyphSet (ClientPtr client) if (rc != Success) { client->errorValue = stuff->glyphset; - return (rc == BadValue) ? RenderErrBase + BadGlyphSet : rc; + return rc; } FreeResource (stuff->glyphset, RT_NONE); - return client->noClientException; + return Success; } typedef struct _GlyphNew { @@ -1056,7 +1048,7 @@ ProcRenderAddGlyphs (ClientPtr client) if (err != Success) { client->errorValue = stuff->glyphset; - return (err == BadValue) ? RenderErrBase + BadGlyphSet : err; + return err; } err = BadAlloc; @@ -1072,7 +1064,7 @@ ProcRenderAddGlyphs (ClientPtr client) } else { - glyphsBase = (GlyphNewPtr) Xcalloc (nglyphs * sizeof (GlyphNewRec)); + glyphsBase = (GlyphNewPtr)calloc(nglyphs, sizeof (GlyphNewRec)); if (!glyphsBase) return BadAlloc; } @@ -1085,6 +1077,14 @@ ProcRenderAddGlyphs (ClientPtr client) gi = (xGlyphInfo *) (gids + nglyphs); bits = (CARD8 *) (gi + nglyphs); remain -= (sizeof (CARD32) + sizeof (xGlyphInfo)) * nglyphs; + + /* protect against bad nglyphs */ + if (gi < stuff || gi > ((CARD32 *)stuff + client->req_len) || + bits < stuff || bits > ((CARD32 *)stuff + client->req_len)) { + err = BadLength; + goto bail; + } + for (i = 0; i < nglyphs; i++) { size_t padded_width; @@ -1221,8 +1221,8 @@ ProcRenderAddGlyphs (ClientPtr client) AddGlyph (glyphSet, glyphs[i].glyph, glyphs[i].id); if (glyphsBase != glyphsLocal) - Xfree (glyphsBase); - return client->noClientException; + free(glyphsBase); + return Success; bail: if (pSrc) FreePicture ((pointer) pSrc, 0); @@ -1230,9 +1230,9 @@ bail: FreeScratchPixmapHeader (pSrcPix); for (i = 0; i < nglyphs; i++) if (glyphs[i].glyph && ! glyphs[i].found) - xfree (glyphs[i].glyph); + free(glyphs[i].glyph); if (glyphsBase != glyphsLocal) - Xfree (glyphsBase); + free(glyphsBase); return err; } @@ -1257,7 +1257,7 @@ ProcRenderFreeGlyphs (ClientPtr client) if (rc != Success) { client->errorValue = stuff->glyphset; - return (rc == BadValue) ? RenderErrBase + BadGlyphSet : rc; + return rc; } nglyph = bytes_to_int32((client->req_len << 2) - sizeof (xRenderFreeGlyphsReq)); gids = (CARD32 *) (stuff + 1); @@ -1270,7 +1270,7 @@ ProcRenderFreeGlyphs (ClientPtr client) return RenderErrBase + BadGlyph; } } - return client->noClientException; + return Success; } static int @@ -1308,10 +1308,8 @@ ProcRenderCompositeGlyphs (ClientPtr client) client->errorValue = stuff->op; return BadValue; } - VERIFY_PICTURE (pSrc, stuff->src, client, DixReadAccess, - RenderErrBase + BadPicture); - VERIFY_PICTURE (pDst, stuff->dst, client, DixWriteAccess, - RenderErrBase + BadPicture); + VERIFY_PICTURE (pSrc, stuff->src, client, DixReadAccess); + VERIFY_PICTURE (pDst, stuff->dst, client, DixWriteAccess); if (!pDst->pDrawable) return BadDrawable; if (pSrc->pDrawable && pSrc->pDrawable->pScreen != pDst->pDrawable->pScreen) @@ -1321,7 +1319,7 @@ ProcRenderCompositeGlyphs (ClientPtr client) rc = dixLookupResourceByType((pointer *)&pFormat, stuff->maskFormat, PictFormatType, client, DixReadAccess); if (rc != Success) - return (rc == BadValue) ? RenderErrBase + BadPictFormat : rc; + return rc; } else pFormat = 0; @@ -1329,7 +1327,7 @@ ProcRenderCompositeGlyphs (ClientPtr client) rc = dixLookupResourceByType((pointer *)&glyphSet, stuff->glyphset, GlyphSetType, client, DixUseAccess); if (rc != Success) - return (rc == BadValue) ? RenderErrBase + BadGlyphSet : rc; + return rc; buffer = (CARD8 *) (stuff + 1); end = (CARD8 *) stuff + (client->req_len << 2); @@ -1358,7 +1356,7 @@ ProcRenderCompositeGlyphs (ClientPtr client) glyphsBase = glyphsLocal; else { - glyphsBase = (GlyphPtr *) xalloc (nglyph * sizeof (GlyphPtr)); + glyphsBase = (GlyphPtr *) malloc(nglyph * sizeof (GlyphPtr)); if (!glyphsBase) return BadAlloc; } @@ -1366,7 +1364,7 @@ ProcRenderCompositeGlyphs (ClientPtr client) listsBase = listsLocal; else { - listsBase = (GlyphListPtr) xalloc (nlist * sizeof (GlyphListRec)); + listsBase = (GlyphListPtr) malloc(nlist * sizeof (GlyphListRec)); if (!listsBase) return BadAlloc; } @@ -1389,10 +1387,10 @@ ProcRenderCompositeGlyphs (ClientPtr client) if (rc != Success) { if (glyphsBase != glyphsLocal) - xfree (glyphsBase); + free(glyphsBase); if (listsBase != listsLocal) - xfree (listsBase); - return (rc == BadValue) ? RenderErrBase + BadGlyphSet : rc; + free(listsBase); + return rc; } } buffer += 4; @@ -1445,11 +1443,11 @@ ProcRenderCompositeGlyphs (ClientPtr client) glyphsBase); if (glyphsBase != glyphsLocal) - xfree (glyphsBase); + free(glyphsBase); if (listsBase != listsLocal) - xfree (listsBase); + free(listsBase); - return client->noClientException; + return Success; } static int @@ -1465,14 +1463,13 @@ ProcRenderFillRectangles (ClientPtr client) client->errorValue = stuff->op; return BadValue; } - VERIFY_PICTURE (pDst, stuff->dst, client, DixWriteAccess, - RenderErrBase + BadPicture); + VERIFY_PICTURE (pDst, stuff->dst, client, DixWriteAccess); if (!pDst->pDrawable) return BadDrawable; things = (client->req_len << 2) - sizeof(xRenderFillRectanglesReq); if (things & 4) - return(BadLength); + return BadLength; things >>= 3; CompositeRects (stuff->op, @@ -1481,7 +1478,7 @@ ProcRenderFillRectangles (ClientPtr client) things, (xRectangle *) &stuff[1]); - return client->noClientException; + return Success; } static void @@ -1531,8 +1528,7 @@ ProcRenderCreateCursor (ClientPtr client) REQUEST_SIZE_MATCH (xRenderCreateCursorReq); LEGAL_NEW_RESOURCE(stuff->cid, client); - VERIFY_PICTURE (pSrc, stuff->src, client, DixReadAccess, - RenderErrBase + BadPicture); + VERIFY_PICTURE (pSrc, stuff->src, client, DixReadAccess); if (!pSrc->pDrawable) return BadDrawable; pScreen = pSrc->pDrawable->pScreen; @@ -1542,25 +1538,25 @@ ProcRenderCreateCursor (ClientPtr client) return BadAlloc; if ( stuff->x > width || stuff->y > height ) - return (BadMatch); - argbbits = xalloc (width * height * sizeof (CARD32)); + return BadMatch; + argbbits = malloc(width * height * sizeof (CARD32)); if (!argbbits) - return (BadAlloc); + return BadAlloc; stride = BitmapBytePad(width); nbytes_mono = stride*height; - srcbits = xcalloc(1, nbytes_mono); + srcbits = calloc(1, nbytes_mono); if (!srcbits) { - xfree (argbbits); - return (BadAlloc); + free(argbbits); + return BadAlloc; } - mskbits = xcalloc(1, nbytes_mono); + mskbits = calloc(1, nbytes_mono); if (!mskbits) { - xfree(argbbits); - xfree(srcbits); - return (BadAlloc); + free(argbbits); + free(srcbits); + return BadAlloc; } if (pSrc->format == PICT_a8r8g8b8) @@ -1579,27 +1575,27 @@ ProcRenderCreateCursor (ClientPtr client) pFormat = PictureMatchFormat (pScreen, 32, PICT_a8r8g8b8); if (!pFormat) { - xfree (argbbits); - xfree (srcbits); - xfree (mskbits); - return (BadImplementation); + free(argbbits); + free(srcbits); + free(mskbits); + return BadImplementation; } pPixmap = (*pScreen->CreatePixmap) (pScreen, width, height, 32, CREATE_PIXMAP_USAGE_SCRATCH); if (!pPixmap) { - xfree (argbbits); - xfree (srcbits); - xfree (mskbits); - return (BadAlloc); + free(argbbits); + free(srcbits); + free(mskbits); + return BadAlloc; } pPicture = CreatePicture (0, &pPixmap->drawable, pFormat, 0, 0, client, &error); if (!pPicture) { - xfree (argbbits); - xfree (srcbits); - xfree (mskbits); + free(argbbits); + free(srcbits); + free(mskbits); return error; } (*pScreen->DestroyPixmap) (pPixmap); @@ -1683,7 +1679,7 @@ ProcRenderCreateCursor (ClientPtr client) } else { - xfree (argbbits); + free(argbbits); argbbits = 0; } @@ -1707,7 +1703,7 @@ ProcRenderCreateCursor (ClientPtr client) if (!AddResource(stuff->cid, RT_CURSOR, (pointer)pCursor)) return BadAlloc; - return client->noClientException; + return Success; } static int @@ -1715,16 +1711,10 @@ ProcRenderSetPictureTransform (ClientPtr client) { REQUEST(xRenderSetPictureTransformReq); PicturePtr pPicture; - int result; REQUEST_SIZE_MATCH(xRenderSetPictureTransformReq); - VERIFY_PICTURE (pPicture, stuff->picture, client, DixSetAttrAccess, - RenderErrBase + BadPicture); - result = SetPictureTransform (pPicture, (PictTransform *) &stuff->transform); - if (client->noClientException != Success) - return(client->noClientException); - else - return(result); + VERIFY_PICTURE (pPicture, stuff->picture, client, DixSetAttrAccess); + return SetPictureTransform (pPicture, (PictTransform *) &stuff->transform); } static int @@ -1761,7 +1751,7 @@ ProcRenderQueryFilters (ClientPtr client) } len = ((nnames + 1) >> 1) + bytes_to_int32(nbytesName); total_bytes = sizeof (xRenderQueryFiltersReply) + (len << 2); - reply = (xRenderQueryFiltersReply *) xalloc (total_bytes); + reply = (xRenderQueryFiltersReply *) malloc(total_bytes); if (!reply) return BadAlloc; aliases = (INT16 *) (reply + 1); @@ -1832,9 +1822,9 @@ ProcRenderQueryFilters (ClientPtr client) swapl(&reply->numFilters, n); } WriteToClient(client, total_bytes, (char *) reply); - xfree (reply); + free(reply); - return(client->noClientException); + return Success; } static int @@ -1848,8 +1838,7 @@ ProcRenderSetPictureFilter (ClientPtr client) char *name; REQUEST_AT_LEAST_SIZE (xRenderSetPictureFilterReq); - VERIFY_PICTURE (pPicture, stuff->picture, client, DixSetAttrAccess, - RenderErrBase + BadPicture); + VERIFY_PICTURE (pPicture, stuff->picture, client, DixSetAttrAccess); name = (char *) (stuff + 1); params = (xFixed *) (name + pad_to_int32(stuff->nbytes)); nparams = ((xFixed *) stuff + client->req_len) - params; @@ -1874,7 +1863,7 @@ ProcRenderCreateAnimCursor (ClientPtr client) if (client->req_len & 1) return BadLength; ncursor = (client->req_len - (bytes_to_int32(sizeof(xRenderCreateAnimCursorReq)))) >> 1; - cursors = xalloc (ncursor * (sizeof (CursorPtr) + sizeof (CARD32))); + cursors = malloc(ncursor * (sizeof (CursorPtr) + sizeof (CARD32))); if (!cursors) return BadAlloc; deltas = (CARD32 *) (cursors + ncursor); @@ -1885,20 +1874,20 @@ ProcRenderCreateAnimCursor (ClientPtr client) RT_CURSOR, client, DixReadAccess); if (ret != Success) { - xfree (cursors); - return (ret == BadValue) ? BadCursor : ret; + free(cursors); + return ret; } deltas[i] = elt->delay; elt++; } ret = AnimCursorCreate (cursors, deltas, ncursor, &pCursor, client, stuff->cid); - xfree (cursors); + free(cursors); if (ret != Success) return ret; if (AddResource (stuff->cid, RT_CURSOR, (pointer)pCursor)) - return client->noClientException; + return Success; return BadAlloc; } @@ -1910,8 +1899,7 @@ ProcRenderAddTraps (ClientPtr client) REQUEST(xRenderAddTrapsReq); REQUEST_AT_LEAST_SIZE(xRenderAddTrapsReq); - VERIFY_PICTURE (pPicture, stuff->picture, client, DixWriteAccess, - RenderErrBase + BadPicture); + VERIFY_PICTURE (pPicture, stuff->picture, client, DixWriteAccess); if (!pPicture->pDrawable) return BadDrawable; ntraps = (client->req_len << 2) - sizeof (xRenderAddTrapsReq); @@ -1922,7 +1910,7 @@ ProcRenderAddTraps (ClientPtr client) AddTraps (pPicture, stuff->xOff, stuff->yOff, ntraps, (xTrap *) &stuff[1]); - return client->noClientException; + return Success; } static int ProcRenderCreateSolidFill(ClientPtr client) @@ -2666,25 +2654,23 @@ SProcRenderDispatch (ClientPtr client) #include "panoramiX.h" #include "panoramiXsrv.h" -#define VERIFY_XIN_PICTURE(pPicture, pid, client, mode, err) {\ +#define VERIFY_XIN_PICTURE(pPicture, pid, client, mode) {\ int rc = dixLookupResourceByType((pointer *)&(pPicture), pid,\ XRT_PICTURE, client, mode);\ if (rc != Success)\ - return (rc == BadValue) ? err : rc;\ + return rc;\ } -#define VERIFY_XIN_ALPHA(pPicture, pid, client, mode, err) {\ +#define VERIFY_XIN_ALPHA(pPicture, pid, client, mode) {\ if (pid == None) \ pPicture = 0; \ else { \ - VERIFY_XIN_PICTURE(pPicture, pid, client, mode, err); \ + VERIFY_XIN_PICTURE(pPicture, pid, client, mode); \ } \ } \ int (*PanoramiXSaveRenderVector[RenderNumberRequests])(ClientPtr); -unsigned long XRT_PICTURE; - static int PanoramiXRenderCreatePicture (ClientPtr client) { @@ -2697,13 +2683,13 @@ PanoramiXRenderCreatePicture (ClientPtr client) XRC_DRAWABLE, client, DixWriteAccess); if (result != Success) return (result == BadValue) ? BadDrawable : result; - if(!(newPict = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes)))) + if(!(newPict = (PanoramiXRes *) malloc(sizeof(PanoramiXRes)))) return BadAlloc; newPict->type = XRT_PICTURE; newPict->info[0].id = stuff->pid; if (refDraw->type == XRT_WINDOW && - stuff->drawable == WindowTable[0]->drawable.id) + stuff->drawable == screenInfo.screens[0]->root->drawable.id) { newPict->u.pict.root = TRUE; } @@ -2723,9 +2709,9 @@ PanoramiXRenderCreatePicture (ClientPtr client) if (result == Success) AddResource(newPict->info[0].id, XRT_PICTURE, newPict); else - xfree(newPict); + free(newPict); - return (result); + return result; } static int @@ -2737,8 +2723,7 @@ PanoramiXRenderChangePicture (ClientPtr client) REQUEST_AT_LEAST_SIZE(xRenderChangePictureReq); - VERIFY_XIN_PICTURE(pict, stuff->picture, client, DixWriteAccess, - RenderErrBase + BadPicture); + VERIFY_XIN_PICTURE(pict, stuff->picture, client, DixWriteAccess); FOR_NSCREENS_BACKWARD(j) { stuff->picture = pict->info[j].id; @@ -2746,7 +2731,7 @@ PanoramiXRenderChangePicture (ClientPtr client) if(result != Success) break; } - return (result); + return result; } static int @@ -2758,8 +2743,7 @@ PanoramiXRenderSetPictureClipRectangles (ClientPtr client) REQUEST_AT_LEAST_SIZE(xRenderSetPictureClipRectanglesReq); - VERIFY_XIN_PICTURE(pict, stuff->picture, client, DixWriteAccess, - RenderErrBase + BadPicture); + VERIFY_XIN_PICTURE(pict, stuff->picture, client, DixWriteAccess); FOR_NSCREENS_BACKWARD(j) { stuff->picture = pict->info[j].id; @@ -2767,7 +2751,7 @@ PanoramiXRenderSetPictureClipRectangles (ClientPtr client) if(result != Success) break; } - return (result); + return result; } static int @@ -2779,8 +2763,7 @@ PanoramiXRenderSetPictureTransform (ClientPtr client) REQUEST_AT_LEAST_SIZE(xRenderSetPictureTransformReq); - VERIFY_XIN_PICTURE(pict, stuff->picture, client, DixWriteAccess, - RenderErrBase + BadPicture); + VERIFY_XIN_PICTURE(pict, stuff->picture, client, DixWriteAccess); FOR_NSCREENS_BACKWARD(j) { stuff->picture = pict->info[j].id; @@ -2788,7 +2771,7 @@ PanoramiXRenderSetPictureTransform (ClientPtr client) if(result != Success) break; } - return (result); + return result; } static int @@ -2800,8 +2783,7 @@ PanoramiXRenderSetPictureFilter (ClientPtr client) REQUEST_AT_LEAST_SIZE(xRenderSetPictureFilterReq); - VERIFY_XIN_PICTURE(pict, stuff->picture, client, DixWriteAccess, - RenderErrBase + BadPicture); + VERIFY_XIN_PICTURE(pict, stuff->picture, client, DixWriteAccess); FOR_NSCREENS_BACKWARD(j) { stuff->picture = pict->info[j].id; @@ -2809,7 +2791,7 @@ PanoramiXRenderSetPictureFilter (ClientPtr client) if(result != Success) break; } - return (result); + return result; } static int @@ -2823,8 +2805,7 @@ PanoramiXRenderFreePicture (ClientPtr client) client->errorValue = stuff->picture; - VERIFY_XIN_PICTURE(pict, stuff->picture, client, DixDestroyAccess, - RenderErrBase + BadPicture); + VERIFY_XIN_PICTURE(pict, stuff->picture, client, DixDestroyAccess); FOR_NSCREENS_BACKWARD(j) { @@ -2836,7 +2817,7 @@ PanoramiXRenderFreePicture (ClientPtr client) /* Since ProcRenderFreePicture is using FreeResource, it will free our resource for us on the last pass through the loop above */ - return (result); + return result; } static int @@ -2849,12 +2830,9 @@ PanoramiXRenderComposite (ClientPtr client) REQUEST_SIZE_MATCH(xRenderCompositeReq); - VERIFY_XIN_PICTURE (src, stuff->src, client, DixReadAccess, - RenderErrBase + BadPicture); - VERIFY_XIN_ALPHA (msk, stuff->mask, client, DixReadAccess, - RenderErrBase + BadPicture); - VERIFY_XIN_PICTURE (dst, stuff->dst, client, DixWriteAccess, - RenderErrBase + BadPicture); + VERIFY_XIN_PICTURE (src, stuff->src, client, DixReadAccess); + VERIFY_XIN_ALPHA (msk, stuff->mask, client, DixReadAccess); + VERIFY_XIN_PICTURE (dst, stuff->dst, client, DixWriteAccess); orig = *stuff; @@ -2862,22 +2840,22 @@ PanoramiXRenderComposite (ClientPtr client) stuff->src = src->info[j].id; if (src->u.pict.root) { - stuff->xSrc = orig.xSrc - panoramiXdataPtr[j].x; - stuff->ySrc = orig.ySrc - panoramiXdataPtr[j].y; + stuff->xSrc = orig.xSrc - screenInfo.screens[j]->x; + stuff->ySrc = orig.ySrc - screenInfo.screens[j]->y; } stuff->dst = dst->info[j].id; if (dst->u.pict.root) { - stuff->xDst = orig.xDst - panoramiXdataPtr[j].x; - stuff->yDst = orig.yDst - panoramiXdataPtr[j].y; + stuff->xDst = orig.xDst - screenInfo.screens[j]->x; + stuff->yDst = orig.yDst - screenInfo.screens[j]->y; } if (msk) { stuff->mask = msk->info[j].id; if (msk->u.pict.root) { - stuff->xMask = orig.xMask - panoramiXdataPtr[j].x; - stuff->yMask = orig.yMask - panoramiXdataPtr[j].y; + stuff->xMask = orig.xMask - screenInfo.screens[j]->x; + stuff->yMask = orig.yMask - screenInfo.screens[j]->y; } } result = (*PanoramiXSaveRenderVector[X_RenderComposite]) (client); @@ -2897,10 +2875,8 @@ PanoramiXRenderCompositeGlyphs (ClientPtr client) INT16 xSrc, ySrc; REQUEST_AT_LEAST_SIZE(xRenderCompositeGlyphsReq); - VERIFY_XIN_PICTURE (src, stuff->src, client, DixReadAccess, - RenderErrBase + BadPicture); - VERIFY_XIN_PICTURE (dst, stuff->dst, client, DixWriteAccess, - RenderErrBase + BadPicture); + VERIFY_XIN_PICTURE (src, stuff->src, client, DixReadAccess); + VERIFY_XIN_PICTURE (dst, stuff->dst, client, DixWriteAccess); if (client->req_len << 2 >= (sizeof (xRenderCompositeGlyphsReq) + sizeof (xGlyphElt))) @@ -2913,14 +2889,14 @@ PanoramiXRenderCompositeGlyphs (ClientPtr client) stuff->src = src->info[j].id; if (src->u.pict.root) { - stuff->xSrc = xSrc - panoramiXdataPtr[j].x; - stuff->ySrc = ySrc - panoramiXdataPtr[j].y; + stuff->xSrc = xSrc - screenInfo.screens[j]->x; + stuff->ySrc = ySrc - screenInfo.screens[j]->y; } stuff->dst = dst->info[j].id; if (dst->u.pict.root) { - elt->deltax = origElt.deltax - panoramiXdataPtr[j].x; - elt->deltay = origElt.deltay - panoramiXdataPtr[j].y; + elt->deltax = origElt.deltax - screenInfo.screens[j]->x; + elt->deltay = origElt.deltay - screenInfo.screens[j]->y; } result = (*PanoramiXSaveRenderVector[stuff->renderReqType]) (client); if(result != Success) break; @@ -2940,19 +2916,18 @@ PanoramiXRenderFillRectangles (ClientPtr client) int extra_len; REQUEST_AT_LEAST_SIZE (xRenderFillRectanglesReq); - VERIFY_XIN_PICTURE (dst, stuff->dst, client, DixWriteAccess, - RenderErrBase + BadPicture); + VERIFY_XIN_PICTURE (dst, stuff->dst, client, DixWriteAccess); extra_len = (client->req_len << 2) - sizeof (xRenderFillRectanglesReq); if (extra_len && - (extra = (char *) xalloc (extra_len))) + (extra = (char *) malloc(extra_len))) { memcpy (extra, stuff + 1, extra_len); FOR_NSCREENS_FORWARD(j) { if (j) memcpy (stuff + 1, extra, extra_len); if (dst->u.pict.root) { - int x_off = panoramiXdataPtr[j].x; - int y_off = panoramiXdataPtr[j].y; + int x_off = screenInfo.screens[j]->x; + int y_off = screenInfo.screens[j]->y; if(x_off || y_off) { xRectangle *rects = (xRectangle *) (stuff + 1); @@ -2970,7 +2945,7 @@ PanoramiXRenderFillRectangles (ClientPtr client) result = (*PanoramiXSaveRenderVector[X_RenderFillRectangles]) (client); if(result != Success) break; } - xfree(extra); + free(extra); } return result; @@ -2987,22 +2962,20 @@ PanoramiXRenderTrapezoids(ClientPtr client) REQUEST_AT_LEAST_SIZE (xRenderTrapezoidsReq); - VERIFY_XIN_PICTURE (src, stuff->src, client, DixReadAccess, - RenderErrBase + BadPicture); - VERIFY_XIN_PICTURE (dst, stuff->dst, client, DixWriteAccess, - RenderErrBase + BadPicture); + VERIFY_XIN_PICTURE (src, stuff->src, client, DixReadAccess); + VERIFY_XIN_PICTURE (dst, stuff->dst, client, DixWriteAccess); extra_len = (client->req_len << 2) - sizeof (xRenderTrapezoidsReq); if (extra_len && - (extra = (char *) xalloc (extra_len))) { + (extra = (char *) malloc(extra_len))) { memcpy (extra, stuff + 1, extra_len); FOR_NSCREENS_FORWARD(j) { if (j) memcpy (stuff + 1, extra, extra_len); if (dst->u.pict.root) { - int x_off = panoramiXdataPtr[j].x; - int y_off = panoramiXdataPtr[j].y; + int x_off = screenInfo.screens[j]->x; + int y_off = screenInfo.screens[j]->y; if(x_off || y_off) { xTrapezoid *trap = (xTrapezoid *) (stuff + 1); @@ -3032,7 +3005,7 @@ PanoramiXRenderTrapezoids(ClientPtr client) if(result != Success) break; } - xfree(extra); + free(extra); } return result; @@ -3049,22 +3022,20 @@ PanoramiXRenderTriangles(ClientPtr client) REQUEST_AT_LEAST_SIZE (xRenderTrianglesReq); - VERIFY_XIN_PICTURE (src, stuff->src, client, DixReadAccess, - RenderErrBase + BadPicture); - VERIFY_XIN_PICTURE (dst, stuff->dst, client, DixWriteAccess, - RenderErrBase + BadPicture); + VERIFY_XIN_PICTURE (src, stuff->src, client, DixReadAccess); + VERIFY_XIN_PICTURE (dst, stuff->dst, client, DixWriteAccess); extra_len = (client->req_len << 2) - sizeof (xRenderTrianglesReq); if (extra_len && - (extra = (char *) xalloc (extra_len))) { + (extra = (char *) malloc(extra_len))) { memcpy (extra, stuff + 1, extra_len); FOR_NSCREENS_FORWARD(j) { if (j) memcpy (stuff + 1, extra, extra_len); if (dst->u.pict.root) { - int x_off = panoramiXdataPtr[j].x; - int y_off = panoramiXdataPtr[j].y; + int x_off = screenInfo.screens[j]->x; + int y_off = screenInfo.screens[j]->y; if(x_off || y_off) { xTriangle *tri = (xTriangle *) (stuff + 1); @@ -3090,7 +3061,7 @@ PanoramiXRenderTriangles(ClientPtr client) if(result != Success) break; } - xfree(extra); + free(extra); } return result; @@ -3107,22 +3078,20 @@ PanoramiXRenderTriStrip(ClientPtr client) REQUEST_AT_LEAST_SIZE (xRenderTriStripReq); - VERIFY_XIN_PICTURE (src, stuff->src, client, DixReadAccess, - RenderErrBase + BadPicture); - VERIFY_XIN_PICTURE (dst, stuff->dst, client, DixWriteAccess, - RenderErrBase + BadPicture); + VERIFY_XIN_PICTURE (src, stuff->src, client, DixReadAccess); + VERIFY_XIN_PICTURE (dst, stuff->dst, client, DixWriteAccess); extra_len = (client->req_len << 2) - sizeof (xRenderTriStripReq); if (extra_len && - (extra = (char *) xalloc (extra_len))) { + (extra = (char *) malloc(extra_len))) { memcpy (extra, stuff + 1, extra_len); FOR_NSCREENS_FORWARD(j) { if (j) memcpy (stuff + 1, extra, extra_len); if (dst->u.pict.root) { - int x_off = panoramiXdataPtr[j].x; - int y_off = panoramiXdataPtr[j].y; + int x_off = screenInfo.screens[j]->x; + int y_off = screenInfo.screens[j]->y; if(x_off || y_off) { xPointFixed *fixed = (xPointFixed *) (stuff + 1); @@ -3144,7 +3113,7 @@ PanoramiXRenderTriStrip(ClientPtr client) if(result != Success) break; } - xfree(extra); + free(extra); } return result; @@ -3161,22 +3130,20 @@ PanoramiXRenderTriFan(ClientPtr client) REQUEST_AT_LEAST_SIZE (xRenderTriFanReq); - VERIFY_XIN_PICTURE (src, stuff->src, client, DixReadAccess, - RenderErrBase + BadPicture); - VERIFY_XIN_PICTURE (dst, stuff->dst, client, DixWriteAccess, - RenderErrBase + BadPicture); + VERIFY_XIN_PICTURE (src, stuff->src, client, DixReadAccess); + VERIFY_XIN_PICTURE (dst, stuff->dst, client, DixWriteAccess); extra_len = (client->req_len << 2) - sizeof (xRenderTriFanReq); if (extra_len && - (extra = (char *) xalloc (extra_len))) { + (extra = (char *) malloc(extra_len))) { memcpy (extra, stuff + 1, extra_len); FOR_NSCREENS_FORWARD(j) { if (j) memcpy (stuff + 1, extra, extra_len); if (dst->u.pict.root) { - int x_off = panoramiXdataPtr[j].x; - int y_off = panoramiXdataPtr[j].y; + int x_off = screenInfo.screens[j]->x; + int y_off = screenInfo.screens[j]->y; if(x_off || y_off) { xPointFixed *fixed = (xPointFixed *) (stuff + 1); @@ -3198,7 +3165,7 @@ PanoramiXRenderTriFan(ClientPtr client) if(result != Success) break; } - xfree(extra); + free(extra); } return result; @@ -3215,11 +3182,10 @@ PanoramiXRenderAddTraps (ClientPtr client) INT16 x_off, y_off; REQUEST_AT_LEAST_SIZE (xRenderAddTrapsReq); - VERIFY_XIN_PICTURE (picture, stuff->picture, client, DixWriteAccess, - RenderErrBase + BadPicture); + VERIFY_XIN_PICTURE (picture, stuff->picture, client, DixWriteAccess); extra_len = (client->req_len << 2) - sizeof (xRenderAddTrapsReq); if (extra_len && - (extra = (char *) xalloc (extra_len))) + (extra = (char *) malloc(extra_len))) { memcpy (extra, stuff + 1, extra_len); x_off = stuff->xOff; @@ -3230,13 +3196,13 @@ PanoramiXRenderAddTraps (ClientPtr client) if (picture->u.pict.root) { - stuff->xOff = x_off + panoramiXdataPtr[j].x; - stuff->yOff = y_off + panoramiXdataPtr[j].y; + stuff->xOff = x_off + screenInfo.screens[j]->x; + stuff->yOff = y_off + screenInfo.screens[j]->y; } result = (*PanoramiXSaveRenderVector[X_RenderAddTraps]) (client); if(result != Success) break; } - xfree(extra); + free(extra); } return result; @@ -3251,7 +3217,7 @@ PanoramiXRenderCreateSolidFill (ClientPtr client) REQUEST_AT_LEAST_SIZE(xRenderCreateSolidFillReq); - if(!(newPict = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes)))) + if(!(newPict = (PanoramiXRes *) malloc(sizeof(PanoramiXRes)))) return BadAlloc; newPict->type = XRT_PICTURE; @@ -3270,7 +3236,7 @@ PanoramiXRenderCreateSolidFill (ClientPtr client) if (result == Success) AddResource(newPict->info[0].id, XRT_PICTURE, newPict); else - xfree(newPict); + free(newPict); return result; } @@ -3284,7 +3250,7 @@ PanoramiXRenderCreateLinearGradient (ClientPtr client) REQUEST_AT_LEAST_SIZE(xRenderCreateLinearGradientReq); - if(!(newPict = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes)))) + if(!(newPict = (PanoramiXRes *) malloc(sizeof(PanoramiXRes)))) return BadAlloc; newPict->type = XRT_PICTURE; @@ -3303,7 +3269,7 @@ PanoramiXRenderCreateLinearGradient (ClientPtr client) if (result == Success) AddResource(newPict->info[0].id, XRT_PICTURE, newPict); else - xfree(newPict); + free(newPict); return result; } @@ -3317,7 +3283,7 @@ PanoramiXRenderCreateRadialGradient (ClientPtr client) REQUEST_AT_LEAST_SIZE(xRenderCreateRadialGradientReq); - if(!(newPict = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes)))) + if(!(newPict = (PanoramiXRes *) malloc(sizeof(PanoramiXRes)))) return BadAlloc; newPict->type = XRT_PICTURE; @@ -3336,7 +3302,7 @@ PanoramiXRenderCreateRadialGradient (ClientPtr client) if (result == Success) AddResource(newPict->info[0].id, XRT_PICTURE, newPict); else - xfree(newPict); + free(newPict); return result; } @@ -3350,7 +3316,7 @@ PanoramiXRenderCreateConicalGradient (ClientPtr client) REQUEST_AT_LEAST_SIZE(xRenderCreateConicalGradientReq); - if(!(newPict = (PanoramiXRes *) xalloc(sizeof(PanoramiXRes)))) + if(!(newPict = (PanoramiXRes *) malloc(sizeof(PanoramiXRes)))) return BadAlloc; newPict->type = XRT_PICTURE; @@ -3369,7 +3335,7 @@ PanoramiXRenderCreateConicalGradient (ClientPtr client) if (result == Success) AddResource(newPict->info[0].id, XRT_PICTURE, newPict); else - xfree(newPict); + free(newPict); return result; } @@ -3381,6 +3347,8 @@ PanoramiXRenderInit (void) XRT_PICTURE = CreateNewResourceType (XineramaDeleteResource, "XineramaPicture"); + if (RenderErrBase) + SetResourceTypeErrorValue(XRT_PICTURE, RenderErrBase + BadPicture); for (i = 0; i < RenderNumberRequests; i++) PanoramiXSaveRenderVector[i] = ProcRenderVector[i]; /* @@ -3416,6 +3384,7 @@ PanoramiXRenderReset (void) int i; for (i = 0; i < RenderNumberRequests; i++) ProcRenderVector[i] = PanoramiXSaveRenderVector[i]; + RenderErrBase = 0; } #endif /* PANORAMIX */ diff --git a/xserver/test/Makefile.am b/xserver/test/Makefile.am index 7c4467161..456221e46 100644 --- a/xserver/test/Makefile.am +++ b/xserver/test/Makefile.am @@ -33,10 +33,9 @@ libxservertest_la_LIBADD = \ $(top_builddir)/mi/libmi.la \ $(top_builddir)/os/libos.la \ @XORG_LIBS@ +endif CLEANFILES=libxservertest.c libxservertest.c: touch $@ - -endif diff --git a/xserver/test/Makefile.in b/xserver/test/Makefile.in index 3692d3bcd..b3e9fffe8 100644 --- a/xserver/test/Makefile.in +++ b/xserver/test/Makefile.in @@ -145,10 +145,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -236,6 +232,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -250,6 +248,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -267,10 +266,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -326,10 +329,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -347,17 +351,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -384,20 +382,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -489,6 +490,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ @@ -662,7 +664,7 @@ target_alias = @target_alias@ @UNITTESTS_TRUE@ $(top_builddir)/os/libos.la \ @UNITTESTS_TRUE@ @XORG_LIBS@ -@UNITTESTS_TRUE@CLEANFILES = libxservertest.c +CLEANFILES = libxservertest.c all: all-recursive .SUFFIXES: @@ -1114,8 +1116,8 @@ uninstall-info: uninstall-info-recursive uninstall-info-am -@UNITTESTS_TRUE@libxservertest.c: -@UNITTESTS_TRUE@ touch $@ +libxservertest.c: + touch $@ # 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/test/input.c b/xserver/test/input.c index 63d1a1801..b90d3b4fd 100644 --- a/xserver/test/input.c +++ b/xserver/test/input.c @@ -771,11 +771,143 @@ static void xi_unregister_handlers(void) } +static void cmp_attr_fields(InputAttributes *attr1, + InputAttributes *attr2) +{ + char **tags1, **tags2; + + g_assert(attr1 && attr2); + g_assert(attr1 != attr2); + g_assert(attr1->flags == attr2->flags); + + if (attr1->product != NULL) + { + g_assert(attr1->product != attr2->product); + g_assert(strcmp(attr1->product, attr2->product) == 0); + } else + g_assert(attr2->product == NULL); + + if (attr1->vendor != NULL) + { + g_assert(attr1->vendor != attr2->vendor); + g_assert(strcmp(attr1->vendor, attr2->vendor) == 0); + } else + g_assert(attr2->vendor == NULL); + + if (attr1->device != NULL) + { + g_assert(attr1->device != attr2->device); + g_assert(strcmp(attr1->device, attr2->device) == 0); + } else + g_assert(attr2->device == NULL); + + if (attr1->pnp_id != NULL) + { + g_assert(attr1->pnp_id != attr2->pnp_id); + g_assert(strcmp(attr1->pnp_id, attr2->pnp_id) == 0); + } else + g_assert(attr2->pnp_id == NULL); + + if (attr1->usb_id != NULL) + { + g_assert(attr1->usb_id != attr2->usb_id); + g_assert(strcmp(attr1->usb_id, attr2->usb_id) == 0); + } else + g_assert(attr2->usb_id == NULL); + + tags1 = attr1->tags; + tags2 = attr2->tags; + + /* if we don't have any tags, skip the tag checking bits */ + if (!tags1) + { + g_assert(!tags2); + return; + } + + /* Don't lug around empty arrays */ + g_assert(*tags1); + g_assert(*tags2); + + /* check for identical content, but duplicated */ + while (*tags1) + { + g_assert(*tags1 != *tags2); + g_assert(strcmp(*tags1, *tags2) == 0); + tags1++; + tags2++; + } + + /* ensure tags1 and tags2 have the same no of elements */ + g_assert(!*tags2); + + /* check for not sharing memory */ + tags1 = attr1->tags; + while (*tags1) + { + tags2 = attr2->tags; + while (*tags2) + g_assert(*tags1 != *tags2++); + + tags1++; + } +} + +static void dix_input_attributes(void) +{ + InputAttributes orig = {0}; + InputAttributes *new; + char *tags[4] = {"tag1", "tag2", "tag2", NULL}; + + new = DuplicateInputAttributes(NULL); + g_assert(!new); + + new = DuplicateInputAttributes(&orig); + g_assert(memcmp(&orig, new, sizeof(InputAttributes)) == 0); + + orig.product = "product name"; + new = DuplicateInputAttributes(&orig); + cmp_attr_fields(&orig, new); + FreeInputAttributes(new); + + orig.vendor = "vendor name"; + new = DuplicateInputAttributes(&orig); + cmp_attr_fields(&orig, new); + FreeInputAttributes(new); + + orig.device = "device path"; + new = DuplicateInputAttributes(&orig); + cmp_attr_fields(&orig, new); + FreeInputAttributes(new); + + orig.pnp_id = "PnPID"; + new = DuplicateInputAttributes(&orig); + cmp_attr_fields(&orig, new); + FreeInputAttributes(new); + + orig.usb_id = "USBID"; + new = DuplicateInputAttributes(&orig); + cmp_attr_fields(&orig, new); + FreeInputAttributes(new); + + orig.flags = 0xF0; + new = DuplicateInputAttributes(&orig); + cmp_attr_fields(&orig, new); + FreeInputAttributes(new); + + orig.tags = tags; + new = DuplicateInputAttributes(&orig); + cmp_attr_fields(&orig, new); + FreeInputAttributes(new); +} + + int main(int argc, char** argv) { g_test_init(&argc, &argv,NULL); g_test_bug_base("https://bugzilla.freedesktop.org/show_bug.cgi?id="); + g_test_add_func("/dix/input/attributes", dix_input_attributes); g_test_add_func("/dix/input/init-valuators", dix_init_valuators); g_test_add_func("/dix/input/event-core-conversion", dix_event_to_core_conversion); g_test_add_func("/dix/input/check-grab-values", dix_check_grab_values); @@ -784,5 +916,6 @@ int main(int argc, char** argv) g_test_add_func("/include/byte_padding_macros", include_byte_padding_macros); g_test_add_func("/Xi/xiproperty/register-unregister", xi_unregister_handlers); + return g_test_run(); } diff --git a/xserver/test/xi2/Makefile.in b/xserver/test/xi2/Makefile.in index 455e53a01..847d1e228 100644 --- a/xserver/test/xi2/Makefile.in +++ b/xserver/test/xi2/Makefile.in @@ -204,10 +204,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -295,6 +291,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -309,6 +307,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -326,10 +325,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -385,10 +388,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -406,17 +410,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -443,20 +441,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -548,6 +549,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/test/xi2/protocol-common.c b/xserver/test/xi2/protocol-common.c index 8638fd9a8..50f2b8698 100644 --- a/xserver/test/xi2/protocol-common.c +++ b/xserver/test/xi2/protocol-common.c @@ -27,6 +27,7 @@ #include #include "extinit.h" /* for XInputExtensionInit */ +#include "exglobals.h" #include #include "protocol-common.h" @@ -47,7 +48,7 @@ static void fake_init_sprite(DeviceIntPtr dev) sprite = dev->spriteInfo->sprite; sprite->spriteTraceSize = 10; - sprite->spriteTrace = xcalloc(sprite->spriteTraceSize, sizeof(WindowPtr)); + sprite->spriteTrace = calloc(sprite->spriteTraceSize, sizeof(WindowPtr)); sprite->spriteTraceGood = 1; sprite->spriteTrace[0] = &root; sprite->hot.x = SPRITE_X; @@ -107,7 +108,6 @@ ClientRec init_client(int len, void *data) /* we store the privates now and reassign it after the memset. this way * we can share them across multiple test runs and don't have to worry * about freeing them after each test run. */ - PrivateRec *privates = client.devPrivates; client.index = CLIENT_INDEX; client.clientAsMask = CLIENT_MASK; @@ -115,7 +115,7 @@ ClientRec init_client(int len, void *data) client.req_len = len; client.requestBuffer = data; - client.devPrivates = privates; + dixAllocatePrivates(&client.devPrivates, PRIVATE_CLIENT); return client; } @@ -132,16 +132,18 @@ void init_window(WindowPtr window, WindowPtr parent, int id) window->drawable.height = 200; } window->parent = parent; - window->optional = xcalloc(1, sizeof(WindowOptRec)); + window->optional = calloc(1, sizeof(WindowOptRec)); g_assert(window->optional); } +extern DevPrivateKeyRec miPointerScreenKeyRec; +extern DevPrivateKeyRec miPointerPrivKeyRec; + /* Needed for the screen setup, otherwise we crash during sprite initialization */ static Bool device_cursor_init(DeviceIntPtr dev, ScreenPtr screen) { return TRUE; } static Bool set_cursor_pos(DeviceIntPtr dev, ScreenPtr screen, int x, int y, Bool event) { return TRUE; } void init_simple(void) { - screenInfo.arraySize = MAXSCREENS; screenInfo.numScreens = 1; screenInfo.screens[0] = &screen; @@ -154,7 +156,12 @@ void init_simple(void) dixResetPrivates(); InitAtoms(); + XkbInitPrivates(); + dixRegisterPrivateKey(&XIClientPrivateKeyRec, PRIVATE_CLIENT, sizeof(XIClientRec)); + dixRegisterPrivateKey(&miPointerScreenKeyRec, PRIVATE_SCREEN, 0); + dixRegisterPrivateKey(&miPointerPrivKeyRec, PRIVATE_DEVICE, 0); XInputExtensionInit(); + init_window(&root, NULL, ROOT_WINDOW_ID); init_window(&window, &root, CLIENT_WINDOW_ID); diff --git a/xserver/test/xi2/protocol-eventconvert.c b/xserver/test/xi2/protocol-eventconvert.c index f20a10a57..211cce6ad 100644 --- a/xserver/test/xi2/protocol-eventconvert.c +++ b/xserver/test/xi2/protocol-eventconvert.c @@ -141,12 +141,12 @@ static void test_XIRawEvent(RawDeviceEvent *in) test_values_XIRawEvent(in, out, FALSE); - swapped = xcalloc(1, sizeof(xEvent) + out->length * 4); + swapped = calloc(1, sizeof(xEvent) + out->length * 4); XI2EventSwap((xGenericEvent*)out, (xGenericEvent*)swapped); test_values_XIRawEvent(in, swapped, TRUE); - xfree(out); - xfree(swapped); + free(out); + free(swapped); } static void test_convert_XIFocusEvent(void) @@ -400,12 +400,12 @@ static void test_XIDeviceEvent(DeviceEvent *in) test_values_XIDeviceEvent(in, out, FALSE); - swapped = xcalloc(1, sizeof(xEvent) + out->length * 4); + swapped = calloc(1, sizeof(xEvent) + out->length * 4); XI2EventSwap((xGenericEvent*)out, (xGenericEvent*)swapped); test_values_XIDeviceEvent(in, swapped, TRUE); - xfree(out); - xfree(swapped); + free(out); + free(swapped); } static void test_convert_XIDeviceEvent(void) @@ -756,12 +756,12 @@ static void test_XIDeviceChangedEvent(DeviceChangedEvent *in) test_values_XIDeviceChangedEvent(in, out, FALSE); - swapped = xcalloc(1, sizeof(xEvent) + out->length * 4); + swapped = calloc(1, sizeof(xEvent) + out->length * 4); XI2EventSwap((xGenericEvent*)out, (xGenericEvent*)swapped); test_values_XIDeviceChangedEvent(in, swapped, TRUE); - xfree(out); - xfree(swapped); + free(out); + free(swapped); } static void test_convert_XIDeviceChangedEvent(void) diff --git a/xserver/test/xtest.c b/xserver/test/xtest.c index 572f5d2df..6ea6862f7 100644 --- a/xserver/test/xtest.c +++ b/xserver/test/xtest.c @@ -30,6 +30,7 @@ #include "inputstr.h" #include "scrnintstr.h" #include "exevents.h" +#include "xkbsrv.h" #include "xserver-properties.h" #include @@ -49,7 +50,6 @@ static void xtest_init_devices(void) /* random stuff that needs initialization */ memset(&screen, 0, sizeof(screen)); - screenInfo.arraySize = MAXSCREENS; screenInfo.numScreens = 1; screenInfo.screens[0] = &screen; screen.myNum = 0; @@ -60,6 +60,8 @@ static void xtest_init_devices(void) dixResetPrivates(); InitAtoms(); + XkbInitPrivates(); + /* this also inits the xtest devices */ InitCoreDevices(); diff --git a/xserver/xfixes/Makefile.in b/xserver/xfixes/Makefile.in index 1b8344b87..44b3afe52 100644 --- a/xserver/xfixes/Makefile.in +++ b/xserver/xfixes/Makefile.in @@ -120,10 +120,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -211,6 +207,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -225,6 +223,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -242,10 +241,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -301,10 +304,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -322,17 +326,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -359,20 +357,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -464,6 +465,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ diff --git a/xserver/xfixes/cursor.c b/xserver/xfixes/cursor.c index 2aba0cec9..41ba0fbac 100644 --- a/xserver/xfixes/cursor.c +++ b/xserver/xfixes/cursor.c @@ -58,10 +58,9 @@ static RESTYPE CursorClientType; static RESTYPE CursorHideCountType; static RESTYPE CursorWindowType; static CursorPtr CursorCurrent[MAXDEVICES]; -static CursorPtr pInvisibleCursor = NULL; -static int CursorScreenPrivateKeyIndex; -static DevPrivateKey CursorScreenPrivateKey = &CursorScreenPrivateKeyIndex; +static DevPrivateKeyRec CursorScreenPrivateKeyRec; +#define CursorScreenPrivateKey (&CursorScreenPrivateKeyRec) static void deleteCursorHideCountsForScreen (ScreenPtr pScreen); @@ -70,10 +69,7 @@ static void deleteCursorHideCountsForScreen (ScreenPtr pScreen); int err; \ err = dixLookupResourceByType((pointer *) &pCursor, cursor, \ RT_CURSOR, client, access); \ - if (err == BadValue) { \ - client->errorValue = cursor; \ - return BadCursor; \ - } else if (err != Success) { \ + if (err != Success) { \ client->errorValue = cursor; \ return err; \ } \ @@ -151,8 +147,7 @@ CursorDisplayCursor (DeviceIntPtr pDev, CursorVisible = EnableCursor; if (cs->pCursorHideCounts != NULL || !CursorVisible) { - ret = ((*pScreen->RealizeCursor)(pDev, pScreen, pInvisibleCursor) && - (*pScreen->DisplayCursor) (pDev, pScreen, pInvisibleCursor)); + ret = (*pScreen->DisplayCursor) (pDev, pScreen, NullCursor); } else { ret = (*pScreen->DisplayCursor) (pDev, pScreen, pCursor); } @@ -164,13 +159,11 @@ CursorDisplayCursor (DeviceIntPtr pDev, CursorCurrent[pDev->id] = pCursor; for (e = cursorEvents; e; e = e->next) { - if ((e->eventMask & XFixesDisplayCursorNotifyMask) && - !e->pClient->clientGone) + if ((e->eventMask & XFixesDisplayCursorNotifyMask)) { xXFixesCursorNotifyEvent ev; ev.type = XFixesEventBase + XFixesCursorNotify; ev.subtype = XFixesDisplayCursorNotify; - ev.sequenceNumber = e->pClient->sequence; ev.window = e->pWindow->drawable.id; ev.cursorSerial = pCursor->serialNumber; ev.timestamp = currentTime.milliseconds; @@ -196,7 +189,7 @@ CursorCloseScreen (int index, ScreenPtr pScreen) Unwrap (cs, pScreen, DisplayCursor, display_proc); deleteCursorHideCountsForScreen(pScreen); ret = (*pScreen->CloseScreen) (index, pScreen); - xfree (cs); + free(cs); return ret; } @@ -229,7 +222,7 @@ XFixesSelectCursorInput (ClientPtr pClient, } if (!e) { - e = (CursorEventPtr) xalloc (sizeof (CursorEventRec)); + e = (CursorEventPtr) malloc(sizeof (CursorEventRec)); if (!e) return BadAlloc; @@ -249,7 +242,7 @@ XFixesSelectCursorInput (ClientPtr pClient, if (!AddResource (pWindow->drawable.id, CursorWindowType, (pointer) pWindow)) { - xfree (e); + free(e); return BadAlloc; } @@ -276,7 +269,7 @@ ProcXFixesSelectCursorInput (ClientPtr client) if (stuff->eventMask & ~CursorAllEvents) { client->errorValue = stuff->eventMask; - return( BadValue ); + return BadValue; } return XFixesSelectCursorInput (client, pWin, stuff->eventMask); } @@ -389,7 +382,7 @@ ProcXFixesGetCursorImage (ClientPtr client) width = pCursor->bits->width; height = pCursor->bits->height; npixels = width * height; - rep = xalloc (sizeof (xXFixesGetCursorImageReply) + + rep = malloc(sizeof (xXFixesGetCursorImageReply) + npixels * sizeof (CARD32)); if (!rep) return BadAlloc; @@ -423,8 +416,8 @@ ProcXFixesGetCursorImage (ClientPtr client) } WriteToClient(client, sizeof (xXFixesGetCursorImageReply) + (npixels << 2), (char *) rep); - xfree (rep); - return client->noClientException; + free(rep); + return Success; } int @@ -452,7 +445,7 @@ ProcXFixesSetCursorName (ClientPtr client) return BadAlloc; pCursor->name = atom; - return(client->noClientException); + return Success; } int @@ -501,7 +494,7 @@ ProcXFixesGetCursorName (ClientPtr client) WriteReplyToClient(client, sizeof(xXFixesGetCursorNameReply), &reply); WriteToClient(client, len, str); - return(client->noClientException); + return Success; } int @@ -544,7 +537,7 @@ ProcXFixesGetCursorImageAndName (ClientPtr client) name = pCursor->name ? NameForAtom (pCursor->name) : ""; nbytes = strlen (name); nbytesRound = pad_to_int32(nbytes); - rep = xalloc (sizeof (xXFixesGetCursorImageAndNameReply) + + rep = malloc(sizeof (xXFixesGetCursorImageAndNameReply) + npixels * sizeof (CARD32) + nbytesRound); if (!rep) return BadAlloc; @@ -583,8 +576,8 @@ ProcXFixesGetCursorImageAndName (ClientPtr client) } WriteToClient(client, sizeof (xXFixesGetCursorImageAndNameReply) + (npixels << 2) + nbytesRound, (char *) rep); - xfree (rep); - return client->noClientException; + free(rep); + return Success; } int @@ -697,7 +690,7 @@ ReplaceCursor (CursorPtr pCursor, } } /* this "knows" that WindowHasNewCursor doesn't depend on it's argument */ - WindowHasNewCursor (WindowTable[0]); + WindowHasNewCursor (screenInfo.screens[0]->root); } static Bool @@ -719,7 +712,7 @@ ProcXFixesChangeCursor (ClientPtr client) DixWriteAccess|DixSetAttrAccess); ReplaceCursor (pSource, TestForCursor, (pointer) pDestination); - return (client->noClientException); + return Success; } int @@ -739,7 +732,7 @@ static Bool TestForCursorName (CursorPtr pCursor, pointer closure) { Atom *pName = closure; - return (pCursor->name == *pName); + return pCursor->name == *pName; } int @@ -757,7 +750,7 @@ ProcXFixesChangeCursorByName (ClientPtr client) name = MakeAtom (tchar, stuff->nbytes, FALSE); if (name) ReplaceCursor (pSource, TestForCursorName, &name); - return (client->noClientException); + return Success; } int @@ -801,7 +794,7 @@ createCursorHideCount (ClientPtr pClient, ScreenPtr pScreen) CursorScreenPtr cs = GetCursorScreen(pScreen); CursorHideCountPtr pChc; - pChc = (CursorHideCountPtr) xalloc(sizeof(CursorHideCountRec)); + pChc = (CursorHideCountPtr) malloc(sizeof(CursorHideCountRec)); if (pChc == NULL) { return BadAlloc; } @@ -818,7 +811,7 @@ createCursorHideCount (ClientPtr pClient, ScreenPtr pScreen) */ if (!AddResource (pChc->resource, CursorHideCountType, (pointer) pChc)) { - xfree(pChc); + free(pChc); return BadAlloc; } @@ -839,7 +832,7 @@ deleteCursorHideCount (CursorHideCountPtr pChcToDel, ScreenPtr pScreen) while (pChc != NULL) { pNext = pChc->pNext; if (pChc == pChcToDel) { - xfree(pChc); + free(pChc); if (pChcLast == NULL) { cs->pCursorHideCounts = pNext; } else { @@ -884,7 +877,7 @@ ProcXFixesHideCursor (ClientPtr client) client, DixGetAttrAccess); if (ret != Success) { client->errorValue = stuff->window; - return (ret == BadValue) ? BadWindow : ret; + return ret; } /* @@ -895,7 +888,7 @@ ProcXFixesHideCursor (ClientPtr client) pChc = findCursorHideCount(client, pWin->drawable.pScreen); if (pChc != NULL) { pChc->hideCount++; - return client->noClientException; + return Success; } /* @@ -947,7 +940,7 @@ ProcXFixesShowCursor (ClientPtr client) client, DixGetAttrAccess); if (rc != Success) { client->errorValue = stuff->window; - return (rc == BadValue) ? BadWindow : rc; + return rc; } /* @@ -969,7 +962,7 @@ ProcXFixesShowCursor (ClientPtr client) FreeResource(pChc->resource, 0); } - return (client->noClientException); + return Success; } int @@ -995,7 +988,7 @@ CursorFreeClient (pointer data, XID id) if (e == old) { *prev = e->next; - xfree (e); + free(e); break; } } @@ -1036,37 +1029,6 @@ CursorFreeWindow (pointer data, XID id) return 1; } -static CursorPtr -createInvisibleCursor (void) -{ - CursorPtr pCursor; - unsigned char *psrcbits, *pmaskbits; - CursorMetricRec cm; - - psrcbits = (unsigned char *) xcalloc(4, 1); - pmaskbits = (unsigned char *) xcalloc(4, 1); - if (psrcbits == NULL || pmaskbits == NULL) { - return NULL; - } - - cm.width = 1; - cm.height = 1; - cm.xhot = 0; - cm.yhot = 0; - - if (AllocARGBCursor(psrcbits, pmaskbits, - NULL, &cm, - 0, 0, 0, - 0, 0, 0, - &pCursor, serverClient, (XID)0) != Success) - return NullCursor; - - if (!AddResource(FakeClientID(0), RT_CURSOR, (pointer) pCursor)) - return NullCursor; - - return pCursor; -} - Bool XFixesCursorInit (void) { @@ -1075,12 +1037,15 @@ XFixesCursorInit (void) if (party_like_its_1989) CursorVisible = EnableCursor; + if (!dixRegisterPrivateKey(&CursorScreenPrivateKeyRec, PRIVATE_SCREEN, 0)) + return FALSE; + for (i = 0; i < screenInfo.numScreens; i++) { ScreenPtr pScreen = screenInfo.screens[i]; CursorScreenPtr cs; - cs = (CursorScreenPtr) xalloc (sizeof (CursorScreenRec)); + cs = (CursorScreenPtr) malloc(sizeof (CursorScreenRec)); if (!cs) return FALSE; Wrap (cs, pScreen, CloseScreen, CursorCloseScreen); @@ -1095,10 +1060,6 @@ XFixesCursorInit (void) CursorWindowType = CreateNewResourceType(CursorFreeWindow, "XFixesCursorWindow"); - pInvisibleCursor = createInvisibleCursor(); - if (pInvisibleCursor == NULL) - return BadAlloc; - return CursorClientType && CursorHideCountType && CursorWindowType; } diff --git a/xserver/xfixes/region.c b/xserver/xfixes/region.c index 1b4accb3e..42d5d7c54 100644 --- a/xserver/xfixes/region.c +++ b/xserver/xfixes/region.c @@ -26,10 +26,8 @@ #include "xfixesint.h" #include "scrnintstr.h" -#ifdef RENDER #include extern int RenderErrBase; -#endif #include #include #include @@ -41,20 +39,20 @@ RegionResFree (pointer data, XID id) { RegionPtr pRegion = (RegionPtr) data; - REGION_DESTROY (0, pRegion); + RegionDestroy(pRegion); return Success; } RegionPtr XFixesRegionCopy (RegionPtr pRegion) { - RegionPtr pNew = REGION_CREATE (0, REGION_EXTENTS(0, pRegion), - REGION_NUM_RECTS(pRegion)); + RegionPtr pNew = RegionCreate(RegionExtents(pRegion), + RegionNumRects(pRegion)); if (!pNew) return 0; - if (!REGION_COPY (0, pNew, pRegion)) + if (!RegionCopy(pNew, pRegion)) { - REGION_DESTROY (0, pNew); + RegionDestroy(pNew); return 0; } return pNew; @@ -65,7 +63,7 @@ XFixesRegionInit (void) { RegionResType = CreateNewResourceType(RegionResFree, "XFixesRegion"); - return (RegionResType != 0); + return RegionResType != 0; } int @@ -83,13 +81,13 @@ ProcXFixesCreateRegion (ClientPtr client) return BadLength; things >>= 3; - pRegion = RECTS_TO_REGION(0, things, (xRectangle *) (stuff + 1), CT_UNSORTED); + pRegion = RegionFromRects(things, (xRectangle *) (stuff + 1), CT_UNSORTED); if (!pRegion) return BadAlloc; if (!AddResource (stuff->region, RegionResType, (pointer) pRegion)) return BadAlloc; - return(client->noClientException); + return Success; } int @@ -121,12 +119,12 @@ ProcXFixesCreateRegionFromBitmap (ClientPtr client) if (rc != Success) { client->errorValue = stuff->bitmap; - return (rc == BadValue) ? BadPixmap : rc; + return rc; } if (pPixmap->drawable.depth != 1) return BadMatch; - pRegion = BITMAP_TO_REGION(pPixmap->drawable.pScreen, pPixmap); + pRegion = BitmapToRegion(pPixmap->drawable.pScreen, pPixmap); if (!pRegion) return BadAlloc; @@ -134,7 +132,7 @@ ProcXFixesCreateRegionFromBitmap (ClientPtr client) if (!AddResource (stuff->region, RegionResType, (pointer) pRegion)) return BadAlloc; - return(client->noClientException); + return Success; } int @@ -166,7 +164,7 @@ ProcXFixesCreateRegionFromWindow (ClientPtr client) if (rc != Success) { client->errorValue = stuff->window; - return (rc == BadValue) ? BadWindow : rc; + return rc; } switch (stuff->kind) { case WindowRegionBounding: @@ -196,7 +194,7 @@ ProcXFixesCreateRegionFromWindow (ClientPtr client) if (!AddResource (stuff->region, RegionResType, (pointer) pRegion)) return BadAlloc; - return(client->noClientException); + return Success; } int @@ -229,7 +227,7 @@ ProcXFixesCreateRegionFromGC (ClientPtr client) switch (pGC->clientClipType) { case CT_PIXMAP: - pRegion = BITMAP_TO_REGION(pGC->pScreen, (PixmapPtr) pGC->clientClip); + pRegion = BitmapToRegion(pGC->pScreen, (PixmapPtr) pGC->clientClip); if (!pRegion) return BadAlloc; break; @@ -246,7 +244,7 @@ ProcXFixesCreateRegionFromGC (ClientPtr client) if (!AddResource (stuff->region, RegionResType, (pointer) pRegion)) return BadAlloc; - return(client->noClientException); + return Success; } int @@ -265,7 +263,6 @@ SProcXFixesCreateRegionFromGC (ClientPtr client) int ProcXFixesCreateRegionFromPicture (ClientPtr client) { -#ifdef RENDER RegionPtr pRegion; PicturePtr pPicture; REQUEST (xXFixesCreateRegionFromPictureReq); @@ -273,12 +270,11 @@ ProcXFixesCreateRegionFromPicture (ClientPtr client) REQUEST_SIZE_MATCH (xXFixesCreateRegionFromPictureReq); LEGAL_NEW_RESOURCE (stuff->region, client); - VERIFY_PICTURE(pPicture, stuff->picture, client, DixGetAttrAccess, - RenderErrBase + BadPicture); + VERIFY_PICTURE(pPicture, stuff->picture, client, DixGetAttrAccess); switch (pPicture->clientClipType) { case CT_PIXMAP: - pRegion = BITMAP_TO_REGION(pPicture->pDrawable->pScreen, + pRegion = BitmapToRegion(pPicture->pDrawable->pScreen, (PixmapPtr) pPicture->clientClip); if (!pRegion) return BadAlloc; @@ -295,10 +291,7 @@ ProcXFixesCreateRegionFromPicture (ClientPtr client) if (!AddResource (stuff->region, RegionResType, (pointer) pRegion)) return BadAlloc; - return(client->noClientException); -#else - return BadRequest; -#endif + return Success; } int @@ -323,7 +316,7 @@ ProcXFixesDestroyRegion (ClientPtr client) REQUEST_SIZE_MATCH(xXFixesDestroyRegionReq); VERIFY_REGION(pRegion, stuff->region, client, DixWriteAccess); FreeResource (stuff->region, RT_NONE); - return(client->noClientException); + return Success; } int @@ -353,16 +346,16 @@ ProcXFixesSetRegion (ClientPtr client) return BadLength; things >>= 3; - pNew = RECTS_TO_REGION(0, things, (xRectangle *) (stuff + 1), CT_UNSORTED); + pNew = RegionFromRects(things, (xRectangle *) (stuff + 1), CT_UNSORTED); if (!pNew) return BadAlloc; - if (!REGION_COPY (0, pRegion, pNew)) + if (!RegionCopy(pRegion, pNew)) { - REGION_DESTROY (0, pNew); + RegionDestroy(pNew); return BadAlloc; } - REGION_DESTROY (0, pNew); - return(client->noClientException); + RegionDestroy(pNew); + return Success; } int @@ -387,10 +380,10 @@ ProcXFixesCopyRegion (ClientPtr client) VERIFY_REGION(pSource, stuff->source, client, DixReadAccess); VERIFY_REGION(pDestination, stuff->destination, client, DixWriteAccess); - if (!REGION_COPY(pScreen, pDestination, pSource)) + if (!RegionCopy(pDestination, pSource)) return BadAlloc; - return(client->noClientException); + return Success; } int @@ -410,7 +403,6 @@ int ProcXFixesCombineRegion (ClientPtr client) { RegionPtr pSource1, pSource2, pDestination; - int ret = Success; REQUEST (xXFixesCombineRegionReq); REQUEST_SIZE_MATCH (xXFixesCombineRegionReq); @@ -420,22 +412,20 @@ ProcXFixesCombineRegion (ClientPtr client) switch (stuff->xfixesReqType) { case X_XFixesUnionRegion: - if (!REGION_UNION (0, pDestination, pSource1, pSource2)) - ret = BadAlloc; + if (!RegionUnion(pDestination, pSource1, pSource2)) + return BadAlloc; break; case X_XFixesIntersectRegion: - if (!REGION_INTERSECT (0, pDestination, pSource1, pSource2)) - ret = BadAlloc; + if (!RegionIntersect(pDestination, pSource1, pSource2)) + return BadAlloc; break; case X_XFixesSubtractRegion: - if (!REGION_SUBTRACT (0, pDestination, pSource1, pSource2)) - ret = BadAlloc; + if (!RegionSubtract(pDestination, pSource1, pSource2)) + return BadAlloc; break; } - if (ret == Success) - ret = client->noClientException; - return ret; + return Success; } int @@ -457,7 +447,6 @@ ProcXFixesInvertRegion (ClientPtr client) { RegionPtr pSource, pDestination; BoxRec bounds; - int ret = Success; REQUEST(xXFixesInvertRegionReq); REQUEST_SIZE_MATCH(xXFixesInvertRegionReq); @@ -477,12 +466,10 @@ ProcXFixesInvertRegion (ClientPtr client) else bounds.y2 = stuff->y + stuff->height; - if (!REGION_INVERSE(0, pDestination, pSource, &bounds)) - ret = BadAlloc; + if (!RegionInverse(pDestination, pSource, &bounds)) + return BadAlloc; - if (ret == Success) - ret = client->noClientException; - return ret; + return Success; } int @@ -511,8 +498,8 @@ ProcXFixesTranslateRegion (ClientPtr client) REQUEST_SIZE_MATCH(xXFixesTranslateRegionReq); VERIFY_REGION(pRegion, stuff->region, client, DixWriteAccess); - REGION_TRANSLATE(pScreen, pRegion, stuff->dx, stuff->dy); - return (client->noClientException); + RegionTranslate(pRegion, stuff->dx, stuff->dy); + return Success; } int @@ -539,9 +526,9 @@ ProcXFixesRegionExtents (ClientPtr client) VERIFY_REGION(pSource, stuff->source, client, DixReadAccess); VERIFY_REGION(pDestination, stuff->destination, client, DixWriteAccess); - REGION_RESET (0, pDestination, REGION_EXTENTS (0, pSource)); + RegionReset(pDestination, RegionExtents(pSource)); - return (client->noClientException); + return Success; } int @@ -571,11 +558,11 @@ ProcXFixesFetchRegion (ClientPtr client) REQUEST_SIZE_MATCH(xXFixesFetchRegionReq); VERIFY_REGION(pRegion, stuff->region, client, DixReadAccess); - pExtent = REGION_EXTENTS (0, pRegion); - pBox = REGION_RECTS (pRegion); - nBox = REGION_NUM_RECTS (pRegion); + pExtent = RegionExtents(pRegion); + pBox = RegionRects (pRegion); + nBox = RegionNumRects (pRegion); - reply = xalloc (sizeof (xXFixesFetchRegionReply) + + reply = malloc(sizeof (xXFixesFetchRegionReply) + nBox * sizeof (xRectangle)); if (!reply) return BadAlloc; @@ -608,8 +595,8 @@ ProcXFixesFetchRegion (ClientPtr client) } (void) WriteToClient(client, sizeof (xXFixesFetchRegionReply) + nBox * sizeof (xRectangle), (char *) reply); - xfree (reply); - return (client->noClientException); + free(reply); + return Success; } int @@ -629,7 +616,7 @@ ProcXFixesSetGCClipRegion (ClientPtr client) { GCPtr pGC; RegionPtr pRegion; - XID vals[2]; + ChangeGCVal vals[2]; int rc; REQUEST(xXFixesSetGCClipRegionReq); REQUEST_SIZE_MATCH(xXFixesSetGCClipRegionReq); @@ -647,12 +634,12 @@ ProcXFixesSetGCClipRegion (ClientPtr client) return BadAlloc; } - vals[0] = stuff->xOrigin; - vals[1] = stuff->yOrigin; - DoChangeGC (pGC, GCClipXOrigin|GCClipYOrigin, vals, 0); + vals[0].val = stuff->xOrigin; + vals[1].val = stuff->yOrigin; + ChangeGC (NullClient, pGC, GCClipXOrigin|GCClipYOrigin, vals); (*pGC->funcs->ChangeClip)(pGC, pRegion ? CT_REGION : CT_NONE, (pointer)pRegion, 0); - return (client->noClientException); + return Success; } int @@ -676,7 +663,6 @@ int ProcXFixesSetWindowShapeRegion (ClientPtr client) { WindowPtr pWin; - ScreenPtr pScreen; RegionPtr pRegion; RegionPtr *pDestRegion; int rc; @@ -688,10 +674,9 @@ ProcXFixesSetWindowShapeRegion (ClientPtr client) if (rc != Success) { client->errorValue = stuff->dest; - return (rc == BadValue) ? BadWindow : rc; + return rc; } VERIFY_REGION_OR_NONE(pRegion, stuff->region, client, DixWriteAccess); - pScreen = pWin->drawable.pScreen; switch (stuff->destKind) { case ShapeBounding: case ShapeClip: @@ -721,7 +706,7 @@ ProcXFixesSetWindowShapeRegion (ClientPtr client) break; } if (stuff->xOff || stuff->yOff) - REGION_TRANSLATE (0, pRegion, stuff->xOff, stuff->yOff); + RegionTranslate(pRegion, stuff->xOff, stuff->yOff); } else { @@ -744,11 +729,11 @@ ProcXFixesSetWindowShapeRegion (ClientPtr client) pDestRegion = &pRegion; /* a NULL region pointer */ } if (*pDestRegion) - REGION_DESTROY(pScreen, *pDestRegion); + RegionDestroy(*pDestRegion); *pDestRegion = pRegion; - (*pScreen->SetShape) (pWin); + (*pWin->drawable.pScreen->SetShape) (pWin, stuff->destKind); SendShapeNotify (pWin, stuff->destKind); - return (client->noClientException); + return Success; } int @@ -769,7 +754,6 @@ SProcXFixesSetWindowShapeRegion (ClientPtr client) int ProcXFixesSetPictureClipRegion (ClientPtr client) { -#ifdef RENDER PicturePtr pPicture; RegionPtr pRegion; ScreenPtr pScreen; @@ -777,17 +761,13 @@ ProcXFixesSetPictureClipRegion (ClientPtr client) REQUEST(xXFixesSetPictureClipRegionReq); REQUEST_SIZE_MATCH (xXFixesSetPictureClipRegionReq); - VERIFY_PICTURE(pPicture, stuff->picture, client, DixSetAttrAccess, - RenderErrBase + BadPicture); + VERIFY_PICTURE(pPicture, stuff->picture, client, DixSetAttrAccess); pScreen = pPicture->pDrawable->pScreen; ps = GetPictureScreen (pScreen); VERIFY_REGION_OR_NONE(pRegion, stuff->region, client, DixReadAccess); return SetPictureClipRegion (pPicture, stuff->xOrigin, stuff->yOrigin, pRegion); -#else - return BadRequest; -#endif } int @@ -809,7 +789,6 @@ int ProcXFixesExpandRegion (ClientPtr client) { RegionPtr pSource, pDestination; - int ret = Success; REQUEST (xXFixesExpandRegionReq); BoxPtr pTmp; BoxPtr pSrc; @@ -820,11 +799,11 @@ ProcXFixesExpandRegion (ClientPtr client) VERIFY_REGION(pSource, stuff->source, client, DixReadAccess); VERIFY_REGION(pDestination, stuff->destination, client, DixWriteAccess); - nBoxes = REGION_NUM_RECTS(pSource); - pSrc = REGION_RECTS(pSource); + nBoxes = RegionNumRects(pSource); + pSrc = RegionRects(pSource); if (nBoxes) { - pTmp = xalloc (nBoxes * sizeof (BoxRec)); + pTmp = malloc(nBoxes * sizeof (BoxRec)); if (!pTmp) return BadAlloc; for (i = 0; i < nBoxes; i++) @@ -834,18 +813,16 @@ ProcXFixesExpandRegion (ClientPtr client) pTmp[i].y1 = pSrc[i].y1 - stuff->top; pTmp[i].y2 = pSrc[i].y2 + stuff->bottom; } - REGION_EMPTY (pScreen, pDestination); + RegionEmpty(pDestination); for (i = 0; i < nBoxes; i++) { RegionRec r; - REGION_INIT (pScreen, &r, &pTmp[i], 0); - REGION_UNION (pScreen, pDestination, pDestination, &r); + RegionInit(&r, &pTmp[i], 0); + RegionUnion(pDestination, pDestination, &r); } - xfree(pTmp); + free(pTmp); } - if (ret == Success) - ret = client->noClientException; - return ret; + return Success; } int diff --git a/xserver/xfixes/saveset.c b/xserver/xfixes/saveset.c index 29de0d8f2..35d8e17e0 100644 --- a/xserver/xfixes/saveset.c +++ b/xserver/xfixes/saveset.c @@ -43,25 +43,21 @@ ProcXFixesChangeSaveSet(ClientPtr client) if ((stuff->mode != SetModeInsert) && (stuff->mode != SetModeDelete)) { client->errorValue = stuff->mode; - return( BadValue ); + return BadValue; } if ((stuff->target != SaveSetNearest) && (stuff->target != SaveSetRoot)) { client->errorValue = stuff->target; - return( BadValue ); + return BadValue; } if ((stuff->map != SaveSetMap) && (stuff->map != SaveSetUnmap)) { client->errorValue = stuff->map; - return( BadValue ); + return BadValue; } toRoot = (stuff->target == SaveSetRoot); map = (stuff->map == SaveSetMap); - result = AlterSaveSetForClient(client, pWin, stuff->mode, toRoot, map); - if (client->noClientException != Success) - return(client->noClientException); - else - return(result); + return AlterSaveSetForClient(client, pWin, stuff->mode, toRoot, map); } int diff --git a/xserver/xfixes/select.c b/xserver/xfixes/select.c index 5ba7896cb..baf1ef8f4 100644 --- a/xserver/xfixes/select.c +++ b/xserver/xfixes/select.c @@ -78,15 +78,13 @@ XFixesSelectionCallback (CallbackListPtr *callbacks, pointer data, pointer args) for (e = selectionEvents; e; e = e->next) { if (e->selection == selection->selection && - (e->eventMask & eventMask) && - !e->pClient->clientGone) + (e->eventMask & eventMask)) { xXFixesSelectionNotifyEvent ev; memset(&ev, 0, sizeof(xXFixesSelectionNotifyEvent)); ev.type = XFixesEventBase + XFixesSelectionNotify; ev.subtype = subtype; - ev.sequenceNumber = e->pClient->sequence; ev.window = e->pWindow->drawable.id; if (subtype == XFixesSetSelectionOwnerNotify) ev.owner = selection->window; @@ -160,7 +158,7 @@ XFixesSelectSelectionInput (ClientPtr pClient, } if (!e) { - e = (SelectionEventPtr) xalloc (sizeof (SelectionEventRec)); + e = (SelectionEventPtr) malloc(sizeof (SelectionEventRec)); if (!e) return BadAlloc; @@ -181,7 +179,7 @@ XFixesSelectSelectionInput (ClientPtr pClient, if (!AddResource (pWindow->drawable.id, SelectionWindowType, (pointer) pWindow)) { - xfree (e); + free(e); return BadAlloc; } @@ -213,7 +211,7 @@ ProcXFixesSelectSelectionInput (ClientPtr client) if (stuff->eventMask & ~SelectionAllEvents) { client->errorValue = stuff->eventMask; - return( BadValue ); + return BadValue; } return XFixesSelectSelectionInput (client, stuff->selection, pWin, stuff->eventMask); @@ -256,7 +254,7 @@ SelectionFreeClient (pointer data, XID id) if (e == old) { *prev = e->next; - xfree (e); + free(e); CheckSelectionCallback (); break; } diff --git a/xserver/xfixes/xfixes.c b/xserver/xfixes/xfixes.c index 5163dc11e..215909df1 100644 --- a/xserver/xfixes/xfixes.c +++ b/xserver/xfixes/xfixes.c @@ -56,8 +56,8 @@ static unsigned char XFixesReqCode; int XFixesEventBase; int XFixesErrorBase; -static int XFixesClientPrivateKeyIndex; -static DevPrivateKey XFixesClientPrivateKey = &XFixesClientPrivateKeyIndex; +static DevPrivateKeyRec XFixesClientPrivateKeyRec; +#define XFixesClientPrivateKey (&XFixesClientPrivateKeyRec) static int ProcXFixesQueryVersion(ClientPtr client) @@ -92,7 +92,7 @@ ProcXFixesQueryVersion(ClientPtr client) swapl(&rep.minorVersion, n); } WriteToClient(client, sizeof(xXFixesQueryVersionReply), (char *)&rep); - return(client->noClientException); + return Success; } /* Major version controls available requests */ @@ -241,7 +241,7 @@ XFixesExtensionInit(void) { ExtensionEntry *extEntry; - if (!dixRequestPrivate(XFixesClientPrivateKey, sizeof (XFixesClientRec))) + if (!dixRegisterPrivateKey(&XFixesClientPrivateKeyRec, PRIVATE_CLIENT, sizeof (XFixesClientRec))) return; if (!AddCallback (&ClientStateCallback, XFixesClientCallback, 0)) return; @@ -259,5 +259,6 @@ XFixesExtensionInit(void) (EventSwapPtr) SXFixesSelectionNotifyEvent; EventSwapVector[XFixesEventBase + XFixesCursorNotify] = (EventSwapPtr) SXFixesCursorNotifyEvent; + SetResourceTypeErrorValue(RegionResType, XFixesErrorBase + BadRegion); } } diff --git a/xserver/xfixes/xfixes.h b/xserver/xfixes/xfixes.h index 69d162ffe..1638350c2 100644 --- a/xserver/xfixes/xfixes.h +++ b/xserver/xfixes/xfixes.h @@ -37,10 +37,7 @@ extern _X_EXPORT int XFixesErrorBase; int err; \ err = dixLookupResourceByType((pointer *) &pRegion, rid, \ RegionResType, client, mode); \ - if (err == BadValue) { \ - client->errorValue = rid; \ - return XFixesErrorBase + BadRegion; \ - } else if (err != Success) { \ + if (err != Success) { \ client->errorValue = rid; \ return err; \ } \ diff --git a/xserver/xkb/Makefile.am b/xserver/xkb/Makefile.am index e54ce59f0..fb3ccbf6f 100644 --- a/xserver/xkb/Makefile.am +++ b/xserver/xkb/Makefile.am @@ -5,11 +5,9 @@ AM_CFLAGS = $(DIX_CFLAGS) DDX_SRCS = \ ddxBeep.c \ ddxCtrls.c \ - ddxFakeMtn.c \ ddxLEDs.c \ ddxLoad.c \ - ddxList.c \ - ddxDevBtn.c + ddxList.c DIX_SRCS = \ xkb.c \ diff --git a/xserver/xkb/Makefile.in b/xserver/xkb/Makefile.in index aa5559d62..6ef9af55c 100644 --- a/xserver/xkb/Makefile.in +++ b/xserver/xkb/Makefile.in @@ -57,8 +57,8 @@ CONFIG_HEADER = $(top_builddir)/include/do-not-use-config.h \ CONFIG_CLEAN_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libxkb_la_LIBADD = -am__objects_1 = ddxBeep.lo ddxCtrls.lo ddxFakeMtn.lo ddxLEDs.lo \ - ddxLoad.lo ddxList.lo ddxDevBtn.lo +am__objects_1 = ddxBeep.lo ddxCtrls.lo ddxLEDs.lo ddxLoad.lo \ + ddxList.lo am__objects_2 = xkb.lo xkbUtils.lo xkbEvents.lo xkbAccessX.lo \ xkbSwap.lo xkbLEDs.lo xkbInit.lo xkbActions.lo xkbPrKeyEv.lo am__objects_3 = maprules.lo xkmread.lo xkbtext.lo xkbfmisc.lo \ @@ -129,10 +129,6 @@ BUILDDOCS_TRUE = @BUILDDOCS_TRUE@ BUILD_DATE = @BUILD_DATE@ BUILD_KDRIVEFBDEVLIB_FALSE = @BUILD_KDRIVEFBDEVLIB_FALSE@ BUILD_KDRIVEFBDEVLIB_TRUE = @BUILD_KDRIVEFBDEVLIB_TRUE@ -BUILD_LINUXDOC_FALSE = @BUILD_LINUXDOC_FALSE@ -BUILD_LINUXDOC_TRUE = @BUILD_LINUXDOC_TRUE@ -BUILD_PDFDOC_FALSE = @BUILD_PDFDOC_FALSE@ -BUILD_PDFDOC_TRUE = @BUILD_PDFDOC_TRUE@ BUILD_TIME = @BUILD_TIME@ CC = @CC@ CCAS = @CCAS@ @@ -220,6 +216,8 @@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ +ENABLE_DEVEL_DOCS_FALSE = @ENABLE_DEVEL_DOCS_FALSE@ +ENABLE_DEVEL_DOCS_TRUE = @ENABLE_DEVEL_DOCS_TRUE@ EXEEXT = @EXEEXT@ F77 = @F77@ FBDEVHW_FALSE = @FBDEVHW_FALSE@ @@ -234,6 +232,7 @@ FONTOTFDIR = @FONTOTFDIR@ FONTROOTDIR = @FONTROOTDIR@ FONTTTFDIR = @FONTTTFDIR@ FONTTYPE1DIR = @FONTTYPE1DIR@ +FOP = @FOP@ FREEBSD_KLDLOAD_FALSE = @FREEBSD_KLDLOAD_FALSE@ FREEBSD_KLDLOAD_TRUE = @FREEBSD_KLDLOAD_TRUE@ GLIB_CFLAGS = @GLIB_CFLAGS@ @@ -251,10 +250,14 @@ HAVE_DBUS_FALSE = @HAVE_DBUS_FALSE@ HAVE_DBUS_TRUE = @HAVE_DBUS_TRUE@ HAVE_DOXYGEN_FALSE = @HAVE_DOXYGEN_FALSE@ HAVE_DOXYGEN_TRUE = @HAVE_DOXYGEN_TRUE@ -HAVE_PS2PDF_FALSE = @HAVE_PS2PDF_FALSE@ -HAVE_PS2PDF_TRUE = @HAVE_PS2PDF_TRUE@ +HAVE_FOP_FALSE = @HAVE_FOP_FALSE@ +HAVE_FOP_TRUE = @HAVE_FOP_TRUE@ HAVE_STYLESHEETS_FALSE = @HAVE_STYLESHEETS_FALSE@ HAVE_STYLESHEETS_TRUE = @HAVE_STYLESHEETS_TRUE@ +HAVE_XMLTO_FALSE = @HAVE_XMLTO_FALSE@ +HAVE_XMLTO_TEXT_FALSE = @HAVE_XMLTO_TEXT_FALSE@ +HAVE_XMLTO_TEXT_TRUE = @HAVE_XMLTO_TEXT_TRUE@ +HAVE_XMLTO_TRUE = @HAVE_XMLTO_TRUE@ HP300_VIDEO_FALSE = @HP300_VIDEO_FALSE@ HP300_VIDEO_TRUE = @HP300_VIDEO_TRUE@ HPPA_VIDEO_FALSE = @HPPA_VIDEO_FALSE@ @@ -310,10 +313,11 @@ LIBDRM_CFLAGS = @LIBDRM_CFLAGS@ LIBDRM_LIBS = @LIBDRM_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ +LIBSHA1_CFLAGS = @LIBSHA1_CFLAGS@ +LIBSHA1_LIBS = @LIBSHA1_LIBS@ LIBTOOL = @LIBTOOL@ LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ -LINUXDOC = @LINUXDOC@ LINUX_ALPHA_FALSE = @LINUX_ALPHA_FALSE@ LINUX_ALPHA_TRUE = @LINUX_ALPHA_TRUE@ LINUX_IA64_FALSE = @LINUX_IA64_FALSE@ @@ -331,17 +335,11 @@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAIN_LIB = @MAIN_LIB@ MAKEINFO = @MAKEINFO@ -MAKE_HTML = @MAKE_HTML@ -MAKE_PDF = @MAKE_PDF@ -MAKE_PS = @MAKE_PS@ -MAKE_TEXT = @MAKE_TEXT@ MAN_SUBSTS = @MAN_SUBSTS@ MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MITSHM_FALSE = @MITSHM_FALSE@ MITSHM_TRUE = @MITSHM_TRUE@ -MULTIBUFFER_FALSE = @MULTIBUFFER_FALSE@ -MULTIBUFFER_TRUE = @MULTIBUFFER_TRUE@ NEED_STRLCAT_FALSE = @NEED_STRLCAT_FALSE@ NEED_STRLCAT_TRUE = @NEED_STRLCAT_TRUE@ NEED_VSNPRINTF_FALSE = @NEED_VSNPRINTF_FALSE@ @@ -368,20 +366,23 @@ PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@ PCIACCESS_LIBS = @PCIACCESS_LIBS@ PCI_TXT_IDS_PATH = @PCI_TXT_IDS_PATH@ PERL = @PERL@ +PIXMAN_CFLAGS = @PIXMAN_CFLAGS@ +PIXMAN_LIBS = @PIXMAN_LIBS@ PKG_CONFIG = @PKG_CONFIG@ PPC_VIDEO_FALSE = @PPC_VIDEO_FALSE@ PPC_VIDEO_TRUE = @PPC_VIDEO_TRUE@ PROJECTROOT = @PROJECTROOT@ -PS2PDF = @PS2PDF@ RANLIB = @RANLIB@ RAWCPP = @RAWCPP@ RAWCPPFLAGS = @RAWCPPFLAGS@ RECORD_FALSE = @RECORD_FALSE@ RECORD_TRUE = @RECORD_TRUE@ +RELEASE_DATE = @RELEASE_DATE@ RES_FALSE = @RES_FALSE@ RES_TRUE = @RES_TRUE@ SCREENSAVER_FALSE = @SCREENSAVER_FALSE@ SCREENSAVER_TRUE = @SCREENSAVER_TRUE@ +SDK_REQUIRED_MODULES = @SDK_REQUIRED_MODULES@ SECURE_RPC_FALSE = @SECURE_RPC_FALSE@ SECURE_RPC_TRUE = @SECURE_RPC_TRUE@ SED = @SED@ @@ -473,6 +474,7 @@ XKB_COMPILED_DIR = @XKB_COMPILED_DIR@ 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_FALSE = @XNEST_FALSE@ @@ -623,11 +625,9 @@ AM_CFLAGS = $(DIX_CFLAGS) DDX_SRCS = \ ddxBeep.c \ ddxCtrls.c \ - ddxFakeMtn.c \ ddxLEDs.c \ ddxLoad.c \ - ddxList.c \ - ddxDevBtn.c + ddxList.c DIX_SRCS = \ xkb.c \ @@ -719,8 +719,6 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/XKBMisc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ddxBeep.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ddxCtrls.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ddxDevBtn.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ddxFakeMtn.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ddxKillSrv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ddxLEDs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ddxList.Plo@am__quote@ diff --git a/xserver/xkb/XKBAlloc.c b/xserver/xkb/XKBAlloc.c index d40aa3345..c52e091da 100644 --- a/xserver/xkb/XKBAlloc.c +++ b/xserver/xkb/XKBAlloc.c @@ -57,10 +57,10 @@ XkbSymInterpretRec *prev_interpret; if (compat->sym_interpret==NULL) compat->num_si= 0; prev_interpret = compat->sym_interpret; - compat->sym_interpret= xrealloc(compat->sym_interpret, + compat->sym_interpret= realloc(compat->sym_interpret, nSI * sizeof(XkbSymInterpretRec)); if (compat->sym_interpret==NULL) { - xfree(prev_interpret); + free(prev_interpret); compat->size_si= compat->num_si= 0; return BadAlloc; } @@ -70,19 +70,19 @@ XkbSymInterpretRec *prev_interpret; } return Success; } - compat= xcalloc(1, sizeof(XkbCompatMapRec)); + compat= calloc(1, sizeof(XkbCompatMapRec)); if (compat==NULL) return BadAlloc; if (nSI>0) { - compat->sym_interpret= xcalloc(nSI, sizeof(XkbSymInterpretRec)); + compat->sym_interpret= calloc(nSI, sizeof(XkbSymInterpretRec)); if (!compat->sym_interpret) { - xfree(compat); + free(compat); return BadAlloc; } } compat->size_si= nSI; compat->num_si= 0; - bzero((char *)&compat->groups[0],XkbNumKbdGroups*sizeof(XkbModsRec)); + memset((char *)&compat->groups[0], 0, XkbNumKbdGroups*sizeof(XkbModsRec)); xkb->compat= compat; return Success; } @@ -99,15 +99,15 @@ register XkbCompatMapPtr compat; if (freeMap) which= XkbAllCompatMask; if (which&XkbGroupCompatMask) - bzero((char *)&compat->groups[0],XkbNumKbdGroups*sizeof(XkbModsRec)); + memset((char *)&compat->groups[0], 0, XkbNumKbdGroups*sizeof(XkbModsRec)); if (which&XkbSymInterpMask) { if ((compat->sym_interpret)&&(compat->size_si>0)) - xfree(compat->sym_interpret); + free(compat->sym_interpret); compat->size_si= compat->num_si= 0; compat->sym_interpret= NULL; } if (freeMap) { - xfree(compat); + free(compat); xkb->compat= NULL; } return; @@ -123,7 +123,7 @@ XkbNamesPtr names; if (xkb==NULL) return BadMatch; if (xkb->names==NULL) { - xkb->names = xcalloc(1, sizeof(XkbNamesRec)); + xkb->names = calloc(1, sizeof(XkbNamesRec)); if (xkb->names==NULL) return BadAlloc; } @@ -135,7 +135,7 @@ XkbNamesPtr names; type= xkb->map->types; for (i=0;imap->num_types;i++,type++) { if (type->level_names==NULL) { - type->level_names= xcalloc(type->num_levels, sizeof(Atom)); + type->level_names= calloc(type->num_levels, sizeof(Atom)); if (type->level_names==NULL) return BadAlloc; } @@ -146,24 +146,24 @@ XkbNamesPtr names; (!XkbIsLegalKeycode(xkb->max_key_code))|| (xkb->max_key_codemin_key_code)) return BadValue; - names->keys= xcalloc((xkb->max_key_code+1), sizeof(XkbKeyNameRec)); + names->keys= calloc((xkb->max_key_code+1), sizeof(XkbKeyNameRec)); if (names->keys==NULL) return BadAlloc; } if ((which&XkbKeyAliasesMask)&&(nTotalAliases>0)) { if (names->key_aliases==NULL) { - names->key_aliases= xcalloc(nTotalAliases, sizeof(XkbKeyAliasRec)); + names->key_aliases= calloc(nTotalAliases, sizeof(XkbKeyAliasRec)); } else if (nTotalAliases>names->num_key_aliases) { XkbKeyAliasRec *prev_aliases = names->key_aliases; - names->key_aliases= xrealloc(names->key_aliases, + names->key_aliases= realloc(names->key_aliases, nTotalAliases * sizeof(XkbKeyAliasRec)); if (names->key_aliases!=NULL) { memset(&names->key_aliases[names->num_key_aliases], 0, (nTotalAliases - names->num_key_aliases) * sizeof(XkbKeyAliasRec)); } else { - xfree(prev_aliases); + free(prev_aliases); } } if (names->key_aliases==NULL) { @@ -174,18 +174,18 @@ XkbNamesPtr names; } if ((which&XkbRGNamesMask)&&(nTotalRG>0)) { if (names->radio_groups==NULL) { - names->radio_groups= xcalloc(nTotalRG, sizeof(Atom)); + names->radio_groups= calloc(nTotalRG, sizeof(Atom)); } else if (nTotalRG>names->num_rg) { Atom *prev_radio_groups = names->radio_groups; - names->radio_groups= xrealloc(names->radio_groups, + names->radio_groups= realloc(names->radio_groups, nTotalRG * sizeof(Atom)); if (names->radio_groups!=NULL) { memset(&names->radio_groups[names->num_rg], 0, (nTotalRG - names->num_rg) * sizeof(Atom)); } else { - xfree(prev_radio_groups); + free(prev_radio_groups); } } if (names->radio_groups==NULL) @@ -213,29 +213,29 @@ XkbNamesPtr names; type= map->types; for (i=0;inum_types;i++,type++) { if (type->level_names!=NULL) { - xfree(type->level_names); + free(type->level_names); type->level_names= NULL; } } } } if ((which&XkbKeyNamesMask)&&(names->keys!=NULL)) { - xfree(names->keys); + free(names->keys); names->keys= NULL; names->num_keys= 0; } if ((which&XkbKeyAliasesMask)&&(names->key_aliases)){ - xfree(names->key_aliases); + free(names->key_aliases); names->key_aliases=NULL; names->num_key_aliases=0; } if ((which&XkbRGNamesMask)&&(names->radio_groups)) { - xfree(names->radio_groups); + free(names->radio_groups); names->radio_groups= NULL; names->num_rg= 0; } if (freeMap) { - xfree(names); + free(names); xkb->names= NULL; } return; @@ -251,7 +251,7 @@ XkbAllocControls(XkbDescPtr xkb,unsigned which) return BadMatch; if (xkb->ctrls==NULL) { - xkb->ctrls= xcalloc(1, sizeof(XkbControlsRec)); + xkb->ctrls= calloc(1, sizeof(XkbControlsRec)); if (!xkb->ctrls) return BadAlloc; } @@ -263,7 +263,7 @@ static void XkbFreeControls(XkbDescPtr xkb,unsigned which,Bool freeMap) { if (freeMap && (xkb!=NULL) && (xkb->ctrls!=NULL)) { - xfree(xkb->ctrls); + free(xkb->ctrls); xkb->ctrls= NULL; } return; @@ -277,7 +277,7 @@ XkbAllocIndicatorMaps(XkbDescPtr xkb) if (xkb==NULL) return BadMatch; if (xkb->indicators==NULL) { - xkb->indicators= xcalloc(1, sizeof(XkbIndicatorRec)); + xkb->indicators= calloc(1, sizeof(XkbIndicatorRec)); if (!xkb->indicators) return BadAlloc; } @@ -288,7 +288,7 @@ static void XkbFreeIndicatorMaps(XkbDescPtr xkb) { if ((xkb!=NULL)&&(xkb->indicators!=NULL)) { - xfree(xkb->indicators); + free(xkb->indicators); xkb->indicators= NULL; } return; @@ -301,7 +301,7 @@ XkbAllocKeyboard(void) { XkbDescRec *xkb; - xkb = xcalloc(1, sizeof(XkbDescRec)); + xkb = calloc(1, sizeof(XkbDescRec)); if (xkb) xkb->device_spec= XkbUseCoreKbd; return xkb; @@ -332,6 +332,6 @@ XkbFreeKeyboard(XkbDescPtr xkb,unsigned which,Bool freeAll) if (which&XkbControlsMask) XkbFreeControls(xkb,XkbAllControlsMask,TRUE); if (freeAll) - xfree(xkb); + free(xkb); return; } diff --git a/xserver/xkb/XKBGAlloc.c b/xserver/xkb/XKBGAlloc.c index b01005dd0..d1adea34e 100644 --- a/xserver/xkb/XKBGAlloc.c +++ b/xserver/xkb/XKBGAlloc.c @@ -51,7 +51,7 @@ _XkbFreeGeomLeafElems( Bool freeAll, if ((freeAll)||(*elems==NULL)) { *num_inout= *sz_inout= 0; if (*elems!=NULL) { - xfree(*elems); + free(*elems); *elems= NULL; } return; @@ -114,10 +114,8 @@ register char *ptr; } if (freeAll) { (*num_inout)= (*sz_inout)= 0; - if (*elems) { - xfree(*elems); - *elems= NULL; - } + free(*elems); + *elems = NULL; } else if (first+count>=(*num_inout)) *num_inout= first; @@ -137,14 +135,10 @@ _XkbClearProperty(char *prop_in) { XkbPropertyPtr prop= (XkbPropertyPtr)prop_in; - if (prop->name) { - xfree(prop->name); - prop->name= NULL; - } - if (prop->value) { - xfree(prop->value); - prop->value= NULL; - } + free(prop->name); + prop->name = NULL; + free(prop->value); + prop->value = NULL; return; } @@ -183,8 +177,7 @@ _XkbClearColor(char *color_in) { XkbColorPtr color= (XkbColorPtr)color_in; - if (color->spec) - xfree(color->spec); + free(color->spec); return; } @@ -381,11 +374,11 @@ XkbDoodadPtr doodad= (XkbDoodadPtr)doodad_in; case XkbTextDoodad: { if (doodad->text.text!=NULL) { - xfree(doodad->text.text); + free(doodad->text.text); doodad->text.text= NULL; } if (doodad->text.font!=NULL) { - xfree(doodad->text.font); + free(doodad->text.font); doodad->text.font= NULL; } } @@ -393,7 +386,7 @@ XkbDoodadPtr doodad= (XkbDoodadPtr)doodad_in; case XkbLogoDoodad: { if (doodad->logo.logo_name!=NULL) { - xfree(doodad->logo.logo_name); + free(doodad->logo.logo_name); doodad->logo.logo_name= NULL; } } @@ -413,7 +406,7 @@ register XkbDoodadPtr doodad; _XkbClearDoodad((char *)doodad); } if (freeAll) - xfree(doodads); + free(doodads); } return; } @@ -442,10 +435,10 @@ XkbFreeGeometry(XkbGeometryPtr geom,unsigned which,Bool freeMap) XkbFreeGeomKeyAliases(geom,0,geom->num_key_aliases,TRUE); if (freeMap) { if (geom->label_font!=NULL) { - xfree(geom->label_font); + free(geom->label_font); geom->label_font= NULL; } - xfree(geom); + free(geom); } return; } @@ -469,8 +462,8 @@ _XkbGeomAlloc( void ** old, *total= (*num)+num_new; if ((*old)!=NULL) - (*old)= xrealloc((*old),(*total)*sz_elem); - else (*old)= xcalloc((*total),sz_elem); + (*old)= realloc((*old),(*total)*sz_elem); + else (*old)= calloc((*total),sz_elem); if ((*old)==NULL) { *total= *num= 0; return BadAlloc; @@ -478,7 +471,7 @@ _XkbGeomAlloc( void ** old, if (*num>0) { char *tmp= (char *)(*old); - bzero(&tmp[sz_elem*(*num)],(num_new*sz_elem)); + memset(&tmp[sz_elem*(*num)], 0, (num_new*sz_elem)); } return Success; } @@ -615,7 +608,7 @@ XkbGeometryPtr geom; Status rtrn; if (xkb->geom==NULL) { - xkb->geom= xcalloc(1, sizeof(XkbGeometryRec)); + xkb->geom= calloc(1, sizeof(XkbGeometryRec)); if (!xkb->geom) return BadAlloc; } @@ -663,9 +656,8 @@ register XkbPropertyPtr prop; return NULL; for (i=0,prop=geom->properties;inum_properties;i++,prop++) { if ((prop->name)&&(strcmp(name,prop->name)==0)) { - if (prop->value) - xfree(prop->value); - prop->value= xalloc(strlen(value)+1); + free(prop->value); + prop->value= malloc(strlen(value)+1); if (prop->value) strcpy(prop->value,value); return prop; @@ -676,13 +668,13 @@ register XkbPropertyPtr prop; return NULL; } prop= &geom->properties[geom->num_properties]; - prop->name= xalloc(strlen(name)+1); + prop->name= malloc(strlen(name)+1); if (!name) return NULL; strcpy(prop->name,name); - prop->value= xalloc(strlen(value)+1); + prop->value= malloc(strlen(value)+1); if (!value) { - xfree(prop->name); + free(prop->name); prop->name= NULL; return NULL; } @@ -701,7 +693,7 @@ register XkbKeyAliasPtr alias; return NULL; for (i=0,alias=geom->key_aliases;inum_key_aliases;i++,alias++) { if (strncmp(alias->alias,aliasStr,XkbKeyNameLength)==0) { - bzero(alias->real,XkbKeyNameLength); + memset(alias->real, 0, XkbKeyNameLength); strncpy(alias->real,realStr,XkbKeyNameLength); return alias; } @@ -711,7 +703,7 @@ register XkbKeyAliasPtr alias; return NULL; } alias= &geom->key_aliases[geom->num_key_aliases]; - bzero(alias,sizeof(XkbKeyAliasRec)); + memset(alias, 0, sizeof(XkbKeyAliasRec)); strncpy(alias->alias,aliasStr,XkbKeyNameLength); strncpy(alias->real,realStr,XkbKeyNameLength); geom->num_key_aliases++; @@ -738,7 +730,7 @@ register XkbColorPtr color; } color= &geom->colors[geom->num_colors]; color->pixel= pixel; - color->spec= xalloc(strlen(spec)+1); + color->spec= malloc(strlen(spec)+1); if (!color->spec) return NULL; strcpy(color->spec,spec); @@ -758,7 +750,7 @@ XkbOutlinePtr outline; return NULL; } outline= &shape->outlines[shape->num_outlines]; - bzero(outline,sizeof(XkbOutlineRec)); + memset(outline, 0, sizeof(XkbOutlineRec)); if ((sz_points>0)&&(_XkbAllocPoints(outline,sz_points)!=Success)) return NULL; shape->num_outlines++; @@ -783,7 +775,7 @@ register int i; (_XkbAllocShapes(geom,1)!=Success)) return NULL; shape= &geom->shapes[geom->num_shapes]; - bzero(shape,sizeof(XkbShapeRec)); + memset(shape, 0, sizeof(XkbShapeRec)); if ((sz_outlines>0)&&(_XkbAllocOutlines(shape,sz_outlines)!=Success)) return NULL; shape->name= name; @@ -801,7 +793,7 @@ XkbKeyPtr key; if ((row->num_keys>=row->sz_keys)&&(_XkbAllocKeys(row,1)!=Success)) return NULL; key= &row->keys[row->num_keys++]; - bzero(key,sizeof(XkbKeyRec)); + memset(key, 0, sizeof(XkbKeyRec)); return key; } @@ -816,7 +808,7 @@ XkbRowPtr row; (_XkbAllocRows(section,1)!=Success)) return NULL; row= §ion->rows[section->num_rows]; - bzero(row,sizeof(XkbRowRec)); + memset(row, 0, sizeof(XkbRowRec)); if ((sz_keys>0)&&(_XkbAllocKeys(row,sz_keys)!=Success)) return NULL; section->num_rows++; @@ -852,7 +844,7 @@ XkbSectionPtr section; return NULL; if ((sz_doodads>0)&&(_XkbAllocDoodads(section,sz_doodads)!=Success)) { if (section->rows) { - xfree(section->rows); + free(section->rows); section->rows= NULL; section->sz_rows= section->num_rows= 0; } @@ -896,7 +888,7 @@ register int i,nDoodads; return NULL; doodad= &geom->doodads[geom->num_doodads++]; } - bzero(doodad,sizeof(XkbDoodadRec)); + memset(doodad, 0, sizeof(XkbDoodadRec)); doodad->any.name= name; return doodad; } @@ -960,7 +952,7 @@ XkbOverlayRowPtr row; (_XkbAllocOverlayRows(overlay,1)!=Success)) return NULL; row= &overlay->rows[overlay->num_rows]; - bzero(row,sizeof(XkbOverlayRowRec)); + memset(row, 0, sizeof(XkbOverlayRowRec)); if ((sz_keys>0)&&(_XkbAllocOverlayKeys(row,sz_keys)!=Success)) return NULL; row->row_under= row_under; diff --git a/xserver/xkb/XKBMAlloc.c b/xserver/xkb/XKBMAlloc.c index fd12e2b6c..6b186c1ad 100644 --- a/xserver/xkb/XKBMAlloc.c +++ b/xserver/xkb/XKBMAlloc.c @@ -59,7 +59,7 @@ XkbClientMapPtr map; } if (xkb->map==NULL) { - map= xcalloc(1, sizeof(XkbClientMapRec)); + map= calloc(1, sizeof(XkbClientMapRec)); if (map==NULL) return BadAlloc; xkb->map= map; @@ -68,7 +68,7 @@ XkbClientMapPtr map; if ((which&XkbKeyTypesMask)&&(nTotalTypes>0)) { if (map->types==NULL) { - map->types= xcalloc(nTotalTypes, sizeof(XkbKeyTypeRec)); + map->types= calloc(nTotalTypes, sizeof(XkbKeyTypeRec)); if (map->types==NULL) return BadAlloc; map->num_types= 0; @@ -77,14 +77,14 @@ XkbClientMapPtr map; else if (map->size_typestypes; - map->types= xrealloc(map->types,nTotalTypes * sizeof(XkbKeyTypeRec)); + map->types= realloc(map->types,nTotalTypes * sizeof(XkbKeyTypeRec)); if (map->types==NULL) { - xfree(prev_types); + free(prev_types); map->num_types= map->size_types= 0; return BadAlloc; } map->size_types= nTotalTypes; - bzero(&map->types[map->num_types], + memset(&map->types[map->num_types], 0, ((map->size_types-map->num_types)*sizeof(XkbKeyTypeRec))); } } @@ -92,7 +92,7 @@ XkbClientMapPtr map; int nKeys= XkbNumKeys(xkb); if (map->syms==NULL) { map->size_syms= (nKeys*15)/10; - map->syms= xcalloc(map->size_syms, sizeof(KeySym)); + map->syms= calloc(map->size_syms, sizeof(KeySym)); if (!map->syms) { map->size_syms= 0; return BadAlloc; @@ -102,7 +102,7 @@ XkbClientMapPtr map; } if (map->key_sym_map==NULL) { i= xkb->max_key_code+1; - map->key_sym_map= xcalloc(i, sizeof(XkbSymMapRec)); + map->key_sym_map= calloc(i, sizeof(XkbSymMapRec)); if (map->key_sym_map==NULL) return BadAlloc; } @@ -114,7 +114,7 @@ XkbClientMapPtr map; return BadMatch; if (map->modmap==NULL) { i= xkb->max_key_code+1; - map->modmap= xcalloc(i, sizeof(unsigned char)); + map->modmap= calloc(i, sizeof(unsigned char)); if (map->modmap==NULL) return BadAlloc; } @@ -131,7 +131,7 @@ XkbServerMapPtr map; if (xkb==NULL) return BadMatch; if (xkb->server==NULL) { - map= xcalloc(1, sizeof(XkbServerMapRec)); + map= calloc(1, sizeof(XkbServerMapRec)); if (map==NULL) return BadAlloc; for (i=0;iexplicit==NULL) { i= xkb->max_key_code+1; - map->explicit= xcalloc(i, sizeof(unsigned char)); + map->explicit= calloc(i, sizeof(unsigned char)); if (map->explicit==NULL) return BadAlloc; } @@ -160,7 +160,7 @@ XkbServerMapPtr map; if (nNewActions<1) nNewActions= 1; if (map->acts==NULL) { - map->acts= xcalloc((nNewActions+1), sizeof(XkbAction)); + map->acts= calloc((nNewActions+1), sizeof(XkbAction)); if (map->acts==NULL) return BadAlloc; map->num_acts= 1; @@ -170,19 +170,19 @@ XkbServerMapPtr map; unsigned need; XkbAction *prev_acts = map->acts; need= map->num_acts+nNewActions; - map->acts= xrealloc(map->acts,need * sizeof(XkbAction)); + map->acts= realloc(map->acts,need * sizeof(XkbAction)); if (map->acts==NULL) { - xfree(prev_acts); + free(prev_acts); map->num_acts= map->size_acts= 0; return BadAlloc; } map->size_acts= need; - bzero(&map->acts[map->num_acts], + memset(&map->acts[map->num_acts], 0, ((map->size_acts-map->num_acts)*sizeof(XkbAction))); } if (map->key_acts==NULL) { i= xkb->max_key_code+1; - map->key_acts= xcalloc(i, sizeof(unsigned short)); + map->key_acts= calloc(i, sizeof(unsigned short)); if (map->key_acts==NULL) return BadAlloc; } @@ -194,7 +194,7 @@ XkbServerMapPtr map; return BadMatch; if (map->behaviors==NULL) { i= xkb->max_key_code+1; - map->behaviors= xcalloc(i, sizeof(XkbBehavior)); + map->behaviors= calloc(i, sizeof(XkbBehavior)); if (map->behaviors==NULL) return BadAlloc; } @@ -206,7 +206,7 @@ XkbServerMapPtr map; return BadMatch; if (map->vmodmap==NULL) { i= xkb->max_key_code+1; - map->vmodmap= xcalloc(i, sizeof(unsigned short)); + map->vmodmap= calloc(i, sizeof(unsigned short)); if (map->vmodmap==NULL) return BadAlloc; } @@ -221,34 +221,28 @@ XkbCopyKeyType(XkbKeyTypePtr from,XkbKeyTypePtr into) { if ((!from)||(!into)) return BadMatch; - if (into->map) { - xfree(into->map); - into->map= NULL; - } - if (into->preserve) { - xfree(into->preserve); - into->preserve= NULL; - } - if (into->level_names) { - xfree(into->level_names); - into->level_names= NULL; - } + free(into->map); + into->map = NULL; + free(into->preserve); + into->preserve = NULL; + free(into->level_names); + into->level_names = NULL; *into= *from; if ((from->map)&&(into->map_count>0)) { - into->map= xcalloc(into->map_count, sizeof(XkbKTMapEntryRec)); + into->map= calloc(into->map_count, sizeof(XkbKTMapEntryRec)); if (!into->map) return BadAlloc; memcpy(into->map,from->map,into->map_count*sizeof(XkbKTMapEntryRec)); } if ((from->preserve)&&(into->map_count>0)) { - into->preserve= xcalloc(into->map_count, sizeof(XkbModsRec)); + into->preserve= calloc(into->map_count, sizeof(XkbModsRec)); if (!into->preserve) return BadAlloc; memcpy(into->preserve,from->preserve, into->map_count*sizeof(XkbModsRec)); } if ((from->level_names)&&(into->num_levels>0)) { - into->level_names= xcalloc(into->num_levels, sizeof(Atom)); + into->level_names= calloc(into->num_levels, sizeof(Atom)); if (!into->level_names) return BadAlloc; memcpy(into->level_names,from->level_names, @@ -299,10 +293,10 @@ KeyCode matchingKeys[XkbMaxKeyCount],nMatchingKeys; type= &xkb->map->types[type_ndx]; if (map_count==0) { if (type->map!=NULL) - xfree(type->map); + free(type->map); type->map= NULL; if (type->preserve!=NULL) - xfree(type->preserve); + free(type->preserve); type->preserve= NULL; type->map_count= 0; } @@ -310,27 +304,25 @@ KeyCode matchingKeys[XkbMaxKeyCount],nMatchingKeys; XkbKTMapEntryRec *prev_map = type->map; if ((map_count>type->map_count)||(type->map==NULL)) - type->map = xrealloc(type->map,map_count * sizeof(XkbKTMapEntryRec)); + type->map = realloc(type->map,map_count * sizeof(XkbKTMapEntryRec)); if (!type->map) { - if (prev_map) - xfree(prev_map); + free(prev_map); return BadAlloc; } if (want_preserve) { XkbModsRec *prev_preserve = type->preserve; if ((map_count>type->map_count)||(type->preserve==NULL)) { - type->preserve = xrealloc(type->preserve, + type->preserve = realloc(type->preserve, map_count * sizeof(XkbModsRec)); } if (!type->preserve) { - if (prev_preserve) - xfree(prev_preserve); + free(prev_preserve); return BadAlloc; } } else if (type->preserve!=NULL) { - xfree(type->preserve); + free(type->preserve); type->preserve= NULL; } type->map_count= map_count; @@ -339,11 +331,10 @@ KeyCode matchingKeys[XkbMaxKeyCount],nMatchingKeys; if ((new_num_lvls>type->num_levels)||(type->level_names==NULL)) { Atom * prev_level_names = type->level_names; - type->level_names = xrealloc(type->level_names, + type->level_names = realloc(type->level_names, new_num_lvls * sizeof(Atom)); if (!type->level_names) { - if (prev_level_names) - xfree(prev_level_names); + free(prev_level_names); return BadAlloc; } } @@ -368,7 +359,7 @@ KeyCode matchingKeys[XkbMaxKeyCount],nMatchingKeys; * The possibilities marked with '+' require us to examine the key types * associated with each group for the key. */ - bzero(matchingKeys,XkbMaxKeyCount*sizeof(KeyCode)); + memset(matchingKeys, 0, XkbMaxKeyCount*sizeof(KeyCode)); nMatchingKeys= 0; if (new_num_lvls>type->num_levels) { int nTotal; @@ -397,7 +388,7 @@ KeyCode matchingKeys[XkbMaxKeyCount],nMatchingKeys; if (nResize>0) { int nextMatch; xkb->map->size_syms= (nTotal*15)/10; - newSyms = xcalloc(xkb->map->size_syms, sizeof(KeySym)); + newSyms = calloc(xkb->map->size_syms, sizeof(KeySym)); if (newSyms==NULL) return BadAlloc; nextMatch= 0; @@ -423,7 +414,7 @@ KeyCode matchingKeys[XkbMaxKeyCount],nMatchingKeys; } } type->num_levels= new_num_lvls; - xfree(xkb->map->syms); + free(xkb->map->syms); xkb->map->syms= newSyms; xkb->map->num_syms= nSyms; return Success; @@ -461,7 +452,7 @@ KeyCode matchingKeys[XkbMaxKeyCount],nMatchingKeys; for (g=XkbKeyNumGroups(xkb,key)-1;g>=0;g--) { if (XkbKeyKeyTypeIndex(xkb,key,g)==type_ndx) { if (nClear>0) - bzero(&pSyms[g*width+firstClear],nClear*sizeof(KeySym)); + memset(&pSyms[g*width+firstClear], 0, nClear*sizeof(KeySym)); } } } @@ -491,15 +482,15 @@ KeySym *newSyms; nOldSyms*sizeof(KeySym)); } if ((needed-nOldSyms)>0) { - bzero(&xkb->map->syms[xkb->map->num_syms+XkbKeyNumSyms(xkb,key)], - (needed-nOldSyms)*sizeof(KeySym)); + memset(&xkb->map->syms[xkb->map->num_syms+XkbKeyNumSyms(xkb, key)], + 0, (needed-nOldSyms)*sizeof(KeySym)); } xkb->map->key_sym_map[key].offset = xkb->map->num_syms; xkb->map->num_syms+= needed; return &xkb->map->syms[xkb->map->key_sym_map[key].offset]; } xkb->map->size_syms+= (needed>32?needed:32); - newSyms = xcalloc(xkb->map->size_syms, sizeof(KeySym)); + newSyms = calloc(xkb->map->size_syms, sizeof(KeySym)); if (newSyms==NULL) return NULL; newSyms[0]= NoSymbol; @@ -515,11 +506,11 @@ KeySym *newSyms; if (nCopy!=0) memcpy(&newSyms[nSyms],XkbKeySymsPtr(xkb,i),nCopy*sizeof(KeySym)); if (nKeySyms>nCopy) - bzero(&newSyms[nSyms+nCopy],(nKeySyms-nCopy)*sizeof(KeySym)); + memset(&newSyms[nSyms+nCopy], 0, (nKeySyms-nCopy)*sizeof(KeySym)); xkb->map->key_sym_map[i].offset = nSyms; nSyms+= nKeySyms; } - xfree(xkb->map->syms); + free(xkb->map->syms); xkb->map->syms = newSyms; xkb->map->num_syms = nSyms; return &xkb->map->syms[xkb->map->key_sym_map[key].offset]; @@ -568,7 +559,7 @@ int tmp; tmp= xkb->min_key_code-minKC; if (xkb->map) { if (xkb->map->key_sym_map) { - bzero((char *)&xkb->map->key_sym_map[minKC], + memset((char *)&xkb->map->key_sym_map[minKC], 0, tmp*sizeof(XkbSymMapRec)); if (changes) { changes->map.changed= _ExtendRange(changes->map.changed, @@ -578,7 +569,7 @@ int tmp; } } if (xkb->map->modmap) { - bzero((char *)&xkb->map->modmap[minKC],tmp); + memset((char *)&xkb->map->modmap[minKC], 0, tmp); if (changes) { changes->map.changed= _ExtendRange(changes->map.changed, XkbModifierMapMask,minKC, @@ -589,7 +580,7 @@ int tmp; } if (xkb->server) { if (xkb->server->behaviors) { - bzero((char *)&xkb->server->behaviors[minKC], + memset((char *)&xkb->server->behaviors[minKC], 0, tmp*sizeof(XkbBehavior)); if (changes) { changes->map.changed= _ExtendRange(changes->map.changed, @@ -599,7 +590,7 @@ int tmp; } } if (xkb->server->key_acts) { - bzero((char *)&xkb->server->key_acts[minKC], + memset((char *)&xkb->server->key_acts[minKC], 0, tmp*sizeof(unsigned short)); if (changes) { changes->map.changed= _ExtendRange(changes->map.changed, @@ -609,7 +600,7 @@ int tmp; } } if (xkb->server->vmodmap) { - bzero((char *)&xkb->server->vmodmap[minKC], + memset((char *)&xkb->server->vmodmap[minKC], 0, tmp*sizeof(unsigned short)); if (changes) { changes->map.changed= _ExtendRange(changes->map.changed, @@ -620,7 +611,7 @@ int tmp; } } if ((xkb->names)&&(xkb->names->keys)) { - bzero((char *)&xkb->names->keys[minKC],tmp*sizeof(XkbKeyNameRec)); + memset((char *)&xkb->names->keys[minKC], 0, tmp*sizeof(XkbKeyNameRec)); if (changes) { changes->names.changed= _ExtendRange(changes->names.changed, XkbKeyNamesMask,minKC, @@ -638,13 +629,13 @@ int tmp; if (xkb->map->key_sym_map) { XkbSymMapRec *prev_key_sym_map = xkb->map->key_sym_map; - xkb->map->key_sym_map = xrealloc(xkb->map->key_sym_map, + xkb->map->key_sym_map = realloc(xkb->map->key_sym_map, (maxKC+1) * sizeof(XkbSymMapRec)); if (!xkb->map->key_sym_map) { - xfree(prev_key_sym_map); + free(prev_key_sym_map); return BadAlloc; } - bzero((char *)&xkb->map->key_sym_map[xkb->max_key_code], + memset((char *)&xkb->map->key_sym_map[xkb->max_key_code], 0, tmp*sizeof(XkbSymMapRec)); if (changes) { changes->map.changed= _ExtendRange(changes->map.changed, @@ -656,13 +647,13 @@ int tmp; if (xkb->map->modmap) { unsigned char *prev_modmap = xkb->map->modmap; - xkb->map->modmap = xrealloc(xkb->map->modmap, + xkb->map->modmap = realloc(xkb->map->modmap, (maxKC+1) * sizeof(unsigned char)); if (!xkb->map->modmap) { - xfree(prev_modmap); + free(prev_modmap); return BadAlloc; } - bzero((char *)&xkb->map->modmap[xkb->max_key_code],tmp); + memset((char *)&xkb->map->modmap[xkb->max_key_code], 0, tmp); if (changes) { changes->map.changed= _ExtendRange(changes->map.changed, XkbModifierMapMask,maxKC, @@ -675,13 +666,13 @@ int tmp; if (xkb->server->behaviors) { XkbBehavior *prev_behaviors = xkb->server->behaviors; - xkb->server->behaviors = xrealloc(xkb->server->behaviors, + xkb->server->behaviors = realloc(xkb->server->behaviors, (maxKC+1) * sizeof(XkbBehavior)); if (!xkb->server->behaviors) { - xfree(prev_behaviors); + free(prev_behaviors); return BadAlloc; } - bzero((char *)&xkb->server->behaviors[xkb->max_key_code], + memset((char *)&xkb->server->behaviors[xkb->max_key_code], 0, tmp*sizeof(XkbBehavior)); if (changes) { changes->map.changed= _ExtendRange(changes->map.changed, @@ -693,13 +684,13 @@ int tmp; if (xkb->server->key_acts) { unsigned short *prev_key_acts = xkb->server->key_acts; - xkb->server->key_acts= xrealloc(xkb->server->key_acts, + xkb->server->key_acts= realloc(xkb->server->key_acts, (maxKC+1) * sizeof(unsigned short)); if (!xkb->server->key_acts) { - xfree(prev_key_acts); + free(prev_key_acts); return BadAlloc; } - bzero((char *)&xkb->server->key_acts[xkb->max_key_code], + memset((char *)&xkb->server->key_acts[xkb->max_key_code], 0, tmp*sizeof(unsigned short)); if (changes) { changes->map.changed= _ExtendRange(changes->map.changed, @@ -711,13 +702,13 @@ int tmp; if (xkb->server->vmodmap) { unsigned short *prev_vmodmap = xkb->server->vmodmap; - xkb->server->vmodmap= xrealloc(xkb->server->vmodmap, + xkb->server->vmodmap= realloc(xkb->server->vmodmap, (maxKC+1) * sizeof(unsigned short)); if (!xkb->server->vmodmap) { - xfree(prev_vmodmap); + free(prev_vmodmap); return BadAlloc; } - bzero((char *)&xkb->server->vmodmap[xkb->max_key_code], + memset((char *)&xkb->server->vmodmap[xkb->max_key_code], 0, tmp*sizeof(unsigned short)); if (changes) { changes->map.changed= _ExtendRange(changes->map.changed, @@ -730,13 +721,13 @@ int tmp; if ((xkb->names)&&(xkb->names->keys)) { XkbKeyNameRec *prev_keys = xkb->names->keys; - xkb->names->keys = xrealloc(xkb->names->keys, + xkb->names->keys = realloc(xkb->names->keys, (maxKC+1) * sizeof(XkbKeyNameRec)); if (!xkb->names->keys) { - xfree(prev_keys); + free(prev_keys); return BadAlloc; } - bzero((char *)&xkb->names->keys[xkb->max_key_code], + memset((char *)&xkb->names->keys[xkb->max_key_code], 0, tmp*sizeof(XkbKeyNameRec)); if (changes) { changes->names.changed= _ExtendRange(changes->names.changed, @@ -768,7 +759,7 @@ XkbAction *newActs; return &xkb->server->acts[xkb->server->key_acts[key]]; } xkb->server->size_acts= xkb->server->num_acts+needed+8; - newActs = xcalloc(xkb->server->size_acts, sizeof(XkbAction)); + newActs = calloc(xkb->server->size_acts, sizeof(XkbAction)); if (newActs==NULL) return NULL; newActs[0].type = XkbSA_NoAction; @@ -790,11 +781,11 @@ XkbAction *newActs; memcpy(&newActs[nActs],XkbKeyActionsPtr(xkb,i), nCopy*sizeof(XkbAction)); if (nCopyserver->key_acts[i]= nActs; nActs+= nKeyActs; } - xfree(xkb->server->acts); + free(xkb->server->acts); xkb->server->acts = newActs; xkb->server->num_acts= nActs; return &xkb->server->acts[xkb->server->key_acts[key]]; @@ -817,42 +808,42 @@ XkbClientMapPtr map; XkbKeyTypePtr type; for (i=0,type=map->types;inum_types;i++,type++) { if (type->map!=NULL) { - xfree(type->map); + free(type->map); type->map= NULL; } if (type->preserve!=NULL) { - xfree(type->preserve); + free(type->preserve); type->preserve= NULL; } type->map_count= 0; if (type->level_names!=NULL) { - xfree(type->level_names); + free(type->level_names); type->level_names= NULL; } } } - xfree(map->types); + free(map->types); map->num_types= map->size_types= 0; map->types= NULL; } } if (what&XkbKeySymsMask) { if (map->key_sym_map!=NULL) { - xfree(map->key_sym_map); + free(map->key_sym_map); map->key_sym_map= NULL; } if (map->syms!=NULL) { - xfree(map->syms); + free(map->syms); map->size_syms= map->num_syms= 0; map->syms= NULL; } } if ((what&XkbModifierMapMask)&&(map->modmap!=NULL)) { - xfree(map->modmap); + free(map->modmap); map->modmap= NULL; } if (freeMap) { - xfree(xkb->map); + free(xkb->map); xkb->map= NULL; } return; @@ -869,31 +860,31 @@ XkbServerMapPtr map; what= XkbAllServerInfoMask; map= xkb->server; if ((what&XkbExplicitComponentsMask)&&(map->explicit!=NULL)) { - xfree(map->explicit); + free(map->explicit); map->explicit= NULL; } if (what&XkbKeyActionsMask) { if (map->key_acts!=NULL) { - xfree(map->key_acts); + free(map->key_acts); map->key_acts= NULL; } if (map->acts!=NULL) { - xfree(map->acts); + free(map->acts); map->num_acts= map->size_acts= 0; map->acts= NULL; } } if ((what&XkbKeyBehaviorsMask)&&(map->behaviors!=NULL)) { - xfree(map->behaviors); + free(map->behaviors); map->behaviors= NULL; } if ((what&XkbVirtualModMapMask)&&(map->vmodmap!=NULL)) { - xfree(map->vmodmap); + free(map->vmodmap); map->vmodmap= NULL; } if (freeMap) { - xfree(xkb->server); + free(xkb->server); xkb->server= NULL; } return; diff --git a/xserver/xkb/XKBMisc.c b/xserver/xkb/XKBMisc.c index 2bb4a2452..efe291103 100644 --- a/xserver/xkb/XKBMisc.c +++ b/xserver/xkb/XKBMisc.c @@ -388,7 +388,7 @@ unsigned changed,tmp; nSyms= XkbKeyNumSyms(xkb,key); syms= XkbKeySymsPtr(xkb,key); if (nSyms>IBUF_SIZE) { - interps= xcalloc(nSyms, sizeof(XkbSymInterpretPtr)); + interps= calloc(nSyms, sizeof(XkbSymInterpretPtr)); if (interps==NULL) { interps= ibuf; nSyms= IBUF_SIZE; @@ -422,7 +422,7 @@ unsigned changed,tmp; pActs= XkbResizeKeyActions(xkb,key,nSyms); if (!pActs) { if (nSyms > IBUF_SIZE) - xfree(interps); + free(interps); return FALSE; } new_vmodmask= 0; @@ -507,7 +507,7 @@ unsigned changed,tmp; mc->changed|= changed; } if (interps!=ibuf) - xfree(interps); + free(interps); return TRUE; } @@ -580,7 +580,7 @@ int width,nOldGroups,oldWidth,newTypes[XkbNumKbdGroups]; pSyms= XkbResizeKeySyms(xkb,key,width*nGroups); if (pSyms==NULL) return BadAlloc; - bzero(pSyms,width*nGroups*sizeof(KeySym)); + memset(pSyms, 0, width*nGroups*sizeof(KeySym)); for (i=0;(imap->types[newTypes[i]]; @@ -596,7 +596,7 @@ int width,nOldGroups,oldWidth,newTypes[XkbNumKbdGroups]; pActs= XkbResizeKeyActions(xkb,key,width*nGroups); if (pActs==NULL) return BadAlloc; - bzero(pActs,width*nGroups*sizeof(XkbAction)); + memset(pActs, 0, width*nGroups*sizeof(XkbAction)); for (i=0;(imap->types[newTypes[i]]; diff --git a/xserver/xkb/ddxDevBtn.c b/xserver/xkb/ddxDevBtn.c deleted file mode 100644 index b8a125514..000000000 --- a/xserver/xkb/ddxDevBtn.c +++ /dev/null @@ -1,69 +0,0 @@ -/************************************************************ -Copyright (c) 1995 by Silicon Graphics Computer Systems, Inc. - -Permission to use, copy, modify, and distribute this -software and its documentation for any purpose and without -fee is hereby granted, provided that the above copyright -notice appear in all copies and that both that copyright -notice and this permission notice appear in supporting -documentation, and that the name of Silicon Graphics not be -used in advertising or publicity pertaining to distribution -of the software without specific prior written permission. -Silicon Graphics makes no representation about the suitability -of this software for any purpose. It is provided "as is" -without any express or implied warranty. - -SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS -SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON -GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL -DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, -DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH -THE USE OR PERFORMANCE OF THIS SOFTWARE. - -********************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include "inputstr.h" -#include -#include "mi.h" - -void -XkbDDXFakeDeviceButton(DeviceIntPtr dev,Bool press,int button) -{ - EventListPtr events; - int nevents, i; - DeviceIntPtr ptr; - - /* If dev is a slave device, and the SD is attached, do nothing. If we'd - * post through the attached master pointer we'd get duplicate events. - * - * if dev is a master keyboard, post through the XTEST device - * - * if dev is a floating slave, post through the device itself. - */ - - if (IsMaster(dev)) - ptr = GetXTestDevice(GetMaster(dev, MASTER_POINTER)); - else if (!dev->u.master) - ptr = dev; - else - return; - - events = InitEventList(GetMaximumEventsNum()); - OsBlockSignals(); - nevents = GetPointerEvents(events, ptr, - press ? ButtonPress : ButtonRelease, button, - 0 /* flags */, 0 /* first */, - 0 /* num_val */, NULL); - OsReleaseSignals(); - - for (i = 0; i < nevents; i++) - mieqProcessDeviceEvent(ptr, (InternalEvent*)events[i].event, NULL); - - FreeEventList(events, GetMaximumEventsNum()); -} diff --git a/xserver/xkb/ddxFakeMtn.c b/xserver/xkb/ddxFakeMtn.c deleted file mode 100644 index c50cf57d8..000000000 --- a/xserver/xkb/ddxFakeMtn.c +++ /dev/null @@ -1,67 +0,0 @@ -/************************************************************ -Copyright (c) 1993 by Silicon Graphics Computer Systems, Inc. - -Permission to use, copy, modify, and distribute this -software and its documentation for any purpose and without -fee is hereby granted, provided that the above copyright -notice appear in all copies and that both that copyright -notice and this permission notice appear in supporting -documentation, and that the name of Silicon Graphics not be -used in advertising or publicity pertaining to distribution -of the software without specific prior written permission. -Silicon Graphics makes no representation about the suitability -of this software for any purpose. It is provided "as is" -without any express or implied warranty. - -SILICON GRAPHICS DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS -SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY -AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL SILICON -GRAPHICS BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL -DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, -DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE -OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH -THE USE OR PERFORMANCE OF THIS SOFTWARE. - -********************************************************/ - -#ifdef HAVE_DIX_CONFIG_H -#include -#endif - -#include "inputstr.h" -#include -#include "mi.h" - -void -XkbDDXFakePointerMotion(DeviceIntPtr dev, unsigned flags,int x,int y) -{ - EventListPtr events; - int nevents, i; - DeviceIntPtr ptr; - int gpe_flags = 0; - int coord[2]; - - if (!dev->u.master) - ptr = dev; - else - ptr = GetXTestDevice(GetMaster(dev, MASTER_POINTER)); - - if (flags & XkbSA_MoveAbsoluteX || flags & XkbSA_MoveAbsoluteY) - gpe_flags = POINTER_ABSOLUTE; - else - gpe_flags = POINTER_RELATIVE; - - events = InitEventList(GetMaximumEventsNum()); - OsBlockSignals(); - coord[0] = x; - coord[1] = y; - nevents = GetPointerEvents(events, ptr, - MotionNotify, 0, - gpe_flags, 0, 2, coord); - OsReleaseSignals(); - - for (i = 0; i < nevents; i++) - mieqProcessDeviceEvent(ptr, (InternalEvent*)events[i].event, NULL); - - FreeEventList(events, GetMaximumEventsNum()); -} diff --git a/xserver/xkb/ddxList.c b/xserver/xkb/ddxList.c index e212ea3b5..39bd7397a 100644 --- a/xserver/xkb/ddxList.c +++ b/xserver/xkb/ddxList.c @@ -97,7 +97,7 @@ char * tmp; if ((list->szPool-list->nPool)1024) list->szPool+= XkbPaddedSize(wlen*2); else list->szPool+= 1024; - list->pool= xrealloc(list->pool, list->szPool * sizeof(char)); + list->pool= realloc(list->pool, list->szPool * sizeof(char)); if (!list->pool) return BadAlloc; } @@ -161,6 +161,7 @@ char tmpname[PATH_MAX]; } if (!in) { haveDir= FALSE; + free(buf); buf = Xprintf( "'%s/xkbcomp' '-R%s/%s' -w %ld -l -vlfhpR '%s'" W32_tmparg, XkbBinDirectory,XkbBaseDirectory,componentDirs[what],(long) @@ -176,6 +177,7 @@ char tmpname[PATH_MAX]; } if (!in) { haveDir= FALSE; + free(buf); buf = Xprintf( "xkbcomp -R%s -w %ld -l -vlfhpR '%s'" W32_tmparg, componentDirs[what],(long) @@ -201,18 +203,15 @@ char tmpname[PATH_MAX]; if (!in) { if (buf != NULL) - xfree (buf); + free(buf); #ifdef WIN32 unlink(tmpname); #endif return BadImplementation; } list->nFound[what]= 0; - if (buf) { - xfree(buf); - buf = NULL; - } - buf = xalloc(PATH_MAX * sizeof(char)); + free(buf); + buf = malloc(PATH_MAX * sizeof(char)); if (!buf) return BadAlloc; while ((status==Success)&&((tmp=fgets(buf,PATH_MAX,in))!=NULL)) { @@ -268,7 +267,7 @@ char tmpname[PATH_MAX]; unlink(tmpname); #endif if (buf != NULL) - xfree (buf); + free(buf); return status; } diff --git a/xserver/xkb/ddxLoad.c b/xserver/xkb/ddxLoad.c index 44ecd8f77..c5218c00d 100644 --- a/xserver/xkb/ddxLoad.c +++ b/xserver/xkb/ddxLoad.c @@ -103,7 +103,7 @@ Win32System(const char *cmdline) STARTUPINFO si; PROCESS_INFORMATION pi; DWORD dwExitCode; - char *cmd = xstrdup(cmdline); + char *cmd = strdup(cmdline); ZeroMemory( &si, sizeof(si) ); si.cb = sizeof(si); @@ -131,7 +131,7 @@ Win32System(const char *cmdline) LocalFree(buffer); } - xfree(cmd); + free(cmd); return -1; } /* Wait until child process exits. */ @@ -142,7 +142,7 @@ Win32System(const char *cmdline) /* Close process and thread handles. */ CloseHandle( pi.hProcess ); CloseHandle( pi.hThread ); - xfree(cmd); + free(cmd); return dwExitCode; } @@ -186,7 +186,7 @@ XkbDDXCompileKeymapByNames( XkbDescPtr xkb, char *buf = NULL, keymap[PATH_MAX], xkm_output_dir[PATH_MAX]; const char *emptystring = ""; - const char *xkbbasedirflag = emptystring; + char *xkbbasedirflag = NULL; const char *xkbbindir = emptystring; const char *xkbbindirsep = emptystring; @@ -230,12 +230,15 @@ XkbDDXCompileKeymapByNames( XkbDescPtr xkb, xkbbindir, xkbbindirsep, ( (xkbDebugFlags < 2) ? 1 : ((xkbDebugFlags > 10) ? 10 : (int)xkbDebugFlags) ), - xkbbasedirflag, xkmfile, + xkbbasedirflag ? xkbbasedirflag : "", xkmfile, PRE_ERROR_MSG, ERROR_PREFIX, POST_ERROR_MSG1, xkm_output_dir, keymap); - if (xkbbasedirflag != emptystring) { - xfree(xkbbasedirflag); + free(xkbbasedirflag); + + if (!buf) { + LogMessage(X_ERROR, "XKB: Could not invoke xkbcomp: not enough memory\n"); + return FALSE; } #ifndef WIN32 @@ -265,7 +268,7 @@ XkbDDXCompileKeymapByNames( XkbDescPtr xkb, nameRtrn[nameRtrnLen-1]= '\0'; } if (buf != NULL) - xfree (buf); + free(buf); return TRUE; } else @@ -285,7 +288,7 @@ XkbDDXCompileKeymapByNames( XkbDescPtr xkb, if (nameRtrn) nameRtrn[0]= '\0'; if (buf != NULL) - xfree (buf); + free(buf); return FALSE; } diff --git a/xserver/xkb/maprules.c b/xserver/xkb/maprules.c index 3bec6d044..ce16e9ce1 100644 --- a/xserver/xkb/maprules.c +++ b/xserver/xkb/maprules.c @@ -78,7 +78,7 @@ static void FreeInputLine(InputLine *line) { if (line->line!=line->buf) - xfree(line->line); + free(line->line); line->line_num= 1; line->num_line= 0; line->sz_line= DFLT_LINE_SIZE; @@ -91,11 +91,11 @@ InputLineAddChar(InputLine *line,int ch) { if (line->num_line>=line->sz_line) { if (line->line==line->buf) { - line->line= xalloc(line->sz_line*2); + line->line= malloc(line->sz_line*2); memcpy(line->line,line->buf,line->sz_line); } else { - line->line= xrealloc((char *)line->line,line->sz_line*2); + line->line= realloc((char *)line->line,line->sz_line*2); } line->sz_line*= 2; } @@ -270,7 +270,7 @@ Bool found; l_ndx_present = v_ndx_present = present= 0; str= &line->line[1]; len = remap->number; - bzero((char *)remap,sizeof(RemapSpec)); + memset((char *)remap, 0, sizeof(RemapSpec)); remap->number = len; while ((tok=_XStrtok(str," ",strtok_buf))!=NULL) { found= FALSE; @@ -412,7 +412,7 @@ Bool append = FALSE; DebugF("Illegal line of data ignored\n"); return FALSE; } - bzero((char *)&tmp,sizeof(FileSpec)); + memset((char *)&tmp, 0, sizeof(FileSpec)); str= line->line; for (nread= 0;(tok=_XStrtok(str," ",strtok_buf))!=NULL;nread++) { str= NULL; @@ -474,7 +474,7 @@ int len; if ((!str1)||(!str2)) return str1; len= strlen(str1)+strlen(str2)+1; - str1= xrealloc(str1,len * sizeof(char)); + str1= realloc(str1,len * sizeof(char)); if (str1) strcat(str1,str2); return str1; @@ -495,7 +495,7 @@ static Bool MakeMultiDefs(XkbRF_MultiDefsPtr mdefs, XkbRF_VarDefsPtr defs) { - bzero((char *)mdefs,sizeof(XkbRF_MultiDefsRec)); + memset((char *)mdefs, 0, sizeof(XkbRF_MultiDefsRec)); mdefs->model = defs->model; mdefs->options = _XkbDupString(defs->options); if (mdefs->options) squeeze_spaces(mdefs->options); @@ -553,9 +553,9 @@ MakeMultiDefs(XkbRF_MultiDefsPtr mdefs, XkbRF_VarDefsPtr defs) static void FreeMultiDefs(XkbRF_MultiDefsPtr defs) { - if (defs->options) xfree(defs->options); - if (defs->layout[1]) xfree(defs->layout[1]); - if (defs->variant[1]) xfree(defs->variant[1]); + free(defs->options); + free(defs->layout[1]); + free(defs->variant[1]); } static void @@ -769,7 +769,7 @@ int len, ndx; } str= index(&str[0],'%'); } - name= xalloc(len+1); + name= malloc(len+1); str= orig; outstr= name; while (*str!='\0') { @@ -819,7 +819,7 @@ int len, ndx; } *outstr++= '\0'; if (orig!=name) - xfree(orig); + free(orig); return name; } @@ -834,7 +834,7 @@ XkbRF_GetComponents( XkbRF_RulesPtr rules, MakeMultiDefs(&mdefs, defs); - bzero((char *)names,sizeof(XkbComponentNamesRec)); + memset((char *)names, 0, sizeof(XkbComponentNamesRec)); XkbRF_ClearPartialMatches(rules); XkbRF_CheckApplyRules(rules, &mdefs, names, XkbRF_Normal); XkbRF_ApplyPartialMatches(rules, names); @@ -864,11 +864,11 @@ XkbRF_AddRule(XkbRF_RulesPtr rules) if (rules->sz_rules<1) { rules->sz_rules= 16; rules->num_rules= 0; - rules->rules= xcalloc(rules->sz_rules, sizeof(XkbRF_RuleRec)); + rules->rules= calloc(rules->sz_rules, sizeof(XkbRF_RuleRec)); } else if (rules->num_rules>=rules->sz_rules) { rules->sz_rules*= 2; - rules->rules= xrealloc(rules->rules, + rules->rules= realloc(rules->rules, rules->sz_rules * sizeof(XkbRF_RuleRec)); } if (!rules->rules) { @@ -876,7 +876,7 @@ XkbRF_AddRule(XkbRF_RulesPtr rules) DebugF("Allocation failure in XkbRF_AddRule\n"); return NULL; } - bzero((char *)&rules->rules[rules->num_rules],sizeof(XkbRF_RuleRec)); + memset((char *)&rules->rules[rules->num_rules], 0, sizeof(XkbRF_RuleRec)); return &rules->rules[rules->num_rules++]; } @@ -886,11 +886,11 @@ XkbRF_AddGroup(XkbRF_RulesPtr rules) if (rules->sz_groups<1) { rules->sz_groups= 16; rules->num_groups= 0; - rules->groups= xcalloc(rules->sz_groups, sizeof(XkbRF_GroupRec)); + rules->groups= calloc(rules->sz_groups, sizeof(XkbRF_GroupRec)); } else if (rules->num_groups >= rules->sz_groups) { rules->sz_groups *= 2; - rules->groups= xrealloc(rules->groups, + rules->groups= realloc(rules->groups, rules->sz_groups * sizeof(XkbRF_GroupRec)); } if (!rules->groups) { @@ -898,7 +898,7 @@ XkbRF_AddGroup(XkbRF_RulesPtr rules) return NULL; } - bzero((char *)&rules->groups[rules->num_groups],sizeof(XkbRF_GroupRec)); + memset((char *)&rules->groups[rules->num_groups], 0, sizeof(XkbRF_GroupRec)); return &rules->groups[rules->num_groups++]; } @@ -912,20 +912,20 @@ XkbRF_GroupRec tgroup,*group; if (!(rules && file)) return FALSE; - bzero((char *)&remap,sizeof(RemapSpec)); - bzero((char *)&tgroup,sizeof(XkbRF_GroupRec)); + memset((char *)&remap, 0, sizeof(RemapSpec)); + memset((char *)&tgroup, 0, sizeof(XkbRF_GroupRec)); InitInputLine(&line); while (GetInputLine(file,&line,TRUE)) { if (CheckLine(&line,&remap,&trule,&tgroup)) { if (tgroup.number) { if ((group= XkbRF_AddGroup(rules))!=NULL) { *group= tgroup; - bzero((char *)&tgroup,sizeof(XkbRF_GroupRec)); + memset((char *)&tgroup, 0, sizeof(XkbRF_GroupRec)); } } else { if ((rule= XkbRF_AddRule(rules))!=NULL) { *rule= trule; - bzero((char *)&trule,sizeof(XkbRF_RuleRec)); + memset((char *)&trule, 0, sizeof(XkbRF_RuleRec)); } } } @@ -972,7 +972,7 @@ Bool ok; XkbRF_RulesPtr XkbRF_Create(void) { - return xcalloc(1, sizeof( XkbRF_RulesRec)); + return calloc(1, sizeof( XkbRF_RulesRec)); } /***====================================================================***/ @@ -988,32 +988,32 @@ XkbRF_GroupPtr group; return; if (rules->rules) { for (i=0,rule=rules->rules;inum_rules;i++,rule++) { - if (rule->model) xfree(rule->model); - if (rule->layout) xfree(rule->layout); - if (rule->variant) xfree(rule->variant); - if (rule->option) xfree(rule->option); - if (rule->keycodes) xfree(rule->keycodes); - if (rule->symbols) xfree(rule->symbols); - if (rule->types) xfree(rule->types); - if (rule->compat) xfree(rule->compat); - if (rule->geometry) xfree(rule->geometry); - bzero((char *)rule,sizeof(XkbRF_RuleRec)); + free(rule->model); + free(rule->layout); + free(rule->variant); + free(rule->option); + free(rule->keycodes); + free(rule->symbols); + free(rule->types); + free(rule->compat); + free(rule->geometry); + memset((char *)rule, 0, sizeof(XkbRF_RuleRec)); } - xfree(rules->rules); + free(rules->rules); rules->num_rules= rules->sz_rules= 0; rules->rules= NULL; } if (rules->groups) { for (i=0, group=rules->groups;inum_groups;i++,group++) { - if (group->name) xfree(group->name); - if (group->words) xfree(group->words); + free(group->name); + free(group->words); } - xfree(rules->groups); + free(rules->groups); rules->num_groups= 0; rules->groups= NULL; } if (freeRules) - xfree(rules); + free(rules); return; } diff --git a/xserver/xkb/xkb.c b/xserver/xkb/xkb.c index 29052bf13..4105c1c6b 100644 --- a/xserver/xkb/xkb.c +++ b/xserver/xkb/xkb.c @@ -194,7 +194,7 @@ ProcXkbUseExtension(ClientPtr client) swaps(&rep.serverMinor, n); } WriteToClient(client,SIZEOF(xkbUseExtensionReply), (char *)&rep); - return client->noClientException; + return Success; } /***====================================================================***/ @@ -219,12 +219,13 @@ ProcXkbSelectEvents(ClientPtr client) client->mapNotifyMask|= (stuff->affectMap&stuff->map); } if ((stuff->affectWhich&(~XkbMapNotifyMask))==0) - return client->noClientException; + return Success; masks = XkbFindClientResource((DevicePtr)dev,client); if (!masks){ XID id = FakeClientID(client->index); - AddResource(id,RT_XKBCLIENT,dev); + if (!AddResource(id,RT_XKBCLIENT,dev)) + return BadAlloc; masks= XkbAddClientResource((DevicePtr)dev,client,id); } if (masks) { @@ -343,7 +344,7 @@ ProcXkbSelectEvents(ClientPtr client) ErrorF("[xkb] Extra data (%d bytes) after SelectEvents\n",dataLeft); return BadLength; } - return client->noClientException; + return Success; } return BadAlloc; } @@ -523,7 +524,7 @@ ProcXkbBell(ClientPtr client) DeviceIntPtr other; for (other = inputInfo.devices; other; other = other->next) { - if ((other != dev) && other->key && !IsMaster(other) && (other->u.master == dev)) + if ((other != dev) && other->key && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev) { rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixBellAccess); if (rc == Success) @@ -557,7 +558,7 @@ ProcXkbGetState(ClientPtr client) CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixGetAttrAccess); xkb= &dev->key->xkbInfo->state; - bzero(&rep,sizeof(xkbGetStateReply)); + memset(&rep, 0, sizeof(xkbGetStateReply)); rep.type= X_Reply; rep.sequenceNumber= client->sequence; rep.length = 0; @@ -578,7 +579,7 @@ ProcXkbGetState(ClientPtr client) swaps(&rep.ptrBtnState,n); } WriteToClient(client, SIZEOF(xkbGetStateReply), (char *)&rep); - return client->noClientException; + return Success; } /***====================================================================***/ @@ -606,7 +607,7 @@ ProcXkbLatchLockState(ClientPtr client) status = Success; for (tmpd = inputInfo.devices; tmpd; tmpd = tmpd->next) { - if ((tmpd == dev) || (!IsMaster(tmpd) && tmpd->u.master == dev)) { + if ((tmpd == dev) || (!IsMaster(tmpd) && GetMaster(tmpd, MASTER_KEYBOARD) == dev)) { if (!tmpd->key || !tmpd->key->xkbInfo) continue; @@ -646,7 +647,7 @@ ProcXkbLatchLockState(ClientPtr client) } } - return client->noClientException; + return Success; } /***====================================================================***/ @@ -722,7 +723,7 @@ ProcXkbGetControls(ClientPtr client) swaps(&rep.axOptions, n); } WriteToClient(client, SIZEOF(xkbGetControlsReply), (char *)&rep); - return(client->noClientException); + return Success; } int @@ -748,7 +749,7 @@ ProcXkbSetControls(ClientPtr client) for (tmpd = inputInfo.devices; tmpd; tmpd = tmpd->next) { if (!tmpd->key || !tmpd->key->xkbInfo) continue; - if ((tmpd == dev) || (!IsMaster(tmpd) && tmpd->u.master == dev)) { + if ((tmpd == dev) || (!IsMaster(tmpd) && GetMaster(tmpd, MASTER_KEYBOARD) == dev)) { xkbi = tmpd->key->xkbInfo; ctrl = xkbi->desc->ctrls; new = *ctrl; @@ -942,7 +943,7 @@ ProcXkbSetControls(ClientPtr client) } } - return client->noClientException; + return Success; } /***====================================================================***/ @@ -1365,7 +1366,7 @@ unsigned i,len; char *desc,*start; len= (rep->length*4)-(SIZEOF(xkbGetMapReply)-SIZEOF(xGenericReply)); - start= desc= xcalloc(1, len); + start= desc= calloc(1, len); if (!start) return BadAlloc; if ( rep->nTypes>0 ) @@ -1405,8 +1406,8 @@ char *desc,*start; } WriteToClient(client, (i=SIZEOF(xkbGetMapReply)), (char *)rep); WriteToClient(client, len, start); - xfree((char *)start); - return client->noClientException; + free((char *)start); + return Success; } int @@ -1429,7 +1430,7 @@ ProcXkbGetMap(ClientPtr client) CHK_MASK_LEGAL(0x03,stuff->partial,XkbAllMapComponentsMask); xkb= dev->key->xkbInfo->desc; - bzero(&rep,sizeof(xkbGetMapReply)); + memset(&rep, 0, sizeof(xkbGetMapReply)); rep.type= X_Reply; rep.sequenceNumber= client->sequence; rep.length = (SIZEOF(xkbGetMapReply)-SIZEOF(xGenericReply))>>2; @@ -2172,7 +2173,7 @@ unsigned first,last; first= req->firstKeyBehavior; last= req->firstKeyBehavior+req->nKeyBehaviors-1; - bzero(&server->behaviors[first],req->nKeyBehaviors*sizeof(XkbBehavior)); + memset(&server->behaviors[first], 0, req->nKeyBehaviors*sizeof(XkbBehavior)); for (i=0;itotalKeyBehaviors;i++) { if ((server->behaviors[wire->key].type&XkbKB_Permanent)==0) { server->behaviors[wire->key].type= wire->type; @@ -2186,11 +2187,11 @@ unsigned first,last; if (maxRG>(int)xkbi->nRadioGroups) { int sz = maxRG*sizeof(XkbRadioGroupRec); if (xkbi->radioGroups) - xkbi->radioGroups= xrealloc(xkbi->radioGroups,sz); - else xkbi->radioGroups= xcalloc(1, sz); + xkbi->radioGroups= realloc(xkbi->radioGroups,sz); + else xkbi->radioGroups= calloc(1, sz); if (xkbi->radioGroups) { if (xkbi->nRadioGroups) - bzero(&xkbi->radioGroups[xkbi->nRadioGroups], + memset(&xkbi->radioGroups[xkbi->nRadioGroups], 0, (maxRG-xkbi->nRadioGroups)*sizeof(XkbRadioGroupRec)); xkbi->nRadioGroups= maxRG; } @@ -2245,7 +2246,7 @@ CARD8 * start; start= wire; first= req->firstKeyExplicit; last= req->firstKeyExplicit+req->nKeyExplicit-1; - bzero(&xkb->explicit[first],req->nKeyExplicit); + memset(&xkb->explicit[first], 0, req->nKeyExplicit); for (i=0;itotalKeyExplicit;i++,wire+= 2) { xkb->explicit[wire[0]]= wire[1]; } @@ -2279,7 +2280,7 @@ CARD8 * start; start= wire; first= req->firstModMapKey; last= req->firstModMapKey+req->nModMapKeys-1; - bzero(&xkb->modmap[first],req->nModMapKeys); + memset(&xkb->modmap[first], 0, req->nModMapKeys); for (i=0;itotalModMapKeys;i++,wire+= 2) { xkb->modmap[wire[0]]= wire[1]; } @@ -2311,7 +2312,7 @@ XkbServerMapPtr srv = xkbi->desc->server; first= req->firstVModMapKey; last= req->firstVModMapKey+req->nVModMapKeys-1; - bzero(&srv->vmodmap[first],req->nVModMapKeys*sizeof(unsigned short)); + memset(&srv->vmodmap[first], 0, req->nVModMapKeys*sizeof(unsigned short)); for (i=0;itotalVModMapKeys;i++,wire++) { srv->vmodmap[wire->key]= wire->vmods; } @@ -2438,7 +2439,7 @@ _XkbSetMap(ClientPtr client, DeviceIntPtr dev, xkbSetMapReq *req, char *values) xkb = xkbi->desc; XkbSetCauseXkbReq(&cause,X_kbSetMap,client); - bzero(&change, sizeof(change)); + memset(&change, 0, sizeof(change)); sentNKN = FALSE; if ((xkb->min_key_code!=req->minKeyCode)|| (xkb->max_key_code!=req->maxKeyCode)) { @@ -2558,7 +2559,7 @@ ProcXkbSetMap(ClientPtr client) DeviceIntPtr other; for (other = inputInfo.devices; other; other = other->next) { - if ((other != dev) && other->key && !IsMaster(other) && (other->u.master == dev)) + if ((other != dev) && other->key && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev) { rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess); if (rc == Success) @@ -2581,7 +2582,7 @@ ProcXkbSetMap(ClientPtr client) DeviceIntPtr other; for (other = inputInfo.devices; other; other = other->next) { - if ((other != dev) && other->key && !IsMaster(other) && (other->u.master == dev)) + if ((other != dev) && other->key && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev) { rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess); if (rc == Success) @@ -2594,7 +2595,7 @@ ProcXkbSetMap(ClientPtr client) } } - return client->noClientException; + return Success; } /***====================================================================***/ @@ -2629,7 +2630,7 @@ int size; size= rep->length*4; if (size>0) { - data = xalloc(size); + data = malloc(size); if (data) { register unsigned i,bit; xkbModsWireDesc * grp; @@ -2680,9 +2681,9 @@ int size; WriteToClient(client, SIZEOF(xkbGetCompatMapReply), (char *)rep); if (data) { WriteToClient(client, size, data); - xfree((char *)data); + free((char *)data); } - return client->noClientException; + return Success; } int @@ -2777,7 +2778,7 @@ _XkbSetCompatMap(ClientPtr client, DeviceIntPtr dev, XkbSymInterpretPtr sym; if ((unsigned)(req->firstSI+req->nSI)>compat->num_si) { compat->num_si= req->firstSI+req->nSI; - compat->sym_interpret= xrealloc(compat->sym_interpret, + compat->sym_interpret= realloc(compat->sym_interpret, compat->num_si * sizeof(XkbSymInterpretRec)); if (!compat->sym_interpret) { compat->num_si= 0; @@ -2851,7 +2852,7 @@ _XkbSetCompatMap(ClientPtr client, DeviceIntPtr dev, XkbEventCauseRec cause; XkbSetCauseXkbReq(&cause,X_kbSetCompatMap,client); - bzero(&change,sizeof(XkbChangesRec)); + memset(&change, 0, sizeof(XkbChangesRec)); XkbUpdateActions(dev,xkb->min_key_code,XkbNumKeys(xkb),&change,&check, &cause); if (check) @@ -2887,7 +2888,7 @@ ProcXkbSetCompatMap(ClientPtr client) DeviceIntPtr other; for (other = inputInfo.devices; other; other = other->next) { - if ((other != dev) && other->key && !IsMaster(other) && (other->u.master == dev)) + if ((other != dev) && other->key && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev) { rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess); if (rc == Success) @@ -2910,7 +2911,7 @@ ProcXkbSetCompatMap(ClientPtr client) DeviceIntPtr other; for (other = inputInfo.devices; other; other = other->next) { - if ((other != dev) && other->key && !IsMaster(other) && (other->u.master == dev)) + if ((other != dev) && other->key && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev) { rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess); if (rc == Success) @@ -2923,7 +2924,7 @@ ProcXkbSetCompatMap(ClientPtr client) } } - return client->noClientException; + return Success; } /***====================================================================***/ @@ -2960,7 +2961,7 @@ ProcXkbGetIndicatorState(ClientPtr client) swapl(&rep.state,i); } WriteToClient(client, SIZEOF(xkbGetIndicatorStateReply), (char *)&rep); - return client->noClientException; + return Success; } /***====================================================================***/ @@ -2995,7 +2996,7 @@ register unsigned bit; length = rep->length*4; if (length>0) { CARD8 *to; - to= map= xalloc(length); + to= map= malloc(length); if (map) { xkbIndicatorMapWireDesc *wire = (xkbIndicatorMapWireDesc *)to; for (i=0,bit=1;ierrorValue = _XkbErrCode2(0xff,length); + free(map); return BadLength; } } @@ -3034,9 +3036,9 @@ register unsigned bit; WriteToClient(client, SIZEOF(xkbGetIndicatorMapReply), (char *)rep); if (map) { WriteToClient(client, length, (char *)map); - xfree((char *)map); + free((char *)map); } - return client->noClientException; + return Success; } int @@ -3130,7 +3132,7 @@ ProcXkbSetIndicatorMap(ClientPtr client) CHK_KBD_DEVICE(dev, stuff->deviceSpec, client, DixSetAttrAccess); if (stuff->which==0) - return client->noClientException; + return Success; for (nIndicators=i=0,bit=1;iwhich&bit) @@ -3165,7 +3167,7 @@ ProcXkbSetIndicatorMap(ClientPtr client) DeviceIntPtr other; for (other = inputInfo.devices; other; other = other->next) { - if ((other != dev) && other->key && !IsMaster(other) && (other->u.master == dev)) + if ((other != dev) && other->key && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev) { rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixSetAttrAccess); if (rc == Success) @@ -3257,7 +3259,7 @@ ProcXkbGetNamedIndicator(ClientPtr client) } WriteToClient(client,SIZEOF(xkbGetNamedIndicatorReply), (char *)&rep); - return client->noClientException; + return Success; } @@ -3384,8 +3386,8 @@ _XkbSetNamedIndicator(ClientPtr client, DeviceIntPtr dev, statec |= ((sli->effectiveState ^ sli->explicitState) & (1 << led)); } - bzero((char *)&ed,sizeof(xkbExtensionDeviceNotify)); - bzero((char *)&changes,sizeof(XkbChangesRec)); + memset((char *)&ed, 0, sizeof(xkbExtensionDeviceNotify)); + memset((char *)&changes, 0, sizeof(XkbChangesRec)); XkbSetCauseXkbReq(&cause,X_kbSetNamedIndicator,client); if (namec) XkbApplyLedNameChanges(dev,sli,namec,&ed,&changes,&cause); @@ -3434,7 +3436,7 @@ ProcXkbSetNamedIndicator(ClientPtr client) DeviceIntPtr other; for (other = inputInfo.devices; other; other = other->next) { - if ((other != dev) && !IsMaster(other) && (other->u.master == dev) && + if ((other != dev) && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev && (other->kbdfeed || other->leds) && (XaceHook(XACE_DEVICE_ACCESS, client, other, DixSetAttrAccess) == Success)) { @@ -3458,7 +3460,7 @@ ProcXkbSetNamedIndicator(ClientPtr client) DeviceIntPtr other; for (other = inputInfo.devices; other; other = other->next) { - if ((other != dev) && !IsMaster(other) && (other->u.master == dev) && + if ((other != dev) && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev && (other->kbdfeed || other->leds) && (XaceHook(XACE_DEVICE_ACCESS, client, other, DixSetAttrAccess) == Success)) { @@ -3467,7 +3469,7 @@ ProcXkbSetNamedIndicator(ClientPtr client) } } - return client->noClientException; + return Success; } /***====================================================================***/ @@ -3632,7 +3634,7 @@ register int n; swapl(&rep->indicators,n); } - start = desc = xalloc(length); + start = desc = malloc(length); if ( !start ) return BadAlloc; if (xkb->names) { @@ -3756,8 +3758,8 @@ register int n; } WriteToClient(client, SIZEOF(xkbGetNamesReply), (char *)rep); WriteToClient(client, length, start); - xfree((char *)start); - return client->noClientException; + free((char *)start); + return Success; } int @@ -4038,7 +4040,7 @@ _XkbSetNames(ClientPtr client, DeviceIntPtr dev, xkbSetNamesReq *stuff) return BadAlloc; } - bzero(&nn,sizeof(xkbNamesNotify)); + memset(&nn, 0, sizeof(xkbNamesNotify)); nn.changed= stuff->which; tmp = (CARD32 *)&stuff[1]; if (stuff->which&XkbKeycodesNameMask) @@ -4118,7 +4120,7 @@ _XkbSetNames(ClientPtr client, DeviceIntPtr dev, xkbSetNamesReq *stuff) tmp+= stuff->nKeyAliases*2; } else if (names->key_aliases!=NULL) { - xfree(names->key_aliases); + free(names->key_aliases); names->key_aliases= NULL; names->num_key_aliases= 0; } @@ -4137,7 +4139,7 @@ _XkbSetNames(ClientPtr client, DeviceIntPtr dev, xkbSetNamesReq *stuff) tmp+= stuff->nRadioGroups; } else if (names->radio_groups) { - xfree(names->radio_groups); + free(names->radio_groups); names->radio_groups= NULL; names->num_rg= 0; } @@ -4160,7 +4162,7 @@ _XkbSetNames(ClientPtr client, DeviceIntPtr dev, xkbSetNamesReq *stuff) if (names->indicators[i]!=None) sli->namesPresent|= bit; } - bzero(&edev,sizeof(xkbExtensionDeviceNotify)); + memset(&edev, 0, sizeof(xkbExtensionDeviceNotify)); edev.reason= XkbXI_IndicatorNamesMask; edev.ledClass= KbdFeedbackClass; edev.ledID= dev->kbdfeed->ctrl.id; @@ -4249,7 +4251,7 @@ ProcXkbSetNames(ClientPtr client) DeviceIntPtr other; for (other = inputInfo.devices; other; other = other->next) { - if ((other != dev) && other->key && !IsMaster(other) && (other->u.master == dev)) + if ((other != dev) && other->key && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev) { rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess); @@ -4274,7 +4276,7 @@ ProcXkbSetNames(ClientPtr client) DeviceIntPtr other; for (other = inputInfo.devices; other; other = other->next) { - if ((other != dev) && other->key && !IsMaster(other) && (other->u.master == dev)) + if ((other != dev) && other->key && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev) { rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess); @@ -4286,7 +4288,7 @@ ProcXkbSetNames(ClientPtr client) /* everything is okay -- update names */ - return client->noClientException; + return Success; } /***====================================================================***/ @@ -4478,7 +4480,7 @@ xkbDoodadWireDesc * doodadWire; for (i=0;iany.name= doodad->any.name; doodadWire->any.type= doodad->any.type; doodadWire->any.priority= doodad->any.priority; @@ -4740,7 +4742,7 @@ XkbSendGeometry( ClientPtr client, if (geom!=NULL) { len= rep->length*4; - start= desc= xalloc(len); + start= desc= malloc(len); if (!start) return BadAlloc; desc= XkbWriteCountedString(desc,geom->label_font,client->swapped); @@ -4784,10 +4786,10 @@ XkbSendGeometry( ClientPtr client, if (len>0) WriteToClient(client, len, start); if (start!=NULL) - xfree((char *)start); + free((char *)start); if (freeGeom) XkbFreeGeometry(geom,XkbGeomAllMask,TRUE); - return client->noClientException; + return Success; } int @@ -4834,7 +4836,7 @@ CARD16 len,*plen; swaps(plen,n); } len= *plen; - str= xalloc(len+1); + str= malloc(len+1); if (str) { memcpy(str,&wire[2],len); str[len]= '\0'; @@ -5182,16 +5184,16 @@ char * wire; return BadAlloc; val= _GetCountedString(&wire,client->swapped); if (!val) { - xfree(name); + free(name); return BadAlloc; } if (XkbAddGeomProperty(geom,name,val)==NULL) { - xfree(name); - xfree(val); + free(name); + free(val); return BadAlloc; } - xfree(name); - xfree(val); + free(name); + free(val); } if (req->nColors<2) { @@ -5218,10 +5220,10 @@ char * wire; if (!name) return BadAlloc; if (!XkbAddGeomColor(geom,name,geom->num_colors)) { - xfree(name); + free(name); return BadAlloc; } - xfree(name); + free(name); } if (req->nColors!=geom->num_colors) { client->errorValue= _XkbErrCode3(0x05,req->nColors,geom->num_colors); @@ -5290,7 +5292,7 @@ _XkbSetGeometry(ClientPtr client, DeviceIntPtr dev, xkbSetGeometryReq *stuff) XkbFreeGeometry(old,XkbGeomAllMask,TRUE); if (new_name) { xkbNamesNotify nn; - bzero(&nn,sizeof(xkbNamesNotify)); + memset(&nn, 0, sizeof(xkbNamesNotify)); nn.changed= XkbGeometryNameMask; XkbSendNamesNotify(dev,&nn); } @@ -5328,7 +5330,7 @@ ProcXkbSetGeometry(ClientPtr client) DeviceIntPtr other; for (other = inputInfo.devices; other; other = other->next) { - if ((other != dev) && other->key && !IsMaster(other) && (other->u.master == dev)) + if ((other != dev) && other->key && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev) { rc = XaceHook(XACE_DEVICE_ACCESS, client, other, DixManageAccess); if (rc == Success) @@ -5377,7 +5379,8 @@ ProcXkbPerClientFlags(ClientPtr client) } else if (want && (!interest)) { XID id = FakeClientID(client->index); - AddResource(id,RT_XKBCLIENT,dev); + if (!AddResource(id,RT_XKBCLIENT,dev)) + return BadAlloc; interest= XkbAddClientResource((DevicePtr)dev,client,id); if (!interest) return BadAlloc; @@ -5414,7 +5417,7 @@ ProcXkbPerClientFlags(ClientPtr client) swapl(&rep.autoCtrlValues,n); } WriteToClient(client,SIZEOF(xkbPerClientFlagsReply), (char *)&rep); - return client->noClientException; + return Success; } /***====================================================================***/ @@ -5449,7 +5452,7 @@ unsigned char *wire,*str,*tmp,*legal; wire= *pWire; len= (*(unsigned char *)wire++); if (len>0) { - str= xcalloc(1, len+1); + str= calloc(1, len+1); if (str) { tmp= str; for (i=0;imaxNames; list.pattern[_XkbListKeycodes]= GetComponentSpec(&str,FALSE,&status); list.pattern[_XkbListTypes]= GetComponentSpec(&str,FALSE,&status); @@ -5510,13 +5513,11 @@ ProcXkbListComponents(ClientPtr client) if ((XkbPaddedSize(len)/4)!=stuff->length) return BadLength; if ((status=XkbDDXList(dev,&list,client))!=Success) { - if (list.pool) { - xfree(list.pool); - list.pool= NULL; - } + free(list.pool); + list.pool = NULL; return status; } - bzero(&rep,sizeof(xkbListComponentsReply)); + memset(&rep, 0, sizeof(xkbListComponentsReply)); rep.type= X_Reply; rep.deviceID = dev->id; rep.sequenceNumber = client->sequence; @@ -5545,10 +5546,10 @@ ProcXkbListComponents(ClientPtr client) WriteToClient(client,SIZEOF(xkbListComponentsReply),(char *)&rep); if (list.nPool && list.pool) { WriteToClient(client,XkbPaddedSize(list.nPool), (char *)list.pool); - xfree(list.pool); + free(list.pool); list.pool= NULL; } - return client->noClientException; + return Success; } /***====================================================================***/ @@ -5622,7 +5623,7 @@ ProcXkbGetKbdByName(ClientPtr client) geom_changed= FALSE; } - bzero(mapFile,PATH_MAX); + memset(mapFile, 0, PATH_MAX); rep.type= X_Reply; rep.deviceID = dev->id; rep.sequenceNumber = client->sequence; @@ -5657,7 +5658,7 @@ ProcXkbGetKbdByName(ClientPtr client) if (stuff->load || ((rep.reported&XkbGBN_SymbolsMask) && (new->compat))) { XkbChangesRec changes; - bzero(&changes,sizeof(changes)); + memset(&changes, 0, sizeof(changes)); XkbUpdateDescActions(new, new->min_key_code,XkbNumKeys(new), &changes); @@ -5842,7 +5843,7 @@ ProcXkbGetKbdByName(ClientPtr client) xkb->ctrls->num_groups= nTG; for (tmpd = inputInfo.devices; tmpd; tmpd = tmpd->next) { - if ((tmpd == dev) || (!IsMaster(tmpd) && tmpd->u.master == dev)) { + if ((tmpd == dev) || (!IsMaster(tmpd) && GetMaster(tmpd, MASTER_KEYBOARD) == dev)) { if (tmpd != dev) XkbCopyDeviceKeymap(tmpd, dev); @@ -5886,12 +5887,17 @@ ProcXkbGetKbdByName(ClientPtr client) XkbFreeKeyboard(new,XkbAllComponentsMask,TRUE); new= NULL; } - if (names.keycodes) { xfree(names.keycodes); names.keycodes= NULL; } - if (names.types) { xfree(names.types); names.types= NULL; } - if (names.compat) { xfree(names.compat); names.compat= NULL; } - if (names.symbols) { xfree(names.symbols); names.symbols= NULL; } - if (names.geometry) { xfree(names.geometry); names.geometry= NULL; } - return client->noClientException; + free(names.keycodes); + names.keycodes = NULL; + free(names.types); + names.types = NULL; + free(names.compat); + names.compat = NULL; + free(names.symbols); + names.symbols = NULL; + free(names.geometry); + names.geometry = NULL; + return Success; } /***====================================================================***/ @@ -6121,7 +6127,7 @@ char * str; wanted&= ~XkbXI_IndicatorsMask; nameLen= XkbSizeCountedString(dev->name); - bzero((char *)&rep,SIZEOF(xkbGetDeviceInfoReply)); + memset((char *)&rep, 0, SIZEOF(xkbGetDeviceInfoReply)); rep.type = X_Reply; rep.deviceID= dev->id; rep.sequenceNumber = client->sequence; @@ -6205,12 +6211,12 @@ char * str; } WriteToClient(client,SIZEOF(xkbGetDeviceInfoReply), (char *)&rep); - str= xalloc(nameLen); + str= malloc(nameLen); if (!str) return BadAlloc; XkbWriteCountedString(str,dev->name,client->swapped); WriteToClient(client,nameLen,str); - xfree(str); + free(str); length-= nameLen; if (rep.nBtnsRtrn>0) { @@ -6231,7 +6237,7 @@ char * str; ErrorF("[xkb] Wrote %d fewer bytes than expected\n",length); return BadLength; } - return client->noClientException; + return Success; } static char * @@ -6329,8 +6335,8 @@ xkbExtensionDeviceNotify ed; XkbChangesRec changes; DeviceIntPtr kbd; - bzero((char *)&ed,sizeof(xkbExtensionDeviceNotify)); - bzero((char *)&changes,sizeof(XkbChangesRec)); + memset((char *)&ed, 0, sizeof(xkbExtensionDeviceNotify)); + memset((char *)&changes, 0, sizeof(XkbChangesRec)); XkbSetCauseXkbReq(&cause,X_kbSetDeviceInfo,client); ledWire= (xkbDeviceLedsWireDesc *)wire; for (i=0;inamesPresent|ledWire->namesPresent; - bzero((char *)sli->names,XkbNumIndicators*sizeof(Atom)); + memset((char *)sli->names, 0, XkbNumIndicators*sizeof(Atom)); } if (ledWire->namesPresent) { sli->namesPresent= ledWire->namesPresent; - bzero((char *)sli->names,XkbNumIndicators*sizeof(Atom)); + memset((char *)sli->names, 0, XkbNumIndicators*sizeof(Atom)); for (n=0,bit=1;nnamesPresent&bit) { sli->names[n]= (Atom)*atomWire; @@ -6369,7 +6375,7 @@ DeviceIntPtr kbd; if (changed&XkbXI_IndicatorMapsMask) { mapc= sli->mapsPresent|ledWire->mapsPresent; sli->mapsPresent= ledWire->mapsPresent; - bzero((char*)sli->maps,XkbNumIndicators*sizeof(XkbIndicatorMapRec)); + memset((char*)sli->maps, 0, XkbNumIndicators*sizeof(XkbIndicatorMapRec)); } if (ledWire->mapsPresent) { for (n=0,bit=1;nid; wire= (char *)&stuff[1]; if (stuff->change&XkbXI_ButtonActionsMask) { @@ -6459,7 +6465,7 @@ _XkbSetDeviceInfoCheck(ClientPtr client, DeviceIntPtr dev, nBtns= dev->button->numButtons; acts= dev->button->xkb_acts; if (acts==NULL) { - acts= xcalloc(nBtns, sizeof(XkbAction)); + acts= calloc(nBtns, sizeof(XkbAction)); if (!acts) return BadAlloc; dev->button->xkb_acts= acts; @@ -6516,7 +6522,7 @@ ProcXkbSetDeviceInfo(ClientPtr client) DeviceIntPtr other; for (other = inputInfo.devices; other; other = other->next) { - if (((other != dev) && !IsMaster(other) && (other->u.master == dev)) && + if (((other != dev) && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev) && ((stuff->deviceSpec == XkbUseCoreKbd && other->key) || (stuff->deviceSpec == XkbUseCorePtr && other->button))) { @@ -6541,7 +6547,7 @@ ProcXkbSetDeviceInfo(ClientPtr client) DeviceIntPtr other; for (other = inputInfo.devices; other; other = other->next) { - if (((other != dev) && !IsMaster(other) && (other->u.master == dev)) && + if (((other != dev) && !IsMaster(other) && GetMaster(other, MASTER_KEYBOARD) == dev) && ((stuff->deviceSpec == XkbUseCoreKbd && other->key) || (stuff->deviceSpec == XkbUseCorePtr && other->button))) { @@ -6556,7 +6562,7 @@ ProcXkbSetDeviceInfo(ClientPtr client) } } - return client->noClientException; + return Success; } /***====================================================================***/ @@ -6619,7 +6625,7 @@ int rc; swapl(&rep.supportedCtrls, n); } WriteToClient(client,SIZEOF(xkbSetDebuggingFlagsReply), (char *)&rep); - return client->noClientException; + return Success; } /***====================================================================***/ @@ -6707,6 +6713,9 @@ XkbExtensionInit(void) if (!RT_XKBCLIENT) return; + if (!XkbInitPrivates()) + return; + if ((extEntry = AddExtension(XkbName, XkbNumberEvents, XkbNumberErrors, ProcXkbDispatch, SProcXkbDispatch, NULL, StandardMinorOpcode))) { diff --git a/xserver/xkb/xkbAccessX.c b/xserver/xkb/xkbAccessX.c index be1dceea3..10c38ca47 100644 --- a/xserver/xkb/xkbAccessX.c +++ b/xserver/xkb/xkbAccessX.c @@ -394,7 +394,7 @@ XkbSrvLedInfoPtr sli; unsigned timeElapsed = (now-xkbi->lastPtrEventTime); if (timeToWait > timeElapsed) - return (timeToWait - timeElapsed); + return timeToWait - timeElapsed; } old= *ctrls; xkbi->shiftKeyCount= 0; @@ -707,27 +707,24 @@ DeviceEvent *event = &ev->device_event; changed |= XkbPointerButtonMask; } else if (event->type == ET_ButtonRelease) { - if (xkbi) + if (xkbi) { xkbi->lockedPtrButtons&= ~(1 << (event->detail.key & 0x7)); + + if (IsMaster(dev)) + { + DeviceIntPtr source; + int rc; + rc = dixLookupDevice(&source, event->sourceid, serverClient, DixWriteAccess); + if (rc != Success) + ErrorF("[xkb] bad sourceid '%d' on button release event.\n", event->sourceid); + else if (!IsXTestDevice(source, GetMaster(dev, MASTER_POINTER))) + XkbFakeDeviceButton(dev, FALSE, event->detail.key); + } + } + changed |= XkbPointerButtonMask; } - /* Guesswork. mostly. - * xkb actuall goes through some effort to transparently wrap the - * processInputProcs (see XkbSetExtension). But we all love fun, so the - * previous XKB implementation just hardcoded the CPPE call here instead - * of unwrapping like anybody with any sense of decency would do. - * I got no clue what the correct thing to do is, but my guess is that - * it's not hardcoding. I may be wrong. whatever it is, don't come whining - * to me. I just work here. - * - * Anyway. here's the old call, if you don't like the wrapping, revert it. - * - * CoreProcessPointerEvent(xE,mouse,count); - * - * see. it's still steaming. told you. (whot) - */ - UNWRAP_PROCESS_INPUT_PROC(mouse, xkbPrivPtr, backupproc); mouse->public.processInputProc(ev, mouse); COND_WRAP_PROCESS_INPUT_PROC(mouse, xkbPrivPtr, diff --git a/xserver/xkb/xkbActions.c b/xserver/xkb/xkbActions.c index 4c7bce2e4..229af77e6 100644 --- a/xserver/xkb/xkbActions.c +++ b/xserver/xkb/xkbActions.c @@ -40,10 +40,14 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include #include "xkb.h" #include +#include "mi.h" +#include "mipointer.h" #define EXTENSION_EVENT_BASE 64 -static int xkbDevicePrivateKeyIndex; -DevPrivateKey xkbDevicePrivateKey = &xkbDevicePrivateKeyIndex; +DevPrivateKeyRec xkbDevicePrivateKeyRec; + +void XkbFakeDeviceButton(DeviceIntPtr dev,Bool press,int button); +static void XkbFakePointerMotion(DeviceIntPtr dev, unsigned flags,int x,int y); void xkbUnwrapProc(DeviceIntPtr device, DeviceHandleProc proc, @@ -60,13 +64,18 @@ xkbUnwrapProc(DeviceIntPtr device, DeviceHandleProc proc, backupproc,xkbUnwrapProc); } +Bool +XkbInitPrivates(void) +{ + return dixRegisterPrivateKey(&xkbDevicePrivateKeyRec, PRIVATE_DEVICE, 0); +} void XkbSetExtension(DeviceIntPtr device, ProcessInputProc proc) { xkbDeviceInfoPtr xkbPrivPtr; - xkbPrivPtr = (xkbDeviceInfoPtr) xcalloc(1, sizeof(xkbDeviceInfoRec)); + xkbPrivPtr = (xkbDeviceInfoPtr) calloc(1, sizeof(xkbDeviceInfoRec)); if (!xkbPrivPtr) return; xkbPrivPtr->unwrapProc = NULL; @@ -479,7 +488,7 @@ int dx,dy; dx= xkbi->mouseKeysDX; dy= xkbi->mouseKeysDY; } - XkbDDXFakePointerMotion(xkbi->device, xkbi->mouseKeysFlags,dx,dy); + XkbFakePointerMotion(xkbi->device, xkbi->mouseKeysFlags,dx,dy); return xkbi->desc->ctrls->mk_interval; } @@ -492,9 +501,6 @@ _XkbFilterPointerMove( XkbSrvInfoPtr xkbi, int x,y; Bool accel; - if (xkbi->device == inputInfo.keyboard) - return 0; - if (filter->keycode==0) { /* initial press */ filter->keycode = keycode; filter->active = 1; @@ -507,7 +513,7 @@ Bool accel; accel= ((pAction->ptr.flags&XkbSA_NoAcceleration)==0); x= XkbPtrActionX(&pAction->ptr); y= XkbPtrActionY(&pAction->ptr); - XkbDDXFakePointerMotion(xkbi->device, pAction->ptr.flags,x,y); + XkbFakePointerMotion(xkbi->device, pAction->ptr.flags,x,y); AccessXCancelRepeatKey(xkbi,keycode); xkbi->mouseKeysAccel= accel&& (xkbi->desc->ctrls->enabled_ctrls&XkbMouseKeysAccelMask); @@ -554,7 +560,7 @@ _XkbFilterPointerBtn( XkbSrvInfoPtr xkbi, ((pAction->btn.flags&XkbSA_LockNoLock)==0)) { xkbi->lockedPtrButtons|= (1<device, 1, button); + XkbFakeDeviceButton(xkbi->device, 1, button); filter->upAction.type= XkbSA_NoAction; } break; @@ -565,12 +571,12 @@ _XkbFilterPointerBtn( XkbSrvInfoPtr xkbi, if (pAction->btn.count>0) { nClicks= pAction->btn.count; for (i=0;idevice, 1, button); - XkbDDXFakeDeviceButton(xkbi->device, 0, button); + XkbFakeDeviceButton(xkbi->device, 1, button); + XkbFakeDeviceButton(xkbi->device, 0, button); } filter->upAction.type= XkbSA_NoAction; } - else XkbDDXFakeDeviceButton(xkbi->device, 1, button); + else XkbFakeDeviceButton(xkbi->device, 1, button); } break; case XkbSA_SetPtrDflt: @@ -625,8 +631,18 @@ _XkbFilterPointerBtn( XkbSrvInfoPtr xkbi, break; } xkbi->lockedPtrButtons&= ~(1<device)) + { + XkbMergeLockedPtrBtns(xkbi->device); + /* One SD still has lock set, don't post event */ + if ((xkbi->lockedPtrButtons & (1 << button)) != 0) + break; + } + + /* fallthrough */ case XkbSA_PtrBtn: - XkbDDXFakeDeviceButton(xkbi->device, 0, button); + XkbFakeDeviceButton(xkbi->device, 0, button); break; } filter->active = 0; @@ -790,6 +806,7 @@ ProcessInputProc backupproc; /* never actually used uninitialised, but gcc isn't smart enough * to work that out. */ memset(&old, 0, sizeof(old)); + memset(&ev, 0, sizeof(ev)); if ((filter->keycode!=0)&&(filter->keycode!=keycode)) return 1; @@ -964,7 +981,7 @@ int button; if ((pAction->devbtn.flags&XkbSA_LockNoLock)|| BitIsOn(dev->button->down, button)) return 0; - XkbDDXFakeDeviceButton(dev,TRUE,button); + XkbFakeDeviceButton(dev,TRUE,button); filter->upAction.type= XkbSA_NoAction; break; case XkbSA_DeviceBtn: @@ -972,12 +989,12 @@ int button; int nClicks,i; nClicks= pAction->btn.count; for (i=0;iupAction.type= XkbSA_NoAction; } - else XkbDDXFakeDeviceButton(dev,TRUE,button); + else XkbFakeDeviceButton(dev,TRUE,button); break; } } @@ -996,10 +1013,10 @@ int button; if ((filter->upAction.devbtn.flags&XkbSA_LockNoUnlock)|| !BitIsOn(dev->button->down, button)) return 0; - XkbDDXFakeDeviceButton(dev,FALSE,button); + XkbFakeDeviceButton(dev,FALSE,button); break; case XkbSA_DeviceBtn: - XkbDDXFakeDeviceButton(dev,FALSE,button); + XkbFakeDeviceButton(dev,FALSE,button); break; } filter->active = 0; @@ -1016,7 +1033,7 @@ register int i; if (xkbi->szFilters==0) { xkbi->szFilters = 4; - xkbi->filters = xcalloc(xkbi->szFilters, sizeof(XkbFilterRec)); + xkbi->filters = calloc(xkbi->szFilters, sizeof(XkbFilterRec)); /* 6/21/93 (ef) -- XXX! deal with allocation failure */ } for (i=0;iszFilters;i++) { @@ -1026,10 +1043,10 @@ register int i; } } xkbi->szFilters*=2; - xkbi->filters= xrealloc(xkbi->filters, + xkbi->filters= realloc(xkbi->filters, xkbi->szFilters * sizeof(XkbFilterRec)); /* 6/21/93 (ef) -- XXX! deal with allocation failure */ - bzero(&xkbi->filters[xkbi->szFilters/2], + memset(&xkbi->filters[xkbi->szFilters/2], 0, (xkbi->szFilters/2)*sizeof(XkbFilterRec)); return &xkbi->filters[xkbi->szFilters/2]; } @@ -1316,3 +1333,109 @@ xkbStateNotify sn; return; } +/* + * The event is injected into the event processing, not the EQ. Thus, + * ensure that we restore the master after the event sequence to the + * original set of classes. Otherwise, the master remains on the XTEST + * classes and drops events that don't fit into the XTEST layout (e.g. + * events with more than 2 valuators). + * + * FIXME: EQ injection in the processing stage is not designed for, so this + * is a rather awkward hack. The event list returned by GetPointerEvents() + * and friends is always prefixed with a DCE if the last _posted_ device was + * different. For normal events, this sequence then resets the master during + * the processing stage. Since we inject the PointerKey events in the + * processing stage though, we need to manually reset to restore the + * previous order, because the events already in the EQ must be sent for the + * right device. + * So we post-fix the event list we get from GPE with a DCE back to the + * previous slave device. + * + * First one on drinking island wins! + */ +static void +InjectPointerKeyEvents(DeviceIntPtr dev, int type, int button, int flags, int num_valuators, int *valuators) +{ + ScreenPtr pScreen; + EventListPtr events; + int nevents, i; + DeviceIntPtr ptr, mpointer, lastSlave = NULL; + Bool saveWait; + + if (IsMaster(dev)) { + mpointer = GetMaster(dev, MASTER_POINTER); + lastSlave = mpointer->u.lastSlave; + ptr = GetXTestDevice(mpointer); + } else if (!dev->u.master) + ptr = dev; + else + return; + + + events = InitEventList(GetMaximumEventsNum() + 1); + OsBlockSignals(); + pScreen = miPointerGetScreen(ptr); + saveWait = miPointerSetWaitForUpdate(pScreen, FALSE); + nevents = GetPointerEvents(events, ptr, type, button, flags, 0, + num_valuators, valuators); + if (IsMaster(dev) && (lastSlave && lastSlave != ptr)) + UpdateFromMaster(&events[nevents], lastSlave, DEVCHANGE_POINTER_EVENT, &nevents); + miPointerSetWaitForUpdate(pScreen, saveWait); + OsReleaseSignals(); + + for (i = 0; i < nevents; i++) + mieqProcessDeviceEvent(ptr, (InternalEvent*)events[i].event, NULL); + + FreeEventList(events, GetMaximumEventsNum()); + +} + +static void +XkbFakePointerMotion(DeviceIntPtr dev, unsigned flags,int x,int y) +{ + int gpe_flags = 0; + int motion[2]; + + /* ignore attached SDs */ + if (!IsMaster(dev) && GetMaster(dev, MASTER_POINTER) != NULL) + return; + + if (flags & XkbSA_MoveAbsoluteX || flags & XkbSA_MoveAbsoluteY) + gpe_flags = POINTER_ABSOLUTE; + else + gpe_flags = POINTER_RELATIVE; + + motion[0] = x; + motion[1] = y; + InjectPointerKeyEvents(dev, MotionNotify, 0, gpe_flags, 2, motion); +} + +void +XkbFakeDeviceButton(DeviceIntPtr dev,Bool press,int button) +{ + DeviceIntPtr ptr; + int down; + + /* If dev is a slave device, and the SD is attached, do nothing. If we'd + * post through the attached master pointer we'd get duplicate events. + * + * if dev is a master keyboard, post through the XTEST device + * + * if dev is a floating slave, post through the device itself. + */ + + if (IsMaster(dev)) { + DeviceIntPtr mpointer = GetMaster(dev, MASTER_POINTER); + ptr = GetXTestDevice(mpointer); + } else if (!dev->u.master) + ptr = dev; + else + return; + + down = button_is_down(ptr, button, BUTTON_PROCESSED); + if (press == down) + return; + + InjectPointerKeyEvents(dev, press ? ButtonPress : ButtonRelease, + button, 0, 0, NULL); +} diff --git a/xserver/xkb/xkbEvents.c b/xserver/xkb/xkbEvents.c index 33741e9c6..8028502b9 100644 --- a/xserver/xkb/xkbEvents.c +++ b/xserver/xkb/xkbEvents.c @@ -102,7 +102,6 @@ XkbSendLegacyMapNotify(DeviceIntPtr kbd, CARD16 xkb_event, CARD16 changed, if (!XIShouldNotify(clients[i], kbd)) continue; - core_mn.u.u.sequenceNumber = clients[i]->sequence; if (keymap_changed) { core_mn.u.mappingNotify.request = MappingKeyboard; @@ -1041,8 +1040,7 @@ XkbInterestPtr interest; return ((interest->resource==id)?interest:NULL); interest = interest->next; } - interest = xalloc(sizeof(XkbInterestRec)); - bzero(interest,sizeof(XkbInterestRec)); + interest = calloc(1, sizeof(XkbInterestRec)); if (interest) { interest->dev = dev; interest->client = client; @@ -1086,7 +1084,7 @@ ClientPtr client = NULL; autoCtrls= interest->autoCtrls; autoValues= interest->autoCtrlValues; client= interest->client; - xfree(interest); + free(interest); found= TRUE; } while ((!found)&&(interest->next)) { @@ -1096,7 +1094,7 @@ ClientPtr client = NULL; autoCtrls= victim->autoCtrls; autoValues= victim->autoCtrlValues; client= victim->client; - xfree(victim); + free(victim); found= TRUE; } interest = interest->next; diff --git a/xserver/xkb/xkbInit.c b/xserver/xkb/xkbInit.c index 4a3219e2a..fbf8f14b8 100644 --- a/xserver/xkb/xkbInit.c +++ b/xserver/xkb/xkbInit.c @@ -43,6 +43,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "inputstr.h" #include "opaque.h" #include "property.h" +#include "scrnintstr.h" #define XKBSRV_NEED_FILE_FUNCS #include #include "xkbgeom.h" @@ -140,14 +141,14 @@ XkbFreeRMLVOSet(XkbRMLVOSet *rmlvo, Bool freeRMLVO) if (!rmlvo) return; - xfree(rmlvo->rules); - xfree(rmlvo->model); - xfree(rmlvo->layout); - xfree(rmlvo->variant); - xfree(rmlvo->options); + free(rmlvo->rules); + free(rmlvo->model); + free(rmlvo->layout); + free(rmlvo->variant); + free(rmlvo->options); if (freeRMLVO) - xfree(rmlvo); + free(rmlvo); else memset(rmlvo, 0, sizeof(XkbRMLVOSet)); } @@ -174,7 +175,7 @@ char * pval; ErrorF("[xkb] Atom error: %s not created\n",_XKB_RF_NAMES_PROP_ATOM); return TRUE; } - pval= (char*) xalloc(len); + pval= (char*) malloc(len); if (!pval) { ErrorF("[xkb] Allocation error: %s proprerty not created\n", _XKB_RF_NAMES_PROP_ATOM); @@ -210,29 +211,24 @@ char * pval; ErrorF("[xkb] Internal Error! bad size (%d!=%d) for _XKB_RULES_NAMES\n", out,len); } - dixChangeWindowProperty(serverClient, WindowTable[0], name, XA_STRING, 8, + dixChangeWindowProperty(serverClient, screenInfo.screens[0]->root, name, XA_STRING, 8, PropModeReplace, len, pval, TRUE); - xfree(pval); + free(pval); return TRUE; } static void XkbSetRulesUsed(XkbRMLVOSet *rmlvo) { - if (XkbRulesUsed) - xfree(XkbRulesUsed); + free(XkbRulesUsed); XkbRulesUsed= (rmlvo->rules?_XkbDupString(rmlvo->rules):NULL); - if (XkbModelUsed) - xfree(XkbModelUsed); + free(XkbModelUsed); XkbModelUsed= (rmlvo->model?_XkbDupString(rmlvo->model):NULL); - if (XkbLayoutUsed) - xfree(XkbLayoutUsed); + free(XkbLayoutUsed); XkbLayoutUsed= (rmlvo->layout?_XkbDupString(rmlvo->layout):NULL); - if (XkbVariantUsed) - xfree(XkbVariantUsed); + free(XkbVariantUsed); XkbVariantUsed= (rmlvo->variant?_XkbDupString(rmlvo->variant):NULL); - if (XkbOptionsUsed) - xfree(XkbOptionsUsed); + free(XkbOptionsUsed); XkbOptionsUsed= (rmlvo->options?_XkbDupString(rmlvo->options):NULL); if (XkbWantRulesProp) QueueWorkProc(XkbWriteRulesProp,NULL,NULL); @@ -243,28 +239,23 @@ void XkbSetRulesDflts(XkbRMLVOSet *rmlvo) { if (rmlvo->rules) { - if (XkbRulesDflt) - xfree(XkbRulesDflt); + free(XkbRulesDflt); XkbRulesDflt= _XkbDupString(rmlvo->rules); } if (rmlvo->model) { - if (XkbModelDflt) - xfree(XkbModelDflt); + free(XkbModelDflt); XkbModelDflt= _XkbDupString(rmlvo->model); } if (rmlvo->layout) { - if (XkbLayoutDflt) - xfree(XkbLayoutDflt); + free(XkbLayoutDflt); XkbLayoutDflt= _XkbDupString(rmlvo->layout); } if (rmlvo->variant) { - if (XkbVariantDflt) - xfree(XkbVariantDflt); + free(XkbVariantDflt); XkbVariantDflt= _XkbDupString(rmlvo->variant); } if (rmlvo->options) { - if (XkbOptionsDflt) - xfree(XkbOptionsDflt); + free(XkbOptionsDflt); XkbOptionsDflt= _XkbDupString(rmlvo->options); } return; @@ -273,15 +264,15 @@ XkbSetRulesDflts(XkbRMLVOSet *rmlvo) void XkbDeleteRulesDflts(void) { - xfree(XkbRulesDflt); + free(XkbRulesDflt); XkbRulesDflt = NULL; - xfree(XkbModelDflt); + free(XkbModelDflt); XkbModelDflt = NULL; - xfree(XkbLayoutDflt); + free(XkbLayoutDflt); XkbLayoutDflt = NULL; - xfree(XkbVariantDflt); + free(XkbVariantDflt); XkbVariantDflt = NULL; - xfree(XkbOptionsDflt); + free(XkbOptionsDflt); XkbOptionsDflt = NULL; XkbFreeKeyboard(xkb_cached_map, XkbAllComponentsMask, TRUE); @@ -515,20 +506,20 @@ InitKeyboardDeviceStruct(DeviceIntPtr dev, XkbRMLVOSet *rmlvo, memset(&changes, 0, sizeof(changes)); XkbSetCauseUnknown(&cause); - dev->key = xcalloc(1, sizeof(*dev->key)); + dev->key = calloc(1, sizeof(*dev->key)); if (!dev->key) { ErrorF("XKB: Failed to allocate key class\n"); return FALSE; } dev->key->sourceid = dev->id; - dev->kbdfeed = xcalloc(1, sizeof(*dev->kbdfeed)); + dev->kbdfeed = calloc(1, sizeof(*dev->kbdfeed)); if (!dev->kbdfeed) { ErrorF("XKB: Failed to allocate key feedback class\n"); goto unwind_key; } - xkbi = xcalloc(1, sizeof(*xkbi)); + xkbi = calloc(1, sizeof(*xkbi)); if (!xkbi) { ErrorF("XKB: Failed to allocate XKB info\n"); goto unwind_kbdfeed; @@ -620,13 +611,13 @@ InitKeyboardDeviceStruct(DeviceIntPtr dev, XkbRMLVOSet *rmlvo, unwind_desc: XkbFreeKeyboard(xkb, 0, TRUE); unwind_info: - xfree(xkbi); + free(xkbi); dev->key->xkbInfo = NULL; unwind_kbdfeed: - xfree(dev->kbdfeed); + free(dev->kbdfeed); dev->kbdfeed = NULL; unwind_key: - xfree(dev->key); + free(dev->key); dev->key = NULL; return FALSE; } @@ -644,10 +635,8 @@ unwind_key: void XkbFreeInfo(XkbSrvInfoPtr xkbi) { - if (xkbi->radioGroups) { - xfree(xkbi->radioGroups); - xkbi->radioGroups= NULL; - } + free(xkbi->radioGroups); + xkbi->radioGroups = NULL; if (xkbi->mouseKeyTimer) { TimerFree(xkbi->mouseKeyTimer); xkbi->mouseKeyTimer= NULL; @@ -677,7 +666,7 @@ XkbFreeInfo(XkbSrvInfoPtr xkbi) XkbFreeKeyboard(xkbi->desc,XkbAllComponentsMask,TRUE); xkbi->desc= NULL; } - xfree(xkbi); + free(xkbi); return; } diff --git a/xserver/xkb/xkbLEDs.c b/xserver/xkb/xkbLEDs.c index 8c28513ec..f617537cf 100644 --- a/xserver/xkb/xkbLEDs.c +++ b/xserver/xkb/xkbLEDs.c @@ -166,7 +166,7 @@ XkbStatePtr state; } } } - return (stateChange || ctrlChange); + return stateChange || ctrlChange; } /* @@ -263,7 +263,7 @@ unsigned oldState; if (ed==NULL) { ed= &my_ed; - bzero((char *)ed,sizeof(xkbExtensionDeviceNotify)); + memset((char *)ed, 0, sizeof(xkbExtensionDeviceNotify)); } else if ((ed->reason&XkbXI_IndicatorsMask)&& ((ed->ledClass!=sli->class)||(ed->ledID!=sli->id))) { @@ -273,7 +273,7 @@ unsigned oldState; if ((kbd==dev)&&(sli->flags&XkbSLI_IsDefault)) { if (changes==NULL) { changes= &my_changes; - bzero((char *)changes,sizeof(XkbChangesRec)); + memset((char *)changes, 0, sizeof(XkbChangesRec)); } changes->indicators.state_changes|= affected; } @@ -362,8 +362,8 @@ XkbChangesRec changes; xkbExtensionDeviceNotify ed; unsigned side_affected; - bzero((char *)&changes,sizeof(XkbChangesRec)); - bzero((char *)&ed,sizeof(xkbExtensionDeviceNotify)); + memset((char *)&changes, 0, sizeof(XkbChangesRec)); + memset((char *)&ed, 0, sizeof(xkbExtensionDeviceNotify)); sli= XkbFindSrvLedInfo(dev,XkbDfltXIClass,XkbDfltXIId,0); sli->explicitState&= ~affect; sli->explicitState|= (affect&values); @@ -524,7 +524,7 @@ Bool checkNames; sli= NULL; checkAccel= checkNames= FALSE; if ((kf!=NULL)&&(kf->xkb_sli==NULL)) { - kf->xkb_sli= sli= xcalloc(1, sizeof(XkbSrvLedInfoRec)); + kf->xkb_sli= sli= calloc(1, sizeof(XkbSrvLedInfoRec)); if (sli==NULL) return NULL; /* ALLOCATION ERROR */ if (dev->key && dev->key->xkbInfo) @@ -567,7 +567,7 @@ Bool checkNames; } } else if ((lf!=NULL)&&(lf->xkb_sli==NULL)) { - lf->xkb_sli= sli= xcalloc(1, sizeof(XkbSrvLedInfoRec)); + lf->xkb_sli= sli= calloc(1, sizeof(XkbSrvLedInfoRec)); if (sli==NULL) return NULL; /* ALLOCATION ERROR */ if (dev->key && dev->key->xkbInfo) @@ -585,9 +585,9 @@ Bool checkNames; sli->names= NULL; } if ((sli->names==NULL)&&(needed_parts&XkbXI_IndicatorNamesMask)) - sli->names= xcalloc(XkbNumIndicators, sizeof(Atom)); + sli->names= calloc(XkbNumIndicators, sizeof(Atom)); if ((sli->maps==NULL)&&(needed_parts&XkbXI_IndicatorMapsMask)) - sli->maps= xcalloc(XkbNumIndicators, sizeof(XkbIndicatorMapRec)); + sli->maps= calloc(XkbNumIndicators, sizeof(XkbIndicatorMapRec)); if (checkNames) { register unsigned i,bit; sli->namesPresent= 0; @@ -605,12 +605,12 @@ void XkbFreeSrvLedInfo(XkbSrvLedInfoPtr sli) { if ((sli->flags&XkbSLI_IsDefault)==0) { - if (sli->maps) xfree(sli->maps); - if (sli->names) xfree(sli->names); + free(sli->maps); + free(sli->names); } sli->maps= NULL; sli->names= NULL; - xfree(sli); + free(sli); return; } @@ -633,7 +633,7 @@ XkbCopySrvLedInfo( DeviceIntPtr from, if (!src) goto finish; - sli_new = xcalloc(1, sizeof( XkbSrvLedInfoRec)); + sli_new = calloc(1, sizeof( XkbSrvLedInfoRec)); if (!sli_new) goto finish; @@ -644,8 +644,8 @@ XkbCopySrvLedInfo( DeviceIntPtr from, sli_new->fb.lf = lf; if (!(sli_new->flags & XkbSLI_IsDefault)) { - sli_new->names= xcalloc(XkbNumIndicators, sizeof(Atom)); - sli_new->maps= xcalloc(XkbNumIndicators, sizeof(XkbIndicatorMapRec)); + sli_new->names= calloc(XkbNumIndicators, sizeof(Atom)); + sli_new->maps= calloc(XkbNumIndicators, sizeof(XkbIndicatorMapRec)); } /* else sli_new->names/maps is pointing to dev->key->xkbInfo->desc->names->indicators; dev->key->xkbInfo->desc->names->indicators; */ @@ -715,9 +715,9 @@ XkbSrvLedInfoPtr sli; } } if ((sli->names==NULL)&&(needed_parts&XkbXI_IndicatorNamesMask)) - sli->names= xcalloc(XkbNumIndicators, sizeof(Atom)); + sli->names= calloc(XkbNumIndicators, sizeof(Atom)); if ((sli->maps==NULL)&&(needed_parts&XkbXI_IndicatorMapsMask)) - sli->maps= xcalloc(XkbNumIndicators, sizeof(XkbIndicatorMapRec)); + sli->maps= calloc(XkbNumIndicators, sizeof(XkbIndicatorMapRec)); return sli; } @@ -735,7 +735,7 @@ XkbFlushLedEvents( DeviceIntPtr dev, if (changes->indicators.state_changes) XkbDDXUpdateDeviceIndicators(dev,sli,sli->effectiveState); XkbSendNotification(kbd,changes,cause); - bzero((char *)changes,sizeof(XkbChangesRec)); + memset((char *)changes, 0, sizeof(XkbChangesRec)); if (XkbAX_NeedFeedback(kbd->key->xkbInfo->desc->ctrls, XkbAX_IndicatorFBMask)) { if (sli->effectiveState) @@ -751,7 +751,7 @@ XkbFlushLedEvents( DeviceIntPtr dev, XkbDDXUpdateDeviceIndicators(dev,sli,sli->effectiveState); XkbSendExtensionDeviceNotify(dev,cause->client,ed); } - bzero((char *)ed,sizeof(XkbExtensionDeviceNotify)); + memset((char *)ed, 0, sizeof(XkbExtensionDeviceNotify)); } return; } @@ -778,7 +778,7 @@ xkbExtensionDeviceNotify my_ed; if (ed==NULL) { ed= &my_ed; - bzero((char *)ed,sizeof(xkbExtensionDeviceNotify)); + memset((char *)ed, 0, sizeof(xkbExtensionDeviceNotify)); } else if ((ed->reason&XkbXI_IndicatorsMask)&& ((ed->ledClass!=sli->class)||(ed->ledID!=sli->id))) { @@ -788,7 +788,7 @@ xkbExtensionDeviceNotify my_ed; if ((kbd==dev)&&(sli->flags&XkbSLI_IsDefault)) { if (changes==NULL) { changes= &my_changes; - bzero((char *)changes,sizeof(XkbChangesRec)); + memset((char *)changes, 0, sizeof(XkbChangesRec)); } changes->names.changed|= XkbIndicatorNamesMask; changes->names.changed_indicators|= changed_names; @@ -855,7 +855,7 @@ xkbExtensionDeviceNotify my_ed; if (ed==NULL) { ed= &my_ed; - bzero((char *)ed,sizeof(xkbExtensionDeviceNotify)); + memset((char *)ed, 0, sizeof(xkbExtensionDeviceNotify)); } else if ((ed->reason&XkbXI_IndicatorsMask)&& ((ed->ledClass!=sli->class)||(ed->ledID!=sli->id))) { @@ -865,7 +865,7 @@ xkbExtensionDeviceNotify my_ed; if ((kbd==dev)&&(sli->flags&XkbSLI_IsDefault)) { if (changes==NULL) { changes= &my_changes; - bzero((char *)changes,sizeof(XkbChangesRec)); + memset((char *)changes, 0, sizeof(XkbChangesRec)); } changes->indicators.map_changes|= changed_maps; } @@ -917,7 +917,7 @@ Bool kb_changed; if (changes==NULL) { changes= &my_changes; - bzero((char *)changes,sizeof(XkbChangesRec)); + memset((char *)changes, 0, sizeof(XkbChangesRec)); } kb_changed= FALSE; @@ -943,7 +943,7 @@ Bool kb_changed; if (ed==NULL) { ed= &my_ed; - bzero((char *)ed,sizeof(xkbExtensionDeviceNotify)); + memset((char *)ed, 0, sizeof(xkbExtensionDeviceNotify)); } else if (affected&&(ed->reason&XkbXI_IndicatorsMask)&& ((ed->ledClass!=sli->class)||(ed->ledID!=sli->id))) { diff --git a/xserver/xkb/xkbUtils.c b/xserver/xkb/xkbUtils.c index b1e0e552c..14dc784b8 100644 --- a/xserver/xkb/xkbUtils.c +++ b/xserver/xkb/xkbUtils.c @@ -282,7 +282,7 @@ register unsigned key; register unsigned bit,i; unsigned present; - bzero(newVMods,XkbNumVirtualMods); + memset(newVMods, 0, XkbNumVirtualMods); present= 0; for (key=xkb->min_key_code;key<=xkb->max_key_code;key++) { if (xkb->server->vmodmap[key]==0) @@ -410,7 +410,7 @@ int maxNumberOfGroups; if (maxSymsPerKey <= 0) return NULL; - syms = xcalloc(1, sizeof(*syms)); + syms = calloc(1, sizeof(*syms)); if (!syms) return NULL; @@ -427,9 +427,9 @@ int maxNumberOfGroups; syms->maxKeyCode = xkb->max_key_code; tmp = syms->mapWidth * (xkb->max_key_code - xkb->min_key_code + 1); - syms->map = xcalloc(tmp, sizeof(*syms->map)); + syms->map = calloc(tmp, sizeof(*syms->map)); if (!syms->map) { - xfree(syms); + free(syms); return NULL; } @@ -588,7 +588,7 @@ XkbSrvInfoPtr xkbi = dev->key->xkbInfo; xkbMapNotify mn; xkbi->desc->server->explicit[key]|= XkbExplicitAutoRepeatMask; - bzero(&mn,sizeof(mn)); + memset(&mn, 0, sizeof(mn)); mn.changed= XkbExplicitComponentsMask; mn.firstKeyExplicit= key; mn.nKeyExplicit= 1; @@ -911,7 +911,7 @@ _XkbCopyClientMap(XkbDescPtr src, XkbDescPtr dst) /* client map */ if (src->map) { if (!dst->map) { - tmp = xcalloc(1, sizeof(XkbClientMapRec)); + tmp = calloc(1, sizeof(XkbClientMapRec)); if (!tmp) return FALSE; dst->map = tmp; @@ -919,11 +919,8 @@ _XkbCopyClientMap(XkbDescPtr src, XkbDescPtr dst) if (src->map->syms) { if (src->map->size_syms != dst->map->size_syms) { - if (dst->map->syms) - tmp = xrealloc(dst->map->syms, - src->map->size_syms * sizeof(KeySym)); - else - tmp = xalloc(src->map->size_syms * sizeof(KeySym)); + tmp = realloc(dst->map->syms, + src->map->size_syms * sizeof(KeySym)); if (!tmp) return FALSE; dst->map->syms = tmp; @@ -933,23 +930,16 @@ _XkbCopyClientMap(XkbDescPtr src, XkbDescPtr dst) src->map->size_syms * sizeof(KeySym)); } else { - if (dst->map->syms) { - xfree(dst->map->syms); - dst->map->syms = NULL; - } + free(dst->map->syms); + dst->map->syms = NULL; } dst->map->num_syms = src->map->num_syms; dst->map->size_syms = src->map->size_syms; if (src->map->key_sym_map) { if (src->max_key_code != dst->max_key_code) { - if (dst->map->key_sym_map) - tmp = xrealloc(dst->map->key_sym_map, - (src->max_key_code + 1) * - sizeof(XkbSymMapRec)); - else - tmp = xalloc((src->max_key_code + 1) * - sizeof(XkbSymMapRec)); + tmp = realloc(dst->map->key_sym_map, + (src->max_key_code + 1) * sizeof(XkbSymMapRec)); if (!tmp) return FALSE; dst->map->key_sym_map = tmp; @@ -958,27 +948,25 @@ _XkbCopyClientMap(XkbDescPtr src, XkbDescPtr dst) (src->max_key_code + 1) * sizeof(XkbSymMapRec)); } else { - if (dst->map->key_sym_map) { - xfree(dst->map->key_sym_map); - dst->map->key_sym_map = NULL; - } + free(dst->map->key_sym_map); + dst->map->key_sym_map = NULL; } if (src->map->types && src->map->num_types) { if (src->map->num_types > dst->map->size_types || !dst->map->types || !dst->map->size_types) { if (dst->map->types && dst->map->size_types) { - tmp = xrealloc(dst->map->types, + tmp = realloc(dst->map->types, src->map->num_types * sizeof(XkbKeyTypeRec)); if (!tmp) return FALSE; dst->map->types = tmp; - bzero(dst->map->types + dst->map->num_types, + memset(dst->map->types + dst->map->num_types, 0, (src->map->num_types - dst->map->num_types) * sizeof(XkbKeyTypeRec)); } else { - tmp = xcalloc(src->map->num_types, sizeof(XkbKeyTypeRec)); + tmp = calloc(src->map->num_types, sizeof(XkbKeyTypeRec)); if (!tmp) return FALSE; dst->map->types = tmp; @@ -988,15 +976,12 @@ _XkbCopyClientMap(XkbDescPtr src, XkbDescPtr dst) dst->map->types) { for (i = src->map->num_types, dtype = (dst->map->types + i); i < dst->map->num_types; i++, dtype++) { - if (dtype->level_names) - xfree(dtype->level_names); + free(dtype->level_names); dtype->level_names = NULL; dtype->num_levels = 0; if (dtype->map_count) { - if (dtype->map) - xfree(dtype->map); - if (dtype->preserve) - xfree(dtype->preserve); + free(dtype->map); + free(dtype->preserve); } } } @@ -1008,7 +993,7 @@ _XkbCopyClientMap(XkbDescPtr src, XkbDescPtr dst) if (stype->num_levels != dtype->num_levels && dtype->num_levels && dtype->level_names && i < dst->map->num_types) { - tmp = xrealloc(dtype->level_names, + tmp = realloc(dtype->level_names, stype->num_levels * sizeof(Atom)); if (!tmp) continue; @@ -1016,7 +1001,7 @@ _XkbCopyClientMap(XkbDescPtr src, XkbDescPtr dst) } else if (!dtype->num_levels || !dtype->level_names || i >= dst->map->num_types) { - tmp = xalloc(stype->num_levels * sizeof(Atom)); + tmp = malloc(stype->num_levels * sizeof(Atom)); if (!tmp) continue; dtype->level_names = tmp; @@ -1028,7 +1013,7 @@ _XkbCopyClientMap(XkbDescPtr src, XkbDescPtr dst) else { if (dtype->num_levels && dtype->level_names && i < dst->map->num_types) - xfree(dtype->level_names); + free(dtype->level_names); dtype->num_levels = 0; dtype->level_names = NULL; } @@ -1041,7 +1026,7 @@ _XkbCopyClientMap(XkbDescPtr src, XkbDescPtr dst) if (stype->map_count != dtype->map_count && dtype->map_count && dtype->map && i < dst->map->num_types) { - tmp = xrealloc(dtype->map, + tmp = realloc(dtype->map, stype->map_count * sizeof(XkbKTMapEntryRec)); if (!tmp) @@ -1050,7 +1035,7 @@ _XkbCopyClientMap(XkbDescPtr src, XkbDescPtr dst) } else if (!dtype->map_count || !dtype->map || i >= dst->map->num_types) { - tmp = xalloc(stype->map_count * + tmp = malloc(stype->map_count * sizeof(XkbKTMapEntryRec)); if (!tmp) return FALSE; @@ -1062,7 +1047,7 @@ _XkbCopyClientMap(XkbDescPtr src, XkbDescPtr dst) } else { if (dtype->map && i < dst->map->num_types) - xfree(dtype->map); + free(dtype->map); dtype->map = NULL; } @@ -1070,7 +1055,7 @@ _XkbCopyClientMap(XkbDescPtr src, XkbDescPtr dst) if (stype->map_count != dtype->map_count && dtype->map_count && dtype->preserve && i < dst->map->num_types) { - tmp = xrealloc(dtype->preserve, + tmp = realloc(dtype->preserve, stype->map_count * sizeof(XkbModsRec)); if (!tmp) @@ -1079,7 +1064,7 @@ _XkbCopyClientMap(XkbDescPtr src, XkbDescPtr dst) } else if (!dtype->preserve || !dtype->map_count || i >= dst->map->num_types) { - tmp = xalloc(stype->map_count * + tmp = malloc(stype->map_count * sizeof(XkbModsRec)); if (!tmp) return FALSE; @@ -1091,7 +1076,7 @@ _XkbCopyClientMap(XkbDescPtr src, XkbDescPtr dst) } else { if (dtype->preserve && i < dst->map->num_types) - xfree(dtype->preserve); + free(dtype->preserve); dtype->preserve = NULL; } @@ -1099,10 +1084,8 @@ _XkbCopyClientMap(XkbDescPtr src, XkbDescPtr dst) } else { if (dtype->map_count && i < dst->map->num_types) { - if (dtype->map) - xfree(dtype->map); - if (dtype->preserve) - xfree(dtype->preserve); + free(dtype->map); + free(dtype->preserve); } dtype->map_count = 0; dtype->map = NULL; @@ -1117,26 +1100,22 @@ _XkbCopyClientMap(XkbDescPtr src, XkbDescPtr dst) if (dst->map->types) { for (i = 0, dtype = dst->map->types; i < dst->map->num_types; i++, dtype++) { - if (dtype->level_names) - xfree(dtype->level_names); + free(dtype->level_names); if (dtype->map && dtype->map_count) - xfree(dtype->map); + free(dtype->map); if (dtype->preserve && dtype->map_count) - xfree(dtype->preserve); + free(dtype->preserve); } - xfree(dst->map->types); - dst->map->types = NULL; } + free(dst->map->types); + dst->map->types = NULL; dst->map->num_types = 0; dst->map->size_types = 0; } if (src->map->modmap) { if (src->max_key_code != dst->max_key_code) { - if (dst->map->modmap) - tmp = xrealloc(dst->map->modmap, src->max_key_code + 1); - else - tmp = xalloc(src->max_key_code + 1); + tmp = realloc(dst->map->modmap, src->max_key_code + 1); if (!tmp) return FALSE; dst->map->modmap = tmp; @@ -1144,10 +1123,8 @@ _XkbCopyClientMap(XkbDescPtr src, XkbDescPtr dst) memcpy(dst->map->modmap, src->map->modmap, src->max_key_code + 1); } else { - if (dst->map->modmap) { - xfree(dst->map->modmap); - dst->map->modmap = NULL; - } + free(dst->map->modmap); + dst->map->modmap = NULL; } } else { @@ -1166,7 +1143,7 @@ _XkbCopyServerMap(XkbDescPtr src, XkbDescPtr dst) /* server map */ if (src->server) { if (!dst->server) { - tmp = xcalloc(1, sizeof(XkbServerMapRec)); + tmp = calloc(1, sizeof(XkbServerMapRec)); if (!tmp) return FALSE; dst->server = tmp; @@ -1174,10 +1151,7 @@ _XkbCopyServerMap(XkbDescPtr src, XkbDescPtr dst) if (src->server->explicit) { if (src->max_key_code != dst->max_key_code) { - if (dst->server->explicit) - tmp = xrealloc(dst->server->explicit, src->max_key_code + 1); - else - tmp = xalloc(src->max_key_code + 1); + tmp = realloc(dst->server->explicit, src->max_key_code + 1); if (!tmp) return FALSE; dst->server->explicit = tmp; @@ -1186,19 +1160,14 @@ _XkbCopyServerMap(XkbDescPtr src, XkbDescPtr dst) src->max_key_code + 1); } else { - if (dst->server->explicit) { - xfree(dst->server->explicit); - dst->server->explicit = NULL; - } + free(dst->server->explicit); + dst->server->explicit = NULL; } if (src->server->acts) { if (src->server->size_acts != dst->server->size_acts) { - if (dst->server->acts) - tmp = xrealloc(dst->server->acts, - src->server->size_acts * sizeof(XkbAction)); - else - tmp = xalloc(src->server->size_acts * sizeof(XkbAction)); + tmp = realloc(dst->server->acts, + src->server->size_acts * sizeof(XkbAction)); if (!tmp) return FALSE; dst->server->acts = tmp; @@ -1207,23 +1176,16 @@ _XkbCopyServerMap(XkbDescPtr src, XkbDescPtr dst) src->server->size_acts * sizeof(XkbAction)); } else { - if (dst->server->acts) { - xfree(dst->server->acts); - dst->server->acts = NULL; - } + free(dst->server->acts); + dst->server->acts = NULL; } dst->server->size_acts = src->server->size_acts; dst->server->num_acts = src->server->num_acts; if (src->server->key_acts) { if (src->max_key_code != dst->max_key_code) { - if (dst->server->key_acts) - tmp = xrealloc(dst->server->key_acts, - (src->max_key_code + 1) * - sizeof(unsigned short)); - else - tmp = xalloc((src->max_key_code + 1) * - sizeof(unsigned short)); + tmp = realloc(dst->server->key_acts, + (src->max_key_code + 1) * sizeof(unsigned short)); if (!tmp) return FALSE; dst->server->key_acts = tmp; @@ -1232,21 +1194,14 @@ _XkbCopyServerMap(XkbDescPtr src, XkbDescPtr dst) (src->max_key_code + 1) * sizeof(unsigned short)); } else { - if (dst->server->key_acts) { - xfree(dst->server->key_acts); - dst->server->key_acts = NULL; - } + free(dst->server->key_acts); + dst->server->key_acts = NULL; } if (src->server->behaviors) { if (src->max_key_code != dst->max_key_code) { - if (dst->server->behaviors) - tmp = xrealloc(dst->server->behaviors, - (src->max_key_code + 1) * - sizeof(XkbBehavior)); - else - tmp = xalloc((src->max_key_code + 1) * - sizeof(XkbBehavior)); + tmp = realloc(dst->server->behaviors, + (src->max_key_code + 1) * sizeof(XkbBehavior)); if (!tmp) return FALSE; dst->server->behaviors = tmp; @@ -1255,23 +1210,16 @@ _XkbCopyServerMap(XkbDescPtr src, XkbDescPtr dst) (src->max_key_code + 1) * sizeof(XkbBehavior)); } else { - if (dst->server->behaviors) { - xfree(dst->server->behaviors); - dst->server->behaviors = NULL; - } + free(dst->server->behaviors); + dst->server->behaviors = NULL; } memcpy(dst->server->vmods, src->server->vmods, XkbNumVirtualMods); if (src->server->vmodmap) { if (src->max_key_code != dst->max_key_code) { - if (dst->server->vmodmap) - tmp = xrealloc(dst->server->vmodmap, - (src->max_key_code + 1) * - sizeof(unsigned short)); - else - tmp = xalloc((src->max_key_code + 1) * - sizeof(unsigned short)); + tmp = realloc(dst->server->vmodmap, + (src->max_key_code + 1) * sizeof(unsigned short)); if (!tmp) return FALSE; dst->server->vmodmap = tmp; @@ -1280,10 +1228,8 @@ _XkbCopyServerMap(XkbDescPtr src, XkbDescPtr dst) (src->max_key_code + 1) * sizeof(unsigned short)); } else { - if (dst->server->vmodmap) { - xfree(dst->server->vmodmap); - dst->server->vmodmap = NULL; - } + free(dst->server->vmodmap); + dst->server->vmodmap = NULL; } } else { @@ -1302,19 +1248,15 @@ _XkbCopyNames(XkbDescPtr src, XkbDescPtr dst) /* names */ if (src->names) { if (!dst->names) { - dst->names = xcalloc(1, sizeof(XkbNamesRec)); + dst->names = calloc(1, sizeof(XkbNamesRec)); if (!dst->names) return FALSE; } if (src->names->keys) { if (src->max_key_code != dst->max_key_code) { - if (dst->names->keys) - tmp = xrealloc(dst->names->keys, (src->max_key_code + 1) * - sizeof(XkbKeyNameRec)); - else - tmp = xalloc((src->max_key_code + 1) * - sizeof(XkbKeyNameRec)); + tmp = realloc(dst->names->keys, + (src->max_key_code + 1) * sizeof(XkbKeyNameRec)); if (!tmp) return FALSE; dst->names->keys = tmp; @@ -1323,21 +1265,15 @@ _XkbCopyNames(XkbDescPtr src, XkbDescPtr dst) (src->max_key_code + 1) * sizeof(XkbKeyNameRec)); } else { - if (dst->names->keys) { - xfree(dst->names->keys); - dst->names->keys = NULL; - } + free(dst->names->keys); + dst->names->keys = NULL; } if (src->names->num_key_aliases) { if (src->names->num_key_aliases != dst->names->num_key_aliases) { - if (dst->names->key_aliases) - tmp = xrealloc(dst->names->key_aliases, - src->names->num_key_aliases * - sizeof(XkbKeyAliasRec)); - else - tmp = xalloc(src->names->num_key_aliases * - sizeof(XkbKeyAliasRec)); + tmp = realloc(dst->names->key_aliases, + src->names->num_key_aliases * + sizeof(XkbKeyAliasRec)); if (!tmp) return FALSE; dst->names->key_aliases = tmp; @@ -1346,20 +1282,15 @@ _XkbCopyNames(XkbDescPtr src, XkbDescPtr dst) src->names->num_key_aliases * sizeof(XkbKeyAliasRec)); } else { - if (dst->names->key_aliases) { - xfree(dst->names->key_aliases); - dst->names->key_aliases = NULL; - } + free(dst->names->key_aliases); + dst->names->key_aliases = NULL; } dst->names->num_key_aliases = src->names->num_key_aliases; if (src->names->num_rg) { if (src->names->num_rg != dst->names->num_rg) { - if (dst->names->radio_groups) - tmp = xrealloc(dst->names->radio_groups, - src->names->num_rg * sizeof(Atom)); - else - tmp = xalloc(src->names->num_rg * sizeof(Atom)); + tmp = realloc(dst->names->radio_groups, + src->names->num_rg * sizeof(Atom)); if (!tmp) return FALSE; dst->names->radio_groups = tmp; @@ -1368,8 +1299,7 @@ _XkbCopyNames(XkbDescPtr src, XkbDescPtr dst) src->names->num_rg * sizeof(Atom)); } else { - if (dst->names->radio_groups) - xfree(dst->names->radio_groups); + free(dst->names->radio_groups); } dst->names->num_rg = src->names->num_rg; @@ -1403,20 +1333,15 @@ _XkbCopyCompat(XkbDescPtr src, XkbDescPtr dst) /* compat */ if (src->compat) { if (!dst->compat) { - dst->compat = xcalloc(1, sizeof(XkbCompatMapRec)); + dst->compat = calloc(1, sizeof(XkbCompatMapRec)); if (!dst->compat) return FALSE; } if (src->compat->sym_interpret && src->compat->num_si) { if (src->compat->num_si != dst->compat->size_si) { - if (dst->compat->sym_interpret) - tmp = xrealloc(dst->compat->sym_interpret, - src->compat->num_si * - sizeof(XkbSymInterpretRec)); - else - tmp = xalloc(src->compat->num_si * - sizeof(XkbSymInterpretRec)); + tmp = realloc(dst->compat->sym_interpret, + src->compat->num_si * sizeof(XkbSymInterpretRec)); if (!tmp) return FALSE; dst->compat->sym_interpret = tmp; @@ -1429,7 +1354,7 @@ _XkbCopyCompat(XkbDescPtr src, XkbDescPtr dst) } else { if (dst->compat->sym_interpret && dst->compat->size_si) - xfree(dst->compat->sym_interpret); + free(dst->compat->sym_interpret); dst->compat->sym_interpret = NULL; dst->compat->num_si = 0; @@ -1463,7 +1388,7 @@ _XkbCopyGeom(XkbDescPtr src, XkbDescPtr dst) /* geometry */ if (src->geom) { if (!dst->geom) { - dst->geom = xcalloc(sizeof(XkbGeometryRec), 1); + dst->geom = calloc(sizeof(XkbGeometryRec), 1); if (!dst->geom) return FALSE; } @@ -1479,17 +1404,17 @@ _XkbCopyGeom(XkbDescPtr src, XkbDescPtr dst) dprop = dst->geom->properties + i; i < dst->geom->num_properties; i++, dprop++) { - xfree(dprop->name); - xfree(dprop->value); + free(dprop->name); + free(dprop->value); } } if (dst->geom->sz_properties) - tmp = xrealloc(dst->geom->properties, + tmp = realloc(dst->geom->properties, src->geom->num_properties * sizeof(XkbPropertyRec)); else - tmp = xalloc(src->geom->num_properties * + tmp = malloc(src->geom->num_properties * sizeof(XkbPropertyRec)); if (!tmp) return FALSE; @@ -1501,7 +1426,7 @@ _XkbCopyGeom(XkbDescPtr src, XkbDescPtr dst) dst->geom->sz_properties = src->geom->num_properties; if (dst->geom->sz_properties > dst->geom->num_properties) { - bzero(dst->geom->properties + dst->geom->num_properties, + memset(dst->geom->properties + dst->geom->num_properties, 0, (dst->geom->sz_properties - dst->geom->num_properties) * sizeof(XkbPropertyRec)); } @@ -1513,13 +1438,13 @@ _XkbCopyGeom(XkbDescPtr src, XkbDescPtr dst) i++, sprop++, dprop++) { if (i < dst->geom->num_properties) { if (strlen(sprop->name) != strlen(dprop->name)) { - tmp = xrealloc(dprop->name, strlen(sprop->name) + 1); + tmp = realloc(dprop->name, strlen(sprop->name) + 1); if (!tmp) return FALSE; dprop->name = tmp; } if (strlen(sprop->value) != strlen(dprop->value)) { - tmp = xrealloc(dprop->value, strlen(sprop->value) + 1); + tmp = realloc(dprop->value, strlen(sprop->value) + 1); if (!tmp) return FALSE; dprop->value = tmp; @@ -1541,10 +1466,10 @@ _XkbCopyGeom(XkbDescPtr src, XkbDescPtr dst) for (i = 0, dprop = dst->geom->properties; i < dst->geom->num_properties; i++, dprop++) { - xfree(dprop->name); - xfree(dprop->value); + free(dprop->name); + free(dprop->value); } - xfree(dst->geom->properties); + free(dst->geom->properties); dst->geom->properties = NULL; } @@ -1560,16 +1485,16 @@ _XkbCopyGeom(XkbDescPtr src, XkbDescPtr dst) dcolor = dst->geom->colors + i; i < dst->geom->num_colors; i++, dcolor++) { - xfree(dcolor->spec); + free(dcolor->spec); } } if (dst->geom->sz_colors) - tmp = xrealloc(dst->geom->colors, + tmp = realloc(dst->geom->colors, src->geom->num_colors * sizeof(XkbColorRec)); else - tmp = xalloc(src->geom->num_colors * + tmp = malloc(src->geom->num_colors * sizeof(XkbColorRec)); if (!tmp) return FALSE; @@ -1579,7 +1504,7 @@ _XkbCopyGeom(XkbDescPtr src, XkbDescPtr dst) dst->geom->sz_colors = src->geom->num_colors; if (dst->geom->sz_colors > dst->geom->num_colors) { - bzero(dst->geom->colors + dst->geom->num_colors, + memset(dst->geom->colors + dst->geom->num_colors, 0, (dst->geom->sz_colors - dst->geom->num_colors) * sizeof(XkbColorRec)); } @@ -1591,7 +1516,7 @@ _XkbCopyGeom(XkbDescPtr src, XkbDescPtr dst) i++, scolor++, dcolor++) { if (i < dst->geom->num_colors) { if (strlen(scolor->spec) != strlen(dcolor->spec)) { - tmp = xrealloc(dcolor->spec, strlen(scolor->spec) + 1); + tmp = realloc(dcolor->spec, strlen(scolor->spec) + 1); if (!tmp) return FALSE; dcolor->spec = tmp; @@ -1611,9 +1536,9 @@ _XkbCopyGeom(XkbDescPtr src, XkbDescPtr dst) for (i = 0, dcolor = dst->geom->colors; i < dst->geom->num_colors; i++, dcolor++) { - xfree(dcolor->spec); + free(dcolor->spec); } - xfree(dst->geom->colors); + free(dst->geom->colors); dst->geom->colors = NULL; } @@ -1631,11 +1556,11 @@ _XkbCopyGeom(XkbDescPtr src, XkbDescPtr dst) j < dshape->num_outlines; j++, doutline++) { if (doutline->sz_points) - xfree(doutline->points); + free(doutline->points); } if (dshape->sz_outlines) { - xfree(dshape->outlines); + free(dshape->outlines); dshape->outlines = NULL; } @@ -1645,7 +1570,7 @@ _XkbCopyGeom(XkbDescPtr src, XkbDescPtr dst) } if (src->geom->num_shapes) { - tmp = xcalloc(src->geom->num_shapes, sizeof(XkbShapeRec)); + tmp = calloc(src->geom->num_shapes, sizeof(XkbShapeRec)); if (!tmp) return FALSE; dst->geom->shapes = tmp; @@ -1654,7 +1579,7 @@ _XkbCopyGeom(XkbDescPtr src, XkbDescPtr dst) i < src->geom->num_shapes; i++, sshape++, dshape++) { if (sshape->num_outlines) { - tmp = xcalloc(sshape->num_outlines, sizeof(XkbOutlineRec)); + tmp = calloc(sshape->num_outlines, sizeof(XkbOutlineRec)); if (!tmp) return FALSE; dshape->outlines = tmp; @@ -1665,7 +1590,7 @@ _XkbCopyGeom(XkbDescPtr src, XkbDescPtr dst) j < sshape->num_outlines; j++, soutline++, doutline++) { if (soutline->num_points) { - tmp = xalloc(soutline->num_points * + tmp = malloc(soutline->num_points * sizeof(XkbPointRec)); if (!tmp) return FALSE; @@ -1721,7 +1646,7 @@ _XkbCopyGeom(XkbDescPtr src, XkbDescPtr dst) } else { if (dst->geom->sz_shapes) { - xfree(dst->geom->shapes); + free(dst->geom->shapes); } dst->geom->shapes = NULL; dst->geom->num_shapes = 0; @@ -1739,36 +1664,29 @@ _XkbCopyGeom(XkbDescPtr src, XkbDescPtr dst) j < dsection->num_rows; j++, drow++) { if (drow->num_keys) - xfree(drow->keys); + free(drow->keys); } if (dsection->num_rows) - xfree(dsection->rows); + free(dsection->rows); /* cut and waste from geom/doodad below. */ for (j = 0, ddoodad = dsection->doodads; j < dsection->num_doodads; j++, ddoodad++) { if (ddoodad->any.type == XkbTextDoodad) { - if (ddoodad->text.text) { - xfree(ddoodad->text.text); - ddoodad->text.text = NULL; - } - if (ddoodad->text.font) { - xfree(ddoodad->text.font); - ddoodad->text.font = NULL; - } + free(ddoodad->text.text); + ddoodad->text.text = NULL; + free(ddoodad->text.font); + ddoodad->text.font = NULL; } else if (ddoodad->any.type == XkbLogoDoodad) { - if (ddoodad->logo.logo_name) { - xfree(ddoodad->logo.logo_name); - ddoodad->logo.logo_name = NULL; - } + free(ddoodad->logo.logo_name); + ddoodad->logo.logo_name = NULL; } } - if (dsection->num_doodads) - xfree(dsection->doodads); + free(dsection->doodads); } dst->geom->num_sections = 0; @@ -1777,11 +1695,11 @@ _XkbCopyGeom(XkbDescPtr src, XkbDescPtr dst) if (src->geom->num_sections) { if (dst->geom->sz_sections) - tmp = xrealloc(dst->geom->sections, + tmp = realloc(dst->geom->sections, src->geom->num_sections * sizeof(XkbSectionRec)); else - tmp = xalloc(src->geom->num_sections * sizeof(XkbSectionRec)); + tmp = malloc(src->geom->num_sections * sizeof(XkbSectionRec)); if (!tmp) return FALSE; memset(tmp, 0, src->geom->num_sections * sizeof(XkbSectionRec)); @@ -1796,7 +1714,7 @@ _XkbCopyGeom(XkbDescPtr src, XkbDescPtr dst) i++, ssection++, dsection++) { *dsection = *ssection; if (ssection->num_rows) { - tmp = xcalloc(ssection->num_rows, sizeof(XkbRowRec)); + tmp = calloc(ssection->num_rows, sizeof(XkbRowRec)); if (!tmp) return FALSE; dsection->rows = tmp; @@ -1808,7 +1726,7 @@ _XkbCopyGeom(XkbDescPtr src, XkbDescPtr dst) j < ssection->num_rows; j++, srow++, drow++) { if (srow->num_keys) { - tmp = xalloc(srow->num_keys * sizeof(XkbKeyRec)); + tmp = malloc(srow->num_keys * sizeof(XkbKeyRec)); if (!tmp) return FALSE; drow->keys = tmp; @@ -1824,7 +1742,7 @@ _XkbCopyGeom(XkbDescPtr src, XkbDescPtr dst) } if (ssection->num_doodads) { - tmp = xcalloc(ssection->num_doodads, sizeof(XkbDoodadRec)); + tmp = calloc(ssection->num_doodads, sizeof(XkbDoodadRec)); if (!tmp) return FALSE; dsection->doodads = tmp; @@ -1843,15 +1761,15 @@ _XkbCopyGeom(XkbDescPtr src, XkbDescPtr dst) if (sdoodad->any.type == XkbTextDoodad) { if (sdoodad->text.text) ddoodad->text.text = - xstrdup(sdoodad->text.text); + strdup(sdoodad->text.text); if (sdoodad->text.font) ddoodad->text.font = - xstrdup(sdoodad->text.font); + strdup(sdoodad->text.font); } else if (sdoodad->any.type == XkbLogoDoodad) { if (sdoodad->logo.logo_name) ddoodad->logo.logo_name = - xstrdup(sdoodad->logo.logo_name); + strdup(sdoodad->logo.logo_name); } } dsection->overlays = NULL; @@ -1861,7 +1779,7 @@ _XkbCopyGeom(XkbDescPtr src, XkbDescPtr dst) } else { if (dst->geom->sz_sections) { - xfree(dst->geom->sections); + free(dst->geom->sections); } dst->geom->sections = NULL; @@ -1877,20 +1795,14 @@ _XkbCopyGeom(XkbDescPtr src, XkbDescPtr dst) i < dst->geom->num_doodads; i++, ddoodad++) { if (ddoodad->any.type == XkbTextDoodad) { - if (ddoodad->text.text) { - xfree(ddoodad->text.text); - ddoodad->text.text = NULL; - } - if (ddoodad->text.font) { - xfree(ddoodad->text.font); - ddoodad->text.font = NULL; - } + free(ddoodad->text.text); + ddoodad->text.text = NULL; + free(ddoodad->text.font); + ddoodad->text.font = NULL; } else if (ddoodad->any.type == XkbLogoDoodad) { - if (ddoodad->logo.logo_name) { - xfree(ddoodad->logo.logo_name); - ddoodad->logo.logo_name = NULL; - } + free(ddoodad->logo.logo_name); + ddoodad->logo.logo_name = NULL; } } dst->geom->num_doodads = 0; @@ -1899,11 +1811,11 @@ _XkbCopyGeom(XkbDescPtr src, XkbDescPtr dst) if (src->geom->num_doodads) { if (dst->geom->sz_doodads) - tmp = xrealloc(dst->geom->doodads, + tmp = realloc(dst->geom->doodads, src->geom->num_doodads * sizeof(XkbDoodadRec)); else - tmp = xalloc(src->geom->num_doodads * + tmp = malloc(src->geom->num_doodads * sizeof(XkbDoodadRec)); if (!tmp) return FALSE; @@ -1920,14 +1832,14 @@ _XkbCopyGeom(XkbDescPtr src, XkbDescPtr dst) memcpy(ddoodad , sdoodad, sizeof(XkbDoodadRec)); if (sdoodad->any.type == XkbTextDoodad) { if (sdoodad->text.text) - ddoodad->text.text = xstrdup(sdoodad->text.text); + ddoodad->text.text = strdup(sdoodad->text.text); if (sdoodad->text.font) - ddoodad->text.font = xstrdup(sdoodad->text.font); + ddoodad->text.font = strdup(sdoodad->text.font); } else if (sdoodad->any.type == XkbLogoDoodad) { if (sdoodad->logo.logo_name) ddoodad->logo.logo_name = - xstrdup(sdoodad->logo.logo_name); + strdup(sdoodad->logo.logo_name); } } @@ -1935,7 +1847,7 @@ _XkbCopyGeom(XkbDescPtr src, XkbDescPtr dst) } else { if (dst->geom->sz_doodads) { - xfree(dst->geom->doodads); + free(dst->geom->doodads); } dst->geom->doodads = NULL; @@ -1947,11 +1859,11 @@ _XkbCopyGeom(XkbDescPtr src, XkbDescPtr dst) if (src->geom->num_key_aliases) { if (src->geom->num_key_aliases != dst->geom->sz_key_aliases) { if (dst->geom->sz_key_aliases) - tmp = xrealloc(dst->geom->key_aliases, + tmp = realloc(dst->geom->key_aliases, src->geom->num_key_aliases * 2 * XkbKeyNameLength); else - tmp = xalloc(src->geom->num_key_aliases * + tmp = malloc(src->geom->num_key_aliases * 2 * XkbKeyNameLength); if (!tmp) return FALSE; @@ -1966,9 +1878,7 @@ _XkbCopyGeom(XkbDescPtr src, XkbDescPtr dst) dst->geom->num_key_aliases = dst->geom->sz_key_aliases; } else { - if (dst->geom->key_aliases) { - xfree(dst->geom->key_aliases); - } + free(dst->geom->key_aliases); dst->geom->key_aliases = NULL; dst->geom->num_key_aliases = 0; dst->geom->sz_key_aliases = 0; @@ -1977,14 +1887,14 @@ _XkbCopyGeom(XkbDescPtr src, XkbDescPtr dst) /* font */ if (src->geom->label_font) { if (!dst->geom->label_font) { - tmp = xalloc(strlen(src->geom->label_font) + 1); + tmp = malloc(strlen(src->geom->label_font) + 1); if (!tmp) return FALSE; dst->geom->label_font = tmp; } else if (strlen(src->geom->label_font) != strlen(dst->geom->label_font)) { - tmp = xrealloc(dst->geom->label_font, + tmp = realloc(dst->geom->label_font, strlen(src->geom->label_font) + 1); if (!tmp) return FALSE; @@ -1998,9 +1908,7 @@ _XkbCopyGeom(XkbDescPtr src, XkbDescPtr dst) dst->geom->base_color = &(dst->geom->colors[i]); } else { - if (dst->geom->label_font) { - xfree(dst->geom->label_font); - } + free(dst->geom->label_font); dst->geom->label_font = NULL; dst->geom->label_color = NULL; dst->geom->base_color = NULL; @@ -2028,17 +1936,15 @@ _XkbCopyIndicators(XkbDescPtr src, XkbDescPtr dst) /* indicators */ if (src->indicators) { if (!dst->indicators) { - dst->indicators = xalloc(sizeof(XkbIndicatorRec)); + dst->indicators = malloc(sizeof(XkbIndicatorRec)); if (!dst->indicators) return FALSE; } memcpy(dst->indicators, src->indicators, sizeof(XkbIndicatorRec)); } else { - if (dst->indicators) { - xfree(dst->indicators); - dst->indicators = NULL; - } + free(dst->indicators); + dst->indicators = NULL; } return TRUE; } @@ -2049,17 +1955,15 @@ _XkbCopyControls(XkbDescPtr src, XkbDescPtr dst) /* controls */ if (src->ctrls) { if (!dst->ctrls) { - dst->ctrls = xalloc(sizeof(XkbControlsRec)); + dst->ctrls = malloc(sizeof(XkbControlsRec)); if (!dst->ctrls) return FALSE; } memcpy(dst->ctrls, src->ctrls, sizeof(XkbControlsRec)); } else { - if (dst->ctrls) { - xfree(dst->ctrls); - dst->ctrls = NULL; - } + free(dst->ctrls); + dst->ctrls = NULL; } return TRUE; } @@ -2190,3 +2094,29 @@ XkbGetEffectiveGroup(XkbSrvInfoPtr xkbi, XkbStatePtr xkbState, CARD8 keycode) return effectiveGroup; } + +/* Merge the lockedPtrButtons from all attached SDs for the given master + * device into the MD's state. + */ +void +XkbMergeLockedPtrBtns(DeviceIntPtr master) +{ + DeviceIntPtr d = inputInfo.devices; + XkbSrvInfoPtr xkbi = NULL; + + if (!IsMaster(master)) + return; + + if (!master->key) + return; + + xkbi = master->key->xkbInfo; + xkbi->lockedPtrButtons = 0; + + for (; d; d = d->next) { + if (IsMaster(d) || GetMaster(d, MASTER_KEYBOARD) != master || !d->key) + continue; + + xkbi->lockedPtrButtons |= d->key->xkbInfo->lockedPtrButtons; + } +} diff --git a/xserver/xkb/xkbfmisc.c b/xserver/xkb/xkbfmisc.c index 103e609a9..7aa9863f2 100644 --- a/xserver/xkb/xkbfmisc.c +++ b/xserver/xkb/xkbfmisc.c @@ -437,5 +437,5 @@ XkbNameMatchesPattern(char *name,char *ptrn) ptrn++; } /* if we get here, the pattern is exhausted (-:just like me:-) */ - return (name[0]=='\0'); + return name[0]=='\0'; } diff --git a/xserver/xkb/xkbout.c b/xserver/xkb/xkbout.c index 68ede902f..082c85ee9 100644 --- a/xserver/xkb/xkbout.c +++ b/xserver/xkb/xkbout.c @@ -353,9 +353,13 @@ XkbClientMapPtr map; XkbServerMapPtr srv; Bool showActions; + if (!xkb) { + _XkbLibError(_XkbErrMissingSymbols,"XkbWriteXKBSymbols",0); + return FALSE; + } + map= xkb->map; - srv= xkb->server; - if ((!xkb)||(!map)||(!map->syms)||(!map->key_sym_map)) { + if ((!map)||(!map->syms)||(!map->key_sym_map)) { _XkbLibError(_XkbErrMissingSymbols,"XkbWriteXKBSymbols",0); return FALSE; } @@ -376,6 +380,7 @@ Bool showActions; } if (tmp>0) fprintf(file,"\n"); + srv= xkb->server; for (i=xkb->min_key_code;i<=xkb->max_key_code;i++) { Bool simple; if ((int)XkbKeyNumSyms(xkb,i)<1) diff --git a/xserver/xkb/xkmread.c b/xserver/xkb/xkmread.c index a201731f3..814bb1d41 100644 --- a/xserver/xkb/xkmread.c +++ b/xserver/xkb/xkmread.c @@ -58,7 +58,7 @@ char *new; if (str==NULL) return NULL; - new= xcalloc(strlen(str)+1,sizeof(char)); + new= calloc(strlen(str)+1,sizeof(char)); if (new) strcpy(new,str); return new; @@ -74,13 +74,13 @@ int newCount= *newCountRtrn; if (oldPtr==NULL) { if (newCount==0) return NULL; - oldPtr= xcalloc(newCount,elemSize); + oldPtr= calloc(newCount,elemSize); } else if (oldCount